diff --git a/internal/ui/dist/assets/WarningCircle.es-B9fMV2kb.js b/internal/ui/dist/assets/WarningCircle.es-D8T3bcu9.js similarity index 98% rename from internal/ui/dist/assets/WarningCircle.es-B9fMV2kb.js rename to internal/ui/dist/assets/WarningCircle.es-D8T3bcu9.js index b20a860e5..3950597ea 100644 --- a/internal/ui/dist/assets/WarningCircle.es-B9fMV2kb.js +++ b/internal/ui/dist/assets/WarningCircle.es-D8T3bcu9.js @@ -1 +1 @@ -import{i as e,r as t,s as n}from"./useRouter-ByJ6_rwb.js";import{M as r,Y as i,a,f as o,w as s}from"./brand-DUaZkIz1.js";import{G as c,J as l,K as u,W as d,X as f,Y as p,Z as m,q as h}from"./index-Bz4uzIyA.js";var g={root:`m_849cf0da`},_=t(),v={underline:`hover`},y=s(e=>{let{underline:t,className:n,unstyled:a,mod:s,...c}=r(`Anchor`,v,e);return(0,_.jsx)(o,{component:`a`,className:i({[g.root]:!a},n),...c,mod:[{underline:t},s],__staticSelector:`Anchor`,unstyled:a})});y.classes=g,y.displayName=`@mantine/core/Anchor`;var b=class extends u{#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),p(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&h(t.mutationKey)!==h(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??d();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){c.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},x=n(e(),1);function S(e,t){let n=m(t),[r]=x.useState(()=>new b(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);let i=x.useSyncExternalStore(x.useCallback(e=>r.subscribe(c.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=x.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(l)},[r]);if(i.error&&f(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var C=new Map([[`bold`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),x.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]]),w=x.forwardRef((e,t)=>x.createElement(a,{ref:t,...e,weights:C}));w.displayName=`WarningCircleIcon`;var T=w;export{S as n,y as r,T as t}; \ No newline at end of file +import{i as e,r as t,s as n}from"./useRouter-ByJ6_rwb.js";import{M as r,Y as i,a,f as o,w as s}from"./brand-DUaZkIz1.js";import{G as c,J as l,K as u,W as d,X as f,Y as p,Z as m,q as h}from"./index-A3IfO-3c.js";var g={root:`m_849cf0da`},_=t(),v={underline:`hover`},y=s(e=>{let{underline:t,className:n,unstyled:a,mod:s,...c}=r(`Anchor`,v,e);return(0,_.jsx)(o,{component:`a`,className:i({[g.root]:!a},n),...c,mod:[{underline:t},s],__staticSelector:`Anchor`,unstyled:a})});y.classes=g,y.displayName=`@mantine/core/Anchor`;var b=class extends u{#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),p(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&h(t.mutationKey)!==h(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??d();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){c.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},x=n(e(),1);function S(e,t){let n=m(t),[r]=x.useState(()=>new b(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);let i=x.useSyncExternalStore(x.useCallback(e=>r.subscribe(c.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=x.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(l)},[r]);if(i.error&&f(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var C=new Map([[`bold`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z`}))],[`duotone`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),x.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`fill`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z`}))],[`light`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z`}))],[`regular`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z`}))],[`thin`,x.createElement(x.Fragment,null,x.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z`}))]]),w=x.forwardRef((e,t)=>x.createElement(a,{ref:t,...e,weights:C}));w.displayName=`WarningCircleIcon`;var T=w;export{S as n,y as r,T as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat-D2upr1iS.js b/internal/ui/dist/assets/chat-D2upr1iS.js deleted file mode 100644 index 3bba07ef4..000000000 --- a/internal/ui/dist/assets/chat-D2upr1iS.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mcp-app-frame-eVpUegSR.js","assets/useRouter-ByJ6_rwb.js","assets/brand-DUaZkIz1.js","assets/index-Bz4uzIyA.js","assets/useNavigate-B1zgPEUp.js","assets/preload-helper-FMCtZeYw.js","assets/Tooltip-B3r3s_B9.js","assets/index-ByVYR1iM.css"])))=>i.map(i=>d[i]); -import{i as e,r as t,s as n}from"./useRouter-ByJ6_rwb.js";import{A as r,C as i,M as a,S as o,T as s,_ as c,a as l,c as u,d,f,i as p,l as m,m as h,n as g,o as ee,p as _,r as v,tt as y,u as b,x,y as S}from"./brand-DUaZkIz1.js";import{c as C,d as w,f as T,g as E,h as D,l as O,o as te,p as k,s as A,t as j}from"./preload-helper-FMCtZeYw.js";import{t as M}from"./Tooltip-B3r3s_B9.js";import{c as N,d as P,l as F,o as I,r as ne,s as re,t as ie,u as ae}from"./dashboard-change-chips-BKnD9tpX.js";var L=n(e(),1),R=t(),oe=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],z={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function B(e){Object.keys(z).forEach(t=>{e.style.setProperty(t,z[t],`important`)})}function se(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of oe)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var V=null;function ce(e,t,n=1,r=1/0){V||(V=document.createElement(`textarea`),V.setAttribute(`tabindex`,`-1`),V.setAttribute(`aria-hidden`,`true`),V.setAttribute(`aria-label`,`autosize measurement`),B(V)),V.parentNode===null&&document.body.appendChild(V);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{V.style[e]=o[e]}),B(V),V.value=t;let c=s===`border-box`?V.scrollHeight+a:V.scrollHeight-i;V.value=t,c=s===`border-box`?V.scrollHeight+a:V.scrollHeight-i,V.value=`x`;let l=V.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function le({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,L.useRef)(null),s=y(o,r),c=(0,L.useRef)(0),l=(0,L.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=se(n);if(!r)return;let[i]=ce(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=(0,L.useEffectEvent)(u),f=e=>{a||u(),n?.(e)};return(0,L.useLayoutEffect)(u),(0,L.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,L.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=0,n=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,cancelAnimationFrame(t),t=requestAnimationFrame(d))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]),(0,L.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,L.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&u()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,R.jsx)(`textarea`,{rows:t,...i,onChange:f,ref:s})}var H=s(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:o,bottomSection:s,bottomSectionProps:c,...l}=a([`Input`,`InputWrapper`,`Textarea`],null,e),u=t&&P()!==`test`,d=u?{maxRows:n,minRows:r}:{};return(0,R.jsx)(h,{component:u?le:`textarea`,...l,__staticSelector:i||`Textarea`,__bottomSection:s,__bottomSectionProps:c,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":o},...d})});H.classes=h.classes,H.displayName=`@mantine/core/Textarea`;var U={root:`m_d08caa0`},W=s(e=>{let t=a(`Typography`,null,e),{classNames:n,className:o,style:s,styles:c,unstyled:l,attributes:u,...d}=t,f=r({name:`Typography`,classes:U,props:t,className:o,style:s,classNames:n,styles:c,unstyled:l,attributes:u});return(0,R.jsx)(i,{...f(`root`),...d})});W.classes=U,W.displayName=`@mantine/core/Typography`;var ue=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),de=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z`}))]]),fe=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z`}))]]),G=L.forwardRef((e,t)=>L.createElement(l,{ref:t,...e,weights:ue}));G.displayName=`CaretRightIcon`;var K=G,q=L.forwardRef((e,t)=>L.createElement(l,{ref:t,...e,weights:de}));q.displayName=`PaperPlaneTiltIcon`;var pe=q,J=L.forwardRef((e,t)=>L.createElement(l,{ref:t,...e,weights:fe}));J.displayName=`StopIcon`;var me=J;function he(e){return e.dashboard.panels.length===1?e.dashboard.panels[0].title:e.dashboard.name}function ge(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Missing panel view`);let t=e;if(!t.view||![`preset`,`query`].includes(t.view.kind)||!/^[a-f0-9]{64}$/.test(t.view.key))throw Error(`Invalid panel view identity`);if(t.dashboard?.version!==1||!Array.isArray(t.dashboard.panels)||!t.dashboard.panels.length||t.dashboard.panels.length>40||!Array.isArray(t.results)||t.dashboard.panels.some(e=>!e||typeof e.id!=`string`||!e.id)||t.results.some(e=>!e||typeof e.id!=`string`))throw Error(`Invalid panel view`);let n=new Set(t.dashboard.panels.map(e=>e.id));if(n.size!==t.dashboard.panels.length||t.results.length!==n.size||new Set(t.results.map(e=>e.id)).size!==n.size||t.results.some(e=>!n.has(e.id)||![`ok`,`empty`,`error`].includes(e.status)))throw Error(`Panel results do not match the view`);if(t.vars!==void 0&&(!t.vars||typeof t.vars!=`object`||Array.isArray(t.vars)||Object.values(t.vars).some(e=>typeof e!=`string`&&!(Array.isArray(e)&&e.every(e=>typeof e==`string`)))))throw Error(`Invalid panel variables`);if(t.trace!==void 0&&(!t.trace?.data||!Array.isArray(t.trace.data.spans)||!Array.isArray(t.trace.data.logs)||!Array.isArray(t.trace.data.services)))throw Error(`Invalid trace detail`);return t}var Y=new WeakSet;function X(e){if(!e||typeof e!=`object`||Array.isArray(e))return;if(Y.has(e))return e;let t=e;if(Object.keys(t).sort().join(`,`)===`is_error,resource_uri,tool_input,tool_name,tool_result`&&t.resource_uri===`ui://fanout/panels.html`&&typeof t.tool_name==`string`&&t.tool_name&&typeof t.is_error==`boolean`&&t.tool_input&&typeof t.tool_input==`object`&&!Array.isArray(t.tool_input)){try{ge(t.tool_result)}catch{return}return Y.add(t),t}}var _e=64,ve=300;function ye(){let e=(0,L.useRef)(null),t=(0,L.useRef)(!0),n=(0,L.useRef)(()=>{}),r=(0,L.useRef)(null),i=(0,L.useRef)(null),a=(0,L.useCallback)(()=>{let t=e.current;if(!t)return;let n=t.getBoundingClientRect().top,r=[...t.querySelectorAll(`[data-chat-anchor]`)].find(e=>e.getBoundingClientRect().bottom>n);i.current=r?{node:r,top:r.getBoundingClientRect().top}:null},[]),o=(0,L.useCallback)(()=>{let n=e.current;n&&t.current?n.scrollTop=n.scrollHeight:n&&i.current?.node.isConnected&&(n.scrollTop+=i.current.node.getBoundingClientRect().top-i.current.top),a()},[a]);return{scrollRef:(0,L.useCallback)(r=>{if(n.current(),e.current=r,!r)return;let o=0,s=!1,c=()=>{o=Date.now()},l=()=>{s=!0},u=()=>{s=!1},d=()=>{r.scrollHeight-r.clientHeight-r.scrollTop<=_e?t.current=!0:(s||Date.now()-o{r.removeEventListener(`scroll`,d),r.removeEventListener(`wheel`,c),r.removeEventListener(`touchmove`,c),r.removeEventListener(`keydown`,c),r.removeEventListener(`pointerdown`,l),window.removeEventListener(`pointerup`,u),n.current=()=>{}},t.current=!0,r.scrollTop=r.scrollHeight,i.current=null},[a]),contentRef:(0,L.useCallback)(e=>{r.current?.disconnect(),r.current=null,e&&(r.current=new ResizeObserver(o),r.current.observe(e))},[o]),toBottom:(0,L.useCallback)(()=>{t.current=!0,o()},[o])}}function be(e=1500){let[t,n]=(0,L.useState)(`idle`),r=(0,L.useRef)(null);(0,L.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);function i(t){r.current&&clearTimeout(r.current),n(`idle`),(navigator.clipboard?navigator.clipboard.writeText(t):Promise.reject(Error(`clipboard unavailable`))).then(()=>n(`copied`),()=>n(`failed`)).finally(()=>{r.current=setTimeout(()=>n(`idle`),e)})}return{state:t,copy:i}}var xe={schema:`Telemetry`,context:`Context`,draft:`Draft`,validation:`Validation`,preview:`Preview`,save:`Save`},Z=e=>`${(e/1e3).toFixed(1)} s`;function Se({receipt:e,running:t=!1,activity:n=``,awaitingAnswer:r=!1}){let[i,a]=(0,L.useState)(!1),o=(0,L.useId)(),s=e.saved,l=s?.receipt.save_check,p=Object.values(e.stages).filter(e=>e.state===`complete`).length,m=[e.stages.schema.state===`complete`?`Read telemetry`:void 0,e.panel_count===void 0?void 0:`${e.panel_count} ${e.panel_count===1?`panel`:`panels`}`,l?.checked?`Checked in ${Z(l.elapsed_ms)}`:void 0,s?`Saved v${s.version}`:void 0].filter(Boolean).join(` · `)||`Building dashboard`,h=[...s?C(s.receipt):[],...e.corrections.map(e=>`Fixed ${e.panel_id}.${e.path.replace(/^panels\[\d+\]\./,``)}`)];return(0,R.jsx)(x,{"data-build-receipt":e.turn_id,"data-dashboard-result":s?.id,"data-chat-anchor":!0,withBorder:!0,radius:`md`,p:`sm`,children:(0,R.jsxs)(u,{gap:6,children:[(0,R.jsxs)(c,{gap:`xs`,justify:`space-between`,children:[(0,R.jsxs)(f,{size:`sm`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[m,(0,R.jsxs)(f,{span:!0,c:`dimmed`,size:`xs`,children:[` · `,p,` stages complete`]})]}),(0,R.jsxs)(d,{component:`button`,variant:`subtle`,color:`gray`,size:`compact-xs`,"aria-expanded":i,"aria-controls":o,onClick:()=>a(e=>!e),children:[`Details`,h.length>4?` (+${h.length-4})`:``]})]}),t&&r&&(0,R.jsxs)(c,{gap:`xs`,"data-build-running":!0,children:[(0,R.jsx)(S,{type:`dots`,size:`sm`}),(0,R.jsx)(f,{c:`dimmed`,size:`sm`,children:n||`Analyzing your system`})]}),(0,R.jsx)(ie,{labels:h.slice(0,4)}),e.explanations.map(e=>t?e.split(` · `).filter(e=>!e.endsWith(`: incomplete`)).join(` · `):e).filter(Boolean).map((e,t)=>(0,R.jsx)(f,{size:`xs`,c:`dimmed`,"data-receipt-attention":!0,children:e},t)),s&&(0,R.jsx)(d,{renderRoot:e=>(0,R.jsx)(E,{...e,to:`/dashboards/$dashboardId`,params:{dashboardId:s.id},search:{}}),variant:`subtle`,size:`compact-sm`,color:`gray`,style:{alignSelf:`flex-start`},children:`Open dashboard`}),(0,R.jsx)(ae,{expanded:i,id:o,children:(0,R.jsxs)(u,{gap:4,children:[s&&(0,R.jsxs)(f,{size:`xs`,children:[s.label,` `,s.name,` · opens the current dashboard`]}),Object.entries(e.stages).map(([e,n])=>(0,R.jsxs)(f,{size:`xs`,c:`dimmed`,children:[xe[e],`: `,t&&n.state===`incomplete`?`in progress`:n.state,n.elapsed_ms===void 0?``:` · ${Z(n.elapsed_ms)}`]},e)),e.save_attempts.map((e,t)=>e.state===`retried`&&(0,R.jsxs)(f,{size:`xs`,c:`dimmed`,children:[`Save attempt `,t+1,`: retried`]},e.call_id)),!!e.context_counts.deploys&&(0,R.jsxs)(f,{size:`xs`,children:[e.context_counts.deploys,` deploys observed`]}),!!e.context_counts.anomalies&&(0,R.jsxs)(f,{size:`xs`,children:[e.context_counts.anomalies,` anomalies observed`]}),e.panels.map(e=>(0,R.jsxs)(f,{size:`xs`,children:[`Preview · `,e.id,`: `,e.status,e.elapsed_ms===void 0?``:` · ${Z(e.elapsed_ms)}`]},e.id)),l&&(0,R.jsxs)(f,{size:`xs`,children:[`Save check: `,l.checked?`checked`:`incomplete`,` · `,Z(l.elapsed_ms)]}),l?.panels.map(e=>(0,R.jsxs)(f,{size:`xs`,children:[`Save · `,e.id,`: `,e.status,` · `,e.rows??0,` rows`,e.elapsed_ms===void 0?``:` · ${Z(e.elapsed_ms)}`]},e.id)),h.slice(4).map((e,t)=>(0,R.jsx)(f,{size:`xs`,children:e},t)),e.corrections.map((e,t)=>(0,R.jsxs)(f,{size:`xs`,children:[`Fixed `,e.panel_id,`.`,e.path,`: `,e.message]},t))]})})]})})}var Ce=(0,L.lazy)(()=>j(()=>import(`./mcp-app-frame-eVpUegSR.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Q=e=>e.tool_result.view.kind===`preset`;function we(e){let t=new Map,n=new Set,r=[],i=()=>{let e=new Map;for(let t of r){let n=t.content.tool_result.view.key;e.set(n,t)}let i=new Set([...e.values()].map(e=>e.id)),a=[...e.values()].some(e=>Q(e.content)),o=r.filter(e=>i.has(e.id)).at(-1)?.id;for(let e of r)i.has(e.id)?t.set(e.id,{content:e.content,expanded:Q(e.content)||!a&&e.id===o}):n.add(e.id);r=[]};for(let t of e)if(t.role===`user`&&i(),t.role===`activity`&&t.activityType===`mcp-app`){let e=X(t.content);e&&r.push({id:t.id,content:e})}return i(),{views:t,duplicates:n}}function Te(e){let t=new Map,n=new Map,r=new Map,i=`unattributed`;for(let a of e){if(a.role===`user`&&(n.clear(),r.clear(),i=a.id),a.role===`assistant`){i=a.id;for(let e of a.toolCalls??[])n.set(e.id,{assistant:i,name:e.function.name})}if(a.role===`tool`){let e=w(a.content);if(!a.error&&!e?.error&&e?.isError!==!0)continue;let o=n.get(a.toolCallId);if(o&&T.has(o.name)&&O(a))continue;let s=o?.assistant??i,c=r.get(s)??a.id;r.set(s,c);let l=t.get(c)??[],u=k(e?.error)?e?.error:void 0,d=typeof u?.message==`string`?u.message:typeof a.error==`string`&&a.error?a.error:`Tool execution failed`;l.push({name:o?.name??`Tool`,message:d,readOnly:u?.code===`answer_only`}),t.set(c,l)}}return t}function Ee({failures:e}){let[t,n]=(0,L.useState)(!1),r=e.filter(e=>!e.readOnly);return(0,R.jsxs)(i,{"data-chat-anchor":!0,children:[e.some(e=>e.readOnly)&&(0,R.jsx)(f,{size:`sm`,c:`dimmed`,children:`Not saved: Explain is read-only`}),r.length>0&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(o,{className:`chat-app-toggle`,"aria-expanded":t,onClick:()=>n(e=>!e),style:{color:`var(--mantine-color-dimmed)`},children:[(0,R.jsx)(`span`,{className:`chat-app-chevron`,"aria-hidden":`true`,children:t?(0,R.jsx)(N,{size:14}):(0,R.jsx)(K,{size:14})}),(0,R.jsxs)(`span`,{className:`chat-app-summary`,children:[r.length,` tool `,r.length===1?`call`:`calls`,` failed`]})]}),t&&(0,R.jsx)(u,{gap:`xs`,pl:`md`,children:r.map((e,t)=>(0,R.jsxs)(f,{size:`sm`,c:`dimmed`,style:{whiteSpace:`pre-wrap`,overflowWrap:`anywhere`},children:[e.name,`: `,e.message]},t))})]})]})}function De({view:e}){let[t,n]=(0,L.useState)(e.expanded);(0,L.useEffect)(()=>n(e.expanded),[e.expanded]);let r=e.content.tool_result,i=he(r),a=[...new Set(r.dashboard.panels.map(e=>e.viz===`timeseries`?`time series`:e.viz.replaceAll(`_`,` `)))].join(`, `),s=r.results.reduce((e,t)=>e+(t.frame?.rows??0),0),c=new Map;for(let e of r.results)e.status!==`ok`&&c.set(e.status,(c.get(e.status)??0)+1);let l=r.dashboard.panels.length>1?[`${r.dashboard.panels.length} panels`,...Array.from(c,([e,t])=>`${t} ${e}`)].join(` · `):c.size?[...c.keys()].join(`, `):`${s} ${s===1?`row`:`rows`}`;return(0,R.jsxs)(x,{"data-chat-app":!0,"data-chat-anchor":!0,withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:[(0,R.jsxs)(o,{className:`chat-app-toggle`,"aria-expanded":t,onClick:()=>n(e=>!e),children:[(0,R.jsx)(`span`,{className:`chat-app-chevron`,"aria-hidden":`true`,children:t?(0,R.jsx)(N,{size:14}):(0,R.jsx)(K,{size:14})}),(0,R.jsxs)(`span`,{className:`chat-app-summary`,children:[i,` · `,a,` · `,l]})]}),t&&(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(b,{mih:180,children:(0,R.jsx)(S,{size:`sm`})}),children:(0,R.jsx)(Ce,{content:e.content})})]})}var Oe=[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`,`Show the slowest endpoints`];function ke(){let{agentAvailable:e,messages:t,messageTimes:n,ready:r,running:a,activity:o,provisional:s,stopped:l,error:p,threadMissing:h,send:g,retry:v,reloadThread:y,newThread:C}=A(),{scrollRef:w,contentRef:T,toBottom:E}=ye(),D=te(t),O=t.filter(e=>e.role===`user`).at(-1)?.id;if((0,L.useEffect)(()=>{O&&E()},[O,E]),!e)return(0,R.jsx)(m,{size:`sm`,py:96,children:(0,R.jsx)(x,{withBorder:!0,radius:`lg`,p:{base:`xl`,sm:40},children:(0,R.jsxs)(u,{gap:`md`,children:[(0,R.jsx)(f,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,R.jsx)(ee,{order:1,fz:28,children:`Chat is not configured`}),(0,R.jsx)(f,{c:`dimmed`,children:`Add an AI provider key to enable chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,R.jsx)(d,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let k=we(t),j=Te(t),M=t.filter(e=>k.duplicates.has(e.id)?!1:e.role===`tool`?j.has(e.id):e.role===`assistant`?!e.toolCalls?.length&&typeof e.content==`string`&&e.content.trim().length>0:e.role===`activity`?e.activityType===`mcp-app`||e.activityType===`agent-outcome`:e.role===`user`),N=t.findIndex(e=>e.id===O),P=t.slice(N+1).some(e=>e.role===`assistant`&&!e.toolCalls?.length&&typeof e.content==`string`&&e.content.length>0),F=t.slice(N+1).filter(e=>e.role===`assistant`&&!e.toolCalls?.length&&typeof e.content==`string`&&e.content.trim().length>0).at(-1),I=a&&s&&!s.collapsed&&s.text&&!P;return(0,R.jsxs)(i,{className:`chat-pane`,children:[(0,R.jsx)(i,{className:`chat-scroll`,ref:w,tabIndex:0,role:`log`,"aria-label":`Conversation`,children:(0,R.jsxs)(m,{size:880,px:{base:`md`,sm:`xl`},py:`lg`,ref:T,children:[h&&(0,R.jsx)(_,{color:`warn`,radius:`lg`,title:`This chat no longer exists`,children:(0,R.jsxs)(c,{justify:`space-between`,children:[(0,R.jsx)(f,{size:`sm`,children:`It was deleted, or the link is wrong.`}),(0,R.jsx)(d,{size:`compact-sm`,variant:`light`,onClick:C,children:`New chat`})]})}),!h&&!r&&p&&(0,R.jsx)(Ae,{message:p,onRetry:y,onNewThread:C}),!h&&!r&&!p&&(0,R.jsxs)(b,{mih:`40vh`,children:[(0,R.jsx)(S,{size:`sm`}),(0,R.jsx)(f,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading chat`})]}),!h&&r&&(0,R.jsxs)(R.Fragment,{children:[M.length===0&&(0,R.jsx)(Me,{onSelect:g}),(0,R.jsxs)(u,{gap:`lg`,children:[M.filter(e=>e.id!==F?.id).map(e=>j.has(e.id)?(0,R.jsx)(Ee,{failures:j.get(e.id)},e.id):(0,R.jsxs)(i,{children:[(0,R.jsx)(Ne,{message:e,time:n[e.id],appView:k.views.get(e.id)}),D.has(e.id)&&(0,R.jsx)(i,{mt:`sm`,children:(0,R.jsx)(Se,{receipt:D.get(e.id),running:a&&e.id===O,awaitingAnswer:!P&&!I,activity:o})})]},e.id)),(F||I)&&(0,R.jsx)(i,{"data-answer-position":!0,children:(0,R.jsx)(Ne,{message:I?{id:s.id,role:`assistant`,content:s.text}:F,provisional:!!I,time:I?void 0:n[F.id]})},`answer-${O??`draft`}`),a&&!P&&!I&&!D.has(O??``)&&(0,R.jsxs)(c,{gap:`xs`,role:`status`,children:[(0,R.jsx)(S,{type:`dots`,size:`sm`}),(0,R.jsx)(f,{c:`dimmed`,size:`sm`,children:o||`Analyzing your system`})]}),l&&(0,R.jsx)(f,{c:`dimmed`,size:`sm`,children:`Stopped`}),p&&(0,R.jsx)(Ae,{message:p,onRetry:v})]})]})]})}),!h&&(0,R.jsx)(je,{})]})}function Ae({message:e,onRetry:t,onNewThread:n}){return(0,R.jsx)(_,{color:`bad`,radius:`lg`,title:`Something went wrong`,children:(0,R.jsxs)(c,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,R.jsx)(f,{size:`sm`,children:e}),(0,R.jsxs)(c,{gap:`xs`,wrap:`nowrap`,children:[n&&(0,R.jsx)(d,{size:`compact-sm`,variant:`subtle`,color:`bad`,onClick:n,children:`New chat`}),(0,R.jsx)(d,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:t,children:`Retry`})]})]})})}function je(){let{input:e,setInput:t,inputRef:n,submit:r,send:a,stop:o,ready:s,running:l}=A();return(0,R.jsx)(i,{className:`chat-composer`,children:(0,R.jsxs)(m,{size:880,px:{base:`md`,sm:`xl`},children:[(0,R.jsx)(x,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,radius:24,py:6,pl:`lg`,pr:6,children:(0,R.jsxs)(c,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,R.jsx)(H,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),a(e))},placeholder:l?`Fanout is working…`:`Ask about health, errors, or latency…`,disabled:!s,autosize:!0,minRows:1,maxRows:8,variant:`unstyled`,flex:1}),l?(0,R.jsx)(M,{label:`Stop`,children:(0,R.jsx)(D,{type:`button`,variant:`default`,size:40,radius:`xl`,"aria-label":`Stop`,onClick:o,children:(0,R.jsx)(me,{size:16,weight:`fill`})})}):(0,R.jsx)(D,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!s,"aria-label":`Send message`,children:(0,R.jsx)(pe,{size:17,weight:`fill`})})]})}),(0,R.jsx)(f,{c:`dimmed`,size:`xs`,ta:`center`,mt:6,children:`Enter to send, Shift+Enter for a new line`})]})})}function Me({onSelect:e}){return(0,R.jsxs)(u,{align:`center`,gap:`md`,pt:{base:32,sm:88},pb:`xl`,ta:`center`,children:[(0,R.jsx)(g,{size:`large`}),(0,R.jsx)(ee,{order:1,fz:24,fw:500,lh:1.25,maw:560,children:`What do you want to know about your system?`}),(0,R.jsx)(c,{justify:`center`,gap:`xs`,mt:`xs`,maw:720,children:Oe.map(t=>(0,R.jsx)(d,{variant:`default`,size:`sm`,radius:`xl`,onClick:()=>void e(t),children:t},t))})]})}function Ne({message:e,time:t,appView:n,provisional:r=!1}){if(e.role===`activity`)return e.activityType===`agent-outcome`&&e.content&&typeof e.content==`object`&&`message`in e.content&&typeof e.content.message==`string`?`status`in e.content&&e.content.status===`stopped`?(0,R.jsx)(f,{c:`dimmed`,size:`sm`,"data-chat-anchor":!0,children:e.content.message}):(0,R.jsx)(_,{color:`bad`,title:`Something went wrong`,"data-chat-anchor":!0,children:e.content.message}):e.activityType===`mcp-app`?n?(0,R.jsx)(De,{view:n}):(0,R.jsx)(_,{color:`bad`,"data-chat-anchor":!0,children:`This view could not be loaded. Please try again.`}):null;if(e.role===`assistant`&&e.toolCalls?.length)return null;let a=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!a&&e.role===`assistant`)return null;let o=e.role===`user`,s=t?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(t)):``;return(0,R.jsxs)(i,{className:`chat-message${r?` chat-message--provisional`:``}`,"data-chat-anchor":!0,"data-role":o?`user`:`assistant`,children:[o?(0,R.jsx)(x,{radius:`lg`,px:`md`,py:`sm`,bg:`var(--mantine-color-brand-light)`,maw:`70%`,ml:`auto`,w:`fit-content`,children:(0,R.jsx)(f,{style:{whiteSpace:`pre-wrap`},children:a})}):(0,R.jsx)(W,{className:`chat-markdown${r?` chat-markdown--provisional`:``}`,"data-provisional":r||void 0,children:(0,R.jsx)(re,{remarkPlugins:[I],components:Fe,children:a})}),(r||s||!o)&&(0,R.jsx)(c,{className:`chat-message-meta`,gap:6,justify:o?`flex-end`:`flex-start`,mt:4,h:24,children:r?(0,R.jsx)(S,{type:`dots`,size:20}):(0,R.jsxs)(R.Fragment,{children:[s&&t&&(0,R.jsx)(f,{c:`dimmed`,size:`xs`,title:ne(t),children:s}),!o&&(0,R.jsx)(Pe,{text:a,label:`Copy message`})]})})]})}function Pe({text:e,label:t}){let{state:n,copy:r}=be();return(0,R.jsx)(M,{label:n===`failed`?`Could not copy`:n===`copied`?`Copied`:t,children:(0,R.jsx)(D,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":t,"data-state":n===`idle`?void 0:n,onClick:()=>r(e),children:n===`copied`?(0,R.jsx)(p,{size:13,weight:`bold`}):(0,R.jsx)(v,{size:13})})})}var Fe={table:({children:e})=>(0,R.jsx)(i,{className:`chat-table`,children:(0,R.jsx)(F,{striped:!0,highlightOnHover:!0,withTableBorder:!0,verticalSpacing:`xs`,fz:`sm`,children:e})}),thead:({children:e})=>(0,R.jsx)(F.Thead,{children:e}),tbody:({children:e})=>(0,R.jsx)(F.Tbody,{children:e}),tr:({children:e})=>(0,R.jsx)(F.Tr,{children:e}),th:({children:e})=>(0,R.jsx)(F.Th,{children:e}),td:({children:e})=>(0,R.jsx)(F.Td,{children:e}),pre:({children:e})=>(0,R.jsx)(Ie,{children:e}),a:({href:e,children:t})=>(0,R.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})};function Ie({children:e}){let t=$(e);return(0,R.jsxs)(i,{className:`chat-code`,pos:`relative`,children:[(0,R.jsx)(i,{className:`chat-code-actions`,pos:`absolute`,top:6,right:6,children:(0,R.jsx)(Pe,{text:t,label:`Copy code`})}),(0,R.jsx)(`pre`,{children:e})]})}function $(e){return typeof e==`string`?e:Array.isArray(e)?e.map($).join(``):e&&typeof e==`object`&&`props`in e?$(e.props.children):``}export{X as n,ke as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat-D6uoP59r.js b/internal/ui/dist/assets/chat-D6uoP59r.js new file mode 100644 index 000000000..8c1c416e3 --- /dev/null +++ b/internal/ui/dist/assets/chat-D6uoP59r.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mcp-app-frame-jpeBZ36G.js","assets/useRouter-ByJ6_rwb.js","assets/brand-DUaZkIz1.js","assets/index-A3IfO-3c.js","assets/useNavigate-B1zgPEUp.js","assets/preload-helper-FMCtZeYw.js","assets/Tooltip-B3r3s_B9.js","assets/index-ByVYR1iM.css"])))=>i.map(i=>d[i]); +import{i as e,r as t,s as n}from"./useRouter-ByJ6_rwb.js";import{A as r,C as i,M as a,S as o,T as s,_ as c,a as l,c as u,d,f,i as p,l as m,m as h,n as g,o as ee,p as _,r as v,tt as te,u as y,x as b,y as x}from"./brand-DUaZkIz1.js";import{c as S,d as C,f as w,g as T,h as E,l as D,o as ne,p as O,s as k,t as A}from"./preload-helper-FMCtZeYw.js";import{t as j}from"./Tooltip-B3r3s_B9.js";import{c as M,d as N,l as P,o as F,r as re,s as ie,t as ae,u as oe}from"./dashboard-change-chips-BKnD9tpX.js";var I=n(e(),1),L=t(),se=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],R={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function z(e){Object.keys(R).forEach(t=>{e.style.setProperty(t,R[t],`important`)})}function ce(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of se)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var B=null;function le(e,t,n=1,r=1/0){B||(B=document.createElement(`textarea`),B.setAttribute(`tabindex`,`-1`),B.setAttribute(`aria-hidden`,`true`),B.setAttribute(`aria-label`,`autosize measurement`),z(B)),B.parentNode===null&&document.body.appendChild(B);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{B.style[e]=o[e]}),z(B),B.value=t;let c=s===`border-box`?B.scrollHeight+a:B.scrollHeight-i;B.value=t,c=s===`border-box`?B.scrollHeight+a:B.scrollHeight-i,B.value=`x`;let l=B.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function ue({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,I.useRef)(null),s=te(o,r),c=(0,I.useRef)(0),l=(0,I.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=ce(n);if(!r)return;let[i]=le(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=(0,I.useEffectEvent)(u),f=e=>{a||u(),n?.(e)};return(0,I.useLayoutEffect)(u),(0,I.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,I.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=0,n=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,cancelAnimationFrame(t),t=requestAnimationFrame(d))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]),(0,I.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,I.useEffect)(()=>{let e=e=>{if(o.current?.form===e.target&&!a){let e=o.current.value;requestAnimationFrame(()=>{o.current&&e!==o.current.value&&u()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[a]),(0,L.jsx)(`textarea`,{rows:t,...i,onChange:f,ref:s})}var V=s(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:o,bottomSection:s,bottomSectionProps:c,...l}=a([`Input`,`InputWrapper`,`Textarea`],null,e),u=t&&N()!==`test`,d=u?{maxRows:n,minRows:r}:{};return(0,L.jsx)(h,{component:u?ue:`textarea`,...l,__staticSelector:i||`Textarea`,__bottomSection:s,__bottomSectionProps:c,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":o},...d})});V.classes=h.classes,V.displayName=`@mantine/core/Textarea`;var H={root:`m_d08caa0`},U=s(e=>{let t=a(`Typography`,null,e),{classNames:n,className:o,style:s,styles:c,unstyled:l,attributes:u,...d}=t,f=r({name:`Typography`,classes:H,props:t,className:o,style:s,classNames:n,styles:c,unstyled:l,attributes:u});return(0,L.jsx)(i,{...f(`root`),...d})});U.classes=H,U.displayName=`@mantine/core/Typography`;var de=new Map([[`bold`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),I.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),fe=new Map([[`bold`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z`}))],[`duotone`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z`,opacity:`0.2`}),I.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`fill`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z`}))],[`light`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z`}))],[`regular`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`thin`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z`}))]]),pe=new Map([[`bold`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z`}))],[`duotone`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),I.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`fill`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`}))],[`light`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z`}))],[`regular`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`thin`,I.createElement(I.Fragment,null,I.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z`}))]]),W=I.forwardRef((e,t)=>I.createElement(l,{ref:t,...e,weights:de}));W.displayName=`CaretRightIcon`;var G=W,K=I.forwardRef((e,t)=>I.createElement(l,{ref:t,...e,weights:fe}));K.displayName=`PaperPlaneTiltIcon`;var me=K,q=I.forwardRef((e,t)=>I.createElement(l,{ref:t,...e,weights:pe}));q.displayName=`StopIcon`;var he=q;function ge(e){return e.dashboard.panels.length===1?e.dashboard.panels[0].title:e.dashboard.name}function _e(e){if(!e||typeof e!=`object`||Array.isArray(e))throw Error(`Missing panel view`);let t=e;if(!t.view||![`preset`,`query`].includes(t.view.kind)||!/^[a-f0-9]{64}$/.test(t.view.key))throw Error(`Invalid panel view identity`);if(t.dashboard?.version!==1||!Array.isArray(t.dashboard.panels)||!t.dashboard.panels.length||t.dashboard.panels.length>40||!Array.isArray(t.results)||t.dashboard.panels.some(e=>!e||typeof e.id!=`string`||!e.id)||t.results.some(e=>!e||typeof e.id!=`string`))throw Error(`Invalid panel view`);let n=new Set(t.dashboard.panels.map(e=>e.id));if(n.size!==t.dashboard.panels.length||t.results.length!==n.size||new Set(t.results.map(e=>e.id)).size!==n.size||t.results.some(e=>!n.has(e.id)||![`ok`,`empty`,`error`].includes(e.status)))throw Error(`Panel results do not match the view`);if(t.vars!==void 0&&(!t.vars||typeof t.vars!=`object`||Array.isArray(t.vars)||Object.values(t.vars).some(e=>typeof e!=`string`&&!(Array.isArray(e)&&e.every(e=>typeof e==`string`)))))throw Error(`Invalid panel variables`);if(t.trace!==void 0&&(!t.trace?.data||!Array.isArray(t.trace.data.spans)||!Array.isArray(t.trace.data.logs)||!Array.isArray(t.trace.data.services)))throw Error(`Invalid trace detail`);return t}var J=new WeakSet;function Y(e){if(!e||typeof e!=`object`||Array.isArray(e))return;if(J.has(e))return e;let t=e;if(Object.keys(t).sort().join(`,`)===`is_error,resource_uri,tool_input,tool_name,tool_result`&&t.resource_uri===`ui://fanout/panels.html`&&typeof t.tool_name==`string`&&t.tool_name&&typeof t.is_error==`boolean`&&t.tool_input&&typeof t.tool_input==`object`&&!Array.isArray(t.tool_input)){try{_e(t.tool_result)}catch{return}return J.add(t),t}}var ve=64,ye=300;function be(){let e=(0,I.useRef)(null),t=(0,I.useRef)(!0),n=(0,I.useRef)(()=>{}),r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=(0,I.useCallback)(()=>{let t=e.current;if(!t)return;let n=t.getBoundingClientRect().top,r=[...t.querySelectorAll(`[data-chat-anchor]`)].find(e=>e.getBoundingClientRect().bottom>n);i.current=r?{node:r,top:r.getBoundingClientRect().top}:null},[]),o=(0,I.useCallback)(()=>{let n=e.current;n&&t.current?n.scrollTop=n.scrollHeight:n&&i.current?.node.isConnected&&(n.scrollTop+=i.current.node.getBoundingClientRect().top-i.current.top),a()},[a]);return{scrollRef:(0,I.useCallback)(r=>{if(n.current(),e.current=r,!r)return;let o=0,s=!1,c=()=>{o=Date.now()},l=()=>{s=!0},u=()=>{s=!1},d=()=>{r.scrollHeight-r.clientHeight-r.scrollTop<=ve?t.current=!0:(s||Date.now()-o{r.removeEventListener(`scroll`,d),r.removeEventListener(`wheel`,c),r.removeEventListener(`touchmove`,c),r.removeEventListener(`keydown`,c),r.removeEventListener(`pointerdown`,l),window.removeEventListener(`pointerup`,u),n.current=()=>{}},t.current=!0,r.scrollTop=r.scrollHeight,i.current=null},[a]),contentRef:(0,I.useCallback)(e=>{r.current?.disconnect(),r.current=null,e&&(r.current=new ResizeObserver(o),r.current.observe(e))},[o]),toBottom:(0,I.useCallback)(()=>{t.current=!0,o()},[o])}}function xe(e=1500){let[t,n]=(0,I.useState)(`idle`),r=(0,I.useRef)(null);(0,I.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);function i(t){r.current&&clearTimeout(r.current),n(`idle`),(navigator.clipboard?navigator.clipboard.writeText(t):Promise.reject(Error(`clipboard unavailable`))).then(()=>n(`copied`),()=>n(`failed`)).finally(()=>{r.current=setTimeout(()=>n(`idle`),e)})}return{state:t,copy:i}}var Se={schema:`Telemetry`,context:`Context`,draft:`Draft`,validation:`Validation`,preview:`Preview`,save:`Save`},X=e=>`${(e/1e3).toFixed(1)} s`;function Ce({receipt:e,running:t=!1,activity:n=``,awaitingAnswer:r=!1}){let[i,a]=(0,I.useState)(!1),o=(0,I.useId)(),s=e.saved,l=s?.receipt.save_check,p=Object.values(e.stages).filter(e=>e.state===`complete`).length,m=[e.stages.schema.state===`complete`?`Read telemetry`:void 0,e.panel_count===void 0?void 0:`${e.panel_count} ${e.panel_count===1?`panel`:`panels`}`,l?.checked?`Checked in ${X(l.elapsed_ms)}`:void 0,s?`Saved v${s.version}`:void 0].filter(Boolean).join(` · `)||`Building dashboard`,h=[...s?S(s.receipt):[],...e.corrections.map(e=>`Fixed ${e.panel_id}.${e.path.replace(/^panels\[\d+\]\./,``)}`)];return(0,L.jsx)(b,{"data-build-receipt":e.turn_id,"data-dashboard-result":s?.id,"data-chat-anchor":!0,withBorder:!0,radius:`md`,p:`sm`,children:(0,L.jsxs)(u,{gap:6,children:[(0,L.jsxs)(c,{gap:`xs`,justify:`space-between`,children:[(0,L.jsxs)(f,{size:`sm`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:[m,(0,L.jsxs)(f,{span:!0,c:`dimmed`,size:`xs`,children:[` · `,p,` stages complete`]})]}),(0,L.jsxs)(d,{component:`button`,variant:`subtle`,color:`gray`,size:`compact-xs`,"aria-expanded":i,"aria-controls":o,onClick:()=>a(e=>!e),children:[`Details`,h.length>4?` (+${h.length-4})`:``]})]}),t&&r&&(0,L.jsxs)(c,{gap:`xs`,"data-build-running":!0,children:[(0,L.jsx)(x,{type:`dots`,size:`sm`}),(0,L.jsx)(f,{c:`dimmed`,size:`sm`,children:n||`Analyzing your system`})]}),(0,L.jsx)(ae,{labels:h.slice(0,4)}),e.explanations.map(e=>t?e.split(` · `).filter(e=>!e.endsWith(`: incomplete`)).join(` · `):e).filter(Boolean).map((e,t)=>(0,L.jsx)(f,{size:`xs`,c:`dimmed`,"data-receipt-attention":!0,children:e},t)),s&&(0,L.jsx)(d,{renderRoot:e=>(0,L.jsx)(T,{...e,to:`/dashboards/$dashboardId`,params:{dashboardId:s.id},search:{}}),variant:`subtle`,size:`compact-sm`,color:`gray`,style:{alignSelf:`flex-start`},children:`Open dashboard`}),(0,L.jsx)(oe,{expanded:i,id:o,children:(0,L.jsxs)(u,{gap:4,children:[s&&(0,L.jsxs)(f,{size:`xs`,children:[s.label,` `,s.name,` · opens the current dashboard`]}),Object.entries(e.stages).map(([e,n])=>(0,L.jsxs)(f,{size:`xs`,c:`dimmed`,children:[Se[e],`: `,t&&n.state===`incomplete`?`in progress`:n.state,n.elapsed_ms===void 0?``:` · ${X(n.elapsed_ms)}`]},e)),e.save_attempts.map((e,t)=>e.state===`retried`&&(0,L.jsxs)(f,{size:`xs`,c:`dimmed`,children:[`Save attempt `,t+1,`: retried`]},e.call_id)),!!e.context_counts.deploys&&(0,L.jsxs)(f,{size:`xs`,children:[e.context_counts.deploys,` deploys observed`]}),!!e.context_counts.anomalies&&(0,L.jsxs)(f,{size:`xs`,children:[e.context_counts.anomalies,` anomalies observed`]}),e.panels.map(e=>(0,L.jsxs)(f,{size:`xs`,children:[`Preview · `,e.id,`: `,e.status,e.elapsed_ms===void 0?``:` · ${X(e.elapsed_ms)}`]},e.id)),l&&(0,L.jsxs)(f,{size:`xs`,children:[`Save check: `,l.checked?`checked`:`incomplete`,` · `,X(l.elapsed_ms)]}),l?.panels.map(e=>(0,L.jsxs)(f,{size:`xs`,children:[`Save · `,e.id,`: `,e.status,` · `,e.rows??0,` rows`,e.elapsed_ms===void 0?``:` · ${X(e.elapsed_ms)}`]},e.id)),h.slice(4).map((e,t)=>(0,L.jsx)(f,{size:`xs`,children:e},t)),e.corrections.map((e,t)=>(0,L.jsxs)(f,{size:`xs`,children:[`Fixed `,e.panel_id,`.`,e.path,`: `,e.message]},t))]})})]})})}var we=(0,I.lazy)(()=>A(()=>import(`./mcp-app-frame-jpeBZ36G.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Z=e=>e.tool_result.view.kind===`preset`,Q=e=>e.tool_result.results.length>0&&e.tool_result.results.every(e=>e.status===`empty`);function Te(e){let t=new Map,n=new Set,r=[],i=()=>{let e=new Map;for(let t of r){let n=t.content.tool_result.view.key;e.set(n,t)}let i=new Set([...e.values()].map(e=>e.id)),a=[...e.values()].some(e=>Z(e.content)),o=r.filter(e=>i.has(e.id)&&!Q(e.content)).at(-1)?.id;for(let e of r)i.has(e.id)?t.set(e.id,{content:e.content,expanded:!Q(e.content)&&(Z(e.content)||!a&&e.id===o)}):n.add(e.id);r=[]};for(let t of e)if(t.role===`user`&&i(),t.role===`activity`&&t.activityType===`mcp-app`){let e=Y(t.content);e&&r.push({id:t.id,content:e})}return i(),{views:t,duplicates:n}}function Ee(e){let t=new Map,n=new Map,r=new Map,i=`unattributed`;for(let a of e){if(a.role===`user`&&(n.clear(),r.clear(),i=a.id),a.role===`assistant`){i=a.id;for(let e of a.toolCalls??[])n.set(e.id,{assistant:i,name:e.function.name})}if(a.role===`tool`){let e=C(a.content);if(!a.error&&!e?.error&&e?.isError!==!0)continue;let o=n.get(a.toolCallId);if(o&&w.has(o.name)&&D(a))continue;let s=o?.assistant??i,c=r.get(s)??a.id;r.set(s,c);let l=t.get(c)??[],u=O(e?.error)?e?.error:void 0,d=typeof u?.message==`string`?u.message:typeof a.error==`string`&&a.error?a.error:`Tool execution failed`;l.push({name:o?.name??`Tool`,message:d,readOnly:u?.code===`answer_only`}),t.set(c,l)}}return t}function De({failures:e}){let[t,n]=(0,I.useState)(!1),r=e.filter(e=>!e.readOnly);return(0,L.jsxs)(i,{"data-chat-anchor":!0,children:[e.some(e=>e.readOnly)&&(0,L.jsx)(f,{size:`sm`,c:`dimmed`,children:`Not saved: Explain is read-only`}),r.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(o,{className:`chat-app-toggle`,"aria-expanded":t,onClick:()=>n(e=>!e),style:{color:`var(--mantine-color-dimmed)`},children:[(0,L.jsx)(`span`,{className:`chat-app-chevron`,"aria-hidden":`true`,children:t?(0,L.jsx)(M,{size:14}):(0,L.jsx)(G,{size:14})}),(0,L.jsxs)(`span`,{className:`chat-app-summary`,children:[r.length,` tool `,r.length===1?`call`:`calls`,` failed`]})]}),t&&(0,L.jsx)(u,{gap:`xs`,pl:`md`,children:r.map((e,t)=>(0,L.jsxs)(f,{size:`sm`,c:`dimmed`,style:{whiteSpace:`pre-wrap`,overflowWrap:`anywhere`},children:[e.name,`: `,e.message]},t))})]})]})}function Oe({view:e}){let[t,n]=(0,I.useState)(e.expanded);(0,I.useEffect)(()=>n(e.expanded),[e.expanded]);let r=e.content.tool_result,i=ge(r),a=[...new Set(r.dashboard.panels.map(e=>e.viz===`timeseries`?`time series`:e.viz.replaceAll(`_`,` `)))].join(`, `),s=r.results.reduce((e,t)=>e+(t.frame?.rows??0),0),c=new Map;for(let e of r.results)e.status!==`ok`&&c.set(e.status,(c.get(e.status)??0)+1);let l=r.dashboard.panels.length>1?[`${r.dashboard.panels.length} panels`,...Array.from(c,([e,t])=>`${t} ${e}`)].join(` · `):c.size?[...c.keys()].join(`, `):`${s} ${s===1?`row`:`rows`}`;return(0,L.jsxs)(b,{"data-chat-app":!0,"data-chat-anchor":!0,withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:[(0,L.jsxs)(o,{className:`chat-app-toggle`,"aria-expanded":t,onClick:()=>n(e=>!e),children:[(0,L.jsx)(`span`,{className:`chat-app-chevron`,"aria-hidden":`true`,children:t?(0,L.jsx)(M,{size:14}):(0,L.jsx)(G,{size:14})}),(0,L.jsxs)(`span`,{className:`chat-app-summary`,children:[i,` · `,a,` · `,l]})]}),t&&(0,L.jsx)(I.Suspense,{fallback:(0,L.jsx)(y,{mih:180,children:(0,L.jsx)(x,{size:`sm`})}),children:(0,L.jsx)(we,{content:e.content})})]})}var ke=[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`,`Show the slowest endpoints`];function Ae(){let{agentAvailable:e,messages:t,messageTimes:n,ready:r,running:a,activity:o,provisional:s,stopped:l,error:p,threadMissing:h,send:g,retry:v,reloadThread:te,newThread:S}=k(),{scrollRef:C,contentRef:w,toBottom:T}=be(),E=ne(t),D=t.filter(e=>e.role===`user`).at(-1)?.id;if((0,I.useEffect)(()=>{D&&T()},[D,T]),!e)return(0,L.jsx)(m,{size:`sm`,py:96,children:(0,L.jsx)(b,{withBorder:!0,radius:`lg`,p:{base:`xl`,sm:40},children:(0,L.jsxs)(u,{gap:`md`,children:[(0,L.jsx)(f,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,L.jsx)(ee,{order:1,fz:28,children:`Chat is not configured`}),(0,L.jsx)(f,{c:`dimmed`,children:`Add an AI provider key to enable chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,L.jsx)(d,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let O=Te(t),A=Ee(t),j=t.filter(e=>O.duplicates.has(e.id)?!1:e.role===`tool`?A.has(e.id):e.role===`assistant`?!e.toolCalls?.length&&typeof e.content==`string`&&e.content.trim().length>0:e.role===`activity`?e.activityType===`mcp-app`||e.activityType===`agent-outcome`:e.role===`user`),M=t.findIndex(e=>e.id===D),N=t.slice(M+1).some(e=>e.role===`assistant`&&!e.toolCalls?.length&&typeof e.content==`string`&&e.content.length>0),P=t.slice(M+1).filter(e=>e.role===`assistant`&&!e.toolCalls?.length&&typeof e.content==`string`&&e.content.trim().length>0).at(-1),F=a&&s&&!s.collapsed&&s.text&&!N;return(0,L.jsxs)(i,{className:`chat-pane`,children:[(0,L.jsx)(i,{className:`chat-scroll`,ref:C,tabIndex:0,role:`log`,"aria-label":`Conversation`,children:(0,L.jsxs)(m,{size:880,px:{base:`md`,sm:`xl`},py:`lg`,ref:w,children:[h&&(0,L.jsx)(_,{color:`warn`,radius:`lg`,title:`This chat no longer exists`,children:(0,L.jsxs)(c,{justify:`space-between`,children:[(0,L.jsx)(f,{size:`sm`,children:`It was deleted, or the link is wrong.`}),(0,L.jsx)(d,{size:`compact-sm`,variant:`light`,onClick:S,children:`New chat`})]})}),!h&&!r&&p&&(0,L.jsx)(je,{message:p,onRetry:te,onNewThread:S}),!h&&!r&&!p&&(0,L.jsxs)(y,{mih:`40vh`,children:[(0,L.jsx)(x,{size:`sm`}),(0,L.jsx)(f,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading chat`})]}),!h&&r&&(0,L.jsxs)(L.Fragment,{children:[j.length===0&&(0,L.jsx)(Ne,{onSelect:g}),(0,L.jsxs)(u,{gap:`lg`,children:[j.filter(e=>e.id!==P?.id).map(e=>A.has(e.id)?(0,L.jsx)(De,{failures:A.get(e.id)},e.id):(0,L.jsxs)(i,{children:[(0,L.jsx)(Pe,{message:e,time:n[e.id],appView:O.views.get(e.id)}),E.has(e.id)&&(0,L.jsx)(i,{mt:`sm`,children:(0,L.jsx)(Ce,{receipt:E.get(e.id),running:a&&e.id===D,awaitingAnswer:!N&&!F,activity:o})})]},e.id)),(P||F)&&(0,L.jsx)(i,{"data-answer-position":!0,children:(0,L.jsx)(Pe,{message:F?{id:s.id,role:`assistant`,content:s.text}:P,provisional:!!F,time:F?void 0:n[P.id]})},`answer-${D??`draft`}`),a&&!N&&!F&&!E.has(D??``)&&(0,L.jsxs)(c,{gap:`xs`,role:`status`,children:[(0,L.jsx)(x,{type:`dots`,size:`sm`}),(0,L.jsx)(f,{c:`dimmed`,size:`sm`,children:o||`Analyzing your system`})]}),l&&(0,L.jsx)(f,{c:`dimmed`,size:`sm`,children:`Stopped`}),p&&(0,L.jsx)(je,{message:p,onRetry:v})]})]})]})}),!h&&(0,L.jsx)(Me,{})]})}function je({message:e,onRetry:t,onNewThread:n}){return(0,L.jsx)(_,{color:`bad`,radius:`lg`,title:`Something went wrong`,children:(0,L.jsxs)(c,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,L.jsx)(f,{size:`sm`,children:e}),(0,L.jsxs)(c,{gap:`xs`,wrap:`nowrap`,children:[n&&(0,L.jsx)(d,{size:`compact-sm`,variant:`subtle`,color:`bad`,onClick:n,children:`New chat`}),(0,L.jsx)(d,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:t,children:`Retry`})]})]})})}function Me(){let{input:e,setInput:t,inputRef:n,submit:r,send:a,stop:o,ready:s,running:l}=k();return(0,L.jsx)(i,{className:`chat-composer`,children:(0,L.jsxs)(m,{size:880,px:{base:`md`,sm:`xl`},children:[(0,L.jsx)(b,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,radius:24,py:6,pl:`lg`,pr:6,children:(0,L.jsxs)(c,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,L.jsx)(V,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),a(e))},placeholder:l?`Fanout is working…`:`Ask about health, errors, or latency…`,disabled:!s,autosize:!0,minRows:1,maxRows:8,variant:`unstyled`,flex:1}),l?(0,L.jsx)(j,{label:`Stop`,children:(0,L.jsx)(E,{type:`button`,variant:`default`,size:40,radius:`xl`,"aria-label":`Stop`,onClick:o,children:(0,L.jsx)(he,{size:16,weight:`fill`})})}):(0,L.jsx)(E,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!s,"aria-label":`Send message`,children:(0,L.jsx)(me,{size:17,weight:`fill`})})]})}),(0,L.jsx)(f,{c:`dimmed`,size:`xs`,ta:`center`,mt:6,children:`Enter to send, Shift+Enter for a new line`})]})})}function Ne({onSelect:e}){return(0,L.jsxs)(u,{align:`center`,gap:`md`,pt:{base:32,sm:88},pb:`xl`,ta:`center`,children:[(0,L.jsx)(g,{size:`large`}),(0,L.jsx)(ee,{order:1,fz:24,fw:500,lh:1.25,maw:560,children:`What do you want to know about your system?`}),(0,L.jsx)(c,{justify:`center`,gap:`xs`,mt:`xs`,maw:720,children:ke.map(t=>(0,L.jsx)(d,{variant:`default`,size:`sm`,radius:`xl`,onClick:()=>void e(t),children:t},t))})]})}function Pe({message:e,time:t,appView:n,provisional:r=!1}){if(e.role===`activity`)return e.activityType===`agent-outcome`&&e.content&&typeof e.content==`object`&&`message`in e.content&&typeof e.content.message==`string`?`status`in e.content&&e.content.status===`stopped`?(0,L.jsx)(f,{c:`dimmed`,size:`sm`,"data-chat-anchor":!0,children:e.content.message}):(0,L.jsx)(_,{color:`bad`,title:`Something went wrong`,"data-chat-anchor":!0,children:e.content.message}):e.activityType===`mcp-app`?n?(0,L.jsx)(Oe,{view:n}):(0,L.jsx)(_,{color:`bad`,"data-chat-anchor":!0,children:`This view could not be loaded. Please try again.`}):null;if(e.role===`assistant`&&e.toolCalls?.length)return null;let a=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!a&&e.role===`assistant`)return null;let o=e.role===`user`,s=t?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(t)):``;return(0,L.jsxs)(i,{className:`chat-message${r?` chat-message--provisional`:``}`,"data-chat-anchor":!0,"data-role":o?`user`:`assistant`,children:[o?(0,L.jsx)(b,{radius:`lg`,px:`md`,py:`sm`,bg:`var(--mantine-color-brand-light)`,maw:`70%`,ml:`auto`,w:`fit-content`,children:(0,L.jsx)(f,{style:{whiteSpace:`pre-wrap`},children:a})}):(0,L.jsx)(U,{className:`chat-markdown${r?` chat-markdown--provisional`:``}`,"data-provisional":r||void 0,children:(0,L.jsx)(ie,{remarkPlugins:[F],components:Ie,children:a})}),(r||s||!o)&&(0,L.jsx)(c,{className:`chat-message-meta`,gap:6,justify:o?`flex-end`:`flex-start`,mt:4,h:24,children:r?(0,L.jsx)(x,{type:`dots`,size:20}):(0,L.jsxs)(L.Fragment,{children:[s&&t&&(0,L.jsx)(f,{c:`dimmed`,size:`xs`,title:re(t),children:s}),!o&&(0,L.jsx)(Fe,{text:a,label:`Copy message`})]})})]})}function Fe({text:e,label:t}){let{state:n,copy:r}=xe();return(0,L.jsx)(j,{label:n===`failed`?`Could not copy`:n===`copied`?`Copied`:t,children:(0,L.jsx)(E,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":t,"data-state":n===`idle`?void 0:n,onClick:()=>r(e),children:n===`copied`?(0,L.jsx)(p,{size:13,weight:`bold`}):(0,L.jsx)(v,{size:13})})})}var Ie={table:({children:e})=>(0,L.jsx)(i,{className:`chat-table`,children:(0,L.jsx)(P,{striped:!0,highlightOnHover:!0,withTableBorder:!0,verticalSpacing:`xs`,fz:`sm`,children:e})}),thead:({children:e})=>(0,L.jsx)(P.Thead,{children:e}),tbody:({children:e})=>(0,L.jsx)(P.Tbody,{children:e}),tr:({children:e})=>(0,L.jsx)(P.Tr,{children:e}),th:({children:e})=>(0,L.jsx)(P.Th,{children:e}),td:({children:e})=>(0,L.jsx)(P.Td,{children:e}),pre:({children:e})=>(0,L.jsx)(Le,{children:e}),a:({href:e,children:t})=>(0,L.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})};function Le({children:e}){let t=$(e);return(0,L.jsxs)(i,{className:`chat-code`,pos:`relative`,children:[(0,L.jsx)(i,{className:`chat-code-actions`,pos:`absolute`,top:6,right:6,children:(0,L.jsx)(Fe,{text:t,label:`Copy code`})}),(0,L.jsx)(`pre`,{children:e})]})}function $(e){return typeof e==`string`?e:Array.isArray(e)?e.map($).join(``):e&&typeof e==`object`&&`props`in e?$(e.props.children):``}export{Y as n,Ae as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat._threadId-CCMEkLpv.js b/internal/ui/dist/assets/chat._threadId-CCMEkLpv.js new file mode 100644 index 000000000..cad599e97 --- /dev/null +++ b/internal/ui/dist/assets/chat._threadId-CCMEkLpv.js @@ -0,0 +1 @@ +import{t as e}from"./chat-D6uoP59r.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat._threadId-DUYzZFwo.js b/internal/ui/dist/assets/chat._threadId-DUYzZFwo.js deleted file mode 100644 index aa0b6715c..000000000 --- a/internal/ui/dist/assets/chat._threadId-DUYzZFwo.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./chat-D2upr1iS.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat.index-CCMEkLpv.js b/internal/ui/dist/assets/chat.index-CCMEkLpv.js new file mode 100644 index 000000000..cad599e97 --- /dev/null +++ b/internal/ui/dist/assets/chat.index-CCMEkLpv.js @@ -0,0 +1 @@ +import{t as e}from"./chat-D6uoP59r.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat.index-DUYzZFwo.js b/internal/ui/dist/assets/chat.index-DUYzZFwo.js deleted file mode 100644 index aa0b6715c..000000000 --- a/internal/ui/dist/assets/chat.index-DUYzZFwo.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./chat-D2upr1iS.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards._dashboardId-aBSBRnPf.js b/internal/ui/dist/assets/dashboards._dashboardId-2NY5m2dv.js similarity index 74% rename from internal/ui/dist/assets/dashboards._dashboardId-aBSBRnPf.js rename to internal/ui/dist/assets/dashboards._dashboardId-2NY5m2dv.js index a02529f9a..fb495e2cb 100644 --- a/internal/ui/dist/assets/dashboards._dashboardId-aBSBRnPf.js +++ b/internal/ui/dist/assets/dashboards._dashboardId-2NY5m2dv.js @@ -1 +1 @@ -import{r as e}from"./useRouter-ByJ6_rwb.js";import{n as t}from"./useNavigate-B1zgPEUp.js";import{t as n}from"./page-wCdDA4X6.js";import{f as r,g as i,y as a}from"./index-Bz4uzIyA.js";var o=e();function s(){let{dashboardId:e}=r.useParams(),s=i(r.useSearch()),c=t(),l=(t,n,r)=>void c({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:a(n),replace:r,resetScroll:t!==e});return(0,o.jsx)(n,{dashboardId:e,search:s,onSearch:(t,n)=>l(e,t,n),onOpen:(e,t)=>l(e,{},t)})}export{s as component}; \ No newline at end of file +import{r as e}from"./useRouter-ByJ6_rwb.js";import{n as t}from"./useNavigate-B1zgPEUp.js";import{t as n}from"./page-qxlg4TI5.js";import{f as r,g as i,y as a}from"./index-A3IfO-3c.js";var o=e();function s(){let{dashboardId:e}=r.useParams(),s=i(r.useSearch()),c=t(),l=(t,n,r)=>void c({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:a(n),replace:r,resetScroll:t!==e});return(0,o.jsx)(n,{dashboardId:e,search:s,onSearch:(t,n)=>l(e,t,n),onOpen:(e,t)=>l(e,{},t)})}export{s as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards.index-D-QLodMk.js b/internal/ui/dist/assets/dashboards.index-BVYRlf74.js similarity index 68% rename from internal/ui/dist/assets/dashboards.index-D-QLodMk.js rename to internal/ui/dist/assets/dashboards.index-BVYRlf74.js index d83ea0c07..5655a7fa6 100644 --- a/internal/ui/dist/assets/dashboards.index-D-QLodMk.js +++ b/internal/ui/dist/assets/dashboards.index-BVYRlf74.js @@ -1 +1 @@ -import{r as e}from"./useRouter-ByJ6_rwb.js";import{n as t}from"./useNavigate-B1zgPEUp.js";import{t as n}from"./page-wCdDA4X6.js";import{g as r,p as i,y as a}from"./index-Bz4uzIyA.js";var o=e();function s(){let e=r(i.useSearch()),s=t();return(0,o.jsx)(n,{search:e,onSearch:()=>void 0,onOpen:(t,n)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:a(e),replace:n})})}export{s as component}; \ No newline at end of file +import{r as e}from"./useRouter-ByJ6_rwb.js";import{n as t}from"./useNavigate-B1zgPEUp.js";import{t as n}from"./page-qxlg4TI5.js";import{g as r,p as i,y as a}from"./index-A3IfO-3c.js";var o=e();function s(){let e=r(i.useSearch()),s=t();return(0,o.jsx)(n,{search:e,onSearch:()=>void 0,onOpen:(t,n)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:a(e),replace:n})})}export{s as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-Bz4uzIyA.js b/internal/ui/dist/assets/index-A3IfO-3c.js similarity index 99% rename from internal/ui/dist/assets/index-Bz4uzIyA.js rename to internal/ui/dist/assets/index-A3IfO-3c.js index 28a45a4ce..64566135a 100644 --- a/internal/ui/dist/assets/index-Bz4uzIyA.js +++ b/internal/ui/dist/assets/index-A3IfO-3c.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-D2AdaqvY.js","assets/useRouter-ByJ6_rwb.js","assets/useNavigate-B1zgPEUp.js","assets/settings-Pi-RkmGU.js","assets/brand-DUaZkIz1.js","assets/Tooltip-B3r3s_B9.js","assets/WarningCircle.es-B9fMV2kb.js","assets/chat.index-DUYzZFwo.js","assets/chat-D2upr1iS.js","assets/preload-helper-FMCtZeYw.js","assets/dashboard-change-chips-BKnD9tpX.js","assets/chat._threadId-DUYzZFwo.js","assets/dashboards.index-D-QLodMk.js","assets/page-wCdDA4X6.js","assets/dashboards._dashboardId-aBSBRnPf.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-D2AdaqvY.js","assets/useRouter-ByJ6_rwb.js","assets/useNavigate-B1zgPEUp.js","assets/settings-BrSVFiz-.js","assets/brand-DUaZkIz1.js","assets/Tooltip-B3r3s_B9.js","assets/WarningCircle.es-D8T3bcu9.js","assets/chat.index-CCMEkLpv.js","assets/chat-D6uoP59r.js","assets/preload-helper-FMCtZeYw.js","assets/dashboard-change-chips-BKnD9tpX.js","assets/chat._threadId-CCMEkLpv.js","assets/dashboards.index-BVYRlf74.js","assets/page-qxlg4TI5.js","assets/dashboards._dashboardId-2NY5m2dv.js"])))=>i.map(i=>d[i]); import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./useRouter-ByJ6_rwb.js";import{$ as s,A as c,B as l,C as u,F as d,G as f,H as p,I as m,J as h,K as g,L as _,M as v,N as y,P as b,Q as x,R as S,S as C,T as w,U as T,V as ee,W as E,X as D,Y as O,Z as te,_ as ne,_t as re,a as k,at as ie,b as ae,c as A,ct as oe,d as se,dt as ce,f as le,gt as ue,h as de,ht as fe,i as pe,it as me,j as he,k as ge,l as _e,lt as ve,m as j,mt as M,nt as ye,o as be,p as xe,pt as Se,q as Ce,r as we,rt as Te,st as Ee,t as De,tt as Oe,u as ke,ut as Ae,v as je,w as Me,x as Ne,y as Pe,z as Fe}from"./brand-DUaZkIz1.js";import{i as Ie,n as Le,r as Re,t as ze}from"./useNavigate-B1zgPEUp.js";import{A as Be,C as Ve,D as He,E as Ue,M as We,O as Ge,T as Ke,_ as qe,a as Je,b as Ye,g as Xe,h as Ze,i as Qe,j as $e,k as et,m as tt,n as nt,r as rt,s as it,t as at,u as ot,v as st,w as ct,y as lt}from"./preload-helper-FMCtZeYw.js";import{C as ut,E as dt,T as ft,_ as pt,a as mt,c as ht,d as gt,f as _t,g as vt,h as yt,i as bt,l as xt,m as St,n as Ct,o as wt,p as Tt,r as Et,s as Dt,t as Ot,u as kt,v as At,x as jt,y as Mt}from"./Tooltip-B3r3s_B9.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Nt=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(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(e.unstable_now=void 0,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=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(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 x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&ne(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-Tt&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ne(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(E)};else if(typeof MessageChannel<`u`){var O=new MessageChannel,te=O.port2;O.port1.onmessage=E,D=function(){te.postMessage(null)}}else D=function(){_(E,0)};function ne(t,n){C=_(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_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ne(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Pt=e(((e,t)=>{t.exports=Nt()})),Ft=e((e=>{var n=Pt(),r=t(),i=re();function a(e){var t=`https://react.dev/errors/`+e;if(1xe||(e.current=be[xe],be[xe]=null,xe--)}function we(e,t){xe++,be[xe]=e.current,e.current=t}var Te=Se(null),Ee=Se(null),De=Se(null),Oe=Se(null);function ke(e,t){switch(we(De,t),we(Ee,e),we(Te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?xp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=xp(t),e=Sp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ce(Te),we(Te,e)}function Ae(){Ce(Te),Ce(Ee),Ce(De)}function je(e){var t=e.memoizedState;t!==null&&(vh._currentValue=t.memoizedState,we(Oe,e)),t=Te.current;var n=Sp(t,e.type);t!==n&&(we(Ee,e),we(Te,n))}function Me(e){Ee.current===e&&(Ce(Te),Ce(Ee)),Oe.current===e&&(Ce(Oe),vh._currentValue=ye)}var Ne,Pe;function Fe(e){if(Ne===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ne=t&&t[1]||``,Pe=-1)`:-1s(e,t,n)},i,a=ZT,o=!BT.jitless,s=o&&QT.value,c=t.catchall,l;e._zod.parse=(u,d)=>{l??=n.value;let f=u.value;if(!a(f))return u.issues.push({expected:`object`,code:`invalid_type`,input:f,inst:e}),u;let p=[];if(o&&s&&d?.async===!1&&d.jitless!==!0)i||=r(t.shape),u=i(u,d);else{u.value={};let e=l.shape;for(let t of l.keys){let n=e[t],r=n._zod.run({value:f[t],issues:[]},d),i=n._zod.optin===`optional`&&n._zod.optout===`optional`;r instanceof Promise?p.push(r.then(e=>i?VE(e,u,t,f):BE(e,u,t))):i?VE(r,u,t,f):BE(r,u,t)}}if(!c)return p.length?Promise.all(p).then(()=>u):u;let m=[],h=l.keySet,g=c._zod,_=g.def.type;for(let e of Object.keys(f)){if(h.has(e))continue;if(_===`never`){m.push(e);continue}let t=g.run({value:f[e],issues:[]},d);t instanceof Promise?p.push(t.then(t=>BE(t,u,e))):BE(t,u,e)}return m.length&&u.issues.push({code:`unrecognized_keys`,keys:m,input:f,inst:e}),p.length?Promise.all(p).then(()=>u):u}});function UE(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;return t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>mE(e,r,VT())))}),t}var WE=$(`$ZodUnion`,(e,t)=>{FE.init(e,t),qT(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),qT(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),qT(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),qT(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>KT(e.source)).join(`|`)})$`)}}),e._zod.parse=(n,r)=>{let i=!1,a=[];for(let e of t.options){let t=e._zod.run({value:n.value,issues:[]},r);if(t instanceof Promise)a.push(t),i=!0;else{if(t.issues.length===0)return t;a.push(t)}}return i?Promise.all(a).then(t=>UE(t,n,e,r)):UE(a,n,e,r)}}),GE=$(`$ZodIntersection`,(e,t)=>{FE.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>qE(e,t,n)):qE(e,i,a)}});function KE(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($T(e)&&$T(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=KE(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{FE.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!$T(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[];if(t.keyType._zod.values){let o=t.keyType._zod.values;n.value={};for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...fE(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...fE(e,o.issues)),n.value[e]=o.value)}let s;for(let e in i)o.has(e)||(s??=[],s.push(e));s&&s.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:s})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){n.issues.push({origin:`record`,code:`invalid_key`,issues:s.issues.map(e=>mE(e,r,VT())),input:o,path:[o],inst:e}),n.value[s.value]=s.value;continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...fE(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...fE(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),YE=$(`$ZodEnum`,(e,t)=>{FE.init(e,t);let n=HT(t.entries);e._zod.values=new Set(n),e._zod.pattern=RegExp(`^(${n.filter(e=>eE.has(typeof e)).map(e=>typeof e==`string`?tE(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,r)=>{let i=t.value;return e._zod.values.has(i)||t.issues.push({code:`invalid_value`,values:n,input:i,inst:e}),t}}),XE=$(`$ZodLiteral`,(e,t)=>{FE.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?tE(e):e?e.toString():String(e)).join(`|`)})$`),e._zod.parse=(n,r)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:`invalid_value`,values:t.values,input:i,inst:e}),n}}),ZE=$(`$ZodTransform`,(e,t)=>{FE.init(e,t),e._zod.parse=(e,n)=>{let r=t.transform(e.value,e);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(t=>(e.value=t,e));if(r instanceof Promise)throw new zT;return e.value=r,e}}),QE=$(`$ZodOptional`,(e,t)=>{FE.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,qT(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),qT(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${KT(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>t.innerType._zod.optin===`optional`?t.innerType._zod.run(e,n):e.value===void 0?e:t.innerType._zod.run(e,n)}),$E=$(`$ZodNullable`,(e,t)=>{FE.init(e,t),qT(e._zod,`optin`,()=>t.innerType._zod.optin),qT(e._zod,`optout`,()=>t.innerType._zod.optout),qT(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${KT(e.source)}|null)$`):void 0}),qT(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),eD=$(`$ZodDefault`,(e,t)=>{FE.init(e,t),e._zod.optin=`optional`,qT(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>tD(e,t)):tD(r,t)}});function tD(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var nD=$(`$ZodPrefault`,(e,t)=>{FE.init(e,t),e._zod.optin=`optional`,qT(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),rD=$(`$ZodNonOptional`,(e,t)=>{FE.init(e,t),qT(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>iD(t,e)):iD(i,e)}});function iD(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var aD=$(`$ZodCatch`,(e,t)=>{FE.init(e,t),e._zod.optin=`optional`,qT(e._zod,`optout`,()=>t.innerType._zod.optout),qT(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>mE(e,n,VT()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>mE(e,n,VT()))},input:e.value}),e.issues=[]),e)}}),oD=$(`$ZodPipe`,(e,t)=>{FE.init(e,t),qT(e._zod,`values`,()=>t.in._zod.values),qT(e._zod,`optin`,()=>t.in._zod.optin),qT(e._zod,`optout`,()=>t.out._zod.optout),e._zod.parse=(e,n)=>{let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>sD(e,t,n)):sD(r,t,n)}});function sD(e,t,n){return dE(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}var cD=$(`$ZodReadonly`,(e,t)=>{FE.init(e,t),qT(e._zod,`propValues`,()=>t.innerType._zod.propValues),qT(e._zod,`values`,()=>t.innerType._zod.values),qT(e._zod,`optin`,()=>t.innerType._zod.optin),qT(e._zod,`optout`,()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(lD):lD(r)}});function lD(e){return e.value=Object.freeze(e.value),e}var uD=$(`$ZodLazy`,(e,t)=>{FE.init(e,t),qT(e._zod,`innerType`,()=>t.getter()),qT(e._zod,`pattern`,()=>e._zod.innerType._zod.pattern),qT(e._zod,`propValues`,()=>e._zod.innerType._zod.propValues),qT(e._zod,`optin`,()=>e._zod.innerType._zod.optin),qT(e._zod,`optout`,()=>e._zod.innerType._zod.optout),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),dD=$(`$ZodCustom`,(e,t)=>{OE.init(e,t),FE.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>fD(t,n,r,e));fD(i,n,r,e)}});function fD(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(gE(e))}}var pD=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){let n=t[0];if(this._map.set(e,n),n&&typeof n==`object`&&`id`in n){if(this._idmap.has(n.id))throw Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function mD(){return new pD}var hD=mD();function gD(e){return new e({type:`unknown`})}function _D(e,t){return new e({type:`never`,...rE(t)})}function vD(e,t){return new kE({check:`max_length`,...rE(t),maximum:e})}function yD(e,t){return new AE({check:`min_length`,...rE(t),minimum:e})}function bD(e,t){return new jE({check:`length_equals`,...rE(t),length:e})}function xD(e){return new ME({check:`overwrite`,tx:e})}function SD(e,t,n){return new e({type:`array`,element:t,...rE(n)})}function CD(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...rE(n)})}var wD=(e,t)=>{vE.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>xE(e,t)},flatten:{value:t=>bE(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return e.issues.length===0}}})};$(`ZodError`,wD);var TD=$(`ZodError`,wD,{Parent:Error}),ED=SE(TD),DD=CE(TD),OD=wE(TD),kD=EE(TD),AD=$(`ZodType`,(e,t)=>(FE.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),e.clone=(t,n)=>nE(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>ED(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>OD(e,t,n),e.parseAsync=async(t,n)=>DD(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>kD(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(pO(t,n)),e.superRefine=t=>e.check(mO(t)),e.overwrite=t=>e.check(xD(t)),e.optional=()=>YD(e),e.nullable=()=>ZD(e),e.nullish=()=>YD(ZD(e)),e.nonoptional=t=>rO(e,t),e.array=()=>ID(e),e.or=t=>zD([e,t]),e.and=t=>VD(e,t),e.transform=t=>sO(e,qD(t)),e.default=t=>$D(e,t),e.prefault=t=>tO(e,t),e.catch=t=>aO(e,t),e.pipe=t=>sO(e,t),e.readonly=()=>lO(e),e.describe=t=>{let n=e.clone();return hD.add(n,{description:t}),n},Object.defineProperty(e,"description",{get(){return hD.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return hD.get(e);let n=e.clone();return hD.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),jD=$(`ZodUnknown`,(e,t)=>{IE.init(e,t),AD.init(e,t)});function MD(){return gD(jD)}var ND=$(`ZodNever`,(e,t)=>{LE.init(e,t),AD.init(e,t)});function PD(e){return _D(ND,e)}var FD=$(`ZodArray`,(e,t)=>{zE.init(e,t),AD.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(yD(t,n)),e.nonempty=t=>e.check(yD(1,t)),e.max=(t,n)=>e.check(vD(t,n)),e.length=(t,n)=>e.check(bD(t,n)),e.unwrap=()=>e.element});function ID(e,t){return SD(FD,e,t)}var LD=$(`ZodObject`,(e,t)=>{HE.init(e,t),AD.init(e,t),qT(e,`shape`,()=>t.shape),e.keyof=()=>WD(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:MD()}),e.loose=()=>e.clone({...e._zod.def,catchall:MD()}),e.strict=()=>e.clone({...e._zod.def,catchall:PD()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>sE(e,t),e.merge=t=>cE(e,t),e.pick=t=>aE(e,t),e.omit=t=>oE(e,t),e.partial=(...t)=>lE(JD,e,t[0]),e.required=(...t)=>uE(nO,e,t[0])}),RD=$(`ZodUnion`,(e,t)=>{WE.init(e,t),AD.init(e,t),e.options=t.options});function zD(e,t){return new RD({type:`union`,options:e,...rE(t)})}var BD=$(`ZodIntersection`,(e,t)=>{GE.init(e,t),AD.init(e,t)});function VD(e,t){return new BD({type:`intersection`,left:e,right:t})}var HD=$(`ZodRecord`,(e,t)=>{JE.init(e,t),AD.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType}),UD=$(`ZodEnum`,(e,t)=>{YE.init(e,t),AD.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new UD({...t,checks:[],...rE(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new UD({...t,checks:[],...rE(r),entries:i})}});function WD(e,t){return new UD({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...rE(t)})}var GD=$(`ZodLiteral`,(e,t)=>{XE.init(e,t),AD.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),KD=$(`ZodTransform`,(e,t)=>{ZE.init(e,t),AD.init(e,t),e._zod.parse=(n,r)=>{n.addIssue=r=>{if(typeof r==`string`)n.issues.push(gE(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,t.continue??=!0,n.issues.push(gE(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function qD(e){return new KD({type:`transform`,transform:e})}var JD=$(`ZodOptional`,(e,t)=>{QE.init(e,t),AD.init(e,t),e.unwrap=()=>e._zod.def.innerType});function YD(e){return new JD({type:`optional`,innerType:e})}var XD=$(`ZodNullable`,(e,t)=>{$E.init(e,t),AD.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ZD(e){return new XD({type:`nullable`,innerType:e})}var QD=$(`ZodDefault`,(e,t)=>{eD.init(e,t),AD.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $D(e,t){return new QD({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}var eO=$(`ZodPrefault`,(e,t)=>{nD.init(e,t),AD.init(e,t),e.unwrap=()=>e._zod.def.innerType});function tO(e,t){return new eO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():t}})}var nO=$(`ZodNonOptional`,(e,t)=>{rD.init(e,t),AD.init(e,t),e.unwrap=()=>e._zod.def.innerType});function rO(e,t){return new nO({type:`nonoptional`,innerType:e,...rE(t)})}var iO=$(`ZodCatch`,(e,t)=>{aD.init(e,t),AD.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function aO(e,t){return new iO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var oO=$(`ZodPipe`,(e,t)=>{oD.init(e,t),AD.init(e,t),e.in=t.in,e.out=t.out});function sO(e,t){return new oO({type:`pipe`,in:e,out:t})}var cO=$(`ZodReadonly`,(e,t)=>{cD.init(e,t),AD.init(e,t)});function lO(e){return new cO({type:`readonly`,innerType:e})}var uO=$(`ZodLazy`,(e,t)=>{uD.init(e,t),AD.init(e,t),e.unwrap=()=>e._zod.def.getter()}),dO=$(`ZodCustom`,(e,t)=>{dD.init(e,t),AD.init(e,t)});function fO(e){let t=new OE({check:`custom`});return t._zod.check=e,t}function pO(e,t={}){return CD(dO,e,t)}function mO(e){let t=fO(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(gE(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(gE(r))}},e(n.value,n)));return t}var hO=`@ag-ui/client`;function gO(e){if(!e.metadata||!Object.prototype.hasOwnProperty.call(e.metadata,hO))return;let t=e.metadata?.[hO];if(!t||typeof t!=`object`||Array.isArray(t))return[];if(!Object.prototype.hasOwnProperty.call(t,`authoritativeActivityTypes`))return;let n=t.authoritativeActivityTypes;return n===null?null:Array.isArray(n)&&n.every(e=>typeof e==`string`)?n:[]}var _O=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function vO(){return Vc()}function yO(e){return e instanceof TypeError&&/read[- ]?only|not extensible|cannot add property|cannot delete property|can't be deleted|unable to delete property|object is frozen|is not writable/i.test(e.message)}function bO(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&bO(t);return e}var xO=524288;function SO(e,t,n){let r=0,i=[e,t],a=new WeakSet;for(;i.length>0;){let e=i.pop();if(typeof e==`string`){if(r+=e.length,r>n)return!0}else if(typeof e==`object`&&e){if(a.has(e))continue;if(a.add(e),Array.isArray(e))for(let t=0;tn)return!0;i.push(e[o])}}}}return!1}async function CO(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!SO(t,n,xO),c=s?_O(t):t,l=s?_O(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(bO(c),bO(l));let e=await r(t,c,l);if(e===void 0)continue;let n=!1;if(e.messages!==void 0&&e.messages!==c&&(c=_O(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=_O(e.state),d=!0,n=!0),s&&n&&SO(c,l,xO)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(a&&e instanceof TypeError)throw e;s&&o&&yO(e)?console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e):console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?_O(c):c}:{},...d?{state:Object.isFrozen(l)?_O(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function wO(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(e===!0)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,n=e.lifecycle??!0,r=e.verbose??!1;return{enabled:t||n,events:t,lifecycle:n,verbose:r}}function TO(e){if(e instanceof EO)return e;if(e===!0)return new EO(wO(!0))}var EO=class{constructor(e){this.config=e}event(e,t,n,r){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,typeof n==`string`?n:JSON.stringify(n)):console.debug(`[${e}] ${t}`,r??n))}lifecycle(e,t,n){this.config.lifecycle&&(n?console.debug(`[${e}] ${t}`,n):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function DO(e){return e.enabled?new EO(e):void 0}function OO(e,t,n){if(t){let r=e.find(e=>e.id===t);if(r?.role===`assistant`)return r;r&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${r.role}' message, not assistant — falling back to toolCallId`);let i={id:r?n:t,role:`assistant`,toolCalls:[]};return e.push(i),i}let r={id:n,role:`assistant`,toolCalls:[]};return e.push(r),r}function kO(e,t){return!e||t.metadata===void 0?!1:(e.metadata=qc(e.metadata,_O(t.metadata)),!0)}var AO=(e,t,n,r,i)=>{let a=TO(i),o=_O(n.messages),s=_O(e.state),c={},l=[],u=new Set,d=e=>{let t=e.outcome?.type===`success`?e.outcome.pendingToolCallIds:void 0;return t!==void 0&&t.length>0?[...t]:l.filter(e=>!u.has(e))},f=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},p=()=>{let e=_O(c);return c={},e.messages!==void 0||e.state!==void 0?fd(e):Nu};return t.pipe(Cd(async t=>{let i=await CO(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(f(i),i.stopPropagation===!0?a?.event(`APPLY`,`Event dropped:`,t,{type:t.type,reason:`stopPropagation by subscriber`}):a?.event(`APPLY`,`Event applied:`,t,{type:t.type,subscribers:r.length}),i.stopPropagation===!0)return p();switch(t.type){case L.TEXT_MESSAGE_START:{let i=await CO(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messageId:e,role:n=`assistant`,name:r,subagentRunId:i}=t,a=o.find(t=>t.id===e);if(a?.role===`activity`)return console.warn(`TEXT_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and text messages`),p();let s=a;if(!s){let t={id:e,role:n,content:``,...r!==void 0&&{name:r},...i!=null&&{subagentRunId:i}};o.push(t),s=t}let c=kO(s,t);(!a||c)&&f({messages:o})}return p()}case L.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),p();if(c.role===`activity`)return console.warn(`TEXT_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),p();let l=await CO(r,o,s,(r,i,a)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:typeof c.content==`string`?c.content:``}));return f(l),l.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,kO(c,t),f({messages:o})),p()}case L.TEXT_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),p();if(a.role===`activity`)return console.warn(`TEXT_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),p();let c=await CO(r,o,s,(r,i,o)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,textMessageBuffer:typeof a.content==`string`?a.content:``}));return f(c),c.stopPropagation!==!0&&kO(a,t)&&f({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),p()}case L.TOOL_CALL_START:{let i=await CO(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r,subagentRunId:i}=t;l.includes(e)||l.push(e);let a=o.find(t=>t.toolCalls?.some(t=>t.id===e))?.toolCalls?.find(t=>t.id===e);if(a){let r=a.function.name!==n;return r&&(console.warn(`TOOL_CALL_START: tool call '${e}' already exists with name '${a.function.name}' — updating it to '${n}'`),a.function.name=n),(kO(a,t)||r)&&f({messages:o}),p()}let s=new Set(o.map(e=>e.id)),c=OO(o,r,e);!s.has(c.id)&&i!=null&&c.subagentRunId===void 0&&(c.subagentRunId=i),c.toolCalls??=[];let u={id:e,type:`function`,function:{name:n,arguments:``}};c.toolCalls.push(u),kO(u,t),f({messages:o})}return p()}case L.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,c=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!c)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),p();let l=c.toolCalls?.find(e=>e.id===i);if(!l)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),p();let u=await CO(r,o,s,(r,i,a)=>{let o=l.function.arguments,s=l.function.name,c={};try{c=Md(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return f(u),u.stopPropagation!==!0&&(l.function.arguments+=a,kO(l,t),f({messages:o})),p()}case L.TOOL_CALL_END:{let{toolCallId:i}=t,a=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),p();let c=a.toolCalls?.find(e=>e.id===i);if(!c)return console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),p();let l=await CO(r,o,s,(r,i,a)=>{let o=c.function.arguments,s=c.function.name,l={};try{l=JSON.parse(o)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallName:s,toolCallArgs:l})});return f(l),l.stopPropagation!==!0&&kO(c,t)&&f({messages:o}),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),p()}case L.TOOL_CALL_RESULT:{let i=await CO(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:l,subagentRunId:d}=t;u.add(a);let p={id:i,toolCallId:a,role:l||`tool`,content:c,...d!=null&&{subagentRunId:d}};kO(p,t);let m=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(m===-1)o.push(p);else{let e=m+1;for(;e{t.onNewMessage?.({message:p,messages:o,state:s,agent:n,input:e})})),f({messages:o})}return p()}case L.STATE_SNAPSHOT:{let i=await CO(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,f({state:s})}return p()}case L.STATE_DELTA:{let i=await CO(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=jl.applyPatch(s,e,!0,!1).newDocument,f({state:s})}catch(t){let n=t instanceof Error?t.message:String(t);console.warn(`Failed to apply state patch:\nCurrent state: ${JSON.stringify(s,null,2)}\nPatch operations: ${JSON.stringify(e,null,2)}\nError: ${n}`)}}return p()}case L.MESSAGES_SNAPSHOT:{let i=await CO(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messages:e}=t,n=e.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}),r=new Map(n.map(e=>[e.id,e])),i=gO(t),a=n.some(e=>e.role===`activity`),s=n.some(e=>e.role===`reasoning`),c=e=>e.role===`activity`&&(i?!i.includes(e.activityType):i!==null&&!a)||e.role===`reasoning`&&!s;o=o.filter(e=>r.has(e.id)||c(e)).map(e=>r.get(e.id)??e);let l=new Set(o.map(e=>e.id));for(let e of n)l.has(e.id)||o.push(e);f({messages:o})}return p()}case L.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,l=c?.role===`activity`?c:void 0,u=i.replace??!0,d=await CO(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:l,existingMessage:c}));if(f(d),d.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:_O(i.content),...i.subagentRunId!=null&&{subagentRunId:i.subagentRunId}},c,d;a===-1?(o.push(t),c=t,d=t):l?(u&&(o[a]={...l,activityType:i.activityType,content:_O(i.content),subagentRunId:i.subagentRunId},i.subagentRunId??delete o[a].subagentRunId),d=o[a]):u&&(o[a]=t,c=t,d=t),kO(d,i),f({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return p()}case L.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return p();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),p();let l=c,u=await CO(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:l}));if(f(u),u.stopPropagation!==!0)try{kO(l,i)&&f({messages:o});let e=_O(l.content??{}),t=jl.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...l,content:_O(t),activityType:i.activityType},f({messages:o})}catch(e){let t=e instanceof Error?e.message:String(e);console.warn(`Failed to apply activity patch for '${i.messageId}': ${t}`)}return p()}case L.RAW:return f(await CO(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.CUSTOM:return f(await CO(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.RUN_STARTED:{let i=await CO(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),l=[],u=new Set,i.stopPropagation!==!0){let e=t;if(e.input?.messages){for(let t of e.input.messages){let e=t;if(t.subagentRunId===null){let n={...t};delete n.subagentRunId,e=n}o.find(t=>t.id===e.id)||o.push(e)}f({messages:o})}}return p()}case L.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:i.outcome?.type===`cancelled`?{event:i,outcome:`cancelled`}:{event:i,outcome:`success`,result:i.result,pendingToolCallIds:d(i)},c=await CO(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return f(c),c.stopPropagation!==!0&&(n.pendingInterrupts=a.outcome===`interrupt`?a.interrupts.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}):[]),p()}case L.RUN_ERROR:return f(await CO(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.STEP_STARTED:return f(await CO(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.STEP_FINISHED:return f(await CO(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be transformed before being applied`);case L.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be transformed before being applied`);case L.REASONING_START:return f(await CO(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.REASONING_MESSAGE_START:{let i=await CO(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(i),i.stopPropagation!==!0){let{messageId:e,subagentRunId:n}=t,r=o.find(t=>t.id===e);if(r?.role===`activity`)return console.warn(`REASONING_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and reasoning messages`),p();let i=r;if(!i){let t={id:e,role:`reasoning`,content:``,...n!=null&&{subagentRunId:n}};o.push(t),i=t}let a=kO(i,t);(!r||a)&&f({messages:o})}return p()}case L.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),p();if(c.role===`activity`)return console.warn(`REASONING_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and reasoning messages`),p();let l=await CO(r,o,s,(r,i,a)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:typeof c.content==`string`?c.content:``}));return f(l),l.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,kO(c,t),f({messages:o})),p()}case L.REASONING_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),p();if(a.role===`activity`)return console.warn(`REASONING_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and reasoning messages`),p();let c=await CO(r,o,s,(r,i,o)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,reasoningMessageBuffer:typeof a.content==`string`?a.content:``}));return f(c),c.stopPropagation!==!0&&kO(a,t)&&f({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),p()}case L.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case L.REASONING_END:return f(await CO(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:l}=t,u=await CO(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(f(u),u.stopPropagation!==!0){let e=!1;if(i===`tool-call`){for(let t of o)if(t.role===`assistant`&&t.toolCalls){let n=t.toolCalls.find(e=>e.id===a);if(n){n.encryptedValue=l,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=l,e=!0)}e&&(c.messages=o)}return p()}case L.SUBAGENT_STARTED:return f(await CO(r,o,s,(r,i,a)=>r.onSubagentStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.SUBAGENT_FINISHED:return f(await CO(r,o,s,(r,i,a)=>r.onSubagentFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p();case L.SUBAGENT_ERROR:return f(await CO(r,o,s,(r,i,a)=>r.onSubagentErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),p()}return t.type,p()}),vd(),r.length>0?Ed({}):e=>e)};function jO(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][compat] Converting deprecated ${e} to ${t}. The old shape leaves the protocol after its shim window — see the repo-root DEPRECATIONS.md. Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)}var MO=e=>t=>{let n=TO(e),r=new Set,i=new Set,a=new Set,o=new Set,s={message:new Map,toolCall:new Map,activity:new Map,reasoning:new Map},c=!1,l=!1,u=!1,d=new Map,f=e=>{let t=d.get(e);return t||(t=new Map,d.set(e,t)),t},p=()=>{for(let e of d.values())if(e.size>0)return!0;return!1},m=new Map,h=new Set,g=!1,_=!1,v=()=>{_=!1,r.clear(),i.clear(),a.clear(),o.clear(),s.message.clear(),s.toolCall.clear(),s.activity.clear(),s.reasoning.clear(),d.clear(),m.clear(),h.clear(),c=!1,l=!1,g=!0},y=(e,t)=>{let n=e??[];if(Array.isArray(n))for(let e of n){if(!e||typeof e.id!=`string`)continue;if(e.subagentRunId===null)return new R(`Cannot send a message (id '${e.id}') with 'subagentRunId: null'. The field is optional — omit it entirely.`);let n=e.role===`reasoning`?s.reasoning:e.role===`activity`?s.activity:s.message;(t||!n.has(e.id))&&n.set(e.id,{subagentRunId:e.subagentRunId});for(let n of e.toolCalls??[])n&&typeof n.id==`string`&&(t||!s.toolCall.has(n.id))&&s.toolCall.set(n.id,{subagentRunId:e.subagentRunId??void 0})}},b=(e,t,n,r,i)=>{if(t!==void 0&&n&&n.subagentRunId!==t)return new R(`Cannot send '${e}': subagentRunId '${t}' does not match the ${r} '${i}' opener's subagent '${n.subagentRunId??`(the parent agent)`}'.`)};return t.pipe(_d(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),l&&t!==L.RUN_STARTED)return z(()=>new R(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(c&&t!==L.RUN_ERROR&&t!==L.RUN_STARTED)return z(()=>new R(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!u){if(u=!0,t!==L.RUN_STARTED&&t!==L.RUN_ERROR)return z(()=>new R(`First event must be 'RUN_STARTED'`))}else if(t===L.RUN_STARTED){if(g&&!c&&!l)return z(()=>new R(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));(c||l)&&v()}if(e.subagentRunId===null){_||(_=!0,jO(`subagentRunId: null`,`an absent field`));let{subagentRunId:t,...n}=e;e=n}if(t===L.SUBAGENT_STARTED||t===L.SUBAGENT_FINISHED||t===L.SUBAGENT_ERROR){let n=t===L.SUBAGENT_STARTED?[`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`]:t===L.SUBAGENT_FINISHED?[`outcome`]:[`code`];for(let r of n)if(e[r]===null)return z(()=>new R(`Cannot send '${t}' with '${r}: null'. The field is optional — omit it entirely.`));let r=e.outcome;if(r!=null&&r.type!==`success`&&r.type!==`suspended`)return z(()=>new R(`Cannot send '${t}' with outcome type '${String(r.type)}'. The outcome is either { type: "success" } or { type: "suspended" }.`));if(r&&r.interruptIds===null)return z(()=>new R(`Cannot send '${t}' with 'outcome.interruptIds: null'. The field is optional — omit it entirely.`));if(r&&Array.isArray(r.interruptIds)&&r.interruptIds.some(e=>typeof e!=`string`))return z(()=>new R(`Cannot send '${t}' with a non-string entry in 'outcome.interruptIds'. Interrupt ids are strings.`))}if(t===L.RUN_FINISHED){let t=e.outcome;if(t?.type===`interrupt`&&Array.isArray(t.interrupts)){for(let e of t.interrupts)if(e&&e.subagentRunId===null)return z(()=>new R(`Cannot send 'RUN_FINISHED' with an interrupt (id '${e.id}') carrying 'subagentRunId: null'. The field is optional — omit it entirely.`))}}switch(t){case L.TEXT_MESSAGE_START:{let n=e.messageId;if(r.has(n))return z(()=>new R(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${n}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`));let i=s.message.get(n);if(i){let r=b(t,e.subagentRunId,i,`message`,n);if(r)return z(()=>r)}return r.add(n),i||s.message.set(n,{subagentRunId:e.subagentRunId}),fd(e)}case L.TEXT_MESSAGE_CONTENT:{let n=e.messageId;if(!r.has(n))return z(()=>new R(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${n}'. Start a text message with 'TEXT_MESSAGE_START' first.`));let i=b(t,e.subagentRunId,s.message.get(n),`message`,n);return i?z(()=>i):fd(e)}case L.TEXT_MESSAGE_END:{let n=e.messageId;if(!r.has(n))return z(()=>new R(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${n}'. A 'TEXT_MESSAGE_START' event must be sent first.`));let i=b(t,e.subagentRunId,s.message.get(n),`message`,n);return i?z(()=>i):(r.delete(n),fd(e))}case L.TOOL_CALL_START:{let n=e.toolCallId;if(i.has(n))return z(()=>new R(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${n}' is already in progress. Complete it with 'TOOL_CALL_END' first.`));let r=e.parentMessageId,a=e.subagentRunId,o;if(r!==void 0){let e=s.message.get(r);if(e){if(a!==void 0&&a!==e.subagentRunId)return z(()=>new R(`Cannot send 'TOOL_CALL_START': subagentRunId '${a}' does not match its parent message '${r}' owner '${e.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`));o=e}}let c=s.toolCall.get(n);if(c){let e=b(t,a,c,`tool call`,n);if(e)return z(()=>e);if(a===void 0&&o&&o.subagentRunId!==c.subagentRunId)return z(()=>new R(`Cannot send 'TOOL_CALL_START': tool call '${n}' is owned by '${c.subagentRunId??`(the parent agent)`}' but its parent message '${r}' is owned by '${o.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`))}return i.add(n),c||s.toolCall.set(n,a===void 0?o??{subagentRunId:void 0}:{subagentRunId:a}),fd(e)}case L.TOOL_CALL_ARGS:{let n=e.toolCallId;if(!i.has(n))return z(()=>new R(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${n}'. Start a tool call with 'TOOL_CALL_START' first.`));let r=b(t,e.subagentRunId,s.toolCall.get(n),`tool call`,n);return r?z(()=>r):fd(e)}case L.TOOL_CALL_END:{let n=e.toolCallId;if(!i.has(n))return z(()=>new R(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${n}'. A 'TOOL_CALL_START' event must be sent first.`));let r=b(t,e.subagentRunId,s.toolCall.get(n),`tool call`,n);return r?z(()=>r):(i.delete(n),fd(e))}case L.STEP_STARTED:{let t=e.stepName,n=e.subagentRunId;return f(n).has(t)?z(()=>new R(`Step "${t}" is already active for 'STEP_STARTED'${n===void 0?``:` in subagent '${n}'`}`)):(f(n).set(t,!0),fd(e))}case L.STEP_FINISHED:{let t=e.stepName,n=e.subagentRunId;if(!f(n).has(t)){let e,r=!1;for(let[i,a]of d)if(i!==n&&a.has(t)){e=i,r=!0;break}return z(r?()=>new R(`Cannot send 'STEP_FINISHED' for step "${t}" attributed to ${n===void 0?`the parent agent`:`subagent '${n}'`}: that step is open under ${e===void 0?`the parent agent`:`subagent '${e}'`}. A step must be finished by whoever started it.`):()=>new R(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}return f(n).delete(t),fd(e)}case L.ACTIVITY_SNAPSHOT:{let t=e.messageId;return(!s.activity.has(t)||e.replace!==!1)&&s.activity.set(t,{subagentRunId:e.subagentRunId}),fd(e)}case L.TOOL_CALL_RESULT:{let t=e.messageId;return typeof t==`string`&&s.message.set(t,{subagentRunId:e.subagentRunId}),fd(e)}case L.REASONING_START:case L.REASONING_MESSAGE_START:{let n=e.messageId,r=t===L.REASONING_START,i=r?a:o;if(i.has(n))return z(()=>new R(r?`Cannot send 'REASONING_START' event: A reasoning span with ID '${n}' is already in progress. Complete it with 'REASONING_END' first.`:`Cannot send 'REASONING_MESSAGE_START' event: A reasoning message with ID '${n}' is already in progress. Complete it with 'REASONING_MESSAGE_END' first.`));let c=s.reasoning.get(n);if(c){let r=b(t,e.subagentRunId,c,`reasoning message`,n);if(r)return z(()=>r)}return i.add(n),c||s.reasoning.set(n,{subagentRunId:e.subagentRunId}),fd(e)}case L.REASONING_MESSAGE_CONTENT:case L.REASONING_MESSAGE_END:case L.REASONING_END:{let n=e.messageId,r=t===L.REASONING_END,i=r?a:o;if(!i.has(n))return z(()=>new R(r?`Cannot send 'REASONING_END' event: No active reasoning span found with ID '${n}'. A 'REASONING_START' event must be sent first.`:`Cannot send '${t}' event: No active reasoning message found with ID '${n}'. Start a reasoning message with 'REASONING_MESSAGE_START' first.`));let c=b(t,e.subagentRunId,s.reasoning.get(n),`reasoning message`,n);return c?z(()=>c):((t===L.REASONING_END||t===L.REASONING_MESSAGE_END)&&i.delete(n),fd(e))}case L.REASONING_ENCRYPTED_VALUE:{let n=e.entityId,r=e.subtype,i=r===`tool-call`?s.toolCall.get(n):r===`message`?s.message.get(n)??s.reasoning.get(n):s.reasoning.get(n),a=r===`tool-call`?`tool call`:r===`message`?`message`:`reasoning message`,o=b(t,e.subagentRunId,i,a,n);return o?z(()=>o):fd(e)}case L.ACTIVITY_DELTA:{let n=e.messageId,r=b(t,e.subagentRunId,s.activity.get(n),`activity`,n);return r?z(()=>r):fd(e)}case L.SUBAGENT_STARTED:{if(typeof e.subagentRunId!=`string`)return z(()=>new R(`Cannot send 'SUBAGENT_STARTED' without a 'subagentRunId'.`));if(typeof e.name!=`string`)return z(()=>new R(`Cannot send 'SUBAGENT_STARTED' without a 'name'.`));let t=e.subagentRunId,n=e.parentSubagentRunId;return m.has(t)?z(()=>new R(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' is already active. Finish it with 'SUBAGENT_FINISHED' first.`)):h.has(t)?z(()=>new R(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' has already finished in this run. Subagent IDs are per-invocation and cannot be reused.`)):n!==void 0&&!m.has(n)&&!h.has(n)?z(()=>new R(`Cannot send 'SUBAGENT_STARTED': parentSubagentRunId '${n}' has not been started in this run.`)):(m.set(t,!0),fd(e))}case L.SUBAGENT_FINISHED:case L.SUBAGENT_ERROR:{if(typeof e.subagentRunId!=`string`)return z(()=>new R(`Cannot send '${t}' without a 'subagentRunId'.`));if(t===L.SUBAGENT_ERROR&&typeof e.message!=`string`)return z(()=>new R(`Cannot send 'SUBAGENT_ERROR' without a 'message'.`));let n=e.subagentRunId;return m.has(n)?(m.delete(n),h.add(n),fd(e)):z(()=>new R(`Cannot send '${t}': no active subagent found with ID '${n}'. A 'SUBAGENT_STARTED' event must be sent first.`))}case L.MESSAGES_SNAPSHOT:{let t=y(e.messages,!0);if(t)return z(()=>t)}return fd(e);case L.RUN_STARTED:g=!0;{let t=y((e.input??{}).messages,!1);if(t)return z(()=>t)}return fd(e);case L.RUN_FINISHED:if(p()){let e=[];for(let[t,n]of d)for(let r of n.keys())e.push(t===void 0?r:`${r} (subagent '${t}')`);let t=e.join(`, `);return z(()=>new R(`Cannot send 'RUN_FINISHED' while steps are still active: ${t}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return z(()=>new R(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(o.size>0){let e=Array.from(o.keys()).join(`, `);return z(()=>new R(`Cannot send 'RUN_FINISHED' while reasoning messages are still active: ${e}`))}if(a.size>0){let e=Array.from(a.keys()).join(`, `);return z(()=>new R(`Cannot send 'RUN_FINISHED' while reasoning spans are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return z(()=>new R(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}if(m.size>0){let e=Array.from(m.keys()).join(`, `);return z(()=>new R(`Cannot send 'RUN_FINISHED' while subagents are still active: ${e}`))}return c=!0,fd(e);case L.RUN_ERROR:return l=!0,fd(e);case L.CUSTOM:return fd(e);default:return fd(e)}}))},NO=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),PO=e=>bd(()=>dd(e())).pipe(Od(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return dd(e.text()).pipe(_d(n=>{let r=n;if(t.includes(`application/json`))try{r=JSON.parse(n)}catch{}let i=Error(`HTTP ${e.status}: ${typeof r==`string`?r:JSON.stringify(r)}`);return i.status=e.status,i.payload=r,z(()=>i)}))}let t={type:NO.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new bu(e=>{let r=!1;return e.next(t),(async()=>{try{for(;!e.closed;){let{done:t,value:i}=await n.read();if(t){r=!0;break}let a={type:NO.DATA,data:i};e.next(a)}e.complete()}catch(t){r=!0,e.error(t)}})(),()=>{r||n.cancel().catch(e=>{e?.name!==`AbortError`&&console.warn(`Failed to cancel HTTP response stream:`,e)})}}):z(()=>Error(`Failed to getReader() from response`))})),FO=10485760,IO=(e,t)=>{let n=TO(t),r=new ku,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==NO.HEADERS&&e.type===NO.DATA&&e.data){let t=i.decode(e.data,{stream:!0});a+=t;let n=a.split(/\n\n/);a=n.pop()||``;for(let e of n)o(e);if(a.length>FO){r.error(Error(`SSE buffer size exceeded maximum limit of ${FO/1048576} MB`));return}}},error:e=>r.error(e),complete:()=>{a&&(a+=i.decode(),o(a)),r.complete()}});function o(e){let t=e.split(` `),i=[];for(let e of t)e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``));if(i.length>0)try{let e=i.join(` `),t=JSON.parse(e);n?.event(`SSE`,`Event received:`,t,{type:t?.type}),r.next(t)}catch(e){r.error(e)}}return r.asObservable()},LO=10485760,RO=()=>typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS,zO=(e,t)=>{let n=TO(t),r=new ku,i=new Uint8Array,a=!1;e.subscribe({next:e=>{if(e.type!==NO.HEADERS&&e.type===NO.DATA&&e.data){let t=new Uint8Array(i.length+e.data.length);t.set(i,0),t.set(e.data,i.length),i=t,o()}},error:e=>r.error(e),complete:()=>{if(o(),!a){if(i.length>0){r.error(Error(`The binary stream ended mid-frame: ${i.length} trailing bytes could not be read as a complete message.`));return}r.complete()}}});function o(){if(!a)for(;i.length>=4;){let e=4+new DataView(i.buffer,i.byteOffset,4).getUint32(0,!1);if(e>LO){r.error(Error(`Protobuf message size exceeded maximum limit of ${LO/1048576} MB`));return}if(i.length{let n=TO(t),r=new ku,i=new Mu(1),a=!1,o,s=!1,c=()=>{s=!0,o?.unsubscribe()},l=e=>{c(),r.error(e)},u=()=>{c(),r.complete()};return o=e.subscribe({next:e=>{if(i.next(e),e.type===NO.HEADERS&&!a){a=!0;let t=e.headers.get(`content-type`);n?.lifecycle(`HTTP`,`Stream format detected:`,{contentType:t,parser:t===`application/vnd.ag-ui.event+proto`?`protobuf`:`sse`}),t===`application/vnd.ag-ui.event+proto`?zO(i,n).subscribe({next:e=>r.next(e),error:e=>l(e),complete:()=>u()}):IO(i,n).subscribe({next:e=>{if(typeof e!=`object`||!e||Array.isArray(e)){let t=Error(`Invalid event: the frame is not a JSON object.`);n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),l(t);return}let t=e;if(typeof t.type!=`string`||t.type.length===0){let t=Error(`Invalid event: the frame carries no event type.`);n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),l(t);return}n?.event(`HTTP`,`Event received:`,e,{type:t.type}),r.next(e)},error:e=>{if(e?.name===`AbortError`){r.next({type:L.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),u();return}return l(e)},complete:()=>u()})}else a||l(Error(`No headers event received before data events`))},error:e=>{i.error(e),l(e)},complete:()=>{i.complete()}}),s&&o.unsubscribe(),r.asObservable()},VO={TextMessageStart:`TextMessageStart`,TextMessageContent:`TextMessageContent`,TextMessageEnd:`TextMessageEnd`,ActionExecutionStart:`ActionExecutionStart`,ActionExecutionArgs:`ActionExecutionArgs`,ActionExecutionEnd:`ActionExecutionEnd`,ActionExecutionResult:`ActionExecutionResult`,AgentStateMessage:`AgentStateMessage`,MetaEvent:`MetaEvent`,RunStarted:`RunStarted`,RunFinished:`RunFinished`,RunError:`RunError`,NodeStarted:`NodeStarted`,NodeFinished:`NodeFinished`},HO=e=>{if(typeof e==`string`)return e;if(!Array.isArray(e))return;let t=e.filter(e=>e.type===`text`).map(e=>e.text).filter(e=>e.length>0);if(t.length!==0)return t.join(` -`)};function UO(e,t){return Yc(t)&&WO(`[ag-ui][legacy] The result of tool call '${e}' carries content parts the legacy protocol cannot represent; only its text parts are bridged and the rest is dropped.`),Jc(t)}var WO=e=>{typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(e)},GO=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=!1,p=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(_d(r=>{switch(r.type){case L.TEXT_MESSAGE_START:{let e=r;return[{type:VO.TextMessageStart,messageId:e.messageId,role:e.role}]}case L.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:VO.TextMessageContent,messageId:e.messageId,content:e.delta}]}case L.TEXT_MESSAGE_END:{let e=r;return[{type:VO.TextMessageEnd,messageId:e.messageId}]}case L.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:VO.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case L.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return WO(`[ag-ui][legacy] TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let f=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(Md(d.function.arguments));e.tool_argument&&e.tool_argument in t?(p({...i,[e.state_key]:t[e.tool_argument]}),f=!0):e.tool_argument||(p({...i,[e.state_key]:t}),f=!0)}catch{}}return[{type:VO.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...f?[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case L.TOOL_CALL_END:{let e=r;return[{type:VO.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case L.TOOL_CALL_RESULT:{let e=r,t=d[e.toolCallId];return(t===void 0||t===``)&&WO(`[ag-ui][legacy] No usable tool name was seen for tool call '${e.toolCallId}' (${t===void 0?`no TOOL_CALL_START reached this bridge`:`its TOOL_CALL_START carried an empty toolCallName`}), so its result is being bridged with the fabricated action name "unknown". Downstream consumers route on that name.`),[{type:VO.ActionExecutionResult,actionExecutionId:e.toolCallId,result:UO(e.toolCallId,e.content),actionName:t||`unknown`}]}case L.RAW:return f||(f=!0,WO(`[ag-ui][legacy] Dropping RAW events: the legacy runtime protocol has no equivalent, so the provider payloads they carry do not reach the legacy stream. Reported once per stream.`)),[];case L.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:VO.MetaEvent,name:e.name,value:e.value}]}case L.STATE_SNAPSHOT:return p(r.snapshot),[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case L.STATE_DELTA:{let c=r,l;try{l=jl.applyPatch(i,c.delta,!0,!1).newDocument}catch(e){let t=e instanceof Error?e.message:String(e);return WO(`[ag-ui][legacy] Failed to apply state patch:\nCurrent state: ${JSON.stringify(i,null,2)}\nPatch operations: ${JSON.stringify(c.delta,null,2)}\nError: ${t}`),[]}return p(l),[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]}case L.MESSAGES_SNAPSHOT:return c=r.messages,[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case L.RUN_STARTED:return[];case L.RUN_FINISHED:{if(c&&(i.messages=c),Object.keys(i).length===0)return[];let r=null;if(c)try{r=KO(c)}catch(e){return[{type:VO.RunError,message:e.message}]}return[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...r?{messages:r}:{}}),active:!1}]}case L.RUN_ERROR:{let e=r;return[{type:VO.RunError,message:e.message,code:e.code}]}case L.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case L.STEP_FINISHED:return u=[],l=null,[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function KO(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=HO(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r;try{r=JSON.parse(e.function.arguments)}catch(t){throw Error(`Failed to parse arguments for tool call '${e.id}' (${e.function.name}): ${t.message}`)}let i={id:e.id,name:e.function.name,arguments:r,parentMessageId:n.id};t.push(i)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:UO(n.toolCallId,n.content),actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var qO=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,JO=e=>e===`tool`?`toolCallId`:`messageId`,YO=(e,t,n,r,i)=>{if(r!==void 0&&r!==i)throw Error(`Cannot continue ${e} '${t}': chunk ${n} '${r}' does not match the open stream's ${n} ${i===void 0?`(absent)`:`'${i}'`}.`)},XO=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},ZO=(e,t)=>{let n=XO(e,t);return t.rawEvent===void 0?n:{...n,rawEvent:t.rawEvent}},QO=e=>new Set(Object.keys(e.shape)),$O=QO(px),ek=QO(_x),tk=QO(eS),nk=(e,t)=>{let n;for(let r of Object.keys(e))t.has(r)||((n??={})[r]=e[r]);return n},rk=e=>{typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][transform] ${e} Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)},ik=(e,t,n,r)=>{if(t===void 0||n||e.length===0)return;let i=e[e.length-1],a=Object.keys(t).filter(e=>Object.prototype.hasOwnProperty.call(i,e));a.length>0&&rk(`A ${r} carried ${a.map(e=>`'${e}'`).join(`, `)}, which the synthesized ${String(i.type)} already describes. The synthesized value is kept and the chunk's is dropped — this stage does not judge a described field, so the producer's value cannot be substituted for its own.`),e[e.length-1]={...t,...i}},ak=e=>t=>{let n=TO(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:L.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:L.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:L.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&qO(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${JO(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(_d(e=>{switch(e.type){case L.TEXT_MESSAGE_START:case L.TEXT_MESSAGE_CONTENT:case L.TEXT_MESSAGE_END:case L.TOOL_CALL_START:case L.TOOL_CALL_ARGS:case L.TOOL_CALL_END:case L.TOOL_CALL_RESULT:case L.STATE_SNAPSHOT:case L.STATE_DELTA:case L.CUSTOM:case L.STEP_STARTED:case L.STEP_FINISHED:case L.REASONING_START:case L.REASONING_MESSAGE_START:case L.REASONING_MESSAGE_CONTENT:case L.REASONING_MESSAGE_END:case L.REASONING_END:return[...i(e.subagentRunId??void 0),e];case L.RUN_STARTED:case L.RUN_FINISHED:case L.RUN_ERROR:case L.MESSAGES_SNAPSHOT:return[...a(),e];case L.RAW:case L.ACTIVITY_SNAPSHOT:case L.ACTIVITY_DELTA:case L.REASONING_ENCRYPTED_VALUE:case L.SUBAGENT_STARTED:return[e];case L.SUBAGENT_FINISHED:case L.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case L.TEXT_MESSAGE_CHUNK:{let t=e,a=nk(e,$O),o=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`text`&&(t.messageId===void 0||t.messageId===c.fields.messageId))YO(`text message`,c.fields.messageId,`role`,t.role,c.fields.role),YO(`text message`,c.fields.messageId,`name`,t.name,c.fields.name),d=c.fields;else{if(l.push(...i(o)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);d={messageId:t.messageId,role:t.role===void 0?`assistant`:t.role,name:t.name,subagentRunId:t.subagentRunId},r.set(o,{kind:`text`,fields:d});let e=XO({type:L.TEXT_MESSAGE_START,messageId:t.messageId,role:d.role,...t.name!==void 0&&{name:t.name},...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=ZO({...a,type:L.TEXT_MESSAGE_CONTENT,messageId:d.messageId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:d.messageId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:L.TEXT_MESSAGE_CONTENT,messageId:d.messageId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return ik(l,a,u,`TEXT_MESSAGE_CHUNK`),l}case L.TOOL_CALL_CHUNK:{let t=e,a=nk(e,ek),o=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===c.fields.toolCallId))YO(`tool call`,c.fields.toolCallId,`toolCallName`,t.toolCallName,c.fields.toolCallName),YO(`tool call`,c.fields.toolCallId,`parentMessageId`,t.parentMessageId,c.fields.parentMessageId),d=c.fields;else{if(l.push(...i(o)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);d={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(o,{kind:`tool`,fields:d});let e=XO({type:L.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,...t.parentMessageId!==void 0&&{parentMessageId:t.parentMessageId},...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=ZO({...a,type:L.TOOL_CALL_ARGS,toolCallId:d.toolCallId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:d.toolCallId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:L.TOOL_CALL_ARGS,toolCallId:d.toolCallId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return ik(l,a,u,`TOOL_CALL_CHUNK`),l}case L.REASONING_MESSAGE_CHUNK:{let t=e,a=nk(e,tk),o=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===c.fields.messageId))d=c.fields;else{if(l.push(...i(o)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);d={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(o,{kind:`reasoning`,fields:d});let e=XO({type:L.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=ZO({...a,type:L.REASONING_MESSAGE_CONTENT,messageId:d.messageId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:d.messageId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:L.REASONING_MESSAGE_CONTENT,messageId:d.messageId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return ik(l,a,u,`REASONING_MESSAGE_CHUNK`),l}}return e.type,[e]}),Dd(()=>{a()}))},ok=Symbol(`agui.strip.drop`);function sk(e){let t=e;for(;;){if(t instanceof JD||t instanceof XD||t instanceof QD||t instanceof cO||t instanceof iO){t=t.unwrap();continue}if(t instanceof oO){t=t.def.in;continue}if(t instanceof uO){t=t.def.getter();continue}return t}}function ck(e){let t=e.def;return typeof t?.discriminator==`string`?t.discriminator:void 0}function lk(e){let t=e,n=Array.isArray(t.def?.values)?t.def.values:t.values?Array.from(t.values):void 0;return n&&n.length===1?n[0]:t.value}function uk(e){let t=sk(e);return t instanceof GD?lk(t):void 0}function dk(e,t,n,r){let i=sk(t);if(i instanceof LD){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t=i.shape,a=e,o={},s=i.meta()?.specOpen===!0;for(let e of Object.keys(a)){let i=Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;if(i===void 0){if(s){o[e]=a[e];continue}r.push(`${n}/${e}`);continue}let c=r.length,l=dk(a[e],i,`${n}/${e}`,r);if(l===ok){if(r.length=c,i.safeParse(void 0).success){r.push(`${n}/${e}`);continue}return ok}o[e]=l}return o}if(i instanceof FD){if(!Array.isArray(e))return e;let t=i.element,a=[];return e.forEach((e,i)=>{let o=r.length,s=dk(e,t,`${n}/${i}`,r);if(s===ok){r.length=o,r.push(`${n}/${i}`);return}a.push(s)}),a}if(i instanceof HD){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t=i.def.valueType,a=e,o={};for(let e of Object.keys(a)){let i=r.length,s=dk(a[e],t,`${n}/${e}`,r);if(s===ok){r.length=i,r.push(`${n}/${e}`);continue}o[e]=s}return o}if(i instanceof RD){let t=i.options,a=ck(i);if(a!==void 0){if(typeof e!=`object`||!e||Array.isArray(e))return e;let i=e[a];for(let o of t){let t=sk(o);if(!(t instanceof LD))continue;let s=t.shape;if(uk(s[a])===i)return dk(e,o,n,r)}return ok}let o=t.filter(e=>sk(e)instanceof LD),s=typeof e==`object`&&!!e&&!Array.isArray(e);if(o.length>1&&s)return e;for(let i of t){let t=sk(i);if(t instanceof FD&&Array.isArray(e)||t instanceof LD&&s)return dk(e,i,n,r)}return e}return e}function fk(e,t){let n=[],r=dk(e,t,``,n);if(r===ok)throw Error(`Internal error: the stripper found the whole value unrecognisable, which the schemas are not supposed to allow — schema/stripper mismatch.`);return{value:r,stripped:n}}var pk=new Set(Object.values(L));function mk(e){return pk.has(e.type)}var hk=new Map(oS.options.map(e=>{let t=e.shape;return[String(lk(t.type)),e]})),gk=()=>typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS;function _k(e){gk()||console.warn(`[ag-ui][enforce] ${e}`)}var vk=e=>t=>{let n=TO(e);return t.pipe(_d(e=>{if(!mk(e))return _k(`Dropping unrecognised event '${String(e.type)}': no middleware translated it and the protocol does not describe it.`),n?.event(`ENFORCE`,`Unrecognised event dropped:`,e,{type:e.type}),Nu;let t=hk.get(e.type);if(t===void 0)throw Error(`No validator for recognised event type '${String(e.type)}'`);let{value:r,stripped:i}=fk(e,t);for(let t of i)_k(`Removed unrecognised material at '${t}' on ${String(e.type)}. Nothing handled it; see the repo-root DEPRECATIONS.md if it is a retired shape.`);return fd(t.parse(r))}))};function yk(e){let{value:t,stripped:n}=fk(Gc(e,`RunAgentInput`),Bx);for(let e of n)_k(`Removed unrecognised material at '${e}' from the outgoing input.`);return Bx.parse(t)}var bk=class{runNext(e,t){return t.run(e).pipe(ak(!1))}runNextWithState(e,t){let n=_O(e.messages||[]),r=_O(e.state===void 0?{}:e.state),i=new Mu;return AO(e,i,t,[]).subscribe({next:e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)},error:()=>{}}),this.runNext(e,t).pipe(Cd(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:_O(n),state:_O(r)})))}},xk=class extends bk{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function Sk(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function Ck(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function wk(e){let t=Sk(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:((typeof process>`u`||!{}.SUPPRESS_TRANSFORMATION_WARNINGS)&&console.warn(`[ag-ui][compat] A binary content part carries only an id ('${e.id??``}') and cannot be converted to a modern media part; a 1.0 peer will not accept it. Provide data or a url. See the repo-root DEPRECATIONS.md.`),e)}function Tk(e,t,n){if(typeof e!=`object`||!e||!(`type`in e)||e.type!==t.type||!(`source`in e))return!1;let r=e.source;return typeof r!=`object`||!r||!(`type`in r)||r.type!==t.source.type||!(`value`in r)||r.value!==t.source.value||!(`mimeType`in r)||r.mimeType!==t.source.mimeType?!1:!n||`metadata`in e&&typeof e.metadata==`object`&&e.metadata!==null&&`filename`in e.metadata&&e.metadata.filename===n}function Ek(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.flatMap(e=>{if(Ck(e)){let n=wk(e);return n.type!==`binary`&&t.some(t=>Tk(t,n,e.filename))?[]:[n]}return[e]});return{...e,content:n}}var Dk=`THINKING_START`,Ok=`THINKING_END`,kk=`THINKING_TEXT_MESSAGE_START`,Ak=`THINKING_TEXT_MESSAGE_CONTENT`,jk=`THINKING_TEXT_MESSAGE_END`;function Mk(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Nk={event:[`rawEvent`,`subagentRunId`],[L.RUN_STARTED]:[`parentRunId`,`input`],[L.RUN_FINISHED]:[`result`,`outcome`],[L.RUN_ERROR]:[`usage`],[L.SUBAGENT_FINISHED]:[`result`],[L.TOOL_CALL_START]:[`parentMessageId`],[L.TOOL_CALL_CHUNK]:[`parentMessageId`],[L.TOOL_CALL_RESULT]:[`role`],"RUN_FINISHED.outcome":[`pendingToolCallIds`],"RUN_FINISHED.usage[]":[`provider`,`reasoningTokens`,`cachedInputTokens`,`cacheWriteInputTokens`],RunAgentInput:[`forwardedProps`],Tool:[`parameters`],ResumeEntry:[`payload`],"input content":[`metadata`]},Pk=new Map(Object.entries(Nk).filter(([e])=>Object.values(L).includes(e))),Fk=e=>jO(e,`an absent field`);function Ik(e,t,n,r){if(!Mk(e))return e;let i;for(let a of t)e[a]===null&&(r(n===void 0?`${a}: null`:`${n}.${a}: null`),i??={...e},delete i[a]);return i??e}function Lk(e,t,n){if(!Mk(e)||!Array.isArray(e[t]))return e;let r=e[t],i=r.map(n);return i.some((e,t)=>e!==r[t])?{...e,[t]:i}:e}function Rk(e,t){return Lk(e,`content`,e=>{if(!Mk(e))return e;switch(e.type){case`image`:case`audio`:case`video`:case`document`:return Ik(e,Nk[`input content`],`${e.type} input content`,t);default:return e}})}function zk(e,t=Fk){let n=Ik(e,Nk.RunAgentInput,`RunAgentInput`,t);return n=Lk(n,`tools`,e=>Ik(e,Nk.Tool,`Tool`,t)),n=Lk(n,`resume`,e=>Ik(e,Nk.ResumeEntry,`ResumeEntry`,t)),Lk(n,`messages`,e=>Rk(e,t))}var Bk=class extends bk{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null,this.nullsNoticedThisRun=new Set,this.noticeNullOncePerRun=e=>{this.nullsNoticedThisRun.has(e)||(this.nullsNoticedThisRun.add(e),jO(e,`an absent field`))}}warn(e,t){jO(e,t)}mintedContinuationId(e,t){if(t!==null)return t;let n=vO();return this.warnAside(`Minting a messageId ('${n}') for ${e}: no THINKING opener preceded it, so there was no id to continue. The id is this client's invention, not the producer's, and verification will reject the translated event for naming something nothing opened.`),n}warnAside(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][compat] ${e} Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.nullsNoticedThisRun.clear(),e.messages=e.messages.map(Ek),t.run(e).pipe(hd(e=>this.transformEvent(e)))}transformEvent(e){let t=this.noticeNullOncePerRun;e.type===L.RUN_STARTED&&this.nullsNoticedThisRun.clear(),e=Ik(e,Nk.event,void 0,t);let n=Pk.get(e.type);switch(n&&(e=Ik(e,n,e.type,t)),e.type){case Dk:{this.currentReasoningId=vO();let{title:t,...n}=e;return this.warn(Dk,L.REASONING_START),t!==void 0&&this.warnAside(`Dropping ${Dk}.title ${JSON.stringify(t)}: ${L.REASONING_START} has no title field, so the span's label cannot be carried and nothing downstream can recover it.`),{...n,type:L.REASONING_START,messageId:this.currentReasoningId}}case kk:return this.currentMessageId=vO(),this.warn(kk,L.REASONING_MESSAGE_START),{...e,type:L.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`reasoning`};case Ak:{let{delta:t,...n}=e;return this.warn(Ak,L.REASONING_MESSAGE_CONTENT),{...n,type:L.REASONING_MESSAGE_CONTENT,messageId:this.mintedContinuationId(Ak,this.currentMessageId),delta:t}}case jk:{let t=this.mintedContinuationId(jk,this.currentMessageId);return this.currentMessageId=null,this.warn(jk,L.REASONING_MESSAGE_END),{...e,type:L.REASONING_MESSAGE_END,messageId:t}}case Ok:{let t=this.mintedContinuationId(Ok,this.currentReasoningId);return this.currentReasoningId=null,this.warn(Ok,L.REASONING_END),{...e,type:L.REASONING_END,messageId:t}}case L.RUN_FINISHED:{let n=e,r=Ik(n.outcome,Nk[`RUN_FINISHED.outcome`],`RUN_FINISHED.outcome`,t);return Lk(r===n.outcome?n:{...n,outcome:r},`usage`,e=>Ik(e,Nk[`RUN_FINISHED.usage[]`],`RUN_FINISHED.usage[]`,t))}case L.MESSAGES_SNAPSHOT:{let t=e;return Array.isArray(t.messages)?{...t,messages:t.messages.map(e=>this.upgradeInboundMessage(e))}:e}case L.RUN_STARTED:{let n=zk(e.input,t),r=n===e.input?e:{...e,input:n},i=r;return!i.input||!Array.isArray(i.input.messages)?r:{...i,input:{...i.input,messages:i.input.messages.map(e=>this.upgradeInboundMessage(e))}}}default:return e}}upgradeInboundMessage(e){e=Rk(e,this.noticeNullOncePerRun);let t=e.content;return!Array.isArray(t)||!t.some(e=>typeof e==`object`&&!!e&&e.type===`binary`)?e:(this.warn(`binary input content`,`the modern media content parts`),Ek(e))}},Vk=()=>e=>bd(()=>{let t=new Bk;return e.pipe(hd(e=>t.transformEvent(e)))});function Hk(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}function Uk(){return typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS}function Wk(e){Uk()||console.warn(`[ag-ui][compat] Flattening message content for a <=0.0.39 peer DROPS non-text parts (${e.join(`, `)}). The peer cannot receive them; upgrade it to keep media content. See the repo-root DEPRECATIONS.md.`)}function Gk(e){Uk()||console.warn(`[ag-ui][compat] Not flattening message content for a <=0.0.39 peer: ${e} content part(s) claim type "text" but carry a malformed 'text' value. That is a defect in the message, not media the peer cannot represent, and a downgrade must not repair it — the content is passed on unchanged so the outgoing enforcement boundary reports it. See the repo-root DEPRECATIONS.md.`)}function Kk(e){let t=e.content;if(Array.isArray(t)){let n=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`,r=e=>n(e)&&typeof e.text==`string`,i=t.filter(e=>n(e)&&!r(e));if(i.length>0)return Gk(i.length),e;let a=t.filter(e=>!r(e)).map(e=>typeof e==`object`&&e&&`type`in e?String(e.type):typeof e);a.length>0&&Wk(a);let o=t.filter(r).map(e=>e.text).join(``);return{...e,content:o}}return typeof t==`string`?e:t===void 0?{...e,content:``}:e}var qk=class extends bk{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(Kk)};return this.runNext(i,t)}},Jk=`THINKING_START`,Yk=`THINKING_END`,Xk=`THINKING_TEXT_MESSAGE_START`,Zk=`THINKING_TEXT_MESSAGE_CONTENT`,Qk=`THINKING_TEXT_MESSAGE_END`,$k=class extends bk{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(hd(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case Jk:{this.currentReasoningId=vO();let{title:t,...n}=e;return this.warnAboutTransformation(Jk,L.REASONING_START),{...n,type:L.REASONING_START,messageId:this.currentReasoningId}}case Xk:return this.currentMessageId=vO(),this.warnAboutTransformation(Xk,L.REASONING_MESSAGE_START),{...e,type:L.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`reasoning`};case Zk:{let{delta:t,...n}=e;return this.warnAboutTransformation(Zk,L.REASONING_MESSAGE_CONTENT),{...n,type:L.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??vO(),delta:t}}case Qk:{let t=this.currentMessageId??vO();return this.warnAboutTransformation(Qk,L.REASONING_MESSAGE_END),{...e,type:L.REASONING_MESSAGE_END,messageId:t}}case Yk:{let t=this.currentReasoningId??vO();return this.warnAboutTransformation(Yk,L.REASONING_END),{...e,type:L.REASONING_END,messageId:t}}default:return e}}},eA=`SUBAGENT_STARTED`,tA=`SUBAGENT_FINISHED`,nA=`SUBAGENT_ERROR`;function rA(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function iA(e){return e.map(e=>rA(e))}var aA=class extends bk{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>rA(e))};return this.runNext(n,t).pipe(Ad(e=>{let t=e.type;(t===eA||t===tA||t===nA)&&this.warnDroppedLifecycleEvent(t)}),xd(e=>{let t=e.type;return t!==eA&&t!==tA&&t!==nA}),hd(e=>{let t=rA(e);if(t.type===L.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:iA(e.messages)}}if(t.type===L.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>rA(e))}}}if(t.type===L.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:iA(e.input.messages)}}}return t}))}},oA=`1.0.2`,sA=!1,cA=new WeakSet,lA=(e,t)=>/^\d+\.\d+$/.test(e)?LT(e,t)>0?`newer`:`not-newer`:`uninterpretable`,uA=e=>{let t=e.protocolVersion;if(t!==void 0&&t!==`1.0`)switch(lA(t,`1.0`)){case`uninterpretable`:console.warn(`[ag-ui] The producer declared protocol version '${t}', which this client cannot interpret.`);return;case`newer`:console.warn(`[ag-ui] The producer speaks protocol ${t}; this client speaks 1.0. Unrecognised material will be stripped with warnings.`);return;case`not-newer`:return}},dA=class e{resolvePeerCeiling(t){if(this.resolvingPeerCeiling)return oA;let n=Object.getOwnPropertyDescriptor(this,`maxVersion`),r=Object.getOwnPropertyDescriptor(this,`maxProtocolVersion`),i=Object.getPrototypeOf(this);for(;i&&i!==e.prototype;)n??=Object.getOwnPropertyDescriptor(i,`maxVersion`),r??=Object.getOwnPropertyDescriptor(i,`maxProtocolVersion`),i=Object.getPrototypeOf(i);if(t===`maxVersion`&&n)return oA;let a=t===`maxProtocolVersion`?n:r;if(!a)return oA;this.resolvingPeerCeiling=!0;try{return a.get?a.get.call(this):a.value}finally{this.resolvingPeerCeiling=!1}}get maxProtocolVersion(){return this.resolvePeerCeiling(`maxProtocolVersion`)}get maxVersion(){return!this.resolvingPeerCeiling&&!sA&&(sA=!0,console.warn(`[ag-ui] AbstractAgent.maxVersion is deprecated — use maxProtocolVersion. Same value; the new name says whose version it is and that it is a ceiling.`)),this.resolvePeerCeiling(`maxVersion`)}get debug(){return this._debug}set debug(e){this._debug=wO(e),this._debugLogger=DO(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?DO(wO(!0)):void 0:e}resolvedCeilingDuringConstruction(){let e=this.maxProtocolVersion;if(typeof e!=`string`||!RT(e))throw new R(`maxProtocolVersion resolved to ${JSON.stringify(e)} during construction, which is not a version this client can compare. A ceiling read from an instance field is not available yet — return a literal from the getter.`);return e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.resolvingPeerCeiling=!1,this.agentId=e,this.description=t??``,this.threadId=n??Vc(),this.messages=_O(r??[]),this.state=_O(i??{}),this._debug=wO(a),this._debugLogger=DO(this._debug);let o=this.resolvedCeilingDuringConstruction();LT(o,`0.0.39`)<=0&&this.middlewares.unshift(new qk),LT(o,`0.0.45`)<=0&&this.middlewares.unshift(new $k),LT(o,`0.0.57`)<=0&&this.middlewares.unshift(new aA)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new xk(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vc();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunStartedEvent:({event:e})=>uA(e),onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];cA.add(n),await this.onInitialize(n,a),this.activeRunDetach$=new ku;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await md(vu(()=>[...this.middlewares,new Bk].reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),vk(this.debugLogger),ak(this.debugLogger),MO(this.debugLogger),e=>e.pipe(kd(this.activeRunDetach$)),e=>this.applyBeforeSourceError(n,e,a),Sd(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),Dd(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(fd(null)));let s=_O(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Kc}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vc();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunStartedEvent:({event:e})=>uA(e),onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new ku;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await md(vu(()=>bd(()=>this.connect(n)),e=>vk(this.debugLogger)(Vk()(e)),ak(this.debugLogger),MO(this.debugLogger),e=>e.pipe(kd(this.activeRunDetach$)),e=>this.applyBeforeSourceError(n,e,a),Sd(e=>(this.isRunning=!1,e instanceof Kc?Nu:this.onError(n,e,a))),Dd(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(fd(null)),{defaultValue:void 0});let s=_O(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}applyBeforeSourceError(e,t,n){return bd(()=>{let r,i=t.pipe(Sd(e=>(r={error:e},Nu)));return this.processApplyEvents(e,this.apply(e,i,n),n).pipe(Td(bd(()=>{let e=r;return e?z(()=>e.error):Nu})))})}apply(e,t,n){return AO(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(Ad(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state!==void 0&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=_O(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Vc(),...LT(this.maxProtocolVersion,oA)>=0&&{protocolVersion:`1.0`},tools:_O(e?.tools??[]),context:_O(e?.context??[]),forwardedProps:_O(e?.forwardedProps??{}),state:_O(this.state),messages:n,...e?.resume===void 0?{}:{resume:_O(e.resume)}}}async onInitialize(e,t){if(cA.has(e)&&this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new R(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let t of this.pendingInterrupts)if(Hk(t)&&(e.resume??[]).find(e=>e.interruptId===t.id)?.status!==`cancelled`)throw new R(`Interrupt ${t.id} expired at ${t.expiresAt} and can no longer be answered. Cancel it to continue the thread.`)}let n=await CO(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages.filter(e=>e.role!==`activity`),t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state!==void 0&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return dd(CO(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(hd(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await CO(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=_O(this.messages),e.state=_O(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=_O(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=_O(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=_O(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??Vc();let t=this.prepareRunAgentInput(e);return[...this.middlewares,new Bk].reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t).pipe(vk(this.debugLogger),ak(this.debugLogger),MO(this.debugLogger),GO(this.threadId,t.runId,this.agentId),e=>e.pipe(hd(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function fA(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var pA=class extends dA{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(fA(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=_O(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return BO(PO(()=>this.fetch(this.url,this.requestInit(yk(e)))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=_O(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},mA=N.createContext(void 0),hA=e=>{let t=N.useContext(mA);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},gA=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,P.jsx)(mA.Provider,{value:e,children:t})),_A={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vA=new class{#e=_A;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 yA(e){setTimeout(e,0)}var bA=typeof window>`u`||`Deno`in globalThis;function xA(){}function SA(e,t){return typeof e==`function`?e(t):e}function CA(e){return typeof e==`number`&&e>=0&&e!==1/0}function wA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function TA(e,t){return typeof e==`function`?e(t):e}function EA(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==OA(o,t.options))return!1}else if(!AA(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 DA(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(kA(t.options.mutationKey)!==kA(a))return!1}else if(!AA(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function OA(e,t){return(t?.queryKeyHashFn||kA)(e)}function kA(e){return JSON.stringify(e,(e,t)=>FA(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function AA(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)){if(t.length>e.length)return!1;for(let n=0;n500)return t;let r=PA(e)&&PA(t);if(!r&&!(FA(e)&&FA(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{vA.setTimeout(t,e)})}function RA(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:MA(e,t)}function zA(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function BA(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var VA=Symbol();function HA(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===VA?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function UA(e,t){return typeof e==`function`?e(...t):!!e}function WA(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 GA=()=>bA,KA=()=>GA(),qA=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(){}},JA=new class extends qA{#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`}},YA=yA;function XA(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=YA,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 ZA=XA(),QA=new class extends qA{#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 ej(e){return(e??`online`)!==`online`||QA.isOnline()}var tj=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function nj(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(xA);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new tj(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>JA.isFocused()&&(e.networkMode===`always`||QA.isOnline())&&e.canRun(),p=()=>ej(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(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??(KA()?0:3),a=e.retryDelay??$A,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&nf()?void 0:g(f)).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var rj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),CA(this.gcTime)&&(this.#e=vA.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(KA()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(vA.clearTimeout(this.#e),this.#e=void 0)}};function ij(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=>{WA(e,()=>t.signal,()=>n=!0)},u=HA(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?BA:zA;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?oj:aj,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:aj(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function aj(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 oj(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function sj(e,t){return t?aj(e,t)!=null:!1}function cj(e,t){return!t||!e.getPreviousPageParam?!1:oj(e,t)!=null}var lj=class extends rj{#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=fj(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=fj(this.options);e.data!==void 0&&(this.setState(dj(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=RA(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(xA).catch(xA):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=>TA(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===VA||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>TA(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:!wA(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=HA(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`?ij(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=nj({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof tj&&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 tj){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,...uj(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...dj(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),ZA.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function uj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ej(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function dj(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function fj(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 pj=class extends qA{#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),hj(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gj(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gj(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 TA(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&&!NA(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||TA(this.options.enabled,this.#t)!==TA(t.enabled,this.#t)||TA(this.options.staleTime,this.#t)!==TA(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||TA(this.options.enabled,this.#t)!==TA(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 NA(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(xA)),t}#h(e){return!KA()&&TA(this.options.enabled,this.#t)!==!1&&CA(e)}#g(){this.#b();let e=TA(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=wA(this.#r.dataUpdatedAt,e)+1;this.#u=vA.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return TA(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=vA.setInterval(()=>{(this.options.refetchIntervalInBackground||JA.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(vA.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(vA.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&&hj(e,t),o=i&&_j(e,n,t,r);(a||o)&&(l={...l,...uj(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=RA(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=RA(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:vj(e,t),refetch:this.refetch,isEnabled:TA(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),NA(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)})})();ZA.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 mj(e,t){return TA(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||TA(t.retryOnMount,e)!==!1)}function hj(e,t){return mj(e,t)||e.state.data!==void 0&&gj(e,t,t.refetchOnMount)}function gj(e,t,n){if(TA(t.enabled,e)!==!1&&TA(t.staleTime,e)!==`static`){let r=TA(n,e);return r===`always`||r!==!1&&vj(e,t)}return!1}function _j(e,t,n,r){return(e!==t||TA(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&vj(e,n)}function vj(e,t){return TA(t.enabled,e)!==!1&&e.isStaleByTime(TA(t.staleTime,e))}var yj=class extends pj{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:sj(t,n.data),hasPreviousPage:cj(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},bj=class extends rj{#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||xj(),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=nj({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),ZA.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function xj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Sj=class extends qA{#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 bj({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=Cj(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=Cj(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=Cj(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=Cj(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ZA.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=>DA(t,e))}findAll(e={}){return this.getAll().filter(t=>DA(e,t))}notify(e){ZA.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ZA.batch(()=>Promise.all(e.map(e=>e.continue().catch(xA))))}};function Cj(e){return e.options.scope?.id}var wj=class extends qA{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??OA(r,t),a=this.get(i);return a||(a=new lj({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){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ZA.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=>EA(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>EA(e,t)):t}notify(e){ZA.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ZA.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ZA.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Tj=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new wj,this.#t=e.mutationCache||new Sj,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=JA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=QA.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(TA(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=SA(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ZA.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;ZA.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ZA.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=ZA.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(xA).catch(xA)}invalidateQueries(e,t={}){return ZA.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=ZA.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(xA)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(xA)}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(TA(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(TA(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xA).catch(xA)}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(xA).catch(xA)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return QA.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(kA(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{AA(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(kA(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{AA(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||=OA(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===VA&&(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()}},Ej=N.createContext(!1),Dj=()=>N.useContext(Ej);Ej.Provider;function Oj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kj=N.createContext(Oj()),Aj=()=>N.useContext(kj),jj=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?UA(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Mj=e=>{N.useEffect(()=>{e.clearReset()},[e])},Nj=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||UA(n,[e.error,r])),Pj=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Fj=(e,t)=>e?.suspense&&t.isPending,Ij=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Lj(e,t,n){let r=Dj(),i=Aj(),a=hA(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Pj(o),jj(o,i,s),Mj(i);let[l]=N.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(N.useSyncExternalStore(N.useCallback(e=>{let t=d?l.subscribe(ZA.batchCalls(e)):xA;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),N.useEffect(()=>{l.setOptions(o)},[o,l]),Fj(o,u))throw Ij(o,l,i);if(Nj({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Rj(e,t){return Lj(e,pj,t)}function zj(e,t){return Lj(e,yj,t)}var Bj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M112,56V200L40,128Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z`}))]]),Vj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),Hj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z`}))]]),Uj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]]),Wj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),Gj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),Kj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),qj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),Jj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),Yj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),Xj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z`}))]]),Zj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),Qj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),$j=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M256,136a12,12,0,0,1-12,12h-8v8a12,12,0,0,1-24,0v-8h-8a12,12,0,0,1,0-24h8v-8a12,12,0,0,1,24,0v8h8A12,12,0,0,1,256,136Zm-54.81,56.28a12,12,0,1,1-18.38,15.44C169.12,191.42,145,172,108,172c-28.89,0-55.46,12.68-74.81,35.72a12,12,0,0,1-18.38-15.44A124.08,124.08,0,0,1,63.5,156.53a72,72,0,1,1,89,0A124,124,0,0,1,201.19,192.28ZM108,148a48,48,0,1,0-48-48A48.05,48.05,0,0,0,108,148Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M168,100a60,60,0,1,1-60-60A60,60,0,0,1,168,100Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136ZM144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17A8,8,0,0,0,24,208H192a8,8,0,0,0,6.13-13.15C183.18,177.07,164.6,164.44,144,157.68Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M254,136a6,6,0,0,1-6,6H230v18a6,6,0,0,1-12,0V142H200a6,6,0,0,1,0-12h18V112a6,6,0,0,1,12,0v18h18A6,6,0,0,1,254,136Zm-57.41,60.14a6,6,0,1,1-9.18,7.72C166.9,179.45,138.69,166,108,166s-58.89,13.45-79.41,37.86a6,6,0,0,1-9.18-7.72C35.14,177.41,55,164.48,77,158.25a66,66,0,1,1,62,0C161,164.48,180.86,177.41,196.59,196.14ZM108,154a54,54,0,1,0-54-54A54.06,54.06,0,0,0,108,154Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M252,136a4,4,0,0,1-4,4H228v20a4,4,0,0,1-8,0V140H200a4,4,0,0,1,0-8h20V112a4,4,0,0,1,8,0v20h20A4,4,0,0,1,252,136Zm-56.94,61.43a4,4,0,0,1-6.12,5.14C168,177.7,139.3,164,108,164s-60,13.7-80.94,38.57a4,4,0,1,1-6.12-5.14c16.71-19.9,38.13-33.13,61.89-38.59a64,64,0,1,1,50.34,0C156.93,164.3,178.35,177.53,195.06,197.43ZM108,156a56,56,0,1,0-56-56A56.06,56.06,0,0,0,108,156Z`}))]]),eM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Bj}));eM.displayName=`ArrowLeftIcon`;var tM=eM,nM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Vj}));nM.displayName=`ArrowRightIcon`;var rM=nM,iM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Hj}));iM.displayName=`BookOpenIcon`;var aM=iM,oM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Uj}));oM.displayName=`DotsThreeIcon`;var sM=oM,cM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Wj}));cM.displayName=`MagnifyingGlassIcon`;var lM=cM,uM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Gj}));uM.displayName=`MoonIcon`;var dM=uM,fM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Kj}));fM.displayName=`PencilSimpleIcon`;var pM=fM,mM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:qj}));mM.displayName=`PlugsConnectedIcon`;var hM=mM,gM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Jj}));gM.displayName=`PlusIcon`;var _M=gM,vM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Yj}));vM.displayName=`SignOutIcon`;var yM=vM,bM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Xj}));bM.displayName=`SparkleIcon`;var xM=bM,SM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Zj}));SM.displayName=`SunIcon`;var CM=SM,wM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Qj}));wM.displayName=`TrashIcon`;var TM=wM,EM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:$j}));EM.displayName=`UserPlusIcon`;var DM=EM,OM=class extends Error{status;problems;code;constructor(e,t,n=[],r=``){super(e),this.status=t,this.problems=n,this.code=r}},kM=`fanout:unauthorized`;function AM(){let e=new URLSearchParams(window.location.search).get(`return_to`);if(!e)return``;let t=new URL(e,window.location.origin);return t.origin!==window.location.origin||t.pathname!==`/api/auth/oauth/authorize`?``:`${t.pathname}${t.search}`}function jM(e){return!e||typeof e!=`object`||!(`id`in e)||typeof e.id!=`string`||e.id===``?`none`:`user`}function MM(){window.dispatchEvent(new Event(kM))}async function NM(e,t={}){let n=new Headers(t.headers);n.set(`Fanout-Request`,`1`);let r=await fetch(e,{...t,headers:n,credentials:`same-origin`});if(r.status===401&&MM(),r.status===403){let e=await r.clone().json().catch(()=>({}));throw new OM(e.message??`You do not have permission to perform this action.`,r.status,[],e.code??``)}return r}async function PM(){let e=await NM(`/api/auth/logout`,{method:`POST`});if(!e.ok&&e.status!==401)throw Error(`Sign-out failed — your session is still active.`);e.status!==401&&MM(),window.location.assign(`/`)}var FM=(0,N.createContext)(null);function IM(){let e=(0,N.useContext)(FM);if(!e)throw Error(`Fanout runtime status is unavailable`);return e}var LM=(0,N.createContext)(null);function RM(){let e=(0,N.useContext)(LM);if(!e)throw Error(`Fanout viewer is unavailable`);return e}function zM(e){if(!e||typeof e!=`object`)return null;let t=e;return typeof t.id!=`string`||t.id===``||t.status!==`active`&&t.status!==`suspended`?null:{id:t.id,email:typeof t.email==`string`?t.email:``,display_name:typeof t.display_name==`string`?t.display_name:``,status:t.status,role:typeof t.role==`string`?t.role:``}}async function BM(e,t){let n=await fetch(e,{method:t===void 0?`GET`:`POST`,headers:t===void 0?void 0:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.message??`Request failed (${n.status})`);return r}function VM({children:e,wide:t=!1}){return(0,P.jsx)(u,{mih:`100dvh`,style:{background:`radial-gradient(circle at 50% -12%, var(--mantine-color-brand-light), transparent 38%), linear-gradient(180deg, var(--mantine-color-default-hover), var(--mantine-color-body) 62%)`},children:(0,P.jsx)(ke,{mih:`100dvh`,px:`md`,py:48,children:(0,P.jsx)(_e,{size:t?680:480,w:`100%`,children:(0,P.jsx)(Ne,{radius:28,p:{base:24,sm:40},style:{background:`var(--mantine-color-body)`,border:`1px solid var(--mantine-color-default-border)`,boxShadow:`var(--mantine-shadow-xl)`},children:e})})})})}function HM(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`setup_token`)??``}function UM(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`login_token`)??``}function WM({children:e}){let t=Le(),[n,r]=(0,N.useState)(null),[i,a]=(0,N.useState)(!1),[o,s]=(0,N.useState)(`none`),[c,l]=(0,N.useState)(null),[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(``),[_,v]=(0,N.useState)(HM),[y,b]=(0,N.useState)(UM),[x,S]=(0,N.useState)(``),[C,w]=(0,N.useState)(!1),[T,ee]=(0,N.useState)(0),[E,D]=(0,N.useState)(()=>Date.now()),[O,te]=(0,N.useState)(!1),[re,k]=(0,N.useState)(``),[ie,ae]=(0,N.useState)(null),[oe,ce]=(0,N.useState)(!1),ue=(0,N.useRef)(null),de=AM(),fe=o===`user`;async function me(){let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok){s(`none`),l(null);return}let t=await e.json().catch(()=>null);s(jM(t)),l(zM(t))}async function he(){try{let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok)return;l(zM(await e.json().catch(()=>null)))}catch{}}(0,N.useEffect)(()=>{let e=new URL(window.location.href);(e.searchParams.has(`setup_token`)||e.searchParams.has(`login_token`))&&(e.searchParams.delete(`setup_token`),e.searchParams.delete(`login_token`),t({href:e.pathname+e.search+e.hash,replace:!0}))},[t]),(0,N.useEffect)(()=>{BM(`/api/auth/status`).then(r).catch(e=>k(String(e))).finally(()=>a(!0)),me().catch(()=>s(`none`)).finally(()=>f(!0));let e=()=>{s(`none`),l(null)};return window.addEventListener(kM,e),()=>window.removeEventListener(kM,e)},[]),(0,N.useEffect)(()=>{d&&o===`none`&&y&&(te(!0),k(``),BM(`/api/auth/link/verify`,{token:y}).then(()=>{s(`user`),he()}).catch(e=>k(e instanceof Error?e.message:String(e))).finally(()=>{b(``),te(!1)}))},[y,d,o]),(0,N.useEffect)(()=>{fe&&d&&de&&window.location.replace(de)},[fe,de,d]),(0,N.useEffect)(()=>{if(T<=Date.now())return;let e=setInterval(()=>{D(Date.now()),Date.now()>=T&&clearInterval(e)},1e3);return()=>clearInterval(e)},[T]);let ge=Math.max(0,Math.ceil((T-E)/1e3));(0,N.useEffect)(()=>{C&&!O&&re&&ue.current?.querySelector(`input`)?.focus()},[O,C,re]);async function _e(e){try{await navigator.clipboard.writeText(e),ce(!0)}catch{k(`Clipboard access failed. Select and copy the token manually.`)}}if(ie?.ingest_token)return(0,P.jsx)(VM,{wide:!0,children:(0,P.jsxs)(A,{gap:`lg`,children:[(0,P.jsx)(De,{}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(le,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Setup complete`}),(0,P.jsx)(be,{order:1,mt:`xs`,fz:{base:28,sm:32},lh:1.08,children:`Save your ingest token`})]}),(0,P.jsx)(le,{c:`dimmed`,children:`Fanout shows this token once. Store it with your collector secrets before continuing.`}),(0,P.jsxs)(A,{gap:`xs`,children:[(0,P.jsx)(le,{size:`sm`,fw:600,children:`OTLP endpoint`}),(0,P.jsx)(rs,{block:!0,children:ie.suggested_endpoint??window.location.origin})]}),(0,P.jsxs)(A,{gap:`xs`,children:[(0,P.jsx)(le,{size:`sm`,fw:600,children:`Header`}),(0,P.jsxs)(rs,{block:!0,children:[ie.ingest_header_name??`Authorization`,`: Bearer `,ie.ingest_token]})]}),re&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re}),(0,P.jsxs)(ne,{grow:!0,align:`stretch`,children:[(0,P.jsx)(se,{variant:`light`,radius:`md`,leftSection:oe?(0,P.jsx)(pe,{size:16,weight:`bold`}):(0,P.jsx)(we,{size:16}),onClick:()=>void _e(`${ie.ingest_header_name??`Authorization`}: Bearer ${ie.ingest_token}`),children:oe?`Copied`:`Copy header`}),(0,P.jsx)(se,{radius:`md`,rightSection:(0,P.jsx)(rM,{size:16,weight:`bold`}),onClick:()=>{s(`user`),ae(null),he()},children:`Continue to Fanout`})]}),(0,P.jsx)(se,{variant:`subtle`,size:`compact-xs`,onClick:()=>void _e(ie.ingest_token??``),children:`Copy token only`})]})});if(!d||!i||y)return(0,P.jsx)(ke,{mih:`100dvh`,children:(0,P.jsx)(Pe,{size:`sm`})});if(!n)return(0,P.jsx)(VM,{children:(0,P.jsxs)(A,{gap:`lg`,children:[(0,P.jsx)(De,{}),(0,P.jsx)(be,{order:1,children:`Fanout is unavailable`}),(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re||`Authentication status could not be loaded.`})]})});if(fe&&de)return null;if(fe)return(0,P.jsx)(FM.Provider,{value:n,children:(0,P.jsx)(LM.Provider,{value:c??{id:``,email:p,display_name:h,status:`active`,role:``},children:e})});if(n&&!n.setup_required&&n.auth_mode===`oidc`){let e=de?`/api/auth/oidc/start?return_to=${encodeURIComponent(de)}`:`/api/auth/oidc/start`;return(0,P.jsx)(VM,{children:(0,P.jsxs)(A,{gap:28,children:[(0,P.jsx)(De,{}),(0,P.jsxs)(A,{gap:10,children:[(0,P.jsx)(le,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Secure workspace`}),(0,P.jsx)(be,{order:1,fz:{base:28,sm:32},lh:1.08,children:`Sign in`}),(0,P.jsx)(le,{c:`dimmed`,size:`md`,lh:1.6,children:`Use your organization's identity provider to continue.`})]}),re&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re}),(0,P.jsx)(se,{component:`a`,href:e,size:`md`,radius:`md`,rightSection:(0,P.jsx)(rM,{size:17,weight:`bold`}),children:`Continue with SSO`})]})})}async function ve(){te(!0),k(``);try{await BM(`/api/auth/code/send`,{email:p}),w(!0),S(``),ee(Date.now()+3e4),D(Date.now())}catch(e){k(e instanceof Error?e.message:String(e))}finally{te(!1)}}async function j(e){te(!0),k(``);try{await BM(`/api/auth/code/verify`,{email:p,code:e}),s(`user`),w(!1),S(``),ee(0),he()}catch(e){S(``),k(e instanceof Error?e.message:String(e))}finally{te(!1)}}function M(){w(!1),S(``),k(``)}async function ye(e){e.preventDefault(),te(!0),k(``);try{if(n?.setup_required){let e=await BM(`/api/auth/setup`,{email:p,display_name:h,setup_token:_});e.ingest_token?ae(e):(s(`user`),he())}else if(C){await j(x);return}else{await ve();return}}catch(e){k(e instanceof Error?e.message:String(e))}finally{te(!1)}}let Se=C&&!n?.setup_required,Ce=n?.setup_required?`Create the first admin`:Se?`Check your email`:n?.self_signup?`Sign in or create an account`:`Sign in`,Te=n?.setup_required?`Use the one-time token printed by the Fanout process.`:n?.smtp_configured?Se?`We sent a code to ${p}.`:n?.self_signup?`Enter your email to sign in or create a viewer account. No password needed.`:`Enter your email and we’ll send a short verification code. No password needed.`:`Email delivery is not configured. Ask the operator to run fanout login-link with your email address.`;return(0,P.jsx)(VM,{children:(0,P.jsxs)(A,{gap:28,children:[(0,P.jsx)(De,{}),(0,P.jsxs)(A,{gap:10,children:[(0,P.jsx)(le,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:n?.setup_required?`One-time setup`:`Secure workspace`}),(0,P.jsx)(be,{order:1,fz:{base:28,sm:32},lh:1.08,children:Ce}),Te&&(0,P.jsx)(le,{c:`dimmed`,size:`md`,lh:1.6,maw:390,children:Te})]}),(0,P.jsx)(`form`,{onSubmit:ye,children:(0,P.jsxs)(A,{gap:`md`,children:[(0,P.jsx)(Pc,{label:`Email`,placeholder:`you@company.com`,type:`email`,required:!0,value:p,onChange:e=>m(e.currentTarget.value),disabled:C,variant:`filled`,radius:`md`,size:`md`,autoFocus:!C}),n?.setup_required&&(0,P.jsx)(Pc,{label:`Display name`,placeholder:`Your display name`,value:h,onChange:e=>g(e.currentTarget.value),variant:`filled`,radius:`md`,size:`md`}),n?.setup_required&&(0,P.jsx)(Pc,{label:`Setup token`,placeholder:`from the setup URL printed at startup`,required:!0,value:_,onChange:e=>v(e.currentTarget.value),autoComplete:`one-time-code`,variant:`filled`,radius:`md`,size:`md`}),Se&&(0,P.jsxs)(A,{gap:`xs`,children:[(0,P.jsx)(le,{size:`sm`,fw:600,children:`Verification code`}),(0,P.jsx)(u,{ref:ue,children:(0,P.jsx)(Nc,{length:6,type:`number`,oneTimeCode:!0,autoFocus:!0,value:x,onChange:S,onComplete:e=>void j(e),disabled:O,error:!!re,size:`md`,radius:`md`,"aria-label":`Verification code`,getInputProps:e=>({"aria-label":`Digit ${e+1}`})})}),(0,P.jsxs)(ne,{justify:`space-between`,gap:`xs`,children:[(0,P.jsxs)(le,{c:`dimmed`,size:`xs`,children:[`Sent to `,p]}),(0,P.jsx)(se,{variant:`subtle`,size:`compact-xs`,leftSection:(0,P.jsx)(tM,{size:12,weight:`bold`}),onClick:M,disabled:O,children:`Change email`})]}),(0,P.jsxs)(ne,{justify:`space-between`,gap:`xs`,children:[(0,P.jsx)(le,{c:`dimmed`,size:`xs`,children:`Codes expire in 5 minutes`}),(0,P.jsx)(se,{variant:`subtle`,size:`compact-xs`,onClick:()=>void ve(),disabled:O||ge>0,children:ge>0?`Resend in ${ge}s`:`Resend code`})]})]}),re&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re}),Se?(0,P.jsx)(se,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:O,disabled:O||x.length<6,rightSection:(0,P.jsx)(rM,{size:17,weight:`bold`}),children:`Verify code`}):(0,P.jsx)(se,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:O,disabled:!n||!n.setup_required&&!n.smtp_configured,leftSection:n?.setup_required?(0,P.jsx)(DM,{size:17,weight:`bold`}):void 0,rightSection:n?.setup_required?void 0:(0,P.jsx)(rM,{size:17,weight:`bold`}),children:n?.setup_required?`Create admin`:`Send code`})]})})]})})}var GM=[`agent-threads`];async function KM(e){let t=await NM(e);if(!t.ok)throw Error(`Request failed (${t.status})`);return t.json()}var qM=[];for(let e=0;e<256;++e)qM.push((e+256).toString(16).slice(1));function JM(e,t=0){return(qM[e[t+0]]+qM[e[t+1]]+qM[e[t+2]]+qM[e[t+3]]+`-`+qM[e[t+4]]+qM[e[t+5]]+`-`+qM[e[t+6]]+qM[e[t+7]]+`-`+qM[e[t+8]]+qM[e[t+9]]+`-`+qM[e[t+10]]+qM[e[t+11]]+qM[e[t+12]]+qM[e[t+13]]+qM[e[t+14]]+qM[e[t+15]]).toLowerCase()}var YM=new Uint8Array(16);function XM(){return crypto.getRandomValues(YM)}var ZM={};function QM(e,t,n){let r;if(e)r=eN(e.random??e.rng?.()??XM(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=XM();$M(ZM,e,i),r=eN(i,ZM.msecs,ZM.seq,t,n)}return t??JM(r)}function $M(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=tN(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function eN(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=tN(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function tN(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function nN(){return QM()}var rN=[`dashboards`],iN=3e4;async function aN(e,t){let{json:n,...r}=t??{},i=new Headers(r.headers),a=r.body;n!==void 0&&(i.set(`content-type`,`application/json`),a=JSON.stringify(n));let o=await NM(e,{...r,headers:i,body:a}),s=await o.json().catch(()=>({}));if(!o.ok)throw new OM(s.message??`Request failed (${o.status})`,o.status,s.problems??[],s.code??``);return s}var oN=e=>`/api/dashboards/${encodeURIComponent(e)}`,sN=()=>aN(`/api/dashboards`).then(e=>e.dashboards),cN=(e,t)=>aN(oN(e),{signal:t}),lN=(e,t)=>aN(`${oN(e)}/versions`,{signal:t}).then(e=>e.versions),uN=(e,t,n)=>aN(`${oN(e)}/versions/${t}`,{signal:n}),dN=(e,t)=>aN(`${oN(e)}/versions/${t}/restore`,{method:`POST`}),fN=(e,t,n,r)=>aN(oN(e),{method:`PUT`,json:{spec:t,base_version:n,message:r}}),pN=(e,t,n,r)=>aN(oN(e),{method:`PATCH`,json:{operations:t,base_version:n,message:r}}),mN=(e,t)=>aN(`/api/panels/query`,{method:`POST`,json:e,signal:t}).then(e=>e.results),hN=(e,t)=>aN(`/api/annotations`,{method:`POST`,json:e,signal:t}),gN=(e,t)=>aN(`/api/panels/variables/resolve`,{method:`POST`,json:e,signal:t}).then(e=>e.options),_N=(e,t)=>aN(`/api/panels/exemplars`,{method:`POST`,json:e,signal:t});function vN(e,t){let n=new URLSearchParams({namespace:e.namespace??``,from:e.window_from,to:e.window_to,limit:`200`});return aN(`/api/traces/${encodeURIComponent(e.trace_id??``)}?${n}`,{signal:t})}function yN(){let{setColorScheme:e}=Br(),t=Ur(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`,[r,i]=(0,N.useState)(!1);return(0,P.jsx)(Ot,{label:`Switch to ${n} theme`,opened:r,children:(0,P.jsx)(Ze,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),onClick:()=>{i(!1),e(n)},children:t===`dark`?(0,P.jsx)(CM,{size:17,weight:`bold`}):(0,P.jsx)(dM,{size:17,weight:`bold`})})})}var bN={home:`https://fanout.run/start/what-fanout-is`,ingest:`https://fanout.run/start/send-telemetry`};async function xN(e,t){let n=new URLSearchParams({page_size:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await NM(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function SN({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=hA(),[f,p]=(0,N.useState)(``),[m]=pr(f.trim(),250),[h,g]=(0,N.useState)(null),[_,v]=(0,N.useState)(null),[y,b]=(0,N.useState)(``),[x,S]=(0,N.useState)(``),[w,T]=(0,N.useState)(!1),ee=(0,N.useRef)(null);(0,N.useImperativeHandle)(u,()=>({focusSearch:()=>ee.current?.focus()}),[]),(0,N.useEffect)(()=>{r&&requestAnimationFrame(()=>ee.current?.focus())},[r]);let E=zj({queryKey:[...GM,m],queryFn:({pageParam:e})=>xN(m,e),initialPageParam:``,getNextPageParam:e=>e.next_cursor??void 0,enabled:e}),D=Rj({queryKey:rN,queryFn:sN,refetchInterval:3e4,staleTime:iN}),O=(0,N.useMemo)(()=>E.data?.pages.flatMap(e=>e.items)??[],[E.data]),te=(0,N.useMemo)(()=>ON(O),[O]),re=Rj({queryKey:[`telemetry-schema`,`1h`],queryFn:()=>KM(`/api/telemetry/schema?window=1h`),enabled:!!m&&!!l,staleTime:6e4}),k=(0,N.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(re.data?.services??[]).map(e=>e.value).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[re.data,m]),ie=(0,N.useMemo)(()=>{let e=D.data??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[D.data,m]);function ae(e){S(``),b(e.title),g(e)}async function oe(){if(h&&y.trim()){T(!0),S(``);try{let e=await NM(`/api/agent/threads/${encodeURIComponent(h.id)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:y.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:GM}),g(null)}catch(e){S(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{T(!1)}}}async function ce(){if(_){T(!0),S(``);try{let e=await NM(`/api/agent/threads/${encodeURIComponent(_.id)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=_.id;v(null),await d.invalidateQueries({queryKey:GM}),await d.invalidateQueries({queryKey:rN}),o(t)}catch(e){S(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{T(!1)}}}return(0,P.jsxs)(A,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,P.jsx)(se,{leftSection:(0,P.jsx)(_M,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,P.jsx)(wt,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,P.jsxs)(A,{gap:`lg`,pb:`sm`,children:[e&&(0,P.jsxs)(A,{gap:4,children:[(0,P.jsx)(CN,{children:`Chats`}),E.isLoading&&(0,P.jsx)(ke,{py:`md`,children:(0,P.jsx)(Pe,{size:`xs`})}),E.isError&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!E.isLoading&&!E.isError&&O.length===0&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),te.map(e=>(0,P.jsxs)(A,{gap:2,children:[te.length>1&&(0,P.jsx)(le,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,P.jsx)(wN,{thread:e,active:e.id===t,onSelect:()=>a(e.id),onRename:()=>ae(e),onDelete:()=>{S(``),v(e)}},e.id))]},e.label)),E.hasNextPage&&(0,P.jsx)(se,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:E.isFetchingNextPage,onClick:()=>void E.fetchNextPage(),children:`See all`})]}),m&&l&&re.isLoading&&(0,P.jsx)(ke,{py:`md`,children:(0,P.jsx)(Pe,{size:`xs`})}),m&&l&&(re.isSuccess||re.isError)&&(0,P.jsxs)(A,{gap:4,children:[(0,P.jsx)(CN,{children:`Services`}),re.isError&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,children:`Services could not be searched`}),re.isSuccess&&k.length===0&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,children:`No matching services`}),k.map(e=>(0,P.jsx)(C,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,P.jsx)(le,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,P.jsxs)(A,{gap:4,children:[(0,P.jsx)(CN,{children:`Dashboards`}),D.isLoading&&(0,P.jsx)(ke,{py:`md`,children:(0,P.jsx)(Pe,{size:`xs`})}),D.isError&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!D.isLoading&&!D.isError&&m&&ie.length===0&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),ie.map(e=>{let t=e.id===n;return(0,P.jsxs)(A,{gap:0,children:[(0,P.jsx)(C,{component:`a`,href:`/dashboards/${encodeURIComponent(e.id)}`,className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:t=>{t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),s(e.id))},children:(0,P.jsxs)(ne,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,P.jsx)(le,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,P.jsx)(tt,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})}),e.origin&&(0,P.jsx)(C,{component:`a`,href:`/chat/${encodeURIComponent(e.origin.thread_id)}`,"data-request-provenance":!0,px:`sm`,pb:`xs`,onClick:t=>{t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),a(e.origin.thread_id))},children:(0,P.jsxs)(le,{size:`xs`,c:`dimmed`,lineClamp:2,children:[`Built from: `,e.origin.request_excerpt]})})]},e.id)}),e&&(0,P.jsx)(se,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,P.jsx)(xM,{size:14,weight:`fill`}),onClick:c,children:D.data?.length===0?`New dashboard`:`Create with AI`})]})]})}),(0,P.jsx)(Pc,{ref:ee,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,P.jsx)(lM,{size:15}),rightSection:(0,P.jsx)(Es,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,P.jsx)(Dc,{opened:h!==null,onClose:()=>!w&&g(null),title:`Rename chat`,centered:!0,children:(0,P.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),oe()},children:(0,P.jsxs)(A,{children:[(0,P.jsx)(Pc,{label:`Name`,value:y,onChange:e=>b(e.currentTarget.value),maxLength:120,autoFocus:!0}),x&&(0,P.jsx)(xe,{color:`bad`,children:x}),(0,P.jsxs)(ne,{justify:`flex-end`,children:[(0,P.jsx)(se,{variant:`default`,onClick:()=>g(null),disabled:w,children:`Cancel`}),(0,P.jsx)(se,{type:`submit`,loading:w,disabled:!y.trim(),children:`Save`})]})]})})}),(0,P.jsx)(Dc,{opened:_!==null,onClose:()=>!w&&v(null),title:`Delete chat?`,centered:!0,children:(0,P.jsxs)(A,{children:[(0,P.jsxs)(le,{size:`sm`,children:[`This permanently removes `,(0,P.jsx)(le,{span:!0,fw:650,children:_?.title}),` and its saved messages.`]}),x&&(0,P.jsx)(xe,{color:`bad`,children:x}),(0,P.jsxs)(ne,{justify:`flex-end`,children:[(0,P.jsx)(se,{variant:`default`,onClick:()=>v(null),disabled:w,children:`Cancel`}),(0,P.jsx)(se,{color:`bad`,loading:w,onClick:()=>void ce(),children:`Delete`})]})]})})]})}function CN({children:e}){return(0,P.jsx)(le,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function wN({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,P.jsx)(u,{"data-active":t||void 0,className:`rail-row`,children:(0,P.jsxs)(ne,{gap:2,wrap:`nowrap`,children:[(0,P.jsx)(C,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,P.jsxs)(A,{gap:0,children:[(0,P.jsx)(le,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,P.jsx)(le,{c:`dimmed`,size:`xs`,children:kN(e.updated_at)})]})}),(0,P.jsxs)(dc,{position:`bottom-end`,withinPortal:!0,children:[(0,P.jsx)(dc.Target,{children:(0,P.jsx)(Ze,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,P.jsx)(sM,{size:18,weight:`bold`})})}),(0,P.jsxs)(dc.Dropdown,{children:[(0,P.jsx)(dc.Item,{leftSection:(0,P.jsx)(pM,{size:15}),onClick:r,children:`Rename`}),(0,P.jsx)(dc.Item,{color:`bad`,leftSection:(0,P.jsx)(TM,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function TN(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function EN(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var DN=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function ON(e){let t=EN(new Date),n=new Map;for(let r of e){let e=Math.floor((t-EN(TN(r.updated_at)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return DN.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function kN(e){let t=TN(e),n=EN(new Date);return Math.floor((n-EN(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function AN({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=it(),s=Le(),c=Xn({select:e=>e.location.pathname}),{dashboardId:l}=Sn({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=Dr(!1),[p,m]=(0,N.useState)(!1),[h,g]=(0,N.useState)(``),_=(0,N.useRef)(null),v=ie(`(max-width: 62em)`),y=(0,N.useRef)(v);y.current=v,(0,N.useEffect)(()=>{f.close()},[c]),(0,N.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{}}),onCreateDashboard:()=>o(Qe),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,P.jsxs)(Bo,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,P.jsx)(Bo.Header,{children:(0,P.jsxs)(ne,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,P.jsxs)(ne,{gap:`sm`,wrap:`nowrap`,children:[(0,P.jsx)(es,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,P.jsx)(De,{size:`small`})]}),(0,P.jsxs)(ne,{gap:`xs`,wrap:`nowrap`,children:[(0,P.jsx)(Ot,{label:`Documentation`,children:(0,P.jsx)(Ze,{component:`a`,href:bN.home,target:`_blank`,rel:`noopener noreferrer`,variant:`subtle`,color:`gray`,"aria-label":`Documentation`,children:(0,P.jsx)(aM,{size:17,weight:`bold`})})}),(0,P.jsx)(yN,{}),(0,P.jsx)(jN,{onError:g})]})]})}),(0,P.jsx)(Bo.Navbar,{p:`sm`,children:(0,P.jsx)(SN,{ref:_,...b})}),(0,P.jsx)(Cs,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,P.jsx)(De,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,P.jsx)(SN,{...b,autoFocusSearch:d&&p})}),(0,P.jsxs)(Bo.Main,{children:[h&&(0,P.jsx)(xe,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function jN({onError:e}){let t=Le(),n=RM(),r=(n.display_name.trim()||n.email.trim()||`?`).charAt(0).toUpperCase();return(0,P.jsxs)(dc,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,P.jsx)(dc.Target,{children:(0,P.jsx)(Ze,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`${r} account menu`,children:(0,P.jsx)(Zo,{size:26,radius:`xl`,color:`brand`,children:r})})}),(0,P.jsxs)(dc.Dropdown,{children:[(0,P.jsx)(dc.Label,{children:n.email||`Signed in`}),(0,P.jsx)(dc.Item,{leftSection:(0,P.jsx)(hM,{size:15}),onClick:()=>void t({to:`/settings`}),children:`Connect telemetry`}),(0,P.jsx)(dc.Divider,{}),(0,P.jsx)(dc.Item,{leftSection:(0,P.jsx)(yM,{size:15}),onClick:()=>void PM().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function MN(){let{agent_available:e}=IM(),t=Le(),n=hA(),{threadId:r}=Sn({strict:!1}),[i,a]=(0,N.useState)(nN),o=(0,N.useRef)(new Set),s=r??i,[c,l]=(0,N.useState)([]),[u,d]=(0,N.useState)({}),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(!1),[v,y]=(0,N.useState)(``),[b,x]=(0,N.useState)(null),S=(0,N.useRef)(null),[C,w]=(0,N.useState)(!1),T=(0,N.useRef)(!1),[ee,E]=(0,N.useState)(``),[D,O]=(0,N.useState)(``),[te,ne]=(0,N.useState)(0),re=(0,N.useRef)(null),k=(0,N.useRef)({}),ie=(0,N.useRef)(null),ae=(0,N.useRef)(new Map),A=(0,N.useMemo)(()=>new pA({url:`/api/agent/runs`,threadId:s,fetch:(e,t)=>NM(e,t)}),[s]),oe=!e||f===s;function se(){ae.current.clear(),y(``),S.current=null,x(null)}let ce=e=>e.filter(e=>e.role!==`reasoning`);function le(){let e=S.current?.text.split(/(?<=[.!?])\s/)[0]?.trim().replace(/[.!?]+$/,``);return e?e+`…`:``}function ue(e){return T.current||e instanceof Error&&e.name===`AbortError`}(0,N.useEffect)(()=>{let t=!0;if(l([]),k.current={},d({}),p(``),h(!1),_(!1),T.current=!1,w(!1),se(),O(``),!e){p(s);return}!r||o.current.has(s)?(A.setMessages([]),p(s)):NM(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}A.setMessages(ce(e.messages??[])),l(ce(e.messages??[])),p(s)}}).catch(()=>{t&&(re.current=null,O(`This chat could not be restored. Start a new chat or try again.`))});let i=A.subscribe({onEvent:({event:e,messages:t})=>{switch(e.type){case`REASONING_MESSAGE_START`:return S.current={id:e.messageId,text:``,collapsed:!1},x(S.current),y(``),{stopPropagation:!0};case`REASONING_MESSAGE_CONTENT`:{let t=e,n={id:t.messageId,text:(S.current?.text??``)+t.delta,collapsed:!1};return S.current=n,x(n),{stopPropagation:!0}}case`REASONING_START`:case`REASONING_MESSAGE_END`:case`REASONING_END`:return{stopPropagation:!0};default:l(ce(t))}},onMessagesChanged:({messages:e})=>l(ce(e)),onRunInitialized:()=>{T.current=!1,w(!1),_(!0),O(``)},onTextMessageContentEvent:({event:e})=>{e.delta&&(S.current=null,x(null),y(``))},onToolCallStartEvent:({event:e})=>{ae.current.set(e.toolCallId,rt(e.toolCallName)),y(rt(e.toolCallName)),S.current&&(S.current={...S.current,collapsed:!0},x(S.current))},onToolCallResultEvent:({event:e,messages:t})=>{ae.current.delete(e.toolCallId),y([...ae.current.values()].at(-1)??le());let r=ot(e.toolCallId,e.content,t);r&&(n.invalidateQueries({queryKey:rN}),n.invalidateQueries({queryKey:[`dashboard`,r.id]}),n.invalidateQueries({queryKey:[`dashboard-versions`,r.id]}))},onRunErrorEvent:({event:e})=>{e.code===`abort`||T.current?(O(``),w(!0)):(console.warn(`Agent run error`,e.code),O(Je(e.code))),_(!1),se()},onRunFinalized:({messages:e})=>{let t=ce(e);l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),se(),o.current.delete(s),n.invalidateQueries({queryKey:GM})},onRunFailed:e=>{ue(e.error)?(O(``),w(!0)):(console.error(`Agent run failed`,e),O(Je())),_(!1),se(),o.current.delete(s),n.invalidateQueries({queryKey:GM})}});return()=>{t=!1,i.unsubscribe(),A.abortRun()}},[A,e,n,te,s]),(0,N.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>ie.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>ie.current?.focus()))),e.key===`Escape`&&n===ie.current&&(E(``),ie.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function de(){_(!0),O(``);try{await A.runAgent({forwardedProps:{...k.current}})}catch(e){ue(e)?(O(``),w(!0)):(console.error(`Agent run failed`,e),O(Je())),_(!1),se(),o.current.delete(s)}}async function fe(n,i){let a=n.trim();if(!e||!a||g||!oe||m)return;k.current={...i},r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let c={id:nN(),role:`user`,content:a};A.addMessage(c),l([...A.messages]),d(e=>({...e,[c.id]:Date.now()})),E(``),await de()}(0,N.useEffect)(()=>{let e=re.current;oe&&r&&e&&(re.current=null,fe(e.text,e.options))},[oe,r,s]);function pe(e){e.preventDefault(),fe(ee)}function me(){T.current=!0,O(``),w(!0),A.abortRun(),_(!1),se(),o.current.delete(s)}function he(){!g&&A.messages.some(e=>e.role===`user`)&&de()}function ge(n,r){if(!e)return;let i=nN();o.current.add(i),re.current=n?{text:n,options:{...r}}:null,t({to:`/chat/$threadId`,params:{threadId:i}})}function _e(){A.abortRun(),re.current=null,k.current={},a(nN()),t({to:`/chat`})}function ve(e){re.current=null,k.current={},t({to:`/chat/$threadId`,params:{threadId:e}})}function j(){ne(e=>e+1)}return(0,P.jsx)(nt.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:oe,running:g,activity:v,provisional:b,stopped:C,input:ee,setInput:E,error:D,inputRef:ie,send:fe,submit:pe,stop:me,retry:he,reloadThread:j,openChat:ge,newThread:_e,selectThread:ve},children:(0,P.jsx)(AN,{children:(0,P.jsx)(Bn,{})})})}function NN(){let e=(0,N.useMemo)(()=>new Tj,[]);return(0,P.jsx)(gA,{client:e,children:(0,P.jsx)(WM,{children:(0,P.jsx)(MN,{})})})}var PN=On({component:NN,notFoundComponent:()=>(0,P.jsx)(ze,{to:`/`,replace:!0})}),FN=kn(`/`)({component:An(()=>at(()=>import(`./routes-D2AdaqvY.js`),__vite__mapDeps([0,1,2])),`component`)}),IN=kn(`/settings`)({component:An(()=>at(()=>import(`./settings-Pi-RkmGU.js`),__vite__mapDeps([3,1,4,5,6])),`component`)}),LN=kn(`/chat/`)({component:An(()=>at(()=>import(`./chat.index-DUYzZFwo.js`),__vite__mapDeps([7,8,1,4,9,5,10])),`component`)}),RN=kn(`/chat/$threadId`)({component:An(()=>at(()=>import(`./chat._threadId-DUYzZFwo.js`),__vite__mapDeps([11,8,1,4,9,5,10])),`component`)});function zN(e){try{let t=typeof e==`string`?e:JSON.stringify(e);if(!t||t.length>4096)return;let n=typeof e==`string`?JSON.parse(e):e;if(!n||typeof n!=`object`)return;let r=n;return typeof r.panel_id!=`string`||!/^([a-z][a-z0-9_]{0,39})$/.test(r.panel_id)||r.kind!==`traces`&&r.kind!==`logs`||typeof r.from!=`string`||typeof r.to!=`string`||!Number.isFinite(Date.parse(r.from))||!Number.isFinite(Date.parse(r.to))||Date.parse(r.from)>=Date.parse(r.to)||Date.parse(r.to)-Date.parse(r.from)>2592e6||typeof r.window_from!=`string`||typeof r.window_to!=`string`||!Number.isFinite(Date.parse(r.window_from))||!Number.isFinite(Date.parse(r.window_to))||Date.parse(r.window_from)>=Date.parse(r.window_to)||Date.parse(r.window_to)-Date.parse(r.window_from)>2592e6||Date.parse(r.from)Date.parse(r.window_to)||!r.dimensions||Array.isArray(r.dimensions)||typeof r.dimensions!=`object`||Object.keys(r.dimensions).length>3||Object.values(r.dimensions).some(e=>typeof e!=`string`||e.length>500)||r.trace_id!==void 0&&(typeof r.trace_id!=`string`||r.trace_id.length>128)||r.namespace!==void 0&&(typeof r.namespace!=`string`||r.namespace.length>200)||r.bucket&&(!Number.isFinite(r.bucket.lower)||r.bucket.lower<0||r.bucket.upper!==void 0&&(!Number.isFinite(r.bucket.upper)||r.bucket.upper<=r.bucket.lower))?void 0:{panel_id:r.panel_id,kind:r.kind,from:r.from,to:r.to,window_from:r.window_from,window_to:r.window_to,dimensions:r.dimensions,trace_id:r.trace_id,namespace:r.namespace,bucket:r.bucket}}catch{return}}function BN(e,t,n){if(!e.drill&&e.viz!==`service_map`&&!n.trace_id||t.from_ms===void 0||t.to_ms===void 0)return;let r=t.from_ms,i=t.to_ms;if(n.from!==void 0&&n.to!==void 0&&(r=Math.max(r,Date.parse(n.from)),i=Math.min(i,Date.parse(n.to))),n.time!==void 0&&!n.trace_id){let e=/^(\d+)(s|m|h|d)$/.exec(t.interval??``),a=e?Number(e[1])*{s:1e3,m:6e4,h:36e5,d:864e5}[e[2]]:6e4;r=Math.max(r,n.time),i=Math.min(i,n.time+a)}return zN(JSON.stringify({panel_id:e.id,kind:n.trace_id||e.viz===`service_map`?`traces`:e.drill,from:n.from&&Date.parse(n.from)===r?n.from:new Date(r).toISOString(),to:n.to&&Date.parse(n.to)===i?n.to:new Date(i).toISOString(),window_from:new Date(t.from_ms).toISOString(),window_to:new Date(t.to_ms).toISOString(),dimensions:n.dimensions,trace_id:n.trace_id,namespace:n.namespace,bucket:n.bucket}))}function VN(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))for(let e of Array.isArray(r)?r:[r]){if(e===void 0)continue;let r=typeof e==`string`&&/^[{"]/.test(e);t.append(n,r||typeof e==`object`&&e?JSON.stringify(e):String(e))}let n=t.toString();return n?`?${n}`:``}function HN(e){let t=Object.create(null),n=e=>{if(e.startsWith(`{`)||e.startsWith(`"`))try{let t=JSON.parse(e);if(typeof t==`string`)return/^[{"]/.test(t)?t:e;if(typeof t==`object`&&t&&!Array.isArray(t))return t}catch{}return e},r=new URLSearchParams(e);for(let e of new Set(r.keys())){let i=r.getAll(e).map(n);t[e]=i.length===1?i[0]:i}return t}var UN=[`5m`,`15m`,`1h`,`3h`,`6h`,`12h`,`24h`,`2d`,`7d`,`30d`],WN=[`off`,`10s`,`30s`,`1m`,`5m`],GN=e=>{if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}[Tt](?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:[Zz]|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/.test(e)||Number.isNaN(Date.parse(e)))return!1;let[t,n,r]=e.slice(0,10).split(`-`).map(Number),i=new Date(0);return i.setUTCFullYear(t,n-1,r),i.setUTCHours(0,0,0,0),i.getUTCFullYear()===t&&i.getUTCMonth()===n-1&&i.getUTCDate()===r},KN=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):void 0;function qN(e){let t={};typeof e.range==`string`&&UN.includes(e.range)?t.range=e.range:GN(e.from)&&GN(e.to)&&Date.parse(e.from)typeof e==`string`)&&(i[e]=t)}}else{let t=KN(n);t!==void 0&&(i[e]=t)}}}Object.keys(i).length>0&&(t.vars=i);let a=zN(e.drill);return a&&(t.drill=JSON.stringify(a)),t}function JN(e){let t={};e.drill&&(t.drill=JSON.parse(e.drill)),e.range&&(t.range=e.range),e.from&&e.to&&(t.from=e.from,t.to=e.to),e.compare&&(t.compare=e.compare),e.view&&(t.view=e.view),e.edit&&(t.edit=e.edit);for(let[n,r]of Object.entries(e.vars??{}))t[`var-${n}`]=Array.isArray(r)?{values:r}:r;return t}function YN(e,t){let n=new URL(e);return n.search=VN(JN({...qN(HN(n.search)),drill:JSON.stringify(t)})),n.href}function XN(e,t){let n=e.time.refresh??`30s`;return t.from&&t.to?{from:t.from,to:t.to,refresh:n}:t.range?{range:t.range,refresh:n}:{...e.time,refresh:n}}var ZN=kn(`/dashboards/`)({component:An(()=>at(()=>import(`./dashboards.index-D-QLodMk.js`),__vite__mapDeps([12,1,2,13,4,9,5,10,6])),`component`),validateSearch:e=>JN(qN(e))}),QN=kn(`/dashboards/$dashboardId`)({component:An(()=>at(()=>import(`./dashboards._dashboardId-aBSBRnPf.js`),__vite__mapDeps([14,1,2,13,4,9,5,10,6])),`component`),validateSearch:e=>JN(qN(e))}),$N=FN.update({id:`/`,path:`/`,getParentRoute:()=>PN}),eP=IN.update({id:`/settings`,path:`/settings`,getParentRoute:()=>PN}),tP=LN.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>PN}),nP=RN.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>PN}),rP=ZN.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>PN}),iP={IndexRoute:$N,SettingsRoute:eP,ChatThreadIdRoute:nP,DashboardsDashboardIdRoute:QN.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>PN}),ChatIndexRoute:tP,DashboardsIndexRoute:rP},aP=Kn({routeTree:PN._addFileChildren(iP)._addFileTypes(),parseSearch:HN,stringifySearch:VN,defaultPreload:`intent`,scrollRestoration:!0}),oP=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],sP=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],cP=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],lP=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],uP=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],dP=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],fP={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#626777`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#8c939d`}},pP={dark:[`#3987e5`,`#d95926`,`#199e70`,`#9085e9`,`#c98500`,`#d55181`],light:[`#2a78d6`,`#eb6834`,`#1baf7a`,`#4a3aa7`,`#eda100`,`#e87ba4`]},mP={micro:11,small:12,body:14,title:16,section:22,page:32},hP={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},gP={brand:sP,ok:cP,warn:lP,bad:uP,info:dP},_P={light:7,dark:5};function vP(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function yP(e){let t=vP(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function bP(e){return Object.fromEntries(Object.entries(gP).map(([t,n])=>[`--fanout-color-${t}-contrast`,yP(n[_P[e]])]))}function xP(e){return t=>{let n=t.color??wP.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(gP,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var SP=.25,CP={xs:9,sm:10,md:11,lg:13,xl:16},wP={primaryColor:`brand`,primaryShade:_P,autoContrast:!0,luminanceThreshold:SP,colors:{dark:oP,brand:sP,ok:cP,warn:lP,bad:uP,info:dP},defaultRadius:`md`,fontFamily:hP.body,fontFamilyMonospace:hP.display,headings:{fontFamily:hP.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:DP(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:DP(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:EP(t.size)})},Menu:{defaultProps:{withInitialFocusPlaceholder:!1}},Drawer:{defaultProps:{closeButtonProps:{"aria-label":`Close`}}},Modal:{defaultProps:{closeButtonProps:{"aria-label":`Close`}}}}},TP=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":fP.light.muted,...bP(`light`)},dark:bP(`dark`)});function EP(e){let t=CP[e??`md`];return t===void 0||t>=mP.micro?{}:{"--badge-fz":`${mP.micro/16}rem`}}function DP(e,t){return!e||e===wP.primaryColor?{[t]:`var(--fanout-color-${wP.primaryColor}-contrast)`}:{}}var OP=xP(ee),kP=ri({...wP,variantColorResolver:OP});(0,Hc.createRoot)(document.getElementById(`root`)).render((0,P.jsx)(N.StrictMode,{children:(0,P.jsx)(ni,{theme:kP,defaultColorScheme:`auto`,cssVariablesResolver:TP,children:(0,P.jsx)(Yn,{router:aP})})}));export{Ny as $,hN as A,Dc as At,TM as B,Ur as Bt,rN as C,_y as Ct,sN as D,i_ as Dt,uN as E,a_ as Et,dN as F,Vo as Ft,ZA as G,Qn as Gt,sM as H,Er as Ht,KM as I,$a as It,xA as J,ln as Jt,qA as K,gn as Kt,RM as L,Ei as Lt,mN as M,Es as Mt,fN as N,Cs as Nt,lN as O,Kf as Ot,gN as P,rs as Pt,Py as Q,NM as R,hi as Rt,bN as S,Hy as St,vN as T,l_ as Tt,Rj as U,cr as Ut,pM as V,Ir as Vt,xj as W,rr as Wt,UA as X,NA as Y,hA as Z,UN as _,ox as _t,fP as a,yb as at,BN as b,Cb as bt,cP as c,Ry as ct,lP as d,q as dt,ib as et,QN as f,K as ft,qN as g,Ib as gt,XN as h,xb as ht,sP as i,G as it,_N as j,dc as jt,pN as k,Pc as kt,pP as l,Db as lt,YN as m,ab as mt,vP as n,fb as nt,hP as o,cb as ot,ZN as p,_b as pt,kA as q,on as qt,uP as r,ub as rt,dP as s,Tb as st,yP as t,jb as tt,mP as u,tx as ut,WN as v,kb as vt,cN as w,dy as wt,zN as x,hb as xt,JN as y,U as yt,OM as z,ai as zt}; \ No newline at end of file +`)};function UO(e,t){return Yc(t)&&WO(`[ag-ui][legacy] The result of tool call '${e}' carries content parts the legacy protocol cannot represent; only its text parts are bridged and the rest is dropped.`),Jc(t)}var WO=e=>{typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(e)},GO=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=!1,p=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(_d(r=>{switch(r.type){case L.TEXT_MESSAGE_START:{let e=r;return[{type:VO.TextMessageStart,messageId:e.messageId,role:e.role}]}case L.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:VO.TextMessageContent,messageId:e.messageId,content:e.delta}]}case L.TEXT_MESSAGE_END:{let e=r;return[{type:VO.TextMessageEnd,messageId:e.messageId}]}case L.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:VO.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case L.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return WO(`[ag-ui][legacy] TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let f=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(Md(d.function.arguments));e.tool_argument&&e.tool_argument in t?(p({...i,[e.state_key]:t[e.tool_argument]}),f=!0):e.tool_argument||(p({...i,[e.state_key]:t}),f=!0)}catch{}}return[{type:VO.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...f?[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case L.TOOL_CALL_END:{let e=r;return[{type:VO.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case L.TOOL_CALL_RESULT:{let e=r,t=d[e.toolCallId];return(t===void 0||t===``)&&WO(`[ag-ui][legacy] No usable tool name was seen for tool call '${e.toolCallId}' (${t===void 0?`no TOOL_CALL_START reached this bridge`:`its TOOL_CALL_START carried an empty toolCallName`}), so its result is being bridged with the fabricated action name "unknown". Downstream consumers route on that name.`),[{type:VO.ActionExecutionResult,actionExecutionId:e.toolCallId,result:UO(e.toolCallId,e.content),actionName:t||`unknown`}]}case L.RAW:return f||(f=!0,WO(`[ag-ui][legacy] Dropping RAW events: the legacy runtime protocol has no equivalent, so the provider payloads they carry do not reach the legacy stream. Reported once per stream.`)),[];case L.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:VO.MetaEvent,name:e.name,value:e.value}]}case L.STATE_SNAPSHOT:return p(r.snapshot),[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case L.STATE_DELTA:{let c=r,l;try{l=jl.applyPatch(i,c.delta,!0,!1).newDocument}catch(e){let t=e instanceof Error?e.message:String(e);return WO(`[ag-ui][legacy] Failed to apply state patch:\nCurrent state: ${JSON.stringify(i,null,2)}\nPatch operations: ${JSON.stringify(c.delta,null,2)}\nError: ${t}`),[]}return p(l),[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]}case L.MESSAGES_SNAPSHOT:return c=r.messages,[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case L.RUN_STARTED:return[];case L.RUN_FINISHED:{if(c&&(i.messages=c),Object.keys(i).length===0)return[];let r=null;if(c)try{r=KO(c)}catch(e){return[{type:VO.RunError,message:e.message}]}return[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...r?{messages:r}:{}}),active:!1}]}case L.RUN_ERROR:{let e=r;return[{type:VO.RunError,message:e.message,code:e.code}]}case L.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case L.STEP_FINISHED:return u=[],l=null,[{type:VO.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function KO(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=HO(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r;try{r=JSON.parse(e.function.arguments)}catch(t){throw Error(`Failed to parse arguments for tool call '${e.id}' (${e.function.name}): ${t.message}`)}let i={id:e.id,name:e.function.name,arguments:r,parentMessageId:n.id};t.push(i)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:UO(n.toolCallId,n.content),actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var qO=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,JO=e=>e===`tool`?`toolCallId`:`messageId`,YO=(e,t,n,r,i)=>{if(r!==void 0&&r!==i)throw Error(`Cannot continue ${e} '${t}': chunk ${n} '${r}' does not match the open stream's ${n} ${i===void 0?`(absent)`:`'${i}'`}.`)},XO=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},ZO=(e,t)=>{let n=XO(e,t);return t.rawEvent===void 0?n:{...n,rawEvent:t.rawEvent}},QO=e=>new Set(Object.keys(e.shape)),$O=QO(px),ek=QO(_x),tk=QO(eS),nk=(e,t)=>{let n;for(let r of Object.keys(e))t.has(r)||((n??={})[r]=e[r]);return n},rk=e=>{typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][transform] ${e} Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)},ik=(e,t,n,r)=>{if(t===void 0||n||e.length===0)return;let i=e[e.length-1],a=Object.keys(t).filter(e=>Object.prototype.hasOwnProperty.call(i,e));a.length>0&&rk(`A ${r} carried ${a.map(e=>`'${e}'`).join(`, `)}, which the synthesized ${String(i.type)} already describes. The synthesized value is kept and the chunk's is dropped — this stage does not judge a described field, so the producer's value cannot be substituted for its own.`),e[e.length-1]={...t,...i}},ak=e=>t=>{let n=TO(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:L.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:L.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:L.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!==void 0&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&qO(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${JO(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(_d(e=>{switch(e.type){case L.TEXT_MESSAGE_START:case L.TEXT_MESSAGE_CONTENT:case L.TEXT_MESSAGE_END:case L.TOOL_CALL_START:case L.TOOL_CALL_ARGS:case L.TOOL_CALL_END:case L.TOOL_CALL_RESULT:case L.STATE_SNAPSHOT:case L.STATE_DELTA:case L.CUSTOM:case L.STEP_STARTED:case L.STEP_FINISHED:case L.REASONING_START:case L.REASONING_MESSAGE_START:case L.REASONING_MESSAGE_CONTENT:case L.REASONING_MESSAGE_END:case L.REASONING_END:return[...i(e.subagentRunId??void 0),e];case L.RUN_STARTED:case L.RUN_FINISHED:case L.RUN_ERROR:case L.MESSAGES_SNAPSHOT:return[...a(),e];case L.RAW:case L.ACTIVITY_SNAPSHOT:case L.ACTIVITY_DELTA:case L.REASONING_ENCRYPTED_VALUE:case L.SUBAGENT_STARTED:return[e];case L.SUBAGENT_FINISHED:case L.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case L.TEXT_MESSAGE_CHUNK:{let t=e,a=nk(e,$O),o=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`text`&&(t.messageId===void 0||t.messageId===c.fields.messageId))YO(`text message`,c.fields.messageId,`role`,t.role,c.fields.role),YO(`text message`,c.fields.messageId,`name`,t.name,c.fields.name),d=c.fields;else{if(l.push(...i(o)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);d={messageId:t.messageId,role:t.role===void 0?`assistant`:t.role,name:t.name,subagentRunId:t.subagentRunId},r.set(o,{kind:`text`,fields:d});let e=XO({type:L.TEXT_MESSAGE_START,messageId:t.messageId,role:d.role,...t.name!==void 0&&{name:t.name},...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=ZO({...a,type:L.TEXT_MESSAGE_CONTENT,messageId:d.messageId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:d.messageId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:L.TEXT_MESSAGE_CONTENT,messageId:d.messageId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return ik(l,a,u,`TEXT_MESSAGE_CHUNK`),l}case L.TOOL_CALL_CHUNK:{let t=e,a=nk(e,ek),o=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===c.fields.toolCallId))YO(`tool call`,c.fields.toolCallId,`toolCallName`,t.toolCallName,c.fields.toolCallName),YO(`tool call`,c.fields.toolCallId,`parentMessageId`,t.parentMessageId,c.fields.parentMessageId),d=c.fields;else{if(l.push(...i(o)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);d={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(o,{kind:`tool`,fields:d});let e=XO({type:L.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,...t.parentMessageId!==void 0&&{parentMessageId:t.parentMessageId},...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=ZO({...a,type:L.TOOL_CALL_ARGS,toolCallId:d.toolCallId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:d.toolCallId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:L.TOOL_CALL_ARGS,toolCallId:d.toolCallId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return ik(l,a,u,`TOOL_CALL_CHUNK`),l}case L.REASONING_MESSAGE_CHUNK:{let t=e,a=nk(e,tk),o=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),c=r.get(o),l=[],u=!1,d;if(c?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===c.fields.messageId))d=c.fields;else{if(l.push(...i(o)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);d={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(o,{kind:`reasoning`,fields:d});let e=XO({type:L.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!==void 0&&{subagentRunId:t.subagentRunId}},t);l.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0||t.rawEvent!==void 0){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId,r=ZO({...a,type:L.REASONING_MESSAGE_CONTENT,messageId:d.messageId,delta:t.delta===void 0?``:t.delta,...e!==void 0&&{subagentRunId:e}},t);l.push(r),u=!0,n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:d.messageId})}if(l.length===0&&(t.metadata!==void 0||t.rawEvent!==void 0||t.subagentRunId===null||a!==void 0)){let e=t.subagentRunId===void 0?d.subagentRunId:t.subagentRunId;l.push({...a,type:L.REASONING_MESSAGE_CONTENT,messageId:d.messageId,delta:``,...t.metadata!==void 0&&{metadata:t.metadata},...t.rawEvent!==void 0&&{rawEvent:t.rawEvent},...e!==void 0&&{subagentRunId:e}}),u=!0}return ik(l,a,u,`REASONING_MESSAGE_CHUNK`),l}}return e.type,[e]}),Dd(()=>{a()}))},ok=Symbol(`agui.strip.drop`);function sk(e){let t=e;for(;;){if(t instanceof JD||t instanceof XD||t instanceof QD||t instanceof cO||t instanceof iO){t=t.unwrap();continue}if(t instanceof oO){t=t.def.in;continue}if(t instanceof uO){t=t.def.getter();continue}return t}}function ck(e){let t=e.def;return typeof t?.discriminator==`string`?t.discriminator:void 0}function lk(e){let t=e,n=Array.isArray(t.def?.values)?t.def.values:t.values?Array.from(t.values):void 0;return n&&n.length===1?n[0]:t.value}function uk(e){let t=sk(e);return t instanceof GD?lk(t):void 0}function dk(e,t,n,r){let i=sk(t);if(i instanceof LD){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t=i.shape,a=e,o={},s=i.meta()?.specOpen===!0;for(let e of Object.keys(a)){let i=Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;if(i===void 0){if(s){o[e]=a[e];continue}r.push(`${n}/${e}`);continue}let c=r.length,l=dk(a[e],i,`${n}/${e}`,r);if(l===ok){if(r.length=c,i.safeParse(void 0).success){r.push(`${n}/${e}`);continue}return ok}o[e]=l}return o}if(i instanceof FD){if(!Array.isArray(e))return e;let t=i.element,a=[];return e.forEach((e,i)=>{let o=r.length,s=dk(e,t,`${n}/${i}`,r);if(s===ok){r.length=o,r.push(`${n}/${i}`);return}a.push(s)}),a}if(i instanceof HD){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t=i.def.valueType,a=e,o={};for(let e of Object.keys(a)){let i=r.length,s=dk(a[e],t,`${n}/${e}`,r);if(s===ok){r.length=i,r.push(`${n}/${e}`);continue}o[e]=s}return o}if(i instanceof RD){let t=i.options,a=ck(i);if(a!==void 0){if(typeof e!=`object`||!e||Array.isArray(e))return e;let i=e[a];for(let o of t){let t=sk(o);if(!(t instanceof LD))continue;let s=t.shape;if(uk(s[a])===i)return dk(e,o,n,r)}return ok}let o=t.filter(e=>sk(e)instanceof LD),s=typeof e==`object`&&!!e&&!Array.isArray(e);if(o.length>1&&s)return e;for(let i of t){let t=sk(i);if(t instanceof FD&&Array.isArray(e)||t instanceof LD&&s)return dk(e,i,n,r)}return e}return e}function fk(e,t){let n=[],r=dk(e,t,``,n);if(r===ok)throw Error(`Internal error: the stripper found the whole value unrecognisable, which the schemas are not supposed to allow — schema/stripper mismatch.`);return{value:r,stripped:n}}var pk=new Set(Object.values(L));function mk(e){return pk.has(e.type)}var hk=new Map(oS.options.map(e=>{let t=e.shape;return[String(lk(t.type)),e]})),gk=()=>typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS;function _k(e){gk()||console.warn(`[ag-ui][enforce] ${e}`)}var vk=e=>t=>{let n=TO(e);return t.pipe(_d(e=>{if(!mk(e))return _k(`Dropping unrecognised event '${String(e.type)}': no middleware translated it and the protocol does not describe it.`),n?.event(`ENFORCE`,`Unrecognised event dropped:`,e,{type:e.type}),Nu;let t=hk.get(e.type);if(t===void 0)throw Error(`No validator for recognised event type '${String(e.type)}'`);let{value:r,stripped:i}=fk(e,t);for(let t of i)_k(`Removed unrecognised material at '${t}' on ${String(e.type)}. Nothing handled it; see the repo-root DEPRECATIONS.md if it is a retired shape.`);return fd(t.parse(r))}))};function yk(e){let{value:t,stripped:n}=fk(Gc(e,`RunAgentInput`),Bx);for(let e of n)_k(`Removed unrecognised material at '${e}' from the outgoing input.`);return Bx.parse(t)}var bk=class{runNext(e,t){return t.run(e).pipe(ak(!1))}runNextWithState(e,t){let n=_O(e.messages||[]),r=_O(e.state===void 0?{}:e.state),i=new Mu;return AO(e,i,t,[]).subscribe({next:e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)},error:()=>{}}),this.runNext(e,t).pipe(Cd(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:_O(n),state:_O(r)})))}},xk=class extends bk{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function Sk(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function Ck(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function wk(e){let t=Sk(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:((typeof process>`u`||!{}.SUPPRESS_TRANSFORMATION_WARNINGS)&&console.warn(`[ag-ui][compat] A binary content part carries only an id ('${e.id??``}') and cannot be converted to a modern media part; a 1.0 peer will not accept it. Provide data or a url. See the repo-root DEPRECATIONS.md.`),e)}function Tk(e,t,n){if(typeof e!=`object`||!e||!(`type`in e)||e.type!==t.type||!(`source`in e))return!1;let r=e.source;return typeof r!=`object`||!r||!(`type`in r)||r.type!==t.source.type||!(`value`in r)||r.value!==t.source.value||!(`mimeType`in r)||r.mimeType!==t.source.mimeType?!1:!n||`metadata`in e&&typeof e.metadata==`object`&&e.metadata!==null&&`filename`in e.metadata&&e.metadata.filename===n}function Ek(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.flatMap(e=>{if(Ck(e)){let n=wk(e);return n.type!==`binary`&&t.some(t=>Tk(t,n,e.filename))?[]:[n]}return[e]});return{...e,content:n}}var Dk=`THINKING_START`,Ok=`THINKING_END`,kk=`THINKING_TEXT_MESSAGE_START`,Ak=`THINKING_TEXT_MESSAGE_CONTENT`,jk=`THINKING_TEXT_MESSAGE_END`;function Mk(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Nk={event:[`rawEvent`,`subagentRunId`],[L.RUN_STARTED]:[`parentRunId`,`input`],[L.RUN_FINISHED]:[`result`,`outcome`],[L.RUN_ERROR]:[`usage`],[L.SUBAGENT_FINISHED]:[`result`],[L.TOOL_CALL_START]:[`parentMessageId`],[L.TOOL_CALL_CHUNK]:[`parentMessageId`],[L.TOOL_CALL_RESULT]:[`role`],"RUN_FINISHED.outcome":[`pendingToolCallIds`],"RUN_FINISHED.usage[]":[`provider`,`reasoningTokens`,`cachedInputTokens`,`cacheWriteInputTokens`],RunAgentInput:[`forwardedProps`],Tool:[`parameters`],ResumeEntry:[`payload`],"input content":[`metadata`]},Pk=new Map(Object.entries(Nk).filter(([e])=>Object.values(L).includes(e))),Fk=e=>jO(e,`an absent field`);function Ik(e,t,n,r){if(!Mk(e))return e;let i;for(let a of t)e[a]===null&&(r(n===void 0?`${a}: null`:`${n}.${a}: null`),i??={...e},delete i[a]);return i??e}function Lk(e,t,n){if(!Mk(e)||!Array.isArray(e[t]))return e;let r=e[t],i=r.map(n);return i.some((e,t)=>e!==r[t])?{...e,[t]:i}:e}function Rk(e,t){return Lk(e,`content`,e=>{if(!Mk(e))return e;switch(e.type){case`image`:case`audio`:case`video`:case`document`:return Ik(e,Nk[`input content`],`${e.type} input content`,t);default:return e}})}function zk(e,t=Fk){let n=Ik(e,Nk.RunAgentInput,`RunAgentInput`,t);return n=Lk(n,`tools`,e=>Ik(e,Nk.Tool,`Tool`,t)),n=Lk(n,`resume`,e=>Ik(e,Nk.ResumeEntry,`ResumeEntry`,t)),Lk(n,`messages`,e=>Rk(e,t))}var Bk=class extends bk{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null,this.nullsNoticedThisRun=new Set,this.noticeNullOncePerRun=e=>{this.nullsNoticedThisRun.has(e)||(this.nullsNoticedThisRun.add(e),jO(e,`an absent field`))}}warn(e,t){jO(e,t)}mintedContinuationId(e,t){if(t!==null)return t;let n=vO();return this.warnAside(`Minting a messageId ('${n}') for ${e}: no THINKING opener preceded it, so there was no id to continue. The id is this client's invention, not the producer's, and verification will reject the translated event for naming something nothing opened.`),n}warnAside(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`[ag-ui][compat] ${e} Set SUPPRESS_TRANSFORMATION_WARNINGS=true to silence.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.nullsNoticedThisRun.clear(),e.messages=e.messages.map(Ek),t.run(e).pipe(hd(e=>this.transformEvent(e)))}transformEvent(e){let t=this.noticeNullOncePerRun;e.type===L.RUN_STARTED&&this.nullsNoticedThisRun.clear(),e=Ik(e,Nk.event,void 0,t);let n=Pk.get(e.type);switch(n&&(e=Ik(e,n,e.type,t)),e.type){case Dk:{this.currentReasoningId=vO();let{title:t,...n}=e;return this.warn(Dk,L.REASONING_START),t!==void 0&&this.warnAside(`Dropping ${Dk}.title ${JSON.stringify(t)}: ${L.REASONING_START} has no title field, so the span's label cannot be carried and nothing downstream can recover it.`),{...n,type:L.REASONING_START,messageId:this.currentReasoningId}}case kk:return this.currentMessageId=vO(),this.warn(kk,L.REASONING_MESSAGE_START),{...e,type:L.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`reasoning`};case Ak:{let{delta:t,...n}=e;return this.warn(Ak,L.REASONING_MESSAGE_CONTENT),{...n,type:L.REASONING_MESSAGE_CONTENT,messageId:this.mintedContinuationId(Ak,this.currentMessageId),delta:t}}case jk:{let t=this.mintedContinuationId(jk,this.currentMessageId);return this.currentMessageId=null,this.warn(jk,L.REASONING_MESSAGE_END),{...e,type:L.REASONING_MESSAGE_END,messageId:t}}case Ok:{let t=this.mintedContinuationId(Ok,this.currentReasoningId);return this.currentReasoningId=null,this.warn(Ok,L.REASONING_END),{...e,type:L.REASONING_END,messageId:t}}case L.RUN_FINISHED:{let n=e,r=Ik(n.outcome,Nk[`RUN_FINISHED.outcome`],`RUN_FINISHED.outcome`,t);return Lk(r===n.outcome?n:{...n,outcome:r},`usage`,e=>Ik(e,Nk[`RUN_FINISHED.usage[]`],`RUN_FINISHED.usage[]`,t))}case L.MESSAGES_SNAPSHOT:{let t=e;return Array.isArray(t.messages)?{...t,messages:t.messages.map(e=>this.upgradeInboundMessage(e))}:e}case L.RUN_STARTED:{let n=zk(e.input,t),r=n===e.input?e:{...e,input:n},i=r;return!i.input||!Array.isArray(i.input.messages)?r:{...i,input:{...i.input,messages:i.input.messages.map(e=>this.upgradeInboundMessage(e))}}}default:return e}}upgradeInboundMessage(e){e=Rk(e,this.noticeNullOncePerRun);let t=e.content;return!Array.isArray(t)||!t.some(e=>typeof e==`object`&&!!e&&e.type===`binary`)?e:(this.warn(`binary input content`,`the modern media content parts`),Ek(e))}},Vk=()=>e=>bd(()=>{let t=new Bk;return e.pipe(hd(e=>t.transformEvent(e)))});function Hk(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}function Uk(){return typeof process<`u`&&!!{}.SUPPRESS_TRANSFORMATION_WARNINGS}function Wk(e){Uk()||console.warn(`[ag-ui][compat] Flattening message content for a <=0.0.39 peer DROPS non-text parts (${e.join(`, `)}). The peer cannot receive them; upgrade it to keep media content. See the repo-root DEPRECATIONS.md.`)}function Gk(e){Uk()||console.warn(`[ag-ui][compat] Not flattening message content for a <=0.0.39 peer: ${e} content part(s) claim type "text" but carry a malformed 'text' value. That is a defect in the message, not media the peer cannot represent, and a downgrade must not repair it — the content is passed on unchanged so the outgoing enforcement boundary reports it. See the repo-root DEPRECATIONS.md.`)}function Kk(e){let t=e.content;if(Array.isArray(t)){let n=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`,r=e=>n(e)&&typeof e.text==`string`,i=t.filter(e=>n(e)&&!r(e));if(i.length>0)return Gk(i.length),e;let a=t.filter(e=>!r(e)).map(e=>typeof e==`object`&&e&&`type`in e?String(e.type):typeof e);a.length>0&&Wk(a);let o=t.filter(r).map(e=>e.text).join(``);return{...e,content:o}}return typeof t==`string`?e:t===void 0?{...e,content:``}:e}var qk=class extends bk{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(Kk)};return this.runNext(i,t)}},Jk=`THINKING_START`,Yk=`THINKING_END`,Xk=`THINKING_TEXT_MESSAGE_START`,Zk=`THINKING_TEXT_MESSAGE_CONTENT`,Qk=`THINKING_TEXT_MESSAGE_END`,$k=class extends bk{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(hd(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case Jk:{this.currentReasoningId=vO();let{title:t,...n}=e;return this.warnAboutTransformation(Jk,L.REASONING_START),{...n,type:L.REASONING_START,messageId:this.currentReasoningId}}case Xk:return this.currentMessageId=vO(),this.warnAboutTransformation(Xk,L.REASONING_MESSAGE_START),{...e,type:L.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`reasoning`};case Zk:{let{delta:t,...n}=e;return this.warnAboutTransformation(Zk,L.REASONING_MESSAGE_CONTENT),{...n,type:L.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??vO(),delta:t}}case Qk:{let t=this.currentMessageId??vO();return this.warnAboutTransformation(Qk,L.REASONING_MESSAGE_END),{...e,type:L.REASONING_MESSAGE_END,messageId:t}}case Yk:{let t=this.currentReasoningId??vO();return this.warnAboutTransformation(Yk,L.REASONING_END),{...e,type:L.REASONING_END,messageId:t}}default:return e}}},eA=`SUBAGENT_STARTED`,tA=`SUBAGENT_FINISHED`,nA=`SUBAGENT_ERROR`;function rA(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function iA(e){return e.map(e=>rA(e))}var aA=class extends bk{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>rA(e))};return this.runNext(n,t).pipe(Ad(e=>{let t=e.type;(t===eA||t===tA||t===nA)&&this.warnDroppedLifecycleEvent(t)}),xd(e=>{let t=e.type;return t!==eA&&t!==tA&&t!==nA}),hd(e=>{let t=rA(e);if(t.type===L.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:iA(e.messages)}}if(t.type===L.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>rA(e))}}}if(t.type===L.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:iA(e.input.messages)}}}return t}))}},oA=`1.0.2`,sA=!1,cA=new WeakSet,lA=(e,t)=>/^\d+\.\d+$/.test(e)?LT(e,t)>0?`newer`:`not-newer`:`uninterpretable`,uA=e=>{let t=e.protocolVersion;if(t!==void 0&&t!==`1.0`)switch(lA(t,`1.0`)){case`uninterpretable`:console.warn(`[ag-ui] The producer declared protocol version '${t}', which this client cannot interpret.`);return;case`newer`:console.warn(`[ag-ui] The producer speaks protocol ${t}; this client speaks 1.0. Unrecognised material will be stripped with warnings.`);return;case`not-newer`:return}},dA=class e{resolvePeerCeiling(t){if(this.resolvingPeerCeiling)return oA;let n=Object.getOwnPropertyDescriptor(this,`maxVersion`),r=Object.getOwnPropertyDescriptor(this,`maxProtocolVersion`),i=Object.getPrototypeOf(this);for(;i&&i!==e.prototype;)n??=Object.getOwnPropertyDescriptor(i,`maxVersion`),r??=Object.getOwnPropertyDescriptor(i,`maxProtocolVersion`),i=Object.getPrototypeOf(i);if(t===`maxVersion`&&n)return oA;let a=t===`maxProtocolVersion`?n:r;if(!a)return oA;this.resolvingPeerCeiling=!0;try{return a.get?a.get.call(this):a.value}finally{this.resolvingPeerCeiling=!1}}get maxProtocolVersion(){return this.resolvePeerCeiling(`maxProtocolVersion`)}get maxVersion(){return!this.resolvingPeerCeiling&&!sA&&(sA=!0,console.warn(`[ag-ui] AbstractAgent.maxVersion is deprecated — use maxProtocolVersion. Same value; the new name says whose version it is and that it is a ceiling.`)),this.resolvePeerCeiling(`maxVersion`)}get debug(){return this._debug}set debug(e){this._debug=wO(e),this._debugLogger=DO(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?DO(wO(!0)):void 0:e}resolvedCeilingDuringConstruction(){let e=this.maxProtocolVersion;if(typeof e!=`string`||!RT(e))throw new R(`maxProtocolVersion resolved to ${JSON.stringify(e)} during construction, which is not a version this client can compare. A ceiling read from an instance field is not available yet — return a literal from the getter.`);return e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.resolvingPeerCeiling=!1,this.agentId=e,this.description=t??``,this.threadId=n??Vc(),this.messages=_O(r??[]),this.state=_O(i??{}),this._debug=wO(a),this._debugLogger=DO(this._debug);let o=this.resolvedCeilingDuringConstruction();LT(o,`0.0.39`)<=0&&this.middlewares.unshift(new qk),LT(o,`0.0.45`)<=0&&this.middlewares.unshift(new $k),LT(o,`0.0.57`)<=0&&this.middlewares.unshift(new aA)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new xk(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vc();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunStartedEvent:({event:e})=>uA(e),onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];cA.add(n),await this.onInitialize(n,a),this.activeRunDetach$=new ku;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await md(vu(()=>[...this.middlewares,new Bk].reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),vk(this.debugLogger),ak(this.debugLogger),MO(this.debugLogger),e=>e.pipe(kd(this.activeRunDetach$)),e=>this.applyBeforeSourceError(n,e,a),Sd(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),Dd(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(fd(null)));let s=_O(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Kc}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Vc();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunStartedEvent:({event:e})=>uA(e),onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new ku;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await md(vu(()=>bd(()=>this.connect(n)),e=>vk(this.debugLogger)(Vk()(e)),ak(this.debugLogger),MO(this.debugLogger),e=>e.pipe(kd(this.activeRunDetach$)),e=>this.applyBeforeSourceError(n,e,a),Sd(e=>(this.isRunning=!1,e instanceof Kc?Nu:this.onError(n,e,a))),Dd(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(fd(null)),{defaultValue:void 0});let s=_O(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}applyBeforeSourceError(e,t,n){return bd(()=>{let r,i=t.pipe(Sd(e=>(r={error:e},Nu)));return this.processApplyEvents(e,this.apply(e,i,n),n).pipe(Td(bd(()=>{let e=r;return e?z(()=>e.error):Nu})))})}apply(e,t,n){return AO(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(Ad(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state!==void 0&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=_O(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Vc(),...LT(this.maxProtocolVersion,oA)>=0&&{protocolVersion:`1.0`},tools:_O(e?.tools??[]),context:_O(e?.context??[]),forwardedProps:_O(e?.forwardedProps??{}),state:_O(this.state),messages:n,...e?.resume===void 0?{}:{resume:_O(e.resume)}}}async onInitialize(e,t){if(cA.has(e)&&this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new R(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let t of this.pendingInterrupts)if(Hk(t)&&(e.resume??[]).find(e=>e.interruptId===t.id)?.status!==`cancelled`)throw new R(`Interrupt ${t.id} expired at ${t.expiresAt} and can no longer be answered. Cancel it to continue the thread.`)}let n=await CO(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages.filter(e=>e.role!==`activity`),t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state!==void 0&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return dd(CO(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(hd(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await CO(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=_O(this.messages),e.state=_O(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=_O(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=_O(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=_O(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??Vc();let t=this.prepareRunAgentInput(e);return[...this.middlewares,new Bk].reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t).pipe(vk(this.debugLogger),ak(this.debugLogger),MO(this.debugLogger),GO(this.threadId,t.runId,this.agentId),e=>e.pipe(hd(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function fA(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var pA=class extends dA{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(fA(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=_O(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return BO(PO(()=>this.fetch(this.url,this.requestInit(yk(e)))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=_O(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},mA=N.createContext(void 0),hA=e=>{let t=N.useContext(mA);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},gA=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,P.jsx)(mA.Provider,{value:e,children:t})),_A={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vA=new class{#e=_A;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 yA(e){setTimeout(e,0)}var bA=typeof window>`u`||`Deno`in globalThis;function xA(){}function SA(e,t){return typeof e==`function`?e(t):e}function CA(e){return typeof e==`number`&&e>=0&&e!==1/0}function wA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function TA(e,t){return typeof e==`function`?e(t):e}function EA(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==OA(o,t.options))return!1}else if(!AA(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 DA(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(kA(t.options.mutationKey)!==kA(a))return!1}else if(!AA(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function OA(e,t){return(t?.queryKeyHashFn||kA)(e)}function kA(e){return JSON.stringify(e,(e,t)=>FA(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function AA(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)){if(t.length>e.length)return!1;for(let n=0;n500)return t;let r=PA(e)&&PA(t);if(!r&&!(FA(e)&&FA(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{vA.setTimeout(t,e)})}function RA(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:MA(e,t)}function zA(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function BA(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var VA=Symbol();function HA(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===VA?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function UA(e,t){return typeof e==`function`?e(...t):!!e}function WA(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 GA=()=>bA,KA=()=>GA(),qA=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(){}},JA=new class extends qA{#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`}},YA=yA;function XA(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=YA,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 ZA=XA(),QA=new class extends qA{#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 ej(e){return(e??`online`)!==`online`||QA.isOnline()}var tj=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function nj(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(xA);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new tj(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>JA.isFocused()&&(e.networkMode===`always`||QA.isOnline())&&e.canRun(),p=()=>ej(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(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??(KA()?0:3),a=e.retryDelay??$A,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&nf()?void 0:g(f)).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var rj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),CA(this.gcTime)&&(this.#e=vA.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(KA()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(vA.clearTimeout(this.#e),this.#e=void 0)}};function ij(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=>{WA(e,()=>t.signal,()=>n=!0)},u=HA(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?BA:zA;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?oj:aj,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:aj(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function aj(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 oj(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function sj(e,t){return t?aj(e,t)!=null:!1}function cj(e,t){return!t||!e.getPreviousPageParam?!1:oj(e,t)!=null}var lj=class extends rj{#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=fj(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=fj(this.options);e.data!==void 0&&(this.setState(dj(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=RA(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(xA).catch(xA):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=>TA(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===VA||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>TA(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:!wA(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=HA(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`?ij(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=nj({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof tj&&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 tj){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,...uj(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...dj(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),ZA.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function uj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ej(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function dj(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function fj(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 pj=class extends qA{#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),hj(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gj(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gj(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 TA(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&&!NA(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||TA(this.options.enabled,this.#t)!==TA(t.enabled,this.#t)||TA(this.options.staleTime,this.#t)!==TA(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||TA(this.options.enabled,this.#t)!==TA(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 NA(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(xA)),t}#h(e){return!KA()&&TA(this.options.enabled,this.#t)!==!1&&CA(e)}#g(){this.#b();let e=TA(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=wA(this.#r.dataUpdatedAt,e)+1;this.#u=vA.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return TA(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=vA.setInterval(()=>{(this.options.refetchIntervalInBackground||JA.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(vA.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(vA.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&&hj(e,t),o=i&&_j(e,n,t,r);(a||o)&&(l={...l,...uj(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=RA(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=RA(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:vj(e,t),refetch:this.refetch,isEnabled:TA(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),NA(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)})})();ZA.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 mj(e,t){return TA(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||TA(t.retryOnMount,e)!==!1)}function hj(e,t){return mj(e,t)||e.state.data!==void 0&&gj(e,t,t.refetchOnMount)}function gj(e,t,n){if(TA(t.enabled,e)!==!1&&TA(t.staleTime,e)!==`static`){let r=TA(n,e);return r===`always`||r!==!1&&vj(e,t)}return!1}function _j(e,t,n,r){return(e!==t||TA(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&vj(e,n)}function vj(e,t){return TA(t.enabled,e)!==!1&&e.isStaleByTime(TA(t.staleTime,e))}var yj=class extends pj{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:sj(t,n.data),hasPreviousPage:cj(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},bj=class extends rj{#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||xj(),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=nj({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),ZA.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function xj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Sj=class extends qA{#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 bj({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=Cj(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=Cj(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=Cj(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=Cj(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){ZA.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=>DA(t,e))}findAll(e={}){return this.getAll().filter(t=>DA(e,t))}notify(e){ZA.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return ZA.batch(()=>Promise.all(e.map(e=>e.continue().catch(xA))))}};function Cj(e){return e.options.scope?.id}var wj=class extends qA{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??OA(r,t),a=this.get(i);return a||(a=new lj({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){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){ZA.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=>EA(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>EA(e,t)):t}notify(e){ZA.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ZA.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ZA.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Tj=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new wj,this.#t=e.mutationCache||new Sj,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=JA.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=QA.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(TA(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=SA(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ZA.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;ZA.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return ZA.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=ZA.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(xA).catch(xA)}invalidateQueries(e,t={}){return ZA.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=ZA.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(xA)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(xA)}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(TA(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(TA(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(xA).catch(xA)}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(xA).catch(xA)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return QA.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(kA(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{AA(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(kA(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{AA(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||=OA(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===VA&&(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()}},Ej=N.createContext(!1),Dj=()=>N.useContext(Ej);Ej.Provider;function Oj(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kj=N.createContext(Oj()),Aj=()=>N.useContext(kj),jj=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?UA(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Mj=e=>{N.useEffect(()=>{e.clearReset()},[e])},Nj=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||UA(n,[e.error,r])),Pj=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Fj=(e,t)=>e?.suspense&&t.isPending,Ij=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Lj(e,t,n){let r=Dj(),i=Aj(),a=hA(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Pj(o),jj(o,i,s),Mj(i);let[l]=N.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(N.useSyncExternalStore(N.useCallback(e=>{let t=d?l.subscribe(ZA.batchCalls(e)):xA;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),N.useEffect(()=>{l.setOptions(o)},[o,l]),Fj(o,u))throw Ij(o,l,i);if(Nj({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Rj(e,t){return Lj(e,pj,t)}function zj(e,t){return Lj(e,yj,t)}var Bj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M112,56V200L40,128Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z`}))]]),Vj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`}))]]),Hj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z`}))]]),Uj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]]),Wj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),Gj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),Kj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),qj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),Jj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),Yj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),Xj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z`}))]]),Zj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),Qj=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),$j=new Map([[`bold`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M256,136a12,12,0,0,1-12,12h-8v8a12,12,0,0,1-24,0v-8h-8a12,12,0,0,1,0-24h8v-8a12,12,0,0,1,24,0v8h8A12,12,0,0,1,256,136Zm-54.81,56.28a12,12,0,1,1-18.38,15.44C169.12,191.42,145,172,108,172c-28.89,0-55.46,12.68-74.81,35.72a12,12,0,0,1-18.38-15.44A124.08,124.08,0,0,1,63.5,156.53a72,72,0,1,1,89,0A124,124,0,0,1,201.19,192.28ZM108,148a48,48,0,1,0-48-48A48.05,48.05,0,0,0,108,148Z`}))],[`duotone`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M168,100a60,60,0,1,1-60-60A60,60,0,0,1,168,100Z`,opacity:`0.2`}),N.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`fill`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136ZM144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17A8,8,0,0,0,24,208H192a8,8,0,0,0,6.13-13.15C183.18,177.07,164.6,164.44,144,157.68Z`}))],[`light`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M254,136a6,6,0,0,1-6,6H230v18a6,6,0,0,1-12,0V142H200a6,6,0,0,1,0-12h18V112a6,6,0,0,1,12,0v18h18A6,6,0,0,1,254,136Zm-57.41,60.14a6,6,0,1,1-9.18,7.72C166.9,179.45,138.69,166,108,166s-58.89,13.45-79.41,37.86a6,6,0,0,1-9.18-7.72C35.14,177.41,55,164.48,77,158.25a66,66,0,1,1,62,0C161,164.48,180.86,177.41,196.59,196.14ZM108,154a54,54,0,1,0-54-54A54.06,54.06,0,0,0,108,154Z`}))],[`regular`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M256,136a8,8,0,0,1-8,8H232v16a8,8,0,0,1-16,0V144H200a8,8,0,0,1,0-16h16V112a8,8,0,0,1,16,0v16h16A8,8,0,0,1,256,136Zm-57.87,58.85a8,8,0,0,1-12.26,10.3C165.75,181.19,138.09,168,108,168s-57.75,13.19-77.87,37.15a8,8,0,0,1-12.25-10.3c14.94-17.78,33.52-30.41,54.17-37.17a68,68,0,1,1,71.9,0C164.6,164.44,183.18,177.07,198.13,194.85ZM108,152a52,52,0,1,0-52-52A52.06,52.06,0,0,0,108,152Z`}))],[`thin`,N.createElement(N.Fragment,null,N.createElement(`path`,{d:`M252,136a4,4,0,0,1-4,4H228v20a4,4,0,0,1-8,0V140H200a4,4,0,0,1,0-8h20V112a4,4,0,0,1,8,0v20h20A4,4,0,0,1,252,136Zm-56.94,61.43a4,4,0,0,1-6.12,5.14C168,177.7,139.3,164,108,164s-60,13.7-80.94,38.57a4,4,0,1,1-6.12-5.14c16.71-19.9,38.13-33.13,61.89-38.59a64,64,0,1,1,50.34,0C156.93,164.3,178.35,177.53,195.06,197.43ZM108,156a56,56,0,1,0-56-56A56.06,56.06,0,0,0,108,156Z`}))]]),eM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Bj}));eM.displayName=`ArrowLeftIcon`;var tM=eM,nM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Vj}));nM.displayName=`ArrowRightIcon`;var rM=nM,iM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Hj}));iM.displayName=`BookOpenIcon`;var aM=iM,oM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Uj}));oM.displayName=`DotsThreeIcon`;var sM=oM,cM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Wj}));cM.displayName=`MagnifyingGlassIcon`;var lM=cM,uM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Gj}));uM.displayName=`MoonIcon`;var dM=uM,fM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Kj}));fM.displayName=`PencilSimpleIcon`;var pM=fM,mM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:qj}));mM.displayName=`PlugsConnectedIcon`;var hM=mM,gM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Jj}));gM.displayName=`PlusIcon`;var _M=gM,vM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Yj}));vM.displayName=`SignOutIcon`;var yM=vM,bM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Xj}));bM.displayName=`SparkleIcon`;var xM=bM,SM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Zj}));SM.displayName=`SunIcon`;var CM=SM,wM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:Qj}));wM.displayName=`TrashIcon`;var TM=wM,EM=N.forwardRef((e,t)=>N.createElement(k,{ref:t,...e,weights:$j}));EM.displayName=`UserPlusIcon`;var DM=EM,OM=class extends Error{status;problems;code;constructor(e,t,n=[],r=``){super(e),this.status=t,this.problems=n,this.code=r}},kM=`fanout:unauthorized`;function AM(){let e=new URLSearchParams(window.location.search).get(`return_to`);if(!e)return``;let t=new URL(e,window.location.origin);return t.origin!==window.location.origin||t.pathname!==`/api/auth/oauth/authorize`?``:`${t.pathname}${t.search}`}function jM(e){return!e||typeof e!=`object`||!(`id`in e)||typeof e.id!=`string`||e.id===``?`none`:`user`}function MM(){window.dispatchEvent(new Event(kM))}async function NM(e,t={}){let n=new Headers(t.headers);n.set(`Fanout-Request`,`1`);let r=await fetch(e,{...t,headers:n,credentials:`same-origin`});if(r.status===401&&MM(),r.status===403){let e=await r.clone().json().catch(()=>({}));throw new OM(e.message??`You do not have permission to perform this action.`,r.status,[],e.code??``)}return r}async function PM(){let e=await NM(`/api/auth/logout`,{method:`POST`});if(!e.ok&&e.status!==401)throw Error(`Sign-out failed — your session is still active.`);e.status!==401&&MM(),window.location.assign(`/`)}var FM=(0,N.createContext)(null);function IM(){let e=(0,N.useContext)(FM);if(!e)throw Error(`Fanout runtime status is unavailable`);return e}var LM=(0,N.createContext)(null);function RM(){let e=(0,N.useContext)(LM);if(!e)throw Error(`Fanout viewer is unavailable`);return e}function zM(e){if(!e||typeof e!=`object`)return null;let t=e;return typeof t.id!=`string`||t.id===``||t.status!==`active`&&t.status!==`suspended`?null:{id:t.id,email:typeof t.email==`string`?t.email:``,display_name:typeof t.display_name==`string`?t.display_name:``,status:t.status,role:typeof t.role==`string`?t.role:``}}async function BM(e,t){let n=await fetch(e,{method:t===void 0?`GET`:`POST`,headers:t===void 0?void 0:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t),credentials:`same-origin`}),r=await n.json().catch(()=>({}));if(!n.ok)throw Error(r.message??`Request failed (${n.status})`);return r}function VM({children:e,wide:t=!1}){return(0,P.jsx)(u,{mih:`100dvh`,style:{background:`radial-gradient(circle at 50% -12%, var(--mantine-color-brand-light), transparent 38%), linear-gradient(180deg, var(--mantine-color-default-hover), var(--mantine-color-body) 62%)`},children:(0,P.jsx)(ke,{mih:`100dvh`,px:`md`,py:48,children:(0,P.jsx)(_e,{size:t?680:480,w:`100%`,children:(0,P.jsx)(Ne,{radius:28,p:{base:24,sm:40},style:{background:`var(--mantine-color-body)`,border:`1px solid var(--mantine-color-default-border)`,boxShadow:`var(--mantine-shadow-xl)`},children:e})})})})}function HM(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`setup_token`)??``}function UM(){return typeof window>`u`?``:new URLSearchParams(window.location.search).get(`login_token`)??``}function WM({children:e}){let t=Le(),[n,r]=(0,N.useState)(null),[i,a]=(0,N.useState)(!1),[o,s]=(0,N.useState)(`none`),[c,l]=(0,N.useState)(null),[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(``),[_,v]=(0,N.useState)(HM),[y,b]=(0,N.useState)(UM),[x,S]=(0,N.useState)(``),[C,w]=(0,N.useState)(!1),[T,ee]=(0,N.useState)(0),[E,D]=(0,N.useState)(()=>Date.now()),[O,te]=(0,N.useState)(!1),[re,k]=(0,N.useState)(``),[ie,ae]=(0,N.useState)(null),[oe,ce]=(0,N.useState)(!1),ue=(0,N.useRef)(null),de=AM(),fe=o===`user`;async function me(){let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok){s(`none`),l(null);return}let t=await e.json().catch(()=>null);s(jM(t)),l(zM(t))}async function he(){try{let e=await fetch(`/api/auth/me`,{credentials:`same-origin`});if(!e.ok)return;l(zM(await e.json().catch(()=>null)))}catch{}}(0,N.useEffect)(()=>{let e=new URL(window.location.href);(e.searchParams.has(`setup_token`)||e.searchParams.has(`login_token`))&&(e.searchParams.delete(`setup_token`),e.searchParams.delete(`login_token`),t({href:e.pathname+e.search+e.hash,replace:!0}))},[t]),(0,N.useEffect)(()=>{BM(`/api/auth/status`).then(r).catch(e=>k(String(e))).finally(()=>a(!0)),me().catch(()=>s(`none`)).finally(()=>f(!0));let e=()=>{s(`none`),l(null)};return window.addEventListener(kM,e),()=>window.removeEventListener(kM,e)},[]),(0,N.useEffect)(()=>{d&&o===`none`&&y&&(te(!0),k(``),BM(`/api/auth/link/verify`,{token:y}).then(()=>{s(`user`),he()}).catch(e=>k(e instanceof Error?e.message:String(e))).finally(()=>{b(``),te(!1)}))},[y,d,o]),(0,N.useEffect)(()=>{fe&&d&&de&&window.location.replace(de)},[fe,de,d]),(0,N.useEffect)(()=>{if(T<=Date.now())return;let e=setInterval(()=>{D(Date.now()),Date.now()>=T&&clearInterval(e)},1e3);return()=>clearInterval(e)},[T]);let ge=Math.max(0,Math.ceil((T-E)/1e3));(0,N.useEffect)(()=>{C&&!O&&re&&ue.current?.querySelector(`input`)?.focus()},[O,C,re]);async function _e(e){try{await navigator.clipboard.writeText(e),ce(!0)}catch{k(`Clipboard access failed. Select and copy the token manually.`)}}if(ie?.ingest_token)return(0,P.jsx)(VM,{wide:!0,children:(0,P.jsxs)(A,{gap:`lg`,children:[(0,P.jsx)(De,{}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(le,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Setup complete`}),(0,P.jsx)(be,{order:1,mt:`xs`,fz:{base:28,sm:32},lh:1.08,children:`Save your ingest token`})]}),(0,P.jsx)(le,{c:`dimmed`,children:`Fanout shows this token once. Store it with your collector secrets before continuing.`}),(0,P.jsxs)(A,{gap:`xs`,children:[(0,P.jsx)(le,{size:`sm`,fw:600,children:`OTLP endpoint`}),(0,P.jsx)(rs,{block:!0,children:ie.suggested_endpoint??window.location.origin})]}),(0,P.jsxs)(A,{gap:`xs`,children:[(0,P.jsx)(le,{size:`sm`,fw:600,children:`Header`}),(0,P.jsxs)(rs,{block:!0,children:[ie.ingest_header_name??`Authorization`,`: Bearer `,ie.ingest_token]})]}),re&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re}),(0,P.jsxs)(ne,{grow:!0,align:`stretch`,children:[(0,P.jsx)(se,{variant:`light`,radius:`md`,leftSection:oe?(0,P.jsx)(pe,{size:16,weight:`bold`}):(0,P.jsx)(we,{size:16}),onClick:()=>void _e(`${ie.ingest_header_name??`Authorization`}: Bearer ${ie.ingest_token}`),children:oe?`Copied`:`Copy header`}),(0,P.jsx)(se,{radius:`md`,rightSection:(0,P.jsx)(rM,{size:16,weight:`bold`}),onClick:()=>{s(`user`),ae(null),he()},children:`Continue to Fanout`})]}),(0,P.jsx)(se,{variant:`subtle`,size:`compact-xs`,onClick:()=>void _e(ie.ingest_token??``),children:`Copy token only`})]})});if(!d||!i||y)return(0,P.jsx)(ke,{mih:`100dvh`,children:(0,P.jsx)(Pe,{size:`sm`})});if(!n)return(0,P.jsx)(VM,{children:(0,P.jsxs)(A,{gap:`lg`,children:[(0,P.jsx)(De,{}),(0,P.jsx)(be,{order:1,children:`Fanout is unavailable`}),(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re||`Authentication status could not be loaded.`})]})});if(fe&&de)return null;if(fe)return(0,P.jsx)(FM.Provider,{value:n,children:(0,P.jsx)(LM.Provider,{value:c??{id:``,email:p,display_name:h,status:`active`,role:``},children:e})});if(n&&!n.setup_required&&n.auth_mode===`oidc`){let e=de?`/api/auth/oidc/start?return_to=${encodeURIComponent(de)}`:`/api/auth/oidc/start`;return(0,P.jsx)(VM,{children:(0,P.jsxs)(A,{gap:28,children:[(0,P.jsx)(De,{}),(0,P.jsxs)(A,{gap:10,children:[(0,P.jsx)(le,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Secure workspace`}),(0,P.jsx)(be,{order:1,fz:{base:28,sm:32},lh:1.08,children:`Sign in`}),(0,P.jsx)(le,{c:`dimmed`,size:`md`,lh:1.6,children:`Use your organization's identity provider to continue.`})]}),re&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re}),(0,P.jsx)(se,{component:`a`,href:e,size:`md`,radius:`md`,rightSection:(0,P.jsx)(rM,{size:17,weight:`bold`}),children:`Continue with SSO`})]})})}async function ve(){te(!0),k(``);try{await BM(`/api/auth/code/send`,{email:p}),w(!0),S(``),ee(Date.now()+3e4),D(Date.now())}catch(e){k(e instanceof Error?e.message:String(e))}finally{te(!1)}}async function j(e){te(!0),k(``);try{await BM(`/api/auth/code/verify`,{email:p,code:e}),s(`user`),w(!1),S(``),ee(0),he()}catch(e){S(``),k(e instanceof Error?e.message:String(e))}finally{te(!1)}}function M(){w(!1),S(``),k(``)}async function ye(e){e.preventDefault(),te(!0),k(``);try{if(n?.setup_required){let e=await BM(`/api/auth/setup`,{email:p,display_name:h,setup_token:_});e.ingest_token?ae(e):(s(`user`),he())}else if(C){await j(x);return}else{await ve();return}}catch(e){k(e instanceof Error?e.message:String(e))}finally{te(!1)}}let Se=C&&!n?.setup_required,Ce=n?.setup_required?`Create the first admin`:Se?`Check your email`:n?.self_signup?`Sign in or create an account`:`Sign in`,Te=n?.setup_required?`Use the one-time token printed by the Fanout process.`:n?.smtp_configured?Se?`We sent a code to ${p}.`:n?.self_signup?`Enter your email to sign in or create a viewer account. No password needed.`:`Enter your email and we’ll send a short verification code. No password needed.`:`Email delivery is not configured. Ask the operator to run fanout login-link with your email address.`;return(0,P.jsx)(VM,{children:(0,P.jsxs)(A,{gap:28,children:[(0,P.jsx)(De,{}),(0,P.jsxs)(A,{gap:10,children:[(0,P.jsx)(le,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:n?.setup_required?`One-time setup`:`Secure workspace`}),(0,P.jsx)(be,{order:1,fz:{base:28,sm:32},lh:1.08,children:Ce}),Te&&(0,P.jsx)(le,{c:`dimmed`,size:`md`,lh:1.6,maw:390,children:Te})]}),(0,P.jsx)(`form`,{onSubmit:ye,children:(0,P.jsxs)(A,{gap:`md`,children:[(0,P.jsx)(Pc,{label:`Email`,placeholder:`you@company.com`,type:`email`,required:!0,value:p,onChange:e=>m(e.currentTarget.value),disabled:C,variant:`filled`,radius:`md`,size:`md`,autoFocus:!C}),n?.setup_required&&(0,P.jsx)(Pc,{label:`Display name`,placeholder:`Your display name`,value:h,onChange:e=>g(e.currentTarget.value),variant:`filled`,radius:`md`,size:`md`}),n?.setup_required&&(0,P.jsx)(Pc,{label:`Setup token`,placeholder:`from the setup URL printed at startup`,required:!0,value:_,onChange:e=>v(e.currentTarget.value),autoComplete:`one-time-code`,variant:`filled`,radius:`md`,size:`md`}),Se&&(0,P.jsxs)(A,{gap:`xs`,children:[(0,P.jsx)(le,{size:`sm`,fw:600,children:`Verification code`}),(0,P.jsx)(u,{ref:ue,children:(0,P.jsx)(Nc,{length:6,type:`number`,oneTimeCode:!0,autoFocus:!0,value:x,onChange:S,onComplete:e=>void j(e),disabled:O,error:!!re,size:`md`,radius:`md`,"aria-label":`Verification code`,getInputProps:e=>({"aria-label":`Digit ${e+1}`})})}),(0,P.jsxs)(ne,{justify:`space-between`,gap:`xs`,children:[(0,P.jsxs)(le,{c:`dimmed`,size:`xs`,children:[`Sent to `,p]}),(0,P.jsx)(se,{variant:`subtle`,size:`compact-xs`,leftSection:(0,P.jsx)(tM,{size:12,weight:`bold`}),onClick:M,disabled:O,children:`Change email`})]}),(0,P.jsxs)(ne,{justify:`space-between`,gap:`xs`,children:[(0,P.jsx)(le,{c:`dimmed`,size:`xs`,children:`Codes expire in 5 minutes`}),(0,P.jsx)(se,{variant:`subtle`,size:`compact-xs`,onClick:()=>void ve(),disabled:O||ge>0,children:ge>0?`Resend in ${ge}s`:`Resend code`})]})]}),re&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,children:re}),Se?(0,P.jsx)(se,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:O,disabled:O||x.length<6,rightSection:(0,P.jsx)(rM,{size:17,weight:`bold`}),children:`Verify code`}):(0,P.jsx)(se,{type:`submit`,size:`md`,radius:`md`,mt:4,loading:O,disabled:!n||!n.setup_required&&!n.smtp_configured,leftSection:n?.setup_required?(0,P.jsx)(DM,{size:17,weight:`bold`}):void 0,rightSection:n?.setup_required?void 0:(0,P.jsx)(rM,{size:17,weight:`bold`}),children:n?.setup_required?`Create admin`:`Send code`})]})})]})})}var GM=[`agent-threads`];async function KM(e){let t=await NM(e);if(!t.ok)throw Error(`Request failed (${t.status})`);return t.json()}var qM=[];for(let e=0;e<256;++e)qM.push((e+256).toString(16).slice(1));function JM(e,t=0){return(qM[e[t+0]]+qM[e[t+1]]+qM[e[t+2]]+qM[e[t+3]]+`-`+qM[e[t+4]]+qM[e[t+5]]+`-`+qM[e[t+6]]+qM[e[t+7]]+`-`+qM[e[t+8]]+qM[e[t+9]]+`-`+qM[e[t+10]]+qM[e[t+11]]+qM[e[t+12]]+qM[e[t+13]]+qM[e[t+14]]+qM[e[t+15]]).toLowerCase()}var YM=new Uint8Array(16);function XM(){return crypto.getRandomValues(YM)}var ZM={};function QM(e,t,n){let r;if(e)r=eN(e.random??e.rng?.()??XM(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=XM();$M(ZM,e,i),r=eN(i,ZM.msecs,ZM.seq,t,n)}return t??JM(r)}function $M(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=tN(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function eN(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=tN(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function tN(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function nN(){return QM()}var rN=[`dashboards`],iN=3e4;async function aN(e,t){let{json:n,...r}=t??{},i=new Headers(r.headers),a=r.body;n!==void 0&&(i.set(`content-type`,`application/json`),a=JSON.stringify(n));let o=await NM(e,{...r,headers:i,body:a}),s=await o.json().catch(()=>({}));if(!o.ok)throw new OM(s.message??`Request failed (${o.status})`,o.status,s.problems??[],s.code??``);return s}var oN=e=>`/api/dashboards/${encodeURIComponent(e)}`,sN=()=>aN(`/api/dashboards`).then(e=>e.dashboards),cN=(e,t)=>aN(oN(e),{signal:t}),lN=(e,t)=>aN(`${oN(e)}/versions`,{signal:t}).then(e=>e.versions),uN=(e,t,n)=>aN(`${oN(e)}/versions/${t}`,{signal:n}),dN=(e,t)=>aN(`${oN(e)}/versions/${t}/restore`,{method:`POST`}),fN=(e,t,n,r)=>aN(oN(e),{method:`PUT`,json:{spec:t,base_version:n,message:r}}),pN=(e,t,n,r)=>aN(oN(e),{method:`PATCH`,json:{operations:t,base_version:n,message:r}}),mN=(e,t)=>aN(`/api/panels/query`,{method:`POST`,json:e,signal:t}).then(e=>e.results),hN=(e,t)=>aN(`/api/annotations`,{method:`POST`,json:e,signal:t}),gN=(e,t)=>aN(`/api/panels/variables/resolve`,{method:`POST`,json:e,signal:t}).then(e=>e.options),_N=(e,t)=>aN(`/api/panels/exemplars`,{method:`POST`,json:e,signal:t});function vN(e,t){let n=new URLSearchParams({namespace:e.namespace??``,from:e.window_from,to:e.window_to,limit:`200`});return aN(`/api/traces/${encodeURIComponent(e.trace_id??``)}?${n}`,{signal:t})}function yN(){let{setColorScheme:e}=Br(),t=Ur(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`,[r,i]=(0,N.useState)(!1);return(0,P.jsx)(Ot,{label:`Switch to ${n} theme`,opened:r,children:(0,P.jsx)(Ze,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),onClick:()=>{i(!1),e(n)},children:t===`dark`?(0,P.jsx)(CM,{size:17,weight:`bold`}):(0,P.jsx)(dM,{size:17,weight:`bold`})})})}var bN={home:`https://fanout.run/start/what-fanout-is`,ingest:`https://fanout.run/start/send-telemetry`};async function xN(e,t){let n=new URLSearchParams({page_size:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await NM(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function SN({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=hA(),[f,p]=(0,N.useState)(``),[m]=pr(f.trim(),250),[h,g]=(0,N.useState)(null),[_,v]=(0,N.useState)(null),[y,b]=(0,N.useState)(``),[x,S]=(0,N.useState)(``),[w,T]=(0,N.useState)(!1),ee=(0,N.useRef)(null);(0,N.useImperativeHandle)(u,()=>({focusSearch:()=>ee.current?.focus()}),[]),(0,N.useEffect)(()=>{r&&requestAnimationFrame(()=>ee.current?.focus())},[r]);let E=zj({queryKey:[...GM,m],queryFn:({pageParam:e})=>xN(m,e),initialPageParam:``,getNextPageParam:e=>e.next_cursor??void 0,enabled:e}),D=Rj({queryKey:rN,queryFn:sN,refetchInterval:3e4,staleTime:iN}),O=(0,N.useMemo)(()=>E.data?.pages.flatMap(e=>e.items)??[],[E.data]),te=(0,N.useMemo)(()=>ON(O),[O]),re=Rj({queryKey:[`telemetry-schema`,`1h`],queryFn:()=>KM(`/api/telemetry/schema?window=1h`),enabled:!!m&&!!l,staleTime:6e4}),k=(0,N.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(re.data?.services??[]).map(e=>e.value).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[re.data,m]),ie=(0,N.useMemo)(()=>{let e=D.data??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[D.data,m]);function ae(e){S(``),b(e.title),g(e)}async function oe(){if(h&&y.trim()){T(!0),S(``);try{let e=await NM(`/api/agent/threads/${encodeURIComponent(h.id)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:y.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:GM}),g(null)}catch(e){S(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{T(!1)}}}async function ce(){if(_){T(!0),S(``);try{let e=await NM(`/api/agent/threads/${encodeURIComponent(_.id)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=_.id;v(null),await d.invalidateQueries({queryKey:GM}),await d.invalidateQueries({queryKey:rN}),o(t)}catch(e){S(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{T(!1)}}}return(0,P.jsxs)(A,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,P.jsx)(se,{leftSection:(0,P.jsx)(_M,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,P.jsx)(wt,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,P.jsxs)(A,{gap:`lg`,pb:`sm`,children:[e&&(0,P.jsxs)(A,{gap:4,children:[(0,P.jsx)(CN,{children:`Chats`}),E.isLoading&&(0,P.jsx)(ke,{py:`md`,children:(0,P.jsx)(Pe,{size:`xs`})}),E.isError&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!E.isLoading&&!E.isError&&O.length===0&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),te.map(e=>(0,P.jsxs)(A,{gap:2,children:[te.length>1&&(0,P.jsx)(le,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,P.jsx)(wN,{thread:e,active:e.id===t,onSelect:()=>a(e.id),onRename:()=>ae(e),onDelete:()=>{S(``),v(e)}},e.id))]},e.label)),E.hasNextPage&&(0,P.jsx)(se,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:E.isFetchingNextPage,onClick:()=>void E.fetchNextPage(),children:`See all`})]}),m&&l&&re.isLoading&&(0,P.jsx)(ke,{py:`md`,children:(0,P.jsx)(Pe,{size:`xs`})}),m&&l&&(re.isSuccess||re.isError)&&(0,P.jsxs)(A,{gap:4,children:[(0,P.jsx)(CN,{children:`Services`}),re.isError&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,children:`Services could not be searched`}),re.isSuccess&&k.length===0&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,children:`No matching services`}),k.map(e=>(0,P.jsx)(C,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,P.jsx)(le,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,P.jsxs)(A,{gap:4,children:[(0,P.jsx)(CN,{children:`Dashboards`}),D.isLoading&&(0,P.jsx)(ke,{py:`md`,children:(0,P.jsx)(Pe,{size:`xs`})}),D.isError&&(0,P.jsx)(xe,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!D.isLoading&&!D.isError&&m&&ie.length===0&&(0,P.jsx)(le,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),ie.map(e=>{let t=e.id===n;return(0,P.jsxs)(A,{gap:0,children:[(0,P.jsx)(C,{component:`a`,href:`/dashboards/${encodeURIComponent(e.id)}`,className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:t=>{t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),s(e.id))},children:(0,P.jsxs)(ne,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,P.jsx)(le,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,P.jsx)(tt,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})}),e.origin&&(0,P.jsx)(C,{component:`a`,href:`/chat/${encodeURIComponent(e.origin.thread_id)}`,"data-request-provenance":!0,px:`sm`,pb:`xs`,onClick:t=>{t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),a(e.origin.thread_id))},children:(0,P.jsxs)(le,{size:`xs`,c:`dimmed`,lineClamp:2,children:[`Built from: `,e.origin.request_excerpt]})})]},e.id)}),e&&(0,P.jsx)(se,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,P.jsx)(xM,{size:14,weight:`fill`}),onClick:c,children:D.data?.length===0?`New dashboard`:`Create with AI`})]})]})}),(0,P.jsx)(Pc,{ref:ee,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,P.jsx)(lM,{size:15}),rightSection:(0,P.jsx)(Es,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,P.jsx)(Dc,{opened:h!==null,onClose:()=>!w&&g(null),title:`Rename chat`,centered:!0,children:(0,P.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),oe()},children:(0,P.jsxs)(A,{children:[(0,P.jsx)(Pc,{label:`Name`,value:y,onChange:e=>b(e.currentTarget.value),maxLength:120,autoFocus:!0}),x&&(0,P.jsx)(xe,{color:`bad`,children:x}),(0,P.jsxs)(ne,{justify:`flex-end`,children:[(0,P.jsx)(se,{variant:`default`,onClick:()=>g(null),disabled:w,children:`Cancel`}),(0,P.jsx)(se,{type:`submit`,loading:w,disabled:!y.trim(),children:`Save`})]})]})})}),(0,P.jsx)(Dc,{opened:_!==null,onClose:()=>!w&&v(null),title:`Delete chat?`,centered:!0,children:(0,P.jsxs)(A,{children:[(0,P.jsxs)(le,{size:`sm`,children:[`This permanently removes `,(0,P.jsx)(le,{span:!0,fw:650,children:_?.title}),` and its saved messages.`]}),x&&(0,P.jsx)(xe,{color:`bad`,children:x}),(0,P.jsxs)(ne,{justify:`flex-end`,children:[(0,P.jsx)(se,{variant:`default`,onClick:()=>v(null),disabled:w,children:`Cancel`}),(0,P.jsx)(se,{color:`bad`,loading:w,onClick:()=>void ce(),children:`Delete`})]})]})})]})}function CN({children:e}){return(0,P.jsx)(le,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function wN({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,P.jsx)(u,{"data-active":t||void 0,className:`rail-row`,children:(0,P.jsxs)(ne,{gap:2,wrap:`nowrap`,children:[(0,P.jsx)(C,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,P.jsxs)(A,{gap:0,children:[(0,P.jsx)(le,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,P.jsx)(le,{c:`dimmed`,size:`xs`,children:kN(e.updated_at)})]})}),(0,P.jsxs)(dc,{position:`bottom-end`,withinPortal:!0,children:[(0,P.jsx)(dc.Target,{children:(0,P.jsx)(Ze,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,P.jsx)(sM,{size:18,weight:`bold`})})}),(0,P.jsxs)(dc.Dropdown,{children:[(0,P.jsx)(dc.Item,{leftSection:(0,P.jsx)(pM,{size:15}),onClick:r,children:`Rename`}),(0,P.jsx)(dc.Item,{color:`bad`,leftSection:(0,P.jsx)(TM,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function TN(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function EN(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var DN=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function ON(e){let t=EN(new Date),n=new Map;for(let r of e){let e=Math.floor((t-EN(TN(r.updated_at)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return DN.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function kN(e){let t=TN(e),n=EN(new Date);return Math.floor((n-EN(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function AN({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=it(),s=Le(),c=Xn({select:e=>e.location.pathname}),{dashboardId:l}=Sn({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=Dr(!1),[p,m]=(0,N.useState)(!1),[h,g]=(0,N.useState)(``),_=(0,N.useRef)(null),v=ie(`(max-width: 62em)`),y=(0,N.useRef)(v);y.current=v,(0,N.useEffect)(()=>{f.close()},[c]),(0,N.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{}}),onCreateDashboard:()=>o(Qe),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,P.jsxs)(Bo,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,P.jsx)(Bo.Header,{children:(0,P.jsxs)(ne,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,P.jsxs)(ne,{gap:`sm`,wrap:`nowrap`,children:[(0,P.jsx)(es,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,P.jsx)(De,{size:`small`})]}),(0,P.jsxs)(ne,{gap:`xs`,wrap:`nowrap`,children:[(0,P.jsx)(Ot,{label:`Documentation`,children:(0,P.jsx)(Ze,{component:`a`,href:bN.home,target:`_blank`,rel:`noopener noreferrer`,variant:`subtle`,color:`gray`,"aria-label":`Documentation`,children:(0,P.jsx)(aM,{size:17,weight:`bold`})})}),(0,P.jsx)(yN,{}),(0,P.jsx)(jN,{onError:g})]})]})}),(0,P.jsx)(Bo.Navbar,{p:`sm`,children:(0,P.jsx)(SN,{ref:_,...b})}),(0,P.jsx)(Cs,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,P.jsx)(De,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,P.jsx)(SN,{...b,autoFocusSearch:d&&p})}),(0,P.jsxs)(Bo.Main,{children:[h&&(0,P.jsx)(xe,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function jN({onError:e}){let t=Le(),n=RM(),r=(n.display_name.trim()||n.email.trim()||`?`).charAt(0).toUpperCase();return(0,P.jsxs)(dc,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,P.jsx)(dc.Target,{children:(0,P.jsx)(Ze,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`${r} account menu`,children:(0,P.jsx)(Zo,{size:26,radius:`xl`,color:`brand`,children:r})})}),(0,P.jsxs)(dc.Dropdown,{children:[(0,P.jsx)(dc.Label,{children:n.email||`Signed in`}),(0,P.jsx)(dc.Item,{leftSection:(0,P.jsx)(hM,{size:15}),onClick:()=>void t({to:`/settings`}),children:`Connect telemetry`}),(0,P.jsx)(dc.Divider,{}),(0,P.jsx)(dc.Item,{leftSection:(0,P.jsx)(yM,{size:15}),onClick:()=>void PM().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function MN(){let{agent_available:e}=IM(),t=Le(),n=hA(),{threadId:r}=Sn({strict:!1}),[i,a]=(0,N.useState)(nN),o=(0,N.useRef)(new Set),s=r??i,[c,l]=(0,N.useState)([]),[u,d]=(0,N.useState)({}),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(!1),[g,_]=(0,N.useState)(!1),[v,y]=(0,N.useState)(``),[b,x]=(0,N.useState)(null),S=(0,N.useRef)(null),[C,w]=(0,N.useState)(!1),T=(0,N.useRef)(!1),[ee,E]=(0,N.useState)(``),[D,O]=(0,N.useState)(``),[te,ne]=(0,N.useState)(0),re=(0,N.useRef)(null),k=(0,N.useRef)({}),ie=(0,N.useRef)(null),ae=(0,N.useRef)(new Map),A=(0,N.useMemo)(()=>new pA({url:`/api/agent/runs`,threadId:s,fetch:(e,t)=>NM(e,t)}),[s]),oe=!e||f===s;function se(){ae.current.clear(),y(``),S.current=null,x(null)}let ce=e=>e.filter(e=>e.role!==`reasoning`);function le(){let e=S.current?.text.split(/(?<=[.!?])\s/)[0]?.trim().replace(/[.!?]+$/,``);return e?e+`…`:``}function ue(e){return T.current||e instanceof Error&&e.name===`AbortError`}(0,N.useEffect)(()=>{let t=!0;if(l([]),k.current={},d({}),p(``),h(!1),_(!1),T.current=!1,w(!1),se(),O(``),!e){p(s);return}!r||o.current.has(s)?(A.setMessages([]),p(s)):NM(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}A.setMessages(ce(e.messages??[])),l(ce(e.messages??[])),p(s)}}).catch(()=>{t&&(re.current=null,O(`This chat could not be restored. Start a new chat or try again.`))});let i=A.subscribe({onEvent:({event:e,messages:t})=>{switch(e.type){case`REASONING_MESSAGE_START`:return S.current={id:e.messageId,text:``,collapsed:!1},x(S.current),y(``),{stopPropagation:!0};case`REASONING_MESSAGE_CONTENT`:{let t=e,n={id:t.messageId,text:(S.current?.text??``)+t.delta,collapsed:!1};return S.current=n,x(n),{stopPropagation:!0}}case`REASONING_START`:case`REASONING_MESSAGE_END`:case`REASONING_END`:return{stopPropagation:!0};default:l(ce(t))}},onMessagesChanged:({messages:e})=>l(ce(e)),onRunInitialized:()=>{T.current=!1,w(!1),_(!0),O(``)},onTextMessageContentEvent:({event:e})=>{e.delta&&(S.current=null,x(null),y(``))},onToolCallStartEvent:({event:e})=>{ae.current.set(e.toolCallId,rt(e.toolCallName)),y(rt(e.toolCallName)),S.current&&(S.current={...S.current,collapsed:!0},x(S.current))},onToolCallResultEvent:({event:e,messages:t})=>{ae.current.delete(e.toolCallId),y([...ae.current.values()].at(-1)??le());let r=ot(e.toolCallId,e.content,t);r&&(n.invalidateQueries({queryKey:rN}),n.invalidateQueries({queryKey:[`dashboard`,r.id]}),n.invalidateQueries({queryKey:[`dashboard-versions`,r.id]}))},onRunErrorEvent:({event:e})=>{e.code===`abort`||T.current?(O(``),w(!0)):(console.warn(`Agent run error`,e.code),O(Je(e.code))),_(!1),se()},onRunFinalized:({messages:e})=>{let t=ce(e);l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),se(),o.current.delete(s),n.invalidateQueries({queryKey:GM})},onRunFailed:e=>{ue(e.error)?(O(``),w(!0)):(console.error(`Agent run failed`,e),O(Je())),_(!1),se(),o.current.delete(s),n.invalidateQueries({queryKey:GM})}});return()=>{t=!1,i.unsubscribe(),A.abortRun()}},[A,e,n,te,s]),(0,N.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>ie.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>ie.current?.focus()))),e.key===`Escape`&&n===ie.current&&(E(``),ie.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function de(){_(!0),O(``);try{await A.runAgent({forwardedProps:{...k.current}})}catch(e){ue(e)?(O(``),w(!0)):(console.error(`Agent run failed`,e),O(Je())),_(!1),se(),o.current.delete(s)}}async function fe(n,i){let a=n.trim();if(!e||!a||g||!oe||m)return;k.current={...i},r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let c={id:nN(),role:`user`,content:a};A.addMessage(c),l([...A.messages]),d(e=>({...e,[c.id]:Date.now()})),E(``),await de()}(0,N.useEffect)(()=>{let e=re.current;oe&&r&&e&&(re.current=null,fe(e.text,e.options))},[oe,r,s]);function pe(e){e.preventDefault(),fe(ee)}function me(){T.current=!0,O(``),w(!0),A.abortRun(),_(!1),se(),o.current.delete(s)}function he(){!g&&A.messages.some(e=>e.role===`user`)&&de()}function ge(n,r){if(!e)return;let i=nN();o.current.add(i),re.current=n?{text:n,options:{...r}}:null,t({to:`/chat/$threadId`,params:{threadId:i}})}function _e(){A.abortRun(),re.current=null,k.current={},a(nN()),t({to:`/chat`})}function ve(e){re.current=null,k.current={},t({to:`/chat/$threadId`,params:{threadId:e}})}function j(){ne(e=>e+1)}return(0,P.jsx)(nt.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:oe,running:g,activity:v,provisional:b,stopped:C,input:ee,setInput:E,error:D,inputRef:ie,send:fe,submit:pe,stop:me,retry:he,reloadThread:j,openChat:ge,newThread:_e,selectThread:ve},children:(0,P.jsx)(AN,{children:(0,P.jsx)(Bn,{})})})}function NN(){let e=(0,N.useMemo)(()=>new Tj,[]);return(0,P.jsx)(gA,{client:e,children:(0,P.jsx)(WM,{children:(0,P.jsx)(MN,{})})})}var PN=On({component:NN,notFoundComponent:()=>(0,P.jsx)(ze,{to:`/`,replace:!0})}),FN=kn(`/`)({component:An(()=>at(()=>import(`./routes-D2AdaqvY.js`),__vite__mapDeps([0,1,2])),`component`)}),IN=kn(`/settings`)({component:An(()=>at(()=>import(`./settings-BrSVFiz-.js`),__vite__mapDeps([3,1,4,5,6])),`component`)}),LN=kn(`/chat/`)({component:An(()=>at(()=>import(`./chat.index-CCMEkLpv.js`),__vite__mapDeps([7,8,1,4,9,5,10])),`component`)}),RN=kn(`/chat/$threadId`)({component:An(()=>at(()=>import(`./chat._threadId-CCMEkLpv.js`),__vite__mapDeps([11,8,1,4,9,5,10])),`component`)});function zN(e){try{let t=typeof e==`string`?e:JSON.stringify(e);if(!t||t.length>4096)return;let n=typeof e==`string`?JSON.parse(e):e;if(!n||typeof n!=`object`)return;let r=n;return typeof r.panel_id!=`string`||!/^([a-z][a-z0-9_]{0,39})$/.test(r.panel_id)||r.kind!==`traces`&&r.kind!==`logs`||typeof r.from!=`string`||typeof r.to!=`string`||!Number.isFinite(Date.parse(r.from))||!Number.isFinite(Date.parse(r.to))||Date.parse(r.from)>=Date.parse(r.to)||Date.parse(r.to)-Date.parse(r.from)>2592e6||typeof r.window_from!=`string`||typeof r.window_to!=`string`||!Number.isFinite(Date.parse(r.window_from))||!Number.isFinite(Date.parse(r.window_to))||Date.parse(r.window_from)>=Date.parse(r.window_to)||Date.parse(r.window_to)-Date.parse(r.window_from)>2592e6||Date.parse(r.from)Date.parse(r.window_to)||!r.dimensions||Array.isArray(r.dimensions)||typeof r.dimensions!=`object`||Object.keys(r.dimensions).length>3||Object.values(r.dimensions).some(e=>typeof e!=`string`||e.length>500)||r.trace_id!==void 0&&(typeof r.trace_id!=`string`||r.trace_id.length>128)||r.namespace!==void 0&&(typeof r.namespace!=`string`||r.namespace.length>200)||r.bucket&&(!Number.isFinite(r.bucket.lower)||r.bucket.lower<0||r.bucket.upper!==void 0&&(!Number.isFinite(r.bucket.upper)||r.bucket.upper<=r.bucket.lower))?void 0:{panel_id:r.panel_id,kind:r.kind,from:r.from,to:r.to,window_from:r.window_from,window_to:r.window_to,dimensions:r.dimensions,trace_id:r.trace_id,namespace:r.namespace,bucket:r.bucket}}catch{return}}function BN(e,t,n){if(!e.drill&&e.viz!==`service_map`&&!n.trace_id||t.from_ms===void 0||t.to_ms===void 0)return;let r=t.from_ms,i=t.to_ms;if(n.from!==void 0&&n.to!==void 0&&(r=Math.max(r,Date.parse(n.from)),i=Math.min(i,Date.parse(n.to))),n.time!==void 0&&!n.trace_id){let e=/^(\d+)(s|m|h|d)$/.exec(t.interval??``),a=e?Number(e[1])*{s:1e3,m:6e4,h:36e5,d:864e5}[e[2]]:6e4;r=Math.max(r,n.time),i=Math.min(i,n.time+a)}return zN(JSON.stringify({panel_id:e.id,kind:n.trace_id||e.viz===`service_map`?`traces`:e.drill,from:n.from&&Date.parse(n.from)===r?n.from:new Date(r).toISOString(),to:n.to&&Date.parse(n.to)===i?n.to:new Date(i).toISOString(),window_from:new Date(t.from_ms).toISOString(),window_to:new Date(t.to_ms).toISOString(),dimensions:n.dimensions,trace_id:n.trace_id,namespace:n.namespace,bucket:n.bucket}))}function VN(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))for(let e of Array.isArray(r)?r:[r]){if(e===void 0)continue;let r=typeof e==`string`&&/^[{"]/.test(e);t.append(n,r||typeof e==`object`&&e?JSON.stringify(e):String(e))}let n=t.toString();return n?`?${n}`:``}function HN(e){let t=Object.create(null),n=e=>{if(e.startsWith(`{`)||e.startsWith(`"`))try{let t=JSON.parse(e);if(typeof t==`string`)return/^[{"]/.test(t)?t:e;if(typeof t==`object`&&t&&!Array.isArray(t))return t}catch{}return e},r=new URLSearchParams(e);for(let e of new Set(r.keys())){let i=r.getAll(e).map(n);t[e]=i.length===1?i[0]:i}return t}var UN=[`5m`,`15m`,`1h`,`3h`,`6h`,`12h`,`24h`,`2d`,`7d`,`30d`],WN=[`off`,`10s`,`30s`,`1m`,`5m`],GN=e=>{if(typeof e!=`string`||!/^\d{4}-\d{2}-\d{2}[Tt](?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:[Zz]|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/.test(e)||Number.isNaN(Date.parse(e)))return!1;let[t,n,r]=e.slice(0,10).split(`-`).map(Number),i=new Date(0);return i.setUTCFullYear(t,n-1,r),i.setUTCHours(0,0,0,0),i.getUTCFullYear()===t&&i.getUTCMonth()===n-1&&i.getUTCDate()===r},KN=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`?String(e):void 0;function qN(e){let t={};typeof e.range==`string`&&UN.includes(e.range)?t.range=e.range:GN(e.from)&&GN(e.to)&&Date.parse(e.from)typeof e==`string`)&&(i[e]=t)}}else{let t=KN(n);t!==void 0&&(i[e]=t)}}}Object.keys(i).length>0&&(t.vars=i);let a=zN(e.drill);return a&&(t.drill=JSON.stringify(a)),t}function JN(e){let t={};e.drill&&(t.drill=JSON.parse(e.drill)),e.range&&(t.range=e.range),e.from&&e.to&&(t.from=e.from,t.to=e.to),e.compare&&(t.compare=e.compare),e.view&&(t.view=e.view),e.edit&&(t.edit=e.edit);for(let[n,r]of Object.entries(e.vars??{}))t[`var-${n}`]=Array.isArray(r)?{values:r}:r;return t}function YN(e,t){let n=new URL(e);return n.search=VN(JN({...qN(HN(n.search)),drill:JSON.stringify(t)})),n.href}function XN(e,t){let n=e.time.refresh??`30s`;return t.from&&t.to?{from:t.from,to:t.to,refresh:n}:t.range?{range:t.range,refresh:n}:{...e.time,refresh:n}}var ZN=kn(`/dashboards/`)({component:An(()=>at(()=>import(`./dashboards.index-BVYRlf74.js`),__vite__mapDeps([12,1,2,13,4,9,5,10,6])),`component`),validateSearch:e=>JN(qN(e))}),QN=kn(`/dashboards/$dashboardId`)({component:An(()=>at(()=>import(`./dashboards._dashboardId-2NY5m2dv.js`),__vite__mapDeps([14,1,2,13,4,9,5,10,6])),`component`),validateSearch:e=>JN(qN(e))}),$N=FN.update({id:`/`,path:`/`,getParentRoute:()=>PN}),eP=IN.update({id:`/settings`,path:`/settings`,getParentRoute:()=>PN}),tP=LN.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>PN}),nP=RN.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>PN}),rP=ZN.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>PN}),iP={IndexRoute:$N,SettingsRoute:eP,ChatThreadIdRoute:nP,DashboardsDashboardIdRoute:QN.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>PN}),ChatIndexRoute:tP,DashboardsIndexRoute:rP},aP=Kn({routeTree:PN._addFileChildren(iP)._addFileTypes(),parseSearch:HN,stringifySearch:VN,defaultPreload:`intent`,scrollRestoration:!0}),oP=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],sP=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],cP=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],lP=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],uP=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],dP=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],fP={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#626777`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#8c939d`}},pP={dark:[`#3987e5`,`#d95926`,`#199e70`,`#9085e9`,`#c98500`,`#d55181`],light:[`#2a78d6`,`#eb6834`,`#1baf7a`,`#4a3aa7`,`#eda100`,`#e87ba4`]},mP={micro:11,small:12,body:14,title:16,section:22,page:32},hP={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},gP={brand:sP,ok:cP,warn:lP,bad:uP,info:dP},_P={light:7,dark:5};function vP(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function yP(e){let t=vP(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function bP(e){return Object.fromEntries(Object.entries(gP).map(([t,n])=>[`--fanout-color-${t}-contrast`,yP(n[_P[e]])]))}function xP(e){return t=>{let n=t.color??wP.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(gP,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var SP=.25,CP={xs:9,sm:10,md:11,lg:13,xl:16},wP={primaryColor:`brand`,primaryShade:_P,autoContrast:!0,luminanceThreshold:SP,colors:{dark:oP,brand:sP,ok:cP,warn:lP,bad:uP,info:dP},defaultRadius:`md`,fontFamily:hP.body,fontFamilyMonospace:hP.display,headings:{fontFamily:hP.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:DP(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:DP(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:EP(t.size)})},Menu:{defaultProps:{withInitialFocusPlaceholder:!1}},Drawer:{defaultProps:{closeButtonProps:{"aria-label":`Close`}}},Modal:{defaultProps:{closeButtonProps:{"aria-label":`Close`}}}}},TP=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":fP.light.muted,...bP(`light`)},dark:bP(`dark`)});function EP(e){let t=CP[e??`md`];return t===void 0||t>=mP.micro?{}:{"--badge-fz":`${mP.micro/16}rem`}}function DP(e,t){return!e||e===wP.primaryColor?{[t]:`var(--fanout-color-${wP.primaryColor}-contrast)`}:{}}var OP=xP(ee),kP=ri({...wP,variantColorResolver:OP});(0,Hc.createRoot)(document.getElementById(`root`)).render((0,P.jsx)(N.StrictMode,{children:(0,P.jsx)(ni,{theme:kP,defaultColorScheme:`auto`,cssVariablesResolver:TP,children:(0,P.jsx)(Yn,{router:aP})})}));export{Ny as $,hN as A,Dc as At,TM as B,Ur as Bt,rN as C,_y as Ct,sN as D,i_ as Dt,uN as E,a_ as Et,dN as F,Vo as Ft,ZA as G,Qn as Gt,sM as H,Er as Ht,KM as I,$a as It,xA as J,ln as Jt,qA as K,gn as Kt,RM as L,Ei as Lt,mN as M,Es as Mt,fN as N,Cs as Nt,lN as O,Kf as Ot,gN as P,rs as Pt,Py as Q,NM as R,hi as Rt,bN as S,Hy as St,vN as T,l_ as Tt,Rj as U,cr as Ut,pM as V,Ir as Vt,xj as W,rr as Wt,UA as X,NA as Y,hA as Z,UN as _,ox as _t,fP as a,yb as at,BN as b,Cb as bt,cP as c,Ry as ct,lP as d,q as dt,ib as et,QN as f,K as ft,qN as g,Ib as gt,XN as h,xb as ht,sP as i,G as it,_N as j,dc as jt,pN as k,Pc as kt,pP as l,Db as lt,YN as m,ab as mt,vP as n,fb as nt,hP as o,cb as ot,ZN as p,_b as pt,kA as q,on as qt,uP as r,ub as rt,dP as s,Tb as st,yP as t,jb as tt,mP as u,tx as ut,WN as v,kb as vt,cN as w,dy as wt,zN as x,hb as xt,JN as y,U as yt,OM as z,ai as zt}; \ No newline at end of file diff --git a/internal/ui/dist/assets/mcp-app-frame-eVpUegSR.js b/internal/ui/dist/assets/mcp-app-frame-jpeBZ36G.js similarity index 99% rename from internal/ui/dist/assets/mcp-app-frame-eVpUegSR.js rename to internal/ui/dist/assets/mcp-app-frame-jpeBZ36G.js index aab0c0e5a..2408be18a 100644 --- a/internal/ui/dist/assets/mcp-app-frame-eVpUegSR.js +++ b/internal/ui/dist/assets/mcp-app-frame-jpeBZ36G.js @@ -1,4 +1,4 @@ -import{i as e,r as t,s as n}from"./useRouter-ByJ6_rwb.js";import{C as r,d as i,f as a,p as o,u as s,y as c}from"./brand-DUaZkIz1.js";import{n as l}from"./chat-D2upr1iS.js";import{$ as u,Bt as d,Ct as f,Dt as p,Et as m,Ot as h,Q as g,R as _,Rt as v,St as y,Tt as b,_t as ee,at as x,bt as S,ct as C,dt as w,et as te,ft as T,gt as E,ht as D,it as ne,lt as re,mt as O,nt as ie,ot as k,pt as ae,rt as oe,st as se,tt as A,ut as ce,vt as j,wt as M,xt as N,yt as P}from"./index-Bz4uzIyA.js";var le={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},ue;ue||={};function de(e){return p(u,e)}function fe(e){return m(g,e)}function pe(e){return b(te,e)}function F(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function I(e,t){if(!Array.isArray(e))return[];let n=new Set(t);return e.filter(e=>{if(typeof e!=`string`||/[\s;'\"]/.test(e))return!1;let t=e.match(/^([a-z]+):\/\/([^/]+)$/i);return!!(t&&n.has(t[1].toLowerCase()))})}function me(e){let t=F(F(F(e)?.ui)?.csp),n=I(t?.connectDomains,[`http`,`https`,`ws`,`wss`]),r=I(t?.resourceDomains,[`http`,`https`]),i=I(t?.frameDomains,[`http`,`https`]),a=I(t?.baseUriDomains,[`http`,`https`]),o=r.length?` ${r.join(` `)}`:``,s=[`default-src 'none'`,`worker-src blob:`,`script-src 'self' 'unsafe-inline'${o}`,`style-src 'self' 'unsafe-inline'${o}`,`img-src 'self' data:${o}`,`media-src 'self' data:${o}`,`font-src 'self' data:${o}`,`connect-src ${n.length?n.join(` `):`'none'`}`];return i.length&&s.push(`frame-src ${i.join(` `)}`),a.length&&s.push(`base-uri ${a.join(` `)}`),`${s.join(`; `)};`}var he=Object.create,ge=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,ve=Object.getOwnPropertyNames,L=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty,be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xe=(e,t)=>{let n={};for(var r in e)ge(n,r,{get:e[r],enumerable:!0});return t&&ge(n,Symbol.toStringTag,{value:`Module`}),n},Se=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ve(t),a=0,o=i.length,s;at[e]).bind(null,s),enumerable:!(r=_e(t,s))||r.enumerable});return e},Ce=(e,t,n)=>(n=e==null?{}:he(L(e)),Se(t||!e||!e.__esModule?ge(n,`default`,{value:e,enumerable:!0}):n,e)),we=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),Te=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),Ee=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),De=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function Oe(e){return typeof e==`string`&&Te.has(e.replace(/#$/,``))}function ke(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(we.has(n))return`2020-12`;if(Te.has(n))return`2019-09`;if(Ee.has(n)||De.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Ae=`2025-11-25`,je=[Ae,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Me=`io.modelcontextprotocol/related-task`,Ne=`io.modelcontextprotocol/protocolVersion`,Pe=`io.modelcontextprotocol/clientInfo`,Fe=`io.modelcontextprotocol/serverInfo`,Ie=`io.modelcontextprotocol/clientCapabilities`,Le=`io.modelcontextprotocol/subscriptionId`,Re=`io.modelcontextprotocol/logLevel`,ze=ce(()=>S([P(),O(),k(),ie(),j(P(),ze),x(ze)])),R=j(P(),ze),Be=x(ze),Ve=S([P(),O().int()]),He=P(),Ue=D({ttl:O().optional()}),We=D({taskId:P()}),Ge=T({progressToken:Ve.optional(),[Me]:We.optional()}),z=D({_meta:Ge.optional()}),Ke=z.extend({task:Ue.optional()}),B=D({method:P(),params:z.loose().optional()}),V=D({_meta:Ge.optional()}),H=D({method:P(),params:V.loose().optional()}),qe=T({get[Fe](){return W.optional().catch(void 0)}}),U=T({_meta:qe.optional()}),Je=S([P(),O().int()]),Ye=D({jsonrpc:w(`2.0`),id:Je,...B.shape}).strict(),Xe=D({jsonrpc:w(`2.0`),...H.shape}).strict(),Ze=D({jsonrpc:w(`2.0`),id:Je,result:U}).strict(),Qe=D({jsonrpc:w(`2.0`),id:Je.optional(),error:D({code:O().int(),message:P(),data:N().optional()})}).strict(),$e=S([Ye,Xe,Ze,Qe]),et=S([Ze,Qe]),tt=U.strict(),nt=V.extend({requestId:Je.optional(),reason:P().optional()}),rt=H.extend({method:w(`notifications/cancelled`),params:nt}),it=D({src:P(),mimeType:P().optional(),sizes:x(P()).optional(),theme:A([`light`,`dark`]).optional()}),at=D({icons:x(it).optional()}),ot=D({name:P(),title:P().optional()}),W=ot.extend({...ot.shape,...at.shape,version:P(),websiteUrl:P().optional(),description:P().optional()}),st=re(D({applyDefaults:k().optional()}),R),ct=ee(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,re(D({form:st.optional(),url:R.optional()}),R.optional())),lt=T({list:R.optional(),cancel:R.optional(),requests:T({sampling:T({createMessage:R.optional()}).optional(),elicitation:T({create:R.optional()}).optional()}).optional()}),ut=T({list:R.optional(),cancel:R.optional(),requests:T({tools:T({call:R.optional()}).optional()}).optional()}),dt=D({experimental:j(P(),R).optional(),sampling:D({context:R.optional(),tools:R.optional()}).optional(),elicitation:ct.optional(),roots:D({listChanged:k().optional()}).optional(),tasks:lt.optional(),extensions:j(P(),R).optional()}),ft=z.extend({protocolVersion:P(),capabilities:dt,clientInfo:W}),pt=B.extend({method:w(`initialize`),params:ft}),mt=D({experimental:j(P(),R).optional(),logging:R.optional(),completions:R.optional(),prompts:D({listChanged:k().optional()}).optional(),resources:D({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:D({listChanged:k().optional()}).optional(),tasks:ut.optional(),extensions:j(P(),R).optional()}),ht=U.extend({protocolVersion:P(),capabilities:mt,serverInfo:W,instructions:P().optional()}),gt=H.extend({method:w(`notifications/initialized`),params:V.optional()}),_t=B.extend({method:w(`server/discover`),params:z.optional()}),vt=U.extend({supportedVersions:x(P()),capabilities:mt,instructions:P().optional()}),yt=B.extend({method:w(`ping`),params:z.optional()}),bt=D({progress:O(),total:E(O()),message:E(P())}),xt=D({...V.shape,...bt.shape,progressToken:Ve}),St=H.extend({method:w(`notifications/progress`),params:xt}),Ct=z.extend({cursor:He.optional()}),wt=B.extend({params:Ct.optional()}),Tt=U.extend({nextCursor:He.optional()}),Et=D({uri:P(),mimeType:E(P()),_meta:j(P(),N()).optional()}),Dt=Et.extend({text:P()}),Ot=P().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),kt=Et.extend({blob:Ot}),At=A([`user`,`assistant`]),jt=D({audience:x(At).optional(),priority:O().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),Mt=D({...ot.shape,...at.shape,uri:P(),description:E(P()),mimeType:E(P()),size:E(O()),annotations:jt.optional(),_meta:E(T({}))}),Nt=D({...ot.shape,...at.shape,uriTemplate:P(),description:E(P()),mimeType:E(P()),annotations:jt.optional(),_meta:E(T({}))}),Pt=wt.extend({method:w(`resources/list`)}),Ft=Tt.extend({resources:x(Mt)}),It=wt.extend({method:w(`resources/templates/list`)}),Lt=Tt.extend({resourceTemplates:x(Nt)}),Rt=z.extend({uri:P()}),zt=Rt,Bt=B.extend({method:w(`resources/read`),params:zt}),Vt=U.extend({contents:x(S([Dt,kt]))}),Ht=H.extend({method:w(`notifications/resources/list_changed`),params:V.optional()}),Ut=Rt,Wt=B.extend({method:w(`resources/subscribe`),params:Ut}),Gt=Rt,Kt=B.extend({method:w(`resources/unsubscribe`),params:Gt}),qt=D({toolsListChanged:k().optional(),promptsListChanged:k().optional(),resourcesListChanged:k().optional(),resourceSubscriptions:x(P()).optional()}),Jt=z.extend({notifications:qt}),Yt=B.extend({method:w(`subscriptions/listen`),params:Jt}),Xt=V.extend({notifications:qt}),Zt=H.extend({method:w(`notifications/subscriptions/acknowledged`),params:Xt}),Qt=qe.extend({[Le]:Je}),$t=U.extend({_meta:Qt}),en=V.extend({uri:P()}),tn=H.extend({method:w(`notifications/resources/updated`),params:en}),G=D({name:P(),description:E(P()),required:E(k())}),nn=D({...ot.shape,...at.shape,description:E(P()),arguments:E(x(G)),_meta:E(T({}))}),rn=wt.extend({method:w(`prompts/list`)}),an=Tt.extend({prompts:x(nn)}),on=z.extend({name:P(),arguments:j(P(),P()).optional()}),sn=B.extend({method:w(`prompts/get`),params:on}),cn=D({type:w(`text`),text:P(),annotations:jt.optional(),_meta:j(P(),N()).optional()}),K=D({type:w(`image`),data:Ot,mimeType:P(),annotations:jt.optional(),_meta:j(P(),N()).optional()}),ln=D({type:w(`audio`),data:Ot,mimeType:P(),annotations:jt.optional(),_meta:j(P(),N()).optional()}),un=D({type:w(`tool_use`),name:P(),id:P(),input:j(P(),N()),_meta:j(P(),N()).optional()}),dn=D({type:w(`resource`),resource:S([Dt,kt]),annotations:jt.optional(),_meta:j(P(),N()).optional()}),fn=Mt.extend({type:w(`resource_link`)}),pn=S([cn,K,ln,fn,dn]),mn=D({role:At,content:pn}),hn=U.extend({description:P().optional(),messages:x(mn)}),gn=H.extend({method:w(`notifications/prompts/list_changed`),params:V.optional()}),_n=D({title:P().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),vn=D({taskSupport:A([`required`,`optional`,`forbidden`]).optional()}),yn=D({...ot.shape,...at.shape,description:P().optional(),inputSchema:D({type:w(`object`),properties:j(P(),ze).optional(),required:x(P()).optional()}).catchall(N()),outputSchema:T({$schema:P().optional()}).optional(),annotations:_n.optional(),execution:vn.optional(),_meta:j(P(),N()).optional()}),bn=wt.extend({method:w(`tools/list`)}),xn=Tt.extend({tools:x(yn)}),Sn=U.extend({content:x(pn).default([]),structuredContent:N().optional(),isError:k().optional()}),Cn=Sn.or(U.extend({toolResult:N()})),wn=Ke.extend({name:P(),arguments:j(P(),N()).optional()}),Tn=B.extend({method:w(`tools/call`),params:wn}),En=H.extend({method:w(`notifications/tools/list_changed`),params:V.optional()}),Dn=D({autoRefresh:k().default(!0),debounceMs:O().int().nonnegative().default(300)}),On=A([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),kn=z.extend({level:On}),An=B.extend({method:w(`logging/setLevel`),params:kn}),jn=V.extend({level:On,logger:P().optional(),data:N()}),Mn=H.extend({method:w(`notifications/message`),params:jn}),Nn=D({name:P().optional()}),Pn=D({hints:x(Nn).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),Fn=D({mode:A([`auto`,`required`,`none`]).optional()}),In=D({type:w(`tool_result`),toolUseId:P().describe(`The unique identifier for the corresponding tool call.`),content:x(pn),structuredContent:N().optional(),isError:k().optional(),_meta:j(P(),N()).optional()}),Ln=se(`type`,[cn,K,ln]),Rn=se(`type`,[cn,K,ln,un,In]),zn=D({role:At,content:S([Rn,x(Rn)]),_meta:j(P(),N()).optional()}),Bn=Ke.extend({messages:x(zn),modelPreferences:Pn.optional(),systemPrompt:P().optional(),includeContext:A([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:x(P()).optional(),metadata:R.optional(),tools:x(yn).optional(),toolChoice:Fn.optional()}),Vn=B.extend({method:w(`sampling/createMessage`),params:Bn}),Hn=U.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`]).or(P())),role:At,content:Ln}),Un=U.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(P())),role:At,content:S([Rn,x(Rn)])}),Wn=D({type:w(`boolean`),title:P().optional(),description:P().optional(),default:k().optional()}),Gn=D({type:w(`string`),title:P().optional(),description:P().optional(),minLength:O().optional(),maxLength:O().optional(),format:A([`email`,`uri`,`date`,`date-time`]).optional(),default:P().optional()}),Kn=D({type:A([`number`,`integer`]),title:P().optional(),description:P().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),qn=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),default:P().optional()}),Jn=D({type:w(`string`),title:P().optional(),description:P().optional(),oneOf:x(D({const:P(),title:P()})),default:P().optional()}),Yn=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),enumNames:x(P()).optional(),default:P().optional()}),Xn=S([qn,Jn]),Zn=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({type:w(`string`),enum:x(P())}),default:x(P()).optional()}),Qn=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({anyOf:x(D({const:P(),title:P()}))}),default:x(P()).optional()}),$n=S([Zn,Qn]),er=S([Yn,Xn,$n]),tr=S([er,Wn,Gn,Kn]),nr=Ke.extend({mode:w(`form`).optional(),message:P(),requestedSchema:D({type:w(`object`),properties:j(P(),tr),required:x(P()).optional()}).catchall(N())}),rr=Ke.extend({mode:w(`url`),message:P(),elicitationId:P(),url:P().url()}),ir=S([nr,rr]),ar=B.extend({method:w(`elicitation/create`),params:ir}),or=V.extend({elicitationId:P()}),sr=H.extend({method:w(`notifications/elicitation/complete`),params:or}),cr=U.extend({action:A([`accept`,`decline`,`cancel`]),content:ee(e=>e===null?void 0:e,j(P(),S([P(),O(),k(),x(P())])).optional())}),lr=D({type:w(`ref/resource`),uri:P()}),ur=D({type:w(`ref/prompt`),name:P()}),dr=z.extend({ref:S([ur,lr]),argument:D({name:P(),value:P()}),context:D({arguments:j(P(),P()).optional()}).optional()}),fr=B.extend({method:w(`completion/complete`),params:dr}),pr=U.extend({completion:T({values:x(P()).max(100),total:E(O().int()),hasMore:E(k())})}),mr=D({uri:P().startsWith(`file://`),name:P().optional(),_meta:j(P(),N()).optional()}),hr=B.extend({method:w(`roots/list`),params:z.optional()}),gr=U.extend({roots:x(mr)}),_r=H.extend({method:w(`notifications/roots/list_changed`),params:V.optional()}),vr=T({ttl:O().optional(),pollInterval:O().optional()}),yr=A([`working`,`input_required`,`completed`,`failed`,`cancelled`]),br=D({taskId:P(),status:yr,ttl:S([O(),ie()]),createdAt:P(),lastUpdatedAt:P(),pollInterval:E(O()),statusMessage:E(P())}),xr=U.extend({task:br}),Sr=V.merge(br),Cr=H.extend({method:w(`notifications/tasks/status`),params:Sr}),wr=B.extend({method:w(`tasks/get`),params:z.extend({taskId:P()})}),Tr=U.merge(br),Er=B.extend({method:w(`tasks/result`),params:z.extend({taskId:P()})}),Dr=U.loose(),Or=wt.extend({method:w(`tasks/list`)}),kr=Tt.extend({tasks:x(br)}),Ar=B.extend({method:w(`tasks/cancel`),params:z.extend({taskId:P()})}),jr=U.merge(br),Mr=S([yt,pt,_t,fr,An,sn,rn,Pt,It,Bt,Wt,Kt,Yt,Tn,bn]),Nr=S([rt,St,gt,_r]),Pr=S([tt,Hn,Un,cr,gr]),Fr=S([yt,Vn,ar,hr]),Ir=S([rt,St,Mn,tn,Ht,En,gn,Zt,sr]),Lr=S([tt,ht,vt,pr,hn,an,Ft,Lt,Vt,Sn,xn,$t]),q=y().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:le.custom,message:`URL must be parseable`,fatal:!0}),h}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Rr=T({resource:P().url(),authorization_servers:x(q).optional(),jwks_uri:P().url().optional(),scopes_supported:x(P()).optional(),bearer_methods_supported:x(P()).optional(),resource_signing_alg_values_supported:x(P()).optional(),resource_name:P().optional(),resource_documentation:P().optional(),resource_policy_uri:P().url().optional(),resource_tos_uri:P().url().optional(),tls_client_certificate_bound_access_tokens:k().optional(),authorization_details_types_supported:x(P()).optional(),dpop_signing_alg_values_supported:x(P()).optional(),dpop_bound_access_tokens_required:k().optional()}),zr=T({issuer:P(),authorization_endpoint:q,token_endpoint:q,registration_endpoint:q.optional(),scopes_supported:x(P()).optional(),response_types_supported:x(P()),response_modes_supported:x(P()).optional(),grant_types_supported:x(P()).optional(),token_endpoint_auth_methods_supported:x(P()).optional(),token_endpoint_auth_signing_alg_values_supported:x(P()).optional(),service_documentation:q.optional(),revocation_endpoint:q.optional(),revocation_endpoint_auth_methods_supported:x(P()).optional(),revocation_endpoint_auth_signing_alg_values_supported:x(P()).optional(),introspection_endpoint:P().optional(),introspection_endpoint_auth_methods_supported:x(P()).optional(),introspection_endpoint_auth_signing_alg_values_supported:x(P()).optional(),code_challenge_methods_supported:x(P()).optional(),client_id_metadata_document_supported:k().optional(),authorization_response_iss_parameter_supported:k().optional().catch(void 0),dpop_signing_alg_values_supported:x(P()).optional()}),Br=T({issuer:P(),authorization_endpoint:q,token_endpoint:q,userinfo_endpoint:q.optional(),jwks_uri:q,registration_endpoint:q.optional(),scopes_supported:x(P()).optional(),response_types_supported:x(P()),response_modes_supported:x(P()).optional(),grant_types_supported:x(P()).optional(),acr_values_supported:x(P()).optional(),subject_types_supported:x(P()),id_token_signing_alg_values_supported:x(P()),id_token_encryption_alg_values_supported:x(P()).optional(),id_token_encryption_enc_values_supported:x(P()).optional(),userinfo_signing_alg_values_supported:x(P()).optional(),userinfo_encryption_alg_values_supported:x(P()).optional(),userinfo_encryption_enc_values_supported:x(P()).optional(),request_object_signing_alg_values_supported:x(P()).optional(),request_object_encryption_alg_values_supported:x(P()).optional(),request_object_encryption_enc_values_supported:x(P()).optional(),token_endpoint_auth_methods_supported:x(P()).optional(),token_endpoint_auth_signing_alg_values_supported:x(P()).optional(),display_values_supported:x(P()).optional(),claim_types_supported:x(P()).optional(),claims_supported:x(P()).optional(),service_documentation:P().optional(),claims_locales_supported:x(P()).optional(),ui_locales_supported:x(P()).optional(),claims_parameter_supported:k().optional(),request_parameter_supported:k().optional(),request_uri_parameter_supported:k().optional(),require_request_uri_registration:k().optional(),op_policy_uri:q.optional(),op_tos_uri:q.optional(),client_id_metadata_document_supported:k().optional(),authorization_response_iss_parameter_supported:k().optional().catch(void 0)}),Vr=D({...Br.shape,...zr.pick({code_challenge_methods_supported:!0}).shape}),Hr=D({access_token:P(),id_token:P().optional(),token_type:P(),expires_in:pe().optional(),scope:P().optional(),refresh_token:P().optional(),issuer:P().optional().catch(void 0)}).strip(),Ur=D({issued_token_type:w(`urn:ietf:params:oauth:token-type:id-jag`),access_token:P(),token_type:P().optional(),expires_in:O().optional(),scope:P().optional()}).strip(),Wr=D({error:P(),error_description:P().optional(),error_uri:P().optional()}),Gr=q.optional().or(w(``).transform(()=>void 0)),Kr=D({redirect_uris:x(q),token_endpoint_auth_method:P().optional(),grant_types:x(P()).optional(),response_types:x(P()).optional(),application_type:P().optional(),client_name:P().optional(),client_uri:q.optional(),logo_uri:Gr,scope:P().optional(),contacts:x(P()).optional(),tos_uri:Gr,policy_uri:P().optional(),jwks_uri:q.optional(),jwks:ne().optional(),software_id:P().optional(),software_version:P().optional(),software_statement:P().optional()}).strip(),qr=D({client_id:P(),client_secret:P().optional(),client_id_issued_at:O().optional(),client_secret_expires_at:O().optional(),issuer:P().optional().catch(void 0)}).strip(),Jr=Kr.merge(qr),Yr=D({error:P(),error_description:P().optional()}).strip(),Xr=D({token:P(),token_type_hint:P().optional()}).strip(),Zr=Symbol.for(`mcp.sdk.errorBrands`);function Qr(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Zr,{value:n,enumerable:!1,configurable:!0})}function $r(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Zr)){let n=t[Zr];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var ei=function(e){return e.InvalidRequest=`invalid_request`,e.InvalidClient=`invalid_client`,e.InvalidGrant=`invalid_grant`,e.UnauthorizedClient=`unauthorized_client`,e.UnsupportedGrantType=`unsupported_grant_type`,e.InvalidScope=`invalid_scope`,e.AccessDenied=`access_denied`,e.ServerError=`server_error`,e.TemporarilyUnavailable=`temporarily_unavailable`,e.UnsupportedResponseType=`unsupported_response_type`,e.UnsupportedTokenType=`unsupported_token_type`,e.InvalidToken=`invalid_token`,e.MethodNotAllowed=`method_not_allowed`,e.TooManyRequests=`too_many_requests`,e.InvalidClientMetadata=`invalid_client_metadata`,e.InvalidRedirectUri=`invalid_redirect_uri`,e.InsufficientScope=`insufficient_scope`,e.InvalidTarget=`invalid_target`,e.InvalidDpopProof=`invalid_dpop_proof`,e.UseDpopNonce=`use_dpop_nonce`,e}({}),ti=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return $r(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return $r(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Qr(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},J=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),Y=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return $r(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return $r(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,Qr(this,new.target)}},ni=class extends Y{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}};function ri(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function ii(e){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t={...e};return delete t.issuer,t}function ai({requestedResource:e,configuredResource:t}){let n=typeof e==`string`?new URL(e):new URL(e.href),r=typeof t==`string`?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length=oi}function li(e){return e.filter(e=>!ci(e))}function ui(e){return e.filter(e=>ci(e))}function di(e){let t=e.structuredContent;return t===void 0||typeof t==`object`&&t&&!Array.isArray(t)||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var fi=[`task`,`inputRequests`,`requestState`];function pi(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||fi.some(t=>t in e)?e:{...e,content:[]}}function mi(){let e=ce(()=>S([P(),O(),k(),ie(),j(P(),e),x(e)])),t=j(P(),e),n=S([P(),O().int()]),r=P(),i=D({ttl:O().optional()}),a=D({taskId:P()}),o=T({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=D({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=D({method:P(),params:s.loose().optional()}),u=D({_meta:o.optional()}),d=D({method:P(),params:u.loose().optional()}),f=T({_meta:o.optional()}),p=S([P(),O().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:P().optional()}),g=d.extend({method:w(`notifications/cancelled`),params:h}),_=D({src:P(),mimeType:P().optional(),sizes:x(P()).optional(),theme:A([`light`,`dark`]).optional()}),v=D({icons:x(_).optional()}),y=D({name:P(),title:P().optional()}),b=y.extend({...y.shape,...v.shape,version:P(),websiteUrl:P().optional(),description:P().optional()}),C=re(D({applyDefaults:k().optional()}),t),te=ee(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,re(D({form:C.optional(),url:t.optional()}),t.optional())),ne=T({list:t.optional(),cancel:t.optional(),requests:T({sampling:T({createMessage:t.optional()}).optional(),elicitation:T({create:t.optional()}).optional()}).optional()}),ae=T({list:t.optional(),cancel:t.optional(),requests:T({tools:T({call:t.optional()}).optional()}).optional()}),oe=D({experimental:j(P(),t).optional(),sampling:D({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:D({listChanged:k().optional()}).optional(),tasks:ne.optional(),extensions:j(P(),t).optional()}),M=s.extend({protocolVersion:P(),capabilities:oe,clientInfo:b}),le=l.extend({method:w(`initialize`),params:M}),ue=D({experimental:j(P(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:D({listChanged:k().optional()}).optional(),resources:D({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:D({listChanged:k().optional()}).optional(),tasks:ae.optional(),extensions:j(P(),t).optional()}),fe=f.extend({protocolVersion:P(),capabilities:ue,serverInfo:b,instructions:P().optional()}),pe=d.extend({method:w(`notifications/initialized`),params:u.optional()}),F=l.extend({method:w(`ping`),params:s.optional()}),I=D({progress:O(),total:E(O()),message:E(P())}),me=D({...u.shape,...I.shape,progressToken:n}),he=d.extend({method:w(`notifications/progress`),params:me}),ge=s.extend({cursor:r.optional()}),_e=l.extend({params:ge.optional()}),ve=f.extend({nextCursor:r.optional()}),L=D({uri:P(),mimeType:E(P()),_meta:j(P(),N()).optional()}),ye=L.extend({text:P()}),be=P().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),xe=L.extend({blob:be}),Se=A([`user`,`assistant`]),Ce=D({audience:x(Se).optional(),priority:O().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),we=D({...y.shape,...v.shape,uri:P(),description:E(P()),mimeType:E(P()),size:E(O()),annotations:Ce.optional(),_meta:E(T({}))}),Te=D({...y.shape,...v.shape,uriTemplate:P(),description:E(P()),mimeType:E(P()),annotations:Ce.optional(),_meta:E(T({}))}),Ee=_e.extend({method:w(`resources/list`)}),De=ve.extend({resources:x(we)}),Oe=_e.extend({method:w(`resources/templates/list`)}),ke=ve.extend({resourceTemplates:x(Te)}),Ae=s.extend({uri:P()}),je=Ae,Me=l.extend({method:w(`resources/read`),params:je}),Ne=f.extend({contents:x(S([ye,xe]))}),Pe=d.extend({method:w(`notifications/resources/list_changed`),params:u.optional()}),Fe=Ae,Ie=l.extend({method:w(`resources/subscribe`),params:Fe}),Le=Ae,Re=l.extend({method:w(`resources/unsubscribe`),params:Le}),ze=u.extend({uri:P()}),R=d.extend({method:w(`notifications/resources/updated`),params:ze}),Be=D({name:P(),description:E(P()),required:E(k())}),Ve=D({...y.shape,...v.shape,description:E(P()),arguments:E(x(Be)),_meta:E(T({}))}),He=_e.extend({method:w(`prompts/list`)}),Ue=ve.extend({prompts:x(Ve)}),We=s.extend({name:P(),arguments:j(P(),P()).optional()}),Ge=l.extend({method:w(`prompts/get`),params:We}),z=D({type:w(`text`),text:P(),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),Ke=D({type:w(`image`),data:be,mimeType:P(),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),B=D({type:w(`audio`),data:be,mimeType:P(),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),V=D({type:w(`tool_use`),name:P(),id:P(),input:j(P(),N()),_meta:j(P(),N()).optional()}),H=D({type:w(`resource`),resource:S([ye,xe]),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),qe=we.extend({type:w(`resource_link`)}),U=S([z,Ke,B,qe,H]),Je=D({role:Se,content:U}),Ye=f.extend({description:P().optional(),messages:x(Je)}),Xe=d.extend({method:w(`notifications/prompts/list_changed`),params:u.optional()}),Ze=D({title:P().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),Qe=D({taskSupport:A([`required`,`optional`,`forbidden`]).optional()}),$e=D({...y.shape,...v.shape,description:P().optional(),inputSchema:D({type:w(`object`),properties:j(P(),e).optional(),required:x(P()).optional()}).catchall(N()),outputSchema:D({type:w(`object`),properties:j(P(),e).optional(),required:x(P()).optional()}).catchall(N()).optional(),annotations:Ze.optional(),execution:Qe.optional(),_meta:j(P(),N()).optional()}),et=_e.extend({method:w(`tools/list`)}),tt=ve.extend({tools:x($e)}),nt=f.extend({content:x(U),structuredContent:j(P(),N()).optional(),isError:k().optional()}),rt=c.extend({name:P(),arguments:j(P(),N()).optional()}),it=l.extend({method:w(`tools/call`),params:rt}),at=d.extend({method:w(`notifications/tools/list_changed`),params:u.optional()}),ot=A([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),W=s.extend({level:ot}),st=l.extend({method:w(`logging/setLevel`),params:W}),ct=u.extend({level:ot,logger:P().optional(),data:N()}),lt=d.extend({method:w(`notifications/message`),params:ct}),ut=D({name:P().optional()}),dt=D({hints:x(ut).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),ft=D({mode:A([`auto`,`required`,`none`]).optional()}),pt=D({type:w(`tool_result`),toolUseId:P().describe(`The unique identifier for the corresponding tool call.`),content:x(U),structuredContent:D({}).loose().optional(),isError:k().optional(),_meta:j(P(),N()).optional()}),mt=se(`type`,[z,Ke,B]),ht=se(`type`,[z,Ke,B,V,pt]),gt=D({role:Se,content:S([ht,x(ht)]),_meta:j(P(),N()).optional()}),_t=c.extend({messages:x(gt),modelPreferences:dt.optional(),systemPrompt:P().optional(),includeContext:A([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:x(P()).optional(),metadata:t.optional(),tools:x($e).optional(),toolChoice:ft.optional()}),vt=l.extend({method:w(`sampling/createMessage`),params:_t}),yt=f.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`]).or(P())),role:Se,content:mt}),bt=f.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(P())),role:Se,content:S([ht,x(ht)])}),xt=D({type:w(`boolean`),title:P().optional(),description:P().optional(),default:k().optional()}),St=D({type:w(`string`),title:P().optional(),description:P().optional(),minLength:O().optional(),maxLength:O().optional(),format:A([`email`,`uri`,`date`,`date-time`]).optional(),default:P().optional()}),Ct=D({type:A([`number`,`integer`]),title:P().optional(),description:P().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),wt=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),default:P().optional()}),Tt=D({type:w(`string`),title:P().optional(),description:P().optional(),oneOf:x(D({const:P(),title:P()})),default:P().optional()}),Et=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),enumNames:x(P()).optional(),default:P().optional()}),Dt=S([wt,Tt]),Ot=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({type:w(`string`),enum:x(P())}),default:x(P()).optional()}),kt=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({anyOf:x(D({const:P(),title:P()}))}),default:x(P()).optional()}),At=S([Ot,kt]),jt=S([Et,Dt,At]),Mt=S([jt,xt,St,Ct]),Nt=c.extend({mode:w(`form`).optional(),message:P(),requestedSchema:D({type:w(`object`),properties:j(P(),Mt),required:x(P()).optional()}).catchall(N())}),Pt=c.extend({mode:w(`url`),message:P(),elicitationId:P(),url:P().url()}),Ft=S([Nt,Pt]),It=l.extend({method:w(`elicitation/create`),params:Ft}),Lt=u.extend({elicitationId:P()}),Rt=d.extend({method:w(`notifications/elicitation/complete`),params:Lt}),zt=f.extend({action:A([`accept`,`decline`,`cancel`]),content:ee(e=>e===null?void 0:e,j(P(),S([P(),O(),k(),x(P())])).optional())}),Bt=D({type:w(`ref/resource`),uri:P()}),Vt=D({type:w(`ref/prompt`),name:P()}),Ht=s.extend({ref:S([Vt,Bt]),argument:D({name:P(),value:P()}),context:D({arguments:j(P(),P()).optional()}).optional()}),Ut=l.extend({method:w(`completion/complete`),params:Ht}),Wt=f.extend({completion:T({values:x(P()).max(100),total:E(O().int()),hasMore:E(k())})}),Gt=D({uri:P().startsWith(`file://`),name:P().optional(),_meta:j(P(),N()).optional()}),Kt=l.extend({method:w(`roots/list`),params:s.optional()}),qt=f.extend({roots:x(Gt)}),Jt=d.extend({method:w(`notifications/roots/list_changed`),params:u.optional()}),Yt=T({ttl:O().optional(),pollInterval:O().optional()}),Xt=A([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Zt=D({taskId:P(),status:Xt,ttl:S([O(),ie()]),createdAt:P(),lastUpdatedAt:P(),pollInterval:E(O()),statusMessage:E(P())}),Qt=f.extend({task:Zt}),$t=u.merge(Zt),en=d.extend({method:w(`notifications/tasks/status`),params:$t}),tn=l.extend({method:w(`tasks/get`),params:s.extend({taskId:P()})}),G=f.merge(Zt),nn=l.extend({method:w(`tasks/result`),params:s.extend({taskId:P()})}),rn=f.loose(),an=_e.extend({method:w(`tasks/list`)}),on=ve.extend({tasks:x(Zt)}),sn=l.extend({method:w(`tasks/cancel`),params:s.extend({taskId:P()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:b,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:ae,ClientCapabilitiesSchema:oe,InitializeRequestParamsSchema:M,InitializeRequestSchema:le,ServerCapabilitiesSchema:ue,InitializeResultSchema:fe,InitializedNotificationSchema:pe,PingRequestSchema:F,ProgressSchema:I,ProgressNotificationParamsSchema:me,ProgressNotificationSchema:he,PaginatedRequestParamsSchema:ge,PaginatedRequestSchema:_e,PaginatedResultSchema:ve,ResourceContentsSchema:L,TextResourceContentsSchema:ye,BlobResourceContentsSchema:xe,RoleSchema:Se,AnnotationsSchema:Ce,ResourceSchema:we,ResourceTemplateSchema:Te,ListResourcesRequestSchema:Ee,ListResourcesResultSchema:De,ListResourceTemplatesRequestSchema:Oe,ListResourceTemplatesResultSchema:ke,ResourceRequestParamsSchema:Ae,ReadResourceRequestParamsSchema:je,ReadResourceRequestSchema:Me,ReadResourceResultSchema:Ne,ResourceListChangedNotificationSchema:Pe,SubscribeRequestParamsSchema:Fe,SubscribeRequestSchema:Ie,UnsubscribeRequestParamsSchema:Le,UnsubscribeRequestSchema:Re,ResourceUpdatedNotificationParamsSchema:ze,ResourceUpdatedNotificationSchema:R,PromptArgumentSchema:Be,PromptSchema:Ve,ListPromptsRequestSchema:He,ListPromptsResultSchema:Ue,GetPromptRequestParamsSchema:We,GetPromptRequestSchema:Ge,TextContentSchema:z,ImageContentSchema:Ke,AudioContentSchema:B,ToolUseContentSchema:V,EmbeddedResourceSchema:H,ResourceLinkSchema:qe,ContentBlockSchema:U,PromptMessageSchema:Je,GetPromptResultSchema:Ye,PromptListChangedNotificationSchema:Xe,ToolAnnotationsSchema:Ze,ToolExecutionSchema:Qe,ToolSchema:$e,ListToolsRequestSchema:et,ListToolsResultSchema:tt,CallToolResultSchema:nt,CallToolRequestParamsSchema:rt,CallToolRequestSchema:it,ToolListChangedNotificationSchema:at,LoggingLevelSchema:ot,SetLevelRequestParamsSchema:W,SetLevelRequestSchema:st,LoggingMessageNotificationParamsSchema:ct,LoggingMessageNotificationSchema:lt,ModelHintSchema:ut,ModelPreferencesSchema:dt,ToolChoiceSchema:ft,ToolResultContentSchema:pt,SamplingContentSchema:mt,SamplingMessageContentBlockSchema:ht,SamplingMessageSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,CreateMessageResultSchema:yt,CreateMessageResultWithToolsSchema:bt,BooleanSchemaSchema:xt,StringSchemaSchema:St,NumberSchemaSchema:Ct,UntitledSingleSelectEnumSchemaSchema:wt,TitledSingleSelectEnumSchemaSchema:Tt,LegacyTitledEnumSchemaSchema:Et,SingleSelectEnumSchemaSchema:Dt,UntitledMultiSelectEnumSchemaSchema:Ot,TitledMultiSelectEnumSchemaSchema:kt,MultiSelectEnumSchemaSchema:At,EnumSchemaSchema:jt,PrimitiveSchemaDefinitionSchema:Mt,ElicitRequestFormParamsSchema:Nt,ElicitRequestURLParamsSchema:Pt,ElicitRequestParamsSchema:Ft,ElicitRequestSchema:It,ElicitationCompleteNotificationParamsSchema:Lt,ElicitationCompleteNotificationSchema:Rt,ElicitResultSchema:zt,ResourceTemplateReferenceSchema:Bt,PromptReferenceSchema:Vt,CompleteRequestParamsSchema:Ht,CompleteRequestSchema:Ut,CompleteResultSchema:Wt,RootSchema:Gt,ListRootsRequestSchema:Kt,ListRootsResultSchema:qt,RootsListChangedNotificationSchema:Jt,TaskCreationParamsSchema:Yt,TaskStatusSchema:Xt,TaskSchema:Zt,CreateTaskResultSchema:Qt,TaskStatusNotificationParamsSchema:$t,TaskStatusNotificationSchema:en,GetTaskRequestSchema:tn,GetTaskResultSchema:G,GetTaskPayloadRequestSchema:nn,GetTaskPayloadResultSchema:rn,ListTasksRequestSchema:an,ListTasksResultSchema:on,CancelTaskRequestSchema:sn,CancelTaskResultSchema:f.merge(Zt),ClientRequestSchema:S([F,le,Ut,st,Ge,He,Ee,Oe,Me,Ie,Re,it,et,tn,nn,an,sn]),ClientNotificationSchema:S([g,he,pe,Jt,en]),ClientResultSchema:S([m,yt,bt,zt,qt,G,on,Qt]),ServerRequestSchema:S([F,vt,It,Kt,tn,nn,an,sn]),ServerNotificationSchema:S([g,he,lt,R,Pe,at,Xe,en,Rt]),ServerResultSchema:S([m,fe,Wt,Ye,Ue,De,ke,Ne,nt,tt,G,on,Qt]),CallToolResultWireSchema:N().superRefine((e,t)=>{if(typeof e==`object`&&e&&!Array.isArray(e)&&e.content===void 0){for(let n of fi)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(pi).pipe(nt)}}var hi;function gi(){return hi??=mi()}function _i(e){return e.type!==`object`}var vi=new Set([`const`,`enum`,`default`,`examples`]),yi=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function bi(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function xi(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(bi(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=Oe(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&bi(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:i[o]=vi.has(o)?s:yi.has(o)?r(s,!0):r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var Si={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Ci={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},wi={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Ti;function Ei(){if(Ti)return Ti;let e=gi();return Ti={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Ti}function Di(e){return Object.prototype.hasOwnProperty.call(Si,e)}function Oi(e){return Object.prototype.hasOwnProperty.call(Ci,e)}function ki(e){return Object.prototype.hasOwnProperty.call(wi,e)}function Ai(e){return ki(e)?Ei().resultSchemas[e]:void 0}function ji(e){return Di(e)?Ei().requestSchemas[e]:void 0}function Mi(e){return Oi(e)?Ei().notificationSchemas[e]:void 0}Object.keys(Si),Object.keys(Ci);function Ni(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pi(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Fi={ok:!1,reason:`not-in-era`};function Ii(e){return Ni(e)&&Ni(e.outputSchema)&&_i(e.outputSchema)}function Li(e){return e}var Ri={era:`2025-11-25`,hasRequestMethod:Di,hasNotificationMethod:Oi,validateRequest:(e,t)=>Pi(ji(e),t),validateResult:(e,t)=>Pi(Ai(e),t),validateNotification:(e,t)=>Pi(Mi(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Fi,validateInputResponse:()=>Fi,samplingResultVariant:((e,t)=>{let n=gi();return Pi(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=di(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&_i(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Ni(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Li(e)}}return{kind:`complete`,result:Li(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Ii(e))?t:{...t,tools:n.map(e=>Ii(e)?{...e,outputSchema:xi(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function zi(){let e=ce(()=>S([P(),O(),k(),ie(),j(P(),e),x(e)])),t=j(P(),e),n=S([P(),O().int()]),r=P(),i=S([P(),O().int()]),a=A([`user`,`assistant`]),o=A([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=P().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=D({ttl:O().optional()}),l=D({taskId:P()}),u=T({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=D({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=D({_meta:u.optional()}),m=D({method:P(),params:p.loose().optional()}),h=D({src:P(),mimeType:P().optional(),sizes:x(P()).optional(),theme:A([`light`,`dark`]).optional()}),g=D({icons:x(h).optional()}),_=D({name:P(),title:P().optional()}),v=_.extend({..._.shape,...g.shape,version:P(),websiteUrl:P().optional(),description:P().optional()}),y=re(D({applyDefaults:k().optional()}),t),b=ee(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,re(D({form:y.optional(),url:t.optional()}),t.optional())),C=T({list:t.optional(),cancel:t.optional(),requests:T({sampling:T({createMessage:t.optional()}).optional(),elicitation:T({create:t.optional()}).optional()}).optional()}),te=T({list:t.optional(),cancel:t.optional(),requests:T({tools:T({call:t.optional()}).optional()}).optional()}),ne=D({experimental:j(P(),t).optional(),sampling:D({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:D({listChanged:k().optional()}).optional(),tasks:C.optional(),extensions:j(P(),t).optional()}),ae=D({experimental:j(P(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:D({listChanged:k().optional()}).optional(),resources:D({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:D({listChanged:k().optional()}).optional(),tasks:te.optional(),extensions:j(P(),t).optional()}),oe=D({progress:O(),total:E(O()),message:E(P())}),se=D({...p.shape,...oe.shape,progressToken:n}),M=m.extend({method:w(`notifications/progress`),params:se}),le=p.extend({level:o,logger:P().optional(),data:N()}),ue=m.extend({method:w(`notifications/message`),params:le}),fe=D({uri:P(),mimeType:E(P()),_meta:j(P(),N()).optional()}),pe=fe.extend({text:P()}),F=fe.extend({blob:s}),I=D({audience:x(a).optional(),priority:O().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),me=D({..._.shape,...g.shape,uri:P(),description:E(P()),mimeType:E(P()),size:E(O()),annotations:I.optional(),_meta:E(T({}))}),he=D({..._.shape,...g.shape,uriTemplate:P(),description:E(P()),mimeType:E(P()),annotations:I.optional(),_meta:E(T({}))}),ge=m.extend({method:w(`notifications/resources/list_changed`),params:p.optional()}),_e=p.extend({uri:P()}),ve=m.extend({method:w(`notifications/resources/updated`),params:_e}),L=D({name:P(),description:E(P()),required:E(k())}),ye=D({..._.shape,...g.shape,description:E(P()),arguments:E(x(L)),_meta:E(T({}))}),be=m.extend({method:w(`notifications/prompts/list_changed`),params:p.optional()}),xe=D({type:w(`text`),text:P(),annotations:I.optional(),_meta:j(P(),N()).optional()}),Se=D({type:w(`image`),data:s,mimeType:P(),annotations:I.optional(),_meta:j(P(),N()).optional()}),Ce=D({type:w(`audio`),data:s,mimeType:P(),annotations:I.optional(),_meta:j(P(),N()).optional()}),we=D({type:w(`tool_use`),name:P(),id:P(),input:j(P(),N()),_meta:j(P(),N()).optional()}),Te=D({type:w(`resource`),resource:S([pe,F]),annotations:I.optional(),_meta:j(P(),N()).optional()}),Ee=me.extend({type:w(`resource_link`)}),De=S([xe,Se,Ce,Ee,Te]),Oe=D({role:a,content:De}),ke=D({title:P().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),Ae=m.extend({method:w(`notifications/tools/list_changed`),params:p.optional()}),je=D({name:P().optional()}),Me=D({hints:x(je).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),Le=D({mode:A([`auto`,`required`,`none`]).optional()}),ze=D({type:w(`boolean`),title:P().optional(),description:P().optional(),default:k().optional()}),R=D({type:w(`string`),title:P().optional(),description:P().optional(),minLength:O().optional(),maxLength:O().optional(),format:A([`email`,`uri`,`date`,`date-time`]).optional(),default:P().optional()}),Be=D({type:A([`number`,`integer`]),title:P().optional(),description:P().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),Ve=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),default:P().optional()}),He=D({type:w(`string`),title:P().optional(),description:P().optional(),oneOf:x(D({const:P(),title:P()})),default:P().optional()}),Ue=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),enumNames:x(P()).optional(),default:P().optional()}),We=S([Ve,He]),Ge=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({type:w(`string`),enum:x(P())}),default:x(P()).optional()}),z=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({anyOf:x(D({const:P(),title:P()}))}),default:x(P()).optional()}),Ke=S([Ge,z]),B=S([Ue,We,Ke]),V=S([B,ze,R,Be]),H=f.extend({mode:w(`form`).optional(),message:P(),requestedSchema:D({type:w(`object`),properties:j(P(),V),required:x(P()).optional()}).catchall(N())}),qe=D({type:w(`ref/resource`),uri:P()}),U=D({type:w(`ref/prompt`),name:P()}),Je=D({uri:P().startsWith(`file://`),name:P().optional(),_meta:j(P(),N()).optional()}),Ye=ne.shape,Xe=D({experimental:Ye.experimental,sampling:Ye.sampling,elicitation:Ye.elicitation,roots:Ye.roots,extensions:Ye.extensions}),Ze=ae.shape,Qe=D({experimental:Ze.experimental,logging:Ze.logging,completions:Ze.completions,prompts:Ze.prompts,resources:Ze.resources,tools:Ze.tools,extensions:Ze.extensions}),$e=T({progressToken:n.optional(),[Ne]:P(),[Pe]:v.optional(),[Ie]:Xe,[Re]:o.optional()}),et=D({..._.shape,...g.shape,description:P().optional(),inputSchema:T({$schema:P().optional(),type:w(`object`)}),outputSchema:T({$schema:P().optional()}).optional(),annotations:ke.optional(),_meta:j(P(),N()).optional()}),tt=D({type:w(`tool_result`),toolUseId:P(),content:x(De),structuredContent:N().optional(),isError:k().optional(),_meta:j(P(),N()).optional()}),nt=S([xe,Se,Ce,we,tt]),rt=D({role:a,content:S([nt,x(nt)]),_meta:j(P(),N()).optional()}),it=P(),at=T({[Fe]:v.optional().catch(void 0)}),ot=at.optional();function W(e){return T({_meta:ot,resultType:it.default(`complete`),...e})}let st=W({}),ct=W({nextCursor:r.optional()}),lt=W({content:x(De),structuredContent:N().optional(),isError:k().optional()}),ut=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),tools:x(et),nextCursor:r.optional()}),dt=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),prompts:x(ye),nextCursor:r.optional()}),ft=W({description:P().optional(),messages:x(Oe)}),pt=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resources:x(me),nextCursor:r.optional()}),mt=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resourceTemplates:x(he),nextCursor:r.optional()}),ht=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),contents:x(S([pe,F]))}),gt=W({completion:D({values:x(P()).max(100),total:O().int().optional(),hasMore:k().optional()}).loose()}),_t=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`])}),vt=W({ttlMs:O().int().min(0).catch(0),cacheScope:A([`public`,`private`]).catch(`private`),supportedVersions:x(P()),capabilities:Qe,instructions:P().optional()}),yt=D({messages:x(rt),modelPreferences:Me.optional(),systemPrompt:P().optional(),includeContext:A([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:x(P()).optional(),metadata:t.optional(),tools:x(et).optional(),toolChoice:Le.optional()}),bt=D({method:w(`sampling/createMessage`),params:yt}),xt=D({method:w(`roots/list`),params:D({_meta:j(P(),N()).optional()}).optional()}),St=D({...rt.shape,model:P(),stopReason:P().optional()}),Ct=D({roots:x(Je)}),wt=D({action:A([`accept`,`decline`,`cancel`]),content:j(P(),S([P(),O(),k(),x(P())])).optional()}),Tt=D({mode:w(`url`),message:P(),url:P().url()}),Et=S([H,Tt]),Dt=D({method:w(`elicitation/create`),params:Et}),Ot=S([bt,xt,Dt]),kt=S([St,Ct,wt]),At=j(P(),Ot),jt=j(P(),kt),Mt=W({inputRequests:At.optional(),requestState:P().optional()}),Nt={inputResponses:jt.optional(),requestState:P().optional()},Pt=D({_meta:$e,...Nt}),Ft=T({progressToken:n.optional()});function It(e,t){return D({method:w(e),params:D({_meta:$e,...t})})}function Lt(e,t){return D({method:w(e),params:D({_meta:Ft.optional(),...t}).optional()})}let Rt={name:P(),arguments:j(P(),N()).optional(),...Nt},zt={cursor:r.optional()},Bt=It(`tools/call`,Rt),Vt=It(`tools/list`,zt),Ht=It(`prompts/list`,zt),Ut=It(`prompts/get`,{name:P(),arguments:j(P(),P()).optional(),...Nt}),Wt=It(`resources/list`,zt),Gt=It(`resources/templates/list`,zt),Kt=It(`resources/read`,{uri:P(),...Nt}),qt={ref:S([U,qe]),argument:D({name:P(),value:P()}),context:D({arguments:j(P(),P()).optional()}).optional()},Jt=It(`completion/complete`,qt),Yt=It(`server/discover`,{}),Xt=D({toolsListChanged:k().optional(),promptsListChanged:k().optional(),resourcesListChanged:k().optional(),resourceSubscriptions:x(P()).optional()}),Zt={notifications:Xt},Qt=It(`subscriptions/listen`,Zt),$t=at.extend({"io.modelcontextprotocol/subscriptionId":i}),en=T({_meta:$t,resultType:it.default(`complete`)}),tn={"tools/call":Lt(`tools/call`,Rt),"tools/list":Lt(`tools/list`,zt),"prompts/get":Lt(`prompts/get`,{name:P(),arguments:j(P(),P()).optional()}),"prompts/list":Lt(`prompts/list`,zt),"resources/list":Lt(`resources/list`,zt),"resources/templates/list":Lt(`resources/templates/list`,zt),"resources/read":Lt(`resources/read`,{uri:P()}),"completion/complete":Lt(`completion/complete`,qt),"server/discover":Lt(`server/discover`,{}),"subscriptions/listen":Lt(`subscriptions/listen`,Zt)};function G(e){return T({_meta:ot,...e})}let nn={"tools/call":G({content:x(De),structuredContent:N().optional(),isError:k().optional()}),"tools/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),tools:x(et),nextCursor:r.optional()}),"prompts/get":G({description:P().optional(),messages:x(Oe)}),"prompts/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),prompts:x(ye),nextCursor:r.optional()}),"resources/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resources:x(me),nextCursor:r.optional()}),"resources/templates/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resourceTemplates:x(he),nextCursor:r.optional()}),"resources/read":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),contents:x(S([pe,F]))}),"completion/complete":G({completion:D({values:x(P()).max(100),total:O().int().optional(),hasMore:k().optional()}).loose()}),"server/discover":G({ttlMs:O().int().min(0).catch(0),cacheScope:A([`public`,`private`]).catch(`private`),supportedVersions:x(P()),capabilities:Qe,instructions:P().optional()}),"subscriptions/listen":G({})},rn=T({"io.modelcontextprotocol/subscriptionId":i.optional()}),an=D({method:w(`notifications/subscriptions/acknowledged`),params:D({_meta:rn.optional(),notifications:Xt})}),on=D({_meta:rn.optional(),requestId:i,reason:P().optional()}),sn=D({method:w(`notifications/cancelled`),params:on}),cn={"notifications/cancelled":sn,"notifications/progress":M,"notifications/message":ue,"notifications/resources/updated":ve,"notifications/resources/list_changed":ge,"notifications/tools/list_changed":Ae,"notifications/prompts/list_changed":be,"notifications/subscriptions/acknowledged":an},K=e=>D({jsonrpc:w(`2.0`),id:S([P(),O().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:C,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:ne,ServerCapabilitiesSchema:ae,ProgressSchema:oe,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:M,LoggingMessageNotificationParamsSchema:le,LoggingMessageNotificationSchema:ue,ResourceContentsSchema:fe,TextResourceContentsSchema:pe,BlobResourceContentsSchema:F,AnnotationsSchema:I,ResourceSchema:me,ResourceTemplateSchema:he,ResourceListChangedNotificationSchema:ge,ResourceUpdatedNotificationParamsSchema:_e,ResourceUpdatedNotificationSchema:ve,PromptArgumentSchema:L,PromptSchema:ye,PromptListChangedNotificationSchema:be,TextContentSchema:xe,ImageContentSchema:Se,AudioContentSchema:Ce,ToolUseContentSchema:we,EmbeddedResourceSchema:Te,ResourceLinkSchema:Ee,ContentBlockSchema:De,PromptMessageSchema:Oe,ToolAnnotationsSchema:ke,ToolListChangedNotificationSchema:Ae,ModelHintSchema:je,ModelPreferencesSchema:Me,ToolChoiceSchema:Le,BooleanSchemaSchema:ze,StringSchemaSchema:R,NumberSchemaSchema:Be,UntitledSingleSelectEnumSchemaSchema:Ve,TitledSingleSelectEnumSchemaSchema:He,LegacyTitledEnumSchemaSchema:Ue,SingleSelectEnumSchemaSchema:We,UntitledMultiSelectEnumSchemaSchema:Ge,TitledMultiSelectEnumSchemaSchema:z,MultiSelectEnumSchemaSchema:Ke,EnumSchemaSchema:B,PrimitiveSchemaDefinitionSchema:V,ElicitRequestFormParamsSchema:H,ResourceTemplateReferenceSchema:qe,PromptReferenceSchema:U,RootSchema:Je,ClientCapabilities2026Schema:Xe,ServerCapabilities2026Schema:Qe,RequestMetaEnvelopeSchema:$e,ToolSchema:et,ToolResultContentSchema:tt,SamplingMessageContentBlockSchema:nt,SamplingMessageSchema:rt,ResultTypeSchema:it,ResultMetaSchema:at,ResultSchema:st,PaginatedResultSchema:ct,CallToolResultSchema:lt,ListToolsResultSchema:ut,ListPromptsResultSchema:dt,GetPromptResultSchema:ft,ListResourcesResultSchema:pt,ListResourceTemplatesResultSchema:mt,ReadResourceResultSchema:ht,CompleteResultSchema:gt,CacheableResultSchema:_t,DiscoverResultSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,ListRootsRequestSchema:xt,CreateMessageResultSchema:St,ListRootsResultSchema:Ct,ElicitResultSchema:wt,ElicitRequestURLParamsSchema:Tt,ElicitRequestParamsSchema:Et,ElicitRequestSchema:Dt,InputRequestSchema:Ot,InputResponseSchema:kt,InputRequestsSchema:At,InputResponsesSchema:jt,InputRequiredResultSchema:Mt,InputResponseRequestParamsSchema:Pt,CallToolRequestSchema:Bt,ListToolsRequestSchema:Vt,ListPromptsRequestSchema:Ht,GetPromptRequestSchema:Ut,ListResourcesRequestSchema:Wt,ListResourceTemplatesRequestSchema:Gt,ReadResourceRequestSchema:Kt,CompleteRequestSchema:Jt,DiscoverRequestSchema:Yt,SubscriptionFilterSchema:Xt,SubscriptionsListenRequestSchema:Qt,SubscriptionsListenResultMetaSchema:$t,SubscriptionsListenResultSchema:en,dispatchRequestSchemas:tn,dispatchResultSchemas:nn,NotificationMetaSchema:rn,SubscriptionsAcknowledgedNotificationSchema:an,CancelledNotificationParamsSchema:on,CancelledNotificationSchema:sn,notificationSchemas2026:cn,JSONRPCResultResponseSchema:K(st),CallToolResultResponseSchema:K(S([lt,Mt])),ListToolsResultResponseSchema:K(ut),ListPromptsResultResponseSchema:K(dt),GetPromptResultResponseSchema:K(S([ft,Mt])),ListResourcesResultResponseSchema:K(pt),ListResourceTemplatesResultResponseSchema:K(mt),ReadResourceResultResponseSchema:K(S([ht,Mt])),CompleteResultResponseSchema:K(gt),DiscoverResultResponseSchema:K(vt),SubscriptionsListenResultResponseSchema:K(en)}}var Bi;function Vi(){return Bi??=zi()}var Hi=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Ui(e){return Hi.includes(e)}var Wi=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Gi(e){return e[Wi]}function Ki(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function qi(e){return e===`public`||e===`private`}var X=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),Z=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return $r(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return $r(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Qr(this,new.target)}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Yi(e.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Xi({supported:e.supported,requested:e.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===X.ResourceNotFound||Object.keys(e).length===1))return new Ji(e.uri,n)}if(t===X.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Zi({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Ji=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Yi=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Xi=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Zi=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Qi=0,$i=`private`,ea=[`tools/call`,`prompts/get`,`resources/read`];function ta(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||ea.includes(e))return t;throw new Z(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function na(e,t){let n=Gi(t);if(t.resultType!==`complete`||!Ui(e))return n===void 0?t:sa(t);let r=t,i=Ki(r.ttlMs)?r.ttlMs:aa(n),a=qi(r.cacheScope)?r.cacheScope:oa(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Wi],o}function ra(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ia(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Fe]:t}}:!ra(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Fe]:t}}}function aa(e){return e!==void 0&&Ki(e.ttlMs)?e.ttlMs:Qi}function oa(e){return e!==void 0&&qi(e.cacheScope)?e.cacheScope:$i}function sa(e){let t={...e};return delete t[Wi],t}var ca=[`elicitation/create`,`sampling/createMessage`,`roots/list`],la;function ua(){if(la)return la;let e=Vi();return la={request:{"elicitation/create":D({method:w(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":D({method:w(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":D({method:w(`roots/list`),params:T({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},la}function da(e){return ca.includes(e)}function fa(e){return da(e)?ua().request[e]:void 0}function pa(e){return da(e)?ua().response[e]:void 0}var ma={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},ha={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function ga(e){return Object.prototype.hasOwnProperty.call(ma,e)}function _a(e){return Object.prototype.hasOwnProperty.call(ha,e)}function va(e){return Object.prototype.hasOwnProperty.call(ma,e)}function ya(e){return ga(e)?Vi().dispatchRequestSchemas[e]:void 0}function ba(e){return va(e)?Vi().dispatchResultSchemas[e]:void 0}function xa(e){return _a(e)?Vi().notificationSchemas2026[e]:void 0}Object.keys(ma),Object.keys(ha);function Sa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ca(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var wa={ok:!1,reason:`not-in-era`},Ta=[Ne,Ie];function Ea(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Sa(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Sa(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Sa(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Da={era:`2026-07-28`,hasRequestMethod:ga,hasNotificationMethod:_a,hasInputRequestMethod:e=>fa(e)!==void 0,validateRequest:(e,t)=>Ca(ya(e),t),validateResult:(e,t)=>Ca(ba(e),t),validateNotification:(e,t)=>Ca(xa(e),t),validateInputRequest:(e,t)=>Ca(fa(e),t),validateInputResponse:(e,t)=>Ca(pa(e),t),samplingResultVariant:()=>wa,outboundEnvelope(e){return{[Ne]:e.protocolVersion,[Pe]:e.clientInfo,[Ie]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Ta)n in e||t.push({key:n,problem:`missing`});let n=Vi().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>di(e),inputRequestSchema:fa,decodeResult(e,t){if(!Sa(t))return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Sa(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Vi().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new Y(J.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=ka(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return ia(na(e,ta(e,Ea(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Vi().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Oa;function ka(){if(Oa)return Oa;let e=Vi();return Oa={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Oa}var Aa=`2026-07-28`;function ja(e){return e!==void 0&&ci(e)?Da:Ri}function Ma(e){return e.revision===void 0?e.era===`modern`?Da.era:Ri.era:ja(e.revision).era}function Na(e){return Ia.some(t=>t.hasRequestMethod(e))}function Pa(e){return Ia.some(t=>t.hasNotificationMethod(e))}function Fa(e){return e===`tasks/get`||e===`tasks/cancel`}var Ia=[Ri,Da],La=xe({AnnotationsSchema:()=>jt,AudioContentSchema:()=>ln,BaseMetadataSchema:()=>ot,BaseRequestParamsSchema:()=>z,BlobResourceContentsSchema:()=>kt,BooleanSchemaSchema:()=>Wn,CallToolRequestParamsSchema:()=>wn,CallToolRequestSchema:()=>Tn,CallToolResultSchema:()=>Sn,CancelTaskRequestSchema:()=>Ar,CancelTaskResultSchema:()=>jr,CancelledNotificationParamsSchema:()=>nt,CancelledNotificationSchema:()=>rt,ClientCapabilitiesSchema:()=>dt,ClientNotificationSchema:()=>Nr,ClientRequestSchema:()=>Mr,ClientResultSchema:()=>Pr,ClientTasksCapabilitySchema:()=>lt,CompatibilityCallToolResultSchema:()=>Cn,CompleteRequestParamsSchema:()=>dr,CompleteRequestSchema:()=>fr,CompleteResultSchema:()=>pr,ContentBlockSchema:()=>pn,CreateMessageRequestParamsSchema:()=>Bn,CreateMessageRequestSchema:()=>Vn,CreateMessageResultSchema:()=>Hn,CreateMessageResultWithToolsSchema:()=>Un,CreateTaskResultSchema:()=>xr,CursorSchema:()=>He,DiscoverRequestSchema:()=>_t,DiscoverResultSchema:()=>vt,ElicitRequestFormParamsSchema:()=>nr,ElicitRequestParamsSchema:()=>ir,ElicitRequestSchema:()=>ar,ElicitRequestURLParamsSchema:()=>rr,ElicitResultSchema:()=>cr,ElicitationCompleteNotificationParamsSchema:()=>or,ElicitationCompleteNotificationSchema:()=>sr,EmbeddedResourceSchema:()=>dn,EmptyResultSchema:()=>tt,EnumSchemaSchema:()=>er,GetPromptRequestParamsSchema:()=>on,GetPromptRequestSchema:()=>sn,GetPromptResultSchema:()=>hn,GetTaskPayloadRequestSchema:()=>Er,GetTaskPayloadResultSchema:()=>Dr,GetTaskRequestSchema:()=>wr,GetTaskResultSchema:()=>Tr,IconSchema:()=>it,IconsSchema:()=>at,ImageContentSchema:()=>K,ImplementationSchema:()=>W,InitializeRequestParamsSchema:()=>ft,InitializeRequestSchema:()=>pt,InitializeResultSchema:()=>ht,InitializedNotificationSchema:()=>gt,JSONArraySchema:()=>Be,JSONObjectSchema:()=>R,JSONRPCErrorResponseSchema:()=>Qe,JSONRPCMessageSchema:()=>$e,JSONRPCNotificationSchema:()=>Xe,JSONRPCRequestSchema:()=>Ye,JSONRPCResponseSchema:()=>et,JSONRPCResultResponseSchema:()=>Ze,JSONValueSchema:()=>ze,LegacyTitledEnumSchemaSchema:()=>Yn,ListChangedOptionsBaseSchema:()=>Dn,ListPromptsRequestSchema:()=>rn,ListPromptsResultSchema:()=>an,ListResourceTemplatesRequestSchema:()=>It,ListResourceTemplatesResultSchema:()=>Lt,ListResourcesRequestSchema:()=>Pt,ListResourcesResultSchema:()=>Ft,ListRootsRequestSchema:()=>hr,ListRootsResultSchema:()=>gr,ListTasksRequestSchema:()=>Or,ListTasksResultSchema:()=>kr,ListToolsRequestSchema:()=>bn,ListToolsResultSchema:()=>xn,LoggingLevelSchema:()=>On,LoggingMessageNotificationParamsSchema:()=>jn,LoggingMessageNotificationSchema:()=>Mn,ModelHintSchema:()=>Nn,ModelPreferencesSchema:()=>Pn,MultiSelectEnumSchemaSchema:()=>$n,NotificationSchema:()=>H,NotificationsParamsSchema:()=>V,NumberSchemaSchema:()=>Kn,PaginatedRequestParamsSchema:()=>Ct,PaginatedRequestSchema:()=>wt,PaginatedResultSchema:()=>Tt,PingRequestSchema:()=>yt,PrimitiveSchemaDefinitionSchema:()=>tr,ProgressNotificationParamsSchema:()=>xt,ProgressNotificationSchema:()=>St,ProgressSchema:()=>bt,ProgressTokenSchema:()=>Ve,PromptArgumentSchema:()=>G,PromptListChangedNotificationSchema:()=>gn,PromptMessageSchema:()=>mn,PromptReferenceSchema:()=>ur,PromptSchema:()=>nn,ReadResourceRequestParamsSchema:()=>zt,ReadResourceRequestSchema:()=>Bt,ReadResourceResultSchema:()=>Vt,RelatedTaskMetadataSchema:()=>We,RequestIdSchema:()=>Je,RequestMetaSchema:()=>Ge,RequestSchema:()=>B,ResourceContentsSchema:()=>Et,ResourceLinkSchema:()=>fn,ResourceListChangedNotificationSchema:()=>Ht,ResourceRequestParamsSchema:()=>Rt,ResourceSchema:()=>Mt,ResourceTemplateReferenceSchema:()=>lr,ResourceTemplateSchema:()=>Nt,ResourceUpdatedNotificationParamsSchema:()=>en,ResourceUpdatedNotificationSchema:()=>tn,ResultMetaObjectSchema:()=>qe,ResultSchema:()=>U,RoleSchema:()=>At,RootSchema:()=>mr,RootsListChangedNotificationSchema:()=>_r,SamplingContentSchema:()=>Ln,SamplingMessageContentBlockSchema:()=>Rn,SamplingMessageSchema:()=>zn,ServerCapabilitiesSchema:()=>mt,ServerNotificationSchema:()=>Ir,ServerRequestSchema:()=>Fr,ServerResultSchema:()=>Lr,ServerTasksCapabilitySchema:()=>ut,SetLevelRequestParamsSchema:()=>kn,SetLevelRequestSchema:()=>An,SingleSelectEnumSchemaSchema:()=>Xn,StringSchemaSchema:()=>Gn,SubscribeRequestParamsSchema:()=>Ut,SubscribeRequestSchema:()=>Wt,SubscriptionFilterSchema:()=>qt,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Xt,SubscriptionsAcknowledgedNotificationSchema:()=>Zt,SubscriptionsListenRequestParamsSchema:()=>Jt,SubscriptionsListenRequestSchema:()=>Yt,SubscriptionsListenResultMetaSchema:()=>Qt,SubscriptionsListenResultSchema:()=>$t,TaskAugmentedRequestParamsSchema:()=>Ke,TaskCreationParamsSchema:()=>vr,TaskMetadataSchema:()=>Ue,TaskSchema:()=>br,TaskStatusNotificationParamsSchema:()=>Sr,TaskStatusNotificationSchema:()=>Cr,TaskStatusSchema:()=>yr,TextContentSchema:()=>cn,TextResourceContentsSchema:()=>Dt,TitledMultiSelectEnumSchemaSchema:()=>Qn,TitledSingleSelectEnumSchemaSchema:()=>Jn,ToolAnnotationsSchema:()=>_n,ToolChoiceSchema:()=>Fn,ToolExecutionSchema:()=>vn,ToolListChangedNotificationSchema:()=>En,ToolResultContentSchema:()=>In,ToolSchema:()=>yn,ToolUseContentSchema:()=>un,UnsubscribeRequestParamsSchema:()=>Gt,UnsubscribeRequestSchema:()=>Kt,UntitledMultiSelectEnumSchemaSchema:()=>Zn,UntitledSingleSelectEnumSchemaSchema:()=>qn}),Ra=e=>Ye.safeParse(e).success,za=e=>Xe.safeParse(e).success,Ba=e=>Ze.safeParse(e).success,Va=e=>Qe.safeParse(e).success,Ha=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Ua=e=>pt.safeParse(e).success,Wa=e=>gt.safeParse(e).success,Ga=`Mcp-Param-`,Ka=`x-mcp-header`,qa=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Ja=new Set([`string`,`integer`,`boolean`,`number`]);function Ya(e){let t=[],n=new Map,r=(e,i,a)=>{if(typeof e!=`object`||!e)return;let o=e;if(Ka in o){if(!a||i.length===0)return`${Qa(i)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=o[Ka];if(typeof e!=`string`||e.length===0)return`${Qa(i)}: x-mcp-header MUST be a non-empty string`;if(!qa.test(e))return`${Qa(i)}: x-mcp-header '${e}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let r=typeof o.type==`string`?o.type:void 0;if(r===void 0||!Ja.has(r))return`${Qa(i)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${r??``}`;let s=e.toLowerCase(),c=n.get(s);if(c!==void 0)return`x-mcp-header '${e}' is not case-insensitively unique (also declared as '${c}')`;n.set(s,e),t.push({path:i,headerName:e,type:r})}let s=o.properties;if(typeof s==`object`&&s)for(let[e,t]of Object.entries(s)){let n=r(t,[...i,e],a);if(n!==void 0)return n}for(let e of Xa){let t=o[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Za.has(e)?Object.values(t):[t];for(let t of n){let n=r(t,[...i,`<${e}>`],!1);if(n!==void 0)return n}}},i=r(e,[],!0);return i===void 0?{valid:!0,declarations:t}:{valid:!1,reason:i}}var Xa=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Za=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Qa(e){return e.length===0?``:e.join(`.`)}var $a=`=?base64?`,eo=`?=`;function to(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function no(e){if(e.length===0||e.startsWith($a)&&e.endsWith(eo)||e!==e.trim())return!0;for(let t=0;t=32&&n<=126))return!0}return!1}function ro(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function io(e){return no(e)?`${$a}${ro(e)}${eo}`:e}function ao(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function oo(e,t){let n={};for(let r of e){let e=ao(t,r.path);if(e==null)continue;let i=to(e);i!==void 0&&(n[`${Ga}${r.headerName}`]=io(i))}return n}X.InvalidRequest,X.UnsupportedProtocolVersion,X.InvalidParams,X.MethodNotFound,X.InvalidParams,X.MissingRequiredClientCapability,X.ParseError,X.InvalidRequest,X.MethodNotFound,X.UnsupportedProtocolVersion,X.MissingRequiredClientCapability;var so={"tools/call":`name`,"prompts/get":`name`,"resources/read":`uri`,"tasks/get":`taskId`,"tasks/update":`taskId`,"tasks/cancel":`taskId`};function co(e,t){let n=Object.hasOwn(so,e)?so[e]:void 0;if(n===void 0)return;let r=lo(t)?t[n]:void 0;return{field:n,value:typeof r==`string`?r:void 0}}function lo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function uo(e,t){return f(e,t)}function fo(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function po(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var mo=!1,ho=`draft-2020-12`;function go(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:ho});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);mo||(mo=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=M(e,{target:ho,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&_o(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function _o(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||_o(e)))}return!1}function vo(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function yo(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>vo(e)).join(`, `)}:{success:!0,data:n.value}}function bo(e){let t=M(e,{target:ho,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var xo=/\\\.\\d\{(\d+)\}/;function So(e){let t=xo.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>de({local:e,offset:t,precision:n}))))}function Co(e,t){let n;switch(e){case`email`:n=[C()];break;case`uri`:n=[y()];break;case`date`:n=[fe()];break;case`date-time`:n=So(t)}return new Set(n.map(e=>bo(e)).filter(e=>e!==void 0))}function wo(e,t,n){return n!==`zod`||Co(e,t).has(t)}function To(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Eo(e){try{return go(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Z(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Do=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Oo(e){return Do.has(e)||e.startsWith(`x-`)}var ko=new Set([`$schema`,...Object.keys(nr.shape.requestedSchema.shape)]),Ao={string:fo([Gn,qn,Jn,Yn]),number:fo([Kn]),integer:fo([Kn]),boolean:fo([Wn]),array:fo([Zn,Qn])},jo=new Set(Gn.shape.format.unwrap().options);function Mo(e,t,n,r){if(!To(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Ao,e.type)?Ao[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Oo(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?jo.has(e.format)?(typeof s!=`string`||!wo(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function No(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&To(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Mo(n,`properties.${e}`,t,r)])):ko.has(i)?n[i]=a:Oo(i)||r.push(i);if(r.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function Po(e,t){if(!To(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!uo(tr,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Fo(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Fo(e,t[r],`${n}[${r}]`)):!To(e)||!To(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Fo(r,t[e],i):Oo(e)?[]:[i]})}function Io(e){if(!po(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=No(Eo(e.requestedSchema),t),r=uo(nr.shape.requestedSchema,n);if(!r.success)throw new Z(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${Po(n,r.error.message)}`);let i=Fo(n,r.data);if(i.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Lo(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Lo,{elicit(e){try{return{method:`elicitation/create`,params:Io(e)}}catch(e){throw e instanceof Z?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Ro=!0,zo=10,Bo=250;function Vo(e){return{autoFulfill:e?.autoFulfill??Ro,maxRounds:e?.maxRounds??zo}}function Ho(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Uo(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function Wo(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Go(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Ko(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new Y(J.InputRequiredRoundsExceeded,Uo(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by '${n}' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Go(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await Wo(Bo,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new Y(J.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Ho(r,u,c.requestState),d);if(Ha(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var qo=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Jo={IdJagTokenExchangeResponseSchema:Ur,OAuthClientInformationFullSchema:Jr,OAuthClientInformationSchema:qr,OAuthClientMetadataSchema:Kr,OAuthClientRegistrationErrorSchema:Yr,OAuthErrorResponseSchema:Wr,OAuthMetadataSchema:zr,OAuthProtectedResourceMetadataSchema:Rr,OAuthTokenRevocationRequestSchema:Xr,OAuthTokensSchema:Hr,OpenIdProviderDiscoveryMetadataSchema:Vr,OpenIdProviderMetadataSchema:Br},Yo={},Xo={};function Zo(e,t){let n=e.slice(0,-6);Yo[n]=t,Xo[n]=e=>t.safeParse(e).success}for(let e of qo)Zo(e,La[e]);for(let[e,t]of Object.entries(Jo))Zo(e,t);Object.freeze(Yo);var Qo=Object.freeze(Xo);function $o(e){switch(e){case`initialize`:case`notifications/initialized`:return ja(void 0);case`server/discover`:return ja(Aa);default:return}}var es=[Ne,Pe,Ie,Re],ts=[`inputResponses`,`requestState`];function ns(e,t){let n=e.params;if(!ss(n))return{message:e,lifted:{}};let r=n._meta,i=ss(r)?es.filter(e=>e in r):[],a=t===`request`?ts.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ss(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function rs(e,t){let n=e.validateResult(t,void 0);if(n.ok||n.reason!==`not-in-era`)return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function is(e){return()=>e}var as=is(void 0),os=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??je,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new Y(J.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Y(J.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Ba(e)||Va(e)?this._onresponse(e):Ra(e)?this._onrequest(e,t):za(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new Y(J.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=ns(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Ma(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Pa(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;(i!==void 0||a!==void 0)&&Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=ns(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Ma(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Na(n.method)&&!i.hasRequestMethod(n.method)&&!(Fa(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(X.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(X.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(X.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:us(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?as:is(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),po(t))return u(e,t,n);let i=rs(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(X.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:X.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ba(e)?n(e):n(Z.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(po(t))return Fa(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=rs(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return ja(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=$o(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Na(t)&&!e.hasRequestMethod(t))throw new Y(J.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof Y?e:new Y(J.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(gs(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;yo(n,o).then(e=>{e.success?d(e.data):f(new Y(J.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new Y(J.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new Y(J.NotConnected,`Not connected`);if(Pa(t.method)&&!e.hasNotificationMethod(t.method))throw new Y(J.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Na(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await yo(t.params,{...r.params});if(!a.success)throw new Z(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Pa(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await yo(t.params,{...r.params});if(!i.success)throw new Z(X.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ss(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function cs(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=ss(a)&&ss(i)?{...a,...i}:i}return n}function ls(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function us(e){let t={},n=[];if(!ls(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ls(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function ds(e){throw new Y(J.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function fs(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:is(void 0),signal:r,send:(()=>ds(`send`)),notify:()=>ds(`notify`)}}}async function ps(e,t,n,r,i){if(!ls(r)||typeof r.method!=`string`)throw new Y(J.InvalidResult,`Invalid input request '${n}': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new Y(J.InvalidResult,`Invalid input request '${n}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new Y(J.CapabilityNotSupported,`Cannot fulfil input request '${n}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ls(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(fs(n,a,s,i,e.sessionId)))}function ms(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function hs(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>ps(e,i,t,n,r),retry:(e,t)=>r.retry(e,ms(o,t))};return Ko({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function gs(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}var _s=Ce(be((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),1);function vs(e){if(e)try{return _s.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function ys(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function bs(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...ys(t.headers),...ys(r.headers)}:t.headers}):e}var xs=new Set([301,302,303,307,308]),Ss=5;function Cs(e,t){return e.protocol===t.protocol&&e.host===t.host||e.protocol===`http:`&&t.protocol===`https:`&&e.hostname===t.hostname&&!e.port&&!t.port}function ws(e,t){let n=xs.has(t.status)?t.headers?.get(`location`):void 0;if(n)try{return new URL(n,e)}catch{return}}var Ts=new WeakSet;function Es(e){let t=(t,n)=>e(t,n);return Ts.add(t),t}function Ds(e){return Ts.has(e)?e:async(t,n)=>{if(n?.redirect===`error`||n?.redirect===`manual`)return e(t,n);let r=(n?.method??`GET`).toUpperCase(),i=t;for(let t=0;;t++){let a=await e(i,{...n,redirect:`manual`}),o=ws(i,a);if(!o||t===Ss)return a;let s=new URL(i),c=r===`GET`||a.status===307||a.status===308,l=!(o.username||o.password)||o.username===s.username&&o.password===s.password;if(!c||!l||!Cs(s,o))return a;await a.text?.().catch(()=>{}),i=o}}}function Os(e,t){if(t.type===`opaqueredirect`)return`Redirect not followed: this runtime does not expose where it points`;let n=ws(t.url||e,t);if(n)return n.username=n.password=n.search=n.hash=``,n.protocol===`http:`&&new URL(t.url||e).protocol===`https:`?(n.protocol=`https:`,`Redirect from https to plain http not followed; try ${n.href} as the endpoint`):`Redirect to ${n.href} not followed; use that URL as the endpoint if it is the intended server`}function ks(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r1?t[a.href]=e:(a.hash=``,r===``?n=a:Is(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(Ps[i])continue;let a=`${r}/${As(i)}`,o=e[i];if(Array.isArray(o)){if(Ms[i]){let e=o.length;for(let r=0;r%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Us=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Ws=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Gs=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Ks=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,qs=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Js=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Ys=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Xs=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Zs=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Qs(e){return e.test.bind(e)}var $s={date:tc,time:nc.bind(void 0,!1),"date-time":ic,duration:Zs,uri:sc,"uri-reference":Qs(Vs),"uri-template":Qs(Hs),url:Qs(Us),email:Js,hostname:Qs(Bs),ipv4:Qs(Ys),ipv6:Qs(Xs),regex:lc,uuid:Qs(Ws),"json-pointer":Qs(Gs),"json-pointer-uri-fragment":Qs(Ks),"relative-json-pointer":Qs(qs)};function ec(e){return e%4==0&&(e%100!=0||e%400==0)}function tc(e){let t=e.match(Ls);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&ec(n)?29:Rs[r])}function nc(e,t){let n=t.match(zs);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var rc=/t|\s/i;function ic(e){let t=e.split(rc);return t.length==2&&tc(t[0])&&nc(!0,t[1])}var ac=/\/|:/,oc=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function sc(e){return ac.test(e)&&oc.test(e)}var cc=/[^\\]\\Z/;function lc(e){if(cc.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function uc(e){let t=0,n=e.length,r=0,i;for(;r=55296&&i<=56319&&r{if(typeof e!=`string`||/[\s;'\"]/.test(e))return!1;let t=e.match(/^([a-z]+):\/\/([^/]+)$/i);return!!(t&&n.has(t[1].toLowerCase()))})}function me(e){let t=F(F(F(e)?.ui)?.csp),n=I(t?.connectDomains,[`http`,`https`,`ws`,`wss`]),r=I(t?.resourceDomains,[`http`,`https`]),i=I(t?.frameDomains,[`http`,`https`]),a=I(t?.baseUriDomains,[`http`,`https`]),o=r.length?` ${r.join(` `)}`:``,s=[`default-src 'none'`,`worker-src blob:`,`script-src 'self' 'unsafe-inline'${o}`,`style-src 'self' 'unsafe-inline'${o}`,`img-src 'self' data:${o}`,`media-src 'self' data:${o}`,`font-src 'self' data:${o}`,`connect-src ${n.length?n.join(` `):`'none'`}`];return i.length&&s.push(`frame-src ${i.join(` `)}`),a.length&&s.push(`base-uri ${a.join(` `)}`),`${s.join(`; `)};`}var he=Object.create,ge=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,ve=Object.getOwnPropertyNames,L=Object.getPrototypeOf,ye=Object.prototype.hasOwnProperty,be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xe=(e,t)=>{let n={};for(var r in e)ge(n,r,{get:e[r],enumerable:!0});return t&&ge(n,Symbol.toStringTag,{value:`Module`}),n},Se=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ve(t),a=0,o=i.length,s;at[e]).bind(null,s),enumerable:!(r=_e(t,s))||r.enumerable});return e},Ce=(e,t,n)=>(n=e==null?{}:he(L(e)),Se(t||!e||!e.__esModule?ge(n,`default`,{value:e,enumerable:!0}):n,e)),we=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),Te=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),Ee=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),De=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function Oe(e){return typeof e==`string`&&Te.has(e.replace(/#$/,``))}function ke(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(we.has(n))return`2020-12`;if(Te.has(n))return`2019-09`;if(Ee.has(n)||De.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var Ae=`2025-11-25`,je=[Ae,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Me=`io.modelcontextprotocol/related-task`,Ne=`io.modelcontextprotocol/protocolVersion`,Pe=`io.modelcontextprotocol/clientInfo`,Fe=`io.modelcontextprotocol/serverInfo`,Ie=`io.modelcontextprotocol/clientCapabilities`,Le=`io.modelcontextprotocol/subscriptionId`,Re=`io.modelcontextprotocol/logLevel`,ze=ce(()=>S([P(),O(),k(),ie(),j(P(),ze),x(ze)])),R=j(P(),ze),Be=x(ze),Ve=S([P(),O().int()]),He=P(),Ue=D({ttl:O().optional()}),We=D({taskId:P()}),Ge=T({progressToken:Ve.optional(),[Me]:We.optional()}),z=D({_meta:Ge.optional()}),Ke=z.extend({task:Ue.optional()}),B=D({method:P(),params:z.loose().optional()}),V=D({_meta:Ge.optional()}),H=D({method:P(),params:V.loose().optional()}),qe=T({get[Fe](){return W.optional().catch(void 0)}}),U=T({_meta:qe.optional()}),Je=S([P(),O().int()]),Ye=D({jsonrpc:w(`2.0`),id:Je,...B.shape}).strict(),Xe=D({jsonrpc:w(`2.0`),...H.shape}).strict(),Ze=D({jsonrpc:w(`2.0`),id:Je,result:U}).strict(),Qe=D({jsonrpc:w(`2.0`),id:Je.optional(),error:D({code:O().int(),message:P(),data:N().optional()})}).strict(),$e=S([Ye,Xe,Ze,Qe]),et=S([Ze,Qe]),tt=U.strict(),nt=V.extend({requestId:Je.optional(),reason:P().optional()}),rt=H.extend({method:w(`notifications/cancelled`),params:nt}),it=D({src:P(),mimeType:P().optional(),sizes:x(P()).optional(),theme:A([`light`,`dark`]).optional()}),at=D({icons:x(it).optional()}),ot=D({name:P(),title:P().optional()}),W=ot.extend({...ot.shape,...at.shape,version:P(),websiteUrl:P().optional(),description:P().optional()}),st=re(D({applyDefaults:k().optional()}),R),ct=ee(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,re(D({form:st.optional(),url:R.optional()}),R.optional())),lt=T({list:R.optional(),cancel:R.optional(),requests:T({sampling:T({createMessage:R.optional()}).optional(),elicitation:T({create:R.optional()}).optional()}).optional()}),ut=T({list:R.optional(),cancel:R.optional(),requests:T({tools:T({call:R.optional()}).optional()}).optional()}),dt=D({experimental:j(P(),R).optional(),sampling:D({context:R.optional(),tools:R.optional()}).optional(),elicitation:ct.optional(),roots:D({listChanged:k().optional()}).optional(),tasks:lt.optional(),extensions:j(P(),R).optional()}),ft=z.extend({protocolVersion:P(),capabilities:dt,clientInfo:W}),pt=B.extend({method:w(`initialize`),params:ft}),mt=D({experimental:j(P(),R).optional(),logging:R.optional(),completions:R.optional(),prompts:D({listChanged:k().optional()}).optional(),resources:D({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:D({listChanged:k().optional()}).optional(),tasks:ut.optional(),extensions:j(P(),R).optional()}),ht=U.extend({protocolVersion:P(),capabilities:mt,serverInfo:W,instructions:P().optional()}),gt=H.extend({method:w(`notifications/initialized`),params:V.optional()}),_t=B.extend({method:w(`server/discover`),params:z.optional()}),vt=U.extend({supportedVersions:x(P()),capabilities:mt,instructions:P().optional()}),yt=B.extend({method:w(`ping`),params:z.optional()}),bt=D({progress:O(),total:E(O()),message:E(P())}),xt=D({...V.shape,...bt.shape,progressToken:Ve}),St=H.extend({method:w(`notifications/progress`),params:xt}),Ct=z.extend({cursor:He.optional()}),wt=B.extend({params:Ct.optional()}),Tt=U.extend({nextCursor:He.optional()}),Et=D({uri:P(),mimeType:E(P()),_meta:j(P(),N()).optional()}),Dt=Et.extend({text:P()}),Ot=P().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),kt=Et.extend({blob:Ot}),At=A([`user`,`assistant`]),jt=D({audience:x(At).optional(),priority:O().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),Mt=D({...ot.shape,...at.shape,uri:P(),description:E(P()),mimeType:E(P()),size:E(O()),annotations:jt.optional(),_meta:E(T({}))}),Nt=D({...ot.shape,...at.shape,uriTemplate:P(),description:E(P()),mimeType:E(P()),annotations:jt.optional(),_meta:E(T({}))}),Pt=wt.extend({method:w(`resources/list`)}),Ft=Tt.extend({resources:x(Mt)}),It=wt.extend({method:w(`resources/templates/list`)}),Lt=Tt.extend({resourceTemplates:x(Nt)}),Rt=z.extend({uri:P()}),zt=Rt,Bt=B.extend({method:w(`resources/read`),params:zt}),Vt=U.extend({contents:x(S([Dt,kt]))}),Ht=H.extend({method:w(`notifications/resources/list_changed`),params:V.optional()}),Ut=Rt,Wt=B.extend({method:w(`resources/subscribe`),params:Ut}),Gt=Rt,Kt=B.extend({method:w(`resources/unsubscribe`),params:Gt}),qt=D({toolsListChanged:k().optional(),promptsListChanged:k().optional(),resourcesListChanged:k().optional(),resourceSubscriptions:x(P()).optional()}),Jt=z.extend({notifications:qt}),Yt=B.extend({method:w(`subscriptions/listen`),params:Jt}),Xt=V.extend({notifications:qt}),Zt=H.extend({method:w(`notifications/subscriptions/acknowledged`),params:Xt}),Qt=qe.extend({[Le]:Je}),$t=U.extend({_meta:Qt}),en=V.extend({uri:P()}),tn=H.extend({method:w(`notifications/resources/updated`),params:en}),G=D({name:P(),description:E(P()),required:E(k())}),nn=D({...ot.shape,...at.shape,description:E(P()),arguments:E(x(G)),_meta:E(T({}))}),rn=wt.extend({method:w(`prompts/list`)}),an=Tt.extend({prompts:x(nn)}),on=z.extend({name:P(),arguments:j(P(),P()).optional()}),sn=B.extend({method:w(`prompts/get`),params:on}),cn=D({type:w(`text`),text:P(),annotations:jt.optional(),_meta:j(P(),N()).optional()}),K=D({type:w(`image`),data:Ot,mimeType:P(),annotations:jt.optional(),_meta:j(P(),N()).optional()}),ln=D({type:w(`audio`),data:Ot,mimeType:P(),annotations:jt.optional(),_meta:j(P(),N()).optional()}),un=D({type:w(`tool_use`),name:P(),id:P(),input:j(P(),N()),_meta:j(P(),N()).optional()}),dn=D({type:w(`resource`),resource:S([Dt,kt]),annotations:jt.optional(),_meta:j(P(),N()).optional()}),fn=Mt.extend({type:w(`resource_link`)}),pn=S([cn,K,ln,fn,dn]),mn=D({role:At,content:pn}),hn=U.extend({description:P().optional(),messages:x(mn)}),gn=H.extend({method:w(`notifications/prompts/list_changed`),params:V.optional()}),_n=D({title:P().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),vn=D({taskSupport:A([`required`,`optional`,`forbidden`]).optional()}),yn=D({...ot.shape,...at.shape,description:P().optional(),inputSchema:D({type:w(`object`),properties:j(P(),ze).optional(),required:x(P()).optional()}).catchall(N()),outputSchema:T({$schema:P().optional()}).optional(),annotations:_n.optional(),execution:vn.optional(),_meta:j(P(),N()).optional()}),bn=wt.extend({method:w(`tools/list`)}),xn=Tt.extend({tools:x(yn)}),Sn=U.extend({content:x(pn).default([]),structuredContent:N().optional(),isError:k().optional()}),Cn=Sn.or(U.extend({toolResult:N()})),wn=Ke.extend({name:P(),arguments:j(P(),N()).optional()}),Tn=B.extend({method:w(`tools/call`),params:wn}),En=H.extend({method:w(`notifications/tools/list_changed`),params:V.optional()}),Dn=D({autoRefresh:k().default(!0),debounceMs:O().int().nonnegative().default(300)}),On=A([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),kn=z.extend({level:On}),An=B.extend({method:w(`logging/setLevel`),params:kn}),jn=V.extend({level:On,logger:P().optional(),data:N()}),Mn=H.extend({method:w(`notifications/message`),params:jn}),Nn=D({name:P().optional()}),Pn=D({hints:x(Nn).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),Fn=D({mode:A([`auto`,`required`,`none`]).optional()}),In=D({type:w(`tool_result`),toolUseId:P().describe(`The unique identifier for the corresponding tool call.`),content:x(pn),structuredContent:N().optional(),isError:k().optional(),_meta:j(P(),N()).optional()}),Ln=se(`type`,[cn,K,ln]),Rn=se(`type`,[cn,K,ln,un,In]),zn=D({role:At,content:S([Rn,x(Rn)]),_meta:j(P(),N()).optional()}),Bn=Ke.extend({messages:x(zn),modelPreferences:Pn.optional(),systemPrompt:P().optional(),includeContext:A([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:x(P()).optional(),metadata:R.optional(),tools:x(yn).optional(),toolChoice:Fn.optional()}),Vn=B.extend({method:w(`sampling/createMessage`),params:Bn}),Hn=U.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`]).or(P())),role:At,content:Ln}),Un=U.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(P())),role:At,content:S([Rn,x(Rn)])}),Wn=D({type:w(`boolean`),title:P().optional(),description:P().optional(),default:k().optional()}),Gn=D({type:w(`string`),title:P().optional(),description:P().optional(),minLength:O().optional(),maxLength:O().optional(),format:A([`email`,`uri`,`date`,`date-time`]).optional(),default:P().optional()}),Kn=D({type:A([`number`,`integer`]),title:P().optional(),description:P().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),qn=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),default:P().optional()}),Jn=D({type:w(`string`),title:P().optional(),description:P().optional(),oneOf:x(D({const:P(),title:P()})),default:P().optional()}),Yn=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),enumNames:x(P()).optional(),default:P().optional()}),Xn=S([qn,Jn]),Zn=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({type:w(`string`),enum:x(P())}),default:x(P()).optional()}),Qn=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({anyOf:x(D({const:P(),title:P()}))}),default:x(P()).optional()}),$n=S([Zn,Qn]),er=S([Yn,Xn,$n]),tr=S([er,Wn,Gn,Kn]),nr=Ke.extend({mode:w(`form`).optional(),message:P(),requestedSchema:D({type:w(`object`),properties:j(P(),tr),required:x(P()).optional()}).catchall(N())}),rr=Ke.extend({mode:w(`url`),message:P(),elicitationId:P(),url:P().url()}),ir=S([nr,rr]),ar=B.extend({method:w(`elicitation/create`),params:ir}),or=V.extend({elicitationId:P()}),sr=H.extend({method:w(`notifications/elicitation/complete`),params:or}),cr=U.extend({action:A([`accept`,`decline`,`cancel`]),content:ee(e=>e===null?void 0:e,j(P(),S([P(),O(),k(),x(P())])).optional())}),lr=D({type:w(`ref/resource`),uri:P()}),ur=D({type:w(`ref/prompt`),name:P()}),dr=z.extend({ref:S([ur,lr]),argument:D({name:P(),value:P()}),context:D({arguments:j(P(),P()).optional()}).optional()}),fr=B.extend({method:w(`completion/complete`),params:dr}),pr=U.extend({completion:T({values:x(P()).max(100),total:E(O().int()),hasMore:E(k())})}),mr=D({uri:P().startsWith(`file://`),name:P().optional(),_meta:j(P(),N()).optional()}),hr=B.extend({method:w(`roots/list`),params:z.optional()}),gr=U.extend({roots:x(mr)}),_r=H.extend({method:w(`notifications/roots/list_changed`),params:V.optional()}),vr=T({ttl:O().optional(),pollInterval:O().optional()}),yr=A([`working`,`input_required`,`completed`,`failed`,`cancelled`]),br=D({taskId:P(),status:yr,ttl:S([O(),ie()]),createdAt:P(),lastUpdatedAt:P(),pollInterval:E(O()),statusMessage:E(P())}),xr=U.extend({task:br}),Sr=V.merge(br),Cr=H.extend({method:w(`notifications/tasks/status`),params:Sr}),wr=B.extend({method:w(`tasks/get`),params:z.extend({taskId:P()})}),Tr=U.merge(br),Er=B.extend({method:w(`tasks/result`),params:z.extend({taskId:P()})}),Dr=U.loose(),Or=wt.extend({method:w(`tasks/list`)}),kr=Tt.extend({tasks:x(br)}),Ar=B.extend({method:w(`tasks/cancel`),params:z.extend({taskId:P()})}),jr=U.merge(br),Mr=S([yt,pt,_t,fr,An,sn,rn,Pt,It,Bt,Wt,Kt,Yt,Tn,bn]),Nr=S([rt,St,gt,_r]),Pr=S([tt,Hn,Un,cr,gr]),Fr=S([yt,Vn,ar,hr]),Ir=S([rt,St,Mn,tn,Ht,En,gn,Zt,sr]),Lr=S([tt,ht,vt,pr,hn,an,Ft,Lt,Vt,Sn,xn,$t]),q=y().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:le.custom,message:`URL must be parseable`,fatal:!0}),h}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),Rr=T({resource:P().url(),authorization_servers:x(q).optional(),jwks_uri:P().url().optional(),scopes_supported:x(P()).optional(),bearer_methods_supported:x(P()).optional(),resource_signing_alg_values_supported:x(P()).optional(),resource_name:P().optional(),resource_documentation:P().optional(),resource_policy_uri:P().url().optional(),resource_tos_uri:P().url().optional(),tls_client_certificate_bound_access_tokens:k().optional(),authorization_details_types_supported:x(P()).optional(),dpop_signing_alg_values_supported:x(P()).optional(),dpop_bound_access_tokens_required:k().optional()}),zr=T({issuer:P(),authorization_endpoint:q,token_endpoint:q,registration_endpoint:q.optional(),scopes_supported:x(P()).optional(),response_types_supported:x(P()),response_modes_supported:x(P()).optional(),grant_types_supported:x(P()).optional(),token_endpoint_auth_methods_supported:x(P()).optional(),token_endpoint_auth_signing_alg_values_supported:x(P()).optional(),service_documentation:q.optional(),revocation_endpoint:q.optional(),revocation_endpoint_auth_methods_supported:x(P()).optional(),revocation_endpoint_auth_signing_alg_values_supported:x(P()).optional(),introspection_endpoint:P().optional(),introspection_endpoint_auth_methods_supported:x(P()).optional(),introspection_endpoint_auth_signing_alg_values_supported:x(P()).optional(),code_challenge_methods_supported:x(P()).optional(),client_id_metadata_document_supported:k().optional(),authorization_response_iss_parameter_supported:k().optional().catch(void 0),dpop_signing_alg_values_supported:x(P()).optional()}),Br=T({issuer:P(),authorization_endpoint:q,token_endpoint:q,userinfo_endpoint:q.optional(),jwks_uri:q,registration_endpoint:q.optional(),scopes_supported:x(P()).optional(),response_types_supported:x(P()),response_modes_supported:x(P()).optional(),grant_types_supported:x(P()).optional(),acr_values_supported:x(P()).optional(),subject_types_supported:x(P()),id_token_signing_alg_values_supported:x(P()),id_token_encryption_alg_values_supported:x(P()).optional(),id_token_encryption_enc_values_supported:x(P()).optional(),userinfo_signing_alg_values_supported:x(P()).optional(),userinfo_encryption_alg_values_supported:x(P()).optional(),userinfo_encryption_enc_values_supported:x(P()).optional(),request_object_signing_alg_values_supported:x(P()).optional(),request_object_encryption_alg_values_supported:x(P()).optional(),request_object_encryption_enc_values_supported:x(P()).optional(),token_endpoint_auth_methods_supported:x(P()).optional(),token_endpoint_auth_signing_alg_values_supported:x(P()).optional(),display_values_supported:x(P()).optional(),claim_types_supported:x(P()).optional(),claims_supported:x(P()).optional(),service_documentation:P().optional(),claims_locales_supported:x(P()).optional(),ui_locales_supported:x(P()).optional(),claims_parameter_supported:k().optional(),request_parameter_supported:k().optional(),request_uri_parameter_supported:k().optional(),require_request_uri_registration:k().optional(),op_policy_uri:q.optional(),op_tos_uri:q.optional(),client_id_metadata_document_supported:k().optional(),authorization_response_iss_parameter_supported:k().optional().catch(void 0)}),Vr=D({...Br.shape,...zr.pick({code_challenge_methods_supported:!0}).shape}),Hr=D({access_token:P(),id_token:P().optional(),token_type:P(),expires_in:pe().optional(),scope:P().optional(),refresh_token:P().optional(),issuer:P().optional().catch(void 0)}).strip(),Ur=D({issued_token_type:w(`urn:ietf:params:oauth:token-type:id-jag`),access_token:P(),token_type:P().optional(),expires_in:O().optional(),scope:P().optional()}).strip(),Wr=D({error:P(),error_description:P().optional(),error_uri:P().optional()}),Gr=q.optional().or(w(``).transform(()=>void 0)),Kr=D({redirect_uris:x(q),token_endpoint_auth_method:P().optional(),grant_types:x(P()).optional(),response_types:x(P()).optional(),application_type:P().optional(),client_name:P().optional(),client_uri:q.optional(),logo_uri:Gr,scope:P().optional(),contacts:x(P()).optional(),tos_uri:Gr,policy_uri:P().optional(),jwks_uri:q.optional(),jwks:ne().optional(),software_id:P().optional(),software_version:P().optional(),software_statement:P().optional()}).strip(),qr=D({client_id:P(),client_secret:P().optional(),client_id_issued_at:O().optional(),client_secret_expires_at:O().optional(),issuer:P().optional().catch(void 0)}).strip(),Jr=Kr.merge(qr),Yr=D({error:P(),error_description:P().optional()}).strip(),Xr=D({token:P(),token_type_hint:P().optional()}).strip(),Zr=Symbol.for(`mcp.sdk.errorBrands`);function Qr(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Zr,{value:n,enumerable:!1,configurable:!0})}function $r(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Zr)){let n=t[Zr];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var ei=function(e){return e.InvalidRequest=`invalid_request`,e.InvalidClient=`invalid_client`,e.InvalidGrant=`invalid_grant`,e.UnauthorizedClient=`unauthorized_client`,e.UnsupportedGrantType=`unsupported_grant_type`,e.InvalidScope=`invalid_scope`,e.AccessDenied=`access_denied`,e.ServerError=`server_error`,e.TemporarilyUnavailable=`temporarily_unavailable`,e.UnsupportedResponseType=`unsupported_response_type`,e.UnsupportedTokenType=`unsupported_token_type`,e.InvalidToken=`invalid_token`,e.MethodNotAllowed=`method_not_allowed`,e.TooManyRequests=`too_many_requests`,e.InvalidClientMetadata=`invalid_client_metadata`,e.InvalidRedirectUri=`invalid_redirect_uri`,e.InsufficientScope=`insufficient_scope`,e.InvalidTarget=`invalid_target`,e.InvalidDpopProof=`invalid_dpop_proof`,e.UseDpopNonce=`use_dpop_nonce`,e}({}),ti=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return $r(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return $r(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Qr(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}},J=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),Y=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return $r(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return $r(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,Qr(this,new.target)}},ni=class extends Y{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}};function ri(e){let t=typeof e==`string`?new URL(e):new URL(e.href);return t.hash=``,t}function ii(e){if(typeof e!=`object`||!e||Array.isArray(e))return e;let t={...e};return delete t.issuer,t}function ai({requestedResource:e,configuredResource:t}){let n=typeof e==`string`?new URL(e):new URL(e.href),r=typeof t==`string`?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length=oi}function li(e){return e.filter(e=>!ci(e))}function ui(e){return e.filter(e=>ci(e))}function di(e){let t=e.structuredContent;return t===void 0||typeof t==`object`&&t&&!Array.isArray(t)||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var fi=[`task`,`inputRequests`,`requestState`];function pi(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||fi.some(t=>t in e)?e:{...e,content:[]}}function mi(){let e=ce(()=>S([P(),O(),k(),ie(),j(P(),e),x(e)])),t=j(P(),e),n=S([P(),O().int()]),r=P(),i=D({ttl:O().optional()}),a=D({taskId:P()}),o=T({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=D({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=D({method:P(),params:s.loose().optional()}),u=D({_meta:o.optional()}),d=D({method:P(),params:u.loose().optional()}),f=T({_meta:o.optional()}),p=S([P(),O().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:P().optional()}),g=d.extend({method:w(`notifications/cancelled`),params:h}),_=D({src:P(),mimeType:P().optional(),sizes:x(P()).optional(),theme:A([`light`,`dark`]).optional()}),v=D({icons:x(_).optional()}),y=D({name:P(),title:P().optional()}),b=y.extend({...y.shape,...v.shape,version:P(),websiteUrl:P().optional(),description:P().optional()}),C=re(D({applyDefaults:k().optional()}),t),te=ee(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,re(D({form:C.optional(),url:t.optional()}),t.optional())),ne=T({list:t.optional(),cancel:t.optional(),requests:T({sampling:T({createMessage:t.optional()}).optional(),elicitation:T({create:t.optional()}).optional()}).optional()}),ae=T({list:t.optional(),cancel:t.optional(),requests:T({tools:T({call:t.optional()}).optional()}).optional()}),oe=D({experimental:j(P(),t).optional(),sampling:D({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:D({listChanged:k().optional()}).optional(),tasks:ne.optional(),extensions:j(P(),t).optional()}),M=s.extend({protocolVersion:P(),capabilities:oe,clientInfo:b}),le=l.extend({method:w(`initialize`),params:M}),ue=D({experimental:j(P(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:D({listChanged:k().optional()}).optional(),resources:D({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:D({listChanged:k().optional()}).optional(),tasks:ae.optional(),extensions:j(P(),t).optional()}),fe=f.extend({protocolVersion:P(),capabilities:ue,serverInfo:b,instructions:P().optional()}),pe=d.extend({method:w(`notifications/initialized`),params:u.optional()}),F=l.extend({method:w(`ping`),params:s.optional()}),I=D({progress:O(),total:E(O()),message:E(P())}),me=D({...u.shape,...I.shape,progressToken:n}),he=d.extend({method:w(`notifications/progress`),params:me}),ge=s.extend({cursor:r.optional()}),_e=l.extend({params:ge.optional()}),ve=f.extend({nextCursor:r.optional()}),L=D({uri:P(),mimeType:E(P()),_meta:j(P(),N()).optional()}),ye=L.extend({text:P()}),be=P().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),xe=L.extend({blob:be}),Se=A([`user`,`assistant`]),Ce=D({audience:x(Se).optional(),priority:O().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),we=D({...y.shape,...v.shape,uri:P(),description:E(P()),mimeType:E(P()),size:E(O()),annotations:Ce.optional(),_meta:E(T({}))}),Te=D({...y.shape,...v.shape,uriTemplate:P(),description:E(P()),mimeType:E(P()),annotations:Ce.optional(),_meta:E(T({}))}),Ee=_e.extend({method:w(`resources/list`)}),De=ve.extend({resources:x(we)}),Oe=_e.extend({method:w(`resources/templates/list`)}),ke=ve.extend({resourceTemplates:x(Te)}),Ae=s.extend({uri:P()}),je=Ae,Me=l.extend({method:w(`resources/read`),params:je}),Ne=f.extend({contents:x(S([ye,xe]))}),Pe=d.extend({method:w(`notifications/resources/list_changed`),params:u.optional()}),Fe=Ae,Ie=l.extend({method:w(`resources/subscribe`),params:Fe}),Le=Ae,Re=l.extend({method:w(`resources/unsubscribe`),params:Le}),ze=u.extend({uri:P()}),R=d.extend({method:w(`notifications/resources/updated`),params:ze}),Be=D({name:P(),description:E(P()),required:E(k())}),Ve=D({...y.shape,...v.shape,description:E(P()),arguments:E(x(Be)),_meta:E(T({}))}),He=_e.extend({method:w(`prompts/list`)}),Ue=ve.extend({prompts:x(Ve)}),We=s.extend({name:P(),arguments:j(P(),P()).optional()}),Ge=l.extend({method:w(`prompts/get`),params:We}),z=D({type:w(`text`),text:P(),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),Ke=D({type:w(`image`),data:be,mimeType:P(),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),B=D({type:w(`audio`),data:be,mimeType:P(),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),V=D({type:w(`tool_use`),name:P(),id:P(),input:j(P(),N()),_meta:j(P(),N()).optional()}),H=D({type:w(`resource`),resource:S([ye,xe]),annotations:Ce.optional(),_meta:j(P(),N()).optional()}),qe=we.extend({type:w(`resource_link`)}),U=S([z,Ke,B,qe,H]),Je=D({role:Se,content:U}),Ye=f.extend({description:P().optional(),messages:x(Je)}),Xe=d.extend({method:w(`notifications/prompts/list_changed`),params:u.optional()}),Ze=D({title:P().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),Qe=D({taskSupport:A([`required`,`optional`,`forbidden`]).optional()}),$e=D({...y.shape,...v.shape,description:P().optional(),inputSchema:D({type:w(`object`),properties:j(P(),e).optional(),required:x(P()).optional()}).catchall(N()),outputSchema:D({type:w(`object`),properties:j(P(),e).optional(),required:x(P()).optional()}).catchall(N()).optional(),annotations:Ze.optional(),execution:Qe.optional(),_meta:j(P(),N()).optional()}),et=_e.extend({method:w(`tools/list`)}),tt=ve.extend({tools:x($e)}),nt=f.extend({content:x(U),structuredContent:j(P(),N()).optional(),isError:k().optional()}),rt=c.extend({name:P(),arguments:j(P(),N()).optional()}),it=l.extend({method:w(`tools/call`),params:rt}),at=d.extend({method:w(`notifications/tools/list_changed`),params:u.optional()}),ot=A([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),W=s.extend({level:ot}),st=l.extend({method:w(`logging/setLevel`),params:W}),ct=u.extend({level:ot,logger:P().optional(),data:N()}),lt=d.extend({method:w(`notifications/message`),params:ct}),ut=D({name:P().optional()}),dt=D({hints:x(ut).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),ft=D({mode:A([`auto`,`required`,`none`]).optional()}),pt=D({type:w(`tool_result`),toolUseId:P().describe(`The unique identifier for the corresponding tool call.`),content:x(U),structuredContent:D({}).loose().optional(),isError:k().optional(),_meta:j(P(),N()).optional()}),mt=se(`type`,[z,Ke,B]),ht=se(`type`,[z,Ke,B,V,pt]),gt=D({role:Se,content:S([ht,x(ht)]),_meta:j(P(),N()).optional()}),_t=c.extend({messages:x(gt),modelPreferences:dt.optional(),systemPrompt:P().optional(),includeContext:A([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:x(P()).optional(),metadata:t.optional(),tools:x($e).optional(),toolChoice:ft.optional()}),vt=l.extend({method:w(`sampling/createMessage`),params:_t}),yt=f.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`]).or(P())),role:Se,content:mt}),bt=f.extend({model:P(),stopReason:E(A([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(P())),role:Se,content:S([ht,x(ht)])}),xt=D({type:w(`boolean`),title:P().optional(),description:P().optional(),default:k().optional()}),St=D({type:w(`string`),title:P().optional(),description:P().optional(),minLength:O().optional(),maxLength:O().optional(),format:A([`email`,`uri`,`date`,`date-time`]).optional(),default:P().optional()}),Ct=D({type:A([`number`,`integer`]),title:P().optional(),description:P().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),wt=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),default:P().optional()}),Tt=D({type:w(`string`),title:P().optional(),description:P().optional(),oneOf:x(D({const:P(),title:P()})),default:P().optional()}),Et=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),enumNames:x(P()).optional(),default:P().optional()}),Dt=S([wt,Tt]),Ot=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({type:w(`string`),enum:x(P())}),default:x(P()).optional()}),kt=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({anyOf:x(D({const:P(),title:P()}))}),default:x(P()).optional()}),At=S([Ot,kt]),jt=S([Et,Dt,At]),Mt=S([jt,xt,St,Ct]),Nt=c.extend({mode:w(`form`).optional(),message:P(),requestedSchema:D({type:w(`object`),properties:j(P(),Mt),required:x(P()).optional()}).catchall(N())}),Pt=c.extend({mode:w(`url`),message:P(),elicitationId:P(),url:P().url()}),Ft=S([Nt,Pt]),It=l.extend({method:w(`elicitation/create`),params:Ft}),Lt=u.extend({elicitationId:P()}),Rt=d.extend({method:w(`notifications/elicitation/complete`),params:Lt}),zt=f.extend({action:A([`accept`,`decline`,`cancel`]),content:ee(e=>e===null?void 0:e,j(P(),S([P(),O(),k(),x(P())])).optional())}),Bt=D({type:w(`ref/resource`),uri:P()}),Vt=D({type:w(`ref/prompt`),name:P()}),Ht=s.extend({ref:S([Vt,Bt]),argument:D({name:P(),value:P()}),context:D({arguments:j(P(),P()).optional()}).optional()}),Ut=l.extend({method:w(`completion/complete`),params:Ht}),Wt=f.extend({completion:T({values:x(P()).max(100),total:E(O().int()),hasMore:E(k())})}),Gt=D({uri:P().startsWith(`file://`),name:P().optional(),_meta:j(P(),N()).optional()}),Kt=l.extend({method:w(`roots/list`),params:s.optional()}),qt=f.extend({roots:x(Gt)}),Jt=d.extend({method:w(`notifications/roots/list_changed`),params:u.optional()}),Yt=T({ttl:O().optional(),pollInterval:O().optional()}),Xt=A([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Zt=D({taskId:P(),status:Xt,ttl:S([O(),ie()]),createdAt:P(),lastUpdatedAt:P(),pollInterval:E(O()),statusMessage:E(P())}),Qt=f.extend({task:Zt}),$t=u.merge(Zt),en=d.extend({method:w(`notifications/tasks/status`),params:$t}),tn=l.extend({method:w(`tasks/get`),params:s.extend({taskId:P()})}),G=f.merge(Zt),nn=l.extend({method:w(`tasks/result`),params:s.extend({taskId:P()})}),rn=f.loose(),an=_e.extend({method:w(`tasks/list`)}),on=ve.extend({tasks:x(Zt)}),sn=l.extend({method:w(`tasks/cancel`),params:s.extend({taskId:P()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:b,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:ae,ClientCapabilitiesSchema:oe,InitializeRequestParamsSchema:M,InitializeRequestSchema:le,ServerCapabilitiesSchema:ue,InitializeResultSchema:fe,InitializedNotificationSchema:pe,PingRequestSchema:F,ProgressSchema:I,ProgressNotificationParamsSchema:me,ProgressNotificationSchema:he,PaginatedRequestParamsSchema:ge,PaginatedRequestSchema:_e,PaginatedResultSchema:ve,ResourceContentsSchema:L,TextResourceContentsSchema:ye,BlobResourceContentsSchema:xe,RoleSchema:Se,AnnotationsSchema:Ce,ResourceSchema:we,ResourceTemplateSchema:Te,ListResourcesRequestSchema:Ee,ListResourcesResultSchema:De,ListResourceTemplatesRequestSchema:Oe,ListResourceTemplatesResultSchema:ke,ResourceRequestParamsSchema:Ae,ReadResourceRequestParamsSchema:je,ReadResourceRequestSchema:Me,ReadResourceResultSchema:Ne,ResourceListChangedNotificationSchema:Pe,SubscribeRequestParamsSchema:Fe,SubscribeRequestSchema:Ie,UnsubscribeRequestParamsSchema:Le,UnsubscribeRequestSchema:Re,ResourceUpdatedNotificationParamsSchema:ze,ResourceUpdatedNotificationSchema:R,PromptArgumentSchema:Be,PromptSchema:Ve,ListPromptsRequestSchema:He,ListPromptsResultSchema:Ue,GetPromptRequestParamsSchema:We,GetPromptRequestSchema:Ge,TextContentSchema:z,ImageContentSchema:Ke,AudioContentSchema:B,ToolUseContentSchema:V,EmbeddedResourceSchema:H,ResourceLinkSchema:qe,ContentBlockSchema:U,PromptMessageSchema:Je,GetPromptResultSchema:Ye,PromptListChangedNotificationSchema:Xe,ToolAnnotationsSchema:Ze,ToolExecutionSchema:Qe,ToolSchema:$e,ListToolsRequestSchema:et,ListToolsResultSchema:tt,CallToolResultSchema:nt,CallToolRequestParamsSchema:rt,CallToolRequestSchema:it,ToolListChangedNotificationSchema:at,LoggingLevelSchema:ot,SetLevelRequestParamsSchema:W,SetLevelRequestSchema:st,LoggingMessageNotificationParamsSchema:ct,LoggingMessageNotificationSchema:lt,ModelHintSchema:ut,ModelPreferencesSchema:dt,ToolChoiceSchema:ft,ToolResultContentSchema:pt,SamplingContentSchema:mt,SamplingMessageContentBlockSchema:ht,SamplingMessageSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,CreateMessageResultSchema:yt,CreateMessageResultWithToolsSchema:bt,BooleanSchemaSchema:xt,StringSchemaSchema:St,NumberSchemaSchema:Ct,UntitledSingleSelectEnumSchemaSchema:wt,TitledSingleSelectEnumSchemaSchema:Tt,LegacyTitledEnumSchemaSchema:Et,SingleSelectEnumSchemaSchema:Dt,UntitledMultiSelectEnumSchemaSchema:Ot,TitledMultiSelectEnumSchemaSchema:kt,MultiSelectEnumSchemaSchema:At,EnumSchemaSchema:jt,PrimitiveSchemaDefinitionSchema:Mt,ElicitRequestFormParamsSchema:Nt,ElicitRequestURLParamsSchema:Pt,ElicitRequestParamsSchema:Ft,ElicitRequestSchema:It,ElicitationCompleteNotificationParamsSchema:Lt,ElicitationCompleteNotificationSchema:Rt,ElicitResultSchema:zt,ResourceTemplateReferenceSchema:Bt,PromptReferenceSchema:Vt,CompleteRequestParamsSchema:Ht,CompleteRequestSchema:Ut,CompleteResultSchema:Wt,RootSchema:Gt,ListRootsRequestSchema:Kt,ListRootsResultSchema:qt,RootsListChangedNotificationSchema:Jt,TaskCreationParamsSchema:Yt,TaskStatusSchema:Xt,TaskSchema:Zt,CreateTaskResultSchema:Qt,TaskStatusNotificationParamsSchema:$t,TaskStatusNotificationSchema:en,GetTaskRequestSchema:tn,GetTaskResultSchema:G,GetTaskPayloadRequestSchema:nn,GetTaskPayloadResultSchema:rn,ListTasksRequestSchema:an,ListTasksResultSchema:on,CancelTaskRequestSchema:sn,CancelTaskResultSchema:f.merge(Zt),ClientRequestSchema:S([F,le,Ut,st,Ge,He,Ee,Oe,Me,Ie,Re,it,et,tn,nn,an,sn]),ClientNotificationSchema:S([g,he,pe,Jt,en]),ClientResultSchema:S([m,yt,bt,zt,qt,G,on,Qt]),ServerRequestSchema:S([F,vt,It,Kt,tn,nn,an,sn]),ServerNotificationSchema:S([g,he,lt,R,Pe,at,Xe,en,Rt]),ServerResultSchema:S([m,fe,Wt,Ye,Ue,De,ke,Ne,nt,tt,G,on,Qt]),CallToolResultWireSchema:N().superRefine((e,t)=>{if(typeof e==`object`&&e&&!Array.isArray(e)&&e.content===void 0){for(let n of fi)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(pi).pipe(nt)}}var hi;function gi(){return hi??=mi()}function _i(e){return e.type!==`object`}var vi=new Set([`const`,`enum`,`default`,`examples`]),yi=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function bi(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function xi(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(bi(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=Oe(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&bi(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:i[o]=vi.has(o)?s:yi.has(o)?r(s,!0):r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var Si={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Ci={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},wi={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Ti;function Ei(){if(Ti)return Ti;let e=gi();return Ti={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Ti}function Di(e){return Object.prototype.hasOwnProperty.call(Si,e)}function Oi(e){return Object.prototype.hasOwnProperty.call(Ci,e)}function ki(e){return Object.prototype.hasOwnProperty.call(wi,e)}function Ai(e){return ki(e)?Ei().resultSchemas[e]:void 0}function ji(e){return Di(e)?Ei().requestSchemas[e]:void 0}function Mi(e){return Oi(e)?Ei().notificationSchemas[e]:void 0}Object.keys(Si),Object.keys(Ci);function Ni(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pi(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var Fi={ok:!1,reason:`not-in-era`};function Ii(e){return Ni(e)&&Ni(e.outputSchema)&&_i(e.outputSchema)}function Li(e){return e}var Ri={era:`2025-11-25`,hasRequestMethod:Di,hasNotificationMethod:Oi,validateRequest:(e,t)=>Pi(ji(e),t),validateResult:(e,t)=>Pi(Ai(e),t),validateNotification:(e,t)=>Pi(Mi(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Fi,validateInputResponse:()=>Fi,samplingResultVariant:((e,t)=>{let n=gi();return Pi(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=di(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&_i(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Ni(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Li(e)}}return{kind:`complete`,result:Li(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Ii(e))?t:{...t,tools:n.map(e=>Ii(e)?{...e,outputSchema:xi(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function zi(){let e=ce(()=>S([P(),O(),k(),ie(),j(P(),e),x(e)])),t=j(P(),e),n=S([P(),O().int()]),r=P(),i=S([P(),O().int()]),a=A([`user`,`assistant`]),o=A([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=P().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=D({ttl:O().optional()}),l=D({taskId:P()}),u=T({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=D({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=D({_meta:u.optional()}),m=D({method:P(),params:p.loose().optional()}),h=D({src:P(),mimeType:P().optional(),sizes:x(P()).optional(),theme:A([`light`,`dark`]).optional()}),g=D({icons:x(h).optional()}),_=D({name:P(),title:P().optional()}),v=_.extend({..._.shape,...g.shape,version:P(),websiteUrl:P().optional(),description:P().optional()}),y=re(D({applyDefaults:k().optional()}),t),b=ee(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,re(D({form:y.optional(),url:t.optional()}),t.optional())),C=T({list:t.optional(),cancel:t.optional(),requests:T({sampling:T({createMessage:t.optional()}).optional(),elicitation:T({create:t.optional()}).optional()}).optional()}),te=T({list:t.optional(),cancel:t.optional(),requests:T({tools:T({call:t.optional()}).optional()}).optional()}),ne=D({experimental:j(P(),t).optional(),sampling:D({context:t.optional(),tools:t.optional()}).optional(),elicitation:b.optional(),roots:D({listChanged:k().optional()}).optional(),tasks:C.optional(),extensions:j(P(),t).optional()}),ae=D({experimental:j(P(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:D({listChanged:k().optional()}).optional(),resources:D({subscribe:k().optional(),listChanged:k().optional()}).optional(),tools:D({listChanged:k().optional()}).optional(),tasks:te.optional(),extensions:j(P(),t).optional()}),oe=D({progress:O(),total:E(O()),message:E(P())}),se=D({...p.shape,...oe.shape,progressToken:n}),M=m.extend({method:w(`notifications/progress`),params:se}),le=p.extend({level:o,logger:P().optional(),data:N()}),ue=m.extend({method:w(`notifications/message`),params:le}),fe=D({uri:P(),mimeType:E(P()),_meta:j(P(),N()).optional()}),pe=fe.extend({text:P()}),F=fe.extend({blob:s}),I=D({audience:x(a).optional(),priority:O().min(0).max(1).optional(),lastModified:de({offset:!0}).optional()}),me=D({..._.shape,...g.shape,uri:P(),description:E(P()),mimeType:E(P()),size:E(O()),annotations:I.optional(),_meta:E(T({}))}),he=D({..._.shape,...g.shape,uriTemplate:P(),description:E(P()),mimeType:E(P()),annotations:I.optional(),_meta:E(T({}))}),ge=m.extend({method:w(`notifications/resources/list_changed`),params:p.optional()}),_e=p.extend({uri:P()}),ve=m.extend({method:w(`notifications/resources/updated`),params:_e}),L=D({name:P(),description:E(P()),required:E(k())}),ye=D({..._.shape,...g.shape,description:E(P()),arguments:E(x(L)),_meta:E(T({}))}),be=m.extend({method:w(`notifications/prompts/list_changed`),params:p.optional()}),xe=D({type:w(`text`),text:P(),annotations:I.optional(),_meta:j(P(),N()).optional()}),Se=D({type:w(`image`),data:s,mimeType:P(),annotations:I.optional(),_meta:j(P(),N()).optional()}),Ce=D({type:w(`audio`),data:s,mimeType:P(),annotations:I.optional(),_meta:j(P(),N()).optional()}),we=D({type:w(`tool_use`),name:P(),id:P(),input:j(P(),N()),_meta:j(P(),N()).optional()}),Te=D({type:w(`resource`),resource:S([pe,F]),annotations:I.optional(),_meta:j(P(),N()).optional()}),Ee=me.extend({type:w(`resource_link`)}),De=S([xe,Se,Ce,Ee,Te]),Oe=D({role:a,content:De}),ke=D({title:P().optional(),readOnlyHint:k().optional(),destructiveHint:k().optional(),idempotentHint:k().optional(),openWorldHint:k().optional()}),Ae=m.extend({method:w(`notifications/tools/list_changed`),params:p.optional()}),je=D({name:P().optional()}),Me=D({hints:x(je).optional(),costPriority:O().min(0).max(1).optional(),speedPriority:O().min(0).max(1).optional(),intelligencePriority:O().min(0).max(1).optional()}),Le=D({mode:A([`auto`,`required`,`none`]).optional()}),ze=D({type:w(`boolean`),title:P().optional(),description:P().optional(),default:k().optional()}),R=D({type:w(`string`),title:P().optional(),description:P().optional(),minLength:O().optional(),maxLength:O().optional(),format:A([`email`,`uri`,`date`,`date-time`]).optional(),default:P().optional()}),Be=D({type:A([`number`,`integer`]),title:P().optional(),description:P().optional(),minimum:O().optional(),maximum:O().optional(),default:O().optional()}),Ve=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),default:P().optional()}),He=D({type:w(`string`),title:P().optional(),description:P().optional(),oneOf:x(D({const:P(),title:P()})),default:P().optional()}),Ue=D({type:w(`string`),title:P().optional(),description:P().optional(),enum:x(P()),enumNames:x(P()).optional(),default:P().optional()}),We=S([Ve,He]),Ge=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({type:w(`string`),enum:x(P())}),default:x(P()).optional()}),z=D({type:w(`array`),title:P().optional(),description:P().optional(),minItems:O().optional(),maxItems:O().optional(),items:D({anyOf:x(D({const:P(),title:P()}))}),default:x(P()).optional()}),Ke=S([Ge,z]),B=S([Ue,We,Ke]),V=S([B,ze,R,Be]),H=f.extend({mode:w(`form`).optional(),message:P(),requestedSchema:D({type:w(`object`),properties:j(P(),V),required:x(P()).optional()}).catchall(N())}),qe=D({type:w(`ref/resource`),uri:P()}),U=D({type:w(`ref/prompt`),name:P()}),Je=D({uri:P().startsWith(`file://`),name:P().optional(),_meta:j(P(),N()).optional()}),Ye=ne.shape,Xe=D({experimental:Ye.experimental,sampling:Ye.sampling,elicitation:Ye.elicitation,roots:Ye.roots,extensions:Ye.extensions}),Ze=ae.shape,Qe=D({experimental:Ze.experimental,logging:Ze.logging,completions:Ze.completions,prompts:Ze.prompts,resources:Ze.resources,tools:Ze.tools,extensions:Ze.extensions}),$e=T({progressToken:n.optional(),[Ne]:P(),[Pe]:v.optional(),[Ie]:Xe,[Re]:o.optional()}),et=D({..._.shape,...g.shape,description:P().optional(),inputSchema:T({$schema:P().optional(),type:w(`object`)}),outputSchema:T({$schema:P().optional()}).optional(),annotations:ke.optional(),_meta:j(P(),N()).optional()}),tt=D({type:w(`tool_result`),toolUseId:P(),content:x(De),structuredContent:N().optional(),isError:k().optional(),_meta:j(P(),N()).optional()}),nt=S([xe,Se,Ce,we,tt]),rt=D({role:a,content:S([nt,x(nt)]),_meta:j(P(),N()).optional()}),it=P(),at=T({[Fe]:v.optional().catch(void 0)}),ot=at.optional();function W(e){return T({_meta:ot,resultType:it.default(`complete`),...e})}let st=W({}),ct=W({nextCursor:r.optional()}),lt=W({content:x(De),structuredContent:N().optional(),isError:k().optional()}),ut=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),tools:x(et),nextCursor:r.optional()}),dt=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),prompts:x(ye),nextCursor:r.optional()}),ft=W({description:P().optional(),messages:x(Oe)}),pt=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resources:x(me),nextCursor:r.optional()}),mt=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resourceTemplates:x(he),nextCursor:r.optional()}),ht=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),contents:x(S([pe,F]))}),gt=W({completion:D({values:x(P()).max(100),total:O().int().optional(),hasMore:k().optional()}).loose()}),_t=W({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`])}),vt=W({ttlMs:O().int().min(0).catch(0),cacheScope:A([`public`,`private`]).catch(`private`),supportedVersions:x(P()),capabilities:Qe,instructions:P().optional()}),yt=D({messages:x(rt),modelPreferences:Me.optional(),systemPrompt:P().optional(),includeContext:A([`none`,`thisServer`,`allServers`]).optional(),temperature:O().optional(),maxTokens:O().int(),stopSequences:x(P()).optional(),metadata:t.optional(),tools:x(et).optional(),toolChoice:Le.optional()}),bt=D({method:w(`sampling/createMessage`),params:yt}),xt=D({method:w(`roots/list`),params:D({_meta:j(P(),N()).optional()}).optional()}),St=D({...rt.shape,model:P(),stopReason:P().optional()}),Ct=D({roots:x(Je)}),wt=D({action:A([`accept`,`decline`,`cancel`]),content:j(P(),S([P(),O(),k(),x(P())])).optional()}),Tt=D({mode:w(`url`),message:P(),url:P().url()}),Et=S([H,Tt]),Dt=D({method:w(`elicitation/create`),params:Et}),Ot=S([bt,xt,Dt]),kt=S([St,Ct,wt]),At=j(P(),Ot),jt=j(P(),kt),Mt=W({inputRequests:At.optional(),requestState:P().optional()}),Nt={inputResponses:jt.optional(),requestState:P().optional()},Pt=D({_meta:$e,...Nt}),Ft=T({progressToken:n.optional()});function It(e,t){return D({method:w(e),params:D({_meta:$e,...t})})}function Lt(e,t){return D({method:w(e),params:D({_meta:Ft.optional(),...t}).optional()})}let Rt={name:P(),arguments:j(P(),N()).optional(),...Nt},zt={cursor:r.optional()},Bt=It(`tools/call`,Rt),Vt=It(`tools/list`,zt),Ht=It(`prompts/list`,zt),Ut=It(`prompts/get`,{name:P(),arguments:j(P(),P()).optional(),...Nt}),Wt=It(`resources/list`,zt),Gt=It(`resources/templates/list`,zt),Kt=It(`resources/read`,{uri:P(),...Nt}),qt={ref:S([U,qe]),argument:D({name:P(),value:P()}),context:D({arguments:j(P(),P()).optional()}).optional()},Jt=It(`completion/complete`,qt),Yt=It(`server/discover`,{}),Xt=D({toolsListChanged:k().optional(),promptsListChanged:k().optional(),resourcesListChanged:k().optional(),resourceSubscriptions:x(P()).optional()}),Zt={notifications:Xt},Qt=It(`subscriptions/listen`,Zt),$t=at.extend({"io.modelcontextprotocol/subscriptionId":i}),en=T({_meta:$t,resultType:it.default(`complete`)}),tn={"tools/call":Lt(`tools/call`,Rt),"tools/list":Lt(`tools/list`,zt),"prompts/get":Lt(`prompts/get`,{name:P(),arguments:j(P(),P()).optional()}),"prompts/list":Lt(`prompts/list`,zt),"resources/list":Lt(`resources/list`,zt),"resources/templates/list":Lt(`resources/templates/list`,zt),"resources/read":Lt(`resources/read`,{uri:P()}),"completion/complete":Lt(`completion/complete`,qt),"server/discover":Lt(`server/discover`,{}),"subscriptions/listen":Lt(`subscriptions/listen`,Zt)};function G(e){return T({_meta:ot,...e})}let nn={"tools/call":G({content:x(De),structuredContent:N().optional(),isError:k().optional()}),"tools/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),tools:x(et),nextCursor:r.optional()}),"prompts/get":G({description:P().optional(),messages:x(Oe)}),"prompts/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),prompts:x(ye),nextCursor:r.optional()}),"resources/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resources:x(me),nextCursor:r.optional()}),"resources/templates/list":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),resourceTemplates:x(he),nextCursor:r.optional()}),"resources/read":G({ttlMs:O().int().min(0),cacheScope:A([`public`,`private`]),contents:x(S([pe,F]))}),"completion/complete":G({completion:D({values:x(P()).max(100),total:O().int().optional(),hasMore:k().optional()}).loose()}),"server/discover":G({ttlMs:O().int().min(0).catch(0),cacheScope:A([`public`,`private`]).catch(`private`),supportedVersions:x(P()),capabilities:Qe,instructions:P().optional()}),"subscriptions/listen":G({})},rn=T({"io.modelcontextprotocol/subscriptionId":i.optional()}),an=D({method:w(`notifications/subscriptions/acknowledged`),params:D({_meta:rn.optional(),notifications:Xt})}),on=D({_meta:rn.optional(),requestId:i,reason:P().optional()}),sn=D({method:w(`notifications/cancelled`),params:on}),cn={"notifications/cancelled":sn,"notifications/progress":M,"notifications/message":ue,"notifications/resources/updated":ve,"notifications/resources/list_changed":ge,"notifications/tools/list_changed":Ae,"notifications/prompts/list_changed":be,"notifications/subscriptions/acknowledged":an},K=e=>D({jsonrpc:w(`2.0`),id:S([P(),O().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:C,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:ne,ServerCapabilitiesSchema:ae,ProgressSchema:oe,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:M,LoggingMessageNotificationParamsSchema:le,LoggingMessageNotificationSchema:ue,ResourceContentsSchema:fe,TextResourceContentsSchema:pe,BlobResourceContentsSchema:F,AnnotationsSchema:I,ResourceSchema:me,ResourceTemplateSchema:he,ResourceListChangedNotificationSchema:ge,ResourceUpdatedNotificationParamsSchema:_e,ResourceUpdatedNotificationSchema:ve,PromptArgumentSchema:L,PromptSchema:ye,PromptListChangedNotificationSchema:be,TextContentSchema:xe,ImageContentSchema:Se,AudioContentSchema:Ce,ToolUseContentSchema:we,EmbeddedResourceSchema:Te,ResourceLinkSchema:Ee,ContentBlockSchema:De,PromptMessageSchema:Oe,ToolAnnotationsSchema:ke,ToolListChangedNotificationSchema:Ae,ModelHintSchema:je,ModelPreferencesSchema:Me,ToolChoiceSchema:Le,BooleanSchemaSchema:ze,StringSchemaSchema:R,NumberSchemaSchema:Be,UntitledSingleSelectEnumSchemaSchema:Ve,TitledSingleSelectEnumSchemaSchema:He,LegacyTitledEnumSchemaSchema:Ue,SingleSelectEnumSchemaSchema:We,UntitledMultiSelectEnumSchemaSchema:Ge,TitledMultiSelectEnumSchemaSchema:z,MultiSelectEnumSchemaSchema:Ke,EnumSchemaSchema:B,PrimitiveSchemaDefinitionSchema:V,ElicitRequestFormParamsSchema:H,ResourceTemplateReferenceSchema:qe,PromptReferenceSchema:U,RootSchema:Je,ClientCapabilities2026Schema:Xe,ServerCapabilities2026Schema:Qe,RequestMetaEnvelopeSchema:$e,ToolSchema:et,ToolResultContentSchema:tt,SamplingMessageContentBlockSchema:nt,SamplingMessageSchema:rt,ResultTypeSchema:it,ResultMetaSchema:at,ResultSchema:st,PaginatedResultSchema:ct,CallToolResultSchema:lt,ListToolsResultSchema:ut,ListPromptsResultSchema:dt,GetPromptResultSchema:ft,ListResourcesResultSchema:pt,ListResourceTemplatesResultSchema:mt,ReadResourceResultSchema:ht,CompleteResultSchema:gt,CacheableResultSchema:_t,DiscoverResultSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,ListRootsRequestSchema:xt,CreateMessageResultSchema:St,ListRootsResultSchema:Ct,ElicitResultSchema:wt,ElicitRequestURLParamsSchema:Tt,ElicitRequestParamsSchema:Et,ElicitRequestSchema:Dt,InputRequestSchema:Ot,InputResponseSchema:kt,InputRequestsSchema:At,InputResponsesSchema:jt,InputRequiredResultSchema:Mt,InputResponseRequestParamsSchema:Pt,CallToolRequestSchema:Bt,ListToolsRequestSchema:Vt,ListPromptsRequestSchema:Ht,GetPromptRequestSchema:Ut,ListResourcesRequestSchema:Wt,ListResourceTemplatesRequestSchema:Gt,ReadResourceRequestSchema:Kt,CompleteRequestSchema:Jt,DiscoverRequestSchema:Yt,SubscriptionFilterSchema:Xt,SubscriptionsListenRequestSchema:Qt,SubscriptionsListenResultMetaSchema:$t,SubscriptionsListenResultSchema:en,dispatchRequestSchemas:tn,dispatchResultSchemas:nn,NotificationMetaSchema:rn,SubscriptionsAcknowledgedNotificationSchema:an,CancelledNotificationParamsSchema:on,CancelledNotificationSchema:sn,notificationSchemas2026:cn,JSONRPCResultResponseSchema:K(st),CallToolResultResponseSchema:K(S([lt,Mt])),ListToolsResultResponseSchema:K(ut),ListPromptsResultResponseSchema:K(dt),GetPromptResultResponseSchema:K(S([ft,Mt])),ListResourcesResultResponseSchema:K(pt),ListResourceTemplatesResultResponseSchema:K(mt),ReadResourceResultResponseSchema:K(S([ht,Mt])),CompleteResultResponseSchema:K(gt),DiscoverResultResponseSchema:K(vt),SubscriptionsListenResultResponseSchema:K(en)}}var Bi;function Vi(){return Bi??=zi()}var Hi=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Ui(e){return Hi.includes(e)}var Wi=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Gi(e){return e[Wi]}function Ki(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function qi(e){return e===`public`||e===`private`}var X=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),Z=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return $r(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return $r(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Qr(this,new.target)}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Yi(e.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Xi({supported:e.supported,requested:e.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===X.ResourceNotFound||Object.keys(e).length===1))return new Ji(e.uri,n)}if(t===X.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Zi({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Ji=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Yi=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Xi=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Zi=class extends Z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Qi=0,$i=`private`,ea=[`tools/call`,`prompts/get`,`resources/read`];function ta(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||ea.includes(e))return t;throw new Z(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function na(e,t){let n=Gi(t);if(t.resultType!==`complete`||!Ui(e))return n===void 0?t:sa(t);let r=t,i=Ki(r.ttlMs)?r.ttlMs:aa(n),a=qi(r.cacheScope)?r.cacheScope:oa(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Wi],o}function ra(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ia(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Fe]:t}}:!ra(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[Fe]:t}}}function aa(e){return e!==void 0&&Ki(e.ttlMs)?e.ttlMs:Qi}function oa(e){return e!==void 0&&qi(e.cacheScope)?e.cacheScope:$i}function sa(e){let t={...e};return delete t[Wi],t}var ca=[`elicitation/create`,`sampling/createMessage`,`roots/list`],la;function ua(){if(la)return la;let e=Vi();return la={request:{"elicitation/create":D({method:w(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":D({method:w(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":D({method:w(`roots/list`),params:T({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},la}function da(e){return ca.includes(e)}function fa(e){return da(e)?ua().request[e]:void 0}function pa(e){return da(e)?ua().response[e]:void 0}var ma={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},ha={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function ga(e){return Object.prototype.hasOwnProperty.call(ma,e)}function _a(e){return Object.prototype.hasOwnProperty.call(ha,e)}function va(e){return Object.prototype.hasOwnProperty.call(ma,e)}function ya(e){return ga(e)?Vi().dispatchRequestSchemas[e]:void 0}function ba(e){return va(e)?Vi().dispatchResultSchemas[e]:void 0}function xa(e){return _a(e)?Vi().notificationSchemas2026[e]:void 0}Object.keys(ma),Object.keys(ha);function Sa(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ca(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var wa={ok:!1,reason:`not-in-era`},Ta=[Ne,Ie];function Ea(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Sa(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Sa(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Sa(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Da={era:`2026-07-28`,hasRequestMethod:ga,hasNotificationMethod:_a,hasInputRequestMethod:e=>fa(e)!==void 0,validateRequest:(e,t)=>Ca(ya(e),t),validateResult:(e,t)=>Ca(ba(e),t),validateNotification:(e,t)=>Ca(xa(e),t),validateInputRequest:(e,t)=>Ca(fa(e),t),validateInputResponse:(e,t)=>Ca(pa(e),t),samplingResultVariant:()=>wa,outboundEnvelope(e){return{[Ne]:e.protocolVersion,[Pe]:e.clientInfo,[Ie]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Ta)n in e||t.push({key:n,problem:`missing`});let n=Vi().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>di(e),inputRequestSchema:fa,decodeResult(e,t){if(!Sa(t))return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Sa(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Vi().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new Y(J.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=ka(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return ia(na(e,ta(e,Ea(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=Vi().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Oa;function ka(){if(Oa)return Oa;let e=Vi();return Oa={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Oa}var Aa=`2026-07-28`;function ja(e){return e!==void 0&&ci(e)?Da:Ri}function Ma(e){return e.revision===void 0?e.era===`modern`?Da.era:Ri.era:ja(e.revision).era}function Na(e){return Ia.some(t=>t.hasRequestMethod(e))}function Pa(e){return Ia.some(t=>t.hasNotificationMethod(e))}function Fa(e){return e===`tasks/get`||e===`tasks/cancel`}var Ia=[Ri,Da],La=xe({AnnotationsSchema:()=>jt,AudioContentSchema:()=>ln,BaseMetadataSchema:()=>ot,BaseRequestParamsSchema:()=>z,BlobResourceContentsSchema:()=>kt,BooleanSchemaSchema:()=>Wn,CallToolRequestParamsSchema:()=>wn,CallToolRequestSchema:()=>Tn,CallToolResultSchema:()=>Sn,CancelTaskRequestSchema:()=>Ar,CancelTaskResultSchema:()=>jr,CancelledNotificationParamsSchema:()=>nt,CancelledNotificationSchema:()=>rt,ClientCapabilitiesSchema:()=>dt,ClientNotificationSchema:()=>Nr,ClientRequestSchema:()=>Mr,ClientResultSchema:()=>Pr,ClientTasksCapabilitySchema:()=>lt,CompatibilityCallToolResultSchema:()=>Cn,CompleteRequestParamsSchema:()=>dr,CompleteRequestSchema:()=>fr,CompleteResultSchema:()=>pr,ContentBlockSchema:()=>pn,CreateMessageRequestParamsSchema:()=>Bn,CreateMessageRequestSchema:()=>Vn,CreateMessageResultSchema:()=>Hn,CreateMessageResultWithToolsSchema:()=>Un,CreateTaskResultSchema:()=>xr,CursorSchema:()=>He,DiscoverRequestSchema:()=>_t,DiscoverResultSchema:()=>vt,ElicitRequestFormParamsSchema:()=>nr,ElicitRequestParamsSchema:()=>ir,ElicitRequestSchema:()=>ar,ElicitRequestURLParamsSchema:()=>rr,ElicitResultSchema:()=>cr,ElicitationCompleteNotificationParamsSchema:()=>or,ElicitationCompleteNotificationSchema:()=>sr,EmbeddedResourceSchema:()=>dn,EmptyResultSchema:()=>tt,EnumSchemaSchema:()=>er,GetPromptRequestParamsSchema:()=>on,GetPromptRequestSchema:()=>sn,GetPromptResultSchema:()=>hn,GetTaskPayloadRequestSchema:()=>Er,GetTaskPayloadResultSchema:()=>Dr,GetTaskRequestSchema:()=>wr,GetTaskResultSchema:()=>Tr,IconSchema:()=>it,IconsSchema:()=>at,ImageContentSchema:()=>K,ImplementationSchema:()=>W,InitializeRequestParamsSchema:()=>ft,InitializeRequestSchema:()=>pt,InitializeResultSchema:()=>ht,InitializedNotificationSchema:()=>gt,JSONArraySchema:()=>Be,JSONObjectSchema:()=>R,JSONRPCErrorResponseSchema:()=>Qe,JSONRPCMessageSchema:()=>$e,JSONRPCNotificationSchema:()=>Xe,JSONRPCRequestSchema:()=>Ye,JSONRPCResponseSchema:()=>et,JSONRPCResultResponseSchema:()=>Ze,JSONValueSchema:()=>ze,LegacyTitledEnumSchemaSchema:()=>Yn,ListChangedOptionsBaseSchema:()=>Dn,ListPromptsRequestSchema:()=>rn,ListPromptsResultSchema:()=>an,ListResourceTemplatesRequestSchema:()=>It,ListResourceTemplatesResultSchema:()=>Lt,ListResourcesRequestSchema:()=>Pt,ListResourcesResultSchema:()=>Ft,ListRootsRequestSchema:()=>hr,ListRootsResultSchema:()=>gr,ListTasksRequestSchema:()=>Or,ListTasksResultSchema:()=>kr,ListToolsRequestSchema:()=>bn,ListToolsResultSchema:()=>xn,LoggingLevelSchema:()=>On,LoggingMessageNotificationParamsSchema:()=>jn,LoggingMessageNotificationSchema:()=>Mn,ModelHintSchema:()=>Nn,ModelPreferencesSchema:()=>Pn,MultiSelectEnumSchemaSchema:()=>$n,NotificationSchema:()=>H,NotificationsParamsSchema:()=>V,NumberSchemaSchema:()=>Kn,PaginatedRequestParamsSchema:()=>Ct,PaginatedRequestSchema:()=>wt,PaginatedResultSchema:()=>Tt,PingRequestSchema:()=>yt,PrimitiveSchemaDefinitionSchema:()=>tr,ProgressNotificationParamsSchema:()=>xt,ProgressNotificationSchema:()=>St,ProgressSchema:()=>bt,ProgressTokenSchema:()=>Ve,PromptArgumentSchema:()=>G,PromptListChangedNotificationSchema:()=>gn,PromptMessageSchema:()=>mn,PromptReferenceSchema:()=>ur,PromptSchema:()=>nn,ReadResourceRequestParamsSchema:()=>zt,ReadResourceRequestSchema:()=>Bt,ReadResourceResultSchema:()=>Vt,RelatedTaskMetadataSchema:()=>We,RequestIdSchema:()=>Je,RequestMetaSchema:()=>Ge,RequestSchema:()=>B,ResourceContentsSchema:()=>Et,ResourceLinkSchema:()=>fn,ResourceListChangedNotificationSchema:()=>Ht,ResourceRequestParamsSchema:()=>Rt,ResourceSchema:()=>Mt,ResourceTemplateReferenceSchema:()=>lr,ResourceTemplateSchema:()=>Nt,ResourceUpdatedNotificationParamsSchema:()=>en,ResourceUpdatedNotificationSchema:()=>tn,ResultMetaObjectSchema:()=>qe,ResultSchema:()=>U,RoleSchema:()=>At,RootSchema:()=>mr,RootsListChangedNotificationSchema:()=>_r,SamplingContentSchema:()=>Ln,SamplingMessageContentBlockSchema:()=>Rn,SamplingMessageSchema:()=>zn,ServerCapabilitiesSchema:()=>mt,ServerNotificationSchema:()=>Ir,ServerRequestSchema:()=>Fr,ServerResultSchema:()=>Lr,ServerTasksCapabilitySchema:()=>ut,SetLevelRequestParamsSchema:()=>kn,SetLevelRequestSchema:()=>An,SingleSelectEnumSchemaSchema:()=>Xn,StringSchemaSchema:()=>Gn,SubscribeRequestParamsSchema:()=>Ut,SubscribeRequestSchema:()=>Wt,SubscriptionFilterSchema:()=>qt,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Xt,SubscriptionsAcknowledgedNotificationSchema:()=>Zt,SubscriptionsListenRequestParamsSchema:()=>Jt,SubscriptionsListenRequestSchema:()=>Yt,SubscriptionsListenResultMetaSchema:()=>Qt,SubscriptionsListenResultSchema:()=>$t,TaskAugmentedRequestParamsSchema:()=>Ke,TaskCreationParamsSchema:()=>vr,TaskMetadataSchema:()=>Ue,TaskSchema:()=>br,TaskStatusNotificationParamsSchema:()=>Sr,TaskStatusNotificationSchema:()=>Cr,TaskStatusSchema:()=>yr,TextContentSchema:()=>cn,TextResourceContentsSchema:()=>Dt,TitledMultiSelectEnumSchemaSchema:()=>Qn,TitledSingleSelectEnumSchemaSchema:()=>Jn,ToolAnnotationsSchema:()=>_n,ToolChoiceSchema:()=>Fn,ToolExecutionSchema:()=>vn,ToolListChangedNotificationSchema:()=>En,ToolResultContentSchema:()=>In,ToolSchema:()=>yn,ToolUseContentSchema:()=>un,UnsubscribeRequestParamsSchema:()=>Gt,UnsubscribeRequestSchema:()=>Kt,UntitledMultiSelectEnumSchemaSchema:()=>Zn,UntitledSingleSelectEnumSchemaSchema:()=>qn}),Ra=e=>Ye.safeParse(e).success,za=e=>Xe.safeParse(e).success,Ba=e=>Ze.safeParse(e).success,Va=e=>Qe.safeParse(e).success,Ha=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Ua=e=>pt.safeParse(e).success,Wa=e=>gt.safeParse(e).success,Ga=`Mcp-Param-`,Ka=`x-mcp-header`,qa=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Ja=new Set([`string`,`integer`,`boolean`,`number`]);function Ya(e){let t=[],n=new Map,r=(e,i,a)=>{if(typeof e!=`object`||!e)return;let o=e;if(Ka in o){if(!a||i.length===0)return`${Qa(i)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let e=o[Ka];if(typeof e!=`string`||e.length===0)return`${Qa(i)}: x-mcp-header MUST be a non-empty string`;if(!qa.test(e))return`${Qa(i)}: x-mcp-header '${e}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let r=typeof o.type==`string`?o.type:void 0;if(r===void 0||!Ja.has(r))return`${Qa(i)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${r??``}`;let s=e.toLowerCase(),c=n.get(s);if(c!==void 0)return`x-mcp-header '${e}' is not case-insensitively unique (also declared as '${c}')`;n.set(s,e),t.push({path:i,headerName:e,type:r})}let s=o.properties;if(typeof s==`object`&&s)for(let[e,t]of Object.entries(s)){let n=r(t,[...i,e],a);if(n!==void 0)return n}for(let e of Xa){let t=o[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Za.has(e)?Object.values(t):[t];for(let t of n){let n=r(t,[...i,`<${e}>`],!1);if(n!==void 0)return n}}},i=r(e,[],!0);return i===void 0?{valid:!0,declarations:t}:{valid:!1,reason:i}}var Xa=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Za=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Qa(e){return e.length===0?``:e.join(`.`)}var $a=`=?base64?`,eo=`?=`;function to(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function no(e){if(e.length===0||e.startsWith($a)&&e.endsWith(eo)||e!==e.trim())return!0;for(let t=0;t=32&&n<=126))return!0}return!1}function ro(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function io(e){return no(e)?`${$a}${ro(e)}${eo}`:e}function ao(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function oo(e,t){let n={};for(let r of e){let e=ao(t,r.path);if(e==null)continue;let i=to(e);i!==void 0&&(n[`${Ga}${r.headerName}`]=io(i))}return n}X.InvalidRequest,X.UnsupportedProtocolVersion,X.InvalidParams,X.MethodNotFound,X.InvalidParams,X.MissingRequiredClientCapability,X.ParseError,X.InvalidRequest,X.MethodNotFound,X.UnsupportedProtocolVersion,X.MissingRequiredClientCapability;var so={"tools/call":`name`,"prompts/get":`name`,"resources/read":`uri`,"tasks/get":`taskId`,"tasks/update":`taskId`,"tasks/cancel":`taskId`};function co(e,t){let n=Object.hasOwn(so,e)?so[e]:void 0;if(n===void 0)return;let r=lo(t)?t[n]:void 0;return{field:n,value:typeof r==`string`?r:void 0}}function lo(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function uo(e,t){return f(e,t)}function fo(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function po(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var mo=!1,ho=`draft-2020-12`;function go(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:ho});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);mo||(mo=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=M(e,{target:ho,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&_o(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function _o(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||_o(e)))}return!1}function vo(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function yo(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>vo(e)).join(`, `)}:{success:!0,data:n.value}}function bo(e){let t=M(e,{target:ho,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var xo=/\\\.\\d\{(\d+)\}/;function So(e){let t=xo.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>de({local:e,offset:t,precision:n}))))}function Co(e,t){let n;switch(e){case`email`:n=[C()];break;case`uri`:n=[y()];break;case`date`:n=[fe()];break;case`date-time`:n=So(t)}return new Set(n.map(e=>bo(e)).filter(e=>e!==void 0))}function wo(e,t,n){return n!==`zod`||Co(e,t).has(t)}function To(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Eo(e){try{return go(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Z(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Do=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Oo(e){return Do.has(e)||e.startsWith(`x-`)}var ko=new Set([`$schema`,...Object.keys(nr.shape.requestedSchema.shape)]),Ao={string:fo([Gn,qn,Jn,Yn]),number:fo([Kn]),integer:fo([Kn]),boolean:fo([Wn]),array:fo([Zn,Qn])},jo=new Set(Gn.shape.format.unwrap().options);function Mo(e,t,n,r){if(!To(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Ao,e.type)?Ao[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Oo(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?jo.has(e.format)?(typeof s!=`string`||!wo(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function No(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&To(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Mo(n,`properties.${e}`,t,r)])):ko.has(i)?n[i]=a:Oo(i)||r.push(i);if(r.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function Po(e,t){if(!To(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!uo(tr,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Fo(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Fo(e,t[r],`${n}[${r}]`)):!To(e)||!To(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Fo(r,t[e],i):Oo(e)?[]:[i]})}function Io(e){if(!po(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=No(Eo(e.requestedSchema),t),r=uo(nr.shape.requestedSchema,n);if(!r.success)throw new Z(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${Po(n,r.error.message)}`);let i=Fo(n,r.data);if(i.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Lo(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Lo,{elicit(e){try{return{method:`elicitation/create`,params:Io(e)}}catch(e){throw e instanceof Z?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Ro=!0,zo=10,Bo=250;function Vo(e){return{autoFulfill:e?.autoFulfill??Ro,maxRounds:e?.maxRounds??zo}}function Ho(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Uo(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function Wo(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Go(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener(`abort`,n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Ko(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new Y(J.InputRequiredRoundsExceeded,Uo(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by '${n}' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Go(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await Wo(Bo,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new Y(J.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Ho(r,u,c.requestState),d);if(Ha(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var qo=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),Jo={IdJagTokenExchangeResponseSchema:Ur,OAuthClientInformationFullSchema:Jr,OAuthClientInformationSchema:qr,OAuthClientMetadataSchema:Kr,OAuthClientRegistrationErrorSchema:Yr,OAuthErrorResponseSchema:Wr,OAuthMetadataSchema:zr,OAuthProtectedResourceMetadataSchema:Rr,OAuthTokenRevocationRequestSchema:Xr,OAuthTokensSchema:Hr,OpenIdProviderDiscoveryMetadataSchema:Vr,OpenIdProviderMetadataSchema:Br},Yo={},Xo={};function Zo(e,t){let n=e.slice(0,-6);Yo[n]=t,Xo[n]=e=>t.safeParse(e).success}for(let e of qo)Zo(e,La[e]);for(let[e,t]of Object.entries(Jo))Zo(e,t);Object.freeze(Yo);var Qo=Object.freeze(Xo);function $o(e){switch(e){case`initialize`:case`notifications/initialized`:return ja(void 0);case`server/discover`:return ja(Aa);default:return}}var es=[Ne,Pe,Ie,Re],ts=[`inputResponses`,`requestState`];function ns(e,t){let n=e.params;if(!ss(n))return{message:e,lifted:{}};let r=n._meta,i=ss(r)?es.filter(e=>e in r):[],a=t===`request`?ts.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ss(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function rs(e,t){let n=e.validateResult(t,void 0);if(n.ok||n.reason!==`not-in-era`)return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function is(e){return()=>e}var as=is(void 0),os=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??je,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new Y(J.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Y(J.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Ba(e)||Va(e)?this._onresponse(e):Ra(e)?this._onrequest(e,t):za(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new Y(J.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=ns(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Ma(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(Pa(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;(i!==void 0||a!==void 0)&&Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=ns(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Ma(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Na(n.method)&&!i.hasRequestMethod(n.method)&&!(Fa(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(X.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(X.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(X.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:us(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?as:is(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),po(t))return u(e,t,n);let i=rs(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(X.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:X.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ba(e)?n(e):n(Z.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(po(t))return Fa(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=rs(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return ja(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=$o(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Na(t)&&!e.hasRequestMethod(t))throw new Y(J.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof Y?e:new Y(J.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(gs(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;yo(n,o).then(e=>{e.success?d(e.data):f(new Y(J.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new Y(J.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new Y(J.NotConnected,`Not connected`);if(Pa(t.method)&&!e.hasNotificationMethod(t.method))throw new Y(J.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Na(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await yo(t.params,{...r.params});if(!a.success)throw new Z(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Pa(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await yo(t.params,{...r.params});if(!i.success)throw new Z(X.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ss(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function cs(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=ss(a)&&ss(i)?{...a,...i}:i}return n}function ls(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function us(e){let t={},n=[];if(!ls(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ls(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function ds(e){throw new Y(J.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function fs(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:is(void 0),signal:r,send:(()=>ds(`send`)),notify:()=>ds(`notify`)}}}async function ps(e,t,n,r,i){if(!ls(r)||typeof r.method!=`string`)throw new Y(J.InvalidResult,`Invalid input request '${n}': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new Y(J.InvalidResult,`Invalid input request '${n}': '${a}' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new Y(J.CapabilityNotSupported,`Cannot fulfil input request '${n}': no handler is registered for '${a}' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ls(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(fs(n,a,s,i,e.sessionId)))}function ms(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function hs(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>ps(e,i,t,n,r),retry:(e,t)=>r.retry(e,ms(o,t))};return Ko({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function gs(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}var _s=Ce(be((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),1);function vs(e){if(e)try{return _s.parse(e).type}catch{let t=(e.split(`;`,1)[0]??``).trim().toLowerCase();return t===``||e.slice(t.length).includes(`,`)?void 0:t}}function ys(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function bs(e=fetch,t){return t?async(n,r)=>e(n,{...t,...r,headers:r?.headers?{...ys(t.headers),...ys(r.headers)}:t.headers}):e}var xs=new Set([301,302,303,307,308]),Ss=5;function Cs(e,t){return e.protocol===t.protocol&&e.host===t.host||e.protocol===`http:`&&t.protocol===`https:`&&e.hostname===t.hostname&&!e.port&&!t.port}function ws(e,t){let n=xs.has(t.status)?t.headers?.get(`location`):void 0;if(n)try{return new URL(n,e)}catch{return}}var Ts=new WeakSet;function Es(e){let t=(t,n)=>e(t,n);return Ts.add(t),t}function Ds(e){return Ts.has(e)?e:async(t,n)=>{if(n?.redirect===`error`||n?.redirect===`manual`)return e(t,n);let r=(n?.method??`GET`).toUpperCase(),i=t;for(let t=0;;t++){let a=await e(i,{...n,redirect:`manual`}),o=ws(i,a);if(!o||t===Ss)return a;let s=new URL(i),c=r===`GET`||a.status===307||a.status===308,l=!(o.username||o.password)||o.username===s.username&&o.password===s.password;if(!c||!l||!Cs(s,o))return a;await a.text?.().catch(()=>{}),i=o}}}function Os(e,t){if(t.type===`opaqueredirect`)return`Redirect not followed: this runtime does not expose where it points`;let n=ws(t.url||e,t);if(n)return n.username=n.password=n.search=n.hash=``,n.protocol===`http:`&&new URL(t.url||e).protocol===`https:`?(n.protocol=`https:`,`Redirect from https to plain http not followed; try ${n.href} as the endpoint`):`Redirect to ${n.href} not followed; use that URL as the endpoint if it is the intended server`}function ks(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r1?t[a.href]=e:(a.hash=``,r===``?n=a:Is(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(Ps[i])continue;let a=`${r}/${As(i)}`,o=e[i];if(Array.isArray(o)){if(Ms[i]){let e=o.length;for(let r=0;r%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,Us=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,Ws=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Gs=/^(?:\/(?:[^~/]|~0|~1)*)*$/,Ks=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,qs=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,Js=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Ys=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,Xs=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,Zs=e=>e.length>1&&e.length<80&&(/^P\d+([.,]\d+)?W$/.test(e)||/^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e)&&/^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));function Qs(e){return e.test.bind(e)}var $s={date:tc,time:nc.bind(void 0,!1),"date-time":ic,duration:Zs,uri:sc,"uri-reference":Qs(Vs),"uri-template":Qs(Hs),url:Qs(Us),email:Js,hostname:Qs(Bs),ipv4:Qs(Ys),ipv6:Qs(Xs),regex:lc,uuid:Qs(Ws),"json-pointer":Qs(Gs),"json-pointer-uri-fragment":Qs(Ks),"relative-json-pointer":Qs(qs)};function ec(e){return e%4==0&&(e%100!=0||e%400==0)}function tc(e){let t=e.match(Ls);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&ec(n)?29:Rs[r])}function nc(e,t){let n=t.match(zs);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var rc=/t|\s/i;function ic(e){let t=e.split(rc);return t.length==2&&tc(t[0])&&nc(!0,t[1])}var ac=/\/|:/,oc=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function sc(e){return ac.test(e)&&oc.test(e)}var cc=/[^\\]\\Z/;function lc(e){if(cc.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function uc(e){let t=0,n=e.length,r=0,i;for(;r=55296&&i<=56319&&rks(e,t))||L.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||L.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Q(e,v,n,r,i,a,o,t).valid&&L.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let ye=[];if(y!==void 0){let t=`${s}/anyOf`,l=L.length,u=!1;for(let s=0;s{let u=Object.create(c),d=Q(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return L.push(...d.errors),d.valid&&ye.push(u),d.valid}).length;u===1?L.length=l:L.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...ye),x!==void 0){let t=`${s}/if`;if(Q(e,x,n,r,i,a,o,t,c).valid){if(S!==void 0){let l=Q(e,S,n,r,i,a,o,`${s}/then`,c);l.valid||L.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(C!==void 0){let l=Q(e,C,n,r,i,a,o,`${s}/else`,c);l.valid||L.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||L.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(ne!==void 0&&t.lengthre&&L.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${re} properties.`}),O!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${As(s)}`,c=Q(s,O,n,r,i,a,e,t);c.valid||L.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(ie!==void 0){let t=`${s}/dependantRequired`;for(let n in ie)if(n in e){let r=ie[n];for(let i of r)i in e||L.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(k!==void 0)for(let t in k){let l=`${s}/dependentSchemas`;if(t in e){let s=Q(e,k[t],n,r,i,a,o,`${l}/${As(t)}`,c);s.valid||L.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(ae!==void 0){let t=`${s}/dependencies`;for(let s in ae)if(s in e){let c=ae[s];if(Array.isArray(c))for(let n of c)n in e||L.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Q(e,c,n,r,i,a,o,`${t}/${As(s)}`);l.valid||L.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(te!==void 0){let t=`${s}/properties`;for(let s in te){if(!(s in e))continue;let d=`${o}/${As(s)}`,f=Q(e[s],te[s],n,r,i,a,d,`${t}/${As(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,L.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&T!==void 0){let t=`${s}/patternProperties`;for(let s in T){let d=new RegExp(s,`u`),f=T[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${As(p)}`,h=Q(e[p],f,n,r,i,a,m,`${t}/${As(s)}`);h.valid?c[p]=l[p]=!0:(u=i,L.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&E!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${As(s)}`,f=Q(e[s],E,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,L.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&D!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${As(s)}`,u=Q(e[s],D,n,r,i,a,l,t);u.valid?c[s]=!0:L.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){le!==void 0&&e.length>le&&L.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${le}).`}),P!==void 0&&e.length=(M||0)&&(L.length=u),M===void 0&&N===void 0&&d===0?L.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):M!==void 0&&dN&&L.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${N} items matching schema. ${d} items were found.`})}}if(!u&&ce!==void 0){let u=`${s}/unevaluatedItems`;for(;l=fe||e>fe)&&L.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${F?`or equal to `:``} ${fe}.`})):(de!==void 0&&efe&&L.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${fe}.`}),pe!==void 0&&e<=pe&&L.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${pe}.`}),F!==void 0&&e>=F&&L.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${F}.`})),I!==void 0){let t=e%I;Math.abs(0-t)>=1.1920929e-7&&Math.abs(I-t)>=1.1920929e-7&&L.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${I}.`})}}else if(u===`string`){let t=me===void 0&&he===void 0?0:uc(e);me!==void 0&&the&&L.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${he}).`}),ge!==void 0&&!new RegExp(ge,`u`).test(e)&&L.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),w!==void 0&&$s[w]&&!$s[w](e)&&L.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${w}".`})}return{valid:L.length===0,errors:L}}var dc=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=Is(e)}validate(e){return Q(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Is(e,this.lookup)}},fc=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=ke(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new dc(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}},pc=globalThis.crypto;async function mc(e){return(await pc).getRandomValues(new Uint8Array(e))}async function hc(e){let t=``;for(;t.length128)throw`Expected a length between 43 and 128. Received ${e}.`;let t=await gc(e);return{code_verifier:t,code_challenge:await _c(t)}}var yc=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},bc=10,xc=13,Sc=32;function Cc(e){}function wc(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{onEvent:t=Cc,onError:n=Cc,onRetry:r=Cc,onComment:i,maxBufferSize:a}=e,o=[],s=0,c=!0,l,u=``,d=0,f,p=!1;function m(e){if(p)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(c&&(c=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),o.length===0){let t=g(e);t!==``&&(o.push(t),s=t.length),h();return}if(e.indexOf(` `)===-1&&e.indexOf(`\r`)===-1){o.push(e),s+=e.length,h();return}o.push(e);let t=o.join(``);o.length=0,s=0;let n=g(t);n!==``&&(o.push(n),s=n.length),h()}function h(){a!==void 0&&(s+u.length<=a||(p=!0,o.length=0,s=0,l=void 0,u=``,d=0,f=void 0,n(new yc(`Buffered data exceeded max buffer size of ${a} characters`,{type:`max-buffer-size-exceeded`}))))}function g(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(` `,n);for(;r!==-1;){if(n===r){d>0&&t({id:l,event:f,data:u}),l=void 0,u=``,d=0,f=void 0,n=r+1,r=e.indexOf(` diff --git a/internal/ui/dist/assets/page-wCdDA4X6.js b/internal/ui/dist/assets/page-qxlg4TI5.js similarity index 99% rename from internal/ui/dist/assets/page-wCdDA4X6.js rename to internal/ui/dist/assets/page-qxlg4TI5.js index cc7fe9077..52d9c288d 100644 --- a/internal/ui/dist/assets/page-wCdDA4X6.js +++ b/internal/ui/dist/assets/page-qxlg4TI5.js @@ -1,4 +1,4 @@ -import{a as e,i as t,o as n,r,s as i}from"./useRouter-ByJ6_rwb.js";import{A as a,C as o,D as s,E as c,K as l,M as u,O as d,P as f,Q as p,S as m,T as h,X as g,Y as _,Z as v,_ as y,_t as b,a as x,c as S,d as C,dt as w,f as T,ft as E,g as D,gt as O,h as k,j as A,k as j,lt as M,m as N,mt as P,nt as F,o as I,ot as L,p as ee,r as te,s as ne,st as re,tt as ie,u as ae,ut as R,v as oe,x as z,y as se}from"./brand-DUaZkIz1.js";import{c as ce,h as le,m as ue,s as de}from"./preload-helper-FMCtZeYw.js";import{C as fe,E as pe,b as me,o as he,t as ge,w as _e}from"./Tooltip-B3r3s_B9.js";import{a as ve,c as ye,d as be,i as xe,l as B,n as Se,o as Ce,r as we,s as Te,t as Ee,u as De}from"./dashboard-change-chips-BKnD9tpX.js";import{n as Oe,r as ke,t as Ae}from"./WarningCircle.es-B9fMV2kb.js";import{A as je,At as Me,B as Ne,Bt as Pe,C as Fe,D as Ie,E as Le,F as Re,Ft as ze,Gt as Be,H as Ve,Ht as He,It as Ue,Jt as We,Kt as Ge,L as Ke,Lt as qe,M as Je,Mt as Ye,N as Xe,Nt as Ze,O as Qe,P as $e,Pt as et,T as tt,U as nt,Ut as rt,V as it,Vt as at,Wt as ot,Z as st,_ as ct,a as lt,b as ut,c as dt,d as ft,h as pt,i as mt,j as ht,jt as gt,k as _t,kt as vt,l as yt,m as bt,n as xt,o as St,qt as Ct,r as wt,s as Tt,t as Et,u as Dt,v as Ot,w as kt,x as At,z as jt,zt as Mt}from"./index-Bz4uzIyA.js";function Nt(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=Pt(e);if(n.length!==Pt(t).length)return!1;for(let r=0;r{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}var H=r();function It(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Lt(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i{r.current||=window.setTimeout(()=>{i(...e),r.current=null},t)},[t]),o=(0,V.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,V.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function Ht(e){let t=(0,V.useRef)(void 0);return(0,V.useEffect)(()=>{t.current=e},[e]),t.current}function Ut(e,t,n){let r=(0,V.useRef)(null);(0,V.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function Wt(){let[e,t]=(0,V.useState)(!1);return(0,V.useEffect)(()=>t(!0),[]),e}function Gt(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function Kt(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=me(s.borderTopWidth)+me(c.borderTopWidth),u=me(s.borderLeftWidth)+me(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,V.useRef)(null),h=(0,V.useRef)(null);return(0,V.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,V.useEffect)(()=>{if(t){let e=e=>{Xt(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,V.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),Vt(()=>{be()!==`test`&&l(!0)},20,{autoInvoke:!0}),Ut(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var Qt={root:`m_96b553a6`},$t=g((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),en=h(e=>{let t=u(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,target:d,parent:f,transitionDuration:m,mod:h,displayAfterTransitionEnd:g,onTransitionStart:_,onTransitionEnd:v,attributes:y,ref:b,...x}=t,S=p(),C=a({name:`FloatingIndicator`,classes:Qt,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:y,vars:l,varsResolver:$t,stylesCtx:{shouldReduceMotion:S}}),w=(0,V.useRef)(null),{initialized:T,hidden:E}=Zt({target:d,parent:f,ref:w,displayAfterTransitionEnd:g,onTransitionStart:_,onTransitionEnd:v}),D=ie(b,w);return!d||!f?null:(0,H.jsx)(o,{ref:D,mod:[{initialized:T,hidden:E},h],...C(`root`),...x})});en.displayName=`@mantine/core/FloatingIndicator`,en.classes=Qt,en.varsResolver=$t;var[tn,nn]=pe(`Accordion component was not found in the tree`),[rn,an]=pe(`Accordion.Item component was not found in the tree`),on={root:`m_9bdbb667`,panel:`m_df78851f`,content:`m_4ba554d4`,itemTitle:`m_8fa820a0`,control:`m_4ba585b8`,"control--default":`m_6939a5e9`,"control--contained":`m_4271d21b`,label:`m_df3ffa0f`,chevron:`m_3f35ae96`,icon:`m_9bd771fe`,item:`m_9bd7b098`,"item--default":`m_fe19b709`,"item--contained":`m_1f921b3b`,"item--filled":`m_2cdf939a`,"item--separated":`m_9f59b069`},sn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,chevron:s,icon:c,onClick:l,onKeyDown:d,children:f,disabled:p,mod:h,...g}=u(`AccordionControl`,null,e),{value:_}=an(),v=nn(),y=v.isItemActive(_),b=typeof v.order==`number`,x=`h${v.order}`,S=(0,H.jsxs)(m,{...v.getStyles(`control`,{className:n,classNames:t,style:r,styles:i,variant:v.variant}),unstyled:v.unstyled,mod:[`accordion-control`,{active:y,"chevron-position":v.chevronPosition,disabled:p},h],onClick:e=>{l?.(e),v.onChange(_)},type:`button`,disabled:p,"aria-expanded":y,"aria-controls":v.getRegionId(_),id:v.getControlId(_),onKeyDown:ot({siblingSelector:`[data-accordion-control]`,parentSelector:`[data-accordion]`,activateOnFocus:!1,loop:v.loop,orientation:`vertical`,onKeyDown:d}),...g,children:[(0,H.jsx)(o,{component:`span`,mod:{rotate:!v.disableChevronRotation&&y,position:v.chevronPosition},...v.getStyles(`chevron`,{classNames:t,styles:i}),children:s||v.chevron}),(0,H.jsx)(`span`,{...v.getStyles(`label`,{classNames:t,styles:i}),children:f}),c&&(0,H.jsx)(o,{component:`span`,mod:{"chevron-position":v.chevronPosition},...v.getStyles(`icon`,{classNames:t,styles:i}),children:c})]});return b?(0,H.jsx)(x,{...v.getStyles(`itemTitle`,{classNames:t,styles:i}),children:S}):S});sn.displayName=`@mantine/core/AccordionControl`,sn.classes=on;var cn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:s,mod:c,...l}=u(`AccordionItem`,null,e),d=nn();return(0,H.jsx)(rn,{value:{value:s},children:(0,H.jsx)(o,{mod:[{active:d.isItemActive(s)},c],...d.getStyles(`item`,{className:n,classNames:t,styles:i,style:r,variant:d.variant}),...l})})});cn.displayName=`@mantine/core/AccordionItem`,cn.classes=on;var ln=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,keepMounted:s,keepMountedMode:c,...l}=u(`AccordionPanel`,null,e),{value:d}=an(),f=nn();return(0,H.jsx)(De,{...f.getStyles(`panel`,{className:n,classNames:t,style:r,styles:i}),expanded:f.isItemActive(d),transitionDuration:f.transitionDuration??200,role:`region`,id:f.getRegionId(d),"aria-labelledby":f.getControlId(d),keepMounted:s??f.keepMounted,keepMountedMode:c??f.keepMountedMode,...l,children:(0,H.jsx)(`div`,{...f.getStyles(`content`,{classNames:t,styles:i}),children:o})})});ln.displayName=`@mantine/core/AccordionPanel`,ln.classes=on;var un={multiple:!1,loop:!0,disableChevronRotation:!1,disableCollapse:!1,chevronPosition:`right`,variant:`default`,chevronSize:`auto`,chevronIconSize:16,keepMountedMode:`activity`},dn=g((e,{transitionDuration:t,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":t===void 0?void 0:`${t}ms`,"--accordion-chevron-size":n===void 0?void 0:P(n),"--accordion-radius":r===void 0?void 0:re(r)}})),fn=c(e=>{let t=u(`Accordion`,un,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,children:d,multiple:f,value:p,defaultValue:m,onChange:h,id:g,loop:_,transitionDuration:v,disableChevronRotation:y,disableCollapse:b,chevronPosition:x,chevronSize:S,order:C,chevron:w,variant:T,radius:E,chevronIconSize:D,attributes:O,keepMounted:k,keepMountedMode:A,...j}=t,M=F(g),[N,P]=He({value:p,defaultValue:m,finalValue:f?[]:null,onChange:h}),I=e=>Array.isArray(N)?N.includes(e):e===N,L=e=>{if(!Array.isArray(N)&&b&&e===N)return;let t=Array.isArray(N)?N.includes(e)?N.filter(t=>t!==e):[...N,e]:e===N?null:e;P(t)},ee=a({name:`Accordion`,classes:on,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:O,vars:l,varsResolver:dn});return(0,H.jsx)(tn,{value:{isItemActive:I,onChange:L,getControlId:Ft(`${M}-control`,`Accordion.Item component was rendered with invalid value or without value`),getRegionId:Ft(`${M}-panel`,`Accordion.Item component was rendered with invalid value or without value`),chevron:w===null?null:w||(0,H.jsx)(Ue,{size:D}),transitionDuration:v,disableChevronRotation:y,chevronPosition:x,order:C,loop:_,getStyles:ee,variant:T,unstyled:c,keepMounted:k,keepMountedMode:A},children:(0,H.jsx)(o,{...ee(`root`),id:M,...j,variant:T,"data-accordion":!0,children:d})})});fn.classes=on,fn.varsResolver=dn,fn.displayName=`@mantine/core/Accordion`,fn.Item=cn,fn.Panel=ln,fn.Control=sn,fn.Chevron=Ue;function pn(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>pn(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function mn(e){return e?e.map(e=>pn(e)):[]}function hn(e){return e.reduce((e,t)=>`group`in t?{...e,...hn(t.items)}:(e[`${t.value}`]=t,e),{})}var gn={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},_n={error:null},vn=g((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":M(t,`combobox-chevron-size`),"--combobox-chevron-color":n?l(n,e):void 0}})),yn=h(e=>{let t=u(`ComboboxChevron`,_n,e),{size:n,error:r,style:i,className:s,classNames:c,styles:l,unstyled:d,vars:f,attributes:p,mod:m,...h}=t,g=a({name:`ComboboxChevron`,classes:gn,props:t,style:i,className:s,classNames:c,styles:l,unstyled:d,vars:f,varsResolver:vn,attributes:p,rootSelector:`chevron`});return(0,H.jsx)(o,{component:`svg`,...h,...g(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},m],children:(0,H.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});yn.classes=gn,yn.varsResolver=vn,yn.displayName=`@mantine/core/ComboboxChevron`;var[bn,xn]=pe(`Combobox component was not found in tree`);function Sn({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,H.jsx)(k.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Sn.displayName=`@mantine/core/ComboboxClearButton`;var Cn=h(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=u(`ComboboxDropdown`,null,e),s=xn();return(0,H.jsx)(qe.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Cn.classes=gn,Cn.displayName=`@mantine/core/ComboboxDropdown`;var wn={refProp:`ref`},Tn=h(e=>{let{children:t,refProp:n,ref:r}=u(`ComboboxDropdownTarget`,wn,e);if(xn(),!w(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,H.jsx)(qe.Target,{ref:r,refProp:n,children:t})});Tn.displayName=`@mantine/core/ComboboxDropdownTarget`;var En=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ComboboxEmpty`,null,e),c=xn();return(0,H.jsx)(o,{...c.getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...s})});En.classes=gn,En.displayName=`@mantine/core/ComboboxEmpty`;function Dn({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=xn(),[c,l]=(0,V.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var On={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},kn=h(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=u(`ComboboxEventsTarget`,On,e),d=v(t);if(!d)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=xn(),p=Dn({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:s});return(0,V.cloneElement)(d,{...p,...l,[n]:ie(c,f.store.targetRef,fe(d))})});kn.displayName=`@mantine/core/ComboboxEventsTarget`;var An=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ComboboxFooter`,null,e),c=xn();return(0,H.jsx)(o,{...c.getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...s,onMouseDown:e=>{e.preventDefault()}})});An.classes=gn,An.displayName=`@mantine/core/ComboboxFooter`;var jn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:s,label:c,id:l,...d}=u(`ComboboxGroup`,null,e),f=xn(),p=F(l),m=c!=null&&c!==!1&&c!==``;return(0,H.jsxs)(o,{role:`group`,"aria-labelledby":m?p:void 0,...f.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...d,children:[m&&(0,H.jsx)(`div`,{id:p,...f.getStyles(`groupLabel`,{classNames:t,styles:i}),children:c}),s]})});jn.classes=gn,jn.displayName=`@mantine/core/ComboboxGroup`;var Mn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ComboboxHeader`,null,e),c=xn();return(0,H.jsx)(o,{...c.getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...s,onMouseDown:e=>{e.preventDefault()}})});Mn.classes=gn,Mn.displayName=`@mantine/core/ComboboxHeader`;function Nn({value:e,valuesDivider:t=`,`,...n}){return(0,H.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Nn.displayName=`@mantine/core/ComboboxHiddenInput`;var Pn=h(e=>{let t=u(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:s,onClick:c,id:l,active:d,onMouseDown:f,onMouseOver:p,disabled:m,selected:h,mod:g,..._}=t,v=xn(),y=(0,V.useId)(),b=l||y;return(0,H.jsx)(o,{...v.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),"aria-disabled":m||void 0,..._,id:b,mod:[`combobox-option`,{"combobox-active":d,"combobox-disabled":m,"combobox-selected":h},g],role:`option`,onClick:e=>{m?e.preventDefault():(v.onOptionSubmit?.(t.value,t),c?.(e))},onMouseDown:e=>{e.preventDefault(),f?.(e)},onMouseOver:e=>{v.resetSelectionOnOptionHover&&v.store.resetSelectedOption(),p?.(e)}})});Pn.classes=gn,Pn.displayName=`@mantine/core/ComboboxOption`;var Fn=h(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:s,labelledBy:c,...l}=u(`ComboboxOptions`,null,e),d=xn(),f=F(a);return(0,V.useEffect)(()=>{d.store.setListId(f)},[f]),(0,H.jsx)(o,{...d.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...l,id:f,role:`listbox`,"aria-labelledby":c,onMouseDown:e=>{e.preventDefault(),s?.(e)}})});Fn.classes=gn,Fn.displayName=`@mantine/core/ComboboxOptions`;var In={withAriaAttributes:!0,withKeyboardNavigation:!0},Ln=h(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:d,...f}=u(`ComboboxSearch`,In,e),p=xn(),m=p.getStyles(`search`),h=Dn({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,H.jsx)(k,{ref:ie(d,p.store.searchRef),classNames:[{input:m.className},t],styles:[{input:m.style},n],size:l||p.size,...h,...f,__staticSelector:`Combobox`})});Ln.classes=gn,Ln.displayName=`@mantine/core/ComboboxSearch`;var Rn={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},zn=h(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=u(`ComboboxTarget`,Rn,e),d=v(t);if(!d)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=xn(),p=Dn({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:s}),m=(0,V.cloneElement)(d,{...p,...l});return(0,H.jsx)(qe.Target,{refProp:n,ref:ie(c,f.store.targetRef),children:m})});zn.displayName=`@mantine/core/ComboboxTarget`;function Bn(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Vn(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,V.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,V.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,V.useCallback)(()=>{let e=Jt(f.current);Kt(`#${l.current} [data-combobox-selected]`,e)?.removeAttribute(`data-combobox-selected`)},[]),b=(0,V.useCallback)(e=>{let t=Jt(f.current),n=Kt(`#${l.current}`,t),r=n?qt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,V.useCallback)(()=>{let e=Jt(f.current),t=Kt(`#${l.current} [data-combobox-active]`,e);if(t){let n=qt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,V.useCallback)(()=>{let e=Jt(f.current),t=qt(`#${l.current} [data-combobox-option]`,e);return b(Vn(u.current,t,a))},[b,a]),C=(0,V.useCallback)(()=>{let e=Jt(f.current),t=qt(`#${l.current} [data-combobox-option]`,e);return b(Bn(u.current,t,a))},[b,a]),w=(0,V.useCallback)(()=>{let e=Jt(f.current),t=qt(`#${l.current} [data-combobox-option]`,e);return b(Hn(t))},[b]),T=(0,V.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Jt(f.current),r=qt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=Jt(f.current),r=qt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,V.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,V.useCallback)(()=>{let e=Jt(f.current);(qt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,V.useCallback)(e=>{l.current=e},[]),k=(0,V.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,V.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,V.useCallback)(()=>u.current,[]);return(0,V.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var Wn={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Gn=g((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":L(t),"--combobox-option-padding":M(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:P(n),"--combobox-option-fz":L(t),"--combobox-option-padding":M(t,`combobox-option-padding`)}})),Kn=e=>{let t=u(`Combobox`,Wn,e),{classNames:n,styles:r,unstyled:i,children:o,store:s,vars:c,onOptionSubmit:l,onClose:d,size:f,dropdownPadding:p,resetSelectionOnOptionHover:m,__staticSelector:h,readOnly:g,attributes:_,floatingHeight:v,middlewares:y,...b}=t,x=v===`viewport`?{...y,flip:!1,size:{...typeof y?.size==`object`?y.size:{},padding:typeof y?.size==`object`&&y.size.padding!==void 0?y.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=y?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:y,S=Un(),C=s||S,w=a({name:h||`Combobox`,classes:gn,props:t,classNames:n,styles:r,unstyled:i,attributes:_,vars:c,varsResolver:Gn}),T=()=>{d?.(),C.closeDropdown()};return(0,H.jsx)(bn,{value:{getStyles:w,store:C,onOptionSubmit:l,size:f,resetSelectionOnOptionHover:m,readOnly:g,floatingHeight:v},children:(0,H.jsx)(qe,{opened:C.dropdownOpened,...b,middlewares:x,onChange:e=>!e&&T(),withRoles:!1,unstyled:i,children:o})})};Kn.extend=e=>e,Kn.classes=gn,Kn.varsResolver=Gn,Kn.displayName=`@mantine/core/Combobox`,Kn.Target=zn,Kn.Dropdown=Cn,Kn.Options=Fn,Kn.Option=Pn,Kn.Search=Ln,Kn.Empty=En,Kn.Chevron=yn,Kn.Footer=An,Kn.Header=Mn,Kn.EventsTarget=kn,Kn.DropdownTarget=Tn,Kn.Group=jn,Kn.ClearButton=Sn,Kn.HiddenInput=Nn;function qn({children:e,role:t}){let n=(0,V.use)(D);return n?(0,H.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,H.jsx)(H.Fragment,{children:e})}var Jn={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Yn=Jn;function Xn({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:s,children:c,label:l,description:u,id:d,disabled:f,error:p,size:m,labelPosition:h=`left`,bodyElement:g=`div`,labelElement:_=`label`,variant:v,style:y,vars:b,mod:x,attributes:S,...C}){let w=a({name:e,props:t,className:n,style:y,classes:Jn,classNames:r,styles:i,unstyled:s,attributes:S}),T=u?`${d}-description`:void 0,E=p&&typeof p!=`boolean`?`${d}-error`:void 0;return(0,H.jsx)(o,{...w(`root`),__vars:{"--label-fz":L(m),"--label-lh":M(m,`label-lh`)},mod:[{"label-position":h},x],variant:v,size:m,...C,children:(0,H.jsxs)(o,{component:g,htmlFor:g===`label`?d:void 0,...w(`body`),children:[c,(0,H.jsxs)(`div`,{...w(`labelWrapper`),"data-disabled":f||void 0,children:[l&&(0,H.jsx)(o,{component:_,htmlFor:_===`label`?d:void 0,...w(`label`),"data-disabled":f||void 0,children:l}),u&&(0,H.jsx)(k.Description,{id:T,size:m,__inheritStyles:!1,...w(`description`),children:u}),p&&typeof p!=`boolean`&&(0,H.jsx)(k.Error,{id:E,size:m,__inheritStyles:!1,...w(`error`),children:p})]})]})})}Xn.displayName=`@mantine/core/InlineInput`;function Zn(e){return`group`in e}function Qn({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function er(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Zn(n))er(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function tr(e,t){return Array.isArray(e)?e.includes(t):e===t}function nr({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Zn(e)){let s=tr(r,e.value),c=t&&(s?(0,H.jsx)(ze,{className:gn.optionsDropdownCheckIcon}):n?(0,H.jsx)(`div`,{className:gn.optionsDropdownCheckPlaceholder}):null),l=(0,H.jsxs)(H.Fragment,{children:[i===`left`&&c,(0,H.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,H.jsx)(Kn.Option,{value:e.value,disabled:e.disabled,className:_({[gn.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,H.jsx)(nr,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,H.jsx)(Kn.Group,{label:e.group,children:s})}function rr({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=xn();er(e);let x=typeof i==`string`?(r||Qn)({options:e,search:l?i:``,limit:a??1/0}):e,S=$n(x),C=x.map((e,t)=>(0,H.jsx)(nr,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Zn(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,H.jsx)(Kn.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,H.jsxs)(Kn.Options,{labelledBy:g,"aria-label":y,children:[c?(0,H.jsx)(he.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,H.jsx)(Kn.Empty,{children:m})]})})}function ir(e,t,n,r){if(t===n||r===`before`&&n===t+1||r===`after`&&n===t-1)return e;let i=e.slice(),[a]=i.splice(t,1),o=t{let t=e.lastElementChild;return t?t instanceof HTMLInputElement?t:t.querySelector(`input`):null},or=(e,t)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{let e=i.current;e&&(i.current=null,or(o.current,e.expectedValue)&&e.container?.querySelector(`[data-mantine-pill-index="${e.index}"]`)?.focus())});let s=(0,V.useCallback)(e=>{a.current=e},[]);return{getPillProps:e=>{if(n)return{draggable:!0,tabIndex:-1,"data-mantine-pill-index":e,"aria-keyshortcuts":`Alt+ArrowLeft Alt+ArrowRight`,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onDragStart:t=>{t.stopPropagation(),t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,String(e)),r.current.draggedIndex=e;let n=t.currentTarget,i=n.getBoundingClientRect(),a=n.cloneNode(!0);a.removeAttribute(`data-dragging`),a.removeAttribute(`data-drag-over`),a.style.position=`fixed`,a.style.top=`-9999px`,a.style.left=`-9999px`,a.style.width=`${i.width}px`,a.style.height=`${i.height}px`,a.style.pointerEvents=`none`,document.body.appendChild(a),t.dataTransfer.setDragImage(a,t.clientX-i.left,t.clientY-i.top),setTimeout(()=>a.parentNode?.removeChild(a),0),requestAnimationFrame(()=>{n.setAttribute(`data-dragging`,`true`)})},onDragOver:t=>{let{draggedIndex:n}=r.current;if(n===null||n===e)return;let i=t.currentTarget,a=i.getBoundingClientRect(),o=t.clientX-a.left,s=(getComputedStyle(i).direction===`rtl`?o>a.width/2:o{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||(t.removeAttribute(`data-drag-over`),r.current.currentDropTarget===t&&(r.current.currentDropTarget=null))},onDrop:n=>{n.preventDefault(),n.stopPropagation();let i=n.currentTarget,a=i.getAttribute(`data-drag-over`);i.removeAttribute(`data-drag-over`);let{draggedIndex:s}=r.current;if(s!==null&&a&&s!==e){let n=ir(o.current,s,e,a);n!==o.current&&t(n)}r.current.draggedIndex=null,r.current.currentDropTarget=null},onDragEnd:e=>{e.currentTarget.removeAttribute(`data-dragging`);let t=r.current.currentDropTarget;t&&t.removeAttribute(`data-drag-over`),r.current.draggedIndex=null,r.current.currentDropTarget=null},onKeyDown:n=>{if(n.key!==`ArrowLeft`&&n.key!==`ArrowRight`)return;let r=n.currentTarget,a=getComputedStyle(r).direction===`rtl`?n.key===`ArrowLeft`:n.key===`ArrowRight`,s=a?e+1:e-1;if(n.altKey){if(s<0||s>=o.current.length)return;n.preventDefault(),n.stopPropagation();let c=a?`after`:`before`,l=ir(o.current,e,s,c);if(l===o.current)return;i.current={container:r.parentElement,index:s,expectedValue:l},t(l);return}if(s<0)return;let c=r.parentElement;if(c){if(n.preventDefault(),n.stopPropagation(),s>=o.current.length){ar(c)?.focus();return}c.querySelector(`[data-mantine-pill-index="${s}"]`)?.focus()}}}},getListProps:()=>n?{ref:s}:{},handleInputKeyDown:e=>{if(!n||e.key!==`ArrowLeft`)return;let t=e.currentTarget;if(!(t.value.length===0||t.selectionStart===0&&t.selectionEnd===0))return;let r=a.current;if(!r)return;let i=r.querySelectorAll(`[data-mantine-pill-index]`);i.length!==0&&(e.preventDefault(),i[i.length-1].focus())}}}function cr({id:e,label:t,labelProps:n,inputWrapperOrder:r}){if(t&&(!r||r.includes(`label`)))return n?.id||`${e}-label`}function lr(e){let t=e.currentTarget;return Jt(t).activeElement!==t}var ur=(0,V.createContext)(null),dr={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},fr=(0,V.createContext)(null),pr=g((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?M(n,`pg-gap`):M(t)}})),mr=h(e=>{let t=u(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,size:d,disabled:f,attributes:p,...m}=t,h=(0,V.use)(ur)?.size||d||void 0,g=a({name:`PillGroup`,classes:dr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:p,vars:l,varsResolver:pr,stylesCtx:{size:h},rootSelector:`group`});return(0,H.jsx)(fr,{value:{size:h,disabled:f},children:(0,H.jsx)(o,{size:h,...g(`group`),...m})})});mr.classes=dr,mr.varsResolver=pr,mr.displayName=`@mantine/core/PillGroup`;var hr={variant:`default`},gr=g((e,{radius:t},{size:n})=>({root:{"--pill-fz":M(n,`pill-fz`),"--pill-height":M(n,`pill-height`),"--pill-radius":t===void 0?void 0:re(t)}})),_r=h(e=>{let t=u(`Pill`,hr,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,variant:d,children:f,withRemoveButton:p,onRemove:m,removeButtonProps:h,radius:g,size:_,disabled:v,mod:y,attributes:b,...x}=t,S=(0,V.use)(fr),C=(0,V.use)(ur),w=_||S?.size||void 0,T=C?.variant===`filled`?`contrast`:d||`default`,E=a({name:`Pill`,classes:dr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:b,vars:l,varsResolver:gr,stylesCtx:{size:w}});return(0,H.jsxs)(o,{component:`span`,variant:T,size:w,...E(`root`,{variant:T}),mod:[{"with-remove":p&&!v,disabled:v||S?.disabled},y],...x,children:[(0,H.jsx)(`span`,{...E(`label`),children:f}),p&&(0,H.jsx)(oe,{variant:`transparent`,radius:g,tabIndex:-1,"aria-hidden":!0,unstyled:c,...h,...E(`remove`,{className:h?.className,style:h?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),h?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),m?.(),h?.onClick?.(e)}})]})});_r.classes=dr,_r.varsResolver=gr,_r.displayName=`@mantine/core/Pill`,_r.Group=mr;var vr={field:`m_45c4369d`},yr={type:`visible`},br=h(e=>{let t=u(`PillsInputField`,yr,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,type:d,disabled:f,id:p,pointer:m,mod:h,attributes:g,ref:_,...v}=t,y=(0,V.use)(ur),b=(0,V.use)(D),x=a({name:`PillsInputField`,classes:vr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:g,rootSelector:`field`}),S=f||y?.disabled;return(0,H.jsx)(o,{component:`input`,ref:ie(_,y?.fieldRef),"data-type":d,disabled:S,mod:[{disabled:S,pointer:m},h],...x(`field`),...v,id:b?.inputId||p,"aria-invalid":y?.hasError,"aria-describedby":b?.describedBy,type:`text`,onMouseDown:e=>!m&&e.stopPropagation()})});br.classes=vr,br.displayName=`@mantine/core/PillsInputField`;var xr={size:`sm`},Sr=h(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=u([`Input`,`InputWrapper`,`PillsInput`],xr,e),d=(0,V.useRef)(null);return(0,H.jsx)(ur,{value:{fieldRef:d,size:i,disabled:a,hasError:!!s,variant:c},children:(0,H.jsx)(N,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),d.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(d.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});Sr.displayName=`@mantine/core/PillsInput`,Sr.classes=N.classes,Sr.Field=br;function Cr(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}function wr(e){return typeof e==`string`?e.trim().toLowerCase():e}function Tr({data:e,value:t}){let n=t.map(wr);return e.reduce((e,t)=>(Zn(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(wr(e.value))===-1)}):n.indexOf(wr(t.value))===-1&&e.push(t),e),[])}var Er={xs:41,sm:50,md:60,lg:72,xl:89},Dr={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},Or=c(e=>{let t=u([`Input`,`InputWrapper`,`MultiSelect`],Dr,e),{classNames:n,className:r,style:i,styles:o,unstyled:s,vars:c,size:l,value:f,defaultValue:p,onChange:m,onKeyDown:h,variant:g,data:_,dropdownOpened:v,defaultDropdownOpened:y,onDropdownOpen:b,onDropdownClose:x,selectFirstOptionOnChange:S,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:w,comboboxProps:T,filter:E,limit:D,withScrollArea:O,maxDropdownHeight:k,floatingHeight:j,searchValue:M,defaultSearchValue:N,onSearchChange:P,readOnly:I,disabled:L,onFocus:ee,onBlur:te,radius:ne,rightSection:re,rightSectionWidth:ie,rightSectionPointerEvents:ae,rightSectionProps:R,leftSection:oe,leftSectionWidth:z,leftSectionPointerEvents:se,leftSectionProps:ce,inputContainer:le,inputWrapperOrder:ue,withAsterisk:de,labelProps:fe,descriptionProps:pe,errorProps:me,successProps:he,wrapperProps:ge,description:_e,label:ve,error:ye,success:be,maxValues:xe,searchable:B,nothingFoundMessage:Se,withCheckIcon:Ce,withAlignedLabels:we,checkIconPosition:Te,hidePickedOptions:Ee,withErrorStyles:De,withSuccessStyles:Oe,name:ke,form:Ae,id:je,clearable:Me,clearSectionMode:Ne,clearButtonProps:Pe,hiddenInputProps:Fe,placeholder:Ie,hiddenInputValuesDivider:Le,required:Re,mod:ze,renderOption:Be,renderPill:Ve,onRemove:Ue,onClear:We,onMaxValues:Ge,scrollAreaProps:Ke,chevronColor:qe,attributes:Je,clearSearchOnChange:Ye,openOnFocus:Xe,loading:Ze,loadingPosition:Qe,withPillsReorder:$e,...et}=t,tt=F(je),nt=cr({id:tt,label:ve,labelProps:fe,inputWrapperOrder:ue}),rt=mn(_),it=hn(rt),at=(0,V.useRef)({}),ot=Un({opened:v,defaultOpened:y,onDropdownOpen:()=>{b?.(),C&&ot.selectFirstOption()},onDropdownClose:()=>{x?.(),ot.resetSelectedOption()}}),{styleProps:st,rest:{type:ct,autoComplete:lt,...ut}}=d(et),[dt,ft]=He({value:f,defaultValue:p,finalValue:[],onChange:m}),{getPillProps:pt,getListProps:mt,handleInputKeyDown:ht}=sr({value:dt,onChange:ft,enabled:$e&&!L&&!I}),[gt,_t]=He({value:M,defaultValue:N,finalValue:``,onChange:P}),vt=e=>{_t(e),ot.resetSelectedOption()},yt=a({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:o,unstyled:s,attributes:Je}),{resolvedClassNames:bt,resolvedStyles:xt}=A({props:t,styles:o,classNames:n}),St=e=>{h?.(e),!e.defaultPrevented&&(e.key===` `&&!B&&(e.preventDefault(),ot.toggleDropdown()),e.key===`Backspace`&>.length===0&&dt.length>0&&!I&&(Ue?.(dt[dt.length-1]),ft(dt.slice(0,dt.length-1))),ht(e))},Ct=dt.map((e,t)=>{let n=it[`${e}`]||at.current[`${e}`],r=pt(t);return Ve?(0,H.jsx)(V.Fragment,{children:Ve({option:n,value:e,onRemove:()=>{ft(dt.filter(t=>e!==t)),Ue?.(e)},disabled:L,reorderProps:r})},`${e}-${t}`):(0,H.jsx)(_r,{withRemoveButton:!I&&!it[`${e}`]?.disabled,onRemove:()=>{ft(dt.filter(t=>e!==t)),Ue?.(e)},unstyled:s,disabled:L,...yt(`pill`),...r,children:n?.label||e},`${e}-${t}`)});(0,V.useEffect)(()=>{S&&ot.selectFirstOption()},[S,gt]),(0,V.useEffect)(()=>{dt.forEach(e=>{`${e}`in it&&(at.current[`${e}`]=it[`${e}`])})},[it,dt]);let wt=(0,H.jsx)(Kn.ClearButton,{...Pe,onClear:()=>{We?.(),ft([]),vt(``)}}),Tt=Tr({data:rt,value:dt}),Et=Me&&dt.length>0&&!L&&!I,Dt=Et?{paddingInlineEnd:Er[l]??Er.sm}:void 0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Kn,{store:ot,classNames:bt,styles:xt,unstyled:s,size:l,readOnly:I,__staticSelector:`MultiSelect`,attributes:Je,floatingHeight:j,onOptionSubmit:e=>{w?.(e),Ye&&vt(``),ot.updateSelectedOptionIndex(`selected`),dt.includes(it[`${e}`].value)?(ft(dt.filter(t=>t!==it[`${e}`].value)),Ue?.(it[`${e}`].value)):dt.lengthB?ot.openDropdown():ot.toggleDropdown(),"data-expanded":ot.dropdownOpened||void 0,id:tt,required:Re,mod:ze,attributes:Je,children:(0,H.jsxs)(_r.Group,{attributes:Je,disabled:L,unstyled:s,...yt(`pillsList`,{style:Dt}),...mt(),children:[Ct,(0,H.jsx)(Kn.EventsTarget,{autoComplete:lt,withExpandedAttribute:!0,children:(0,H.jsx)(Sr.Field,{...ut,id:tt,placeholder:Ie,type:!B&&!Ie?`hidden`:`visible`,...yt(`inputField`),unstyled:s,onFocus:e=>{ee?.(e),Xe&&B&&ot.openDropdown()},onBlur:e=>{te?.(e),ot.closeDropdown(),vt(``)},onKeyDown:St,value:gt,onChange:e=>{if(lr(e)){if(!I){let t=Cr(it,e.currentTarget.value);t&&!dt.includes(t.value)&&dt.length{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ProgressLabel`,null,e),c=Ar();return(0,H.jsx)(o,{...c.getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...s})});Mr.classes=jr,Mr.displayName=`@mantine/core/ProgressLabel`;var Nr=g((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":M(t,`progress-size`),"--progress-radius":n===void 0?void 0:re(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),Pr=h(e=>{let t=u(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,autoContrast:d,transitionDuration:f,orientation:p,attributes:m,mod:h,...g}=t,_=a({name:`Progress`,classes:jr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:m,vars:l,varsResolver:Nr});return(0,H.jsx)(kr,{value:{getStyles:_,autoContrast:d},children:(0,H.jsx)(o,{mod:[{orientation:p},h],..._(`root`),...g})})});Pr.classes=jr,Pr.varsResolver=Nr,Pr.displayName=`@mantine/core/ProgressRoot`;var Fr={withAria:!0},Ir=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:s,withAria:c,color:d,striped:p,animated:m,mod:h,...g}=u(`ProgressSection`,Fr,e),_=Ar(),v=f(),y=c?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,"aria-valuetext":`${s}%`}:{};return(0,H.jsx)(o,{..._.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...g,...y,mod:[{striped:p||m,animated:m},h],__vars:{"--progress-section-size":`${s}%`,"--progress-section-color":l(d,v),"--progress-label-color":Yt(_.autoContrast,v)?at({color:d,theme:v,autoContrast:_.autoContrast}):void 0}})});Ir.classes=jr,Ir.displayName=`@mantine/core/ProgressSection`;var Lr=h(e=>{let t=u(`Progress`,null,e),{value:n,classNames:r,styles:i,vars:a,color:o,striped:s,animated:c,"aria-label":l,...d}=t,{resolvedClassNames:f,resolvedStyles:p}=A({classNames:r,styles:i,props:t});return(0,H.jsx)(Pr,{classNames:f,styles:p,vars:a,...d,children:(0,H.jsx)(Ir,{value:n,color:o,striped:s,animated:c,"aria-label":l})})});Lr.classes=jr,Lr.displayName=`@mantine/core/Progress`,Lr.Section=Ir,Lr.Root=Pr,Lr.Label=Mr;var Rr={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},zr={withItemsBorders:!0},Br=g((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:re(t),"--sc-color":n?l(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":M(i,`sc-padding`),"--sc-font-size":L(i)}})),Vr=c(e=>{let t=u(`SegmentedControl`,zr,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,data:d,value:p,defaultValue:m,onChange:h,size:g,name:_,disabled:v,readOnly:y,fullWidth:b,orientation:x,radius:S,color:C,transitionDuration:w,transitionTimingFunction:T,variant:E,autoContrast:D,withItemsBorders:O,mod:k,attributes:A,ref:j,...M}=t,N=a({name:`SegmentedControl`,props:t,classes:Rr,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:A,vars:l,varsResolver:Br}),P=f(),I=d.map(e=>Gt(e)?{label:`${e}`,value:e}:e),L=Wt(),[ee,te]=(0,V.useState)(0),[ne,re]=(0,V.useState)(null),[ae,R]=(0,V.useState)({}),oe=(e,t)=>{e!==null&&ae[t]!==e&&(ae[t]=e,R({...ae}))},[z,se]=He({value:p,defaultValue:m,finalValue:Array.isArray(d)?I.find(e=>!e.disabled)?.value??d[0]?.value??null:null,onChange:h}),ce=F(_),le=I.map(e=>`${e.value}`),ue=I.map(e=>(0,V.createElement)(o,{...N(`control`),mod:{active:z===e.value,orientation:x},key:`${e.value}`},(0,V.createElement)(`input`,{...N(`input`),disabled:v||e.disabled,type:`radio`,name:ce,value:`${e.value}`,id:`${ce}-${e.value}`,checked:z===e.value,onChange:()=>!y&&se(e.value),"data-focus-ring":P.focusRing,key:`${e.value}-input`}),(0,V.createElement)(o,{component:`label`,...N(`label`),mod:{active:z===e.value&&!(v||e.disabled),disabled:v||e.disabled,"read-only":y},htmlFor:`${ce}-${e.value}`,ref:t=>oe(t,`${e.value}`),__vars:{"--sc-label-color":C===void 0?void 0:at({color:C,theme:P,autoContrast:D})},key:`${e.value}-label`},(0,H.jsx)(`span`,{...N(`innerLabel`),children:e.label})))),de=ie(j,re);return Bt(()=>{te(e=>e+1)},[d.length]),Bt(()=>{R(e=>{let t={};return le.forEach(n=>{n in e&&(t[n]=e[n])}),Object.keys(t).length===Object.keys(e).length?e:t})},[le]),d.length===0?null:(0,H.jsxs)(o,{...N(`root`),variant:E,size:g,ref:de,mod:[{"full-width":b,orientation:x,initialized:L,"with-items-borders":O},k],...M,role:`radiogroup`,"data-disabled":v,children:[z!==void 0&&(0,H.jsx)(en,{target:ae[`${z}`],parent:ne,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...N(`indicator`)},ee),ue]})});Vr.classes=Rr,Vr.varsResolver=Br,Vr.displayName=`@mantine/core/SegmentedControl`;var Hr={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},Ur=c(e=>{let t=u([`Input`,`InputWrapper`,`Select`],Hr,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:b,comboboxProps:x,readOnly:S,disabled:C,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,searchable:j,rightSection:M,checkIconPosition:P,withCheckIcon:I,withAlignedLabels:L,nothingFoundMessage:ee,name:te,form:ne,searchValue:re,defaultSearchValue:ie,onSearchChange:ae,allowDeselect:R,error:oe,rightSectionPointerEvents:z,id:se,clearable:ce,clearSectionMode:le,clearButtonProps:ue,hiddenInputProps:de,renderOption:fe,onClear:pe,autoComplete:me,scrollAreaProps:he,__defaultRightSection:ge,__clearSection:_e,__clearable:ve,chevronColor:ye,autoSelectOnBlur:be,openOnFocus:xe,attributes:B,...Se}=t,Ce=(0,V.useMemo)(()=>mn(h),[h]),we=(0,V.useRef)({}),Te=(0,V.useMemo)(()=>hn(Ce),[Ce]),Ee=F(se),De=cr({id:Ee,label:Se.label,labelProps:Se.labelProps,inputWrapperOrder:Se.inputWrapperOrder}),[Oe,ke,Ae]=He({value:g,defaultValue:_,finalValue:null,onChange:m}),je=Oe==null?void 0:`${Oe}`in Te?Te[`${Oe}`]:we.current[`${Oe}`],Me=Ht(je),[Ne,Pe,Fe]=He({value:re,defaultValue:ie,finalValue:je?je.label:``,onChange:ae}),Ie=Un({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),y?Ie.selectFirstOption():Ie.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Ie.resetSelectedOption,0)}}),Le=e=>{Pe(e),Ie.resetSelectedOption()},{resolvedClassNames:Re,resolvedStyles:ze}=A({props:t,styles:r,classNames:n});(0,V.useEffect)(()=>{v&&Ie.selectFirstOption()},[v,Ne]),(0,V.useEffect)(()=>{g===null&&Le(``),g!=null&&je&&(Me?.value!==je.value||Me?.label!==je.label)&&Le(je.label)},[g,je]),(0,V.useEffect)(()=>{!Ae&&!Fe&&Le(Oe==null?``:`${Oe}`in Te?Te[`${Oe}`]?.label:we.current[`${Oe}`]?.label||``)},[Te,Oe]),(0,V.useEffect)(()=>{Oe&&`${Oe}`in Te&&(we.current[`${Oe}`]=Te[`${Oe}`])},[Te,Oe]);let Be=(0,H.jsx)(Kn.ClearButton,{...ue,onClear:()=>{ke(null,null),Le(``),pe?.()}}),Ve=ce&&Oe!=null&&!C&&!S;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Kn,{store:Ie,__staticSelector:`Select`,classNames:Re,styles:ze,unstyled:i,readOnly:S,size:k,attributes:B,floatingHeight:O,keepMounted:be,onOptionSubmit:e=>{b?.(e);let t=R&&`${Te[e].value}`==`${Oe}`?null:Te[e],n=t?t.value:null;n!==Oe&&ke(n,t),!Ae&&Le(n==null?``:t?.label||``),Ie.closeDropdown()},...x,children:[(0,H.jsx)(Kn.Target,{targetType:j?`input`:`button`,autoComplete:me,withExpandedAttribute:!0,children:(0,H.jsx)(N,{id:Ee,__defaultRightSection:(0,H.jsx)(Kn.Chevron,{size:k,error:oe,unstyled:i,color:ye}),__clearSection:Be,__clearable:Ve,__clearSectionMode:le,rightSection:M,rightSectionPointerEvents:z||`none`,...Se,size:k,__staticSelector:`Select`,disabled:C,readOnly:S||!j,value:Ne,onChange:e=>{if(lr(e)){if(!S){let t=Cr(Te,e.currentTarget.value);t&&`${t.value}`!=`${Oe}`&&(ke(t.value,t),!Ae&&Le(t.label))}return}Le(e.currentTarget.value),Ie.openDropdown(),v&&Ie.selectFirstOption()},onFocus:e=>{xe&&j&&Ie.openDropdown(),d?.(e)},onBlur:e=>{be&&Ie.clickSelectedOption(),Ie.closeDropdown();let t=Oe!=null&&(`${Oe}`in Te?Te[`${Oe}`]:we.current[`${Oe}`]);Le(t&&t.label||``),f?.(e)},onClick:e=>{j?Ie.openDropdown():Ie.toggleDropdown(),p?.(e)},classNames:Re,styles:ze,unstyled:i,pointer:!j,error:oe,attributes:B})}),(0,H.jsx)(rr,{data:Ce,hidden:S||C,filter:w,search:Ne,limit:T,hiddenWhenEmpty:!ee,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!j&&je?.label!==Ne,value:Oe,checkIconPosition:P,withCheckIcon:I,withAlignedLabels:L,nothingFoundMessage:ee,unstyled:i,labelId:De,"aria-label":De?void 0:Se[`aria-label`],renderOption:fe,scrollAreaProps:he})]}),(0,H.jsx)(Kn.HiddenInput,{value:Oe,name:te,form:ne,disabled:C,...de})]})});Ur.classes={...N.classes,...Kn.classes},Ur.displayName=`@mantine/core/Select`;function Wr(e){if(e!==void 0)return typeof e==`number`?P(e):e}function Gr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=f(),s=t===void 0?e:t,c=r!==void 0,l=E({"--sg-spacing-x":R(It(e)),"--sg-spacing-y":R(It(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":Wr(r)}:{"--sg-cols":It(n)?.toString()}}),u=O(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=R(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=R(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{}),d=rt(O(u),o.breakpoints).filter(e=>O(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]}));return(0,H.jsx)(j,{styles:l,media:d,selector:a})}function Kr(e){return typeof e==`object`&&e?O(e):[]}function qr(e){return e.sort((e,t)=>Be(e)-Be(t))}function Jr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return qr(Array.from(new Set([...Kr(e),...Kr(t),...r===void 0?Kr(n):[]])))}function Yr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=E({"--sg-spacing-x":R(It(e)),"--sg-spacing-y":R(It(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":Wr(r)}:{"--sg-cols":It(n)?.toString()}}),l=Jr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=R(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=R(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{}),d=l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]}));return(0,H.jsx)(j,{styles:c,container:d,selector:a})}var Xr={container:`m_925c2d2c`,root:`m_2415a157`},Zr={cols:1,spacing:`md`,type:`media`},Qr=h(e=>{let t=u(`SimpleGrid`,Zr,e),{classNames:n,className:r,style:i,styles:c,unstyled:l,vars:d,cols:f,verticalSpacing:p,spacing:m,type:h,minColWidth:g,autoFlow:_,autoRows:v,attributes:y,...b}=t,x=a({name:`SimpleGrid`,classes:Xr,props:t,className:r,style:i,classNames:n,styles:c,unstyled:l,attributes:y,vars:d}),S=s(),C=g===void 0?void 0:_||`auto-fill`;return h===`container`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Yr,{...t,selector:`.${S}`}),(0,H.jsx)(`div`,{...x(`container`),children:(0,H.jsx)(o,{...x(`root`,{className:S}),...b,"data-auto-cols":C})})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Gr,{...t,selector:`.${S}`}),(0,H.jsx)(o,{...x(`root`,{className:S}),...b,"data-auto-cols":C})]})});Qr.classes=Xr,Qr.displayName=`@mantine/core/SimpleGrid`;var $r=(0,V.createContext)(null),ei={hiddenInputValuesSeparator:`,`},ti=c((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:d,maxSelectedValues:f,disabled:p,...m}=u(`SwitchGroup`,ei,e),[h,g]=He({value:t,defaultValue:n,finalValue:[],onChange:r}),_=e=>{let t=e.currentTarget.value;if(s)return;let n=h.includes(t);!n&&f&&h.length>=f||g(n?h.filter(e=>e!==t):[...h,t])},v=e=>{if(p)return!0;if(!f)return!1;let t=h.includes(e),n=h.length>=f;return!t&&n},y=h.join(l);return(0,H.jsx)($r,{value:{value:h,onChange:_,size:i,isDisabled:v},children:(0,H.jsxs)(k.Wrapper,{size:i,...a,...m,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,H.jsx)(qn,{role:`group`,children:o}),(0,H.jsx)(`input`,{type:`hidden`,name:c,value:y,...d})]})})}));ti.classes=k.Wrapper.classes,ti.displayName=`@mantine/core/SwitchGroup`;var ni={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},ri={labelPosition:`right`,withThumbIndicator:!0},ii=g((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:re(t),"--switch-height":M(r,`switch-height`),"--switch-width":M(r,`switch-width`),"--switch-thumb-size":M(r,`switch-thumb-size`),"--switch-label-font-size":M(r,`switch-label-font-size`),"--switch-track-label-padding":M(r,`switch-track-label-padding`),"--switch-color":n?l(n,e):void 0}})),ai=h(e=>{let t=u(`Switch`,ri,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,color:f,label:p,offLabel:m,onLabel:h,id:g,size:_,radius:v,wrapperProps:y,thumbIcon:b,checked:x,defaultChecked:S,onChange:C,labelPosition:w,description:T,error:E,disabled:D,variant:O,rootRef:k,mod:A,withThumbIndicator:j,attributes:M,...N}=t,P=(0,V.use)($r),I=_||P?.size,L=a({name:`Switch`,props:t,classes:ni,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:M,vars:l,varsResolver:ii}),{styleProps:ee,rest:te}=d(N),ne=F(g),re=[T?`${ne}-description`:void 0,E&&typeof E!=`boolean`?`${ne}-error`:void 0,te[`aria-describedby`]].filter(Boolean).join(` `)||void 0,ie={checked:P?.value.includes(te.value)??x,onChange:e=>{P?.onChange(e),C?.(e)}},ae=D||P?.isDisabled?.(te.value),[R,oe]=He({value:ie.checked??x,defaultValue:S,finalValue:!1});return(0,H.jsxs)(Xn,{...L(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:ne,size:I,labelPosition:w,label:p,description:T,error:E,disabled:ae,bodyElement:`label`,labelElement:`span`,classNames:n,styles:s,unstyled:c,"data-checked":ie.checked,variant:O,ref:k,mod:A,attributes:M,inert:te.inert,...ee,...y,children:[(0,H.jsx)(`input`,{...te,...ie,disabled:ae,checked:R,"data-checked":ie.checked,onChange:e=>{ie.onChange?.(e),oe(e.currentTarget.checked)},id:ne,type:`checkbox`,role:`switch`,inert:te.inert,"aria-describedby":re,...L(`input`)}),(0,H.jsxs)(o,{"aria-hidden":`true`,component:`span`,mod:{error:E,"label-position":w,"without-labels":!h&&!m},...L(`track`),children:[(0,H.jsx)(o,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":j&&!b},...L(`thumb`),children:b}),(0,H.jsx)(`span`,{...L(`trackLabel`),children:R?h:m})]})]})});ai.classes={...ni,...Yn},ai.varsResolver=ii,ai.displayName=`@mantine/core/Switch`,ai.Group=ti;var oi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),si=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z`}))]]),ci=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-35.51,35.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM95.51,143.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l35.52-35.51a12,12,0,0,0-17-17ZM208,148a12,12,0,0,0-12,12v19l-35.51-35.52a12,12,0,0,0-17,17L179,196H160a12,12,0,0,0,0,24h48a12,12,0,0,0,12-12V160A12,12,0,0,0,208,148ZM77,60H96a12,12,0,0,0,0-24H48A12,12,0,0,0,36,48V96a12,12,0,0,0,24,0V77l35.51,35.52a12,12,0,0,0,17-17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M208,48V208H48V48Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-42.34,42.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM98.34,146.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l42.35-42.34a8,8,0,0,0-11.32-11.32ZM208,152a8,8,0,0,0-8,8v28.69l-42.34-42.35a8,8,0,0,0-11.32,11.32L188.69,200H160a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152ZM67.31,56H96a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31l42.34,42.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M109.66,146.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l26.34-26.35A8,8,0,0,1,109.66,146.34ZM83.31,72l18.35-18.34A8,8,0,0,0,96,40H48a8,8,0,0,0-8,8V96a8,8,0,0,0,13.66,5.66L72,83.31l26.34,26.35a8,8,0,0,0,11.32-11.32ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72,146.34,98.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Zm3.06,112.61a8,8,0,0,0-8.72,1.73L184,172.69l-26.34-26.35a8,8,0,0,0-11.32,11.32L172.69,184l-18.35,18.34A8,8,0,0,0,160,216h48a8,8,0,0,0,8-8V160A8,8,0,0,0,211.06,152.61Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-45.76,45.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM99.76,147.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l45.76-45.76a6,6,0,0,0-8.48-8.48ZM208,154a6,6,0,0,0-6,6v33.52l-45.76-45.76a6,6,0,0,0-8.48,8.48L193.52,202H160a6,6,0,0,0,0,12h48a6,6,0,0,0,6-6V160A6,6,0,0,0,208,154ZM62.48,54H96a6,6,0,0,0,0-12H48a6,6,0,0,0-6,6V96a6,6,0,0,0,12,0V62.48l45.76,45.76a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-42.34,42.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM98.34,146.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l42.35-42.34a8,8,0,0,0-11.32-11.32ZM208,152a8,8,0,0,0-8,8v28.69l-42.34-42.35a8,8,0,0,0-11.32,11.32L188.69,200H160a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152ZM67.31,56H96a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31l42.34,42.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-49.17,49.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM101.17,149.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l49.17-49.17a4,4,0,0,0-5.66-5.66ZM208,156a4,4,0,0,0-4,4v38.34l-49.17-49.17a4,4,0,0,0-5.66,5.66L198.34,204H160a4,4,0,0,0,0,8h48a4,4,0,0,0,4-4V160A4,4,0,0,0,208,156ZM57.66,52H96a4,4,0,0,0,0-8H48a4,4,0,0,0-4,4V96a4,4,0,0,0,8,0V57.66l49.17,49.17a4,4,0,0,0,5.66-5.66Z`}))]]),li=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]]),ui=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M172,108a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,108Zm-12,28H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Zm76-8A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm40-104a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,112Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,144Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm32,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M166,112a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm-6,26H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm70-10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M168,112a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,112Zm-8,24H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm72-8A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M164,112a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm-4,28H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm68-12A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z`}))]]),di=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z`}))]]),fi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z`}))]]),pi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),mi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,44H32A20,20,0,0,0,12,64V192a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V64A20,20,0,0,0,224,44Zm-4,144H36V68H220ZM52,128a12,12,0,0,1,12-12H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,128Zm0-36A12,12,0,0,1,64,80H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,92Zm0,72a12,12,0,0,1,12-12h8a12,12,0,0,1,0,24H64A12,12,0,0,1,52,164Zm108,0a12,12,0,0,1-12,12H108a12,12,0,0,1,0-24h40A12,12,0,0,1,160,164Zm44,0a12,12,0,0,1-12,12h-8a12,12,0,0,1,0-24h8A12,12,0,0,1,204,164Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232,64V192a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H224A8,8,0,0,1,232,64Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM64,168H48a8,8,0,0,1,0-16H64a8,8,0,0,1,0,16Zm96,0H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm48,0H192a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,50H32A14,14,0,0,0,18,64V192a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50Zm2,142a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2Zm-20-64a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,128Zm0-32a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,96ZM70,160a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12h8A6,6,0,0,1,70,160Zm96,0a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,160Zm40,0a6,6,0,0,1-6,6h-8a6,6,0,0,1,0-12h8A6,6,0,0,1,206,160Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,52H32A12,12,0,0,0,20,64V192a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52Zm4,140a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4Zm-24-64a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,128Zm0-32a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,96ZM68,160a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8h8A4,4,0,0,1,68,160Zm96,0a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,160Zm40,0a4,4,0,0,1-4,4h-8a4,4,0,0,1,0-8h8A4,4,0,0,1,204,160Z`}))]]),hi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M76,64A12,12,0,0,1,88,52H216a12,12,0,0,1,0,24H88A12,12,0,0,1,76,64Zm140,52H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Zm0,64H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM44,112a16,16,0,1,0,16,16A16,16,0,0,0,44,112Zm0-64A16,16,0,1,0,60,64,16,16,0,0,0,44,48Zm0,128a16,16,0,1,0,16,16A16,16,0,0,0,44,176Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,64V192H88V64Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM68,188a12,12,0,1,1,12-12A12,12,0,0,1,68,188Zm0-48a12,12,0,1,1,12-12A12,12,0,0,1,68,140Zm0-48A12,12,0,1,1,80,80,12,12,0,0,1,68,92Zm124,92H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M82,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H88A6,6,0,0,1,82,64Zm134,58H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Zm0,64H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12ZM44,54A10,10,0,1,0,54,64,10,10,0,0,0,44,54Zm0,128a10,10,0,1,0,10,10A10,10,0,0,0,44,182Zm0-64a10,10,0,1,0,10,10A10,10,0,0,0,44,118Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M84,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H88A4,4,0,0,1,84,64Zm132,60H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Zm0,64H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8ZM44,120a8,8,0,1,0,8,8A8,8,0,0,0,44,120Zm0-64a8,8,0,1,0,8,8A8,8,0,0,0,44,56Zm0,128a8,8,0,1,0,8,8A8,8,0,0,0,44,184Z`}))]]),gi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),_i=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M156,112a12,12,0,0,1-12,12H80a12,12,0,0,1,0-24h64A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H80a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M150,112a6,6,0,0,1-6,6H80a6,6,0,0,1,0-12h64A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M152,112a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M148,112a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h64A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z`}))]]),vi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M230.47,67.5a12,12,0,0,0-19.26-4.32L172.43,99l-12.68-2.72L157,83.57l35.79-38.78a12,12,0,0,0-4.32-19.26A76.07,76.07,0,0,0,88.41,121.64L30.92,174.18a4.68,4.68,0,0,0-.39.38,36,36,0,0,0,50.91,50.91l.38-.39,52.54-57.49A76.05,76.05,0,0,0,230.47,67.5ZM160,148a51.5,51.5,0,0,1-23.35-5.52,12,12,0,0,0-14.26,2.62L64.31,208.66a12,12,0,0,1-17-17l63.55-58.07a12,12,0,0,0,2.62-14.26A51.5,51.5,0,0,1,108,96a52.06,52.06,0,0,1,52-52h.89L135.17,71.87a12,12,0,0,0-2.91,10.65l5.66,26.35a12,12,0,0,0,9.21,9.21l26.35,5.66a12,12,0,0,0,10.65-2.91L212,95.12c0,.3,0,.59,0,.89A52.06,52.06,0,0,1,160,148Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,96a64,64,0,0,1-94.94,56L73,217A24,24,0,0,1,39,183L104,126.94a64,64,0,0,1,80-90.29L144,80l5.66,26.34L176,112l43.35-40A63.8,63.8,0,0,1,224,96Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232,96a72,72,0,0,1-100.94,66L79,222.22c-.12.14-.26.29-.39.42a32,32,0,0,1-45.26-45.26c.14-.13.28-.27.43-.39L94,124.94a72.07,72.07,0,0,1,83.54-98.78,8,8,0,0,1,3.93,13.19L144,80l5.66,26.35L176,112l40.65-37.52a8,8,0,0,1,13.19,3.93A72.6,72.6,0,0,1,232,96Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224.91,69.75a6,6,0,0,0-9.63-2.16l-41.07,37.9L154.7,101.3l-4.19-19.51,37.9-41.07a6,6,0,0,0-2.16-9.63,70,70,0,0,0-89.77,94.39l-61.39,53c-.11.09-.21.19-.32.3A30,30,0,0,0,77.2,221.23c.11-.11.21-.21.3-.32l53-61.39a70,70,0,0,0,94.39-89.77ZM160,154a58,58,0,0,1-28-7.22,6,6,0,0,0-7.45,1.33L68.57,212.88a18,18,0,0,1-25.45-25.45l64.76-55.94A6,6,0,0,0,109.2,124a58,58,0,0,1,64-84.53L139.58,75.93a6,6,0,0,0-1.45,5.33l5.65,26.35a6,6,0,0,0,4.61,4.61l26.35,5.65a6,6,0,0,0,5.33-1.45L216.49,82.8A58.06,58.06,0,0,1,160,154Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M223.05,70.5a4,4,0,0,0-6.42-1.44l-41.82,38.6L153,103l-4.68-21.79,38.6-41.82a4,4,0,0,0-1.44-6.43A68,68,0,0,0,98.94,126L36.4,180l-.21.2a28,28,0,0,0,39.6,39.6l.2-.21,54-62.54A68,68,0,0,0,228,96,67.51,67.51,0,0,0,223.05,70.5ZM160,156a60,60,0,0,1-29-7.47,4,4,0,0,0-5,.89L70,214.25A20,20,0,0,1,41.75,186l64.82-56a4,4,0,0,0,.89-5,60,60,0,0,1,69.46-86.59L141.05,77.29a4,4,0,0,0-1,3.55l5.66,26.35a4,4,0,0,0,3.07,3.07l26.35,5.66a4,4,0,0,0,3.55-1l38.87-35.87A60.05,60.05,0,0,1,160,156Z`}))]]),yi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:oi}));yi.displayName=`ArrowClockwiseIcon`;var bi=yi,xi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:si}));xi.displayName=`ArrowCounterClockwiseIcon`;var Si=xi,Ci=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:ci}));Ci.displayName=`ArrowsOutIcon`;var wi=Ci,Ti=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:li}));Ti.displayName=`CaretUpIcon`;var Ei=Ti,Di=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:ui}));Di.displayName=`ChatCircleTextIcon`;var Oi=Di,ki=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:di}));ki.displayName=`ClockIcon`;var Ai=ki,ji=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:fi}));ji.displayName=`ClockCounterClockwiseIcon`;var Mi=ji,Ni=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:pi}));Ni.displayName=`InfoIcon`;var Pi=Ni,Fi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:mi}));Fi.displayName=`KeyboardIcon`;var Ii=Fi,Li=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:hi}));Li.displayName=`ListBulletsIcon`;var Ri=Li,zi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:gi}));zi.displayName=`ListMagnifyingGlassIcon`;var Bi=zi,Vi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:_i}));Vi.displayName=`MagnifyingGlassMinusIcon`;var Hi=Vi,Ui=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:vi}));Ui.displayName=`WrenchIcon`;var Wi=Ui,Gi=i(b(),1),Ki=`$__all`;function qi(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Ji(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Yi(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=qi(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=Ji(r,u,s[0]),f=Ji(i,l,s[1])),a?(p=Math.round(a.top),m=Math.round(a.left)):o?(p=Math.round(o.top),m=Math.round(o.left)):(p=Math.round((l+s[1])*n+c[1]),m=Math.round((u+s[0])*t+c[0])),!a&&!o){if(Number.isFinite(r)){let e=Math.round((u+s[0])*(t+r)+c[0])-m-d;e!==s[0]&&(d+=e-s[0])}if(Number.isFinite(i)){let e=Math.round((l+s[1])*(n+i)+c[1])-p-f;e!==s[1]&&(f+=e-s[1])}}return{top:p,left:m,width:d,height:f}}function Xi(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=qi(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=$i(d,0,s-r),f=$i(f,0,l-i),{x:d,y:f}}function Zi(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=qi(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function Qi(e,t,n){let{margin:r,rowHeight:i}=e,a=qi(e);return{w:Math.max(1,Math.round((t+r[0])/(a+r[0]))),h:Math.max(1,Math.round((n+r[1])/(i+r[1])))}}function $i(e,t,n){return Math.max(Math.min(e,n),t)}function ea(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function ta(e,t){for(let n=0;nea(e,t))}function ra(e,t){return t===`horizontal`?aa(e):t===`vertical`||t===`wrap`?ia(e):[...e]}function ia(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function aa(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function oa(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function sa(e,t){for(let n=0;ne.static===!0)}function la(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function ua(e){let t=Array(e.length);for(let n=0;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),i.y===1/0&&(i.y=oa(n)),!i.static)n.push(i);else for(;ta(n,i);)i.y++}}return e}function ma(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return[...e];let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let d=ra(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=na(d,t),p=f.length>0;if(p&&c)return ua(e);if(p&&a)return t.x=l,t.y=u,t.moved=!1,e;let m=[...e];for(let e=0;et.y,d=l!==void 0&&t.x+t.w>l.x;if(!l)return ma(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return ma(e,n,void 0,n.y+1,r,c,i);if(u&&i===null){let r=n.y;return t.y=r,n.y=r+t.h,[...e]}if(d&&o)return ma(e,t,n.x,void 0,r,c,i)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l===void 0&&u===void 0?[...e]:ma(e,n,l,u,r,c,i)}function ga(e,t,n){return Math.max(t,Math.min(n,e))}var _a=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:ga(t,0,Math.max(0,r-e.w)),y:ga(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){let o=r===`w`||r===`nw`||r===`sw`?e.x+e.w:i-e.x,s=r===`n`||r===`nw`||r===`ne`?e.y+e.h:a-e.y;return{w:ga(t,1,Math.max(1,o)),h:ga(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:ga(t,e.minW??1,e.maxW??1/0),h:ga(n,e.minH??1,e.maxH??1/0)}}}];function va(e,t,n,r,i){let a={x:n,y:r};for(let n of e)n.constrainPosition&&(a=n.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(let e of t.constraints)e.constrainPosition&&(a=e.constrainPosition(t,a.x,a.y,i));return a}function ya(e,t,n,r,i,a){let o={w:n,h:r};for(let n of e)n.constrainSize&&(o=n.constrainSize(t,o.w,o.h,i,a));if(t.constraints)for(let e of t.constraints)e.constrainSize&&(o=e.constrainSize(t,o.w,o.h,i,a));return o}function ba({top:e,left:t,width:n,height:r}){let i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:`absolute`}}function xa({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function Sa(e){return e*100+`%`}function Ca(e,t,n,r){return e+n>r?t:n}function wa(e,t,n){return e<0?t:n}function Ta(e){return Math.max(0,e)}function Ea(e){return Math.max(0,e)}var Da=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:wa(o,e.height,i),top:Ea(o)}},Oa=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:Ca(e.left,e.width,o,n),left:Ta(i)}},ka=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left+e.width-a;return o<0?{height:i,width:e.left+e.width,top:Ea(r),left:0}:{height:i,width:a,top:Ea(r),left:o}},Aa=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:wa(r,e.height,a),top:Ea(r)}},ja={n:Da,ne:(e,t,n)=>Da(e,Oa(e,t,n)),e:Oa,se:(e,t,n)=>Aa(e,Oa(e,t,n)),s:Aa,sw:(e,t,n)=>Aa(e,ka(e,t)),w:ka,nw:(e,t,n)=>Da(e,ka(e,t))};function Ma(e,t,n,r){let i=ja[e];return i?i(t,{...t,...n},r):n}var Na={type:`transform`,scale:1,calcStyle(e){return ba(e)}},Pa={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},Fa={enabled:!0,bounded:!1,threshold:3},Ia={enabled:!0,handles:[`se`]},La={enabled:!1,defaultItem:{w:1,h:1},touchEnabled:!0,touchDragSource:`[data-rgl-draggable]`};function Ra(e,t,n,r,i){let a=r===`x`?`w`:`h`;t[r]+=1;let o=e.findIndex(e=>e.i===t.i),s=i??ca(e).length>0;for(let i=o+1;it.y+t.h)break;ea(t,o)&&Ra(e,o,n+t[a],r,s)}}t[r]=n}function za(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!ta(e,t);)t.y--;let i;for(;(i=ta(e,t))!==void 0;)Ra(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function Ba(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!ta(e,t);)t.x--;let i;for(;(i=ta(e,t))!==void 0;)if(Ra(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!ta(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Va={type:`vertical`,allowOverlap:!1,compact(e,t){let n=ca(e),r=oa(n),i=ia(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Ya(e,t){let n=Ja(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Xa(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Za(e,t,n,r,i,a){let o=e[n];if(o)return ua(o);let s=e[r],c=Ja(t),l=c.slice(c.indexOf(n));for(let t=0;t{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),eo=e(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),to=e(((e,t)=>{var n=eo();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),no=e(((e,t)=>{t.exports=to()()})),ro=i(no(),1);function io(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&io(e.changedTouches,e=>t===e.identifier)}function ko(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function Ao(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function jo(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??Ao();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +import{a as e,i as t,o as n,r,s as i}from"./useRouter-ByJ6_rwb.js";import{A as a,C as o,D as s,E as c,K as l,M as u,O as d,P as f,Q as p,S as m,T as h,X as g,Y as _,Z as v,_ as y,_t as b,a as x,c as S,d as C,dt as w,f as T,ft as E,g as D,gt as O,h as k,j as A,k as j,lt as M,m as N,mt as P,nt as F,o as I,ot as L,p as ee,r as te,s as ne,st as re,tt as ie,u as ae,ut as R,v as oe,x as z,y as se}from"./brand-DUaZkIz1.js";import{c as ce,h as le,m as ue,s as de}from"./preload-helper-FMCtZeYw.js";import{C as fe,E as pe,b as me,o as he,t as ge,w as _e}from"./Tooltip-B3r3s_B9.js";import{a as ve,c as ye,d as be,i as xe,l as B,n as Se,o as Ce,r as we,s as Te,t as Ee,u as De}from"./dashboard-change-chips-BKnD9tpX.js";import{n as Oe,r as ke,t as Ae}from"./WarningCircle.es-D8T3bcu9.js";import{A as je,At as Me,B as Ne,Bt as Pe,C as Fe,D as Ie,E as Le,F as Re,Ft as ze,Gt as Be,H as Ve,Ht as He,It as Ue,Jt as We,Kt as Ge,L as Ke,Lt as qe,M as Je,Mt as Ye,N as Xe,Nt as Ze,O as Qe,P as $e,Pt as et,T as tt,U as nt,Ut as rt,V as it,Vt as at,Wt as ot,Z as st,_ as ct,a as lt,b as ut,c as dt,d as ft,h as pt,i as mt,j as ht,jt as gt,k as _t,kt as vt,l as yt,m as bt,n as xt,o as St,qt as Ct,r as wt,s as Tt,t as Et,u as Dt,v as Ot,w as kt,x as At,z as jt,zt as Mt}from"./index-A3IfO-3c.js";function Nt(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=Pt(e);if(n.length!==Pt(t).length)return!1;for(let r=0;r{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}var H=r();function It(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Lt(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i{r.current||=window.setTimeout(()=>{i(...e),r.current=null},t)},[t]),o=(0,V.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,V.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function Ht(e){let t=(0,V.useRef)(void 0);return(0,V.useEffect)(()=>{t.current=e},[e]),t.current}function Ut(e,t,n){let r=(0,V.useRef)(null);(0,V.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function Wt(){let[e,t]=(0,V.useState)(!1);return(0,V.useEffect)(()=>t(!0),[]),e}function Gt(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function Kt(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=me(s.borderTopWidth)+me(c.borderTopWidth),u=me(s.borderLeftWidth)+me(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,V.useRef)(null),h=(0,V.useRef)(null);return(0,V.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,V.useEffect)(()=>{if(t){let e=e=>{Xt(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,V.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),Vt(()=>{be()!==`test`&&l(!0)},20,{autoInvoke:!0}),Ut(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var Qt={root:`m_96b553a6`},$t=g((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),en=h(e=>{let t=u(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,target:d,parent:f,transitionDuration:m,mod:h,displayAfterTransitionEnd:g,onTransitionStart:_,onTransitionEnd:v,attributes:y,ref:b,...x}=t,S=p(),C=a({name:`FloatingIndicator`,classes:Qt,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:y,vars:l,varsResolver:$t,stylesCtx:{shouldReduceMotion:S}}),w=(0,V.useRef)(null),{initialized:T,hidden:E}=Zt({target:d,parent:f,ref:w,displayAfterTransitionEnd:g,onTransitionStart:_,onTransitionEnd:v}),D=ie(b,w);return!d||!f?null:(0,H.jsx)(o,{ref:D,mod:[{initialized:T,hidden:E},h],...C(`root`),...x})});en.displayName=`@mantine/core/FloatingIndicator`,en.classes=Qt,en.varsResolver=$t;var[tn,nn]=pe(`Accordion component was not found in the tree`),[rn,an]=pe(`Accordion.Item component was not found in the tree`),on={root:`m_9bdbb667`,panel:`m_df78851f`,content:`m_4ba554d4`,itemTitle:`m_8fa820a0`,control:`m_4ba585b8`,"control--default":`m_6939a5e9`,"control--contained":`m_4271d21b`,label:`m_df3ffa0f`,chevron:`m_3f35ae96`,icon:`m_9bd771fe`,item:`m_9bd7b098`,"item--default":`m_fe19b709`,"item--contained":`m_1f921b3b`,"item--filled":`m_2cdf939a`,"item--separated":`m_9f59b069`},sn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,chevron:s,icon:c,onClick:l,onKeyDown:d,children:f,disabled:p,mod:h,...g}=u(`AccordionControl`,null,e),{value:_}=an(),v=nn(),y=v.isItemActive(_),b=typeof v.order==`number`,x=`h${v.order}`,S=(0,H.jsxs)(m,{...v.getStyles(`control`,{className:n,classNames:t,style:r,styles:i,variant:v.variant}),unstyled:v.unstyled,mod:[`accordion-control`,{active:y,"chevron-position":v.chevronPosition,disabled:p},h],onClick:e=>{l?.(e),v.onChange(_)},type:`button`,disabled:p,"aria-expanded":y,"aria-controls":v.getRegionId(_),id:v.getControlId(_),onKeyDown:ot({siblingSelector:`[data-accordion-control]`,parentSelector:`[data-accordion]`,activateOnFocus:!1,loop:v.loop,orientation:`vertical`,onKeyDown:d}),...g,children:[(0,H.jsx)(o,{component:`span`,mod:{rotate:!v.disableChevronRotation&&y,position:v.chevronPosition},...v.getStyles(`chevron`,{classNames:t,styles:i}),children:s||v.chevron}),(0,H.jsx)(`span`,{...v.getStyles(`label`,{classNames:t,styles:i}),children:f}),c&&(0,H.jsx)(o,{component:`span`,mod:{"chevron-position":v.chevronPosition},...v.getStyles(`icon`,{classNames:t,styles:i}),children:c})]});return b?(0,H.jsx)(x,{...v.getStyles(`itemTitle`,{classNames:t,styles:i}),children:S}):S});sn.displayName=`@mantine/core/AccordionControl`,sn.classes=on;var cn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:s,mod:c,...l}=u(`AccordionItem`,null,e),d=nn();return(0,H.jsx)(rn,{value:{value:s},children:(0,H.jsx)(o,{mod:[{active:d.isItemActive(s)},c],...d.getStyles(`item`,{className:n,classNames:t,styles:i,style:r,variant:d.variant}),...l})})});cn.displayName=`@mantine/core/AccordionItem`,cn.classes=on;var ln=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,keepMounted:s,keepMountedMode:c,...l}=u(`AccordionPanel`,null,e),{value:d}=an(),f=nn();return(0,H.jsx)(De,{...f.getStyles(`panel`,{className:n,classNames:t,style:r,styles:i}),expanded:f.isItemActive(d),transitionDuration:f.transitionDuration??200,role:`region`,id:f.getRegionId(d),"aria-labelledby":f.getControlId(d),keepMounted:s??f.keepMounted,keepMountedMode:c??f.keepMountedMode,...l,children:(0,H.jsx)(`div`,{...f.getStyles(`content`,{classNames:t,styles:i}),children:o})})});ln.displayName=`@mantine/core/AccordionPanel`,ln.classes=on;var un={multiple:!1,loop:!0,disableChevronRotation:!1,disableCollapse:!1,chevronPosition:`right`,variant:`default`,chevronSize:`auto`,chevronIconSize:16,keepMountedMode:`activity`},dn=g((e,{transitionDuration:t,chevronSize:n,radius:r})=>({root:{"--accordion-transition-duration":t===void 0?void 0:`${t}ms`,"--accordion-chevron-size":n===void 0?void 0:P(n),"--accordion-radius":r===void 0?void 0:re(r)}})),fn=c(e=>{let t=u(`Accordion`,un,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,children:d,multiple:f,value:p,defaultValue:m,onChange:h,id:g,loop:_,transitionDuration:v,disableChevronRotation:y,disableCollapse:b,chevronPosition:x,chevronSize:S,order:C,chevron:w,variant:T,radius:E,chevronIconSize:D,attributes:O,keepMounted:k,keepMountedMode:A,...j}=t,M=F(g),[N,P]=He({value:p,defaultValue:m,finalValue:f?[]:null,onChange:h}),I=e=>Array.isArray(N)?N.includes(e):e===N,L=e=>{if(!Array.isArray(N)&&b&&e===N)return;let t=Array.isArray(N)?N.includes(e)?N.filter(t=>t!==e):[...N,e]:e===N?null:e;P(t)},ee=a({name:`Accordion`,classes:on,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:O,vars:l,varsResolver:dn});return(0,H.jsx)(tn,{value:{isItemActive:I,onChange:L,getControlId:Ft(`${M}-control`,`Accordion.Item component was rendered with invalid value or without value`),getRegionId:Ft(`${M}-panel`,`Accordion.Item component was rendered with invalid value or without value`),chevron:w===null?null:w||(0,H.jsx)(Ue,{size:D}),transitionDuration:v,disableChevronRotation:y,chevronPosition:x,order:C,loop:_,getStyles:ee,variant:T,unstyled:c,keepMounted:k,keepMountedMode:A},children:(0,H.jsx)(o,{...ee(`root`),id:M,...j,variant:T,"data-accordion":!0,children:d})})});fn.classes=on,fn.varsResolver=dn,fn.displayName=`@mantine/core/Accordion`,fn.Item=cn,fn.Panel=ln,fn.Control=sn,fn.Chevron=Ue;function pn(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>pn(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function mn(e){return e?e.map(e=>pn(e)):[]}function hn(e){return e.reduce((e,t)=>`group`in t?{...e,...hn(t.items)}:(e[`${t.value}`]=t,e),{})}var gn={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},_n={error:null},vn=g((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":M(t,`combobox-chevron-size`),"--combobox-chevron-color":n?l(n,e):void 0}})),yn=h(e=>{let t=u(`ComboboxChevron`,_n,e),{size:n,error:r,style:i,className:s,classNames:c,styles:l,unstyled:d,vars:f,attributes:p,mod:m,...h}=t,g=a({name:`ComboboxChevron`,classes:gn,props:t,style:i,className:s,classNames:c,styles:l,unstyled:d,vars:f,varsResolver:vn,attributes:p,rootSelector:`chevron`});return(0,H.jsx)(o,{component:`svg`,...h,...g(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},m],children:(0,H.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});yn.classes=gn,yn.varsResolver=vn,yn.displayName=`@mantine/core/ComboboxChevron`;var[bn,xn]=pe(`Combobox component was not found in tree`);function Sn({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,H.jsx)(k.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Sn.displayName=`@mantine/core/ComboboxClearButton`;var Cn=h(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=u(`ComboboxDropdown`,null,e),s=xn();return(0,H.jsx)(qe.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Cn.classes=gn,Cn.displayName=`@mantine/core/ComboboxDropdown`;var wn={refProp:`ref`},Tn=h(e=>{let{children:t,refProp:n,ref:r}=u(`ComboboxDropdownTarget`,wn,e);if(xn(),!w(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,H.jsx)(qe.Target,{ref:r,refProp:n,children:t})});Tn.displayName=`@mantine/core/ComboboxDropdownTarget`;var En=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ComboboxEmpty`,null,e),c=xn();return(0,H.jsx)(o,{...c.getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...s})});En.classes=gn,En.displayName=`@mantine/core/ComboboxEmpty`;function Dn({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=xn(),[c,l]=(0,V.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var On={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},kn=h(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=u(`ComboboxEventsTarget`,On,e),d=v(t);if(!d)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=xn(),p=Dn({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:s});return(0,V.cloneElement)(d,{...p,...l,[n]:ie(c,f.store.targetRef,fe(d))})});kn.displayName=`@mantine/core/ComboboxEventsTarget`;var An=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ComboboxFooter`,null,e),c=xn();return(0,H.jsx)(o,{...c.getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...s,onMouseDown:e=>{e.preventDefault()}})});An.classes=gn,An.displayName=`@mantine/core/ComboboxFooter`;var jn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:s,label:c,id:l,...d}=u(`ComboboxGroup`,null,e),f=xn(),p=F(l),m=c!=null&&c!==!1&&c!==``;return(0,H.jsxs)(o,{role:`group`,"aria-labelledby":m?p:void 0,...f.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...d,children:[m&&(0,H.jsx)(`div`,{id:p,...f.getStyles(`groupLabel`,{classNames:t,styles:i}),children:c}),s]})});jn.classes=gn,jn.displayName=`@mantine/core/ComboboxGroup`;var Mn=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ComboboxHeader`,null,e),c=xn();return(0,H.jsx)(o,{...c.getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...s,onMouseDown:e=>{e.preventDefault()}})});Mn.classes=gn,Mn.displayName=`@mantine/core/ComboboxHeader`;function Nn({value:e,valuesDivider:t=`,`,...n}){return(0,H.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Nn.displayName=`@mantine/core/ComboboxHiddenInput`;var Pn=h(e=>{let t=u(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:s,onClick:c,id:l,active:d,onMouseDown:f,onMouseOver:p,disabled:m,selected:h,mod:g,..._}=t,v=xn(),y=(0,V.useId)(),b=l||y;return(0,H.jsx)(o,{...v.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),"aria-disabled":m||void 0,..._,id:b,mod:[`combobox-option`,{"combobox-active":d,"combobox-disabled":m,"combobox-selected":h},g],role:`option`,onClick:e=>{m?e.preventDefault():(v.onOptionSubmit?.(t.value,t),c?.(e))},onMouseDown:e=>{e.preventDefault(),f?.(e)},onMouseOver:e=>{v.resetSelectionOnOptionHover&&v.store.resetSelectedOption(),p?.(e)}})});Pn.classes=gn,Pn.displayName=`@mantine/core/ComboboxOption`;var Fn=h(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:s,labelledBy:c,...l}=u(`ComboboxOptions`,null,e),d=xn(),f=F(a);return(0,V.useEffect)(()=>{d.store.setListId(f)},[f]),(0,H.jsx)(o,{...d.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...l,id:f,role:`listbox`,"aria-labelledby":c,onMouseDown:e=>{e.preventDefault(),s?.(e)}})});Fn.classes=gn,Fn.displayName=`@mantine/core/ComboboxOptions`;var In={withAriaAttributes:!0,withKeyboardNavigation:!0},Ln=h(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:d,...f}=u(`ComboboxSearch`,In,e),p=xn(),m=p.getStyles(`search`),h=Dn({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,H.jsx)(k,{ref:ie(d,p.store.searchRef),classNames:[{input:m.className},t],styles:[{input:m.style},n],size:l||p.size,...h,...f,__staticSelector:`Combobox`})});Ln.classes=gn,Ln.displayName=`@mantine/core/ComboboxSearch`;var Rn={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},zn=h(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=u(`ComboboxTarget`,Rn,e),d=v(t);if(!d)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=xn(),p=Dn({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:s}),m=(0,V.cloneElement)(d,{...p,...l});return(0,H.jsx)(qe.Target,{refProp:n,ref:ie(c,f.store.targetRef),children:m})});zn.displayName=`@mantine/core/ComboboxTarget`;function Bn(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Vn(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,V.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,V.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,V.useCallback)(()=>{let e=Jt(f.current);Kt(`#${l.current} [data-combobox-selected]`,e)?.removeAttribute(`data-combobox-selected`)},[]),b=(0,V.useCallback)(e=>{let t=Jt(f.current),n=Kt(`#${l.current}`,t),r=n?qt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,V.useCallback)(()=>{let e=Jt(f.current),t=Kt(`#${l.current} [data-combobox-active]`,e);if(t){let n=qt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,V.useCallback)(()=>{let e=Jt(f.current),t=qt(`#${l.current} [data-combobox-option]`,e);return b(Vn(u.current,t,a))},[b,a]),C=(0,V.useCallback)(()=>{let e=Jt(f.current),t=qt(`#${l.current} [data-combobox-option]`,e);return b(Bn(u.current,t,a))},[b,a]),w=(0,V.useCallback)(()=>{let e=Jt(f.current),t=qt(`#${l.current} [data-combobox-option]`,e);return b(Hn(t))},[b]),T=(0,V.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Jt(f.current),r=qt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=Jt(f.current),r=qt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,V.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,V.useCallback)(()=>{let e=Jt(f.current);(qt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,V.useCallback)(e=>{l.current=e},[]),k=(0,V.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,V.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,V.useCallback)(()=>u.current,[]);return(0,V.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var Wn={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Gn=g((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":L(t),"--combobox-option-padding":M(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:P(n),"--combobox-option-fz":L(t),"--combobox-option-padding":M(t,`combobox-option-padding`)}})),Kn=e=>{let t=u(`Combobox`,Wn,e),{classNames:n,styles:r,unstyled:i,children:o,store:s,vars:c,onOptionSubmit:l,onClose:d,size:f,dropdownPadding:p,resetSelectionOnOptionHover:m,__staticSelector:h,readOnly:g,attributes:_,floatingHeight:v,middlewares:y,...b}=t,x=v===`viewport`?{...y,flip:!1,size:{...typeof y?.size==`object`?y.size:{},padding:typeof y?.size==`object`&&y.size.padding!==void 0?y.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=y?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:y,S=Un(),C=s||S,w=a({name:h||`Combobox`,classes:gn,props:t,classNames:n,styles:r,unstyled:i,attributes:_,vars:c,varsResolver:Gn}),T=()=>{d?.(),C.closeDropdown()};return(0,H.jsx)(bn,{value:{getStyles:w,store:C,onOptionSubmit:l,size:f,resetSelectionOnOptionHover:m,readOnly:g,floatingHeight:v},children:(0,H.jsx)(qe,{opened:C.dropdownOpened,...b,middlewares:x,onChange:e=>!e&&T(),withRoles:!1,unstyled:i,children:o})})};Kn.extend=e=>e,Kn.classes=gn,Kn.varsResolver=Gn,Kn.displayName=`@mantine/core/Combobox`,Kn.Target=zn,Kn.Dropdown=Cn,Kn.Options=Fn,Kn.Option=Pn,Kn.Search=Ln,Kn.Empty=En,Kn.Chevron=yn,Kn.Footer=An,Kn.Header=Mn,Kn.EventsTarget=kn,Kn.DropdownTarget=Tn,Kn.Group=jn,Kn.ClearButton=Sn,Kn.HiddenInput=Nn;function qn({children:e,role:t}){let n=(0,V.use)(D);return n?(0,H.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,H.jsx)(H.Fragment,{children:e})}var Jn={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},Yn=Jn;function Xn({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:s,children:c,label:l,description:u,id:d,disabled:f,error:p,size:m,labelPosition:h=`left`,bodyElement:g=`div`,labelElement:_=`label`,variant:v,style:y,vars:b,mod:x,attributes:S,...C}){let w=a({name:e,props:t,className:n,style:y,classes:Jn,classNames:r,styles:i,unstyled:s,attributes:S}),T=u?`${d}-description`:void 0,E=p&&typeof p!=`boolean`?`${d}-error`:void 0;return(0,H.jsx)(o,{...w(`root`),__vars:{"--label-fz":L(m),"--label-lh":M(m,`label-lh`)},mod:[{"label-position":h},x],variant:v,size:m,...C,children:(0,H.jsxs)(o,{component:g,htmlFor:g===`label`?d:void 0,...w(`body`),children:[c,(0,H.jsxs)(`div`,{...w(`labelWrapper`),"data-disabled":f||void 0,children:[l&&(0,H.jsx)(o,{component:_,htmlFor:_===`label`?d:void 0,...w(`label`),"data-disabled":f||void 0,children:l}),u&&(0,H.jsx)(k.Description,{id:T,size:m,__inheritStyles:!1,...w(`description`),children:u}),p&&typeof p!=`boolean`&&(0,H.jsx)(k.Error,{id:E,size:m,__inheritStyles:!1,...w(`error`),children:p})]})]})})}Xn.displayName=`@mantine/core/InlineInput`;function Zn(e){return`group`in e}function Qn({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function er(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Zn(n))er(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function tr(e,t){return Array.isArray(e)?e.includes(t):e===t}function nr({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Zn(e)){let s=tr(r,e.value),c=t&&(s?(0,H.jsx)(ze,{className:gn.optionsDropdownCheckIcon}):n?(0,H.jsx)(`div`,{className:gn.optionsDropdownCheckPlaceholder}):null),l=(0,H.jsxs)(H.Fragment,{children:[i===`left`&&c,(0,H.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,H.jsx)(Kn.Option,{value:e.value,disabled:e.disabled,className:_({[gn.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,H.jsx)(nr,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,H.jsx)(Kn.Group,{label:e.group,children:s})}function rr({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=xn();er(e);let x=typeof i==`string`?(r||Qn)({options:e,search:l?i:``,limit:a??1/0}):e,S=$n(x),C=x.map((e,t)=>(0,H.jsx)(nr,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Zn(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,H.jsx)(Kn.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,H.jsxs)(Kn.Options,{labelledBy:g,"aria-label":y,children:[c?(0,H.jsx)(he.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,H.jsx)(Kn.Empty,{children:m})]})})}function ir(e,t,n,r){if(t===n||r===`before`&&n===t+1||r===`after`&&n===t-1)return e;let i=e.slice(),[a]=i.splice(t,1),o=t{let t=e.lastElementChild;return t?t instanceof HTMLInputElement?t:t.querySelector(`input`):null},or=(e,t)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{let e=i.current;e&&(i.current=null,or(o.current,e.expectedValue)&&e.container?.querySelector(`[data-mantine-pill-index="${e.index}"]`)?.focus())});let s=(0,V.useCallback)(e=>{a.current=e},[]);return{getPillProps:e=>{if(n)return{draggable:!0,tabIndex:-1,"data-mantine-pill-index":e,"aria-keyshortcuts":`Alt+ArrowLeft Alt+ArrowRight`,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onDragStart:t=>{t.stopPropagation(),t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,String(e)),r.current.draggedIndex=e;let n=t.currentTarget,i=n.getBoundingClientRect(),a=n.cloneNode(!0);a.removeAttribute(`data-dragging`),a.removeAttribute(`data-drag-over`),a.style.position=`fixed`,a.style.top=`-9999px`,a.style.left=`-9999px`,a.style.width=`${i.width}px`,a.style.height=`${i.height}px`,a.style.pointerEvents=`none`,document.body.appendChild(a),t.dataTransfer.setDragImage(a,t.clientX-i.left,t.clientY-i.top),setTimeout(()=>a.parentNode?.removeChild(a),0),requestAnimationFrame(()=>{n.setAttribute(`data-dragging`,`true`)})},onDragOver:t=>{let{draggedIndex:n}=r.current;if(n===null||n===e)return;let i=t.currentTarget,a=i.getBoundingClientRect(),o=t.clientX-a.left,s=(getComputedStyle(i).direction===`rtl`?o>a.width/2:o{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||(t.removeAttribute(`data-drag-over`),r.current.currentDropTarget===t&&(r.current.currentDropTarget=null))},onDrop:n=>{n.preventDefault(),n.stopPropagation();let i=n.currentTarget,a=i.getAttribute(`data-drag-over`);i.removeAttribute(`data-drag-over`);let{draggedIndex:s}=r.current;if(s!==null&&a&&s!==e){let n=ir(o.current,s,e,a);n!==o.current&&t(n)}r.current.draggedIndex=null,r.current.currentDropTarget=null},onDragEnd:e=>{e.currentTarget.removeAttribute(`data-dragging`);let t=r.current.currentDropTarget;t&&t.removeAttribute(`data-drag-over`),r.current.draggedIndex=null,r.current.currentDropTarget=null},onKeyDown:n=>{if(n.key!==`ArrowLeft`&&n.key!==`ArrowRight`)return;let r=n.currentTarget,a=getComputedStyle(r).direction===`rtl`?n.key===`ArrowLeft`:n.key===`ArrowRight`,s=a?e+1:e-1;if(n.altKey){if(s<0||s>=o.current.length)return;n.preventDefault(),n.stopPropagation();let c=a?`after`:`before`,l=ir(o.current,e,s,c);if(l===o.current)return;i.current={container:r.parentElement,index:s,expectedValue:l},t(l);return}if(s<0)return;let c=r.parentElement;if(c){if(n.preventDefault(),n.stopPropagation(),s>=o.current.length){ar(c)?.focus();return}c.querySelector(`[data-mantine-pill-index="${s}"]`)?.focus()}}}},getListProps:()=>n?{ref:s}:{},handleInputKeyDown:e=>{if(!n||e.key!==`ArrowLeft`)return;let t=e.currentTarget;if(!(t.value.length===0||t.selectionStart===0&&t.selectionEnd===0))return;let r=a.current;if(!r)return;let i=r.querySelectorAll(`[data-mantine-pill-index]`);i.length!==0&&(e.preventDefault(),i[i.length-1].focus())}}}function cr({id:e,label:t,labelProps:n,inputWrapperOrder:r}){if(t&&(!r||r.includes(`label`)))return n?.id||`${e}-label`}function lr(e){let t=e.currentTarget;return Jt(t).activeElement!==t}var ur=(0,V.createContext)(null),dr={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},fr=(0,V.createContext)(null),pr=g((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?M(n,`pg-gap`):M(t)}})),mr=h(e=>{let t=u(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,size:d,disabled:f,attributes:p,...m}=t,h=(0,V.use)(ur)?.size||d||void 0,g=a({name:`PillGroup`,classes:dr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:p,vars:l,varsResolver:pr,stylesCtx:{size:h},rootSelector:`group`});return(0,H.jsx)(fr,{value:{size:h,disabled:f},children:(0,H.jsx)(o,{size:h,...g(`group`),...m})})});mr.classes=dr,mr.varsResolver=pr,mr.displayName=`@mantine/core/PillGroup`;var hr={variant:`default`},gr=g((e,{radius:t},{size:n})=>({root:{"--pill-fz":M(n,`pill-fz`),"--pill-height":M(n,`pill-height`),"--pill-radius":t===void 0?void 0:re(t)}})),_r=h(e=>{let t=u(`Pill`,hr,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,variant:d,children:f,withRemoveButton:p,onRemove:m,removeButtonProps:h,radius:g,size:_,disabled:v,mod:y,attributes:b,...x}=t,S=(0,V.use)(fr),C=(0,V.use)(ur),w=_||S?.size||void 0,T=C?.variant===`filled`?`contrast`:d||`default`,E=a({name:`Pill`,classes:dr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:b,vars:l,varsResolver:gr,stylesCtx:{size:w}});return(0,H.jsxs)(o,{component:`span`,variant:T,size:w,...E(`root`,{variant:T}),mod:[{"with-remove":p&&!v,disabled:v||S?.disabled},y],...x,children:[(0,H.jsx)(`span`,{...E(`label`),children:f}),p&&(0,H.jsx)(oe,{variant:`transparent`,radius:g,tabIndex:-1,"aria-hidden":!0,unstyled:c,...h,...E(`remove`,{className:h?.className,style:h?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),h?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),m?.(),h?.onClick?.(e)}})]})});_r.classes=dr,_r.varsResolver=gr,_r.displayName=`@mantine/core/Pill`,_r.Group=mr;var vr={field:`m_45c4369d`},yr={type:`visible`},br=h(e=>{let t=u(`PillsInputField`,yr,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,type:d,disabled:f,id:p,pointer:m,mod:h,attributes:g,ref:_,...v}=t,y=(0,V.use)(ur),b=(0,V.use)(D),x=a({name:`PillsInputField`,classes:vr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:g,rootSelector:`field`}),S=f||y?.disabled;return(0,H.jsx)(o,{component:`input`,ref:ie(_,y?.fieldRef),"data-type":d,disabled:S,mod:[{disabled:S,pointer:m},h],...x(`field`),...v,id:b?.inputId||p,"aria-invalid":y?.hasError,"aria-describedby":b?.describedBy,type:`text`,onMouseDown:e=>!m&&e.stopPropagation()})});br.classes=vr,br.displayName=`@mantine/core/PillsInputField`;var xr={size:`sm`},Sr=h(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=u([`Input`,`InputWrapper`,`PillsInput`],xr,e),d=(0,V.useRef)(null);return(0,H.jsx)(ur,{value:{fieldRef:d,size:i,disabled:a,hasError:!!s,variant:c},children:(0,H.jsx)(N,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),d.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(d.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});Sr.displayName=`@mantine/core/PillsInput`,Sr.classes=N.classes,Sr.Field=br;function Cr(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}function wr(e){return typeof e==`string`?e.trim().toLowerCase():e}function Tr({data:e,value:t}){let n=t.map(wr);return e.reduce((e,t)=>(Zn(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(wr(e.value))===-1)}):n.indexOf(wr(t.value))===-1&&e.push(t),e),[])}var Er={xs:41,sm:50,md:60,lg:72,xl:89},Dr={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},Or=c(e=>{let t=u([`Input`,`InputWrapper`,`MultiSelect`],Dr,e),{classNames:n,className:r,style:i,styles:o,unstyled:s,vars:c,size:l,value:f,defaultValue:p,onChange:m,onKeyDown:h,variant:g,data:_,dropdownOpened:v,defaultDropdownOpened:y,onDropdownOpen:b,onDropdownClose:x,selectFirstOptionOnChange:S,selectFirstOptionOnDropdownOpen:C,onOptionSubmit:w,comboboxProps:T,filter:E,limit:D,withScrollArea:O,maxDropdownHeight:k,floatingHeight:j,searchValue:M,defaultSearchValue:N,onSearchChange:P,readOnly:I,disabled:L,onFocus:ee,onBlur:te,radius:ne,rightSection:re,rightSectionWidth:ie,rightSectionPointerEvents:ae,rightSectionProps:R,leftSection:oe,leftSectionWidth:z,leftSectionPointerEvents:se,leftSectionProps:ce,inputContainer:le,inputWrapperOrder:ue,withAsterisk:de,labelProps:fe,descriptionProps:pe,errorProps:me,successProps:he,wrapperProps:ge,description:_e,label:ve,error:ye,success:be,maxValues:xe,searchable:B,nothingFoundMessage:Se,withCheckIcon:Ce,withAlignedLabels:we,checkIconPosition:Te,hidePickedOptions:Ee,withErrorStyles:De,withSuccessStyles:Oe,name:ke,form:Ae,id:je,clearable:Me,clearSectionMode:Ne,clearButtonProps:Pe,hiddenInputProps:Fe,placeholder:Ie,hiddenInputValuesDivider:Le,required:Re,mod:ze,renderOption:Be,renderPill:Ve,onRemove:Ue,onClear:We,onMaxValues:Ge,scrollAreaProps:Ke,chevronColor:qe,attributes:Je,clearSearchOnChange:Ye,openOnFocus:Xe,loading:Ze,loadingPosition:Qe,withPillsReorder:$e,...et}=t,tt=F(je),nt=cr({id:tt,label:ve,labelProps:fe,inputWrapperOrder:ue}),rt=mn(_),it=hn(rt),at=(0,V.useRef)({}),ot=Un({opened:v,defaultOpened:y,onDropdownOpen:()=>{b?.(),C&&ot.selectFirstOption()},onDropdownClose:()=>{x?.(),ot.resetSelectedOption()}}),{styleProps:st,rest:{type:ct,autoComplete:lt,...ut}}=d(et),[dt,ft]=He({value:f,defaultValue:p,finalValue:[],onChange:m}),{getPillProps:pt,getListProps:mt,handleInputKeyDown:ht}=sr({value:dt,onChange:ft,enabled:$e&&!L&&!I}),[gt,_t]=He({value:M,defaultValue:N,finalValue:``,onChange:P}),vt=e=>{_t(e),ot.resetSelectedOption()},yt=a({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:o,unstyled:s,attributes:Je}),{resolvedClassNames:bt,resolvedStyles:xt}=A({props:t,styles:o,classNames:n}),St=e=>{h?.(e),!e.defaultPrevented&&(e.key===` `&&!B&&(e.preventDefault(),ot.toggleDropdown()),e.key===`Backspace`&>.length===0&&dt.length>0&&!I&&(Ue?.(dt[dt.length-1]),ft(dt.slice(0,dt.length-1))),ht(e))},Ct=dt.map((e,t)=>{let n=it[`${e}`]||at.current[`${e}`],r=pt(t);return Ve?(0,H.jsx)(V.Fragment,{children:Ve({option:n,value:e,onRemove:()=>{ft(dt.filter(t=>e!==t)),Ue?.(e)},disabled:L,reorderProps:r})},`${e}-${t}`):(0,H.jsx)(_r,{withRemoveButton:!I&&!it[`${e}`]?.disabled,onRemove:()=>{ft(dt.filter(t=>e!==t)),Ue?.(e)},unstyled:s,disabled:L,...yt(`pill`),...r,children:n?.label||e},`${e}-${t}`)});(0,V.useEffect)(()=>{S&&ot.selectFirstOption()},[S,gt]),(0,V.useEffect)(()=>{dt.forEach(e=>{`${e}`in it&&(at.current[`${e}`]=it[`${e}`])})},[it,dt]);let wt=(0,H.jsx)(Kn.ClearButton,{...Pe,onClear:()=>{We?.(),ft([]),vt(``)}}),Tt=Tr({data:rt,value:dt}),Et=Me&&dt.length>0&&!L&&!I,Dt=Et?{paddingInlineEnd:Er[l]??Er.sm}:void 0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Kn,{store:ot,classNames:bt,styles:xt,unstyled:s,size:l,readOnly:I,__staticSelector:`MultiSelect`,attributes:Je,floatingHeight:j,onOptionSubmit:e=>{w?.(e),Ye&&vt(``),ot.updateSelectedOptionIndex(`selected`),dt.includes(it[`${e}`].value)?(ft(dt.filter(t=>t!==it[`${e}`].value)),Ue?.(it[`${e}`].value)):dt.lengthB?ot.openDropdown():ot.toggleDropdown(),"data-expanded":ot.dropdownOpened||void 0,id:tt,required:Re,mod:ze,attributes:Je,children:(0,H.jsxs)(_r.Group,{attributes:Je,disabled:L,unstyled:s,...yt(`pillsList`,{style:Dt}),...mt(),children:[Ct,(0,H.jsx)(Kn.EventsTarget,{autoComplete:lt,withExpandedAttribute:!0,children:(0,H.jsx)(Sr.Field,{...ut,id:tt,placeholder:Ie,type:!B&&!Ie?`hidden`:`visible`,...yt(`inputField`),unstyled:s,onFocus:e=>{ee?.(e),Xe&&B&&ot.openDropdown()},onBlur:e=>{te?.(e),ot.closeDropdown(),vt(``)},onKeyDown:St,value:gt,onChange:e=>{if(lr(e)){if(!I){let t=Cr(it,e.currentTarget.value);t&&!dt.includes(t.value)&&dt.length{let{classNames:t,className:n,style:r,styles:i,vars:a,...s}=u(`ProgressLabel`,null,e),c=Ar();return(0,H.jsx)(o,{...c.getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...s})});Mr.classes=jr,Mr.displayName=`@mantine/core/ProgressLabel`;var Nr=g((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":M(t,`progress-size`),"--progress-radius":n===void 0?void 0:re(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),Pr=h(e=>{let t=u(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,autoContrast:d,transitionDuration:f,orientation:p,attributes:m,mod:h,...g}=t,_=a({name:`Progress`,classes:jr,props:t,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:m,vars:l,varsResolver:Nr});return(0,H.jsx)(kr,{value:{getStyles:_,autoContrast:d},children:(0,H.jsx)(o,{mod:[{orientation:p},h],..._(`root`),...g})})});Pr.classes=jr,Pr.varsResolver=Nr,Pr.displayName=`@mantine/core/ProgressRoot`;var Fr={withAria:!0},Ir=h(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,value:s,withAria:c,color:d,striped:p,animated:m,mod:h,...g}=u(`ProgressSection`,Fr,e),_=Ar(),v=f(),y=c?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,"aria-valuetext":`${s}%`}:{};return(0,H.jsx)(o,{..._.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...g,...y,mod:[{striped:p||m,animated:m},h],__vars:{"--progress-section-size":`${s}%`,"--progress-section-color":l(d,v),"--progress-label-color":Yt(_.autoContrast,v)?at({color:d,theme:v,autoContrast:_.autoContrast}):void 0}})});Ir.classes=jr,Ir.displayName=`@mantine/core/ProgressSection`;var Lr=h(e=>{let t=u(`Progress`,null,e),{value:n,classNames:r,styles:i,vars:a,color:o,striped:s,animated:c,"aria-label":l,...d}=t,{resolvedClassNames:f,resolvedStyles:p}=A({classNames:r,styles:i,props:t});return(0,H.jsx)(Pr,{classNames:f,styles:p,vars:a,...d,children:(0,H.jsx)(Ir,{value:n,color:o,striped:s,animated:c,"aria-label":l})})});Lr.classes=jr,Lr.displayName=`@mantine/core/Progress`,Lr.Section=Ir,Lr.Root=Pr,Lr.Label=Mr;var Rr={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},zr={withItemsBorders:!0},Br=g((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:re(t),"--sc-color":n?l(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":M(i,`sc-padding`),"--sc-font-size":L(i)}})),Vr=c(e=>{let t=u(`SegmentedControl`,zr,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,data:d,value:p,defaultValue:m,onChange:h,size:g,name:_,disabled:v,readOnly:y,fullWidth:b,orientation:x,radius:S,color:C,transitionDuration:w,transitionTimingFunction:T,variant:E,autoContrast:D,withItemsBorders:O,mod:k,attributes:A,ref:j,...M}=t,N=a({name:`SegmentedControl`,props:t,classes:Rr,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:A,vars:l,varsResolver:Br}),P=f(),I=d.map(e=>Gt(e)?{label:`${e}`,value:e}:e),L=Wt(),[ee,te]=(0,V.useState)(0),[ne,re]=(0,V.useState)(null),[ae,R]=(0,V.useState)({}),oe=(e,t)=>{e!==null&&ae[t]!==e&&(ae[t]=e,R({...ae}))},[z,se]=He({value:p,defaultValue:m,finalValue:Array.isArray(d)?I.find(e=>!e.disabled)?.value??d[0]?.value??null:null,onChange:h}),ce=F(_),le=I.map(e=>`${e.value}`),ue=I.map(e=>(0,V.createElement)(o,{...N(`control`),mod:{active:z===e.value,orientation:x},key:`${e.value}`},(0,V.createElement)(`input`,{...N(`input`),disabled:v||e.disabled,type:`radio`,name:ce,value:`${e.value}`,id:`${ce}-${e.value}`,checked:z===e.value,onChange:()=>!y&&se(e.value),"data-focus-ring":P.focusRing,key:`${e.value}-input`}),(0,V.createElement)(o,{component:`label`,...N(`label`),mod:{active:z===e.value&&!(v||e.disabled),disabled:v||e.disabled,"read-only":y},htmlFor:`${ce}-${e.value}`,ref:t=>oe(t,`${e.value}`),__vars:{"--sc-label-color":C===void 0?void 0:at({color:C,theme:P,autoContrast:D})},key:`${e.value}-label`},(0,H.jsx)(`span`,{...N(`innerLabel`),children:e.label})))),de=ie(j,re);return Bt(()=>{te(e=>e+1)},[d.length]),Bt(()=>{R(e=>{let t={};return le.forEach(n=>{n in e&&(t[n]=e[n])}),Object.keys(t).length===Object.keys(e).length?e:t})},[le]),d.length===0?null:(0,H.jsxs)(o,{...N(`root`),variant:E,size:g,ref:de,mod:[{"full-width":b,orientation:x,initialized:L,"with-items-borders":O},k],...M,role:`radiogroup`,"data-disabled":v,children:[z!==void 0&&(0,H.jsx)(en,{target:ae[`${z}`],parent:ne,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...N(`indicator`)},ee),ue]})});Vr.classes=Rr,Vr.varsResolver=Br,Vr.displayName=`@mantine/core/SegmentedControl`;var Hr={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},Ur=c(e=>{let t=u([`Input`,`InputWrapper`,`Select`],Hr,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:b,comboboxProps:x,readOnly:S,disabled:C,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,searchable:j,rightSection:M,checkIconPosition:P,withCheckIcon:I,withAlignedLabels:L,nothingFoundMessage:ee,name:te,form:ne,searchValue:re,defaultSearchValue:ie,onSearchChange:ae,allowDeselect:R,error:oe,rightSectionPointerEvents:z,id:se,clearable:ce,clearSectionMode:le,clearButtonProps:ue,hiddenInputProps:de,renderOption:fe,onClear:pe,autoComplete:me,scrollAreaProps:he,__defaultRightSection:ge,__clearSection:_e,__clearable:ve,chevronColor:ye,autoSelectOnBlur:be,openOnFocus:xe,attributes:B,...Se}=t,Ce=(0,V.useMemo)(()=>mn(h),[h]),we=(0,V.useRef)({}),Te=(0,V.useMemo)(()=>hn(Ce),[Ce]),Ee=F(se),De=cr({id:Ee,label:Se.label,labelProps:Se.labelProps,inputWrapperOrder:Se.inputWrapperOrder}),[Oe,ke,Ae]=He({value:g,defaultValue:_,finalValue:null,onChange:m}),je=Oe==null?void 0:`${Oe}`in Te?Te[`${Oe}`]:we.current[`${Oe}`],Me=Ht(je),[Ne,Pe,Fe]=He({value:re,defaultValue:ie,finalValue:je?je.label:``,onChange:ae}),Ie=Un({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),y?Ie.selectFirstOption():Ie.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Ie.resetSelectedOption,0)}}),Le=e=>{Pe(e),Ie.resetSelectedOption()},{resolvedClassNames:Re,resolvedStyles:ze}=A({props:t,styles:r,classNames:n});(0,V.useEffect)(()=>{v&&Ie.selectFirstOption()},[v,Ne]),(0,V.useEffect)(()=>{g===null&&Le(``),g!=null&&je&&(Me?.value!==je.value||Me?.label!==je.label)&&Le(je.label)},[g,je]),(0,V.useEffect)(()=>{!Ae&&!Fe&&Le(Oe==null?``:`${Oe}`in Te?Te[`${Oe}`]?.label:we.current[`${Oe}`]?.label||``)},[Te,Oe]),(0,V.useEffect)(()=>{Oe&&`${Oe}`in Te&&(we.current[`${Oe}`]=Te[`${Oe}`])},[Te,Oe]);let Be=(0,H.jsx)(Kn.ClearButton,{...ue,onClear:()=>{ke(null,null),Le(``),pe?.()}}),Ve=ce&&Oe!=null&&!C&&!S;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Kn,{store:Ie,__staticSelector:`Select`,classNames:Re,styles:ze,unstyled:i,readOnly:S,size:k,attributes:B,floatingHeight:O,keepMounted:be,onOptionSubmit:e=>{b?.(e);let t=R&&`${Te[e].value}`==`${Oe}`?null:Te[e],n=t?t.value:null;n!==Oe&&ke(n,t),!Ae&&Le(n==null?``:t?.label||``),Ie.closeDropdown()},...x,children:[(0,H.jsx)(Kn.Target,{targetType:j?`input`:`button`,autoComplete:me,withExpandedAttribute:!0,children:(0,H.jsx)(N,{id:Ee,__defaultRightSection:(0,H.jsx)(Kn.Chevron,{size:k,error:oe,unstyled:i,color:ye}),__clearSection:Be,__clearable:Ve,__clearSectionMode:le,rightSection:M,rightSectionPointerEvents:z||`none`,...Se,size:k,__staticSelector:`Select`,disabled:C,readOnly:S||!j,value:Ne,onChange:e=>{if(lr(e)){if(!S){let t=Cr(Te,e.currentTarget.value);t&&`${t.value}`!=`${Oe}`&&(ke(t.value,t),!Ae&&Le(t.label))}return}Le(e.currentTarget.value),Ie.openDropdown(),v&&Ie.selectFirstOption()},onFocus:e=>{xe&&j&&Ie.openDropdown(),d?.(e)},onBlur:e=>{be&&Ie.clickSelectedOption(),Ie.closeDropdown();let t=Oe!=null&&(`${Oe}`in Te?Te[`${Oe}`]:we.current[`${Oe}`]);Le(t&&t.label||``),f?.(e)},onClick:e=>{j?Ie.openDropdown():Ie.toggleDropdown(),p?.(e)},classNames:Re,styles:ze,unstyled:i,pointer:!j,error:oe,attributes:B})}),(0,H.jsx)(rr,{data:Ce,hidden:S||C,filter:w,search:Ne,limit:T,hiddenWhenEmpty:!ee,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!j&&je?.label!==Ne,value:Oe,checkIconPosition:P,withCheckIcon:I,withAlignedLabels:L,nothingFoundMessage:ee,unstyled:i,labelId:De,"aria-label":De?void 0:Se[`aria-label`],renderOption:fe,scrollAreaProps:he})]}),(0,H.jsx)(Kn.HiddenInput,{value:Oe,name:te,form:ne,disabled:C,...de})]})});Ur.classes={...N.classes,...Kn.classes},Ur.displayName=`@mantine/core/Select`;function Wr(e){if(e!==void 0)return typeof e==`number`?P(e):e}function Gr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=f(),s=t===void 0?e:t,c=r!==void 0,l=E({"--sg-spacing-x":R(It(e)),"--sg-spacing-y":R(It(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":Wr(r)}:{"--sg-cols":It(n)?.toString()}}),u=O(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=R(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=R(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{}),d=rt(O(u),o.breakpoints).filter(e=>O(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]}));return(0,H.jsx)(j,{styles:l,media:d,selector:a})}function Kr(e){return typeof e==`object`&&e?O(e):[]}function qr(e){return e.sort((e,t)=>Be(e)-Be(t))}function Jr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return qr(Array.from(new Set([...Kr(e),...Kr(t),...r===void 0?Kr(n):[]])))}function Yr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=E({"--sg-spacing-x":R(It(e)),"--sg-spacing-y":R(It(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":Wr(r)}:{"--sg-cols":It(n)?.toString()}}),l=Jr({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=R(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=R(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{}),d=l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]}));return(0,H.jsx)(j,{styles:c,container:d,selector:a})}var Xr={container:`m_925c2d2c`,root:`m_2415a157`},Zr={cols:1,spacing:`md`,type:`media`},Qr=h(e=>{let t=u(`SimpleGrid`,Zr,e),{classNames:n,className:r,style:i,styles:c,unstyled:l,vars:d,cols:f,verticalSpacing:p,spacing:m,type:h,minColWidth:g,autoFlow:_,autoRows:v,attributes:y,...b}=t,x=a({name:`SimpleGrid`,classes:Xr,props:t,className:r,style:i,classNames:n,styles:c,unstyled:l,attributes:y,vars:d}),S=s(),C=g===void 0?void 0:_||`auto-fill`;return h===`container`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Yr,{...t,selector:`.${S}`}),(0,H.jsx)(`div`,{...x(`container`),children:(0,H.jsx)(o,{...x(`root`,{className:S}),...b,"data-auto-cols":C})})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Gr,{...t,selector:`.${S}`}),(0,H.jsx)(o,{...x(`root`,{className:S}),...b,"data-auto-cols":C})]})});Qr.classes=Xr,Qr.displayName=`@mantine/core/SimpleGrid`;var $r=(0,V.createContext)(null),ei={hiddenInputValuesSeparator:`,`},ti=c((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:d,maxSelectedValues:f,disabled:p,...m}=u(`SwitchGroup`,ei,e),[h,g]=He({value:t,defaultValue:n,finalValue:[],onChange:r}),_=e=>{let t=e.currentTarget.value;if(s)return;let n=h.includes(t);!n&&f&&h.length>=f||g(n?h.filter(e=>e!==t):[...h,t])},v=e=>{if(p)return!0;if(!f)return!1;let t=h.includes(e),n=h.length>=f;return!t&&n},y=h.join(l);return(0,H.jsx)($r,{value:{value:h,onChange:_,size:i,isDisabled:v},children:(0,H.jsxs)(k.Wrapper,{size:i,...a,...m,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,H.jsx)(qn,{role:`group`,children:o}),(0,H.jsx)(`input`,{type:`hidden`,name:c,value:y,...d})]})})}));ti.classes=k.Wrapper.classes,ti.displayName=`@mantine/core/SwitchGroup`;var ni={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},ri={labelPosition:`right`,withThumbIndicator:!0},ii=g((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:re(t),"--switch-height":M(r,`switch-height`),"--switch-width":M(r,`switch-width`),"--switch-thumb-size":M(r,`switch-thumb-size`),"--switch-label-font-size":M(r,`switch-label-font-size`),"--switch-track-label-padding":M(r,`switch-track-label-padding`),"--switch-color":n?l(n,e):void 0}})),ai=h(e=>{let t=u(`Switch`,ri,e),{classNames:n,className:r,style:i,styles:s,unstyled:c,vars:l,color:f,label:p,offLabel:m,onLabel:h,id:g,size:_,radius:v,wrapperProps:y,thumbIcon:b,checked:x,defaultChecked:S,onChange:C,labelPosition:w,description:T,error:E,disabled:D,variant:O,rootRef:k,mod:A,withThumbIndicator:j,attributes:M,...N}=t,P=(0,V.use)($r),I=_||P?.size,L=a({name:`Switch`,props:t,classes:ni,className:r,style:i,classNames:n,styles:s,unstyled:c,attributes:M,vars:l,varsResolver:ii}),{styleProps:ee,rest:te}=d(N),ne=F(g),re=[T?`${ne}-description`:void 0,E&&typeof E!=`boolean`?`${ne}-error`:void 0,te[`aria-describedby`]].filter(Boolean).join(` `)||void 0,ie={checked:P?.value.includes(te.value)??x,onChange:e=>{P?.onChange(e),C?.(e)}},ae=D||P?.isDisabled?.(te.value),[R,oe]=He({value:ie.checked??x,defaultValue:S,finalValue:!1});return(0,H.jsxs)(Xn,{...L(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:ne,size:I,labelPosition:w,label:p,description:T,error:E,disabled:ae,bodyElement:`label`,labelElement:`span`,classNames:n,styles:s,unstyled:c,"data-checked":ie.checked,variant:O,ref:k,mod:A,attributes:M,inert:te.inert,...ee,...y,children:[(0,H.jsx)(`input`,{...te,...ie,disabled:ae,checked:R,"data-checked":ie.checked,onChange:e=>{ie.onChange?.(e),oe(e.currentTarget.checked)},id:ne,type:`checkbox`,role:`switch`,inert:te.inert,"aria-describedby":re,...L(`input`)}),(0,H.jsxs)(o,{"aria-hidden":`true`,component:`span`,mod:{error:E,"label-position":w,"without-labels":!h&&!m},...L(`track`),children:[(0,H.jsx)(o,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":j&&!b},...L(`thumb`),children:b}),(0,H.jsx)(`span`,{...L(`trackLabel`),children:R?h:m})]})]})});ai.classes={...ni,...Yn},ai.varsResolver=ii,ai.displayName=`@mantine/core/Switch`,ai.Group=ti;var oi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),si=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z`}))]]),ci=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-35.51,35.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM95.51,143.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l35.52-35.51a12,12,0,0,0-17-17ZM208,148a12,12,0,0,0-12,12v19l-35.51-35.52a12,12,0,0,0-17,17L179,196H160a12,12,0,0,0,0,24h48a12,12,0,0,0,12-12V160A12,12,0,0,0,208,148ZM77,60H96a12,12,0,0,0,0-24H48A12,12,0,0,0,36,48V96a12,12,0,0,0,24,0V77l35.51,35.52a12,12,0,0,0,17-17Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M208,48V208H48V48Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-42.34,42.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM98.34,146.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l42.35-42.34a8,8,0,0,0-11.32-11.32ZM208,152a8,8,0,0,0-8,8v28.69l-42.34-42.35a8,8,0,0,0-11.32,11.32L188.69,200H160a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152ZM67.31,56H96a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31l42.34,42.35a8,8,0,0,0,11.32-11.32Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M109.66,146.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l26.34-26.35A8,8,0,0,1,109.66,146.34ZM83.31,72l18.35-18.34A8,8,0,0,0,96,40H48a8,8,0,0,0-8,8V96a8,8,0,0,0,13.66,5.66L72,83.31l26.34,26.35a8,8,0,0,0,11.32-11.32ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72,146.34,98.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Zm3.06,112.61a8,8,0,0,0-8.72,1.73L184,172.69l-26.34-26.35a8,8,0,0,0-11.32,11.32L172.69,184l-18.35,18.34A8,8,0,0,0,160,216h48a8,8,0,0,0,8-8V160A8,8,0,0,0,211.06,152.61Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-45.76,45.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM99.76,147.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l45.76-45.76a6,6,0,0,0-8.48-8.48ZM208,154a6,6,0,0,0-6,6v33.52l-45.76-45.76a6,6,0,0,0-8.48,8.48L193.52,202H160a6,6,0,0,0,0,12h48a6,6,0,0,0,6-6V160A6,6,0,0,0,208,154ZM62.48,54H96a6,6,0,0,0,0-12H48a6,6,0,0,0-6,6V96a6,6,0,0,0,12,0V62.48l45.76,45.76a6,6,0,0,0,8.48-8.48Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-42.34,42.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM98.34,146.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l42.35-42.34a8,8,0,0,0-11.32-11.32ZM208,152a8,8,0,0,0-8,8v28.69l-42.34-42.35a8,8,0,0,0-11.32,11.32L188.69,200H160a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152ZM67.31,56H96a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31l42.34,42.35a8,8,0,0,0,11.32-11.32Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-49.17,49.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM101.17,149.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l49.17-49.17a4,4,0,0,0-5.66-5.66ZM208,156a4,4,0,0,0-4,4v38.34l-49.17-49.17a4,4,0,0,0-5.66,5.66L198.34,204H160a4,4,0,0,0,0,8h48a4,4,0,0,0,4-4V160A4,4,0,0,0,208,156ZM57.66,52H96a4,4,0,0,0,0-8H48a4,4,0,0,0-4,4V96a4,4,0,0,0,8,0V57.66l49.17,49.17a4,4,0,0,0,5.66-5.66Z`}))]]),li=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216.49,168.49a12,12,0,0,1-17,0L128,97,56.49,168.49a12,12,0,0,1-17-17l80-80a12,12,0,0,1,17,0l80,80A12,12,0,0,1,216.49,168.49Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M208,160H48l80-80Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M213.66,154.34l-80-80a8,8,0,0,0-11.32,0l-80,80A8,8,0,0,0,48,168H208a8,8,0,0,0,5.66-13.66ZM67.31,152,128,91.31,188.69,152Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M215.39,163.06A8,8,0,0,1,208,168H48a8,8,0,0,1-5.66-13.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,215.39,163.06Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M210.83,162.83a4,4,0,0,1-5.66,0L128,85.66,50.83,162.83a4,4,0,0,1-5.66-5.66l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,210.83,162.83Z`}))]]),ui=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M172,108a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,108Zm-12,28H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Zm76-8A108,108,0,0,1,78.77,224.15L46.34,235A20,20,0,0,1,21,209.66l10.81-32.43A108,108,0,1,1,236,128Zm-24,0A84,84,0,1,0,55.27,170.06a12,12,0,0,1,1,9.81l-9.93,29.79,29.79-9.93a12.1,12.1,0,0,1,3.8-.62,12,12,0,0,1,6,1.62A84,84,0,0,0,212,128Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128A96,96,0,0,1,79.93,211.11h0L42.54,223.58a8,8,0,0,1-10.12-10.12l12.47-37.39h0A96,96,0,1,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm0,192a87.87,87.87,0,0,1-44.06-11.81,8,8,0,0,0-4-1.08,7.85,7.85,0,0,0-2.53.42L40,216,52.47,178.6a8,8,0,0,0-.66-6.54A88,88,0,1,1,128,216Zm40-104a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,112Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,144Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,0,0,36.18,176.88L24.83,210.93a16,16,0,0,0,20.24,20.24l34.05-11.35A104,104,0,1,0,128,24Zm32,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M166,112a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,112Zm-6,26H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm70-10A102,102,0,0,1,79.31,217.65L44.44,229.27a14,14,0,0,1-17.71-17.71l11.62-34.87A102,102,0,1,1,230,128Zm-12,0A90,90,0,1,0,50.08,173.06a6,6,0,0,1,.5,4.91L38.12,215.35a2,2,0,0,0,2.53,2.53L78,205.42a6.2,6.2,0,0,1,1.9-.31,6.09,6.09,0,0,1,3,.81A90,90,0,0,0,218,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M168,112a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,112Zm-8,24H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm72-8A104,104,0,0,1,79.12,219.82L45.07,231.17a16,16,0,0,1-20.24-20.24l11.35-34.05A104,104,0,1,1,232,128Zm-16,0A88,88,0,1,0,51.81,172.06a8,8,0,0,1,.66,6.54L40,216,77.4,203.53a7.85,7.85,0,0,1,2.53-.42,8,8,0,0,1,4,1.08A88,88,0,0,0,216,128Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M164,112a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,112Zm-4,28H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm68-12A100,100,0,0,1,79.5,215.47l-35.69,11.9a12,12,0,0,1-15.18-15.18l11.9-35.69A100,100,0,1,1,228,128Zm-8,0A92,92,0,1,0,48.35,174.07a4,4,0,0,1,.33,3.27L36.22,214.72a4,4,0,0,0,5.06,5.06l37.38-12.46a3.93,3.93,0,0,1,1.27-.21,4.05,4.05,0,0,1,2,.54A92,92,0,0,0,220,128Z`}))]]),di=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z`}))]]),fi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M140,80v41.21l34.17,20.5a12,12,0,1,1-12.34,20.58l-40-24A12,12,0,0,1,116,128V80a12,12,0,0,1,24,0ZM128,28A99.38,99.38,0,0,0,57.24,57.34c-4.69,4.74-9,9.37-13.24,14V64a12,12,0,0,0-24,0v40a12,12,0,0,0,12,12H72a12,12,0,0,0,0-24H57.77C63,86,68.37,80.22,74.26,74.26a76,76,0,1,1,1.58,109,12,12,0,0,0-16.48,17.46A100,100,0,1,0,128,28Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128A96,96,0,0,1,62.11,197.82a8,8,0,1,1,11-11.64A80,80,0,1,0,71.43,71.43C67.9,75,64.58,78.51,61.35,82L77.66,98.34A8,8,0,0,1,72,112H32a8,8,0,0,1-8-8V64a8,8,0,0,1,13.66-5.66L50,70.7c3.22-3.49,6.54-7,10.06-10.55A96,96,0,0,1,224,128ZM128,72a8,8,0,0,0-8,8v48a8,8,0,0,0,3.88,6.86l40,24a8,8,0,1,0,8.24-13.72L136,123.47V80A8,8,0,0,0,128,72Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M134,80v44.6l37.09,22.25a6,6,0,0,1-6.18,10.3l-40-24A6,6,0,0,1,122,128V80a6,6,0,0,1,12,0Zm-6-46A93.4,93.4,0,0,0,61.51,61.56c-8.58,8.68-16,17-23.51,25.8V64a6,6,0,0,0-12,0v40a6,6,0,0,0,6,6H72a6,6,0,0,0,0-12H44.73C52.86,88.29,60.79,79.35,70,70a82,82,0,1,1,1.7,117.62,6,6,0,1,0-8.24,8.72A94,94,0,1,0,128,34Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M136,80v43.47l36.12,21.67a8,8,0,0,1-8.24,13.72l-40-24A8,8,0,0,1,120,128V80a8,8,0,0,1,16,0Zm-8-48A95.44,95.44,0,0,0,60.08,60.15C52.81,67.51,46.35,74.59,40,82V64a8,8,0,0,0-16,0v40a8,8,0,0,0,8,8H72a8,8,0,0,0,0-16H49c7.15-8.42,14.27-16.35,22.39-24.57a80,80,0,1,1,1.66,114.75,8,8,0,1,0-11,11.64A96,96,0,1,0,128,32Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M132,80v45.74l38.06,22.83a4,4,0,0,1-4.12,6.86l-40-24A4,4,0,0,1,124,128V80a4,4,0,0,1,8,0Zm-4-44A91.42,91.42,0,0,0,62.93,63C53.05,73,44.66,82.47,36,92.86V64a4,4,0,0,0-8,0v40a4,4,0,0,0,4,4H72a4,4,0,0,0,0-8H40.47C49.61,89,58.3,79,68.6,68.6a84,84,0,1,1,1.75,120.49,4,4,0,1,0-5.5,5.82A92,92,0,1,0,128,36Z`}))]]),pi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`}))]]),mi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,44H32A20,20,0,0,0,12,64V192a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V64A20,20,0,0,0,224,44Zm-4,144H36V68H220ZM52,128a12,12,0,0,1,12-12H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,128Zm0-36A12,12,0,0,1,64,80H192a12,12,0,0,1,0,24H64A12,12,0,0,1,52,92Zm0,72a12,12,0,0,1,12-12h8a12,12,0,0,1,0,24H64A12,12,0,0,1,52,164Zm108,0a12,12,0,0,1-12,12H108a12,12,0,0,1,0-24h40A12,12,0,0,1,160,164Zm44,0a12,12,0,0,1-12,12h-8a12,12,0,0,1,0-24h8A12,12,0,0,1,204,164Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232,64V192a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H224A8,8,0,0,1,232,64Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48ZM64,168H48a8,8,0,0,1,0-16H64a8,8,0,0,1,0,16Zm96,0H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm48,0H192a8,8,0,0,1,0-16h16a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Zm0-32H48a8,8,0,0,1,0-16H208a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,50H32A14,14,0,0,0,18,64V192a14,14,0,0,0,14,14H224a14,14,0,0,0,14-14V64A14,14,0,0,0,224,50Zm2,142a2,2,0,0,1-2,2H32a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H224a2,2,0,0,1,2,2Zm-20-64a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,128Zm0-32a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12H200A6,6,0,0,1,206,96ZM70,160a6,6,0,0,1-6,6H56a6,6,0,0,1,0-12h8A6,6,0,0,1,70,160Zm96,0a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,160Zm40,0a6,6,0,0,1-6,6h-8a6,6,0,0,1,0-12h8A6,6,0,0,1,206,160Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,48H32A16,16,0,0,0,16,64V192a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V64A16,16,0,0,0,224,48Zm0,144H32V64H224V192Zm-16-64a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,128Zm0-32a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16H200A8,8,0,0,1,208,96ZM72,160a8,8,0,0,1-8,8H56a8,8,0,0,1,0-16h8A8,8,0,0,1,72,160Zm96,0a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,160Zm40,0a8,8,0,0,1-8,8h-8a8,8,0,0,1,0-16h8A8,8,0,0,1,208,160Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,52H32A12,12,0,0,0,20,64V192a12,12,0,0,0,12,12H224a12,12,0,0,0,12-12V64A12,12,0,0,0,224,52Zm4,140a4,4,0,0,1-4,4H32a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H224a4,4,0,0,1,4,4Zm-24-64a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,128Zm0-32a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8H200A4,4,0,0,1,204,96ZM68,160a4,4,0,0,1-4,4H56a4,4,0,0,1,0-8h8A4,4,0,0,1,68,160Zm96,0a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,160Zm40,0a4,4,0,0,1-4,4h-8a4,4,0,0,1,0-8h8A4,4,0,0,1,204,160Z`}))]]),hi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M76,64A12,12,0,0,1,88,52H216a12,12,0,0,1,0,24H88A12,12,0,0,1,76,64Zm140,52H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Zm0,64H88a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24ZM44,112a16,16,0,1,0,16,16A16,16,0,0,0,44,112Zm0-64A16,16,0,1,0,60,64,16,16,0,0,0,44,48Zm0,128a16,16,0,1,0,16,16A16,16,0,0,0,44,176Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,64V192H88V64Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,1,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM68,188a12,12,0,1,1,12-12A12,12,0,0,1,68,188Zm0-48a12,12,0,1,1,12-12A12,12,0,0,1,68,140Zm0-48A12,12,0,1,1,80,80,12,12,0,0,1,68,92Zm124,92H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Zm0-48H104a8,8,0,0,1,0-16h88a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M82,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H88A6,6,0,0,1,82,64Zm134,58H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Zm0,64H88a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12ZM44,54A10,10,0,1,0,54,64,10,10,0,0,0,44,54Zm0,128a10,10,0,1,0,10,10A10,10,0,0,0,44,182Zm0-64a10,10,0,1,0,10,10A10,10,0,0,0,44,118Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M80,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H88A8,8,0,0,1,80,64Zm136,56H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Zm0,64H88a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16ZM44,52A12,12,0,1,0,56,64,12,12,0,0,0,44,52Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,116Zm0,64a12,12,0,1,0,12,12A12,12,0,0,0,44,180Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M84,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H88A4,4,0,0,1,84,64Zm132,60H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Zm0,64H88a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8ZM44,120a8,8,0,1,0,8,8A8,8,0,0,0,44,120Zm0-64a8,8,0,1,0,8,8A8,8,0,0,0,44,56Zm0,128a8,8,0,1,0,8,8A8,8,0,0,0,44,184Z`}))]]),gi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),_i=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M156,112a12,12,0,0,1-12,12H80a12,12,0,0,1,0-24h64A12,12,0,0,1,156,112Zm76.49,120.49a12,12,0,0,1-17,0L168,185a92.12,92.12,0,1,1,17-17l47.54,47.53A12,12,0,0,1,232.49,232.49ZM112,180a68,68,0,1,0-68-68A68.08,68.08,0,0,0,112,180Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Zm112,0a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM144,120H80a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M150,112a6,6,0,0,1-6,6H80a6,6,0,0,1,0-12h64A6,6,0,0,1,150,112Zm78.24,116.24a6,6,0,0,1-8.48,0l-51.38-51.38a86.15,86.15,0,1,1,8.48-8.48l51.38,51.38A6,6,0,0,1,228.24,228.24ZM112,186a74,74,0,1,0-74-74A74.09,74.09,0,0,0,112,186Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M152,112a8,8,0,0,1-8,8H80a8,8,0,0,1,0-16h64A8,8,0,0,1,152,112Zm77.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88.11,88.11,0,1,1,11.31-11.31l50.07,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M148,112a4,4,0,0,1-4,4H80a4,4,0,0,1,0-8h64A4,4,0,0,1,148,112Zm78.83,114.83a4,4,0,0,1-5.66,0l-52.7-52.7a84.1,84.1,0,1,1,5.66-5.66l52.7,52.7A4,4,0,0,1,226.83,226.83ZM112,188a76,76,0,1,0-76-76A76.08,76.08,0,0,0,112,188Z`}))]]),vi=new Map([[`bold`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M230.47,67.5a12,12,0,0,0-19.26-4.32L172.43,99l-12.68-2.72L157,83.57l35.79-38.78a12,12,0,0,0-4.32-19.26A76.07,76.07,0,0,0,88.41,121.64L30.92,174.18a4.68,4.68,0,0,0-.39.38,36,36,0,0,0,50.91,50.91l.38-.39,52.54-57.49A76.05,76.05,0,0,0,230.47,67.5ZM160,148a51.5,51.5,0,0,1-23.35-5.52,12,12,0,0,0-14.26,2.62L64.31,208.66a12,12,0,0,1-17-17l63.55-58.07a12,12,0,0,0,2.62-14.26A51.5,51.5,0,0,1,108,96a52.06,52.06,0,0,1,52-52h.89L135.17,71.87a12,12,0,0,0-2.91,10.65l5.66,26.35a12,12,0,0,0,9.21,9.21l26.35,5.66a12,12,0,0,0,10.65-2.91L212,95.12c0,.3,0,.59,0,.89A52.06,52.06,0,0,1,160,148Z`}))],[`duotone`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224,96a64,64,0,0,1-94.94,56L73,217A24,24,0,0,1,39,183L104,126.94a64,64,0,0,1,80-90.29L144,80l5.66,26.34L176,112l43.35-40A63.8,63.8,0,0,1,224,96Z`,opacity:`0.2`}),V.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`fill`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M232,96a72,72,0,0,1-100.94,66L79,222.22c-.12.14-.26.29-.39.42a32,32,0,0,1-45.26-45.26c.14-.13.28-.27.43-.39L94,124.94a72.07,72.07,0,0,1,83.54-98.78,8,8,0,0,1,3.93,13.19L144,80l5.66,26.35L176,112l40.65-37.52a8,8,0,0,1,13.19,3.93A72.6,72.6,0,0,1,232,96Z`}))],[`light`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M224.91,69.75a6,6,0,0,0-9.63-2.16l-41.07,37.9L154.7,101.3l-4.19-19.51,37.9-41.07a6,6,0,0,0-2.16-9.63,70,70,0,0,0-89.77,94.39l-61.39,53c-.11.09-.21.19-.32.3A30,30,0,0,0,77.2,221.23c.11-.11.21-.21.3-.32l53-61.39a70,70,0,0,0,94.39-89.77ZM160,154a58,58,0,0,1-28-7.22,6,6,0,0,0-7.45,1.33L68.57,212.88a18,18,0,0,1-25.45-25.45l64.76-55.94A6,6,0,0,0,109.2,124a58,58,0,0,1,64-84.53L139.58,75.93a6,6,0,0,0-1.45,5.33l5.65,26.35a6,6,0,0,0,4.61,4.61l26.35,5.65a6,6,0,0,0,5.33-1.45L216.49,82.8A58.06,58.06,0,0,1,160,154Z`}))],[`regular`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M226.76,69a8,8,0,0,0-12.84-2.88l-40.3,37.19-17.23-3.7-3.7-17.23,37.19-40.3A8,8,0,0,0,187,29.24,72,72,0,0,0,88,96,72.34,72.34,0,0,0,94,124.94L33.79,177c-.15.12-.29.26-.43.39a32,32,0,0,0,45.26,45.26c.13-.13.27-.28.39-.42L131.06,162A72,72,0,0,0,232,96,71.56,71.56,0,0,0,226.76,69ZM160,152a56.14,56.14,0,0,1-27.07-7,8,8,0,0,0-9.92,1.77L67.11,211.51a16,16,0,0,1-22.62-22.62L109.18,133a8,8,0,0,0,1.77-9.93,56,56,0,0,1,58.36-82.31l-31.2,33.81a8,8,0,0,0-1.94,7.1L141.83,108a8,8,0,0,0,6.14,6.14l26.35,5.66a8,8,0,0,0,7.1-1.94l33.81-31.2A56.06,56.06,0,0,1,160,152Z`}))],[`thin`,V.createElement(V.Fragment,null,V.createElement(`path`,{d:`M223.05,70.5a4,4,0,0,0-6.42-1.44l-41.82,38.6L153,103l-4.68-21.79,38.6-41.82a4,4,0,0,0-1.44-6.43A68,68,0,0,0,98.94,126L36.4,180l-.21.2a28,28,0,0,0,39.6,39.6l.2-.21,54-62.54A68,68,0,0,0,228,96,67.51,67.51,0,0,0,223.05,70.5ZM160,156a60,60,0,0,1-29-7.47,4,4,0,0,0-5,.89L70,214.25A20,20,0,0,1,41.75,186l64.82-56a4,4,0,0,0,.89-5,60,60,0,0,1,69.46-86.59L141.05,77.29a4,4,0,0,0-1,3.55l5.66,26.35a4,4,0,0,0,3.07,3.07l26.35,5.66a4,4,0,0,0,3.55-1l38.87-35.87A60.05,60.05,0,0,1,160,156Z`}))]]),yi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:oi}));yi.displayName=`ArrowClockwiseIcon`;var bi=yi,xi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:si}));xi.displayName=`ArrowCounterClockwiseIcon`;var Si=xi,Ci=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:ci}));Ci.displayName=`ArrowsOutIcon`;var wi=Ci,Ti=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:li}));Ti.displayName=`CaretUpIcon`;var Ei=Ti,Di=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:ui}));Di.displayName=`ChatCircleTextIcon`;var Oi=Di,ki=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:di}));ki.displayName=`ClockIcon`;var Ai=ki,ji=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:fi}));ji.displayName=`ClockCounterClockwiseIcon`;var Mi=ji,Ni=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:pi}));Ni.displayName=`InfoIcon`;var Pi=Ni,Fi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:mi}));Fi.displayName=`KeyboardIcon`;var Ii=Fi,Li=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:hi}));Li.displayName=`ListBulletsIcon`;var Ri=Li,zi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:gi}));zi.displayName=`ListMagnifyingGlassIcon`;var Bi=zi,Vi=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:_i}));Vi.displayName=`MagnifyingGlassMinusIcon`;var Hi=Vi,Ui=V.forwardRef((e,t)=>V.createElement(x,{ref:t,...e,weights:vi}));Ui.displayName=`WrenchIcon`;var Wi=Ui,Gi=i(b(),1),Ki=`$__all`;function qi(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Ji(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Yi(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=qi(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=Ji(r,u,s[0]),f=Ji(i,l,s[1])),a?(p=Math.round(a.top),m=Math.round(a.left)):o?(p=Math.round(o.top),m=Math.round(o.left)):(p=Math.round((l+s[1])*n+c[1]),m=Math.round((u+s[0])*t+c[0])),!a&&!o){if(Number.isFinite(r)){let e=Math.round((u+s[0])*(t+r)+c[0])-m-d;e!==s[0]&&(d+=e-s[0])}if(Number.isFinite(i)){let e=Math.round((l+s[1])*(n+i)+c[1])-p-f;e!==s[1]&&(f+=e-s[1])}}return{top:p,left:m,width:d,height:f}}function Xi(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=qi(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=$i(d,0,s-r),f=$i(f,0,l-i),{x:d,y:f}}function Zi(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=qi(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function Qi(e,t,n){let{margin:r,rowHeight:i}=e,a=qi(e);return{w:Math.max(1,Math.round((t+r[0])/(a+r[0]))),h:Math.max(1,Math.round((n+r[1])/(i+r[1])))}}function $i(e,t,n){return Math.max(Math.min(e,n),t)}function ea(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function ta(e,t){for(let n=0;nea(e,t))}function ra(e,t){return t===`horizontal`?aa(e):t===`vertical`||t===`wrap`?ia(e):[...e]}function ia(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function aa(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function oa(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function sa(e,t){for(let n=0;ne.static===!0)}function la(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function ua(e){let t=Array(e.length);for(let n=0;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),i.y===1/0&&(i.y=oa(n)),!i.static)n.push(i);else for(;ta(n,i);)i.y++}}return e}function ma(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return[...e];let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let d=ra(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=na(d,t),p=f.length>0;if(p&&c)return ua(e);if(p&&a)return t.x=l,t.y=u,t.moved=!1,e;let m=[...e];for(let e=0;et.y,d=l!==void 0&&t.x+t.w>l.x;if(!l)return ma(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return ma(e,n,void 0,n.y+1,r,c,i);if(u&&i===null){let r=n.y;return t.y=r,n.y=r+t.h,[...e]}if(d&&o)return ma(e,t,n.x,void 0,r,c,i)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l===void 0&&u===void 0?[...e]:ma(e,n,l,u,r,c,i)}function ga(e,t,n){return Math.max(t,Math.min(n,e))}var _a=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:ga(t,0,Math.max(0,r-e.w)),y:ga(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){let o=r===`w`||r===`nw`||r===`sw`?e.x+e.w:i-e.x,s=r===`n`||r===`nw`||r===`ne`?e.y+e.h:a-e.y;return{w:ga(t,1,Math.max(1,o)),h:ga(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:ga(t,e.minW??1,e.maxW??1/0),h:ga(n,e.minH??1,e.maxH??1/0)}}}];function va(e,t,n,r,i){let a={x:n,y:r};for(let n of e)n.constrainPosition&&(a=n.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(let e of t.constraints)e.constrainPosition&&(a=e.constrainPosition(t,a.x,a.y,i));return a}function ya(e,t,n,r,i,a){let o={w:n,h:r};for(let n of e)n.constrainSize&&(o=n.constrainSize(t,o.w,o.h,i,a));if(t.constraints)for(let e of t.constraints)e.constrainSize&&(o=e.constrainSize(t,o.w,o.h,i,a));return o}function ba({top:e,left:t,width:n,height:r}){let i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:`absolute`}}function xa({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function Sa(e){return e*100+`%`}function Ca(e,t,n,r){return e+n>r?t:n}function wa(e,t,n){return e<0?t:n}function Ta(e){return Math.max(0,e)}function Ea(e){return Math.max(0,e)}var Da=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:wa(o,e.height,i),top:Ea(o)}},Oa=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:Ca(e.left,e.width,o,n),left:Ta(i)}},ka=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left+e.width-a;return o<0?{height:i,width:e.left+e.width,top:Ea(r),left:0}:{height:i,width:a,top:Ea(r),left:o}},Aa=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:wa(r,e.height,a),top:Ea(r)}},ja={n:Da,ne:(e,t,n)=>Da(e,Oa(e,t,n)),e:Oa,se:(e,t,n)=>Aa(e,Oa(e,t,n)),s:Aa,sw:(e,t,n)=>Aa(e,ka(e,t)),w:ka,nw:(e,t,n)=>Da(e,ka(e,t))};function Ma(e,t,n,r){let i=ja[e];return i?i(t,{...t,...n},r):n}var Na={type:`transform`,scale:1,calcStyle(e){return ba(e)}},Pa={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},Fa={enabled:!0,bounded:!1,threshold:3},Ia={enabled:!0,handles:[`se`]},La={enabled:!1,defaultItem:{w:1,h:1},touchEnabled:!0,touchDragSource:`[data-rgl-draggable]`};function Ra(e,t,n,r,i){let a=r===`x`?`w`:`h`;t[r]+=1;let o=e.findIndex(e=>e.i===t.i),s=i??ca(e).length>0;for(let i=o+1;it.y+t.h)break;ea(t,o)&&Ra(e,o,n+t[a],r,s)}}t[r]=n}function za(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!ta(e,t);)t.y--;let i;for(;(i=ta(e,t))!==void 0;)Ra(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function Ba(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!ta(e,t);)t.x--;let i;for(;(i=ta(e,t))!==void 0;)if(Ra(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!ta(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Va={type:`vertical`,allowOverlap:!1,compact(e,t){let n=ca(e),r=oa(n),i=ia(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Ya(e,t){let n=Ja(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Xa(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Za(e,t,n,r,i,a){let o=e[n];if(o)return ua(o);let s=e[r],c=Ja(t),l=c.slice(c.indexOf(n));for(let t=0;t{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),eo=e(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),to=e(((e,t)=>{var n=eo();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),no=e(((e,t)=>{t.exports=to()()})),ro=i(no(),1);function io(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&io(e.changedTouches,e=>t===e.identifier)}function ko(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function Ao(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function jo(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??Ao();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} `,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} `,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&Po(e.body,`react-draggable-transparent-selection`)}function Mo(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{No(e)}):No(e)}function No(e){if(e)try{e.body&&Fo(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function Po(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function Fo(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function Io(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:Uo(r);let i=Wo(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+so(s.paddingLeft)+so(o.marginLeft),top:-i.offsetTop+so(s.paddingTop)+so(o.marginTop),right:Co(a)-xo(i)-i.offsetLeft+so(s.paddingRight)-so(o.marginRight),bottom:So(a)-bo(i)-i.offsetTop+so(s.paddingBottom)-so(o.marginBottom)}}return oo(r.right)&&(t=Math.min(t,r.right)),oo(r.bottom)&&(n=Math.min(n,r.bottom)),oo(r.left)&&(t=Math.max(t,r.left)),oo(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Lo(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function Ro(e){return e.props.axis===`both`||e.props.axis===`x`}function zo(e){return e.props.axis===`both`||e.props.axis===`y`}function Bo(e,t,n){let r=typeof t==`number`?Oo(e,t):null;if(typeof t==`number`&&!r)return null;let i=Wo(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return wo(r||e,a,n.props.scale)}function Vo(e,t,n){let r=!oo(e.lastX),i=Wo(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Ho(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function Uo(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Wo(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Go=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Ko={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},qo=Ko.mouse,Jo=class extends V.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!_o(e.target,this.props.handle,t)||this.props.cancel&&_o(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=ko(e);this.touchIdentifier=r;let i=Bo(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=Vo(this,a,o);Go(`DraggableCore: handleDragStart: %j`,s),Go(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&jo(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,vo(n,qo.move,this.handleDrag),vo(n,qo.stop,this.handleDragStop))},this.handleDrag=e=>{let t=Bo(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=Lo(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=Vo(this,n,r);if(Go(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=Bo(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=Lo(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=Vo(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&Mo(a.ownerDocument),Go(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Go(`DraggableCore: Removing handlers`),yo(a.ownerDocument,qo.move,this.handleDrag),yo(a.ownerDocument,qo.stop,this.handleDragStop))},this.onMouseDown=e=>(qo=Ko.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(qo=Ko.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(qo=Ko.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(qo=Ko.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&vo(e,Ko.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;yo(t,Ko.mouse.move,this.handleDrag),yo(t,Ko.touch.move,this.handleDrag),yo(t,Ko.mouse.stop,this.handleDragStop),yo(t,Ko.touch.stop,this.handleDragStop),yo(e,Ko.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&Mo(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Gi.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Go(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return V.cloneElement(V.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Jo.displayName=`DraggableCore`,Jo.propTypes={allowAnyClick:ro.default.bool,allowMobileScroll:ro.default.bool,children:ro.default.node.isRequired,disabled:ro.default.bool,enableUserSelectHack:ro.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:ro.default.arrayOf(ro.default.number),handle:ro.default.string,cancel:ro.default.string,nodeRef:ro.default.object,nonce:ro.default.string,onStart:ro.default.func,onDrag:ro.default.func,onStop:ro.default.func,onMouseDown:ro.default.func,scale:ro.default.number,className:co,style:co,transform:co},Jo.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Yo=class extends V.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Go(`Draggable: onDragStart: %j`,t),this.props.onStart(e,Ho(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Go(`Draggable: onDrag: %j`,t);let n=Ho(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=Io(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,Ho(this,t))===!1)return!1;Go(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Go(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Gi.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,p=!s||this.state.dragging,m=s||r,h={x:Ro(this)&&p?this.state.x:m.x,y:zo(this)&&p?this.state.y:m.y};this.state.isElementSVG?f=Eo(h,c):d=To(h,c);let g=V.Children.only(n),v=_(g.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return V.createElement(Jo,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},V.cloneElement(g,{className:v,style:{...g.props.style,...d},transform:f}))}};Yo.displayName=`Draggable`,Yo.propTypes={...Jo.propTypes,axis:ro.default.oneOf([`both`,`x`,`y`,`none`]),bounds:ro.default.oneOfType([ro.default.shape({left:ro.default.number,right:ro.default.number,top:ro.default.number,bottom:ro.default.number}),ro.default.string,ro.default.oneOf([!1])]),defaultClassName:ro.default.string,defaultClassNameDragging:ro.default.string,defaultClassNameDragged:ro.default.string,defaultPosition:ro.default.shape({x:ro.default.number,y:ro.default.number}),positionOffset:ro.default.shape({x:ro.default.oneOfType([ro.default.number,ro.default.string]),y:ro.default.oneOfType([ro.default.number,ro.default.string])}),position:ro.default.shape({x:ro.default.number,y:ro.default.number}),className:co,style:co,transform:co},Yo.defaultProps={...Jo.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var Xo=e(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t{var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},u=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let s of o(t))!c.call(e,s)&&s!==n&&i(e,s,{get:()=>t[s],enumerable:!(r=a(t,s))||r.enumerable});return e},d=(e,t,n)=>(n=e==null?{}:r(s(e)),u(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)),f=e=>u(i({},`__esModule`,{value:!0}),e),p={};l(p,{DraggableCore:()=>we,default:()=>Te}),n.exports=f(p);var m=d(t()),h=d(no()),g=d(b()),_=Xo();function v(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&v(e.changedTouches,e=>t===e.identifier)}function ae(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function R(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function oe(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??R();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} `,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} diff --git a/internal/ui/dist/assets/settings-Pi-RkmGU.js b/internal/ui/dist/assets/settings-BrSVFiz-.js similarity index 98% rename from internal/ui/dist/assets/settings-Pi-RkmGU.js rename to internal/ui/dist/assets/settings-BrSVFiz-.js index 6a567f11b..91c5e949f 100644 --- a/internal/ui/dist/assets/settings-Pi-RkmGU.js +++ b/internal/ui/dist/assets/settings-BrSVFiz-.js @@ -1,4 +1,4 @@ -import{i as e,r as t,s as n}from"./useRouter-ByJ6_rwb.js";import{C as r,M as i,_ as a,a as o,c as s,d as c,f as l,i as u,o as d,p as f,r as p,x as m,y as h}from"./brand-DUaZkIz1.js";import{t as g}from"./Tooltip-B3r3s_B9.js";import{n as _,r as v,t as y}from"./WarningCircle.es-B9fMV2kb.js";import{At as b,I as x,L as S,Pt as C,R as w,S as T,U as E,Z as D,kt as O}from"./index-Bz4uzIyA.js";var k=n(e(),1);function A(e={}){let t=e.timeout??2e3,[n,r]=(0,k.useState)(null),[i,a]=(0,k.useState)(!1),o=(0,k.useRef)(null);(0,k.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}var j=t(),M={timeout:1e3};function N(e){let{children:t,timeout:n,value:r,...a}=i(`CopyButton`,M,e),o=A({timeout:n});return(0,j.jsx)(j.Fragment,{children:t({copy:()=>o.copy(r),copied:o.copied,...a})})}N.displayName=`@mantine/core/CopyButton`;var P=new Map([[`bold`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),F=k.forwardRef((e,t)=>k.createElement(o,{ref:t,...e,weights:P}));F.displayName=`ArrowsClockwiseIcon`;var I=F,L=[`settings`,`ingest`];function R(e,t){let n=e.trim();return t||/^https:\/\//i.test(n)||/:443$/.test(n)}function z(e,t,n){if(/^https?:\/\//i.test(e.trim()))try{let t=new URL(e);e=`${t.protocol}//${t.hostname}:${t.port||(t.protocol===`https:`?`443`:`80`)}`}catch{}let r=R(e,n)?``:` +import{i as e,r as t,s as n}from"./useRouter-ByJ6_rwb.js";import{C as r,M as i,_ as a,a as o,c as s,d as c,f as l,i as u,o as d,p as f,r as p,x as m,y as h}from"./brand-DUaZkIz1.js";import{t as g}from"./Tooltip-B3r3s_B9.js";import{n as _,r as v,t as y}from"./WarningCircle.es-D8T3bcu9.js";import{At as b,I as x,L as S,Pt as C,R as w,S as T,U as E,Z as D,kt as O}from"./index-A3IfO-3c.js";var k=n(e(),1);function A(e={}){let t=e.timeout??2e3,[n,r]=(0,k.useState)(null),[i,a]=(0,k.useState)(!1),o=(0,k.useRef)(null);(0,k.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}var j=t(),M={timeout:1e3};function N(e){let{children:t,timeout:n,value:r,...a}=i(`CopyButton`,M,e),o=A({timeout:n});return(0,j.jsx)(j.Fragment,{children:t({copy:()=>o.copy(r),copied:o.copied,...a})})}N.displayName=`@mantine/core/CopyButton`;var P=new Map([[`bold`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),F=k.forwardRef((e,t)=>k.createElement(o,{ref:t,...e,weights:P}));F.displayName=`ArrowsClockwiseIcon`;var I=F,L=[`settings`,`ingest`];function R(e,t){let n=e.trim();return t||/^https:\/\//i.test(n)||/:443$/.test(n)}function z(e,t,n){if(/^https?:\/\//i.test(e.trim()))try{let t=new URL(e);e=`${t.protocol}//${t.hostname}:${t.port||(t.protocol===`https:`?`443`:`80`)}`}catch{}let r=R(e,n)?``:` tls: insecure: true`;return`exporters: otlp/fanout: diff --git a/internal/ui/dist/index.html b/internal/ui/dist/index.html index 759c1a7c7..d6f3bc823 100644 --- a/internal/ui/dist/index.html +++ b/internal/ui/dist/index.html @@ -21,7 +21,7 @@ document.documentElement.setAttribute("data-mantine-color-scheme", computed); } catch (e) {} - + diff --git a/ui/host/src/chat.test.tsx b/ui/host/src/chat.test.tsx index 31da65078..13900f02a 100644 --- a/ui/host/src/chat.test.tsx +++ b/ui/host/src/chat.test.tsx @@ -315,6 +315,16 @@ it.each(["mixed", "presets", "custom"])("expands requested presets over discover } finally { await act(async () => root.unmount()); } } }); +it("keeps all-empty views collapsed and opens the turn's last view with data", async () => { + const empty = appMessage("two", "query_telemetry", "No matches") as Message & { content: { tool_result: ReturnType } }; + for (const result of empty.content.tool_result.results) result.status = "empty"; + const root = await mount(value({ messages: [appMessage("one", "query_telemetry", "Data"), empty] })); + try { + const toggles = [...document.querySelectorAll('button[aria-expanded]')]; + expect(toggles.map(toggle => toggle.getAttribute("aria-expanded"))).toEqual(["true", "false"]); + expect(toggles[1].textContent).toContain("empty"); + } finally { await act(async () => root.unmount()); } +}); it("renders the latest server view snapshot without a host preset-winner rule", async () => { const preset = appMessage("one", "get_service_topology", "Requested"); const custom = structuredClone(preset) as Message & { content: Record }; custom.id = "two"; custom.content.tool_name = "query_telemetry"; (custom.content.tool_result as ReturnType).view.kind="query"; @@ -327,7 +337,7 @@ it("renders the latest server view snapshot without a host preset-winner rule", it("collapses earlier views, dedupes within a turn, expands accessibly and restores on reload", async () => { const app = (id: string, title: string, changed = false): Message => { - const f = fixture(); f.dashboard.name = title; f.dashboard.panels[0].title = title; + const f = fixture(); f.results[0].status = "ok"; f.dashboard.name = title; f.dashboard.panels[0].title = title; f.view.key=(changed?"1":"0").repeat(64); if (changed) f.dashboard.time = { from: "2026-10-07T18:45:00Z", to: "2026-10-07T19:45:00Z", refresh: "off" }; return { id, role: "activity", activityType: "mcp-app", content: { resource_uri: "ui://fanout/panels.html", tool_name: "query_telemetry", tool_input: {}, tool_result: f, is_error: false } } as Message; @@ -336,7 +346,7 @@ it("collapses earlier views, dedupes within a turn, expands accessibly and resto let root = await mount(value({ messages })); await vi.waitFor(() => expect(document.querySelectorAll("[data-app-frame]")).toHaveLength(1)); const summary = document.querySelector('button[aria-expanded="false"]')!; - expect(summary.textContent).toContain("Discovery · logs · empty"); + expect(summary.textContent).toContain("Discovery · logs · 0 rows"); expect(document.querySelectorAll("[data-chat-app]")).toHaveLength(2); await act(async () => summary.click()); expect(summary.getAttribute("aria-expanded")).toBe("true"); @@ -359,7 +369,7 @@ it("shows app tool errors and old string activities without throwing", async () it("keeps distinct captured windows and variables, and resets dedupe at the next user turn", async () => { const app = (id: string, from: number, vars?: Record): Message => { - const fragment = fixture(); fragment.results[0].from_ms = from; fragment.vars = vars; fragment.view.key=(vars?"3":String(from)).repeat(64); + const fragment = fixture(); fragment.results[0].status = "ok"; fragment.results[0].from_ms = from; fragment.vars = vars; fragment.view.key=(vars?"3":String(from)).repeat(64); return { id, role: "activity", activityType: "mcp-app", content: { resource_uri: "ui://fanout/panels.html", tool_name: "query_telemetry", tool_input: {}, tool_result: fragment, is_error: false } } as Message; }; const root = await mount(value({ messages: [{ id: "u1", role: "user", content: "Show" } as Message, app("one", 0), app("two", 1), app("three", 0, { service: "checkout" }), { id: "u2", role: "user", content: "Again" } as Message, app("four", 0)] })); @@ -371,7 +381,7 @@ it("keeps distinct captured windows and variables, and resets dedupe at the next it("dedupes a complete custom map and topology preset with different row limits", async () => { const map = fixture("service_map"); map.dashboard.panels[0].query = { from: "spans", limit: 20 }; - map.results[0].frame = { columns: [{ name: "service", type: "string", role: "dimension" }], values: [["checkout"]], rows: 1 }; + map.results[0].status = "ok"; map.results[0].frame = { columns: [{ name: "service", type: "string", role: "dimension" }], values: [["checkout"]], rows: 1 }; const preset = structuredClone(map); preset.dashboard.name = "Telemetry"; preset.dashboard.panels[0].id = "services"; preset.dashboard.panels[0].title = "Service dependencies"; preset.dashboard.panels[0].query!.limit = 400; preset.results[0].id = "services"; preset.view.kind="preset"; const messages = [map, preset].map((fragment, i) => ({ id: String(i), role: "activity", activityType: "mcp-app", content: { resource_uri: "ui://fanout/panels.html", tool_name: i ? "get_service_topology" : "query_telemetry", tool_input: {}, tool_result: fragment, is_error: false } } as Message)); const root = await mount(value({ messages })); diff --git a/ui/host/src/chat.tsx b/ui/host/src/chat.tsx index 6c94bdf57..d816c56aa 100644 --- a/ui/host/src/chat.tsx +++ b/ui/host/src/chat.tsx @@ -18,6 +18,9 @@ import { DashboardReceiptView } from "./dashboard-receipt-view"; const MCPAppFrame = lazy(() => import("./mcp-app-frame")); const isPreset = (content: MCPAppContent) => content.tool_result.view.kind === "preset"; +// An all-empty view has nothing to show beyond its summary row, so it never +// opens by default; the turn's last view with data opens instead. +const isEmpty = (content: MCPAppContent) => content.tool_result.results.length > 0 && content.tool_result.results.every(result => result.status === "empty"); type AppView = { content: MCPAppContent; expanded: boolean }; function chatAppViews(messages: Message[]) { const views = new Map(), duplicates = new Set(); @@ -30,10 +33,10 @@ function chatAppViews(messages: Message[]) { } const chosen = new Set([...winners.values()].map(item => item.id)); const hasPreset = [...winners.values()].some(item => isPreset(item.content)); - const last = turn.filter(item => chosen.has(item.id)).at(-1)?.id; + const last = turn.filter(item => chosen.has(item.id) && !isEmpty(item.content)).at(-1)?.id; for (const item of turn) { if (!chosen.has(item.id)) duplicates.add(item.id); - else views.set(item.id, { content: item.content, expanded: isPreset(item.content) || !hasPreset && item.id === last }); + else views.set(item.id, { content: item.content, expanded: !isEmpty(item.content) && (isPreset(item.content) || !hasPreset && item.id === last) }); } turn = []; };