diff --git a/THIRD_PARTY_NOTICES b/THIRD_PARTY_NOTICES index f6bb04a..51b61b6 100644 --- a/THIRD_PARTY_NOTICES +++ b/THIRD_PARTY_NOTICES @@ -93,10 +93,10 @@ COMPONENT INVENTORY - Go: modernc.org/mathutil v1.7.1 - Go: modernc.org/memory v1.12.1 - Go: modernc.org/sqlite v1.57.0 -- npm: @ag-ui/client 0.0.58 (declared license: MIT) -- npm: @ag-ui/core 0.0.58 (declared license: MIT) -- npm: @ag-ui/encoder 0.0.58 (declared license: MIT) -- npm: @ag-ui/proto 0.0.58 (declared license: MIT) +- npm: @ag-ui/client 0.0.59 (declared license: MIT) +- npm: @ag-ui/core 0.0.59 (declared license: MIT) +- npm: @ag-ui/encoder 0.0.59 (declared license: MIT) +- npm: @ag-ui/proto 0.0.59 (declared license: MIT) - npm: @bufbuild/protobuf 2.14.1 (declared license: (Apache-2.0 AND BSD-3-Clause)); no license file was present in the installed package - npm: @floating-ui/core 1.8.0 (declared license: MIT) - npm: @floating-ui/dom 1.8.0 (declared license: MIT) @@ -114,8 +114,8 @@ COMPONENT INVENTORY - npm: @protobuf-ts/protoc 2.11.1 (declared license: Apache-2.0) - npm: @standard-schema/spec 1.1.0 (declared license: MIT) - npm: @tanstack/history 1.162.1 (declared license: MIT) -- npm: @tanstack/query-core 5.102.5 (declared license: MIT) -- npm: @tanstack/react-query 5.102.5 (declared license: MIT) +- npm: @tanstack/query-core 5.102.8 (declared license: MIT) +- npm: @tanstack/react-query 5.102.8 (declared license: MIT) - npm: @tanstack/react-router 1.170.32 (declared license: MIT) - npm: @tanstack/react-store 0.9.3 (declared license: MIT) - npm: @tanstack/router-core 1.171.27 (declared license: MIT) @@ -813,10 +813,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- Applies to ------------------------------------------------------------- - Go: github.com/ag-ui-protocol/ag-ui/sdks/community/go v0.0.0-20260826145851-49e71f2b2d21 / LICENSE -- npm: @ag-ui/client 0.0.58 / LICENSE -- npm: @ag-ui/core 0.0.58 / LICENSE -- npm: @ag-ui/encoder 0.0.58 / LICENSE -- npm: @ag-ui/proto 0.0.58 / LICENSE +- npm: @ag-ui/client 0.0.59 / LICENSE +- npm: @ag-ui/core 0.0.59 / LICENSE +- npm: @ag-ui/encoder 0.0.59 / LICENSE +- npm: @ag-ui/proto 0.0.59 / LICENSE ---------------------------------------------------------------------------- MIT License @@ -4844,8 +4844,8 @@ SOFTWARE. --- Applies to ------------------------------------------------------------- - npm: @tanstack/history 1.162.1 / LICENSE -- npm: @tanstack/query-core 5.102.5 / LICENSE -- npm: @tanstack/react-query 5.102.5 / LICENSE +- npm: @tanstack/query-core 5.102.8 / LICENSE +- npm: @tanstack/react-query 5.102.8 / LICENSE - npm: @tanstack/react-router 1.170.32 / LICENSE - npm: @tanstack/router-core 1.171.27 / LICENSE ---------------------------------------------------------------------------- diff --git a/internal/ui/dist/assets/chat._threadId-Bn3zmcjJ.js b/internal/ui/dist/assets/chat._threadId-Bn3zmcjJ.js deleted file mode 100644 index 82cec60..0000000 --- a/internal/ui/dist/assets/chat._threadId-Bn3zmcjJ.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./index-Ckl_dWuh.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat._threadId-CzfhQ5YC.js b/internal/ui/dist/assets/chat._threadId-CzfhQ5YC.js new file mode 100644 index 0000000..c0043ed --- /dev/null +++ b/internal/ui/dist/assets/chat._threadId-CzfhQ5YC.js @@ -0,0 +1 @@ +import{n as e}from"./index-DDtGd6G7.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat.index-B-B4AZ2m.js b/internal/ui/dist/assets/chat.index-BCfx7LKm.js similarity index 75% rename from internal/ui/dist/assets/chat.index-B-B4AZ2m.js rename to internal/ui/dist/assets/chat.index-BCfx7LKm.js index 4484600..3ebdf0a 100644 --- a/internal/ui/dist/assets/chat.index-B-B4AZ2m.js +++ b/internal/ui/dist/assets/chat.index-BCfx7LKm.js @@ -1 +1 @@ -import{a as e,g as t,t as n,u as r}from"./useNavigate-BEpS2iE5.js";import{i}from"./index-Ckl_dWuh.js";var a=t(r()),o=e();function s(){let e=(0,a.useMemo)(()=>i(),[]);return(0,o.jsx)(n,{to:`/chat/$threadId`,params:{threadId:e},replace:!0})}export{s as component}; \ No newline at end of file +import{a as e,g as t,t as n,u as r}from"./useNavigate-BEpS2iE5.js";import{i}from"./index-DDtGd6G7.js";var a=t(r()),o=e();function s(){let e=(0,a.useMemo)(()=>i(),[]);return(0,o.jsx)(n,{to:`/chat/$threadId`,params:{threadId:e},replace:!0})}export{s as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboard-EEbwGLTY.js b/internal/ui/dist/assets/dashboard-yVYEftTd.js similarity index 99% rename from internal/ui/dist/assets/dashboard-EEbwGLTY.js rename to internal/ui/dist/assets/dashboard-yVYEftTd.js index 8ac6ac9..cc5faa0 100644 --- a/internal/ui/dist/assets/dashboard-EEbwGLTY.js +++ b/internal/ui/dist/assets/dashboard-yVYEftTd.js @@ -1,4 +1,4 @@ -import{a as e,d as t,g as n,u as r}from"./useNavigate-BEpS2iE5.js";import{A as i,D as a,E as o,I as s,J as c,M as l,N as u,O as d,P as f,Q as p,S as m,T as h,V as g,Z as _,_ as v,at as y,b,c as x,ct as S,dt as C,et as w,f as T,g as E,h as ee,i as D,it as te,j as O,k,l as A,lt as j,m as M,mt as ne,o as re,p as N,s as ie,st as ae,u as oe,v as se,w as P}from"./auth-DhIxmh_D.js";import{A as F,C as ce,D as le,E as I,M as ue,O as L,S as de,_ as fe,a as pe,b as me,c as he,d as ge,f as _e,g as R,h as z,i as ve,j as B,k as V,l as ye,m as H,o as be,p as U,s as W,u as xe,v as Se,w as Ce,x as G,y as we}from"./index-Ckl_dWuh.js";var K=n(r(),1);function Te(e){let t=(0,K.useRef)(void 0);return(0,K.useEffect)(()=>{t.current=e},[e]),t.current}var q=e();function Ee(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{let t=f(`Flex`,null,e),{classNames:n,className:r,style:a,styles:o,unstyled:c,vars:u,gap:p,rowGap:m,columnGap:h,align:_,justify:v,wrap:y,direction:b,attributes:x,...S}=t,C=l({name:`Flex`,classes:ke,props:t,className:r,style:a,classNames:n,styles:o,unstyled:c,attributes:x,vars:u}),w=s(),T=d(),E=k({styleProps:{gap:p,rowGap:m,columnGap:h,align:_,justify:v,wrap:y,direction:b},theme:w,data:Oe}),ee=g(),D=ee&&E.hasResponsiveStyles?i(E.styles,E.media):T;return(0,q.jsxs)(q.Fragment,{children:[E.hasResponsiveStyles&&(0,q.jsx)(O,{selector:`.${D}`,styles:E.styles,media:E.media,deduplicate:ee}),(0,q.jsx)(P,{...C(`root`,{className:D,style:j(E.inlineStyles)}),...S})]})});X.classes=ke,X.displayName=`@mantine/core/Flex`;function Ae(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=>Ae(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function je(e){return e?e.map(e=>Ae(e)):[]}function Me(e){return e.reduce((e,t)=>`group`in t?{...e,...Me(t.items)}:(e[`${t.value}`]=t,e),{})}var Z={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`},Ne={error:null},Pe=p((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":ae(t,`combobox-chevron-size`),"--combobox-chevron-color":n?c(n,e):void 0}})),Fe=o(e=>{let t=f(`ComboboxChevron`,Ne,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:u,attributes:d,mod:p,...m}=t,h=l({name:`ComboboxChevron`,classes:Z,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:u,varsResolver:Pe,attributes:d,rootSelector:`chevron`});return(0,q.jsx)(P,{component:`svg`,...m,...h(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},p],children:(0,q.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`})})});Fe.classes=Z,Fe.varsResolver=Pe,Fe.displayName=`@mantine/core/ComboboxChevron`;var[Ie,Le]=B(`Combobox component was not found in tree`);function Re({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,q.jsx)(v.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Re.displayName=`@mantine/core/ComboboxClearButton`;var ze=o(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=f(`ComboboxDropdown`,null,e),s=Le();return(0,q.jsx)(ce.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})})});ze.classes=Z,ze.displayName=`@mantine/core/ComboboxDropdown`;var Be={refProp:`ref`},Ve=o(e=>{let{children:t,refProp:n,ref:r}=f(`ComboboxDropdownTarget`,Be,e);if(Le(),!ue(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,q.jsx)(ce.Target,{ref:r,refProp:n,children:t})});Ve.displayName=`@mantine/core/ComboboxDropdownTarget`;var He=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=f(`ComboboxEmpty`,null,e);return(0,q.jsx)(P,{...Le().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});He.classes=Z,He.displayName=`@mantine/core/ComboboxEmpty`;function Ue({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=Le(),[c,l]=(0,K.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 We={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Ge=o(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=f(`ComboboxEventsTarget`,We,e),u=le(t);if(!u)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 d=Le();return(0,K.cloneElement)(u,{...Ue({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l,[n]:F(c,d.store.targetRef,L(u))})});Ge.displayName=`@mantine/core/ComboboxEventsTarget`;var Ke=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=f(`ComboboxFooter`,null,e);return(0,q.jsx)(P,{...Le().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Ke.classes=Z,Ke.displayName=`@mantine/core/ComboboxFooter`;var qe=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=f(`ComboboxGroup`,null,e),u=Le(),d=w(c),p=s!=null&&s!==!1&&s!==``;return(0,q.jsxs)(P,{role:`group`,"aria-labelledby":p?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[p&&(0,q.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});qe.classes=Z,qe.displayName=`@mantine/core/ComboboxGroup`;var Je=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=f(`ComboboxHeader`,null,e);return(0,q.jsx)(P,{...Le().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Je.classes=Z,Je.displayName=`@mantine/core/ComboboxHeader`;function Ye({value:e,valuesDivider:t=`,`,...n}){return(0,q.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Ye.displayName=`@mantine/core/ComboboxHiddenInput`;var Xe=o(e=>{let t=f(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:p,selected:m,mod:h,...g}=t,_=Le(),v=(0,K.useId)(),y=c||v;return(0,q.jsx)(P,{..._.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...g,id:y,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":p,"combobox-selected":m},h],role:`option`,onClick:e=>{p?e.preventDefault():(_.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{_.resetSelectionOnOptionHover&&_.store.resetSelectedOption(),d?.(e)}})});Xe.classes=Z,Xe.displayName=`@mantine/core/ComboboxOption`;var Ze=o(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=f(`ComboboxOptions`,null,e),l=Le(),u=w(a);return(0,K.useEffect)(()=>{l.store.setListId(u)},[u]),(0,q.jsx)(P,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Ze.classes=Z,Ze.displayName=`@mantine/core/ComboboxOptions`;var Qe={withAriaAttributes:!0,withKeyboardNavigation:!0},$e=o(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=f(`ComboboxSearch`,Qe,e),p=Le(),m=p.getStyles(`search`),h=Ue({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,q.jsx)(v,{ref:F(u,p.store.searchRef),classNames:[{input:m.className},t],styles:[{input:m.style},n],size:l||p.size,...h,...d,__staticSelector:`Combobox`})});$e.classes=Z,$e.displayName=`@mantine/core/ComboboxSearch`;var et={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},tt=o(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=f(`ComboboxTarget`,et,e),u=le(t);if(!u)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 d=Le(),p=(0,K.cloneElement)(u,{...Ue({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l});return(0,q.jsx)(ce.Target,{refProp:n,ref:F(c,d.store.targetRef),children:p})});tt.displayName=`@mantine/core/ComboboxTarget`;function nt(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 rt(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,K.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,K.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,K.useCallback)(()=>{let e=Y(f.current),t=Ee(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,K.useCallback)(e=>{let t=Y(f.current),n=Ee(`#${l.current}`,t),r=n?J(`[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].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,K.useCallback)(()=>{let e=Y(f.current),t=Ee(`#${l.current} [data-combobox-active]`,e);if(t){let n=J(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,K.useCallback)(()=>{let e=Y(f.current),t=J(`#${l.current} [data-combobox-option]`,e);return b(rt(u.current,t,a))},[b,a]),C=(0,K.useCallback)(()=>{let e=Y(f.current),t=J(`#${l.current} [data-combobox-option]`,e);return b(nt(u.current,t,a))},[b,a]),w=(0,K.useCallback)(()=>{let e=Y(f.current),t=J(`#${l.current} [data-combobox-option]`,e);return b(it(t))},[b]),T=(0,K.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Y(f.current),r=J(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=Y(f.current),r=J(`#${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,K.useCallback)(()=>{u.current=-1,y()},[y]),ee=(0,K.useCallback)(()=>{let e=Y(f.current);(J(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),D=(0,K.useCallback)(e=>{l.current=e},[]),te=(0,K.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),O=(0,K.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),k=(0,K.useCallback)(()=>u.current,[]);return(0,K.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:k,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:D,clickSelectedOption:ee,searchRef:d,focusSearchInput:te,targetRef:f,focusTarget:O}}var ot={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},st=p((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":te(t),"--combobox-option-padding":ae(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:C(n),"--combobox-option-fz":te(t),"--combobox-option-padding":ae(t,`combobox-option-padding`)}})),Q=e=>{let t=f(`Combobox`,ot,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:u,size:d,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=at(),C=o||S,w=l({name:h||`Combobox`,classes:Z,props:t,classNames:n,styles:r,unstyled:i,attributes:_,vars:s,varsResolver:st}),T=()=>{u?.(),C.closeDropdown()};return(0,q.jsx)(Ie,{value:{getStyles:w,store:C,onOptionSubmit:c,size:d,resetSelectionOnOptionHover:m,readOnly:g,floatingHeight:v},children:(0,q.jsx)(ce,{opened:C.dropdownOpened,...b,middlewares:x,onChange:e=>!e&&T(),withRoles:!1,unstyled:i,children:a})})};Q.extend=e=>e,Q.classes=Z,Q.varsResolver=st,Q.displayName=`@mantine/core/Combobox`,Q.Target=tt,Q.Dropdown=ze,Q.Options=Ze,Q.Option=Xe,Q.Search=$e,Q.Empty=He,Q.Chevron=Fe,Q.Footer=Ke,Q.Header=Je,Q.EventsTarget=Ge,Q.DropdownTarget=Ve,Q.Group=qe,Q.ClearButton=Re,Q.HiddenInput=Ye;function ct(e){return`group`in e}function lt({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function dt(e,t=new Set){if(Array.isArray(e))for(let n of e)if(ct(n))dt(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 ft(e,t){return Array.isArray(e)?e.includes(t):e===t}function pt({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!ct(e)){let s=ft(r,e.value),c=t&&(s?(0,q.jsx)(G,{className:Z.optionsDropdownCheckIcon}):n?(0,q.jsx)(`div`,{className:Z.optionsDropdownCheckPlaceholder}):null),l=(0,q.jsxs)(q.Fragment,{children:[i===`left`&&c,(0,q.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,q.jsx)(Q.Option,{value:e.value,disabled:e.disabled,className:_({[Z.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,q.jsx)(pt,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,q.jsx)(Q.Group,{label:e.group,children:s})}function mt({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=Le();dt(e);let x=typeof i==`string`?(r||lt)({options:e,search:l?i:``,limit:a??1/0}):e,S=ut(x),C=x.map((e,t)=>(0,q.jsx)(pt,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},ct(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,q.jsx)(Q.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,q.jsxs)(Q.Options,{labelledBy:g,"aria-label":y,children:[c?(0,q.jsx)(Ce.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,q.jsx)(Q.Empty,{children:m})]})})}var ht={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},gt=p((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let l=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":ae(a,`badge-height`),"--badge-padding-x":ae(a,`badge-padding-x`),"--badge-fz":ae(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:y(t),"--badge-bg":n||i?l.background:void 0,"--badge-color":n||i?l.color:void 0,"--badge-bd":n||i?l.border:void 0,"--badge-dot-color":i===`dot`?c(n,e):void 0}}}),_t=h(e=>{let t=f(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:u,gradient:d,leftSection:p,rightSection:m,children:h,variant:g,fullWidth:_,autoContrast:v,circle:y,mod:b,attributes:x,...S}=t,C=l({name:`Badge`,props:t,classes:ht,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:gt});return(0,q.jsxs)(P,{variant:g,mod:[{block:_,circle:y,"with-right-section":!!m,"with-left-section":!!p},b],...C(`root`,{variant:g}),...S,children:[p&&(0,q.jsx)(`span`,{...C(`section`),"data-position":`left`,children:p}),(0,q.jsx)(`span`,{...C(`label`),children:h}),m&&(0,q.jsx)(`span`,{...C(`section`),"data-position":`right`,children:m})]})});_t.classes=ht,_t.varsResolver=gt,_t.displayName=`@mantine/core/Badge`;function vt(e){let t=e.currentTarget;return Y(t).activeElement!==t}function yt(e=`top-end`,t=0){let n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},r=typeof t==`number`?t:t.x,i=typeof t==`number`?t:t.y,a=C(r),o=C(i),[s,c]=e.split(`-`);return s===`top`&&(n[`--indicator-top`]=o,n[`--indicator-translate-y`]=`-50%`),s===`middle`&&(n[`--indicator-top`]=`50%`,n[`--indicator-translate-y`]=`-50%`),s===`bottom`&&(n[`--indicator-bottom`]=o,n[`--indicator-translate-y`]=`50%`),c===`start`&&(n[`--indicator-left`]=a,n[`--indicator-translate-x`]=`-50%`),c===`center`&&(n[`--indicator-left`]=`50%`,n[`--indicator-translate-x`]=`-50%`),c===`end`&&(n[`--indicator-right`]=a,n[`--indicator-translate-x`]=`50%`),n}var bt={root:`m_e5262200`,indicator:`m_760d1fb1`,processing:`m_885901b1`},xt={position:`top-end`,offset:0,showZero:!0},St=p((e,{color:t,position:n,offset:r,size:i,radius:a,zIndex:o,autoContrast:s})=>({root:{"--indicator-color":t?c(t,e):void 0,"--indicator-text-color":De(s,e)?I({color:t,theme:e,autoContrast:s}):void 0,"--indicator-size":C(i),"--indicator-radius":a===void 0?void 0:y(a),"--indicator-z-index":o?.toString(),...yt(n,r)}})),Ct=o(e=>{let t=f(`Indicator`,xt,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,position:u,offset:d,inline:p,label:m,radius:h,color:g,withBorder:_,disabled:v,processing:y,zIndex:b,autoContrast:x,maxValue:S,showZero:C,mod:w,attributes:T,...E}=t,ee=l({name:`Indicator`,classes:bt,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:s,varsResolver:St}),D=!C&&(m===0||m===`0`),te=S!==void 0&&typeof m==`number`&&m>S?`${S}+`:m;return(0,q.jsxs)(P,{...ee(`root`),mod:[{inline:p},w],...E,children:[!v&&!D&&(0,q.jsx)(P,{mod:{"with-label":!!m,"with-border":_,processing:y},...ee(`indicator`),children:te}),c]})});Ct.classes=bt,Ct.varsResolver=St,Ct.displayName=`@mantine/core/Indicator`;function wt(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}var Tt={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},Et=a(e=>{let t=f([`Input`,`InputWrapper`,`Select`],Tt,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:d,onBlur:p,onClick:m,onChange:h,data:g,value:_,defaultValue:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,readOnly:C,disabled:T,filter:ee,limit:D,withScrollArea:te,maxDropdownHeight:O,floatingHeight:k,size:A,searchable:j,rightSection:M,checkIconPosition:ne,withCheckIcon:re,withAlignedLabels:N,nothingFoundMessage:ie,name:ae,form:oe,searchValue:se,defaultSearchValue:P,onSearchChange:F,allowDeselect:ce,error:le,rightSectionPointerEvents:I,id:ue,clearable:L,clearSectionMode:de,clearButtonProps:fe,hiddenInputProps:pe,renderOption:me,onClear:he,autoComplete:ge,scrollAreaProps:_e,__defaultRightSection:R,__clearSection:z,__clearable:ve,chevronColor:B,autoSelectOnBlur:ye,openOnFocus:H,attributes:be,...U}=t,W=(0,K.useMemo)(()=>je(g),[g]),xe=(0,K.useRef)({}),Se=(0,K.useMemo)(()=>Me(W),[W]),Ce=w(ue),[G,we,Ee]=V({value:_,defaultValue:v,finalValue:null,onChange:h}),J=G==null?void 0:`${G}`in Se?Se[`${G}`]:xe.current[`${G}`],Y=Te(J),[De,Oe,ke]=V({value:se,defaultValue:P,finalValue:J?J.label:``,onChange:F}),X=at({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),b?X.selectFirstOption():X.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(X.resetSelectedOption,0)}}),Ae=e=>{Oe(e),X.resetSelectedOption()},{resolvedClassNames:Z,resolvedStyles:Ne}=u({props:t,styles:r,classNames:n});(0,K.useEffect)(()=>{y&&X.selectFirstOption()},[y,De]),(0,K.useEffect)(()=>{_===null&&Ae(``),_!=null&&J&&(Y?.value!==J.value||Y?.label!==J.label)&&Ae(J.label)},[_,J]),(0,K.useEffect)(()=>{!Ee&&!ke&&Ae(G==null?``:`${G}`in Se?Se[`${G}`]?.label:xe.current[`${G}`]?.label||``)},[Se,G]),(0,K.useEffect)(()=>{G&&`${G}`in Se&&(xe.current[`${G}`]=Se[`${G}`])},[Se,G]);let Pe=(0,q.jsx)(Q.ClearButton,{...fe,onClear:()=>{we(null,null),Ae(``),he?.()}}),Fe=L&&G!=null&&!T&&!C;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{store:X,__staticSelector:`Select`,classNames:Z,styles:Ne,unstyled:i,readOnly:C,size:A,attributes:be,floatingHeight:k,keepMounted:ye,onOptionSubmit:e=>{x?.(e);let t=ce&&`${Se[e].value}`==`${G}`?null:Se[e],n=t?t.value:null;n!==G&&we(n,t),!Ee&&Ae(n==null?``:t?.label||``),X.closeDropdown()},...S,children:[(0,q.jsx)(Q.Target,{targetType:j?`input`:`button`,autoComplete:ge,withExpandedAttribute:!0,children:(0,q.jsx)(E,{id:Ce,__defaultRightSection:(0,q.jsx)(Q.Chevron,{size:A,error:le,unstyled:i,color:B}),__clearSection:Pe,__clearable:Fe,__clearSectionMode:de,rightSection:M,rightSectionPointerEvents:I||`none`,...U,size:A,__staticSelector:`Select`,disabled:T,readOnly:C||!j,value:De,onChange:e=>{if(vt(e)){if(!C){let t=wt(Se,e.currentTarget.value);t&&`${t.value}`!=`${G}`&&(we(t.value,t),!Ee&&Ae(t.label))}return}Ae(e.currentTarget.value),X.openDropdown(),y&&X.selectFirstOption()},onFocus:e=>{H&&j&&X.openDropdown(),d?.(e)},onBlur:e=>{ye&&X.clickSelectedOption(),j&&X.closeDropdown();let t=G!=null&&(`${G}`in Se?Se[`${G}`]:xe.current[`${G}`]);Ae(t&&t.label||``),p?.(e)},onClick:e=>{j?X.openDropdown():X.toggleDropdown(),m?.(e)},classNames:Z,styles:Ne,unstyled:i,pointer:!j,error:le,attributes:be})}),(0,q.jsx)(mt,{data:W,hidden:C||T,filter:ee,search:De,limit:D,hiddenWhenEmpty:!ie,withScrollArea:te,maxDropdownHeight:O,filterOptions:!!j&&J?.label!==De,value:G,checkIconPosition:ne,withCheckIcon:re,withAlignedLabels:N,nothingFoundMessage:ie,unstyled:i,labelId:U.label?`${Ce}-label`:void 0,"aria-label":U.label?void 0:U[`aria-label`],renderOption:me,scrollAreaProps:_e})]}),(0,q.jsx)(Q.HiddenInput,{value:G,name:ae,form:oe,disabled:T,...pe})]})});Et.classes={...E.classes,...Q.classes},Et.displayName=`@mantine/core/Select`;var[Dt,Ot]=B(`Table component was not found in the tree`),kt={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function At(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function jt(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=o(r=>{let i=f(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=Ot();return(0,q.jsx)(P,{component:e,...At(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=kt,r}var Mt=jt(`th`,{columnBorder:!0}),Nt=jt(`td`,{columnBorder:!0}),Pt=jt(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),Ft=jt(`thead`,{stickyHeader:!0}),It=jt(`tbody`),Lt=jt(`tfoot`),Rt=jt(`caption`,{captionSide:!0}),zt={type:`scrollarea`},Bt=p((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":C(t),"--table-max-height":C(n),"--table-overflow":r===`native`?`auto`:void 0}})),Vt=o(e=>{let t=f(`TableScrollContainer`,zt,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:u,maxHeight:d,type:p,scrollAreaProps:m,attributes:h,...g}=t,_=l({name:`TableScrollContainer`,classes:kt,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Bt,rootSelector:`scrollContainer`});return(0,q.jsx)(P,{component:p===`scrollarea`?Ce:`div`,...p===`scrollarea`?d?{offsetScrollbars:`xy`,...m}:{offsetScrollbars:`x`,...m}:{},..._(`scrollContainer`),...g,children:(0,q.jsx)(`div`,{..._(`scrollContainerInner`),children:c})})});Vt.classes=kt,Vt.varsResolver=Bt,Vt.displayName=`@mantine/core/TableScrollContainer`;function Ht({data:e}){return(0,q.jsxs)(q.Fragment,{children:[e.caption&&(0,q.jsx)(Rt,{children:e.caption}),e.head&&(0,q.jsx)(Ft,{children:(0,q.jsx)(Pt,{children:e.head.map((e,t)=>(0,q.jsx)(Mt,{children:e},t))})}),e.body&&(0,q.jsx)(It,{children:e.body.map((e,t)=>(0,q.jsx)(Pt,{children:e.map((e,t)=>(0,q.jsx)(Nt,{children:e},t))},t))}),e.foot&&(0,q.jsx)(Lt,{children:(0,q.jsx)(Pt,{children:e.foot.map((e,t)=>(0,q.jsx)(Mt,{children:e},t))})})]})}Ht.displayName=`@mantine/core/TableDataRenderer`;var Ut={withRowBorders:!0,verticalSpacing:7},Wt=p((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:l,highlightOnHover:u,stickyHeaderOffset:d,stickyHeader:f})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":S(r),"--table-vertical-spacing":S(i),"--table-border-color":a?c(a,e):void 0,"--table-striped-color":l&&o?c(o,e):void 0,"--table-highlight-on-hover-color":u&&s?c(s,e):void 0,"--table-sticky-header-offset":f?C(d):void 0}})),Gt=o(e=>{let t=f(`Table`,Ut,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:u,captionSide:d,stripedColor:p,highlightOnHoverColor:m,striped:h,highlightOnHover:g,withColumnBorders:_,withRowBorders:v,withTableBorder:y,borderColor:b,layout:x,data:S,children:C,stickyHeader:w,stickyHeaderOffset:T,mod:E,tabularNums:ee,attributes:D,...te}=t,O=l({name:`Table`,props:t,className:r,style:i,classes:kt,classNames:n,styles:a,unstyled:o,attributes:D,rootSelector:`table`,vars:s,varsResolver:Wt});return(0,q.jsx)(Dt,{value:{getStyles:O,stickyHeader:w,striped:h===!0?`odd`:h||void 0,highlightOnHover:g,withColumnBorders:_,withRowBorders:v,captionSide:d||`bottom`},children:(0,q.jsx)(P,{component:`table`,mod:[{"data-with-table-border":y,"data-tabular-nums":ee},E],...O(`table`),...te,children:C||!!S&&(0,q.jsx)(Ht,{data:S})})})});Gt.classes=kt,Gt.varsResolver=Wt,Gt.displayName=`@mantine/core/Table`,Gt.Td=Nt,Gt.Th=Mt,Gt.Tr=Pt,Gt.Thead=Ft,Gt.Tbody=It,Gt.Tfoot=Lt,Gt.Caption=Rt,Gt.ScrollContainer=Vt,Gt.DataRenderer=Ht;var Kt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,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:`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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),qt=new Map([[`bold`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),K.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),Jt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),Yt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}),K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),Xt=new Map([[`bold`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M100,36H56A20,20,0,0,0,36,56v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,100,36ZM96,96H60V60H96ZM200,36H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,60H160V60h36Zm-96,40H56a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,100,136Zm-4,60H60V160H96Zm104-60H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,200,136Zm-4,60H160V160h36Z`}))],[`duotone`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z`,opacity:`0.2`}),K.createElement(`path`,{d:`M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z`}))],[`fill`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M120,56v48a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40h48A16,16,0,0,1,120,56Zm80-16H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm-96,96H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm96,0H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Z`}))],[`light`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M104,42H56A14,14,0,0,0,42,56v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,104,42Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm-98,34H56a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,104,138Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,200,138Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Z`}))],[`regular`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z`}))],[`thin`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M104,44H56A12,12,0,0,0,44,56v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,104,44Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4ZM104,140H56a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,104,140Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,200,140Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Z`}))]]),Zt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),Qt=new Map([[`bold`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,K.createElement(K.Fragment,null,K.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`}),K.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,K.createElement(K.Fragment,null,K.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,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),$t=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Kt}));$t.displayName=`ArrowClockwiseIcon`;var en=$t,tn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:qt}));tn.displayName=`CaretDownIcon`;var nn=tn,rn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Jt}));rn.displayName=`ListMagnifyingGlassIcon`;var an=rn,on=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Yt}));on.displayName=`SparkleIcon`;var sn=on,cn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Xt}));cn.displayName=`SquaresFourIcon`;var ln=cn,un=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Zt}));un.displayName=`WarningCircleIcon`;var dn=un,fn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Qt}));fn.displayName=`XIcon`;var pn=fn,mn=class extends ye{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),_e(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&xe(t.mutationKey)!==xe(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??be();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){he.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function hn(e,t){return pe(e,W,t)}function gn(e,t){let n=H(t),[r]=K.useState(()=>new mn(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);let i=K.useSyncExternalStore(K.useCallback(e=>r.subscribe(he.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=K.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(ge)},[r]);if(i.error&&U(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function _n(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function vn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function yn(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=_n(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=vn(r,u,s[0]),f=vn(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 bn(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=_n(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=Cn(d,0,s-r),f=Cn(f,0,l-i),{x:d,y:f}}function xn(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=_n(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function Sn(e,t,n){let{margin:r,rowHeight:i}=e,a=_n(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 Cn(e,t,n){return Math.max(Math.min(e,n),t)}function wn(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 Tn(e,t){for(let n=0;nwn(e,t))}function Dn(e,t){return t===`horizontal`?kn(e):t===`vertical`||t===`wrap`?On(e):[...e]}function On(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function kn(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function An(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function jn(e,t){for(let n=0;ne.static===!0)}function Nn(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 Pn(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.static)n.push(i);else for(;Tn(n,i);)i.y++}}return e}function Rn(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=Dn(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=En(d,t),p=f.length>0;if(p&&c)return Pn(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 Rn(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return Rn(e,n,void 0,n.y+1,r,c,i);if(u&&i===null)return t.y=n.y,n.y+=n.h,[...e];if(d&&o)return Rn(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]:Rn(e,n,l,u,r,c,i)}function Bn(e,t,n){return Math.max(t,Math.min(n,e))}var Vn=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:Bn(t,0,Math.max(0,r-e.w)),y:Bn(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:Bn(t,1,Math.max(1,o)),h:Bn(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:Bn(t,e.minW??1,e.maxW??1/0),h:Bn(n,e.minH??1,e.maxH??1/0)}}}];function Hn(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 Un(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 Wn({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 Gn({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function Kn(e){return e*100+`%`}function qn(e,t,n,r){return e+n>r?t:n}function Jn(e,t,n){return e<0?t:n}function Yn(e){return Math.max(0,e)}function Xn(e){return Math.max(0,e)}var Zn=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:Jn(o,e.height,i),top:Xn(o)}},Qn=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:qn(e.left,e.width,o,n),left:Yn(i)}},$n=(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:Xn(r),left:0}:{height:i,width:a,top:Xn(r),left:o}},er=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:Jn(r,e.height,a),top:Xn(r)}},tr={n:Zn,ne:(e,t,n)=>Zn(e,Qn(e,t,n)),e:Qn,se:(e,t,n)=>er(e,Qn(e,t,n)),s:er,sw:(e,t,n)=>er(e,$n(e,t)),w:$n,nw:(e,t,n)=>Zn(e,$n(e,t))};function nr(e,t,n,r){let i=tr[e];return i?i(t,{...t,...n},r):n}var rr={type:`transform`,scale:1,calcStyle(e){return Wn(e)}},ir={type:`absolute`,scale:1,calcStyle(e){return Gn(e)}};function ar(e){return{type:`transform`,scale:e,calcStyle(e){return Wn(e)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var or=rr,sr={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},cr={enabled:!0,bounded:!1,threshold:3},lr={enabled:!0,handles:[`se`]},ur={enabled:!1,defaultItem:{w:1,h:1}};function dr(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??Mn(e).length>0;for(let i=o+1;it.y+t.h)break;wn(t,o)&&dr(e,o,n+t[a],r,s)}}t[r]=n}function fr(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&&!Tn(e,t);)t.y--;let i;for(;(i=Tn(e,t))!==void 0;)dr(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function pr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Tn(e,t);)t.x--;let i;for(;(i=Tn(e,t))!==void 0;)if(dr(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Tn(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var mr={type:`vertical`,allowOverlap:!1,compact(e,t){let n=Mn(e),r=An(n),i=On(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Sr(e,t){let n=xr(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Cr(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function wr(e,t,n,r,i,a){let o=e[n];if(o)return Pn(o);let s=e[r],c=xr(t),l=c.slice(c.indexOf(n));for(let t=0;t{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Dr=t(((e,t)=>{var n=Er();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}})),Or=t(((e,t)=>{t.exports=Dr()()})),$=n(Or(),1),kr=n(ne(),1);function Ar(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&&Ar(e.changedTouches,e=>t===e.identifier)}function ei(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function ti(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function ni(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??ti();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +import{a as e,d as t,g as n,u as r}from"./useNavigate-BEpS2iE5.js";import{A as i,D as a,E as o,I as s,J as c,M as l,N as u,O as d,P as f,Q as p,S as m,T as h,V as g,Z as _,_ as v,at as y,b,c as x,ct as S,dt as C,et as w,f as T,g as E,h as ee,i as D,it as te,j as O,k,l as A,lt as j,m as M,mt as ne,o as re,p as N,s as ie,st as ae,u as oe,v as se,w as P}from"./auth-DhIxmh_D.js";import{A as F,C as ce,D as le,E as I,M as ue,O as L,S as de,_ as fe,a as pe,b as me,c as he,d as ge,f as _e,g as R,h as z,i as ve,j as B,k as V,l as ye,m as H,o as be,p as U,s as W,u as xe,v as Se,w as Ce,x as G,y as we}from"./index-DDtGd6G7.js";var K=n(r(),1);function Te(e){let t=(0,K.useRef)(void 0);return(0,K.useEffect)(()=>{t.current=e},[e]),t.current}var q=e();function Ee(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{let t=f(`Flex`,null,e),{classNames:n,className:r,style:a,styles:o,unstyled:c,vars:u,gap:p,rowGap:m,columnGap:h,align:_,justify:v,wrap:y,direction:b,attributes:x,...S}=t,C=l({name:`Flex`,classes:ke,props:t,className:r,style:a,classNames:n,styles:o,unstyled:c,attributes:x,vars:u}),w=s(),T=d(),E=k({styleProps:{gap:p,rowGap:m,columnGap:h,align:_,justify:v,wrap:y,direction:b},theme:w,data:Oe}),ee=g(),D=ee&&E.hasResponsiveStyles?i(E.styles,E.media):T;return(0,q.jsxs)(q.Fragment,{children:[E.hasResponsiveStyles&&(0,q.jsx)(O,{selector:`.${D}`,styles:E.styles,media:E.media,deduplicate:ee}),(0,q.jsx)(P,{...C(`root`,{className:D,style:j(E.inlineStyles)}),...S})]})});X.classes=ke,X.displayName=`@mantine/core/Flex`;function Ae(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=>Ae(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function je(e){return e?e.map(e=>Ae(e)):[]}function Me(e){return e.reduce((e,t)=>`group`in t?{...e,...Me(t.items)}:(e[`${t.value}`]=t,e),{})}var Z={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`},Ne={error:null},Pe=p((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":ae(t,`combobox-chevron-size`),"--combobox-chevron-color":n?c(n,e):void 0}})),Fe=o(e=>{let t=f(`ComboboxChevron`,Ne,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:u,attributes:d,mod:p,...m}=t,h=l({name:`ComboboxChevron`,classes:Z,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:u,varsResolver:Pe,attributes:d,rootSelector:`chevron`});return(0,q.jsx)(P,{component:`svg`,...m,...h(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},p],children:(0,q.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`})})});Fe.classes=Z,Fe.varsResolver=Pe,Fe.displayName=`@mantine/core/ComboboxChevron`;var[Ie,Le]=B(`Combobox component was not found in tree`);function Re({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,q.jsx)(v.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Re.displayName=`@mantine/core/ComboboxClearButton`;var ze=o(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=f(`ComboboxDropdown`,null,e),s=Le();return(0,q.jsx)(ce.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})})});ze.classes=Z,ze.displayName=`@mantine/core/ComboboxDropdown`;var Be={refProp:`ref`},Ve=o(e=>{let{children:t,refProp:n,ref:r}=f(`ComboboxDropdownTarget`,Be,e);if(Le(),!ue(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,q.jsx)(ce.Target,{ref:r,refProp:n,children:t})});Ve.displayName=`@mantine/core/ComboboxDropdownTarget`;var He=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=f(`ComboboxEmpty`,null,e);return(0,q.jsx)(P,{...Le().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});He.classes=Z,He.displayName=`@mantine/core/ComboboxEmpty`;function Ue({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=Le(),[c,l]=(0,K.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 We={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Ge=o(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=f(`ComboboxEventsTarget`,We,e),u=le(t);if(!u)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 d=Le();return(0,K.cloneElement)(u,{...Ue({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l,[n]:F(c,d.store.targetRef,L(u))})});Ge.displayName=`@mantine/core/ComboboxEventsTarget`;var Ke=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=f(`ComboboxFooter`,null,e);return(0,q.jsx)(P,{...Le().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Ke.classes=Z,Ke.displayName=`@mantine/core/ComboboxFooter`;var qe=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=f(`ComboboxGroup`,null,e),u=Le(),d=w(c),p=s!=null&&s!==!1&&s!==``;return(0,q.jsxs)(P,{role:`group`,"aria-labelledby":p?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[p&&(0,q.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});qe.classes=Z,qe.displayName=`@mantine/core/ComboboxGroup`;var Je=o(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=f(`ComboboxHeader`,null,e);return(0,q.jsx)(P,{...Le().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Je.classes=Z,Je.displayName=`@mantine/core/ComboboxHeader`;function Ye({value:e,valuesDivider:t=`,`,...n}){return(0,q.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}Ye.displayName=`@mantine/core/ComboboxHiddenInput`;var Xe=o(e=>{let t=f(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:p,selected:m,mod:h,...g}=t,_=Le(),v=(0,K.useId)(),y=c||v;return(0,q.jsx)(P,{..._.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...g,id:y,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":p,"combobox-selected":m},h],role:`option`,onClick:e=>{p?e.preventDefault():(_.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{_.resetSelectionOnOptionHover&&_.store.resetSelectedOption(),d?.(e)}})});Xe.classes=Z,Xe.displayName=`@mantine/core/ComboboxOption`;var Ze=o(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=f(`ComboboxOptions`,null,e),l=Le(),u=w(a);return(0,K.useEffect)(()=>{l.store.setListId(u)},[u]),(0,q.jsx)(P,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Ze.classes=Z,Ze.displayName=`@mantine/core/ComboboxOptions`;var Qe={withAriaAttributes:!0,withKeyboardNavigation:!0},$e=o(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=f(`ComboboxSearch`,Qe,e),p=Le(),m=p.getStyles(`search`),h=Ue({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,q.jsx)(v,{ref:F(u,p.store.searchRef),classNames:[{input:m.className},t],styles:[{input:m.style},n],size:l||p.size,...h,...d,__staticSelector:`Combobox`})});$e.classes=Z,$e.displayName=`@mantine/core/ComboboxSearch`;var et={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},tt=o(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=f(`ComboboxTarget`,et,e),u=le(t);if(!u)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 d=Le(),p=(0,K.cloneElement)(u,{...Ue({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),...l});return(0,q.jsx)(ce.Target,{refProp:n,ref:F(c,d.store.targetRef),children:p})});tt.displayName=`@mantine/core/ComboboxTarget`;function nt(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 rt(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,K.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,K.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,K.useCallback)(()=>{let e=Y(f.current),t=Ee(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,K.useCallback)(e=>{let t=Y(f.current),n=Ee(`#${l.current}`,t),r=n?J(`[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].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,K.useCallback)(()=>{let e=Y(f.current),t=Ee(`#${l.current} [data-combobox-active]`,e);if(t){let n=J(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,K.useCallback)(()=>{let e=Y(f.current),t=J(`#${l.current} [data-combobox-option]`,e);return b(rt(u.current,t,a))},[b,a]),C=(0,K.useCallback)(()=>{let e=Y(f.current),t=J(`#${l.current} [data-combobox-option]`,e);return b(nt(u.current,t,a))},[b,a]),w=(0,K.useCallback)(()=>{let e=Y(f.current),t=J(`#${l.current} [data-combobox-option]`,e);return b(it(t))},[b]),T=(0,K.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Y(f.current),r=J(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=Y(f.current),r=J(`#${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,K.useCallback)(()=>{u.current=-1,y()},[y]),ee=(0,K.useCallback)(()=>{let e=Y(f.current);(J(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),D=(0,K.useCallback)(e=>{l.current=e},[]),te=(0,K.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),O=(0,K.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),k=(0,K.useCallback)(()=>u.current,[]);return(0,K.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:k,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:D,clickSelectedOption:ee,searchRef:d,focusSearchInput:te,targetRef:f,focusTarget:O}}var ot={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},st=p((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":te(t),"--combobox-option-padding":ae(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:C(n),"--combobox-option-fz":te(t),"--combobox-option-padding":ae(t,`combobox-option-padding`)}})),Q=e=>{let t=f(`Combobox`,ot,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:u,size:d,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=at(),C=o||S,w=l({name:h||`Combobox`,classes:Z,props:t,classNames:n,styles:r,unstyled:i,attributes:_,vars:s,varsResolver:st}),T=()=>{u?.(),C.closeDropdown()};return(0,q.jsx)(Ie,{value:{getStyles:w,store:C,onOptionSubmit:c,size:d,resetSelectionOnOptionHover:m,readOnly:g,floatingHeight:v},children:(0,q.jsx)(ce,{opened:C.dropdownOpened,...b,middlewares:x,onChange:e=>!e&&T(),withRoles:!1,unstyled:i,children:a})})};Q.extend=e=>e,Q.classes=Z,Q.varsResolver=st,Q.displayName=`@mantine/core/Combobox`,Q.Target=tt,Q.Dropdown=ze,Q.Options=Ze,Q.Option=Xe,Q.Search=$e,Q.Empty=He,Q.Chevron=Fe,Q.Footer=Ke,Q.Header=Je,Q.EventsTarget=Ge,Q.DropdownTarget=Ve,Q.Group=qe,Q.ClearButton=Re,Q.HiddenInput=Ye;function ct(e){return`group`in e}function lt({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function dt(e,t=new Set){if(Array.isArray(e))for(let n of e)if(ct(n))dt(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 ft(e,t){return Array.isArray(e)?e.includes(t):e===t}function pt({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!ct(e)){let s=ft(r,e.value),c=t&&(s?(0,q.jsx)(G,{className:Z.optionsDropdownCheckIcon}):n?(0,q.jsx)(`div`,{className:Z.optionsDropdownCheckPlaceholder}):null),l=(0,q.jsxs)(q.Fragment,{children:[i===`left`&&c,(0,q.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,q.jsx)(Q.Option,{value:e.value,disabled:e.disabled,className:_({[Z.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,q.jsx)(pt,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,q.jsx)(Q.Group,{label:e.group,children:s})}function mt({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=Le();dt(e);let x=typeof i==`string`?(r||lt)({options:e,search:l?i:``,limit:a??1/0}):e,S=ut(x),C=x.map((e,t)=>(0,q.jsx)(pt,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},ct(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,q.jsx)(Q.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,q.jsxs)(Q.Options,{labelledBy:g,"aria-label":y,children:[c?(0,q.jsx)(Ce.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,q.jsx)(Q.Empty,{children:m})]})})}var ht={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},gt=p((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let l=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":ae(a,`badge-height`),"--badge-padding-x":ae(a,`badge-padding-x`),"--badge-fz":ae(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:y(t),"--badge-bg":n||i?l.background:void 0,"--badge-color":n||i?l.color:void 0,"--badge-bd":n||i?l.border:void 0,"--badge-dot-color":i===`dot`?c(n,e):void 0}}}),_t=h(e=>{let t=f(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:u,gradient:d,leftSection:p,rightSection:m,children:h,variant:g,fullWidth:_,autoContrast:v,circle:y,mod:b,attributes:x,...S}=t,C=l({name:`Badge`,props:t,classes:ht,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:gt});return(0,q.jsxs)(P,{variant:g,mod:[{block:_,circle:y,"with-right-section":!!m,"with-left-section":!!p},b],...C(`root`,{variant:g}),...S,children:[p&&(0,q.jsx)(`span`,{...C(`section`),"data-position":`left`,children:p}),(0,q.jsx)(`span`,{...C(`label`),children:h}),m&&(0,q.jsx)(`span`,{...C(`section`),"data-position":`right`,children:m})]})});_t.classes=ht,_t.varsResolver=gt,_t.displayName=`@mantine/core/Badge`;function vt(e){let t=e.currentTarget;return Y(t).activeElement!==t}function yt(e=`top-end`,t=0){let n={"--indicator-top":void 0,"--indicator-bottom":void 0,"--indicator-left":void 0,"--indicator-right":void 0,"--indicator-translate-x":void 0,"--indicator-translate-y":void 0},r=typeof t==`number`?t:t.x,i=typeof t==`number`?t:t.y,a=C(r),o=C(i),[s,c]=e.split(`-`);return s===`top`&&(n[`--indicator-top`]=o,n[`--indicator-translate-y`]=`-50%`),s===`middle`&&(n[`--indicator-top`]=`50%`,n[`--indicator-translate-y`]=`-50%`),s===`bottom`&&(n[`--indicator-bottom`]=o,n[`--indicator-translate-y`]=`50%`),c===`start`&&(n[`--indicator-left`]=a,n[`--indicator-translate-x`]=`-50%`),c===`center`&&(n[`--indicator-left`]=`50%`,n[`--indicator-translate-x`]=`-50%`),c===`end`&&(n[`--indicator-right`]=a,n[`--indicator-translate-x`]=`50%`),n}var bt={root:`m_e5262200`,indicator:`m_760d1fb1`,processing:`m_885901b1`},xt={position:`top-end`,offset:0,showZero:!0},St=p((e,{color:t,position:n,offset:r,size:i,radius:a,zIndex:o,autoContrast:s})=>({root:{"--indicator-color":t?c(t,e):void 0,"--indicator-text-color":De(s,e)?I({color:t,theme:e,autoContrast:s}):void 0,"--indicator-size":C(i),"--indicator-radius":a===void 0?void 0:y(a),"--indicator-z-index":o?.toString(),...yt(n,r)}})),Ct=o(e=>{let t=f(`Indicator`,xt,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,position:u,offset:d,inline:p,label:m,radius:h,color:g,withBorder:_,disabled:v,processing:y,zIndex:b,autoContrast:x,maxValue:S,showZero:C,mod:w,attributes:T,...E}=t,ee=l({name:`Indicator`,classes:bt,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:s,varsResolver:St}),D=!C&&(m===0||m===`0`),te=S!==void 0&&typeof m==`number`&&m>S?`${S}+`:m;return(0,q.jsxs)(P,{...ee(`root`),mod:[{inline:p},w],...E,children:[!v&&!D&&(0,q.jsx)(P,{mod:{"with-label":!!m,"with-border":_,processing:y},...ee(`indicator`),children:te}),c]})});Ct.classes=bt,Ct.varsResolver=St,Ct.displayName=`@mantine/core/Indicator`;function wt(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}var Tt={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},Et=a(e=>{let t=f([`Input`,`InputWrapper`,`Select`],Tt,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:d,onBlur:p,onClick:m,onChange:h,data:g,value:_,defaultValue:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,readOnly:C,disabled:T,filter:ee,limit:D,withScrollArea:te,maxDropdownHeight:O,floatingHeight:k,size:A,searchable:j,rightSection:M,checkIconPosition:ne,withCheckIcon:re,withAlignedLabels:N,nothingFoundMessage:ie,name:ae,form:oe,searchValue:se,defaultSearchValue:P,onSearchChange:F,allowDeselect:ce,error:le,rightSectionPointerEvents:I,id:ue,clearable:L,clearSectionMode:de,clearButtonProps:fe,hiddenInputProps:pe,renderOption:me,onClear:he,autoComplete:ge,scrollAreaProps:_e,__defaultRightSection:R,__clearSection:z,__clearable:ve,chevronColor:B,autoSelectOnBlur:ye,openOnFocus:H,attributes:be,...U}=t,W=(0,K.useMemo)(()=>je(g),[g]),xe=(0,K.useRef)({}),Se=(0,K.useMemo)(()=>Me(W),[W]),Ce=w(ue),[G,we,Ee]=V({value:_,defaultValue:v,finalValue:null,onChange:h}),J=G==null?void 0:`${G}`in Se?Se[`${G}`]:xe.current[`${G}`],Y=Te(J),[De,Oe,ke]=V({value:se,defaultValue:P,finalValue:J?J.label:``,onChange:F}),X=at({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),b?X.selectFirstOption():X.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(X.resetSelectedOption,0)}}),Ae=e=>{Oe(e),X.resetSelectedOption()},{resolvedClassNames:Z,resolvedStyles:Ne}=u({props:t,styles:r,classNames:n});(0,K.useEffect)(()=>{y&&X.selectFirstOption()},[y,De]),(0,K.useEffect)(()=>{_===null&&Ae(``),_!=null&&J&&(Y?.value!==J.value||Y?.label!==J.label)&&Ae(J.label)},[_,J]),(0,K.useEffect)(()=>{!Ee&&!ke&&Ae(G==null?``:`${G}`in Se?Se[`${G}`]?.label:xe.current[`${G}`]?.label||``)},[Se,G]),(0,K.useEffect)(()=>{G&&`${G}`in Se&&(xe.current[`${G}`]=Se[`${G}`])},[Se,G]);let Pe=(0,q.jsx)(Q.ClearButton,{...fe,onClear:()=>{we(null,null),Ae(``),he?.()}}),Fe=L&&G!=null&&!T&&!C;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(Q,{store:X,__staticSelector:`Select`,classNames:Z,styles:Ne,unstyled:i,readOnly:C,size:A,attributes:be,floatingHeight:k,keepMounted:ye,onOptionSubmit:e=>{x?.(e);let t=ce&&`${Se[e].value}`==`${G}`?null:Se[e],n=t?t.value:null;n!==G&&we(n,t),!Ee&&Ae(n==null?``:t?.label||``),X.closeDropdown()},...S,children:[(0,q.jsx)(Q.Target,{targetType:j?`input`:`button`,autoComplete:ge,withExpandedAttribute:!0,children:(0,q.jsx)(E,{id:Ce,__defaultRightSection:(0,q.jsx)(Q.Chevron,{size:A,error:le,unstyled:i,color:B}),__clearSection:Pe,__clearable:Fe,__clearSectionMode:de,rightSection:M,rightSectionPointerEvents:I||`none`,...U,size:A,__staticSelector:`Select`,disabled:T,readOnly:C||!j,value:De,onChange:e=>{if(vt(e)){if(!C){let t=wt(Se,e.currentTarget.value);t&&`${t.value}`!=`${G}`&&(we(t.value,t),!Ee&&Ae(t.label))}return}Ae(e.currentTarget.value),X.openDropdown(),y&&X.selectFirstOption()},onFocus:e=>{H&&j&&X.openDropdown(),d?.(e)},onBlur:e=>{ye&&X.clickSelectedOption(),j&&X.closeDropdown();let t=G!=null&&(`${G}`in Se?Se[`${G}`]:xe.current[`${G}`]);Ae(t&&t.label||``),p?.(e)},onClick:e=>{j?X.openDropdown():X.toggleDropdown(),m?.(e)},classNames:Z,styles:Ne,unstyled:i,pointer:!j,error:le,attributes:be})}),(0,q.jsx)(mt,{data:W,hidden:C||T,filter:ee,search:De,limit:D,hiddenWhenEmpty:!ie,withScrollArea:te,maxDropdownHeight:O,filterOptions:!!j&&J?.label!==De,value:G,checkIconPosition:ne,withCheckIcon:re,withAlignedLabels:N,nothingFoundMessage:ie,unstyled:i,labelId:U.label?`${Ce}-label`:void 0,"aria-label":U.label?void 0:U[`aria-label`],renderOption:me,scrollAreaProps:_e})]}),(0,q.jsx)(Q.HiddenInput,{value:G,name:ae,form:oe,disabled:T,...pe})]})});Et.classes={...E.classes,...Q.classes},Et.displayName=`@mantine/core/Select`;var[Dt,Ot]=B(`Table component was not found in the tree`),kt={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function At(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function jt(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=o(r=>{let i=f(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=Ot();return(0,q.jsx)(P,{component:e,...At(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=kt,r}var Mt=jt(`th`,{columnBorder:!0}),Nt=jt(`td`,{columnBorder:!0}),Pt=jt(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),Ft=jt(`thead`,{stickyHeader:!0}),It=jt(`tbody`),Lt=jt(`tfoot`),Rt=jt(`caption`,{captionSide:!0}),zt={type:`scrollarea`},Bt=p((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":C(t),"--table-max-height":C(n),"--table-overflow":r===`native`?`auto`:void 0}})),Vt=o(e=>{let t=f(`TableScrollContainer`,zt,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:u,maxHeight:d,type:p,scrollAreaProps:m,attributes:h,...g}=t,_=l({name:`TableScrollContainer`,classes:kt,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Bt,rootSelector:`scrollContainer`});return(0,q.jsx)(P,{component:p===`scrollarea`?Ce:`div`,...p===`scrollarea`?d?{offsetScrollbars:`xy`,...m}:{offsetScrollbars:`x`,...m}:{},..._(`scrollContainer`),...g,children:(0,q.jsx)(`div`,{..._(`scrollContainerInner`),children:c})})});Vt.classes=kt,Vt.varsResolver=Bt,Vt.displayName=`@mantine/core/TableScrollContainer`;function Ht({data:e}){return(0,q.jsxs)(q.Fragment,{children:[e.caption&&(0,q.jsx)(Rt,{children:e.caption}),e.head&&(0,q.jsx)(Ft,{children:(0,q.jsx)(Pt,{children:e.head.map((e,t)=>(0,q.jsx)(Mt,{children:e},t))})}),e.body&&(0,q.jsx)(It,{children:e.body.map((e,t)=>(0,q.jsx)(Pt,{children:e.map((e,t)=>(0,q.jsx)(Nt,{children:e},t))},t))}),e.foot&&(0,q.jsx)(Lt,{children:(0,q.jsx)(Pt,{children:e.foot.map((e,t)=>(0,q.jsx)(Mt,{children:e},t))})})]})}Ht.displayName=`@mantine/core/TableDataRenderer`;var Ut={withRowBorders:!0,verticalSpacing:7},Wt=p((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:l,highlightOnHover:u,stickyHeaderOffset:d,stickyHeader:f})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":S(r),"--table-vertical-spacing":S(i),"--table-border-color":a?c(a,e):void 0,"--table-striped-color":l&&o?c(o,e):void 0,"--table-highlight-on-hover-color":u&&s?c(s,e):void 0,"--table-sticky-header-offset":f?C(d):void 0}})),Gt=o(e=>{let t=f(`Table`,Ut,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:u,captionSide:d,stripedColor:p,highlightOnHoverColor:m,striped:h,highlightOnHover:g,withColumnBorders:_,withRowBorders:v,withTableBorder:y,borderColor:b,layout:x,data:S,children:C,stickyHeader:w,stickyHeaderOffset:T,mod:E,tabularNums:ee,attributes:D,...te}=t,O=l({name:`Table`,props:t,className:r,style:i,classes:kt,classNames:n,styles:a,unstyled:o,attributes:D,rootSelector:`table`,vars:s,varsResolver:Wt});return(0,q.jsx)(Dt,{value:{getStyles:O,stickyHeader:w,striped:h===!0?`odd`:h||void 0,highlightOnHover:g,withColumnBorders:_,withRowBorders:v,captionSide:d||`bottom`},children:(0,q.jsx)(P,{component:`table`,mod:[{"data-with-table-border":y,"data-tabular-nums":ee},E],...O(`table`),...te,children:C||!!S&&(0,q.jsx)(Ht,{data:S})})})});Gt.classes=kt,Gt.varsResolver=Wt,Gt.displayName=`@mantine/core/Table`,Gt.Td=Nt,Gt.Th=Mt,Gt.Tr=Pt,Gt.Thead=Ft,Gt.Tbody=It,Gt.Tfoot=Lt,Gt.Caption=Rt,Gt.ScrollContainer=Vt,Gt.DataRenderer=Ht;var Kt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,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:`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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),qt=new Map([[`bold`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),K.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),Jt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),Yt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}),K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),Xt=new Map([[`bold`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M100,36H56A20,20,0,0,0,36,56v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,100,36ZM96,96H60V60H96ZM200,36H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,60H160V60h36Zm-96,40H56a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,100,136Zm-4,60H60V160H96Zm104-60H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,200,136Zm-4,60H160V160h36Z`}))],[`duotone`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z`,opacity:`0.2`}),K.createElement(`path`,{d:`M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z`}))],[`fill`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M120,56v48a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40h48A16,16,0,0,1,120,56Zm80-16H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm-96,96H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm96,0H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Z`}))],[`light`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M104,42H56A14,14,0,0,0,42,56v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,104,42Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm-98,34H56a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,104,138Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,200,138Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Z`}))],[`regular`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z`}))],[`thin`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M104,44H56A12,12,0,0,0,44,56v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,104,44Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4ZM104,140H56a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,104,140Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,200,140Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Z`}))]]),Zt=new Map([[`bold`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`,K.createElement(K.Fragment,null,K.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`}))]]),Qt=new Map([[`bold`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,K.createElement(K.Fragment,null,K.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`}),K.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,K.createElement(K.Fragment,null,K.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,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,K.createElement(K.Fragment,null,K.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),$t=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Kt}));$t.displayName=`ArrowClockwiseIcon`;var en=$t,tn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:qt}));tn.displayName=`CaretDownIcon`;var nn=tn,rn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Jt}));rn.displayName=`ListMagnifyingGlassIcon`;var an=rn,on=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Yt}));on.displayName=`SparkleIcon`;var sn=on,cn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Xt}));cn.displayName=`SquaresFourIcon`;var ln=cn,un=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Zt}));un.displayName=`WarningCircleIcon`;var dn=un,fn=K.forwardRef((e,t)=>K.createElement(ie,{ref:t,...e,weights:Qt}));fn.displayName=`XIcon`;var pn=fn,mn=class extends ye{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),_e(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&xe(t.mutationKey)!==xe(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??be();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){he.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function hn(e,t){return pe(e,W,t)}function gn(e,t){let n=H(t),[r]=K.useState(()=>new mn(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);let i=K.useSyncExternalStore(K.useCallback(e=>r.subscribe(he.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=K.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(ge)},[r]);if(i.error&&U(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function _n(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function vn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function yn(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=_n(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=vn(r,u,s[0]),f=vn(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 bn(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=_n(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=Cn(d,0,s-r),f=Cn(f,0,l-i),{x:d,y:f}}function xn(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=_n(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function Sn(e,t,n){let{margin:r,rowHeight:i}=e,a=_n(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 Cn(e,t,n){return Math.max(Math.min(e,n),t)}function wn(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 Tn(e,t){for(let n=0;nwn(e,t))}function Dn(e,t){return t===`horizontal`?kn(e):t===`vertical`||t===`wrap`?On(e):[...e]}function On(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function kn(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function An(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function jn(e,t){for(let n=0;ne.static===!0)}function Nn(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 Pn(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.static)n.push(i);else for(;Tn(n,i);)i.y++}}return e}function Rn(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=Dn(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=En(d,t),p=f.length>0;if(p&&c)return Pn(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 Rn(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return Rn(e,n,void 0,n.y+1,r,c,i);if(u&&i===null)return t.y=n.y,n.y+=n.h,[...e];if(d&&o)return Rn(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]:Rn(e,n,l,u,r,c,i)}function Bn(e,t,n){return Math.max(t,Math.min(n,e))}var Vn=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:Bn(t,0,Math.max(0,r-e.w)),y:Bn(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:Bn(t,1,Math.max(1,o)),h:Bn(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:Bn(t,e.minW??1,e.maxW??1/0),h:Bn(n,e.minH??1,e.maxH??1/0)}}}];function Hn(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 Un(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 Wn({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 Gn({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function Kn(e){return e*100+`%`}function qn(e,t,n,r){return e+n>r?t:n}function Jn(e,t,n){return e<0?t:n}function Yn(e){return Math.max(0,e)}function Xn(e){return Math.max(0,e)}var Zn=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:Jn(o,e.height,i),top:Xn(o)}},Qn=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:qn(e.left,e.width,o,n),left:Yn(i)}},$n=(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:Xn(r),left:0}:{height:i,width:a,top:Xn(r),left:o}},er=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:Jn(r,e.height,a),top:Xn(r)}},tr={n:Zn,ne:(e,t,n)=>Zn(e,Qn(e,t,n)),e:Qn,se:(e,t,n)=>er(e,Qn(e,t,n)),s:er,sw:(e,t,n)=>er(e,$n(e,t)),w:$n,nw:(e,t,n)=>Zn(e,$n(e,t))};function nr(e,t,n,r){let i=tr[e];return i?i(t,{...t,...n},r):n}var rr={type:`transform`,scale:1,calcStyle(e){return Wn(e)}},ir={type:`absolute`,scale:1,calcStyle(e){return Gn(e)}};function ar(e){return{type:`transform`,scale:e,calcStyle(e){return Wn(e)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var or=rr,sr={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},cr={enabled:!0,bounded:!1,threshold:3},lr={enabled:!0,handles:[`se`]},ur={enabled:!1,defaultItem:{w:1,h:1}};function dr(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??Mn(e).length>0;for(let i=o+1;it.y+t.h)break;wn(t,o)&&dr(e,o,n+t[a],r,s)}}t[r]=n}function fr(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&&!Tn(e,t);)t.y--;let i;for(;(i=Tn(e,t))!==void 0;)dr(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function pr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Tn(e,t);)t.x--;let i;for(;(i=Tn(e,t))!==void 0;)if(dr(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Tn(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var mr={type:`vertical`,allowOverlap:!1,compact(e,t){let n=Mn(e),r=An(n),i=On(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Sr(e,t){let n=xr(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Cr(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function wr(e,t,n,r,i,a){let o=e[n];if(o)return Pn(o);let s=e[r],c=xr(t),l=c.slice(c.indexOf(n));for(let t=0;t{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Dr=t(((e,t)=>{var n=Er();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}})),Or=t(((e,t)=>{t.exports=Dr()()})),$=n(Or(),1),kr=n(ne(),1);function Ar(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&&Ar(e.changedTouches,e=>t===e.identifier)}function ei(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function ti(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function ni(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??ti();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&&ai(e.body,`react-draggable-transparent-selection`)}function ri(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{ii(e)}):ii(e)}function ii(e){if(e)try{e.body&&oi(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 ai(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function oi(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function si(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:mi(r);let i=hi(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+Nr(s.paddingLeft)+Nr(o.marginLeft),top:-i.offsetTop+Nr(s.paddingTop)+Nr(o.marginTop),right:Jr(a)-Kr(i)-i.offsetLeft+Nr(s.paddingRight)-Nr(o.marginRight),bottom:qr(a)-Gr(i)-i.offsetTop+Nr(s.paddingBottom)-Nr(o.marginBottom)}}return Mr(r.right)&&(t=Math.min(t,r.right)),Mr(r.bottom)&&(n=Math.min(n,r.bottom)),Mr(r.left)&&(t=Math.max(t,r.left)),Mr(r.top)&&(n=Math.max(n,r.top)),[t,n]}function ci(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function li(e){return e.props.axis===`both`||e.props.axis===`x`}function ui(e){return e.props.axis===`both`||e.props.axis===`y`}function di(e,t,n){let r=typeof t==`number`?$r(e,t):null;if(typeof t==`number`&&!r)return null;let i=hi(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return Yr(r||e,a,n.props.scale)}function fi(e,t,n){let r=!Mr(e.lastX),i=hi(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 pi(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 mi(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function hi(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var gi=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},_i={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},vi=_i.mouse,yi=class extends K.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&&!Hr(e.target,this.props.handle,t)||this.props.cancel&&Hr(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=ei(e);this.touchIdentifier=r;let i=di(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=fi(this,a,o);gi(`DraggableCore: handleDragStart: %j`,s),gi(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&ni(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,Ur(n,vi.move,this.handleDrag),Ur(n,vi.stop,this.handleDragStop))},this.handleDrag=e=>{let t=di(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]=ci(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=fi(this,n,r);if(gi(`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=di(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]=ci(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=fi(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&ri(a.ownerDocument),gi(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(gi(`DraggableCore: Removing handlers`),Wr(a.ownerDocument,vi.move,this.handleDrag),Wr(a.ownerDocument,vi.stop,this.handleDragStop))},this.onMouseDown=e=>(vi=_i.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(vi=_i.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(vi=_i.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(vi=_i.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&Ur(e,_i.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;Wr(t,_i.mouse.move,this.handleDrag),Wr(t,_i.touch.move,this.handleDrag),Wr(t,_i.mouse.stop,this.handleDragStop),Wr(t,_i.touch.stop,this.handleDragStop),Wr(e,_i.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&ri(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=kr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(gi(`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 K.cloneElement(K.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};yi.displayName=`DraggableCore`,yi.propTypes={allowAnyClick:$.default.bool,allowMobileScroll:$.default.bool,children:$.default.node.isRequired,disabled:$.default.bool,enableUserSelectHack:$.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:$.default.arrayOf($.default.number),handle:$.default.string,cancel:$.default.string,nodeRef:$.default.object,nonce:$.default.string,onStart:$.default.func,onDrag:$.default.func,onStop:$.default.func,onMouseDown:$.default.func,scale:$.default.number,className:Pr,style:Pr,transform:Pr},yi.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var bi=class extends K.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(gi(`Draggable: onDragStart: %j`,t),this.props.onStart(e,pi(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;gi(`Draggable: onDrag: %j`,t);let n=pi(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]=si(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,pi(this,t))===!1)return!1;gi(`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)?(gi(`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=kr.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:li(this)&&p?this.state.x:m.x,y:ui(this)&&p?this.state.y:m.y};this.state.isElementSVG?f=Zr(h,c):d=Xr(h,c);let g=K.Children.only(n),v=_(g.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return K.createElement(yi,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},K.cloneElement(g,{className:v,style:{...g.props.style,...d},transform:f}))}};bi.displayName=`Draggable`,bi.propTypes={...yi.propTypes,axis:$.default.oneOf([`both`,`x`,`y`,`none`]),bounds:$.default.oneOfType([$.default.shape({left:$.default.number,right:$.default.number,top:$.default.number,bottom:$.default.number}),$.default.string,$.default.oneOf([!1])]),defaultClassName:$.default.string,defaultClassNameDragging:$.default.string,defaultClassNameDragged:$.default.string,defaultPosition:$.default.shape({x:$.default.number,y:$.default.number}),positionOffset:$.default.shape({x:$.default.oneOfType([$.default.number,$.default.string]),y:$.default.oneOfType([$.default.number,$.default.string])}),position:$.default.shape({x:$.default.number,y:$.default.number}),className:Pr,style:Pr,transform:Pr},bi.defaultProps={...yi.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var xi=t(((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 n=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,r)=>(r=e==null?{}:n(s(e)),u(t||!e||!e.__esModule?i(r,`default`,{value:e,enumerable:!0}):r,e)),f=e=>u(i({},`__esModule`,{value:!0}),e),p={};l(p,{DraggableCore:()=>W,default:()=>xe}),t.exports=f(p);var m=d(r()),h=d(Or()),g=d(ne()),_=xi();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 F(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function ce(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function le(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??ce();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/dashboards._dashboardId-BUndKTeA.js b/internal/ui/dist/assets/dashboards._dashboardId-Cd4hot0K.js similarity index 69% rename from internal/ui/dist/assets/dashboards._dashboardId-BUndKTeA.js rename to internal/ui/dist/assets/dashboards._dashboardId-Cd4hot0K.js index 16b7fb1..97d97dd 100644 --- a/internal/ui/dist/assets/dashboards._dashboardId-BUndKTeA.js +++ b/internal/ui/dist/assets/dashboards._dashboardId-Cd4hot0K.js @@ -1 +1 @@ -import{a as e,n as t}from"./useNavigate-BEpS2iE5.js";import{t as n}from"./dashboard-EEbwGLTY.js";import{r,t as i}from"./index-Ckl_dWuh.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=t(),{agentAvailable:s,openChat:c}=r();return(0,a.jsx)(n,{dashboardID:e,agentAvailable:s,onOpenChat:c,onDashboardChange:(e,t)=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:e},replace:t})})}export{o as component}; \ No newline at end of file +import{a as e,n as t}from"./useNavigate-BEpS2iE5.js";import{t as n}from"./dashboard-yVYEftTd.js";import{r,t as i}from"./index-DDtGd6G7.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=t(),{agentAvailable:s,openChat:c}=r();return(0,a.jsx)(n,{dashboardID:e,agentAvailable:s,onOpenChat:c,onDashboardChange:(e,t)=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:e},replace:t})})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards.index-BoPfccdT.js b/internal/ui/dist/assets/dashboards.index-DzfpVEyI.js similarity index 82% rename from internal/ui/dist/assets/dashboards.index-BoPfccdT.js rename to internal/ui/dist/assets/dashboards.index-DzfpVEyI.js index 642c16d..85fa85d 100644 --- a/internal/ui/dist/assets/dashboards.index-BoPfccdT.js +++ b/internal/ui/dist/assets/dashboards.index-DzfpVEyI.js @@ -1 +1 @@ -import{a as e,n as t}from"./useNavigate-BEpS2iE5.js";import{t as n}from"./dashboard-EEbwGLTY.js";import{r}from"./index-Ckl_dWuh.js";var i=e();function a(){let e=t(),{agentAvailable:a,openChat:o}=r();return(0,i.jsx)(n,{agentAvailable:a,onOpenChat:o,onDashboardChange:t=>void e({to:`/dashboards/$dashboardId`,params:{dashboardId:t},replace:!0})})}export{a as component}; \ No newline at end of file +import{a as e,n as t}from"./useNavigate-BEpS2iE5.js";import{t as n}from"./dashboard-yVYEftTd.js";import{r}from"./index-DDtGd6G7.js";var i=e();function a(){let e=t(),{agentAvailable:a,openChat:o}=r();return(0,i.jsx)(n,{agentAvailable:a,onOpenChat:o,onDashboardChange:t=>void e({to:`/dashboards/$dashboardId`,params:{dashboardId:t},replace:!0})})}export{a as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-Ckl_dWuh.js b/internal/ui/dist/assets/index-DDtGd6G7.js similarity index 61% rename from internal/ui/dist/assets/index-Ckl_dWuh.js rename to internal/ui/dist/assets/index-DDtGd6G7.js index 397d137..fdb9dd0 100644 --- a/internal/ui/dist/assets/index-Ckl_dWuh.js +++ b/internal/ui/dist/assets/index-DDtGd6G7.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mcp-app-frame-C0HSbiNW.js","assets/useNavigate-BEpS2iE5.js","assets/auth-DhIxmh_D.js","assets/routes-UYU1YEPx.js","assets/chat.index-B-B4AZ2m.js","assets/dashboards.index-BoPfccdT.js","assets/dashboard-EEbwGLTY.js","assets/dashboards._dashboardId-BUndKTeA.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mcp-app-frame-BwFqSNsw.js","assets/useNavigate-BEpS2iE5.js","assets/auth-DhIxmh_D.js","assets/routes-UYU1YEPx.js","assets/chat.index-BCfx7LKm.js","assets/dashboards.index-DzfpVEyI.js","assets/dashboard-yVYEftTd.js","assets/dashboards._dashboardId-Cd4hot0K.js"])))=>i.map(i=>d[i]); import{a as e,c as t,d as n,g as r,i,l as a,n as o,o as s,p as c,r as l,s as u,t as d,u as f}from"./useNavigate-BEpS2iE5.js";import{$ as p,B as m,C as h,E as g,F as _,G as v,H as y,I as b,J as x,K as S,L as C,M as w,N as T,O as E,P as D,Q as O,R as k,S as ee,T as te,U as ne,W as re,X as A,Y as ie,Z as ae,_ as oe,a as se,at as ce,b as le,c as ue,ct as de,d as fe,dt as j,et as pe,f as me,ft as he,g as ge,h as _e,i as ve,it as ye,j as be,l as xe,lt as Se,m as Ce,mt as we,n as Te,nt as Ee,ot as De,p as Oe,pt as ke,q as Ae,r as je,rt as Me,s as Ne,st as Pe,t as Fe,tt as Ie,u as Le,ut as Re,v as ze,w as Be,x as Ve,y as He,z as Ue}from"./auth-DhIxmh_D.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 We=n((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,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){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&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function te(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,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Ge=n(((e,t)=>{t.exports=We()})),Ke=n((e=>{var t=Ge(),n=f(),r=we();function i(e){var t=`https://react.dev/errors/`+e;if(1se||(e.current=oe[se],oe[se]=null,se--)}function ue(e,t){se++,oe[se]=e.current,e.current=t}var de=ce(null),fe=ce(null),j=ce(null),pe=ce(null);function me(e,t){switch(ue(j,t),ue(fe,e),ue(de,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?cf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=cf(t),e=lf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}le(de),ue(de,e)}function he(){le(de),le(fe),le(j)}function ge(e){e.memoizedState!==null&&ue(pe,e);var t=de.current,n=lf(t,e.type);t!==n&&(ue(fe,e),ue(de,n))}function _e(e){fe.current===e&&(le(de),le(fe)),pe.current===e&&(le(pe),vp._currentValue=ae)}var ve,ye;function be(e){if(ve===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||``,ye=-1)`:-1i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},rp=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ip=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},ap=function(e,t){return e===`v`?ep(t):tp(t)},op=function(e,t){return e===`v`?rp(t):ip(t)},sp=function(e,t){return e===`h`&&t===`rtl`?-1:1},cp=function(e,t,n,r,i){var a=sp(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=op(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&ap(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},lp=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},up=function(e){return[e.deltaX,e.deltaY]},dp=function(e){return e&&`current`in e?e.current:e},fp=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pp=function(e){return` .block-interactivity-${e} {pointer-events: none;} .allow-interactivity-${e} {pointer-events: all;} -`},mp=0,hp=[];function gp(e){var t=M.useRef([]),n=M.useRef([0,0]),r=M.useRef(),i=M.useState(mp++)[0],a=M.useState(Rf)[0],o=M.useRef(e);M.useEffect(function(){o.current=e},[e]),M.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=df([e.lockRef.current],(e.shards||[]).map(dp),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=M.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=lp(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=np(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=np(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return cp(h,t,e,h===`h`?s:c,!0)},[]),c=M.useCallback(function(e){var n=e;if(hp.length&&hp[hp.length-1]===a){var r=`deltaY`in n?up(n):lp(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&fp(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(dp).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=M.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:_p(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=M.useCallback(function(e){n.current=lp(e),r.current=void 0},[]),d=M.useCallback(function(t){l(t.type,up(t),t.target,s(t,e.lockRef.current))},[]),f=M.useCallback(function(t){l(t.type,lp(t),t.target,s(t,e.lockRef.current))},[]);M.useEffect(function(){return hp.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Zf),document.addEventListener(`touchmove`,c,Zf),document.addEventListener(`touchstart`,u,Zf),function(){hp=hp.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Zf),document.removeEventListener(`touchmove`,c,Zf),document.removeEventListener(`touchstart`,u,Zf)}},[]);var p=e.removeScrollBar,m=e.inert;return M.createElement(M.Fragment,null,m?M.createElement(a,{styles:pp(i)}):null,p?M.createElement(Jf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _p(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var vp=Of(kf,gp),yp=M.forwardRef(function(e,t){return M.createElement(jf,af({},e,{ref:t,sideCar:vp}))});yp.classNames=jf.classNames;function bp({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,...S}){let{_id:C,titleMounted:w,bodyMounted:T,shouldLockScroll:E,setTitleMounted:D,setBodyMounted:O}=tf({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u}),{key:k,...ee}=x||{};return(0,N.jsx)(Td,{...p,withinPortal:f,children:(0,N.jsx)(Qd,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:w,bodyMounted:T,setTitleMounted:D,setBodyMounted:O,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,N.jsx)(yp,{enabled:E&&m,...ee,children:(0,N.jsx)(Be,{...S,id:C,__vars:{...y,"--mb-z-index":(g||ka(`modal`)).toString(),"--mb-shadow":De(_),"--mb-padding":de(v)},children:h})},k)})})}bp.displayName=`@mantine/core/ModalBase`;function xp(){let e=$d();return(0,M.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Sp={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Cp({className:e,...t}){let n=xp(),r=$d();return(0,N.jsx)(Be,{id:n,className:ae({[Sp.body]:!r.unstyled},e),...t})}Cp.displayName=`@mantine/core/ModalBaseBody`;function wp({className:e,onClick:t,...n}){let r=$d();return(0,N.jsx)(He,{...n,onClick:e=>{r.onClose(),t?.(e)},className:ae({[Sp.close]:!r.unstyled},e),unstyled:r.unstyled})}wp.displayName=`@mantine/core/ModalBaseCloseButton`;function Tp({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=$d();return(0,N.jsx)(Ve,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,N.jsx)(`div`,{...n,className:ae({[Sp.inner]:!s.unstyled},n.className),children:(0,N.jsx)(Md,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,N.jsx)(ee,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:ae({[Sp.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}Tp.displayName=`@mantine/core/ModalBaseContent`;function Ep({className:e,...t}){let n=$d();return(0,N.jsx)(Be,{component:`header`,className:ae({[Sp.header]:!n.unstyled},e),...t})}Ep.displayName=`@mantine/core/ModalBaseHeader`;var Dp={duration:200,timingFunction:`ease`,transition:`fade`};function Op(e){let t=$d();return{...Dp,...t.transitionProps,...e}}function kp({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=$d(),o=Op(t);return(0,N.jsx)(Ve,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,N.jsx)(bd,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}kp.displayName=`@mantine/core/ModalBaseOverlay`;function Ap(){let e=$d();return(0,M.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function jp({className:e,...t}){let n=Ap(),r=$d();return(0,N.jsx)(Be,{component:`h2`,className:ae({[Sp.title]:!r.unstyled},e),id:n,...t})}jp.displayName=`@mantine/core/ModalBaseTitle`;function Mp({children:e}){return(0,N.jsx)(N.Fragment,{children:e})}function Np({style:e,size:t=16,...n}){return(0,N.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:j(t),height:j(t),display:`block`},...n,children:(0,N.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Np.displayName=`@mantine/core/AccordionChevron`;var[Pp,Fp]=Sa(`AppShell was not found in tree`),Ip={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Lp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellAside`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:ae({[yp.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Lp.classes=Ip,Lp.displayName=`@mantine/core/AppShellAside`;var Rp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellFooter`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:ae({[yp.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Rp.classes=Ip,Rp.displayName=`@mantine/core/AppShellFooter`;var zp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellHeader`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:ae({[yp.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});zp.classes=Ip,zp.displayName=`@mantine/core/AppShellHeader`;var Bp=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`AppShellMain`,null,e);return(0,N.jsx)(Be,{component:`main`,...Fp().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});Bp.classes=Ip,Bp.displayName=`@mantine/core/AppShellMain`;var Vp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellNavbar`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});Vp.classes=Ip,Vp.displayName=`@mantine/core/AppShellNavbar`;var Hp=te(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=D(`AppShellSection`,null,e),l=Fp();return(0,N.jsx)(Be,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Hp.classes=Ip,Hp.displayName=`@mantine/core/AppShellSection`;function Up(e){return typeof e==`object`?e.base:e}function Wp(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Gp(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function Kp({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Wp(o)){let t=j(Up(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Gp(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=j(o.base),e[`--app-shell-aside-offset`]=j(o.base)),ke(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=j(o[e]),t[e][`--app-shell-aside-offset`]=j(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=Na(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function qp({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Wp(i)){let t=j(Up(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Gp(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=j(i.base),a&&(e[`--app-shell-footer-offset`]=j(i.base))),ke(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=j(i[e]),a&&(t[e][`--app-shell-footer-offset`]=j(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function Jp({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Wp(i)){let t=j(Up(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Gp(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=j(i.base),a&&(e[`--app-shell-header-offset`]=j(i.base))),ke(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=j(i[e]),a&&(t[e][`--app-shell-header-offset`]=j(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function Yp({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Wp(o)){let t=j(Up(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Gp(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=j(o.base),e[`--app-shell-navbar-offset`]=j(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=j(o.base))),ke(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=j(o[e]),t[e][`--app-shell-navbar-offset`]=j(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=j(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=Na(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function Xp(e){return Number(e)===0?`0px`:de(e)}function Zp({padding:e,baseStyles:t,minMediaStyles:n}){Wp(e)&&(t[`--app-shell-padding`]=Xp(Up(e))),Gp(e)&&(e.base&&(t[`--app-shell-padding`]=Xp(e.base)),ke(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=Xp(e[t]))}))}function Qp({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),Yp({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),Kp({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),Jp({baseStyles:l,minMediaStyles:s,header:t,mode:o}),qp({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),Zp({baseStyles:l,minMediaStyles:s,padding:i});let u=Pa(ke(s),a.breakpoints).map(e=>({query:`(min-width: ${Re(e.px)})`,styles:s[e.value]})),d=Pa(ke(c),a.breakpoints).map(e=>({query:`(max-width: ${Re(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function $p({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=b(),c=Ue(),{media:l,baseStyles:u}=Qp({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,N.jsx)(be,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function em({transitionDuration:e,disabled:t}){let[n,r]=(0,M.useState)(!0),i=(0,M.useRef)(-1),a=(0,M.useRef)(-1);return eo(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,M.startTransition)(()=>{r(!1)}),200)}),Ee(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,M.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var tm={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:ka(`app`),mode:`fixed`},nm=O((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),rm=g(e=>{let t=D(`AppShell`,tm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...T}=t,E=w({name:`AppShell`,classes:Ip,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:nm}),O=em({disabled:g,transitionDuration:d}),k=pe(C);return(0,N.jsxs)(Pp,{value:{getStyles:E,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,N.jsx)($p,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${k}`:void 0}),(0,N.jsx)(Be,{...E(`root`),id:k,mod:[{resizing:O,layout:h,disabled:g,mode:b},x],...T})]})});rm.classes=Ip,rm.varsResolver=nm,rm.displayName=`@mantine/core/AppShell`,rm.Navbar=Vp,rm.Header=zp,rm.Main=Bp,rm.Aside=Lp,rm.Footer=Rp,rm.Section=Hp;function im({size:e,style:t,...n}){return(0,N.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:j(e),height:j(e),...t},"aria-hidden":!0,...n,children:(0,N.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var am={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},om=(0,M.createContext)({withinGroup:!1}),sm=O((e,{spacing:t})=>({group:{"--ag-spacing":de(t)}})),cm=g(e=>{let t=D(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=w({name:`AvatarGroup`,classes:am,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:sm,rootSelector:`group`});return(0,N.jsx)(om,{value:{withinGroup:!0},children:(0,N.jsx)(Be,{...d(`group`),...u})})});cm.classes=am,cm.varsResolver=sm,cm.displayName=`@mantine/core/AvatarGroup`;function lm(e){return(0,N.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function um(e){let t=0;for(let n=0;ne[0]).slice(0,t).join(``).toUpperCase()}var mm=O((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?fm(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":Pe(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:ce(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),hm=te(e=>{let t=D(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,x=(0,M.use)(om),[S,C]=(0,M.useState)(!c),T=w({name:`Avatar`,props:t,classes:am,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:mm});return(0,M.useEffect)(()=>C(!c),[c]),(0,N.jsx)(Be,{...T(`root`),mod:[{"within-group":x.withinGroup},g],...b,children:S||!c?(0,N.jsx)(`span`,{...T(`placeholder`),title:l,children:m||typeof _==`string`&&pm(_)||(0,N.jsx)(lm,{})}):(0,N.jsx)(`img`,{...p,...T(`image`),src:c,alt:l,onError:e=>{C(!0),p?.onError?.(e)}})})});hm.classes=am,hm.varsResolver=mm,hm.displayName=`@mantine/core/Avatar`,hm.Group=cm;var gm={root:`m_3eebeb36`,label:`m_9e365f20`},_m={orientation:`horizontal`},vm=O((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?x(t,e):void 0,"--divider-border-style":n,"--divider-size":Pe(r,`divider-size`)}})),ym=g(e=>{let t=D(`Divider`,_m,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=w({name:`Divider`,classes:gm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:vm});return(0,N.jsx)(Be,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,...h(`root`),...m,children:u&&(0,N.jsx)(Be,{component:`span`,mod:{position:d},...h(`label`),children:u})})});ym.classes=gm,ym.varsResolver=vm,ym.displayName=`@mantine/core/Divider`;var[bm,xm]=Sa(`Drawer component was not found in tree`),Sm={root:`m_f11b401e`,header:`m_5a7c2c9`,content:`m_b8a05bbd`,inner:`m_31cd769a`},Cm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerBody`,null,e);return(0,N.jsx)(Cp,{...xm().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Cm.classes=Sm,Cm.displayName=`@mantine/core/DrawerBody`;var wm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerCloseButton`,null,e);return(0,N.jsx)(wp,{...xm().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});wm.classes=Sm,wm.displayName=`@mantine/core/DrawerCloseButton`;var Tm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,radius:s,__hidden:c,...l}=D(`DrawerContent`,null,e),u=xm(),d=u.scrollAreaComponent||Mp;return(0,N.jsx)(Tp,{...u.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:u.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),...l,radius:s||u.radius||0,"data-hidden":c||void 0,children:(0,N.jsx)(d,{style:{height:`calc(100vh - var(--drawer-offset) * 2)`},children:o})})});Tm.classes=Sm,Tm.displayName=`@mantine/core/DrawerContent`;var Em=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerHeader`,null,e);return(0,N.jsx)(Ep,{...xm().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Em.classes=Sm,Em.displayName=`@mantine/core/DrawerHeader`;var Dm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerOverlay`,null,e);return(0,N.jsx)(kp,{...xm().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Dm.classes=Sm,Dm.displayName=`@mantine/core/DrawerOverlay`;function Om(e){switch(e){case`top`:return`flex-start`;case`bottom`:return`flex-end`;default:return}}function km(e){if(e===`top`||e===`bottom`)return`0 0 calc(100% - var(--drawer-offset, 0rem) * 2)`}var Am={top:`slide-down`,bottom:`slide-up`,left:`slide-right`,right:`slide-left`},jm={top:`slide-down`,bottom:`slide-up`,right:`slide-right`,left:`slide-left`},Mm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),position:`left`},Nm=O((e,{position:t,size:n,offset:r})=>({root:{"--drawer-size":Pe(n,`drawer-size`),"--drawer-flex":km(t),"--drawer-height":t===`left`||t===`right`?void 0:`var(--drawer-size)`,"--drawer-align":Om(t),"--drawer-justify":t===`right`?`flex-end`:void 0,"--drawer-offset":j(r)}})),Pm=g(e=>{let t=D(`DrawerRoot`,Mm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,scrollAreaComponent:c,position:l,transitionProps:u,radius:d,attributes:f,...p}=t,{dir:m}=Vo(),h=w({name:`Drawer`,classes:Sm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:Nm}),g=(m===`rtl`?jm:Am)[l];return(0,N.jsx)(bm,{value:{scrollAreaComponent:c,getStyles:h,radius:d},children:(0,N.jsx)(bp,{...h(`root`),transitionProps:{transition:g,...u},"data-offset-scrollbars":c===id.Autosize||void 0,unstyled:o,...p})})});Pm.classes=Sm,Pm.varsResolver=Nm,Pm.displayName=`@mantine/core/DrawerRoot`;var Fm=(0,M.createContext)(null);function Im({children:e}){let[t,n]=(0,M.useState)([]),[r,i]=(0,M.useState)(ka(`modal`));return(0,N.jsx)(Fm,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Im.displayName=`@mantine/core/DrawerStack`;var Lm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerTitle`,null,e);return(0,N.jsx)(jp,{...xm().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});Lm.classes=Sm,Lm.displayName=`@mantine/core/DrawerTitle`;var Rm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),withOverlay:!0,withCloseButton:!0},zm=g(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,opened:s,stackId:c,zIndex:l,...u}=D(`Drawer`,Rm,e),d=(0,M.use)(Fm),f=!!t||i,p=d&&c?{closeOnEscape:d.currentId===c,trapFocus:d.currentId===c,zIndex:d.getZIndex(c)}:{},m=n===!1?!1:c&&d?d.currentId===c:s;return(0,M.useEffect)(()=>{d&&c&&(s?d.addModal(c,l||ka(`modal`)):d.removeModal(c))},[s,c,l]),(0,N.jsxs)(Pm,{opened:s,zIndex:d&&c?d.getZIndex(c):l,...u,...p,children:[n&&(0,N.jsx)(Dm,{visible:m,transitionProps:d&&c?{duration:0}:void 0,...r}),(0,N.jsxs)(Tm,{__hidden:d&&c&&s?c!==d.currentId:!1,children:[f&&(0,N.jsxs)(Em,{children:[t&&(0,N.jsx)(Lm,{children:t}),i&&(0,N.jsx)(wm,{...a})]}),(0,N.jsx)(Cm,{children:o})]})]})});zm.classes=Sm,zm.displayName=`@mantine/core/Drawer`,zm.Root=Pm,zm.Overlay=Dm,zm.Content=Tm,zm.Body=Cm,zm.Header=Em,zm.Title=Lm,zm.CloseButton=wm,zm.Stack=Im;var Bm=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Vm={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function Hm(e){Object.keys(Vm).forEach(t=>{e.style.setProperty(t,Vm[t],`important`)})}function Um(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of Bm)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 Wm=null;function Gm(e,t,n=1,r=1/0){Wm||(Wm=document.createElement(`textarea`),Wm.setAttribute(`tabindex`,`-1`),Wm.setAttribute(`aria-hidden`,`true`),Wm.setAttribute(`aria-label`,`autosize measurement`),Hm(Wm)),Wm.parentNode===null&&document.body.appendChild(Wm);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{Wm.style[e]=o[e]}),Hm(Wm),Wm.value=t;let c=s===`border-box`?Wm.scrollHeight+a:Wm.scrollHeight-i;Wm.value=t,c=s===`border-box`?Wm.scrollHeight+a:Wm.scrollHeight-i,Wm.value=`x`;let l=Wm.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 Km({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,M.useRef)(null),s=ro(o,r),c=(0,M.useRef)(0),l=(0,M.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=Um(n);if(!r)return;let[i]=Gm(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=e=>{a||u(),n?.(e)};return(0,M.useLayoutEffect)(u),(0,M.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,M.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,u())});return t.observe(e),()=>t.disconnect()},[]),(0,M.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,M.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,N.jsx)(`textarea`,{rows:t,...i,onChange:d,ref:s})}var qm=g(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=D([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&fo()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,N.jsx)(ge,{component:l?Km:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});qm.classes=ge.classes,qm.displayName=`@mantine/core/Textarea`;var[Jm,Ym]=Sa(`Menu component was not found in the tree`),Xm=(0,M.createContext)(null);function Zm(e){let{value:t,defaultValue:n,onChange:r,children:i}=D(`MenuCheckboxGroup`,null,e),[a,o]=io({value:t,defaultValue:n,finalValue:[],onChange:r});return(0,N.jsx)(Xm,{value:{values:a,onChange:(0,M.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o])},children:i})}Zm.displayName=`@mantine/core/MenuCheckboxGroup`;var Qm=(0,M.createContext)(null);function $m({role:e,checked:t,indicator:n,onSelect:r,color:i,closeMenuOnClick:a,rightSection:o,children:s,disabled:c,dataDisabled:l,className:u,style:d,styles:f,classNames:p,buttonRef:m,others:g}){let _=Ym(),v=(0,M.use)(Qm),y=b(),{dir:x}=Vo(),S=(0,M.useRef)(null),C=Ma(g.onClick,()=>{l||(r(),a&&_.closeDropdownImmediately())}),w=Ma(g.onMouseMove,()=>{if(!_.hasSearch)return;let e=S.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==S.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),T=Ma(g.onKeyDown,e=>{e.key===`ArrowLeft`&&v&&(v.close(),v.focusParentItem())}),E=i?y.variantColorResolver({color:i,theme:y,variant:`light`}):void 0,D=i?ie({color:i,theme:y}):null,O=_.alignItemsLabels!==`none`||t;return(0,N.jsxs)(h,{onMouseDown:e=>e.preventDefault(),...g,unstyled:_.unstyled,tabIndex:_.menuItemTabIndex,..._.getStyles(`item`,{className:u,style:d,styles:f,classNames:p}),ref:ro(S,m),role:e,"aria-checked":t,disabled:c,"data-menu-item":!0,"data-checked":t||void 0,"data-disabled":c||l||void 0,"data-mantine-stop-propagation":!0,onClick:C,onMouseMove:w,onKeyDown:Da({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:_.loop,dir:x,orientation:`vertical`,onKeyDown:T}),__vars:{"--menu-item-color":D?.isThemeColor&&D?.shade===void 0?`var(--mantine-color-${D.color}-6)`:E?.color,"--menu-item-hover":E?.hover},children:[O&&(0,N.jsx)(`div`,{..._.getStyles(`itemIndicator`,{styles:f,classNames:p}),"data-checked":t||void 0,children:t?n:null}),s&&(0,N.jsx)(`div`,{..._.getStyles(`itemLabel`,{styles:f,classNames:p}),"data-menu-item-label":!0,children:s}),o&&(0,N.jsx)(`div`,{..._.getStyles(`itemSection`,{styles:f,classNames:p}),"data-position":`right`,children:o})]})}var eh={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},th=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...v}=D(`MenuCheckboxItem`,null,e),y=Ym(),b=(0,M.use)(Xm),x=b&&f!==void 0?b.values.includes(f):void 0,[S,C]=io({value:p??x,defaultValue:m,finalValue:!1,onChange:h});return(0,N.jsx)($m,{role:`menuitemcheckbox`,checked:S,indicator:g??y.checkIcon??(0,N.jsx)(im,{size:10}),onSelect:()=>{h?C(!S):b&&f!==void 0?b.onChange(f):C(!S)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:v,children:l})});th.classes=eh,th.displayName=`@mantine/core/MenuCheckboxItem`;function nh(e){let{children:t,disabled:n,longPressDelay:r}=D(`MenuContextMenu`,null,e),i=mo(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Ym(),o=kd();return(0,M.cloneElement)(i,Ad({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()}))}nh.displayName=`@mantine/core/MenuContextMenu`;var rh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`MenuDivider`,null,e);return(0,N.jsx)(Be,{...Ym().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});rh.classes=eh,rh.displayName=`@mantine/core/MenuDivider`;var ih=500;function ah(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function oh(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function sh({enabled:e,opened:t,getDropdown:n}){let r=(0,M.useRef)({buffer:``,timeoutId:null});return(0,M.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,M.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},ih);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||oh(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=D(`MenuDropdown`,null,e),f=(0,M.useRef)(null),p=Ym(),m=sh({enabled:!p.hasSearch,opened:p.opened,getDropdown:()=>f.current}),h=Ma(c,e=>{m(e),!(e.defaultPrevented||p.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),g=Ma(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),_=Ma(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,N.jsxs)(Ud.Dropdown,{...d,onMouseEnter:g,onMouseLeave:_,role:`menu`,"aria-orientation":`vertical`,ref:ro(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:h,children:[p.withInitialFocusPlaceholder&&!p.hasSearch&&(0,N.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});ch.classes=eh,ch.displayName=`@mantine/core/MenuDropdown`;var lh=te(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=D(`MenuItem`,null,e),g=Ym(),_=(0,M.use)(Qm),v=b(),{dir:y}=Vo(),x=(0,M.useRef)(null),S=m,C=Ma(S.onClick,()=>{f||(typeof s==`boolean`?s&&g.closeDropdownImmediately():g.closeOnItemClick&&g.closeDropdownImmediately())}),w=Ma(S.onMouseMove,()=>{if(!g.hasSearch)return;let e=x.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==x.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),T=o?v.variantColorResolver({color:o,theme:v,variant:`light`}):void 0,E=o?ie({color:o,theme:v}):null,O=Ma(S.onKeyDown,e=>{e.key===`ArrowLeft`&&_&&(_.close(),_.focusParentItem())});return(0,N.jsxs)(h,{onMouseDown:e=>e.preventDefault(),...m,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:ro(x,p),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:C,onMouseMove:w,onKeyDown:Da({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:O}),__vars:{"--menu-item-color":E?.isThemeColor&&E?.shade===void 0?`var(--mantine-color-${E.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[g.alignItemsLabels===`all`&&(0,N.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),c&&(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,N.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:u}),l&&(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});lh.classes=eh,lh.displayName=`@mantine/core/MenuItem`;var uh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`MenuLabel`,null,e);return(0,N.jsx)(Be,{...Ym().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});uh.classes=eh,uh.displayName=`@mantine/core/MenuLabel`;var dh=(0,M.createContext)(null);function fh(e){let{value:t,defaultValue:n,onChange:r,children:i}=D(`MenuRadioGroup`,null,e),[a,o]=io({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,N.jsx)(dh,{value:{value:a,onChange:e=>o(e)},children:i})}fh.displayName=`@mantine/core/MenuRadioGroup`;function ph({size:e,style:t,...n}){return(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:j(e),height:j(e),...t},"aria-hidden":!0,...n,children:(0,N.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var mh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=D(`MenuRadioItem`,null,e),v=Ym(),y=(0,M.use)(dh),b=p??(y?y.value===f:!1);return(0,N.jsx)($m,{role:`menuitemradio`,checked:b,indicator:h??v.checkIcon??(0,N.jsx)(ph,{size:5}),onSelect:()=>{b||(m?m(f):y&&y.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});mh.classes=eh,mh.displayName=`@mantine/core/MenuRadioItem`;var hh=`[data-menu-item]:not([data-disabled])`,gh=`[data-menu-active]`;function _h(e){return e?.closest(`[data-menu-dropdown]`)}function vh(e){return e?Array.from(e.querySelectorAll(hh)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function yh(e){e&&e.querySelectorAll(gh).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function bh(e,t){yh(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function xh(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Sh={clearSearchOnClose:!0},Ch=g(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,size:a,clearSearchOnClose:o,ref:s,...c}=D(`MenuSearch`,Sh,e),l=Ym(),u=(0,M.useRef)(null),d=ro(s,u),f=(0,M.useRef)(i);f.current=i,(0,M.useEffect)(()=>l.registerSearch(),[l.registerSearch]),(0,M.useEffect)(()=>{o?l.searchExitClearRef.current=()=>{f.current?.({currentTarget:{value:``}})}:l.searchExitClearRef.current=null},[o,l.searchExitClearRef]),(0,M.useEffect)(()=>{l.opened||yh(_h(u.current))},[l.opened]);let p=Ma(i,e=>{yh(_h(e.currentTarget))}),m=Ma(r,e=>{if(e.defaultPrevented)return;let t=_h(e.currentTarget),n=vh(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=xh(n);bh(n[r>=n.length-1?l.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=xh(n);bh(n[r<=0?r===-1||l.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&bh(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&bh(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[xh(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),h=l.getStyles(`search`);return(0,N.jsx)(oe,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:a,...c,ref:d,classNames:[{input:h.className},t],styles:[{input:h.style},n],onKeyDown:m,onChange:p,__staticSelector:`Menu`})});Ch.classes=eh,Ch.displayName=`@mantine/core/MenuSearch`;var wh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l,onKeyDown:u,children:d,ref:f,...p}=D(`MenuSubDropdown`,null,e),m=(0,M.useRef)(null),h=Ym(),g=(0,M.use)(Qm),_=sh({enabled:!h.hasSearch,opened:g?.opened??!1,getDropdown:()=>m.current}),v=Ma(u,e=>{_(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),y=g?.getFloatingProps({onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l});return(0,N.jsx)(Ud.Dropdown,{...p,...y,role:`menu`,"aria-orientation":`vertical`,ref:ro(f,m,g?.setFloating),...h.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:d})});wh.classes=eh,wh.displayName=`@mantine/core/MenuSubDropdown`;var Th=te(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=D(`MenuSubItem`,null,e),g=Ym(),_=(0,M.use)(Qm),v=b(),{dir:y}=Vo(),x=(0,M.useRef)(null),S=m,C=o?v.variantColorResolver({color:o,theme:v,variant:`light`}):void 0,w=o?ie({color:o,theme:v}):null,T=Ma(S.onKeyDown,e=>{e.key===`ArrowRight`&&(_?.open(),_?.focusFirstItem()),e.key===`ArrowLeft`&&_?.parentContext&&(_.parentContext.close(),_.parentContext.focusParentItem())}),E=Ma(S.onClick,()=>{!d&&f&&g.closeDropdownImmediately()}),O=Ma(S.onMouseMove,()=>{if(!g.hasSearch)return;let e=x.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==x.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),k=_?.getReferenceProps({onMouseEnter:S.onMouseEnter,onMouseLeave:S.onMouseLeave,onPointerEnter:S.onPointerEnter,onPointerLeave:S.onPointerLeave});return(0,N.jsxs)(h,{onMouseDown:e=>e.preventDefault(),...m,...k,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:ro(x,p,_?.setReference),role:`menuitem`,disabled:u,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:E,onMouseMove:O,onKeyDown:Da({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:T}),__vars:{"--menu-item-color":w?.isThemeColor&&w?.shade===void 0?`var(--mantine-color-${w.color}-6)`:C?.color,"--menu-item-hover":C?.hover},children:[g.alignItemsLabels===`all`&&(0,N.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),s&&(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,N.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:l}),(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,N.jsx)(Np,{...g.getStyles(`chevron`),size:14})})]})});Th.classes=eh,Th.displayName=`@mantine/core/MenuSubItem`;function Eh({children:e,refProp:t}){if(!xa(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return Ym(),(0,N.jsx)(Ud.Target,{refProp:t,popupType:`menu`,children:e})}Eh.displayName=`@mantine/core/MenuSubTarget`;var Dh={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Oh(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=D(`MenuSub`,Dh,e),l=pe(),[u,d]=io({value:o,finalValue:!1,onChange:s}),f=(0,M.use)(Qm),p=Ym(),{dir:m}=Vo(),h=hd(m,i),g=f?.registerOpenSub??p.registerOpenSub,_=(0,M.useRef)(null),v=(0,M.useCallback)(e=>{let t=_.current;return t&&t!==e&&t(),_.current=e,()=>{_.current===e&&(_.current=null)}},[]),y=(0,M.useRef)(d);y.current=d;let b=(0,M.useCallback)(()=>y.current(!0),[]),x=(0,M.useCallback)(()=>y.current(!1),[]);(0,M.useEffect)(()=>{if(u)return g(x)},[u,g,x]);let{context:S,refs:C}=Gu({placement:h,open:u,onOpenChange:e=>{e?b():x()}}),{getReferenceProps:w,getFloatingProps:T}=Yu([Mu(S,{handleClose:a?td(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,N.jsx)(Qm,{value:{opened:u,close:x,open:b,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:C.setReference,setFloating:C.setFloating,getReferenceProps:w,getFloatingProps:T,registerOpenSub:v},children:(0,N.jsx)(Ud,{opened:u,onChange:e=>e?b():x(),withinPortal:!1,withArrow:!1,id:l,position:i,...c,children:t})})}Oh.extend=e=>e,Oh.displayName=`@mantine/core/MenuSub`,Oh.Target=Eh,Oh.Dropdown=wh,Oh.Item=Th;var kh={refProp:`ref`};function Ah(e){let{children:t,refProp:n,...r}=D(`MenuTarget`,kh,e),i=mo(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Ym(),o=i.props,s=Ma(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=Ma(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=Ma(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,N.jsx)(Ud.Target,{refProp:n,popupType:`menu`,...r,children:(0,M.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Ah.displayName=`@mantine/core/MenuTarget`;var jh={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Mh=g(e=>{let t=D(`Menu`,jh,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:C,onExitTransitionEnd:E,alignItemsLabels:O,checkIcon:k,...ee}=t,te=w({name:`Menu`,classes:eh,props:t,classNames:h,styles:g,unstyled:_,attributes:C}),[ne,re]=io({value:a,defaultValue:o,finalValue:!1,onChange:c}),[A,ie]=(0,M.useState)(!1),ae=()=>{re(!1),ie(!1),ne&&i?.()},oe=()=>{re(!0),!ne&&r?.()},se=()=>{ne?ae():oe()},{openDropdown:ce,closeDropdown:le}=gd({open:oe,close:ae,closeDelay:m,openDelay:p}),ue=(0,M.useRef)(null),de=(0,M.useCallback)(e=>{let t=ue.current;return t&&t!==e&&t(),ue.current=e,()=>{ue.current===e&&(ue.current=null)}},[]),fe=(0,M.useRef)(0),[j,pe]=(0,M.useState)(!1),me=(0,M.useCallback)(()=>(fe.current+=1,fe.current===1&&pe(!0),()=>{--fe.current,fe.current===0&&pe(!1)}),[]),he=(0,M.useRef)(null),ge=()=>{he.current?.(),E?.()},_e=e=>Ia(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:ve,resolvedStyles:ye}=T({classNames:h,styles:g,props:t});return(0,N.jsx)(Jm,{value:{getStyles:te,opened:ne,toggleDropdown:se,getItemIndex:_e,openedViaClick:A,setOpenedViaClick:ie,closeOnItemClick:l,closeDropdown:f===`click`?ae:le,openDropdown:f===`click`?oe:ce,closeDropdownImmediately:ae,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S,registerOpenSub:de,hasSearch:j,registerSearch:me,searchExitClearRef:he,alignItemsLabels:O,checkIcon:k},children:(0,N.jsx)(Ud,{returnFocus:!0,...ee,opened:ne,onChange:se,defaultOpened:o,trapFocus:!x&&s,closeOnEscape:d,__staticSelector:`Menu`,classNames:ve,styles:ye,unstyled:_,variant:v,keepMounted:x,onExitTransitionEnd:ge,children:n})})});Mh.displayName=`@mantine/core/Menu`,Mh.classes=eh,Mh.Item=lh,Mh.Label=uh,Mh.Dropdown=ch,Mh.Target=Ah,Mh.Divider=rh,Mh.Search=Ch,Mh.Sub=Oh,Mh.CheckboxItem=th,Mh.CheckboxGroup=Zm,Mh.RadioItem=mh,Mh.RadioGroup=fh,Mh.ContextMenu=nh;var[Nh,Ph]=Sa(`Modal component was not found in tree`),Fh={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Ih=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalBody`,null,e);return(0,N.jsx)(Cp,{...Ph().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Ih.classes=Fh,Ih.displayName=`@mantine/core/ModalBody`;var Lh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalCloseButton`,null,e);return(0,N.jsx)(wp,{...Ph().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Lh.classes=Fh,Lh.displayName=`@mantine/core/ModalCloseButton`;var Rh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=D(`ModalContent`,null,e),l=Ph(),u=l.scrollAreaComponent||Mp;return(0,N.jsx)(Tp,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,N.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${j(l.yOffset)} * 2))`},children:o})})});Rh.classes=Fh,Rh.displayName=`@mantine/core/ModalContent`;var zh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalHeader`,null,e);return(0,N.jsx)(Ep,{...Ph().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});zh.classes=Fh,zh.displayName=`@mantine/core/ModalHeader`;var Bh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalOverlay`,null,e);return(0,N.jsx)(kp,{...Ph().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Bh.classes=Fh,Bh.displayName=`@mantine/core/ModalOverlay`;var Vh={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Hh=O((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:ce(t),"--modal-size":Pe(n,`modal-size`),"--modal-y-offset":j(r),"--modal-x-offset":j(i)}})),Uh=g(e=>{let t=D(`ModalRoot`,Vh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=w({name:m,classes:Fh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Hh});return(0,N.jsx)(Nh,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,N.jsx)(bp,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===id.Autosize||void 0,unstyled:o,...g})})});Uh.classes=Fh,Uh.varsResolver=Hh,Uh.displayName=`@mantine/core/ModalRoot`;var Wh=(0,M.createContext)(null);function Gh({children:e}){let[t,n]=(0,M.useState)([]),[r,i]=(0,M.useState)(ka(`modal`));return(0,N.jsx)(Wh,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Gh.displayName=`@mantine/core/ModalStack`;var Kh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalTitle`,null,e);return(0,N.jsx)(jp,{...Ph().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});Kh.classes=Fh,Kh.displayName=`@mantine/core/ModalTitle`;var qh={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},Jh=g(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=D(`Modal`,qh,e),f=(0,M.use)(Wh),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,M.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||ka(`modal`)):f.removeModal(l))},[c,l,u]),(0,N.jsxs)(Uh,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,N.jsx)(Bh,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,N.jsxs)(Rh,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,N.jsxs)(zh,{children:[t&&(0,N.jsx)(Kh,{children:t}),i&&(0,N.jsx)(Lh,{...a})]}),(0,N.jsx)(Ih,{children:o})]})]})});Jh.classes=Fh,Jh.displayName=`@mantine/core/Modal`,Jh.Root=Uh,Jh.Overlay=Bh,Jh.Content=Rh,Jh.Body=Ih,Jh.Header=zh,Jh.Title=Kh,Jh.CloseButton=Lh,Jh.Stack=Gh;function Yh({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,M.useState)(n),a=(0,M.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Gu({placement:t,middleware:[$l({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,M.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,M.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=Hs(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var Xh={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Zh={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:ka(`popover`)},Qh=O((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:ce(t),"--tooltip-bg":n?x(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),$h=g(e=>{let t=D(`TooltipFloating`,Zh,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:x,portalProps:S,attributes:C,ref:T,...E}=t,O=b(),k=w({name:`TooltipFloating`,props:t,classes:Xh,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:C,rootSelector:`tooltip`,vars:x,varsResolver:Qh}),{handleMouseMove:ee,x:te,y:ne,opened:re,boundaryRef:A,floating:ie,setOpened:ae}=Yh({offset:p,position:m,defaultOpened:v}),oe=mo(n);if(!oe)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let se=ro(A,po(oe),T),ce=oe.props,le=e=>{ce.onMouseEnter?.(e),ee(e),ae(!0)},ue=e=>{ce.onMouseLeave?.(e),ae(!1)};return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Td,{...S,withinPortal:i,children:(0,N.jsx)(Be,{...E,...k(`tooltip`,{style:{...zo(a,O),zIndex:g,display:!_&&re?`block`:`none`,top:Number.isFinite(ne)?Math.round(ne):``,left:Number.isFinite(te)?Math.round(te):``}}),variant:y,ref:ie,mod:{multiline:h},children:f})}),(0,M.cloneElement)(oe,{...ce,[r]:se,onMouseEnter:le,onMouseLeave:ue})]})});$h.classes=Xh,$h.varsResolver=Qh,$h.displayName=`@mantine/core/TooltipFloating`;var eg=(0,M.createContext)({withinGroup:!1}),tg={openDelay:0,closeDelay:0};function ng(e){let{openDelay:t,closeDelay:n,children:r}=D(`TooltipGroup`,tg,e);return(0,N.jsx)(eg,{value:{withinGroup:!0},children:(0,N.jsx)(Iu,{delay:{open:t,close:n},children:r})})}ng.displayName=`@mantine/core/TooltipGroup`,ng.extend=e=>e;function rg(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function ig(e){let t=rg(e.middlewares),n=[Ql(e.offset)];return t.shift&&n.push($l(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?tu():tu(t.flip)),n.push(au({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?iu():iu(t.inline)):e.inline&&n.push(iu()),n}function ag(e){let[t,n]=(0,M.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,M.use)(eg).withinGroup,a=pe(),o=(0,M.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=Gu({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:ig(e),whileElementsMounted:Pl}),{delay:m,currentId:h,setCurrentId:g}=Lu(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=Yu([Mu(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?td():null}),qu(l,{enabled:e.events?.focus,visibleOnly:!0}),Zu(l,{role:`tooltip`}),Uu(l,{enabled:e.opened===void 0})]),y=(0,M.useRef)(d);Ee(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var og={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:ka(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},sg=O((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:ce(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),cg=g(e=>{let t=D(`Tooltip`,og,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:T,transitionProps:E,multiline:O,events:k,interactive:ee,zIndex:te,disabled:ne,onClick:re,onMouseEnter:A,onMouseLeave:ie,inline:oe,variant:se,keepMounted:ce,vars:le,portalProps:ue,mod:de,floatingStrategy:fe,middlewares:j,autoContrast:pe,attributes:me,target:he,ref:ge,..._e}=t,{dir:ve}=Vo(),ye=(0,M.useRef)(null),be=ag({position:hd(ve,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:k,interactive:ee,arrowRef:ye,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:oe,strategy:fe,middlewares:j});(0,M.useEffect)(()=>{let e=he instanceof HTMLElement?he:typeof he==`string`?document.querySelector(he):he?.current||null;e&&be.reference(e)},[he,be]);let xe=w({name:`Tooltip`,props:t,classes:Xh,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:me,rootSelector:`tooltip`,vars:le,varsResolver:sg}),Se=mo(n);if(!he&&!Se)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let Ce=xe(`tooltip`),we=ee&&!ne&&!!be.opened,Te=C===`merge`&&y?pd({position:be.placement,dir:ve}):void 0;if(he){let e=Dd(E,{duration:100,transition:`fade`});return(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(Td,{...ue,withinPortal:d,children:(0,N.jsx)(Ve,{...e,keepMounted:ce,mounted:!ne&&!!be.opened,duration:be.isGroupPhase?10:e.duration,children:e=>(0,N.jsxs)(Be,{..._e,"data-fixed":fe===`fixed`||void 0,variant:se,mod:[{multiline:O,interactive:we},de],...Ce,...be.getFloatingProps({ref:be.floating,className:Ce.className,style:{...Ce.style,...e,...Te,zIndex:te,top:be.y??0,left:be.x??0}}),children:[a,(0,N.jsx)(md,{ref:ye,arrowX:be.arrowX,arrowY:be.arrowY,visible:y,position:be.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...xe(`arrow`)})]})})})})}let Ee=Se.props,De=ro(be.reference,po(Se),ge),Oe=Dd(E,{duration:100,transition:`fade`});return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Td,{...ue,withinPortal:d,children:(0,N.jsx)(Ve,{...Oe,keepMounted:ce,mounted:!ne&&!!be.opened,duration:be.isGroupPhase?10:Oe.duration,children:e=>(0,N.jsxs)(Be,{..._e,"data-fixed":fe===`fixed`||void 0,variant:se,mod:[{multiline:O,interactive:we},de],...be.getFloatingProps({ref:be.floating,className:xe(`tooltip`).className,style:{...xe(`tooltip`).style,...e,...Te,zIndex:te,top:be.y??0,left:be.x??0}}),children:[a,(0,N.jsx)(md,{ref:ye,arrowX:be.arrowX,arrowY:be.arrowY,visible:y,position:be.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...xe(`arrow`)})]})})}),(0,M.cloneElement)(Se,be.getReferenceProps({onClick:re,onMouseEnter:A,onMouseLeave:ie,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...Ee,className:ae(v,Ee.className),[i]:De}))]})});cg.classes=Xh,cg.varsResolver=sg,cg.displayName=`@mantine/core/Tooltip`,cg.Floating=$h,cg.Group=ng;function lg(e){if(e!==void 0)return typeof e==`number`?j(e):e}function ug({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=b(),s=t===void 0?e:t,c=r!==void 0,l=Se({"--sg-spacing-x":de(Fa(e)),"--sg-spacing-y":de(Fa(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":lg(r)}:{"--sg-cols":Fa(n)?.toString()}}),u=ke(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=de(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=de(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,N.jsx)(be,{styles:l,media:Pa(ke(u),o.breakpoints).filter(e=>ke(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function dg(e){return typeof e==`object`&&e?ke(e):[]}function fg(e){return e.sort((e,t)=>ba(e)-ba(t))}function pg({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return fg(Array.from(new Set([...dg(e),...dg(t),...r===void 0?dg(n):[]])))}function mg({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=Se({"--sg-spacing-x":de(Fa(e)),"--sg-spacing-y":de(Fa(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":lg(r)}:{"--sg-cols":Fa(n)?.toString()}}),l=pg({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`]=de(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=de(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,N.jsx)(be,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var hg={container:`m_925c2d2c`,root:`m_2415a157`},gg={cols:1,spacing:`md`,type:`media`},_g=g(e=>{let t=D(`SimpleGrid`,gg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=w({name:`SimpleGrid`,classes:hg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=E(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(mg,{...t,selector:`.${v}`}),(0,N.jsx)(`div`,{..._(`container`),children:(0,N.jsx)(Be,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ug,{...t,selector:`.${v}`}),(0,N.jsx)(Be,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});_g.classes=hg,_g.displayName=`@mantine/core/SimpleGrid`;var vg={root:`m_d08caa0`},yg=g(e=>{let t=D(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t;return(0,N.jsx)(Be,{...w({name:`Typography`,classes:vg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s})(`root`),...c})});yg.classes=vg,yg.displayName=`@mantine/core/Typography`;var bg=[];for(let e=0;e<256;++e)bg.push((e+256).toString(16).slice(1));function xg(e,t=0){return(bg[e[t+0]]+bg[e[t+1]]+bg[e[t+2]]+bg[e[t+3]]+`-`+bg[e[t+4]]+bg[e[t+5]]+`-`+bg[e[t+6]]+bg[e[t+7]]+`-`+bg[e[t+8]]+bg[e[t+9]]+`-`+bg[e[t+10]]+bg[e[t+11]]+bg[e[t+12]]+bg[e[t+13]]+bg[e[t+14]]+bg[e[t+15]]).toLowerCase()}var Sg,Cg=new Uint8Array(16);function wg(){if(!Sg){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Sg=crypto.getRandomValues.bind(crypto)}return Sg(Cg)}var Tg={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Eg(e,t,n){if(Tg.randomUUID&&!t&&!e)return Tg.randomUUID();e||={};let r=e.random??e.rng?.()??wg();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return xg(r)}var Dg;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Dg||={});var Og;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Og||={});var P=Dg.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),kg=e=>{switch(typeof e){case`undefined`:return P.undefined;case`string`:return P.string;case`number`:return Number.isNaN(e)?P.nan:P.number;case`boolean`:return P.boolean;case`function`:return P.function;case`bigint`:return P.bigint;case`symbol`:return P.symbol;case`object`:return Array.isArray(e)?P.array:e===null?P.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?P.promise:typeof Map<`u`&&e instanceof Map?P.map:typeof Set<`u`&&e instanceof Set?P.set:typeof Date<`u`&&e instanceof Date?P.date:P.object;default:return P.unknown}},F=Dg.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Ag=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Ag.create=e=>new Ag(e);var jg=(e,t)=>{let n;switch(e.code){case F.invalid_type:n=e.received===P.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case F.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Dg.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:n=`Unrecognized key(s) in object: ${Dg.joinValues(e.keys,`, `)}`;break;case F.invalid_union:n=`Invalid input`;break;case F.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Dg.joinValues(e.options)}`;break;case F.invalid_enum_value:n=`Invalid enum value. Expected ${Dg.joinValues(e.options)}, received '${e.received}'`;break;case F.invalid_arguments:n=`Invalid function arguments`;break;case F.invalid_return_type:n=`Invalid function return type`;break;case F.invalid_date:n=`Invalid date`;break;case F.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Dg.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case F.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case F.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case F.custom:n=`Invalid input`;break;case F.invalid_intersection_types:n=`Intersection results could not be merged`;break;case F.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case F.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Dg.assertNever(e)}return{message:n}},Mg=jg;function Ng(){return Mg}var Pg=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function I(e,t){let n=Ng(),r=Pg({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===jg?void 0:jg].filter(e=>!!e)});e.common.issues.push(r)}var Fg=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return L;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return L;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},L=Object.freeze({status:`aborted`}),Ig=e=>({status:`dirty`,value:e}),Lg=e=>({status:`valid`,value:e}),Rg=e=>e.status===`aborted`,zg=e=>e.status===`dirty`,Bg=e=>e.status===`valid`,Vg=e=>typeof Promise<`u`&&e instanceof Promise,R;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(R||={});var Hg=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ug=(e,t)=>{if(Bg(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Ag(e.common.issues);return this._error=t,this._error}}};function Wg(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var Gg=class{get description(){return this._def.description}_getType(e){return kg(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:kg(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Fg,ctx:{common:e.parent.common,data:e.data,parsedType:kg(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Vg(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kg(e)};return Ug(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kg(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Bg(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Bg(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kg(e)},r=this._parse({data:e,path:n.path,parent:n});return Ug(n,await(Vg(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:F.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new J_({schema:this,typeName:z.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return Y_.create(this,this._def)}nullable(){return X_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return k_.create(this)}promise(){return q_.create(this,this._def)}or(e){return M_.create([this,e],this._def)}and(e){return I_.create(this,e,this._def)}transform(e){return new J_({...Wg(this._def),schema:this,typeName:z.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Z_({...Wg(this._def),innerType:this,defaultValue:t,typeName:z.ZodDefault})}brand(){return new ev({typeName:z.ZodBranded,type:this,...Wg(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Q_({...Wg(this._def),innerType:this,catchValue:t,typeName:z.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return tv.create(this,e)}readonly(){return nv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Kg=/^c[^\s-]{8,}$/i,qg=/^[0-9a-z]+$/,Jg=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Yg=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xg=/^[a-z0-9_-]{21}$/i,Zg=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Qg=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$g=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,e_=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,t_,n_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,r_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,i_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,a_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,o_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,s_=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,c_=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,l_=RegExp(`^${c_}$`);function u_(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function d_(e){return RegExp(`^${u_(e)}$`)}function f_(e){let t=`${c_}T${u_(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function p_(e,t){return!((t!==`v4`&&t||!n_.test(e))&&(t!==`v6`&&t||!i_.test(e)))}function m_(e,t){if(!Zg.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function h_(e,t){return!((t!==`v4`&&t||!r_.test(e))&&(t!==`v6`&&t||!a_.test(e)))}var g_=class e extends Gg{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.string,received:t.parsedType}),L}let t=new Fg,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:F.invalid_string,...R.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...R.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...R.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...R.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...R.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...R.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...R.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...R.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...R.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...R.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...R.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...R.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...R.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...R.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...R.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...R.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...R.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...R.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...R.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...R.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...R.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...R.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...R.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...R.errToObj(t)})}nonempty(e){return this.min(1,R.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew g_({checks:[],typeName:z.ZodString,coerce:e?.coerce??!1,...Wg(e)});function __(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var v_=class e extends Gg{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P.number){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.number,received:t.parsedType}),L}let t,n=new Fg;for(let r of this._def.checks)r.kind===`int`?Dg.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),I(t,{code:F.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?__(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_finite,message:r.message}),n.dirty()):Dg.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,R.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,R.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,R.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,R.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:R.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:R.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:R.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:R.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:R.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:R.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&Dg.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew v_({checks:[],typeName:z.ZodNumber,coerce:e?.coerce||!1,...Wg(e)});var y_=class e extends Gg{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==P.bigint)return this._getInvalidInput(e);let t,n=new Fg;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Dg.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.bigint,received:t.parsedType}),L}gte(e,t){return this.setLimit(`min`,e,!0,R.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,R.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,R.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,R.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:R.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:R.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew y_({checks:[],typeName:z.ZodBigInt,coerce:e?.coerce??!1,...Wg(e)});var b_=class extends Gg{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P.boolean){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.boolean,received:t.parsedType}),L}return Lg(e.data)}};b_.create=e=>new b_({typeName:z.ZodBoolean,coerce:e?.coerce||!1,...Wg(e)});var x_=class e extends Gg{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.date,received:t.parsedType}),L}if(Number.isNaN(e.data.getTime()))return I(this._getOrReturnCtx(e),{code:F.invalid_date}),L;let t=new Fg,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Dg.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:R.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:R.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew x_({checks:[],coerce:e?.coerce||!1,typeName:z.ZodDate,...Wg(e)});var S_=class extends Gg{_parse(e){if(this._getType(e)!==P.symbol){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.symbol,received:t.parsedType}),L}return Lg(e.data)}};S_.create=e=>new S_({typeName:z.ZodSymbol,...Wg(e)});var C_=class extends Gg{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.undefined,received:t.parsedType}),L}return Lg(e.data)}};C_.create=e=>new C_({typeName:z.ZodUndefined,...Wg(e)});var w_=class extends Gg{_parse(e){if(this._getType(e)!==P.null){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.null,received:t.parsedType}),L}return Lg(e.data)}};w_.create=e=>new w_({typeName:z.ZodNull,...Wg(e)});var T_=class extends Gg{constructor(){super(...arguments),this._any=!0}_parse(e){return Lg(e.data)}};T_.create=e=>new T_({typeName:z.ZodAny,...Wg(e)});var E_=class extends Gg{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Lg(e.data)}};E_.create=e=>new E_({typeName:z.ZodUnknown,...Wg(e)});var D_=class extends Gg{_parse(e){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.never,received:t.parsedType}),L}};D_.create=e=>new D_({typeName:z.ZodNever,...Wg(e)});var O_=class extends Gg{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.void,received:t.parsedType}),L}return Lg(e.data)}};O_.create=e=>new O_({typeName:z.ZodVoid,...Wg(e)});var k_=class e extends Gg{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==P.array)return I(t,{code:F.invalid_type,expected:P.array,received:t.parsedType}),L;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(I(t,{code:F.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Hg(t,e,t.path,n)))).then(e=>Fg.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Hg(t,e,t.path,n)));return Fg.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:R.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:R.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:R.toString(n)}})}nonempty(e){return this.min(1,e)}};k_.create=(e,t)=>new k_({type:e,minLength:null,maxLength:null,exactLength:null,typeName:z.ZodArray,...Wg(t)});function A_(e){if(e instanceof j_){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Y_.create(A_(r))}return new j_({...e._def,shape:()=>t})}return e instanceof k_?new k_({...e._def,type:A_(e.element)}):e instanceof Y_?Y_.create(A_(e.unwrap())):e instanceof X_?X_.create(A_(e.unwrap())):e instanceof L_?L_.create(e.items.map(e=>A_(e))):e}var j_=class e extends Gg{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Dg.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==P.object){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.object,received:t.parsedType}),L}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof D_&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Hg(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof D_){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(I(n,{code:F.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Hg(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Fg.mergeObjectSync(t,e)):Fg.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return R.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:R.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:z.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Dg.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Dg.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return A_(this)}partial(t){let n={};for(let e of Dg.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Dg.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof Y_;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return W_(Dg.objectKeys(this.shape))}};j_.create=(e,t)=>new j_({shape:()=>e,unknownKeys:`strip`,catchall:D_.create(),typeName:z.ZodObject,...Wg(t)}),j_.strictCreate=(e,t)=>new j_({shape:()=>e,unknownKeys:`strict`,catchall:D_.create(),typeName:z.ZodObject,...Wg(t)}),j_.lazycreate=(e,t)=>new j_({shape:e,unknownKeys:`strip`,catchall:D_.create(),typeName:z.ZodObject,...Wg(t)});var M_=class extends Gg{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Ag(e.ctx.common.issues));return I(t,{code:F.invalid_union,unionErrors:n}),L}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Ag(e));return I(t,{code:F.invalid_union,unionErrors:i}),L}}get options(){return this._def.options}};M_.create=(e,t)=>new M_({options:e,typeName:z.ZodUnion,...Wg(t)});var N_=e=>e instanceof H_?N_(e.schema):e instanceof J_?N_(e.innerType()):e instanceof U_?[e.value]:e instanceof G_?e.options:e instanceof K_?Dg.objectValues(e.enum):e instanceof Z_?N_(e._def.innerType):e instanceof C_?[void 0]:e instanceof w_?[null]:e instanceof Y_?[void 0,...N_(e.unwrap())]:e instanceof X_?[null,...N_(e.unwrap())]:e instanceof ev||e instanceof nv?N_(e.unwrap()):e instanceof Q_?N_(e._def.innerType):[],P_=class e extends Gg{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.object)return I(t,{code:F.invalid_type,expected:P.object,received:t.parsedType}),L;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(I(t,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),L)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=N_(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Wg(r)})}};function F_(e,t){let n=kg(e),r=kg(t);if(e===t)return{valid:!0,data:e};if(n===P.object&&r===P.object){let n=Dg.objectKeys(t),r=Dg.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=F_(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===P.array&&r===P.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(Rg(e)||Rg(r))return L;let i=F_(e.value,r.value);return i.valid?((zg(e)||zg(r))&&t.dirty(),{status:t.value,value:i.data}):(I(n,{code:F.invalid_intersection_types}),L)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};I_.create=(e,t,n)=>new I_({left:e,right:t,typeName:z.ZodIntersection,...Wg(n)});var L_=class e extends Gg{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.array)return I(n,{code:F.invalid_type,expected:P.array,received:n.parsedType}),L;if(n.data.lengththis._def.items.length&&(I(n,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Hg(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Fg.mergeArray(t,e)):Fg.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};L_.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new L_({items:e,typeName:z.ZodTuple,rest:null,...Wg(t)})};var R_=class e extends Gg{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.object)return I(n,{code:F.invalid_type,expected:P.object,received:n.parsedType}),L;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Hg(n,e,n.path,e)),value:a._parse(new Hg(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Fg.mergeObjectAsync(t,r):Fg.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Gg?new e({keyType:t,valueType:n,typeName:z.ZodRecord,...Wg(r)}):new e({keyType:g_.create(),valueType:t,typeName:z.ZodRecord,...Wg(n)})}},z_=class extends Gg{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.map)return I(n,{code:F.invalid_type,expected:P.map,received:n.parsedType}),L;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Hg(n,e,n.path,[a,`key`])),value:i._parse(new Hg(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return L;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return L;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};z_.create=(e,t,n)=>new z_({valueType:t,keyType:e,typeName:z.ZodMap,...Wg(n)});var B_=class e extends Gg{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.set)return I(n,{code:F.invalid_type,expected:P.set,received:n.parsedType}),L;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(I(n,{code:F.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return L;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Hg(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:R.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:R.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};B_.create=(e,t)=>new B_({valueType:e,minSize:null,maxSize:null,typeName:z.ZodSet,...Wg(t)});var V_=class e extends Gg{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.function)return I(t,{code:F.invalid_type,expected:P.function,received:t.parsedType}),L;function n(e,n){return Pg({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ng(),jg].filter(e=>!!e),issueData:{code:F.invalid_arguments,argumentsError:n}})}function r(e,n){return Pg({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ng(),jg].filter(e=>!!e),issueData:{code:F.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof q_){let e=this;return Lg(async function(...t){let o=new Ag([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return Lg(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Ag([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Ag([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:L_.create(t).rest(E_.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||L_.create([]).rest(E_.create()),returns:n||E_.create(),typeName:z.ZodFunction,...Wg(r)})}},H_=class extends Gg{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};H_.create=(e,t)=>new H_({getter:e,typeName:z.ZodLazy,...Wg(t)});var U_=class extends Gg{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return I(t,{received:t.data,code:F.invalid_literal,expected:this._def.value}),L}return{status:`valid`,value:e.data}}get value(){return this._def.value}};U_.create=(e,t)=>new U_({value:e,typeName:z.ZodLiteral,...Wg(t)});function W_(e,t){return new G_({values:e,typeName:z.ZodEnum,...Wg(t)})}var G_=class e extends Gg{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return I(t,{expected:Dg.joinValues(n),received:t.parsedType,code:F.invalid_type}),L}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return I(t,{received:t.data,code:F.invalid_enum_value,options:n}),L}return Lg(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};G_.create=W_;var K_=class extends Gg{_parse(e){let t=Dg.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==P.string&&n.parsedType!==P.number){let e=Dg.objectValues(t);return I(n,{expected:Dg.joinValues(e),received:n.parsedType,code:F.invalid_type}),L}if(this._cache||=new Set(Dg.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Dg.objectValues(t);return I(n,{received:n.data,code:F.invalid_enum_value,options:e}),L}return Lg(e.data)}get enum(){return this._def.values}};K_.create=(e,t)=>new K_({values:e,typeName:z.ZodNativeEnum,...Wg(t)});var q_=class extends Gg{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==P.promise&&t.common.async===!1?(I(t,{code:F.invalid_type,expected:P.promise,received:t.parsedType}),L):Lg((t.parsedType===P.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};q_.create=(e,t)=>new q_({type:e,typeName:z.ZodPromise,...Wg(t)});var J_=class extends Gg{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{I(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return L;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?L:r.status===`dirty`||t.value===`dirty`?Ig(r.value):r});{if(t.value===`aborted`)return L;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?L:r.status===`dirty`||t.value===`dirty`?Ig(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?L:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?L:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Bg(e))return L;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Bg(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):L)}Dg.assertNever(r)}};J_.create=(e,t,n)=>new J_({schema:e,typeName:z.ZodEffects,effect:t,...Wg(n)}),J_.createWithPreprocess=(e,t,n)=>new J_({schema:t,effect:{type:`preprocess`,transform:e},typeName:z.ZodEffects,...Wg(n)});var Y_=class extends Gg{_parse(e){return this._getType(e)===P.undefined?Lg(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Y_.create=(e,t)=>new Y_({innerType:e,typeName:z.ZodOptional,...Wg(t)});var X_=class extends Gg{_parse(e){return this._getType(e)===P.null?Lg(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};X_.create=(e,t)=>new X_({innerType:e,typeName:z.ZodNullable,...Wg(t)});var Z_=class extends Gg{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===P.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Z_.create=(e,t)=>new Z_({innerType:e,typeName:z.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Wg(t)});var Q_=class extends Gg{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Vg(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Ag(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Ag(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Q_.create=(e,t)=>new Q_({innerType:e,typeName:z.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Wg(t)});var $_=class extends Gg{_parse(e){if(this._getType(e)!==P.nan){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.nan,received:t.parsedType}),L}return{status:`valid`,value:e.data}}};$_.create=e=>new $_({typeName:z.ZodNaN,...Wg(e)});var ev=class extends Gg{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},tv=class e extends Gg{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?L:e.status===`dirty`?(t.dirty(),Ig(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?L:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:z.ZodPipeline})}},nv=class extends Gg{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Bg(e)&&(e.value=Object.freeze(e.value)),e);return Vg(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};nv.create=(e,t)=>new nv({innerType:e,typeName:z.ZodReadonly,...Wg(t)}),j_.lazycreate;var z;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(z||={});var B=g_.create,rv=v_.create;$_.create,y_.create;var iv=b_.create;x_.create,S_.create,C_.create,w_.create;var av=T_.create,ov=E_.create;D_.create,O_.create;var sv=k_.create,cv=j_.create;j_.strictCreate;var lv=M_.create,uv=P_.create;I_.create,L_.create;var dv=R_.create;z_.create,B_.create,V_.create,H_.create;var V=U_.create,fv=G_.create,pv=K_.create;q_.create,J_.create,Y_.create,X_.create,J_.createWithPreprocess,tv.create;var mv=qe(),hv=cv({name:B(),arguments:B()}),gv=cv({id:B(),type:V(`function`),function:hv,encryptedValue:B().optional()}),_v=cv({id:B(),role:B(),content:B().optional(),name:B().optional(),encryptedValue:B().optional()}),vv=cv({type:V(`text`),text:B()}),yv=uv(`type`,[cv({type:V(`data`),value:B(),mimeType:B()}),cv({type:V(`url`),value:B(),mimeType:B().optional()})]),bv=cv({type:V(`image`),source:yv,metadata:ov().optional()}),xv=cv({type:V(`audio`),source:yv,metadata:ov().optional()}),Sv=cv({type:V(`video`),source:yv,metadata:ov().optional()}),Cv=cv({type:V(`document`),source:yv,metadata:ov().optional()}),wv=cv({type:V(`binary`),mimeType:B(),id:B().optional(),url:B().optional(),data:B().optional(),filename:B().optional()}),Tv=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:F.custom,message:`BinaryInputContent requires at least one of id, url, or data.`,path:[`id`]})};wv.superRefine((e,t)=>{Tv(e,t)});var Ev=uv(`type`,[vv,bv,xv,Sv,Cv,wv]).superRefine((e,t)=>{e.type===`binary`&&Tv(e,t)}),Dv=uv(`role`,[_v.extend({role:V(`developer`),content:B()}),_v.extend({role:V(`system`),content:B()}),_v.extend({role:V(`assistant`),content:B().optional(),toolCalls:sv(gv).optional()}),_v.extend({role:V(`user`),content:lv([B(),sv(Ev)])}),cv({id:B(),content:B(),role:V(`tool`),toolCallId:B(),error:B().optional(),encryptedValue:B().optional()}),cv({id:B(),role:V(`activity`),activityType:B(),content:dv(av())}),cv({id:B(),role:V(`reasoning`),content:B(),encryptedValue:B().optional()})]);lv([V(`developer`),V(`system`),V(`assistant`),V(`user`),V(`tool`),V(`activity`),V(`reasoning`)]);var Ov=cv({description:B(),value:B()}),kv=cv({name:B(),description:B(),parameters:av(),metadata:dv(av()).optional()}),Av=cv({id:B(),reason:B(),message:B().optional(),toolCallId:B().optional(),responseSchema:dv(av()).optional(),expiresAt:B().optional(),metadata:dv(av()).optional()}),jv=cv({interruptId:B(),status:fv([`resolved`,`cancelled`]),payload:av().optional()}),Mv=cv({threadId:B(),runId:B(),parentRunId:B().optional(),state:av(),messages:sv(Dv),tools:sv(kv),context:sv(Ov),forwardedProps:av(),resume:sv(jv).optional()}),Nv=av(),Pv=class extends Error{constructor(e){super(e)}},Fv=class extends Pv{constructor(){super(`Connect not implemented. This method is not supported by the current agent.`)}},Iv=cv({name:B(),description:B().optional()}),Lv=cv({name:B().optional(),type:B().optional(),description:B().optional(),version:B().optional(),provider:B().optional(),documentationUrl:B().optional(),metadata:dv(ov()).optional()}),Rv=cv({streaming:iv().optional(),websocket:iv().optional(),httpBinary:iv().optional(),pushNotifications:iv().optional(),resumable:iv().optional()}),zv=cv({supported:iv().optional(),items:sv(kv).optional(),parallelCalls:iv().optional(),clientProvided:iv().optional()}),Bv=cv({structuredOutput:iv().optional(),supportedMimeTypes:sv(B()).optional()}),Vv=cv({snapshots:iv().optional(),deltas:iv().optional(),memory:iv().optional(),persistentState:iv().optional()}),Hv=cv({supported:iv().optional(),delegation:iv().optional(),handoffs:iv().optional(),subAgents:sv(Iv).optional()}),Uv=cv({supported:iv().optional(),streaming:iv().optional(),encrypted:iv().optional()}),Wv=cv({image:iv().optional(),audio:iv().optional(),video:iv().optional(),pdf:iv().optional(),file:iv().optional()}),Gv=cv({image:iv().optional(),audio:iv().optional()}),Kv=cv({input:Wv.optional(),output:Gv.optional()}),qv=cv({codeExecution:iv().optional(),sandboxed:iv().optional(),maxIterations:rv().optional(),maxExecutionTime:rv().optional()}),Jv=cv({supported:iv().optional(),approvals:iv().optional(),interventions:iv().optional(),feedback:iv().optional(),interrupts:iv().optional(),approveWithEdits:iv().optional()});cv({identity:Lv.optional(),transport:Rv.optional(),tools:zv.optional(),output:Bv.optional(),state:Vv.optional(),multiAgent:Hv.optional(),reasoning:Uv.optional(),multimodal:Kv.optional(),execution:qv.optional(),humanInTheLoop:Jv.optional(),custom:dv(ov()).optional()});var Yv=lv([V(`developer`),V(`system`),V(`assistant`),V(`user`)]),H=function(e){return e.TEXT_MESSAGE_START=`TEXT_MESSAGE_START`,e.TEXT_MESSAGE_CONTENT=`TEXT_MESSAGE_CONTENT`,e.TEXT_MESSAGE_END=`TEXT_MESSAGE_END`,e.TEXT_MESSAGE_CHUNK=`TEXT_MESSAGE_CHUNK`,e.TOOL_CALL_START=`TOOL_CALL_START`,e.TOOL_CALL_ARGS=`TOOL_CALL_ARGS`,e.TOOL_CALL_END=`TOOL_CALL_END`,e.TOOL_CALL_CHUNK=`TOOL_CALL_CHUNK`,e.TOOL_CALL_RESULT=`TOOL_CALL_RESULT`,e.THINKING_START=`THINKING_START`,e.THINKING_END=`THINKING_END`,e.THINKING_TEXT_MESSAGE_START=`THINKING_TEXT_MESSAGE_START`,e.THINKING_TEXT_MESSAGE_CONTENT=`THINKING_TEXT_MESSAGE_CONTENT`,e.THINKING_TEXT_MESSAGE_END=`THINKING_TEXT_MESSAGE_END`,e.STATE_SNAPSHOT=`STATE_SNAPSHOT`,e.STATE_DELTA=`STATE_DELTA`,e.MESSAGES_SNAPSHOT=`MESSAGES_SNAPSHOT`,e.ACTIVITY_SNAPSHOT=`ACTIVITY_SNAPSHOT`,e.ACTIVITY_DELTA=`ACTIVITY_DELTA`,e.RAW=`RAW`,e.CUSTOM=`CUSTOM`,e.RUN_STARTED=`RUN_STARTED`,e.RUN_FINISHED=`RUN_FINISHED`,e.RUN_ERROR=`RUN_ERROR`,e.STEP_STARTED=`STEP_STARTED`,e.STEP_FINISHED=`STEP_FINISHED`,e.REASONING_START=`REASONING_START`,e.REASONING_MESSAGE_START=`REASONING_MESSAGE_START`,e.REASONING_MESSAGE_CONTENT=`REASONING_MESSAGE_CONTENT`,e.REASONING_MESSAGE_END=`REASONING_MESSAGE_END`,e.REASONING_MESSAGE_CHUNK=`REASONING_MESSAGE_CHUNK`,e.REASONING_END=`REASONING_END`,e.REASONING_ENCRYPTED_VALUE=`REASONING_ENCRYPTED_VALUE`,e}({}),Xv=cv({type:pv(H),timestamp:rv().optional(),rawEvent:av().optional()}).passthrough(),Zv=Xv.extend({type:V(H.TEXT_MESSAGE_START),messageId:B(),role:Yv.default(`assistant`),name:B().optional()}),Qv=Xv.extend({type:V(H.TEXT_MESSAGE_CONTENT),messageId:B(),delta:B()}),$v=Xv.extend({type:V(H.TEXT_MESSAGE_END),messageId:B()}),ey=Xv.extend({type:V(H.TEXT_MESSAGE_CHUNK),messageId:B().optional(),role:Yv.optional(),delta:B().optional(),name:B().optional()}),ty=Xv.extend({type:V(H.THINKING_TEXT_MESSAGE_START)}),ny=Qv.omit({messageId:!0,type:!0}).extend({type:V(H.THINKING_TEXT_MESSAGE_CONTENT)}),ry=Xv.extend({type:V(H.THINKING_TEXT_MESSAGE_END)}),iy=Xv.extend({type:V(H.TOOL_CALL_START),toolCallId:B(),toolCallName:B(),parentMessageId:B().nullable().optional().transform(e=>e??void 0)}),ay=Xv.extend({type:V(H.TOOL_CALL_ARGS),toolCallId:B(),delta:B()}),oy=Xv.extend({type:V(H.TOOL_CALL_END),toolCallId:B()}),sy=Xv.extend({messageId:B(),type:V(H.TOOL_CALL_RESULT),toolCallId:B(),content:B(),role:V(`tool`).optional()}),cy=Xv.extend({type:V(H.TOOL_CALL_CHUNK),toolCallId:B().optional(),toolCallName:B().optional(),parentMessageId:B().nullable().optional().transform(e=>e??void 0),delta:B().optional()}),ly=Xv.extend({type:V(H.THINKING_START),title:B().optional()}),uy=Xv.extend({type:V(H.THINKING_END)}),dy=Xv.extend({type:V(H.STATE_SNAPSHOT),snapshot:Nv}),fy=Xv.extend({type:V(H.STATE_DELTA),delta:sv(av())}),py=Xv.extend({type:V(H.MESSAGES_SNAPSHOT),messages:sv(Dv)}),my=Xv.extend({type:V(H.ACTIVITY_SNAPSHOT),messageId:B(),activityType:B(),content:dv(av()),replace:iv().optional().default(!0)}),hy=Xv.extend({type:V(H.ACTIVITY_DELTA),messageId:B(),activityType:B(),patch:sv(av())}),gy=Xv.extend({type:V(H.RAW),event:av(),source:B().optional()}),_y=Xv.extend({type:V(H.CUSTOM),name:B(),value:av()}),vy=Xv.extend({type:V(H.RUN_STARTED),threadId:B(),runId:B(),parentRunId:B().optional(),input:Mv.optional()}),yy=uv(`type`,[cv({type:V(`success`)}).strict(),cv({type:V(`interrupt`),interrupts:sv(Av).min(1)}).strict()]),by=cv({provider:B().optional(),model:B().optional(),inputTokens:rv().int().nonnegative().optional(),outputTokens:rv().int().nonnegative().optional(),totalTokens:rv().int().nonnegative().optional(),reasoningTokens:rv().int().nonnegative().optional(),cachedInputTokens:rv().int().nonnegative().optional()}),xy=Xv.extend({type:V(H.RUN_FINISHED),threadId:B(),runId:B(),result:av().optional(),outcome:yy.nullable().optional().transform(e=>e??void 0),usage:sv(by).optional()}),Sy=Xv.extend({type:V(H.RUN_ERROR),message:B(),code:B().optional(),usage:sv(by).optional()}),Cy=Xv.extend({type:V(H.STEP_STARTED),stepName:B()}),wy=Xv.extend({type:V(H.STEP_FINISHED),stepName:B()}),Ty=lv([V(`tool-call`),V(`message`)]),Ey=uv(`type`,[Zv,Qv,$v,ey,ly,uy,ty,ny,ry,iy,ay,oy,cy,sy,dy,fy,py,my,hy,gy,_y,vy,xy,Sy,Cy,wy,Xv.extend({type:V(H.REASONING_START),messageId:B()}),Xv.extend({type:V(H.REASONING_MESSAGE_START),messageId:B(),role:V(`reasoning`)}),Xv.extend({type:V(H.REASONING_MESSAGE_CONTENT),messageId:B(),delta:B()}),Xv.extend({type:V(H.REASONING_MESSAGE_END),messageId:B()}),Xv.extend({type:V(H.REASONING_MESSAGE_CHUNK),messageId:B().optional(),delta:B().optional()}),Xv.extend({type:V(H.REASONING_END),messageId:B()}),Xv.extend({type:V(H.REASONING_ENCRYPTED_VALUE),subtype:Ty,entityId:B(),encryptedValue:B()})]),Dy=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Oy=Object.prototype.hasOwnProperty;function ky(e,t){return Oy.call(e,t)}function Ay(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n=48&&r<=57){t++;continue}return!1}return!0}function Ny(e){return e.indexOf(`/`)===-1&&e.indexOf(`~`)===-1?e:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Py(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Fy(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;tzy,_areEquals:()=>Yy,applyOperation:()=>Wy,applyPatch:()=>Gy,applyReducer:()=>Ky,deepClone:()=>By,getValueByPointer:()=>Uy,validate:()=>Jy,validator:()=>qy}),zy=Ly,By=jy,Vy={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=Uy(n,this.path);r&&=jy(r);var i=Wy(n,{op:`remove`,path:this.from}).removed;return Wy(n,{op:`add`,path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=Uy(n,this.from);return Wy(n,{op:`add`,path:this.path,value:jy(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:Yy(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Hy={add:function(e,t,n){return My(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:Vy.move,copy:Vy.copy,test:Vy.test,_get:Vy._get};function Uy(e,t){if(t==``)return e;var n={op:`_get`,path:t};return Wy(e,n),n.value}function Wy(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n==`function`?n(t,0,e,t.path):qy(t,0)),t.path===``){var o={newDocument:e};if(t.op===`add`)return o.newDocument=t.value,o;if(t.op===`replace`)return o.newDocument=t.value,o.removed=e,o;if(t.op===`move`||t.op===`copy`)return o.newDocument=Uy(e,t.from),t.op===`move`&&(o.removed=e),o;if(t.op===`test`){if(o.test=Yy(e,t.value),o.test===!1)throw new zy(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o.newDocument=e,o}if(t.op===`remove`)return o.removed=e,o.newDocument=null,o;if(t.op===`_get`)return t.value=e,o;if(n)throw new zy("Operation `op` property is not one of operations defined in RFC-6902",`OPERATION_OP_INVALID`,a,t,e);return o}r||(e=jy(e));var s=(t.path||``).split(`/`),c=e,l=1,u=s.length,d=void 0,f=void 0,p=void 0;for(p=typeof n==`function`?n:qy;;){if(f=s[l],f&&f.indexOf(`~`)!=-1&&(f=Py(f)),i&&(f==`__proto__`||f==`prototype`&&l>0&&s[l-1]==`constructor`))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[f]===void 0?d=s.slice(0,l).join(`/`):l==u-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),l++,Array.isArray(c)){if(f===`-`)f=c.length;else if(n&&!My(f))throw new zy(`Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index`,`OPERATION_PATH_ILLEGAL_ARRAY_INDEX`,a,t,e);else My(f)&&(f=~~f);if(l>=u){if(n&&t.op===`add`&&f>c.length)throw new zy(`The specified index MUST NOT be greater than the number of elements in the array`,`OPERATION_VALUE_OUT_OF_BOUNDS`,a,t,e);var o=Hy[t.op].call(t,c,f,e);if(o.test===!1)throw new zy(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}}else if(l>=u){var o=Vy[t.op].call(t,c,f,e);if(o.test===!1)throw new zy(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}if(c=c[f],n&&l0)throw new zy('Operation `path` property must start with "/"',`OPERATION_PATH_INVALID`,t,e,n);if((e.op===`move`||e.op===`copy`)&&typeof e.from!=`string`)throw new zy("Operation `from` property is not present (applicable in `move` and `copy` operations)",`OPERATION_FROM_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&e.value===void 0)throw new zy("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&Fy(e.value))throw new zy("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED`,t,e,n);if(n){if(e.op==`add`){var i=e.path.split(`/`).length,a=r.split(`/`).length;if(i!==a+1&&i!==a)throw new zy("Cannot perform an `add` operation at the desired path",`OPERATION_PATH_CANNOT_ADD`,t,e,n)}else if(e.op===`replace`||e.op===`remove`||e.op===`_get`){if(e.path!==r)throw new zy(`Cannot perform the operation at a path that does not exist`,`OPERATION_PATH_UNRESOLVABLE`,t,e,n)}else if(e.op===`move`||e.op===`copy`){var o=Jy([{op:`_get`,path:e.from,value:void 0}],n);if(o&&o.name===`OPERATION_PATH_UNRESOLVABLE`)throw new zy(`Cannot perform the operation from a path that does not exist`,`OPERATION_FROM_UNRESOLVABLE`,t,e,n)}}}function Jy(e,t,n){try{if(!Array.isArray(e))throw new zy(`Patch sequence must be an array`,`SEQUENCE_NOT_AN_ARRAY`);if(t)Gy(jy(t),jy(e),n||!0);else{n||=qy;for(var r=0;rsb,generate:()=>ab,observe:()=>ib,unobserve:()=>rb}),Zy=new WeakMap,Qy=function(){function e(e){this.observers=new Map,this.obj=e}return e}(),$y=function(){function e(e,t){this.callback=e,this.observer=t}return e}();function eb(e){return Zy.get(e)}function tb(e,t){return e.observers.get(t)}function nb(e,t){e.observers.delete(t.callback)}function rb(e,t){t.unobserve()}function ib(e,t){var n=[],r,i=eb(e);if(!i)i=new Qy(e),Zy.set(e,i);else{var a=tb(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=jy(e),t){r.callback=t,r.next=null;var o=function(){ab(r)},s=function(){clearTimeout(r.next),r.next=setTimeout(o)};typeof window<`u`&&(window.addEventListener(`mouseup`,s),window.addEventListener(`keyup`,s),window.addEventListener(`mousedown`,s),window.addEventListener(`keydown`,s),window.addEventListener(`change`,s))}return r.patches=n,r.object=e,r.unobserve=function(){ab(r),clearTimeout(r.next),nb(i,r),typeof window<`u`&&(window.removeEventListener(`mouseup`,s),window.removeEventListener(`keyup`,s),window.removeEventListener(`mousedown`,s),window.removeEventListener(`keydown`,s),window.removeEventListener(`change`,s))},i.observers.set(t,new $y(t,r)),r}function ab(e,t){t===void 0&&(t=!1);var n=Zy.get(e.object);ob(n.value,e.object,e.patches,``,t),e.patches.length&&Gy(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ob(e,t,n,r,i){if(t!==e){typeof t.toJSON==`function`&&(t=t.toJSON());for(var a=Ay(t),o=Ay(e),s=!1,c=o.length-1;c>=0;c--){var l=o[c],u=e[l];if(ky(t,l)&&(t[l]!==void 0||u===void 0||Array.isArray(t)!==!1)){var d=t[l];typeof u==`object`&&u&&typeof d==`object`&&d&&Array.isArray(u)===Array.isArray(d)?ob(u,d,n,r+`/`+Ny(l),i):u!==d&&(i&&n.push({op:`test`,path:r+`/`+Ny(l),value:jy(u)}),n.push({op:`replace`,path:r+`/`+Ny(l),value:jy(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:`test`,path:r+`/`+Ny(l),value:jy(u)}),n.push({op:`remove`,path:r+`/`+Ny(l)}),s=!0):(i&&n.push({op:`test`,path:r,value:e}),n.push({op:`replace`,path:r,value:t}))}if(s||a.length!=o.length)for(var c=0;cMath.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=np(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=np(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return cp(h,t,e,h===`h`?s:c,!0)},[]),c=M.useCallback(function(e){var n=e;if(hp.length&&hp[hp.length-1]===a){var r=`deltaY`in n?up(n):lp(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&fp(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(dp).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=M.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:_p(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=M.useCallback(function(e){n.current=lp(e),r.current=void 0},[]),d=M.useCallback(function(t){l(t.type,up(t),t.target,s(t,e.lockRef.current))},[]),f=M.useCallback(function(t){l(t.type,lp(t),t.target,s(t,e.lockRef.current))},[]);M.useEffect(function(){return hp.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Zf),document.addEventListener(`touchmove`,c,Zf),document.addEventListener(`touchstart`,u,Zf),function(){hp=hp.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Zf),document.removeEventListener(`touchmove`,c,Zf),document.removeEventListener(`touchstart`,u,Zf)}},[]);var p=e.removeScrollBar,m=e.inert;return M.createElement(M.Fragment,null,m?M.createElement(a,{styles:pp(i)}):null,p?M.createElement(Jf,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function _p(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var vp=Of(kf,gp),yp=M.forwardRef(function(e,t){return M.createElement(jf,af({},e,{ref:t,sideCar:vp}))});yp.classNames=jf.classNames;function bp({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,...S}){let{_id:C,titleMounted:w,bodyMounted:T,shouldLockScroll:E,setTitleMounted:D,setBodyMounted:O}=tf({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u}),{key:k,...ee}=x||{};return(0,N.jsx)(Td,{...p,withinPortal:f,children:(0,N.jsx)(Qd,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${C}-title`,getBodyId:()=>`${C}-body`,titleMounted:w,bodyMounted:T,setTitleMounted:D,setBodyMounted:O,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,N.jsx)(yp,{enabled:E&&m,...ee,children:(0,N.jsx)(Be,{...S,id:C,__vars:{...y,"--mb-z-index":(g||ka(`modal`)).toString(),"--mb-shadow":De(_),"--mb-padding":de(v)},children:h})},k)})})}bp.displayName=`@mantine/core/ModalBase`;function xp(){let e=$d();return(0,M.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Sp={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Cp({className:e,...t}){let n=xp(),r=$d();return(0,N.jsx)(Be,{id:n,className:ae({[Sp.body]:!r.unstyled},e),...t})}Cp.displayName=`@mantine/core/ModalBaseBody`;function wp({className:e,onClick:t,...n}){let r=$d();return(0,N.jsx)(He,{...n,onClick:e=>{r.onClose(),t?.(e)},className:ae({[Sp.close]:!r.unstyled},e),unstyled:r.unstyled})}wp.displayName=`@mantine/core/ModalBaseCloseButton`;function Tp({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=$d();return(0,N.jsx)(Ve,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,N.jsx)(`div`,{...n,className:ae({[Sp.inner]:!s.unstyled},n.className),children:(0,N.jsx)(Md,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,N.jsx)(ee,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:ae({[Sp.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}Tp.displayName=`@mantine/core/ModalBaseContent`;function Ep({className:e,...t}){let n=$d();return(0,N.jsx)(Be,{component:`header`,className:ae({[Sp.header]:!n.unstyled},e),...t})}Ep.displayName=`@mantine/core/ModalBaseHeader`;var Dp={duration:200,timingFunction:`ease`,transition:`fade`};function Op(e){let t=$d();return{...Dp,...t.transitionProps,...e}}function kp({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=$d(),o=Op(t);return(0,N.jsx)(Ve,{mounted:r===void 0?a.opened:r,...o,transition:`fade`,children:t=>(0,N.jsx)(bd,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}kp.displayName=`@mantine/core/ModalBaseOverlay`;function Ap(){let e=$d();return(0,M.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function jp({className:e,...t}){let n=Ap(),r=$d();return(0,N.jsx)(Be,{component:`h2`,className:ae({[Sp.title]:!r.unstyled},e),id:n,...t})}jp.displayName=`@mantine/core/ModalBaseTitle`;function Mp({children:e}){return(0,N.jsx)(N.Fragment,{children:e})}function Np({style:e,size:t=16,...n}){return(0,N.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:j(t),height:j(t),display:`block`},...n,children:(0,N.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Np.displayName=`@mantine/core/AccordionChevron`;var[Pp,Fp]=Sa(`AppShell was not found in tree`),Ip={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Lp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellAside`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:ae({[yp.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Lp.classes=Ip,Lp.displayName=`@mantine/core/AppShellAside`;var Rp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellFooter`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:ae({[yp.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Rp.classes=Ip,Rp.displayName=`@mantine/core/AppShellFooter`;var zp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellHeader`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:ae({[yp.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});zp.classes=Ip,zp.displayName=`@mantine/core/AppShellHeader`;var Bp=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`AppShellMain`,null,e);return(0,N.jsx)(Be,{component:`main`,...Fp().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});Bp.classes=Ip,Bp.displayName=`@mantine/core/AppShellMain`;var Vp=g(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=D(`AppShellNavbar`,null,e),d=Fp();return d.disabled?null:(0,N.jsx)(Be,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});Vp.classes=Ip,Vp.displayName=`@mantine/core/AppShellNavbar`;var Hp=te(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=D(`AppShellSection`,null,e),l=Fp();return(0,N.jsx)(Be,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Hp.classes=Ip,Hp.displayName=`@mantine/core/AppShellSection`;function Up(e){return typeof e==`object`?e.base:e}function Wp(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Gp(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function Kp({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Wp(o)){let t=j(Up(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Gp(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=j(o.base),e[`--app-shell-aside-offset`]=j(o.base)),ke(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=j(o[e]),t[e][`--app-shell-aside-offset`]=j(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=Na(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function qp({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Wp(i)){let t=j(Up(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Gp(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=j(i.base),a&&(e[`--app-shell-footer-offset`]=j(i.base))),ke(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=j(i[e]),a&&(t[e][`--app-shell-footer-offset`]=j(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function Jp({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Wp(i)){let t=j(Up(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Gp(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=j(i.base),a&&(e[`--app-shell-header-offset`]=j(i.base))),ke(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=j(i[e]),a&&(t[e][`--app-shell-header-offset`]=j(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function Yp({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Wp(o)){let t=j(Up(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Gp(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=j(o.base),e[`--app-shell-navbar-offset`]=j(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=j(o.base))),ke(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=j(o[e]),t[e][`--app-shell-navbar-offset`]=j(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=j(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=Na(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function Xp(e){return Number(e)===0?`0px`:de(e)}function Zp({padding:e,baseStyles:t,minMediaStyles:n}){Wp(e)&&(t[`--app-shell-padding`]=Xp(Up(e))),Gp(e)&&(e.base&&(t[`--app-shell-padding`]=Xp(e.base)),ke(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=Xp(e[t]))}))}function Qp({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),Yp({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),Kp({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),Jp({baseStyles:l,minMediaStyles:s,header:t,mode:o}),qp({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),Zp({baseStyles:l,minMediaStyles:s,padding:i});let u=Pa(ke(s),a.breakpoints).map(e=>({query:`(min-width: ${Re(e.px)})`,styles:s[e.value]})),d=Pa(ke(c),a.breakpoints).map(e=>({query:`(max-width: ${Re(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function $p({navbar:e,header:t,aside:n,footer:r,padding:i,mode:a,selector:o}){let s=b(),c=Ue(),{media:l,baseStyles:u}=Qp({navbar:e,header:t,footer:r,aside:n,padding:i,theme:s,mode:a});return(0,N.jsx)(be,{media:l,styles:u,selector:o||c.cssVariablesSelector})}function em({transitionDuration:e,disabled:t}){let[n,r]=(0,M.useState)(!0),i=(0,M.useRef)(-1),a=(0,M.useRef)(-1);return eo(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,M.startTransition)(()=>{r(!1)}),200)}),Ee(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,M.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var tm={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:ka(`app`),mode:`fixed`},nm=O((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),rm=g(e=>{let t=D(`AppShell`,tm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:S,id:C,...T}=t,E=w({name:`AppShell`,classes:Ip,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:S,vars:s,varsResolver:nm}),O=em({disabled:g,transitionDuration:d}),k=pe(C);return(0,N.jsxs)(Pp,{value:{getStyles:E,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,N.jsx)($p,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${k}`:void 0}),(0,N.jsx)(Be,{...E(`root`),id:k,mod:[{resizing:O,layout:h,disabled:g,mode:b},x],...T})]})});rm.classes=Ip,rm.varsResolver=nm,rm.displayName=`@mantine/core/AppShell`,rm.Navbar=Vp,rm.Header=zp,rm.Main=Bp,rm.Aside=Lp,rm.Footer=Rp,rm.Section=Hp;function im({size:e,style:t,...n}){return(0,N.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:j(e),height:j(e),...t},"aria-hidden":!0,...n,children:(0,N.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var am={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},om=(0,M.createContext)({withinGroup:!1}),sm=O((e,{spacing:t})=>({group:{"--ag-spacing":de(t)}})),cm=g(e=>{let t=D(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=w({name:`AvatarGroup`,classes:am,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:sm,rootSelector:`group`});return(0,N.jsx)(om,{value:{withinGroup:!0},children:(0,N.jsx)(Be,{...d(`group`),...u})})});cm.classes=am,cm.varsResolver=sm,cm.displayName=`@mantine/core/AvatarGroup`;function lm(e){return(0,N.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,N.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function um(e){let t=0;for(let n=0;ne[0]).slice(0,t).join(``).toUpperCase()}var mm=O((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?fm(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":Pe(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:ce(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),hm=te(e=>{let t=D(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,x=(0,M.use)(om),[S,C]=(0,M.useState)(!c),T=w({name:`Avatar`,props:t,classes:am,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:mm});return(0,M.useEffect)(()=>C(!c),[c]),(0,N.jsx)(Be,{...T(`root`),mod:[{"within-group":x.withinGroup},g],...b,children:S||!c?(0,N.jsx)(`span`,{...T(`placeholder`),title:l,children:m||typeof _==`string`&&pm(_)||(0,N.jsx)(lm,{})}):(0,N.jsx)(`img`,{...p,...T(`image`),src:c,alt:l,onError:e=>{C(!0),p?.onError?.(e)}})})});hm.classes=am,hm.varsResolver=mm,hm.displayName=`@mantine/core/Avatar`,hm.Group=cm;var gm={root:`m_3eebeb36`,label:`m_9e365f20`},_m={orientation:`horizontal`},vm=O((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?x(t,e):void 0,"--divider-border-style":n,"--divider-size":Pe(r,`divider-size`)}})),ym=g(e=>{let t=D(`Divider`,_m,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=w({name:`Divider`,classes:gm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:vm});return(0,N.jsx)(Be,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,...h(`root`),...m,children:u&&(0,N.jsx)(Be,{component:`span`,mod:{position:d},...h(`label`),children:u})})});ym.classes=gm,ym.varsResolver=vm,ym.displayName=`@mantine/core/Divider`;var[bm,xm]=Sa(`Drawer component was not found in tree`),Sm={root:`m_f11b401e`,header:`m_5a7c2c9`,content:`m_b8a05bbd`,inner:`m_31cd769a`},Cm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerBody`,null,e);return(0,N.jsx)(Cp,{...xm().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Cm.classes=Sm,Cm.displayName=`@mantine/core/DrawerBody`;var wm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerCloseButton`,null,e);return(0,N.jsx)(wp,{...xm().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});wm.classes=Sm,wm.displayName=`@mantine/core/DrawerCloseButton`;var Tm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,radius:s,__hidden:c,...l}=D(`DrawerContent`,null,e),u=xm(),d=u.scrollAreaComponent||Mp;return(0,N.jsx)(Tp,{...u.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:u.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),...l,radius:s||u.radius||0,"data-hidden":c||void 0,children:(0,N.jsx)(d,{style:{height:`calc(100vh - var(--drawer-offset) * 2)`},children:o})})});Tm.classes=Sm,Tm.displayName=`@mantine/core/DrawerContent`;var Em=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerHeader`,null,e);return(0,N.jsx)(Ep,{...xm().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Em.classes=Sm,Em.displayName=`@mantine/core/DrawerHeader`;var Dm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerOverlay`,null,e);return(0,N.jsx)(kp,{...xm().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Dm.classes=Sm,Dm.displayName=`@mantine/core/DrawerOverlay`;function Om(e){switch(e){case`top`:return`flex-start`;case`bottom`:return`flex-end`;default:return}}function km(e){if(e===`top`||e===`bottom`)return`0 0 calc(100% - var(--drawer-offset, 0rem) * 2)`}var Am={top:`slide-down`,bottom:`slide-up`,left:`slide-right`,right:`slide-left`},jm={top:`slide-down`,bottom:`slide-up`,right:`slide-right`,left:`slide-left`},Mm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),position:`left`},Nm=O((e,{position:t,size:n,offset:r})=>({root:{"--drawer-size":Pe(n,`drawer-size`),"--drawer-flex":km(t),"--drawer-height":t===`left`||t===`right`?void 0:`var(--drawer-size)`,"--drawer-align":Om(t),"--drawer-justify":t===`right`?`flex-end`:void 0,"--drawer-offset":j(r)}})),Pm=g(e=>{let t=D(`DrawerRoot`,Mm,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,scrollAreaComponent:c,position:l,transitionProps:u,radius:d,attributes:f,...p}=t,{dir:m}=Vo(),h=w({name:`Drawer`,classes:Sm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:Nm}),g=(m===`rtl`?jm:Am)[l];return(0,N.jsx)(bm,{value:{scrollAreaComponent:c,getStyles:h,radius:d},children:(0,N.jsx)(bp,{...h(`root`),transitionProps:{transition:g,...u},"data-offset-scrollbars":c===id.Autosize||void 0,unstyled:o,...p})})});Pm.classes=Sm,Pm.varsResolver=Nm,Pm.displayName=`@mantine/core/DrawerRoot`;var Fm=(0,M.createContext)(null);function Im({children:e}){let[t,n]=(0,M.useState)([]),[r,i]=(0,M.useState)(ka(`modal`));return(0,N.jsx)(Fm,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Im.displayName=`@mantine/core/DrawerStack`;var Lm=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`DrawerTitle`,null,e);return(0,N.jsx)(jp,{...xm().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});Lm.classes=Sm,Lm.displayName=`@mantine/core/DrawerTitle`;var Rm={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),withOverlay:!0,withCloseButton:!0},zm=g(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,opened:s,stackId:c,zIndex:l,...u}=D(`Drawer`,Rm,e),d=(0,M.use)(Fm),f=!!t||i,p=d&&c?{closeOnEscape:d.currentId===c,trapFocus:d.currentId===c,zIndex:d.getZIndex(c)}:{},m=n===!1?!1:c&&d?d.currentId===c:s;return(0,M.useEffect)(()=>{d&&c&&(s?d.addModal(c,l||ka(`modal`)):d.removeModal(c))},[s,c,l]),(0,N.jsxs)(Pm,{opened:s,zIndex:d&&c?d.getZIndex(c):l,...u,...p,children:[n&&(0,N.jsx)(Dm,{visible:m,transitionProps:d&&c?{duration:0}:void 0,...r}),(0,N.jsxs)(Tm,{__hidden:d&&c&&s?c!==d.currentId:!1,children:[f&&(0,N.jsxs)(Em,{children:[t&&(0,N.jsx)(Lm,{children:t}),i&&(0,N.jsx)(wm,{...a})]}),(0,N.jsx)(Cm,{children:o})]})]})});zm.classes=Sm,zm.displayName=`@mantine/core/Drawer`,zm.Root=Pm,zm.Overlay=Dm,zm.Content=Tm,zm.Body=Cm,zm.Header=Em,zm.Title=Lm,zm.CloseButton=wm,zm.Stack=Im;var Bm=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Vm={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function Hm(e){Object.keys(Vm).forEach(t=>{e.style.setProperty(t,Vm[t],`important`)})}function Um(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of Bm)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 Wm=null;function Gm(e,t,n=1,r=1/0){Wm||(Wm=document.createElement(`textarea`),Wm.setAttribute(`tabindex`,`-1`),Wm.setAttribute(`aria-hidden`,`true`),Wm.setAttribute(`aria-label`,`autosize measurement`),Hm(Wm)),Wm.parentNode===null&&document.body.appendChild(Wm);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{Wm.style[e]=o[e]}),Hm(Wm),Wm.value=t;let c=s===`border-box`?Wm.scrollHeight+a:Wm.scrollHeight-i;Wm.value=t,c=s===`border-box`?Wm.scrollHeight+a:Wm.scrollHeight-i,Wm.value=`x`;let l=Wm.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 Km({maxRows:e,minRows:t,onChange:n,ref:r,...i}){let a=i.value!==void 0,o=(0,M.useRef)(null),s=ro(o,r),c=(0,M.useRef)(0),l=(0,M.useRef)(0),u=()=>{let n=o.current;if(!n)return;let r=Um(n);if(!r)return;let[i]=Gm(r,n.value||n.placeholder||`x`,t,e);c.current!==i&&(c.current=i,n.style.setProperty(`height`,`${i}px`,`important`))},d=e=>{a||u(),n?.(e)};return(0,M.useLayoutEffect)(u),(0,M.useEffect)(()=>{let e=()=>u();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,M.useEffect)(()=>{let e=o.current;if(!e||typeof ResizeObserver>`u`)return;l.current=e.offsetWidth;let t=new ResizeObserver(()=>{o.current&&o.current.offsetWidth!==l.current&&(l.current=o.current.offsetWidth,u())});return t.observe(e),()=>t.disconnect()},[]),(0,M.useEffect)(()=>{let e=()=>u();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,M.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,N.jsx)(`textarea`,{rows:t,...i,onChange:d,ref:s})}var qm=g(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=D([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&fo()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,N.jsx)(ge,{component:l?Km:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});qm.classes=ge.classes,qm.displayName=`@mantine/core/Textarea`;var[Jm,Ym]=Sa(`Menu component was not found in the tree`),Xm=(0,M.createContext)(null);function Zm(e){let{value:t,defaultValue:n,onChange:r,children:i}=D(`MenuCheckboxGroup`,null,e),[a,o]=io({value:t,defaultValue:n,finalValue:[],onChange:r});return(0,N.jsx)(Xm,{value:{values:a,onChange:(0,M.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o])},children:i})}Zm.displayName=`@mantine/core/MenuCheckboxGroup`;var Qm=(0,M.createContext)(null);function $m({role:e,checked:t,indicator:n,onSelect:r,color:i,closeMenuOnClick:a,rightSection:o,children:s,disabled:c,dataDisabled:l,className:u,style:d,styles:f,classNames:p,buttonRef:m,others:g}){let _=Ym(),v=(0,M.use)(Qm),y=b(),{dir:x}=Vo(),S=(0,M.useRef)(null),C=Ma(g.onClick,()=>{l||(r(),a&&_.closeDropdownImmediately())}),w=Ma(g.onMouseMove,()=>{if(!_.hasSearch)return;let e=S.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==S.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),T=Ma(g.onKeyDown,e=>{e.key===`ArrowLeft`&&v&&(v.close(),v.focusParentItem())}),E=i?y.variantColorResolver({color:i,theme:y,variant:`light`}):void 0,D=i?ie({color:i,theme:y}):null,O=_.alignItemsLabels!==`none`||t;return(0,N.jsxs)(h,{onMouseDown:e=>e.preventDefault(),...g,unstyled:_.unstyled,tabIndex:_.menuItemTabIndex,..._.getStyles(`item`,{className:u,style:d,styles:f,classNames:p}),ref:ro(S,m),role:e,"aria-checked":t,disabled:c,"data-menu-item":!0,"data-checked":t||void 0,"data-disabled":c||l||void 0,"data-mantine-stop-propagation":!0,onClick:C,onMouseMove:w,onKeyDown:Da({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:_.loop,dir:x,orientation:`vertical`,onKeyDown:T}),__vars:{"--menu-item-color":D?.isThemeColor&&D?.shade===void 0?`var(--mantine-color-${D.color}-6)`:E?.color,"--menu-item-hover":E?.hover},children:[O&&(0,N.jsx)(`div`,{..._.getStyles(`itemIndicator`,{styles:f,classNames:p}),"data-checked":t||void 0,children:t?n:null}),s&&(0,N.jsx)(`div`,{..._.getStyles(`itemLabel`,{styles:f,classNames:p}),"data-menu-item-label":!0,children:s}),o&&(0,N.jsx)(`div`,{..._.getStyles(`itemSection`,{styles:f,classNames:p}),"data-position":`right`,children:o})]})}var eh={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},th=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...v}=D(`MenuCheckboxItem`,null,e),y=Ym(),b=(0,M.use)(Xm),x=b&&f!==void 0?b.values.includes(f):void 0,[S,C]=io({value:p??x,defaultValue:m,finalValue:!1,onChange:h});return(0,N.jsx)($m,{role:`menuitemcheckbox`,checked:S,indicator:g??y.checkIcon??(0,N.jsx)(im,{size:10}),onSelect:()=>{h?C(!S):b&&f!==void 0?b.onChange(f):C(!S)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:v,children:l})});th.classes=eh,th.displayName=`@mantine/core/MenuCheckboxItem`;function nh(e){let{children:t,disabled:n,longPressDelay:r}=D(`MenuContextMenu`,null,e),i=mo(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Ym(),o=kd();return(0,M.cloneElement)(i,Ad({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()}))}nh.displayName=`@mantine/core/MenuContextMenu`;var rh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`MenuDivider`,null,e);return(0,N.jsx)(Be,{...Ym().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});rh.classes=eh,rh.displayName=`@mantine/core/MenuDivider`;var ih=500;function ah(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function oh(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function sh({enabled:e,opened:t,getDropdown:n}){let r=(0,M.useRef)({buffer:``,timeoutId:null});return(0,M.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,M.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},ih);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||oh(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=D(`MenuDropdown`,null,e),f=(0,M.useRef)(null),p=Ym(),m=sh({enabled:!p.hasSearch,opened:p.opened,getDropdown:()=>f.current}),h=Ma(c,e=>{m(e),!(e.defaultPrevented||p.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),g=Ma(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),_=Ma(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,N.jsxs)(Ud.Dropdown,{...d,onMouseEnter:g,onMouseLeave:_,role:`menu`,"aria-orientation":`vertical`,ref:ro(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:h,children:[p.withInitialFocusPlaceholder&&!p.hasSearch&&(0,N.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});ch.classes=eh,ch.displayName=`@mantine/core/MenuDropdown`;var lh=te(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=D(`MenuItem`,null,e),g=Ym(),_=(0,M.use)(Qm),v=b(),{dir:y}=Vo(),x=(0,M.useRef)(null),S=m,C=Ma(S.onClick,()=>{f||(typeof s==`boolean`?s&&g.closeDropdownImmediately():g.closeOnItemClick&&g.closeDropdownImmediately())}),w=Ma(S.onMouseMove,()=>{if(!g.hasSearch)return;let e=x.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==x.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),T=o?v.variantColorResolver({color:o,theme:v,variant:`light`}):void 0,E=o?ie({color:o,theme:v}):null,O=Ma(S.onKeyDown,e=>{e.key===`ArrowLeft`&&_&&(_.close(),_.focusParentItem())});return(0,N.jsxs)(h,{onMouseDown:e=>e.preventDefault(),...m,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:ro(x,p),role:`menuitem`,disabled:d,"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:C,onMouseMove:w,onKeyDown:Da({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:O}),__vars:{"--menu-item-color":E?.isThemeColor&&E?.shade===void 0?`var(--mantine-color-${E.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[g.alignItemsLabels===`all`&&(0,N.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),c&&(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,N.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:u}),l&&(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});lh.classes=eh,lh.displayName=`@mantine/core/MenuItem`;var uh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`MenuLabel`,null,e);return(0,N.jsx)(Be,{...Ym().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});uh.classes=eh,uh.displayName=`@mantine/core/MenuLabel`;var dh=(0,M.createContext)(null);function fh(e){let{value:t,defaultValue:n,onChange:r,children:i}=D(`MenuRadioGroup`,null,e),[a,o]=io({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,N.jsx)(dh,{value:{value:a,onChange:e=>o(e)},children:i})}fh.displayName=`@mantine/core/MenuRadioGroup`;function ph({size:e,style:t,...n}){return(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:j(e),height:j(e),...t},"aria-hidden":!0,...n,children:(0,N.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var mh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=D(`MenuRadioItem`,null,e),v=Ym(),y=(0,M.use)(dh),b=p??(y?y.value===f:!1);return(0,N.jsx)($m,{role:`menuitemradio`,checked:b,indicator:h??v.checkIcon??(0,N.jsx)(ph,{size:5}),onSelect:()=>{b||(m?m(f):y&&y.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});mh.classes=eh,mh.displayName=`@mantine/core/MenuRadioItem`;var hh=`[data-menu-item]:not([data-disabled])`,gh=`[data-menu-active]`;function _h(e){return e?.closest(`[data-menu-dropdown]`)}function vh(e){return e?Array.from(e.querySelectorAll(hh)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function yh(e){e&&e.querySelectorAll(gh).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function bh(e,t){yh(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function xh(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Sh={clearSearchOnClose:!0},Ch=g(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,size:a,clearSearchOnClose:o,ref:s,...c}=D(`MenuSearch`,Sh,e),l=Ym(),u=(0,M.useRef)(null),d=ro(s,u),f=(0,M.useRef)(i);f.current=i,(0,M.useEffect)(()=>l.registerSearch(),[l.registerSearch]),(0,M.useEffect)(()=>{o?l.searchExitClearRef.current=()=>{f.current?.({currentTarget:{value:``}})}:l.searchExitClearRef.current=null},[o,l.searchExitClearRef]),(0,M.useEffect)(()=>{l.opened||yh(_h(u.current))},[l.opened]);let p=Ma(i,e=>{yh(_h(e.currentTarget))}),m=Ma(r,e=>{if(e.defaultPrevented)return;let t=_h(e.currentTarget),n=vh(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=xh(n);bh(n[r>=n.length-1?l.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=xh(n);bh(n[r<=0?r===-1||l.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&bh(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&bh(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[xh(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),h=l.getStyles(`search`);return(0,N.jsx)(oe,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:a,...c,ref:d,classNames:[{input:h.className},t],styles:[{input:h.style},n],onKeyDown:m,onChange:p,__staticSelector:`Menu`})});Ch.classes=eh,Ch.displayName=`@mantine/core/MenuSearch`;var wh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l,onKeyDown:u,children:d,ref:f,...p}=D(`MenuSubDropdown`,null,e),m=(0,M.useRef)(null),h=Ym(),g=(0,M.use)(Qm),_=sh({enabled:!h.hasSearch,opened:g?.opened??!1,getDropdown:()=>m.current}),v=Ma(u,e=>{_(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),y=g?.getFloatingProps({onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l});return(0,N.jsx)(Ud.Dropdown,{...p,...y,role:`menu`,"aria-orientation":`vertical`,ref:ro(f,m,g?.setFloating),...h.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:d})});wh.classes=eh,wh.displayName=`@mantine/core/MenuSubDropdown`;var Th=te(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=D(`MenuSubItem`,null,e),g=Ym(),_=(0,M.use)(Qm),v=b(),{dir:y}=Vo(),x=(0,M.useRef)(null),S=m,C=o?v.variantColorResolver({color:o,theme:v,variant:`light`}):void 0,w=o?ie({color:o,theme:v}):null,T=Ma(S.onKeyDown,e=>{e.key===`ArrowRight`&&(_?.open(),_?.focusFirstItem()),e.key===`ArrowLeft`&&_?.parentContext&&(_.parentContext.close(),_.parentContext.focusParentItem())}),E=Ma(S.onClick,()=>{!d&&f&&g.closeDropdownImmediately()}),O=Ma(S.onMouseMove,()=>{if(!g.hasSearch)return;let e=x.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==x.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),k=_?.getReferenceProps({onMouseEnter:S.onMouseEnter,onMouseLeave:S.onMouseLeave,onPointerEnter:S.onPointerEnter,onPointerLeave:S.onPointerLeave});return(0,N.jsxs)(h,{onMouseDown:e=>e.preventDefault(),...m,...k,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:ro(x,p,_?.setReference),role:`menuitem`,disabled:u,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:E,onMouseMove:O,onKeyDown:Da({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:T}),__vars:{"--menu-item-color":w?.isThemeColor&&w?.shade===void 0?`var(--mantine-color-${w.color}-6)`:C?.color,"--menu-item-hover":C?.hover},children:[g.alignItemsLabels===`all`&&(0,N.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),s&&(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,N.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:l}),(0,N.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,N.jsx)(Np,{...g.getStyles(`chevron`),size:14})})]})});Th.classes=eh,Th.displayName=`@mantine/core/MenuSubItem`;function Eh({children:e,refProp:t}){if(!xa(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return Ym(),(0,N.jsx)(Ud.Target,{refProp:t,popupType:`menu`,children:e})}Eh.displayName=`@mantine/core/MenuSubTarget`;var Dh={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Oh(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=D(`MenuSub`,Dh,e),l=pe(),[u,d]=io({value:o,finalValue:!1,onChange:s}),f=(0,M.use)(Qm),p=Ym(),{dir:m}=Vo(),h=hd(m,i),g=f?.registerOpenSub??p.registerOpenSub,_=(0,M.useRef)(null),v=(0,M.useCallback)(e=>{let t=_.current;return t&&t!==e&&t(),_.current=e,()=>{_.current===e&&(_.current=null)}},[]),y=(0,M.useRef)(d);y.current=d;let b=(0,M.useCallback)(()=>y.current(!0),[]),x=(0,M.useCallback)(()=>y.current(!1),[]);(0,M.useEffect)(()=>{if(u)return g(x)},[u,g,x]);let{context:S,refs:C}=Gu({placement:h,open:u,onOpenChange:e=>{e?b():x()}}),{getReferenceProps:w,getFloatingProps:T}=Yu([Mu(S,{handleClose:a?td(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,N.jsx)(Qm,{value:{opened:u,close:x,open:b,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:C.setReference,setFloating:C.setFloating,getReferenceProps:w,getFloatingProps:T,registerOpenSub:v},children:(0,N.jsx)(Ud,{opened:u,onChange:e=>e?b():x(),withinPortal:!1,withArrow:!1,id:l,position:i,...c,children:t})})}Oh.extend=e=>e,Oh.displayName=`@mantine/core/MenuSub`,Oh.Target=Eh,Oh.Dropdown=wh,Oh.Item=Th;var kh={refProp:`ref`};function Ah(e){let{children:t,refProp:n,...r}=D(`MenuTarget`,kh,e),i=mo(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Ym(),o=i.props,s=Ma(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=Ma(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=Ma(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,N.jsx)(Ud.Target,{refProp:n,popupType:`menu`,...r,children:(0,M.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Ah.displayName=`@mantine/core/MenuTarget`;var jh={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Mh=g(e=>{let t=D(`Menu`,jh,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:C,onExitTransitionEnd:E,alignItemsLabels:O,checkIcon:k,...ee}=t,te=w({name:`Menu`,classes:eh,props:t,classNames:h,styles:g,unstyled:_,attributes:C}),[ne,re]=io({value:a,defaultValue:o,finalValue:!1,onChange:c}),[A,ie]=(0,M.useState)(!1),ae=()=>{re(!1),ie(!1),ne&&i?.()},oe=()=>{re(!0),!ne&&r?.()},se=()=>{ne?ae():oe()},{openDropdown:ce,closeDropdown:le}=gd({open:oe,close:ae,closeDelay:m,openDelay:p}),ue=(0,M.useRef)(null),de=(0,M.useCallback)(e=>{let t=ue.current;return t&&t!==e&&t(),ue.current=e,()=>{ue.current===e&&(ue.current=null)}},[]),fe=(0,M.useRef)(0),[j,pe]=(0,M.useState)(!1),me=(0,M.useCallback)(()=>(fe.current+=1,fe.current===1&&pe(!0),()=>{--fe.current,fe.current===0&&pe(!1)}),[]),he=(0,M.useRef)(null),ge=()=>{he.current?.(),E?.()},_e=e=>Ia(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:ve,resolvedStyles:ye}=T({classNames:h,styles:g,props:t});return(0,N.jsx)(Jm,{value:{getStyles:te,opened:ne,toggleDropdown:se,getItemIndex:_e,openedViaClick:A,setOpenedViaClick:ie,closeOnItemClick:l,closeDropdown:f===`click`?ae:le,openDropdown:f===`click`?oe:ce,closeDropdownImmediately:ae,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S,registerOpenSub:de,hasSearch:j,registerSearch:me,searchExitClearRef:he,alignItemsLabels:O,checkIcon:k},children:(0,N.jsx)(Ud,{returnFocus:!0,...ee,opened:ne,onChange:se,defaultOpened:o,trapFocus:!x&&s,closeOnEscape:d,__staticSelector:`Menu`,classNames:ve,styles:ye,unstyled:_,variant:v,keepMounted:x,onExitTransitionEnd:ge,children:n})})});Mh.displayName=`@mantine/core/Menu`,Mh.classes=eh,Mh.Item=lh,Mh.Label=uh,Mh.Dropdown=ch,Mh.Target=Ah,Mh.Divider=rh,Mh.Search=Ch,Mh.Sub=Oh,Mh.CheckboxItem=th,Mh.CheckboxGroup=Zm,Mh.RadioItem=mh,Mh.RadioGroup=fh,Mh.ContextMenu=nh;var[Nh,Ph]=Sa(`Modal component was not found in tree`),Fh={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Ih=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalBody`,null,e);return(0,N.jsx)(Cp,{...Ph().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Ih.classes=Fh,Ih.displayName=`@mantine/core/ModalBody`;var Lh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalCloseButton`,null,e);return(0,N.jsx)(wp,{...Ph().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Lh.classes=Fh,Lh.displayName=`@mantine/core/ModalCloseButton`;var Rh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=D(`ModalContent`,null,e),l=Ph(),u=l.scrollAreaComponent||Mp;return(0,N.jsx)(Tp,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,N.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${j(l.yOffset)} * 2))`},children:o})})});Rh.classes=Fh,Rh.displayName=`@mantine/core/ModalContent`;var zh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalHeader`,null,e);return(0,N.jsx)(Ep,{...Ph().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});zh.classes=Fh,zh.displayName=`@mantine/core/ModalHeader`;var Bh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalOverlay`,null,e);return(0,N.jsx)(kp,{...Ph().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});Bh.classes=Fh,Bh.displayName=`@mantine/core/ModalOverlay`;var Vh={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},Hh=O((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:ce(t),"--modal-size":Pe(n,`modal-size`),"--modal-y-offset":j(r),"--modal-x-offset":j(i)}})),Uh=g(e=>{let t=D(`ModalRoot`,Vh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=w({name:m,classes:Fh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Hh});return(0,N.jsx)(Nh,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,N.jsx)(bp,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===id.Autosize||void 0,unstyled:o,...g})})});Uh.classes=Fh,Uh.varsResolver=Hh,Uh.displayName=`@mantine/core/ModalRoot`;var Wh=(0,M.createContext)(null);function Gh({children:e}){let[t,n]=(0,M.useState)([]),[r,i]=(0,M.useState)(ka(`modal`));return(0,N.jsx)(Wh,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Gh.displayName=`@mantine/core/ModalStack`;var Kh=g(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=D(`ModalTitle`,null,e);return(0,N.jsx)(jp,{...Ph().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});Kh.classes=Fh,Kh.displayName=`@mantine/core/ModalTitle`;var qh={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:ka(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},Jh=g(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=D(`Modal`,qh,e),f=(0,M.use)(Wh),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l)}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,M.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||ka(`modal`)):f.removeModal(l))},[c,l,u]),(0,N.jsxs)(Uh,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,N.jsx)(Bh,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,N.jsxs)(Rh,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,N.jsxs)(zh,{children:[t&&(0,N.jsx)(Kh,{children:t}),i&&(0,N.jsx)(Lh,{...a})]}),(0,N.jsx)(Ih,{children:o})]})]})});Jh.classes=Fh,Jh.displayName=`@mantine/core/Modal`,Jh.Root=Uh,Jh.Overlay=Bh,Jh.Content=Rh,Jh.Body=Ih,Jh.Header=zh,Jh.Title=Kh,Jh.CloseButton=Lh,Jh.Stack=Gh;function Yh({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,M.useState)(n),a=(0,M.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Gu({placement:t,middleware:[$l({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,M.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,M.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=Hs(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var Xh={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},Zh={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:ka(`popover`)},Qh=O((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:ce(t),"--tooltip-bg":n?x(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),$h=g(e=>{let t=D(`TooltipFloating`,Zh,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:x,portalProps:S,attributes:C,ref:T,...E}=t,O=b(),k=w({name:`TooltipFloating`,props:t,classes:Xh,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:C,rootSelector:`tooltip`,vars:x,varsResolver:Qh}),{handleMouseMove:ee,x:te,y:ne,opened:re,boundaryRef:A,floating:ie,setOpened:ae}=Yh({offset:p,position:m,defaultOpened:v}),oe=mo(n);if(!oe)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let se=ro(A,po(oe),T),ce=oe.props,le=e=>{ce.onMouseEnter?.(e),ee(e),ae(!0)},ue=e=>{ce.onMouseLeave?.(e),ae(!1)};return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Td,{...S,withinPortal:i,children:(0,N.jsx)(Be,{...E,...k(`tooltip`,{style:{...zo(a,O),zIndex:g,display:!_&&re?`block`:`none`,top:Number.isFinite(ne)?Math.round(ne):``,left:Number.isFinite(te)?Math.round(te):``}}),variant:y,ref:ie,mod:{multiline:h},children:f})}),(0,M.cloneElement)(oe,{...ce,[r]:se,onMouseEnter:le,onMouseLeave:ue})]})});$h.classes=Xh,$h.varsResolver=Qh,$h.displayName=`@mantine/core/TooltipFloating`;var eg=(0,M.createContext)({withinGroup:!1}),tg={openDelay:0,closeDelay:0};function ng(e){let{openDelay:t,closeDelay:n,children:r}=D(`TooltipGroup`,tg,e);return(0,N.jsx)(eg,{value:{withinGroup:!0},children:(0,N.jsx)(Iu,{delay:{open:t,close:n},children:r})})}ng.displayName=`@mantine/core/TooltipGroup`,ng.extend=e=>e;function rg(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function ig(e){let t=rg(e.middlewares),n=[Ql(e.offset)];return t.shift&&n.push($l(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?tu():tu(t.flip)),n.push(au({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?iu():iu(t.inline)):e.inline&&n.push(iu()),n}function ag(e){let[t,n]=(0,M.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,M.use)(eg).withinGroup,a=pe(),o=(0,M.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=Gu({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:ig(e),whileElementsMounted:Pl}),{delay:m,currentId:h,setCurrentId:g}=Lu(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=Yu([Mu(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?td():null}),qu(l,{enabled:e.events?.focus,visibleOnly:!0}),Zu(l,{role:`tooltip`}),Uu(l,{enabled:e.opened===void 0})]),y=(0,M.useRef)(d);Ee(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var og={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:ka(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},sg=O((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:ce(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),cg=g(e=>{let t=D(`Tooltip`,og,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:T,transitionProps:E,multiline:O,events:k,interactive:ee,zIndex:te,disabled:ne,onClick:re,onMouseEnter:A,onMouseLeave:ie,inline:oe,variant:se,keepMounted:ce,vars:le,portalProps:ue,mod:de,floatingStrategy:fe,middlewares:j,autoContrast:pe,attributes:me,target:he,ref:ge,..._e}=t,{dir:ve}=Vo(),ye=(0,M.useRef)(null),be=ag({position:hd(ve,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:k,interactive:ee,arrowRef:ye,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:oe,strategy:fe,middlewares:j});(0,M.useEffect)(()=>{let e=he instanceof HTMLElement?he:typeof he==`string`?document.querySelector(he):he?.current||null;e&&be.reference(e)},[he,be]);let xe=w({name:`Tooltip`,props:t,classes:Xh,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:me,rootSelector:`tooltip`,vars:le,varsResolver:sg}),Se=mo(n);if(!he&&!Se)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let Ce=xe(`tooltip`),we=ee&&!ne&&!!be.opened,Te=C===`merge`&&y?pd({position:be.placement,dir:ve}):void 0;if(he){let e=Dd(E,{duration:100,transition:`fade`});return(0,N.jsx)(N.Fragment,{children:(0,N.jsx)(Td,{...ue,withinPortal:d,children:(0,N.jsx)(Ve,{...e,keepMounted:ce,mounted:!ne&&!!be.opened,duration:be.isGroupPhase?10:e.duration,children:e=>(0,N.jsxs)(Be,{..._e,"data-fixed":fe===`fixed`||void 0,variant:se,mod:[{multiline:O,interactive:we},de],...Ce,...be.getFloatingProps({ref:be.floating,className:Ce.className,style:{...Ce.style,...e,...Te,zIndex:te,top:be.y??0,left:be.x??0}}),children:[a,(0,N.jsx)(md,{ref:ye,arrowX:be.arrowX,arrowY:be.arrowY,visible:y,position:be.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...xe(`arrow`)})]})})})})}let Ee=Se.props,De=ro(be.reference,po(Se),ge),Oe=Dd(E,{duration:100,transition:`fade`});return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(Td,{...ue,withinPortal:d,children:(0,N.jsx)(Ve,{...Oe,keepMounted:ce,mounted:!ne&&!!be.opened,duration:be.isGroupPhase?10:Oe.duration,children:e=>(0,N.jsxs)(Be,{..._e,"data-fixed":fe===`fixed`||void 0,variant:se,mod:[{multiline:O,interactive:we},de],...be.getFloatingProps({ref:be.floating,className:xe(`tooltip`).className,style:{...xe(`tooltip`).style,...e,...Te,zIndex:te,top:be.y??0,left:be.x??0}}),children:[a,(0,N.jsx)(md,{ref:ye,arrowX:be.arrowX,arrowY:be.arrowY,visible:y,position:be.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...xe(`arrow`)})]})})}),(0,M.cloneElement)(Se,be.getReferenceProps({onClick:re,onMouseEnter:A,onMouseLeave:ie,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...Ee,className:ae(v,Ee.className),[i]:De}))]})});cg.classes=Xh,cg.varsResolver=sg,cg.displayName=`@mantine/core/Tooltip`,cg.Floating=$h,cg.Group=ng;function lg(e){if(e!==void 0)return typeof e==`number`?j(e):e}function ug({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=b(),s=t===void 0?e:t,c=r!==void 0,l=Se({"--sg-spacing-x":de(Fa(e)),"--sg-spacing-y":de(Fa(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":lg(r)}:{"--sg-cols":Fa(n)?.toString()}}),u=ke(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=de(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=de(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,N.jsx)(be,{styles:l,media:Pa(ke(u),o.breakpoints).filter(e=>ke(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function dg(e){return typeof e==`object`&&e?ke(e):[]}function fg(e){return e.sort((e,t)=>ba(e)-ba(t))}function pg({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return fg(Array.from(new Set([...dg(e),...dg(t),...r===void 0?dg(n):[]])))}function mg({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=Se({"--sg-spacing-x":de(Fa(e)),"--sg-spacing-y":de(Fa(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":lg(r)}:{"--sg-cols":Fa(n)?.toString()}}),l=pg({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`]=de(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=de(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,N.jsx)(be,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var hg={container:`m_925c2d2c`,root:`m_2415a157`},gg={cols:1,spacing:`md`,type:`media`},_g=g(e=>{let t=D(`SimpleGrid`,gg,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=w({name:`SimpleGrid`,classes:hg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=E(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(mg,{...t,selector:`.${v}`}),(0,N.jsx)(`div`,{..._(`container`),children:(0,N.jsx)(Be,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(ug,{...t,selector:`.${v}`}),(0,N.jsx)(Be,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});_g.classes=hg,_g.displayName=`@mantine/core/SimpleGrid`;var vg={root:`m_d08caa0`},yg=g(e=>{let t=D(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t;return(0,N.jsx)(Be,{...w({name:`Typography`,classes:vg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s})(`root`),...c})});yg.classes=vg,yg.displayName=`@mantine/core/Typography`;var bg=[];for(let e=0;e<256;++e)bg.push((e+256).toString(16).slice(1));function xg(e,t=0){return(bg[e[t+0]]+bg[e[t+1]]+bg[e[t+2]]+bg[e[t+3]]+`-`+bg[e[t+4]]+bg[e[t+5]]+`-`+bg[e[t+6]]+bg[e[t+7]]+`-`+bg[e[t+8]]+bg[e[t+9]]+`-`+bg[e[t+10]]+bg[e[t+11]]+bg[e[t+12]]+bg[e[t+13]]+bg[e[t+14]]+bg[e[t+15]]).toLowerCase()}var Sg,Cg=new Uint8Array(16);function wg(){if(!Sg){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Sg=crypto.getRandomValues.bind(crypto)}return Sg(Cg)}var Tg={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Eg(e,t,n){if(Tg.randomUUID&&!t&&!e)return Tg.randomUUID();e||={};let r=e.random??e.rng?.()??wg();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return xg(r)}var Dg;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Dg||={});var Og;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Og||={});var P=Dg.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),kg=e=>{switch(typeof e){case`undefined`:return P.undefined;case`string`:return P.string;case`number`:return Number.isNaN(e)?P.nan:P.number;case`boolean`:return P.boolean;case`function`:return P.function;case`bigint`:return P.bigint;case`symbol`:return P.symbol;case`object`:return Array.isArray(e)?P.array:e===null?P.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?P.promise:typeof Map<`u`&&e instanceof Map?P.map:typeof Set<`u`&&e instanceof Set?P.set:typeof Date<`u`&&e instanceof Date?P.date:P.object;default:return P.unknown}},F=Dg.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Ag=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Ag.create=e=>new Ag(e);var jg=(e,t)=>{let n;switch(e.code){case F.invalid_type:n=e.received===P.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case F.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Dg.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:n=`Unrecognized key(s) in object: ${Dg.joinValues(e.keys,`, `)}`;break;case F.invalid_union:n=`Invalid input`;break;case F.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Dg.joinValues(e.options)}`;break;case F.invalid_enum_value:n=`Invalid enum value. Expected ${Dg.joinValues(e.options)}, received '${e.received}'`;break;case F.invalid_arguments:n=`Invalid function arguments`;break;case F.invalid_return_type:n=`Invalid function return type`;break;case F.invalid_date:n=`Invalid date`;break;case F.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Dg.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case F.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case F.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case F.custom:n=`Invalid input`;break;case F.invalid_intersection_types:n=`Intersection results could not be merged`;break;case F.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case F.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Dg.assertNever(e)}return{message:n}},Mg=jg;function Ng(){return Mg}var Pg=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function I(e,t){let n=Ng(),r=Pg({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===jg?void 0:jg].filter(e=>!!e)});e.common.issues.push(r)}var Fg=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return Ig;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return Ig;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},Ig=Object.freeze({status:`aborted`}),Lg=e=>({status:`dirty`,value:e}),Rg=e=>({status:`valid`,value:e}),zg=e=>e.status===`aborted`,Bg=e=>e.status===`dirty`,Vg=e=>e.status===`valid`,Hg=e=>typeof Promise<`u`&&e instanceof Promise,L;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(L||={});var Ug=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Wg=(e,t)=>{if(Vg(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Ag(e.common.issues);return this._error=t,this._error}}};function Gg(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var Kg=class{get description(){return this._def.description}_getType(e){return kg(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:kg(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Fg,ctx:{common:e.parent.common,data:e.data,parsedType:kg(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Hg(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kg(e)};return Wg(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kg(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Vg(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Vg(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:kg(e)},r=this._parse({data:e,path:n.path,parent:n});return Wg(n,await(Hg(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:F.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new Y_({schema:this,typeName:R.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return X_.create(this,this._def)}nullable(){return Z_.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A_.create(this)}promise(){return J_.create(this,this._def)}or(e){return N_.create([this,e],this._def)}and(e){return L_.create(this,e,this._def)}transform(e){return new Y_({...Gg(this._def),schema:this,typeName:R.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Q_({...Gg(this._def),innerType:this,defaultValue:t,typeName:R.ZodDefault})}brand(){return new tv({typeName:R.ZodBranded,type:this,...Gg(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new $_({...Gg(this._def),innerType:this,catchValue:t,typeName:R.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return nv.create(this,e)}readonly(){return rv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},qg=/^c[^\s-]{8,}$/i,Jg=/^[0-9a-z]+$/,Yg=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xg=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Zg=/^[a-z0-9_-]{21}$/i,Qg=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$g=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,e_=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,t_=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,n_,r_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,i_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,a_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,o_=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,s_=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,c_=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,l_=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,u_=RegExp(`^${l_}$`);function d_(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function f_(e){return RegExp(`^${d_(e)}$`)}function p_(e){let t=`${l_}T${d_(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function m_(e,t){return!((t!==`v4`&&t||!r_.test(e))&&(t!==`v6`&&t||!a_.test(e)))}function h_(e,t){if(!Qg.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function g_(e,t){return!((t!==`v4`&&t||!i_.test(e))&&(t!==`v6`&&t||!o_.test(e)))}var __=class e extends Kg{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.string,received:t.parsedType}),Ig}let t=new Fg,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:F.invalid_string,...L.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...L.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...L.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...L.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...L.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...L.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...L.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...L.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...L.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...L.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...L.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...L.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...L.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...L.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...L.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...L.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...L.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...L.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...L.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...L.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...L.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...L.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...L.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...L.errToObj(t)})}nonempty(e){return this.min(1,L.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew __({checks:[],typeName:R.ZodString,coerce:e?.coerce??!1,...Gg(e)});function v_(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var y_=class e extends Kg{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P.number){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.number,received:t.parsedType}),Ig}let t,n=new Fg;for(let r of this._def.checks)r.kind===`int`?Dg.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),I(t,{code:F.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?v_(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_finite,message:r.message}),n.dirty()):Dg.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,L.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,L.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,L.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,L.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:L.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:L.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:L.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:L.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:L.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:L.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:L.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:L.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:L.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:L.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&Dg.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew y_({checks:[],typeName:R.ZodNumber,coerce:e?.coerce||!1,...Gg(e)});var b_=class e extends Kg{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==P.bigint)return this._getInvalidInput(e);let t,n=new Fg;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Dg.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.bigint,received:t.parsedType}),Ig}gte(e,t){return this.setLimit(`min`,e,!0,L.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,L.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,L.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,L.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:L.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:L.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:L.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:L.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:L.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:L.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew b_({checks:[],typeName:R.ZodBigInt,coerce:e?.coerce??!1,...Gg(e)});var x_=class extends Kg{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P.boolean){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.boolean,received:t.parsedType}),Ig}return Rg(e.data)}};x_.create=e=>new x_({typeName:R.ZodBoolean,coerce:e?.coerce||!1,...Gg(e)});var S_=class e extends Kg{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.date,received:t.parsedType}),Ig}if(Number.isNaN(e.data.getTime()))return I(this._getOrReturnCtx(e),{code:F.invalid_date}),Ig;let t=new Fg,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Dg.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:L.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:L.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew S_({checks:[],coerce:e?.coerce||!1,typeName:R.ZodDate,...Gg(e)});var C_=class extends Kg{_parse(e){if(this._getType(e)!==P.symbol){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.symbol,received:t.parsedType}),Ig}return Rg(e.data)}};C_.create=e=>new C_({typeName:R.ZodSymbol,...Gg(e)});var w_=class extends Kg{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.undefined,received:t.parsedType}),Ig}return Rg(e.data)}};w_.create=e=>new w_({typeName:R.ZodUndefined,...Gg(e)});var T_=class extends Kg{_parse(e){if(this._getType(e)!==P.null){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.null,received:t.parsedType}),Ig}return Rg(e.data)}};T_.create=e=>new T_({typeName:R.ZodNull,...Gg(e)});var E_=class extends Kg{constructor(){super(...arguments),this._any=!0}_parse(e){return Rg(e.data)}};E_.create=e=>new E_({typeName:R.ZodAny,...Gg(e)});var D_=class extends Kg{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Rg(e.data)}};D_.create=e=>new D_({typeName:R.ZodUnknown,...Gg(e)});var O_=class extends Kg{_parse(e){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.never,received:t.parsedType}),Ig}};O_.create=e=>new O_({typeName:R.ZodNever,...Gg(e)});var k_=class extends Kg{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.void,received:t.parsedType}),Ig}return Rg(e.data)}};k_.create=e=>new k_({typeName:R.ZodVoid,...Gg(e)});var A_=class e extends Kg{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==P.array)return I(t,{code:F.invalid_type,expected:P.array,received:t.parsedType}),Ig;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(I(t,{code:F.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Ug(t,e,t.path,n)))).then(e=>Fg.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Ug(t,e,t.path,n)));return Fg.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:L.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:L.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:L.toString(n)}})}nonempty(e){return this.min(1,e)}};A_.create=(e,t)=>new A_({type:e,minLength:null,maxLength:null,exactLength:null,typeName:R.ZodArray,...Gg(t)});function j_(e){if(e instanceof M_){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=X_.create(j_(r))}return new M_({...e._def,shape:()=>t})}return e instanceof A_?new A_({...e._def,type:j_(e.element)}):e instanceof X_?X_.create(j_(e.unwrap())):e instanceof Z_?Z_.create(j_(e.unwrap())):e instanceof R_?R_.create(e.items.map(e=>j_(e))):e}var M_=class e extends Kg{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Dg.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==P.object){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.object,received:t.parsedType}),Ig}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof O_&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Ug(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof O_){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(I(n,{code:F.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Ug(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Fg.mergeObjectSync(t,e)):Fg.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return L.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:L.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:R.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Dg.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Dg.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return j_(this)}partial(t){let n={};for(let e of Dg.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Dg.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof X_;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return G_(Dg.objectKeys(this.shape))}};M_.create=(e,t)=>new M_({shape:()=>e,unknownKeys:`strip`,catchall:O_.create(),typeName:R.ZodObject,...Gg(t)}),M_.strictCreate=(e,t)=>new M_({shape:()=>e,unknownKeys:`strict`,catchall:O_.create(),typeName:R.ZodObject,...Gg(t)}),M_.lazycreate=(e,t)=>new M_({shape:e,unknownKeys:`strip`,catchall:O_.create(),typeName:R.ZodObject,...Gg(t)});var N_=class extends Kg{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Ag(e.ctx.common.issues));return I(t,{code:F.invalid_union,unionErrors:n}),Ig}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Ag(e));return I(t,{code:F.invalid_union,unionErrors:i}),Ig}}get options(){return this._def.options}};N_.create=(e,t)=>new N_({options:e,typeName:R.ZodUnion,...Gg(t)});var P_=e=>e instanceof U_?P_(e.schema):e instanceof Y_?P_(e.innerType()):e instanceof W_?[e.value]:e instanceof K_?e.options:e instanceof q_?Dg.objectValues(e.enum):e instanceof Q_?P_(e._def.innerType):e instanceof w_?[void 0]:e instanceof T_?[null]:e instanceof X_?[void 0,...P_(e.unwrap())]:e instanceof Z_?[null,...P_(e.unwrap())]:e instanceof tv||e instanceof rv?P_(e.unwrap()):e instanceof $_?P_(e._def.innerType):[],F_=class e extends Kg{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.object)return I(t,{code:F.invalid_type,expected:P.object,received:t.parsedType}),Ig;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(I(t,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ig)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=P_(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:R.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Gg(r)})}};function I_(e,t){let n=kg(e),r=kg(t);if(e===t)return{valid:!0,data:e};if(n===P.object&&r===P.object){let n=Dg.objectKeys(t),r=Dg.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=I_(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===P.array&&r===P.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(zg(e)||zg(r))return Ig;let i=I_(e.value,r.value);return i.valid?((Bg(e)||Bg(r))&&t.dirty(),{status:t.value,value:i.data}):(I(n,{code:F.invalid_intersection_types}),Ig)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};L_.create=(e,t,n)=>new L_({left:e,right:t,typeName:R.ZodIntersection,...Gg(n)});var R_=class e extends Kg{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.array)return I(n,{code:F.invalid_type,expected:P.array,received:n.parsedType}),Ig;if(n.data.lengththis._def.items.length&&(I(n,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Ug(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Fg.mergeArray(t,e)):Fg.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};R_.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new R_({items:e,typeName:R.ZodTuple,rest:null,...Gg(t)})};var z_=class e extends Kg{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.object)return I(n,{code:F.invalid_type,expected:P.object,received:n.parsedType}),Ig;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Ug(n,e,n.path,e)),value:a._parse(new Ug(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Fg.mergeObjectAsync(t,r):Fg.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Kg?new e({keyType:t,valueType:n,typeName:R.ZodRecord,...Gg(r)}):new e({keyType:__.create(),valueType:t,typeName:R.ZodRecord,...Gg(n)})}},B_=class extends Kg{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.map)return I(n,{code:F.invalid_type,expected:P.map,received:n.parsedType}),Ig;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Ug(n,e,n.path,[a,`key`])),value:i._parse(new Ug(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return Ig;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return Ig;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};B_.create=(e,t,n)=>new B_({valueType:t,keyType:e,typeName:R.ZodMap,...Gg(n)});var V_=class e extends Kg{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.set)return I(n,{code:F.invalid_type,expected:P.set,received:n.parsedType}),Ig;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(I(n,{code:F.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return Ig;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Ug(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:L.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:L.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};V_.create=(e,t)=>new V_({valueType:e,minSize:null,maxSize:null,typeName:R.ZodSet,...Gg(t)});var H_=class e extends Kg{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.function)return I(t,{code:F.invalid_type,expected:P.function,received:t.parsedType}),Ig;function n(e,n){return Pg({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ng(),jg].filter(e=>!!e),issueData:{code:F.invalid_arguments,argumentsError:n}})}function r(e,n){return Pg({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ng(),jg].filter(e=>!!e),issueData:{code:F.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof J_){let e=this;return Rg(async function(...t){let o=new Ag([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return Rg(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Ag([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Ag([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:R_.create(t).rest(D_.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||R_.create([]).rest(D_.create()),returns:n||D_.create(),typeName:R.ZodFunction,...Gg(r)})}},U_=class extends Kg{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};U_.create=(e,t)=>new U_({getter:e,typeName:R.ZodLazy,...Gg(t)});var W_=class extends Kg{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return I(t,{received:t.data,code:F.invalid_literal,expected:this._def.value}),Ig}return{status:`valid`,value:e.data}}get value(){return this._def.value}};W_.create=(e,t)=>new W_({value:e,typeName:R.ZodLiteral,...Gg(t)});function G_(e,t){return new K_({values:e,typeName:R.ZodEnum,...Gg(t)})}var K_=class e extends Kg{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return I(t,{expected:Dg.joinValues(n),received:t.parsedType,code:F.invalid_type}),Ig}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return I(t,{received:t.data,code:F.invalid_enum_value,options:n}),Ig}return Rg(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};K_.create=G_;var q_=class extends Kg{_parse(e){let t=Dg.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==P.string&&n.parsedType!==P.number){let e=Dg.objectValues(t);return I(n,{expected:Dg.joinValues(e),received:n.parsedType,code:F.invalid_type}),Ig}if(this._cache||=new Set(Dg.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Dg.objectValues(t);return I(n,{received:n.data,code:F.invalid_enum_value,options:e}),Ig}return Rg(e.data)}get enum(){return this._def.values}};q_.create=(e,t)=>new q_({values:e,typeName:R.ZodNativeEnum,...Gg(t)});var J_=class extends Kg{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==P.promise&&t.common.async===!1?(I(t,{code:F.invalid_type,expected:P.promise,received:t.parsedType}),Ig):Rg((t.parsedType===P.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};J_.create=(e,t)=>new J_({type:e,typeName:R.ZodPromise,...Gg(t)});var Y_=class extends Kg{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===R.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{I(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return Ig;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?Ig:r.status===`dirty`||t.value===`dirty`?Lg(r.value):r});{if(t.value===`aborted`)return Ig;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?Ig:r.status===`dirty`||t.value===`dirty`?Lg(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?Ig:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?Ig:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Vg(e))return Ig;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Vg(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):Ig)}Dg.assertNever(r)}};Y_.create=(e,t,n)=>new Y_({schema:e,typeName:R.ZodEffects,effect:t,...Gg(n)}),Y_.createWithPreprocess=(e,t,n)=>new Y_({schema:t,effect:{type:`preprocess`,transform:e},typeName:R.ZodEffects,...Gg(n)});var X_=class extends Kg{_parse(e){return this._getType(e)===P.undefined?Rg(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};X_.create=(e,t)=>new X_({innerType:e,typeName:R.ZodOptional,...Gg(t)});var Z_=class extends Kg{_parse(e){return this._getType(e)===P.null?Rg(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Z_.create=(e,t)=>new Z_({innerType:e,typeName:R.ZodNullable,...Gg(t)});var Q_=class extends Kg{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===P.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Q_.create=(e,t)=>new Q_({innerType:e,typeName:R.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Gg(t)});var $_=class extends Kg{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Hg(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Ag(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Ag(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};$_.create=(e,t)=>new $_({innerType:e,typeName:R.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Gg(t)});var ev=class extends Kg{_parse(e){if(this._getType(e)!==P.nan){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.nan,received:t.parsedType}),Ig}return{status:`valid`,value:e.data}}};ev.create=e=>new ev({typeName:R.ZodNaN,...Gg(e)});var tv=class extends Kg{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},nv=class e extends Kg{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Ig:e.status===`dirty`?(t.dirty(),Lg(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Ig:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:R.ZodPipeline})}},rv=class extends Kg{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Vg(e)&&(e.value=Object.freeze(e.value)),e);return Hg(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};rv.create=(e,t)=>new rv({innerType:e,typeName:R.ZodReadonly,...Gg(t)}),M_.lazycreate;var R;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(R||={});var z=__.create,iv=y_.create;ev.create,b_.create;var av=x_.create;S_.create,C_.create,w_.create,T_.create;var ov=E_.create,sv=D_.create;O_.create,k_.create;var cv=A_.create,lv=M_.create;M_.strictCreate;var uv=N_.create,dv=F_.create;L_.create,R_.create;var fv=z_.create;B_.create,V_.create,H_.create,U_.create;var B=W_.create,pv=K_.create,mv=q_.create;J_.create,Y_.create,X_.create,Z_.create,Y_.createWithPreprocess,nv.create;var hv=qe(),gv=fv(ov()).optional();function _v(e,t){return t===void 0?e:e===void 0?{...t}:{...e,...t}}var vv=lv({name:z(),arguments:z()}),yv=lv({id:z(),type:B(`function`),function:vv,encryptedValue:z().optional(),metadata:gv}),bv=lv({id:z(),role:z(),content:z().optional(),name:z().optional(),encryptedValue:z().optional(),subagentRunId:z().optional(),metadata:gv}),xv=lv({type:B(`text`),text:z()}),Sv=dv(`type`,[lv({type:B(`data`),value:z(),mimeType:z()}),lv({type:B(`url`),value:z(),mimeType:z().optional()})]),Cv=lv({type:B(`image`),source:Sv,metadata:sv().optional()}),wv=lv({type:B(`audio`),source:Sv,metadata:sv().optional()}),Tv=lv({type:B(`video`),source:Sv,metadata:sv().optional()}),Ev=lv({type:B(`document`),source:Sv,metadata:sv().optional()}),Dv=lv({type:B(`binary`),mimeType:z(),id:z().optional(),url:z().optional(),data:z().optional(),filename:z().optional()}),Ov=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:F.custom,message:`BinaryInputContent requires at least one of id, url, or data.`,path:[`id`]})};Dv.superRefine((e,t)=>{Ov(e,t)});var kv=dv(`type`,[xv,Cv,wv,Tv,Ev,Dv]).superRefine((e,t)=>{e.type===`binary`&&Ov(e,t)}),Av=dv(`role`,[bv.extend({role:B(`developer`),content:z()}),bv.extend({role:B(`system`),content:z()}),bv.extend({role:B(`assistant`),content:z().optional(),toolCalls:cv(yv).optional()}),bv.extend({role:B(`user`),content:uv([z(),cv(kv)])}),lv({id:z(),content:z(),role:B(`tool`),toolCallId:z(),error:z().optional(),encryptedValue:z().optional(),subagentRunId:z().optional(),metadata:gv}),lv({id:z(),role:B(`activity`),activityType:z(),content:fv(ov()),subagentRunId:z().optional(),metadata:gv}),lv({id:z(),role:B(`reasoning`),content:z(),encryptedValue:z().optional(),subagentRunId:z().optional(),metadata:gv})]);uv([B(`developer`),B(`system`),B(`assistant`),B(`user`),B(`tool`),B(`activity`),B(`reasoning`)]);var jv=lv({description:z(),value:z()}),Mv=lv({name:z(),description:z(),parameters:ov(),metadata:fv(ov()).optional()}),Nv=lv({id:z(),reason:z(),message:z().optional(),toolCallId:z().optional(),responseSchema:fv(ov()).optional(),expiresAt:z().optional(),metadata:fv(ov()).optional(),subagentRunId:z().optional()}),Pv=lv({interruptId:z(),status:pv([`resolved`,`cancelled`]),payload:ov().optional(),metadata:gv}),Fv=lv({threadId:z(),runId:z(),parentRunId:z().optional(),state:ov().transform(e=>e??void 0),messages:cv(Av),tools:cv(Mv),context:cv(jv),forwardedProps:ov(),resume:cv(Pv).optional()}),Iv=ov(),Lv=class extends Error{constructor(e){super(e)}},Rv=class extends Lv{constructor(){super(`Connect not implemented. This method is not supported by the current agent.`)}},zv=lv({name:z(),description:z().optional()}),Bv=lv({name:z().optional(),type:z().optional(),description:z().optional(),version:z().optional(),provider:z().optional(),documentationUrl:z().optional(),metadata:fv(sv()).optional()}),Vv=lv({streaming:av().optional(),websocket:av().optional(),httpBinary:av().optional(),pushNotifications:av().optional(),resumable:av().optional()}),Hv=lv({supported:av().optional(),items:cv(Mv).optional(),parallelCalls:av().optional(),clientProvided:av().optional()}),Uv=lv({structuredOutput:av().optional(),supportedMimeTypes:cv(z()).optional()}),Wv=lv({snapshots:av().optional(),deltas:av().optional(),memory:av().optional(),persistentState:av().optional()}),Gv=lv({supported:av().optional(),delegation:av().optional(),handoffs:av().optional(),subAgents:cv(zv).optional()}),Kv=lv({supported:av().optional(),streaming:av().optional(),encrypted:av().optional()}),qv=lv({image:av().optional(),audio:av().optional(),video:av().optional(),pdf:av().optional(),file:av().optional()}),Jv=lv({image:av().optional(),audio:av().optional()}),Yv=lv({input:qv.optional(),output:Jv.optional()}),Xv=lv({codeExecution:av().optional(),sandboxed:av().optional(),maxIterations:iv().optional(),maxExecutionTime:iv().optional()}),Zv=lv({supported:av().optional(),approvals:av().optional(),interventions:av().optional(),feedback:av().optional(),interrupts:av().optional(),approveWithEdits:av().optional()});lv({identity:Bv.optional(),transport:Vv.optional(),tools:Hv.optional(),output:Uv.optional(),state:Wv.optional(),multiAgent:Gv.optional(),reasoning:Kv.optional(),multimodal:Yv.optional(),execution:Xv.optional(),humanInTheLoop:Zv.optional(),custom:fv(sv()).optional()});var Qv=uv([B(`developer`),B(`system`),B(`assistant`),B(`user`)]),V=function(e){return e.TEXT_MESSAGE_START=`TEXT_MESSAGE_START`,e.TEXT_MESSAGE_CONTENT=`TEXT_MESSAGE_CONTENT`,e.TEXT_MESSAGE_END=`TEXT_MESSAGE_END`,e.TEXT_MESSAGE_CHUNK=`TEXT_MESSAGE_CHUNK`,e.TOOL_CALL_START=`TOOL_CALL_START`,e.TOOL_CALL_ARGS=`TOOL_CALL_ARGS`,e.TOOL_CALL_END=`TOOL_CALL_END`,e.TOOL_CALL_CHUNK=`TOOL_CALL_CHUNK`,e.TOOL_CALL_RESULT=`TOOL_CALL_RESULT`,e.THINKING_START=`THINKING_START`,e.THINKING_END=`THINKING_END`,e.THINKING_TEXT_MESSAGE_START=`THINKING_TEXT_MESSAGE_START`,e.THINKING_TEXT_MESSAGE_CONTENT=`THINKING_TEXT_MESSAGE_CONTENT`,e.THINKING_TEXT_MESSAGE_END=`THINKING_TEXT_MESSAGE_END`,e.STATE_SNAPSHOT=`STATE_SNAPSHOT`,e.STATE_DELTA=`STATE_DELTA`,e.MESSAGES_SNAPSHOT=`MESSAGES_SNAPSHOT`,e.ACTIVITY_SNAPSHOT=`ACTIVITY_SNAPSHOT`,e.ACTIVITY_DELTA=`ACTIVITY_DELTA`,e.RAW=`RAW`,e.CUSTOM=`CUSTOM`,e.RUN_STARTED=`RUN_STARTED`,e.RUN_FINISHED=`RUN_FINISHED`,e.RUN_ERROR=`RUN_ERROR`,e.STEP_STARTED=`STEP_STARTED`,e.STEP_FINISHED=`STEP_FINISHED`,e.REASONING_START=`REASONING_START`,e.REASONING_MESSAGE_START=`REASONING_MESSAGE_START`,e.REASONING_MESSAGE_CONTENT=`REASONING_MESSAGE_CONTENT`,e.REASONING_MESSAGE_END=`REASONING_MESSAGE_END`,e.REASONING_MESSAGE_CHUNK=`REASONING_MESSAGE_CHUNK`,e.REASONING_END=`REASONING_END`,e.REASONING_ENCRYPTED_VALUE=`REASONING_ENCRYPTED_VALUE`,e.SUBAGENT_STARTED=`SUBAGENT_STARTED`,e.SUBAGENT_FINISHED=`SUBAGENT_FINISHED`,e.SUBAGENT_ERROR=`SUBAGENT_ERROR`,e}({}),$v=lv({type:mv(V),timestamp:iv().optional(),rawEvent:ov().optional(),metadata:gv}).passthrough(),ey=$v.extend({type:B(V.TEXT_MESSAGE_START),messageId:z(),role:Qv.default(`assistant`),name:z().optional(),subagentRunId:z().optional()}),ty=$v.extend({type:B(V.TEXT_MESSAGE_CONTENT),messageId:z(),delta:z(),subagentRunId:z().optional()}),ny=$v.extend({type:B(V.TEXT_MESSAGE_END),messageId:z(),subagentRunId:z().optional()}),ry=$v.extend({type:B(V.TEXT_MESSAGE_CHUNK),messageId:z().optional(),role:Qv.optional(),delta:z().optional(),name:z().optional(),subagentRunId:z().optional()}),iy=$v.extend({type:B(V.THINKING_TEXT_MESSAGE_START)}),ay=ty.omit({messageId:!0,type:!0,subagentRunId:!0}).extend({type:B(V.THINKING_TEXT_MESSAGE_CONTENT)}),oy=$v.extend({type:B(V.THINKING_TEXT_MESSAGE_END)}),sy=$v.extend({type:B(V.TOOL_CALL_START),toolCallId:z(),toolCallName:z(),parentMessageId:z().nullable().optional().transform(e=>e??void 0),subagentRunId:z().optional()}),cy=$v.extend({type:B(V.TOOL_CALL_ARGS),toolCallId:z(),delta:z(),subagentRunId:z().optional()}),ly=$v.extend({type:B(V.TOOL_CALL_END),toolCallId:z(),subagentRunId:z().optional()}),uy=$v.extend({messageId:z(),type:B(V.TOOL_CALL_RESULT),toolCallId:z(),content:z(),role:B(`tool`).optional(),subagentRunId:z().optional()}),dy=$v.extend({type:B(V.TOOL_CALL_CHUNK),toolCallId:z().optional(),toolCallName:z().optional(),parentMessageId:z().nullable().optional().transform(e=>e??void 0),delta:z().optional(),subagentRunId:z().optional()}),fy=$v.extend({type:B(V.THINKING_START),title:z().optional()}),py=$v.extend({type:B(V.THINKING_END)}),my=$v.extend({type:B(V.STATE_SNAPSHOT),snapshot:Iv,subagentRunId:z().optional()}),hy=$v.extend({type:B(V.STATE_DELTA),delta:cv(ov()),subagentRunId:z().optional()}),gy=$v.extend({type:B(V.MESSAGES_SNAPSHOT),messages:cv(Av)}),_y=$v.extend({type:B(V.ACTIVITY_SNAPSHOT),messageId:z(),activityType:z(),content:fv(ov()),replace:av().optional().default(!0),subagentRunId:z().optional()}),vy=$v.extend({type:B(V.ACTIVITY_DELTA),messageId:z(),activityType:z(),patch:cv(ov()),subagentRunId:z().optional()}),yy=$v.extend({type:B(V.RAW),event:ov(),source:z().optional(),subagentRunId:z().optional()}),by=$v.extend({type:B(V.CUSTOM),name:z(),value:ov(),subagentRunId:z().optional()}),xy=$v.extend({type:B(V.RUN_STARTED),threadId:z(),runId:z(),parentRunId:z().optional(),input:Fv.optional()}),Sy=dv(`type`,[lv({type:B(`success`)}).strict(),lv({type:B(`interrupt`),interrupts:cv(Nv).min(1)}).strict()]),Cy=lv({provider:z().optional(),model:z().optional(),inputTokens:iv().int().nonnegative().optional(),outputTokens:iv().int().nonnegative().optional(),totalTokens:iv().int().nonnegative().optional(),reasoningTokens:iv().int().nonnegative().optional(),cachedInputTokens:iv().int().nonnegative().optional()}),wy=$v.extend({type:B(V.RUN_FINISHED),threadId:z(),runId:z(),result:ov().optional(),outcome:Sy.nullable().optional().transform(e=>e??void 0),usage:cv(Cy).optional()}),Ty=$v.extend({type:B(V.RUN_ERROR),message:z(),code:z().optional(),usage:cv(Cy).optional()}),Ey=$v.extend({type:B(V.STEP_STARTED),stepName:z(),subagentRunId:z().optional()}),Dy=$v.extend({type:B(V.STEP_FINISHED),stepName:z(),subagentRunId:z().optional()}),Oy=uv([B(`tool-call`),B(`message`)]),ky=$v.extend({type:B(V.REASONING_START),messageId:z(),subagentRunId:z().optional()}),Ay=$v.extend({type:B(V.REASONING_MESSAGE_START),messageId:z(),role:B(`reasoning`),subagentRunId:z().optional()}),jy=$v.extend({type:B(V.REASONING_MESSAGE_CONTENT),messageId:z(),delta:z(),subagentRunId:z().optional()}),My=$v.extend({type:B(V.REASONING_MESSAGE_END),messageId:z(),subagentRunId:z().optional()}),Ny=$v.extend({type:B(V.REASONING_MESSAGE_CHUNK),messageId:z().optional(),delta:z().optional(),subagentRunId:z().optional()}),Py=$v.extend({type:B(V.REASONING_END),messageId:z(),subagentRunId:z().optional()}),Fy=$v.extend({type:B(V.REASONING_ENCRYPTED_VALUE),subtype:Oy,entityId:z(),encryptedValue:z(),subagentRunId:z().optional()}),Iy=$v.extend({type:B(V.SUBAGENT_STARTED),subagentRunId:z(),name:z(),description:z().optional(),parentSubagentRunId:z().optional(),parentToolCallId:z().optional(),parentMessageId:z().optional()}),Ly=dv(`type`,[lv({type:B(`success`)}).strict(),lv({type:B(`suspended`),interruptIds:cv(z()).optional()}).strict()]),Ry=dv(`type`,[ey,ty,ny,ry,fy,py,iy,ay,oy,sy,cy,ly,dy,uy,my,hy,gy,_y,vy,yy,by,xy,wy,Ty,Ey,Dy,ky,Ay,jy,My,Ny,Py,Fy,Iy,$v.extend({type:B(V.SUBAGENT_FINISHED),subagentRunId:z(),result:ov().optional(),outcome:Ly.optional()}),$v.extend({type:B(V.SUBAGENT_ERROR),subagentRunId:z(),message:z(),code:z().optional()})]),zy=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),By=Object.prototype.hasOwnProperty;function Vy(e,t){return By.call(e,t)}function Hy(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n=48&&r<=57){t++;continue}return!1}return!0}function Gy(e){return e.indexOf(`/`)===-1&&e.indexOf(`~`)===-1?e:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ky(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function qy(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;tZy,_areEquals:()=>sb,applyOperation:()=>nb,applyPatch:()=>rb,applyReducer:()=>ib,deepClone:()=>Qy,getValueByPointer:()=>tb,validate:()=>ob,validator:()=>ab}),Zy=Yy,Qy=Uy,$y={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=tb(n,this.path);r&&=Uy(r);var i=nb(n,{op:`remove`,path:this.from}).removed;return nb(n,{op:`add`,path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=tb(n,this.from);return nb(n,{op:`add`,path:this.path,value:Uy(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:sb(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},eb={add:function(e,t,n){return Wy(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:$y.move,copy:$y.copy,test:$y.test,_get:$y._get};function tb(e,t){if(t==``)return e;var n={op:`_get`,path:t};return nb(e,n),n.value}function nb(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n==`function`?n(t,0,e,t.path):ab(t,0)),t.path===``){var o={newDocument:e};if(t.op===`add`)return o.newDocument=t.value,o;if(t.op===`replace`)return o.newDocument=t.value,o.removed=e,o;if(t.op===`move`||t.op===`copy`)return o.newDocument=tb(e,t.from),t.op===`move`&&(o.removed=e),o;if(t.op===`test`){if(o.test=sb(e,t.value),o.test===!1)throw new Zy(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o.newDocument=e,o}if(t.op===`remove`)return o.removed=e,o.newDocument=null,o;if(t.op===`_get`)return t.value=e,o;if(n)throw new Zy("Operation `op` property is not one of operations defined in RFC-6902",`OPERATION_OP_INVALID`,a,t,e);return o}r||(e=Uy(e));var s=(t.path||``).split(`/`),c=e,l=1,u=s.length,d=void 0,f=void 0,p=void 0;for(p=typeof n==`function`?n:ab;;){if(f=s[l],f&&f.indexOf(`~`)!=-1&&(f=Ky(f)),i&&(f==`__proto__`||f==`prototype`&&l>0&&s[l-1]==`constructor`))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[f]===void 0?d=s.slice(0,l).join(`/`):l==u-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),l++,Array.isArray(c)){if(f===`-`)f=c.length;else if(n&&!Wy(f))throw new Zy(`Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index`,`OPERATION_PATH_ILLEGAL_ARRAY_INDEX`,a,t,e);else Wy(f)&&(f=~~f);if(l>=u){if(n&&t.op===`add`&&f>c.length)throw new Zy(`The specified index MUST NOT be greater than the number of elements in the array`,`OPERATION_VALUE_OUT_OF_BOUNDS`,a,t,e);var o=eb[t.op].call(t,c,f,e);if(o.test===!1)throw new Zy(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}}else if(l>=u){var o=$y[t.op].call(t,c,f,e);if(o.test===!1)throw new Zy(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}if(c=c[f],n&&l0)throw new Zy('Operation `path` property must start with "/"',`OPERATION_PATH_INVALID`,t,e,n);if((e.op===`move`||e.op===`copy`)&&typeof e.from!=`string`)throw new Zy("Operation `from` property is not present (applicable in `move` and `copy` operations)",`OPERATION_FROM_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&e.value===void 0)throw new Zy("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&qy(e.value))throw new Zy("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED`,t,e,n);if(n){if(e.op==`add`){var i=e.path.split(`/`).length,a=r.split(`/`).length;if(i!==a+1&&i!==a)throw new Zy("Cannot perform an `add` operation at the desired path",`OPERATION_PATH_CANNOT_ADD`,t,e,n)}else if(e.op===`replace`||e.op===`remove`||e.op===`_get`){if(e.path!==r)throw new Zy(`Cannot perform the operation at a path that does not exist`,`OPERATION_PATH_UNRESOLVABLE`,t,e,n)}else if(e.op===`move`||e.op===`copy`){var o=ob([{op:`_get`,path:e.from,value:void 0}],n);if(o&&o.name===`OPERATION_PATH_UNRESOLVABLE`)throw new Zy(`Cannot perform the operation from a path that does not exist`,`OPERATION_FROM_UNRESOLVABLE`,t,e,n)}}}function ob(e,t,n){try{if(!Array.isArray(e))throw new Zy(`Patch sequence must be an array`,`SEQUENCE_NOT_AN_ARRAY`);if(t)rb(Uy(t),Uy(e),n||!0);else{n||=ab;for(var r=0;ryb,generate:()=>_b,observe:()=>gb,unobserve:()=>hb}),lb=new WeakMap,ub=function(){function e(e){this.observers=new Map,this.obj=e}return e}(),db=function(){function e(e,t){this.callback=e,this.observer=t}return e}();function fb(e){return lb.get(e)}function pb(e,t){return e.observers.get(t)}function mb(e,t){e.observers.delete(t.callback)}function hb(e,t){t.unobserve()}function gb(e,t){var n=[],r,i=fb(e);if(!i)i=new ub(e),lb.set(e,i);else{var a=pb(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=Uy(e),t){r.callback=t,r.next=null;var o=function(){_b(r)},s=function(){clearTimeout(r.next),r.next=setTimeout(o)};typeof window<`u`&&(window.addEventListener(`mouseup`,s),window.addEventListener(`keyup`,s),window.addEventListener(`mousedown`,s),window.addEventListener(`keydown`,s),window.addEventListener(`change`,s))}return r.patches=n,r.object=e,r.unobserve=function(){_b(r),clearTimeout(r.next),mb(i,r),typeof window<`u`&&(window.removeEventListener(`mouseup`,s),window.removeEventListener(`keyup`,s),window.removeEventListener(`mousedown`,s),window.removeEventListener(`keydown`,s),window.removeEventListener(`change`,s))},i.observers.set(t,new db(t,r)),r}function _b(e,t){t===void 0&&(t=!1);var n=lb.get(e.object);vb(n.value,e.object,e.patches,``,t),e.patches.length&&rb(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function vb(e,t,n,r,i){if(t!==e){typeof t.toJSON==`function`&&(t=t.toJSON());for(var a=Hy(t),o=Hy(e),s=!1,c=o.length-1;c>=0;c--){var l=o[c],u=e[l];if(Vy(t,l)&&(t[l]!==void 0||u===void 0||Array.isArray(t)!==!1)){var d=t[l];typeof u==`object`&&u&&typeof d==`object`&&d&&Array.isArray(u)===Array.isArray(d)?vb(u,d,n,r+`/`+Gy(l),i):u!==d&&(i&&n.push({op:`test`,path:r+`/`+Gy(l),value:Uy(u)}),n.push({op:`replace`,path:r+`/`+Gy(l),value:Uy(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:`test`,path:r+`/`+Gy(l),value:Uy(u)}),n.push({op:`remove`,path:r+`/`+Gy(l)}),s=!0):(i&&n.push({op:`test`,path:r,value:e}),n.push({op:`replace`,path:r,value:t}))}if(s||a.length!=o.length)for(var c=0;c0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?mb:(this.currentObservers=null,a.push(e),new pb(function(){t.currentObservers=null,fb(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Vb;return e.source=this,e},t.create=function(e,t){return new Zb(e,t)},t}(Vb),Zb=function(e){rf(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??mb},t}(Xb),Qb={now:function(){return(Qb.delegate||Date).now()},delegate:void 0},$b=function(e){rf(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=Qb);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a=0}function Xx(e){for(var t=[`topLevel`],n=0,r,i,a,o=function(e){return t.push(e)},s=function(e){return t[t.length-1]=e},c=function(e){r??(r=n,i=t.length,a=e)},l=function(e){e===a&&(r=void 0,i=void 0,a=void 0)},u=function(){return t.pop()},d=function(){return n--},f=function(e){if(`0`<=e&&e<=`9`){o(`number`);return}switch(e){case`"`:o(`string`);return;case`-`:o(`numberNeedsDigit`);return;case`t`:o(`true`);return;case`f`:o(`false`);return;case`n`:o(`null`);return;case`[`:o(`arrayNeedsValue`);return;case`{`:o(`objectNeedsKey`);return}},p=e.length;n`9`)&&(d(),u());break;case`numberNeedsDigit`:s(`number`);break;case`numberNeedsExponent`:s(m===`+`||m===`-`?`numberNeedsDigit`:`number`);break;case`true`:case`false`:case`null`:(m<`a`||m>`z`)&&(d(),u());break;case`arrayNeedsValue`:m===`]`?u():Yx(m)||(l(`collectionItem`),s(`arrayNeedsComma`),f(m));break;case`arrayNeedsComma`:m===`]`?u():m===`,`&&(c(`collectionItem`),s(`arrayNeedsValue`));break;case`objectNeedsKey`:m===`}`?u():m===`"`&&(c(`collectionItem`),s(`objectNeedsColon`),o(`string`));break;case`objectNeedsColon`:m===`:`&&s(`objectNeedsValue`);break;case`objectNeedsValue`:Yx(m)||(l(`collectionItem`),s(`objectNeedsComma`),f(m));break;case`objectNeedsComma`:m===`}`?u():m===`,`&&(c(`collectionItem`),s(`objectNeedsKey`))}}i!=null&&(t.length=i);for(var h=[r==null?e:e.slice(0,r)],g=function(t){return h.push(t.slice(e.length-e.lastIndexOf(t[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case`string`:h.push(`"`);break;case`numberNeedsDigit`:case`numberNeedsExponent`:h.push(`0`);break;case`true`:g(`true`);break;case`false`:g(`false`);break;case`null`:g(`null`);break;case`arrayNeedsValue`:case`arrayNeedsComma`:h.push(`]`);break;case`objectNeedsKey`:case`objectNeedsColon`:case`objectNeedsValue`:case`objectNeedsComma`:h.push(`}`)}return h.join(``)}function Zx(){let e=this.buf,t=this.pos,n=0,r=0;for(let i=0;i<28;i+=7){let a=e[t++];if(n|=(a&127)<>4,!(i&128)){this.pos=t,this.assertBounds(),this.varint64Lo=n,this.varint64Hi=r;return}for(let i=3;i<=31;i+=7){let a=e[t++];if(r|=(a&127)<=Qx&&(i+=r/Qx|0,r%=Qx)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?iS(r,i):rS(r,i)}function eS(e,t){let n=rS(e,t),r=n.hi&2147483648;r&&(n=iS(n.lo,n.hi));let i=tS(n.lo,n.hi);return r?`-`+i:i}function tS(e,t){if({lo:e,hi:t}=nS(e,t),t<=2097151)return String(Qx*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+aS(o)+aS(a)}function nS(e,t){return{lo:e>>>0,hi:t>>>0}}function rS(e,t){return{lo:e|0,hi:t|0}}function iS(e,t){return t=~t,e?e=~e+1:t+=1,rS(e,t)}var aS=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function oS(){let e=this.buf[this.pos++];if(!(e&128))return this.assertBounds(),e;let t=e&127;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}var sS=cS();function cS(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(globalThis.Deno||globalThis.Bun||typeof process!=`object`||{}.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||ri||ta.call(e)),fS(i)}return dS}function mS(e){return(t,n)=>{let r=e(t);return n.set(r),{written:r.byteLength}}}var hS;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(hS||={});var gS=class{constructor(e){this.stackPos=[],this.encodeUtf8Into=e?mS(e):pS().encodeUtf8Into,this.buffer=yS,this.viewCache=bS,this.pos=0}ensureCapacity(e){let t=this.pos+e;if(t>this.buffer.length){let e=this.buffer.length||_S;for(;e0&&n.set(this.buffer),this.buffer=n}}view(){let e=this.buffer,t=this.viewCache;if(t.byteLength===e.byteLength)return t;let n=new DataView(e.buffer);return this.viewCache=n,n}finish(){let e=this.buffer.slice(0,this.pos);return this.pos=0,this.stackPos=[],e}fork(){return this.stackPos.push(this.pos),this.ensureCapacity(vS),this.buffer[this.pos++]=0,this}join(){let e=this.stackPos.pop();if(e===void 0)throw Error(`invalid state, fork stack empty`);let t=this.pos-e-vS,n=SS(t);return n>vS&&(this.ensureCapacity(n-vS),this.buffer.copyWithin(e+n,e+vS,this.pos)),this.pos=e,this.uint32(t),this.pos+=t,this}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.ensureCapacity(e.length),this.buffer.set(e,this.pos),this.pos+=e.length,this}uint32(e){if(wS(e),this.ensureCapacity(5),e<128)return this.buffer[this.pos++]=e,this;for(;e>127;)this.buffer[this.pos++]=e&127|128,e>>>=7;return this.buffer[this.pos++]=e,this}int32(e){if(CS(e),e>=0)return this.uint32(e);this.ensureCapacity(10);for(let t=0;t<9;t++)this.buffer[this.pos++]=e&127|128,e>>=7;return this.buffer[this.pos++]=1,this}bool(e){return this.ensureCapacity(1),this.buffer[this.pos++]=+!!e,this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){typeof e!=`string`&&(e=String(e));let t=e.length;if(t<=xS){this.ensureCapacity(t+1);let n=this.buffer,r=this.pos;n[r++]=t;let i=0;for(;i127)break;n[r++]=t}if(i==t)return this.pos=r,this}this.ensureCapacity(t*3+5);let n=SS(t),r=this.buffer,i=this.pos,{written:a}=this.encodeUtf8Into(e,r.subarray(i+n)),o=SS(a);return o!=n&&r.copyWithin(i+o,i+n,i+n+a),this.uint32(a),this.pos+=a,this}float(e){return TS(e),this.ensureCapacity(4),this.view().setFloat32(this.pos,e,!0),this.pos+=4,this}double(e){return this.ensureCapacity(8),this.view().setFloat64(this.pos,e,!0),this.pos+=8,this}fixed32(e){return wS(e),this.ensureCapacity(4),this.view().setUint32(this.pos,e,!0),this.pos+=4,this}sfixed32(e){return CS(e),this.ensureCapacity(4),this.view().setInt32(this.pos,e,!0),this.pos+=4,this}sint32(e){return CS(e),this.uint32((e<<1^e>>31)>>>0)}sfixed64(e){let t=sS.enc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}fixed64(e){let t=sS.uEnc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}int64(e){let t=sS.enc(e);return this.writeVarint64(t.lo,t.hi)}sint64(e){let t=sS.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return this.writeVarint64(r,i)}uint64(e){let t=sS.uEnc(e);return this.writeVarint64(t.lo,t.hi)}writeVarint64(e,t){this.ensureCapacity(10);let n=this.buffer,r=this.pos;for(let i=0;i<28;i+=7){let a=e>>>i,o=!(!(a>>>7)&&t==0);if(n[r++]=(o?a|128:a)&255,!o)return this.pos=r,this}let i=e>>>28&15|(t&7)<<4,a=!!(t>>3);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this;for(let e=3;e<31;e+=7){let i=t>>>e,a=!!(i>>>7);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this}return n[r++]=t>>>31&1,this.pos=r,this}},_S=128,vS=1,yS=new Uint8Array,bS=new DataView(yS.buffer),xS=32;function SS(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}var U=class{constructor(e,t=pS().decodeUtf8){this.decodeUtf8=t,this.varint64Lo=0,this.varint64Hi=0,this.varint64=Zx,this.uint32=oS,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||n==5&&this.buf[this.pos-1]>15)throw Error(`illegal tag: varint overflows uint32`);let r=t>>>3,i=t&7;if(r<=0||i>5)throw Error(`illegal tag: field no `+r+` wire type `+i);return[r,i]}skip(e,t,n=100){let r=this.pos;switch(e){case hS.Varint:for(;this.buf[this.pos++]&128;);break;case hS.Bit64:this.pos+=4;case hS.Bit32:this.pos+=4;break;case hS.LengthDelimited:let r=this.uint32();this.pos+=r;break;case hS.StartGroup:if(n<=0)throw Error(`maximum recursion depth reached`);for(;;){let[e,r]=this.tag();if(r===hS.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(r,e,n-1)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return this.varint64(),sS.dec(this.varint64Lo,this.varint64Hi)}uint64(){return this.varint64(),sS.uDec(this.varint64Lo,this.varint64Hi)}sint64(){this.varint64();let e=this.varint64Lo,t=this.varint64Hi,n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,sS.dec(e,t)}bool(){let e=this.buf[this.pos];return e<128?(this.pos++,e!==0):(this.varint64(),this.varint64Lo!==0||this.varint64Hi!==0)}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return sS.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return sS.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){let t=this.bytes(),n=t.length;if(n<=xS){let r=Array(n);for(let i=0;i127)return this.decodeUtf8(t,e);r[i]=n}return String.fromCharCode.apply(String,r)}return this.decodeUtf8(t,e)}};function CS(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid int32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int32: `+e)}function wS(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid uint32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint32: `+e)}function TS(e){if(typeof e==`string`){let t=e;if(e=Number(e),Number.isNaN(e)&&t!==`NaN`)throw Error(`invalid float32: `+t)}else if(typeof e!=`number`)throw Error(`invalid float32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float32: `+e)}var ES=function(e){return e[e.NULL_VALUE=0]=`NULL_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function DS(){return{fields:{}}}var OS={encode(e,t=new gS){return Object.entries(e.fields).forEach(([e,n])=>{n!==void 0&&AS.encode({key:e,value:n},t.uint32(10).fork()).join()}),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=DS();for(;n.pos>>3){case 1:{if(e!==10)break;let t=AS.decode(n,n.uint32());t.value!==void 0&&(i.fields[t.key]=t.value);continue}}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return OS.fromPartial(e??{})},fromPartial(e){let t=DS();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{}),t},wrap(e){let t=DS();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function kS(){return{key:``,value:void 0}}var AS={encode(e,t=new gS){return e.key!==``&&t.uint32(10).string(e.key),e.value!==void 0&&W.encode(W.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=kS();for(;n.pos>>3){case 1:if(e!==10)break;i.key=n.string();continue;case 2:if(e!==18)break;i.value=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return AS.fromPartial(e??{})},fromPartial(e){let t=kS();return t.key=e.key??``,t.value=e.value??void 0,t}};function jS(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var W={encode(e,t=new gS){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&OS.encode(OS.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&NS.encode(NS.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=jS();for(;n.pos>>3){case 1:if(e!==8)break;i.nullValue=n.int32();continue;case 2:if(e!==17)break;i.numberValue=n.double();continue;case 3:if(e!==26)break;i.stringValue=n.string();continue;case 4:if(e!==32)break;i.boolValue=n.bool();continue;case 5:if(e!==42)break;i.structValue=OS.unwrap(OS.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.listValue=NS.unwrap(NS.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return W.fromPartial(e??{})},fromPartial(e){let t=jS();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=jS();if(e===null)t.nullValue=ES.NULL_VALUE;else if(typeof e==`boolean`)t.boolValue=e;else if(typeof e==`number`)t.numberValue=e;else if(typeof e==`string`)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e==`object`)t.structValue=e;else if(e!==void 0)throw new globalThis.Error(`Unsupported any value type: `+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function MS(){return{values:[]}}var NS={encode(e,t=new gS){for(let n of e.values)W.encode(W.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=MS();for(;n.pos>>3){case 1:if(e!==10)break;i.values.push(W.unwrap(W.decode(n,n.uint32())));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return NS.fromPartial(e??{})},fromPartial(e){let t=MS();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=MS();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty(`values`)&&globalThis.Array.isArray(e.values)?e.values:e}},PS=function(e){return e[e.ADD=0]=`ADD`,e[e.REMOVE=1]=`REMOVE`,e[e.REPLACE=2]=`REPLACE`,e[e.MOVE=3]=`MOVE`,e[e.COPY=4]=`COPY`,e[e.TEST=5]=`TEST`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function FS(){return{op:0,path:``,from:void 0,value:void 0}}var IS={encode(e,t=new gS){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==``&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&W.encode(W.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=FS();for(;n.pos>>3){case 1:if(e!==8)break;i.op=n.int32();continue;case 2:if(e!==18)break;i.path=n.string();continue;case 3:if(e!==26)break;i.from=n.string();continue;case 4:if(e!==34)break;i.value=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return IS.fromPartial(e??{})},fromPartial(e){let t=FS();return t.op=e.op??0,t.path=e.path??``,t.from=e.from??void 0,t.value=e.value??void 0,t}};function LS(){return{id:``,type:``,function:void 0}}var RS={encode(e,t=new gS){return e.id!==``&&t.uint32(10).string(e.id),e.type!==``&&t.uint32(18).string(e.type),e.function!==void 0&&BS.encode(e.function,t.uint32(26).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=LS();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.type=n.string();continue;case 3:if(e!==26)break;i.function=BS.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return RS.fromPartial(e??{})},fromPartial(e){let t=LS();return t.id=e.id??``,t.type=e.type??``,t.function=e.function!==void 0&&e.function!==null?BS.fromPartial(e.function):void 0,t}};function zS(){return{name:``,arguments:``}}var BS={encode(e,t=new gS){return e.name!==``&&t.uint32(10).string(e.name),e.arguments!==``&&t.uint32(18).string(e.arguments),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=zS();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.arguments=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return BS.fromPartial(e??{})},fromPartial(e){let t=zS();return t.name=e.name??``,t.arguments=e.arguments??``,t}};function VS(){return{value:``,mimeType:``}}var HS={encode(e,t=new gS){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==``&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=VS();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return HS.fromPartial(e??{})},fromPartial(e){let t=VS();return t.value=e.value??``,t.mimeType=e.mimeType??``,t}};function US(){return{value:``,mimeType:void 0}}var WS={encode(e,t=new gS){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==void 0&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=US();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return WS.fromPartial(e??{})},fromPartial(e){let t=US();return t.value=e.value??``,t.mimeType=e.mimeType??void 0,t}};function GS(){return{data:void 0,url:void 0}}var KS={encode(e,t=new gS){return e.data!==void 0&&HS.encode(e.data,t.uint32(10).fork()).join(),e.url!==void 0&&WS.encode(e.url,t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=GS();for(;n.pos>>3){case 1:if(e!==10)break;i.data=HS.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.url=WS.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return KS.fromPartial(e??{})},fromPartial(e){let t=GS();return t.data=e.data!==void 0&&e.data!==null?HS.fromPartial(e.data):void 0,t.url=e.url!==void 0&&e.url!==null?WS.fromPartial(e.url):void 0,t}};function qS(){return{text:``}}var JS={encode(e,t=new gS){return e.text!==``&&t.uint32(10).string(e.text),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=qS();for(;n.pos>>3){case 1:if(e!==10)break;i.text=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return JS.fromPartial(e??{})},fromPartial(e){let t=qS();return t.text=e.text??``,t}};function YS(){return{source:void 0,metadata:void 0}}var XS={encode(e,t=new gS){return e.source!==void 0&&KS.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=YS();for(;n.pos>>3){case 1:if(e!==10)break;i.source=KS.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return XS.fromPartial(e??{})},fromPartial(e){let t=YS();return t.source=e.source!==void 0&&e.source!==null?KS.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function ZS(){return{source:void 0,metadata:void 0}}var QS={encode(e,t=new gS){return e.source!==void 0&&KS.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=ZS();for(;n.pos>>3){case 1:if(e!==10)break;i.source=KS.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return QS.fromPartial(e??{})},fromPartial(e){let t=ZS();return t.source=e.source!==void 0&&e.source!==null?KS.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function $S(){return{source:void 0,metadata:void 0}}var eC={encode(e,t=new gS){return e.source!==void 0&&KS.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=$S();for(;n.pos>>3){case 1:if(e!==10)break;i.source=KS.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return eC.fromPartial(e??{})},fromPartial(e){let t=$S();return t.source=e.source!==void 0&&e.source!==null?KS.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function tC(){return{source:void 0,metadata:void 0}}var nC={encode(e,t=new gS){return e.source!==void 0&&KS.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=tC();for(;n.pos>>3){case 1:if(e!==10)break;i.source=KS.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return nC.fromPartial(e??{})},fromPartial(e){let t=tC();return t.source=e.source!==void 0&&e.source!==null?KS.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function rC(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}var iC={encode(e,t=new gS){return e.text!==void 0&&JS.encode(e.text,t.uint32(10).fork()).join(),e.image!==void 0&&XS.encode(e.image,t.uint32(18).fork()).join(),e.audio!==void 0&&QS.encode(e.audio,t.uint32(26).fork()).join(),e.video!==void 0&&eC.encode(e.video,t.uint32(34).fork()).join(),e.document!==void 0&&nC.encode(e.document,t.uint32(42).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=rC();for(;n.pos>>3){case 1:if(e!==10)break;i.text=JS.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.image=XS.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.audio=QS.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.video=eC.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.document=nC.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return iC.fromPartial(e??{})},fromPartial(e){let t=rC();return t.text=e.text!==void 0&&e.text!==null?JS.fromPartial(e.text):void 0,t.image=e.image!==void 0&&e.image!==null?XS.fromPartial(e.image):void 0,t.audio=e.audio!==void 0&&e.audio!==null?QS.fromPartial(e.audio):void 0,t.video=e.video!==void 0&&e.video!==null?eC.fromPartial(e.video):void 0,t.document=e.document!==void 0&&e.document!==null?nC.fromPartial(e.document):void 0,t}};function aC(){return{id:``,role:``,content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[]}}var oC={encode(e,t=new gS){e.id!==``&&t.uint32(10).string(e.id),e.role!==``&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let n of e.toolCalls)RS.encode(n,t.uint32(42).fork()).join();e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error);for(let n of e.contentParts)iC.encode(n,t.uint32(66).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=aC();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.role=n.string();continue;case 3:if(e!==26)break;i.content=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.toolCalls.push(RS.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.toolCallId=n.string();continue;case 7:if(e!==58)break;i.error=n.string();continue;case 8:if(e!==66)break;i.contentParts.push(iC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return oC.fromPartial(e??{})},fromPartial(e){let t=aC();return t.id=e.id??``,t.role=e.role??``,t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>RS.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>iC.fromPartial(e))||[],t}};function sC(){return{id:``,reason:``,message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0}}var cC={encode(e,t=new gS){return e.id!==``&&t.uint32(10).string(e.id),e.reason!==``&&t.uint32(18).string(e.reason),e.message!==void 0&&t.uint32(26).string(e.message),e.toolCallId!==void 0&&t.uint32(34).string(e.toolCallId),e.responseSchema!==void 0&&W.encode(W.wrap(e.responseSchema),t.uint32(42).fork()).join(),e.expiresAt!==void 0&&t.uint32(50).string(e.expiresAt),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(58).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=sC();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.reason=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.responseSchema=W.unwrap(W.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.expiresAt=n.string();continue;case 7:if(e!==58)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cC.fromPartial(e??{})},fromPartial(e){let t=sC();return t.id=e.id??``,t.reason=e.reason??``,t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t}},lC=function(e){return e[e.TEXT_MESSAGE_START=0]=`TEXT_MESSAGE_START`,e[e.TEXT_MESSAGE_CONTENT=1]=`TEXT_MESSAGE_CONTENT`,e[e.TEXT_MESSAGE_END=2]=`TEXT_MESSAGE_END`,e[e.TOOL_CALL_START=3]=`TOOL_CALL_START`,e[e.TOOL_CALL_ARGS=4]=`TOOL_CALL_ARGS`,e[e.TOOL_CALL_END=5]=`TOOL_CALL_END`,e[e.STATE_SNAPSHOT=6]=`STATE_SNAPSHOT`,e[e.STATE_DELTA=7]=`STATE_DELTA`,e[e.MESSAGES_SNAPSHOT=8]=`MESSAGES_SNAPSHOT`,e[e.RAW=9]=`RAW`,e[e.CUSTOM=10]=`CUSTOM`,e[e.RUN_STARTED=11]=`RUN_STARTED`,e[e.RUN_FINISHED=12]=`RUN_FINISHED`,e[e.RUN_ERROR=13]=`RUN_ERROR`,e[e.STEP_STARTED=14]=`STEP_STARTED`,e[e.STEP_FINISHED=15]=`STEP_FINISHED`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function uC(){return{type:0,timestamp:void 0,rawEvent:void 0}}var G={encode(e,t=new gS){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&W.encode(W.wrap(e.rawEvent),t.uint32(26).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=uC();for(;n.pos>>3){case 1:if(e!==8)break;i.type=n.int32();continue;case 2:if(e!==16)break;i.timestamp=ZC(n.int64());continue;case 3:if(e!==26)break;i.rawEvent=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=uC();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t}};function dC(){return{baseEvent:void 0,messageId:``,role:void 0,name:void 0}}var fC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.name!==void 0&&t.uint32(34).string(e.name),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=dC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return fC.fromPartial(e??{})},fromPartial(e){let t=dC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.role=e.role??void 0,t.name=e.name??void 0,t}};function pC(){return{baseEvent:void 0,messageId:``,delta:``}}var mC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.delta!==``&&t.uint32(26).string(e.delta),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=pC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mC.fromPartial(e??{})},fromPartial(e){let t=pC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t}};function hC(){return{baseEvent:void 0,messageId:``}}var gC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=hC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gC.fromPartial(e??{})},fromPartial(e){let t=hC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t}};function _C(){return{baseEvent:void 0,toolCallId:``,toolCallName:``,parentMessageId:void 0}}var vC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.toolCallName!==``&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=_C();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vC.fromPartial(e??{})},fromPartial(e){let t=_C();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.toolCallName=e.toolCallName??``,t.parentMessageId=e.parentMessageId??void 0,t}};function yC(){return{baseEvent:void 0,toolCallId:``,delta:``}}var bC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.delta!==``&&t.uint32(26).string(e.delta),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=yC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return bC.fromPartial(e??{})},fromPartial(e){let t=yC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.delta=e.delta??``,t}};function xC(){return{baseEvent:void 0,toolCallId:``}}var SC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=xC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return SC.fromPartial(e??{})},fromPartial(e){let t=xC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t}};function CC(){return{baseEvent:void 0,snapshot:void 0}}var wC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&W.encode(W.wrap(e.snapshot),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=CC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.snapshot=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wC.fromPartial(e??{})},fromPartial(e){let t=CC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t}};function TC(){return{baseEvent:void 0,delta:[]}}var EC={encode(e,t=new gS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.delta)IS.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=TC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.delta.push(IS.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return EC.fromPartial(e??{})},fromPartial(e){let t=TC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>IS.fromPartial(e))||[],t}};function DC(){return{baseEvent:void 0,messages:[]}}var OC={encode(e,t=new gS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.messages)oC.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=DC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messages.push(oC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return OC.fromPartial(e??{})},fromPartial(e){let t=DC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>oC.fromPartial(e))||[],t}};function kC(){return{baseEvent:void 0,event:void 0,source:void 0}}var AC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&W.encode(W.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=kC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.event=W.unwrap(W.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.source=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return AC.fromPartial(e??{})},fromPartial(e){let t=kC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t}};function jC(){return{baseEvent:void 0,name:``,value:void 0}}var MC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==``&&t.uint32(18).string(e.name),e.value!==void 0&&W.encode(W.wrap(e.value),t.uint32(26).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=jC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.name=n.string();continue;case 3:if(e!==26)break;i.value=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return MC.fromPartial(e??{})},fromPartial(e){let t=jC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.name=e.name??``,t.value=e.value??void 0,t}};function NC(){return{baseEvent:void 0,threadId:``,runId:``}}var PC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=NC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return PC.fromPartial(e??{})},fromPartial(e){let t=NC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t}};function FC(){return{provider:void 0,model:void 0,inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0}}var IC={encode(e,t=new gS){return e.provider!==void 0&&t.uint32(10).string(e.provider),e.model!==void 0&&t.uint32(18).string(e.model),e.inputTokens!==void 0&&t.uint32(24).int64(e.inputTokens),e.outputTokens!==void 0&&t.uint32(32).int64(e.outputTokens),e.totalTokens!==void 0&&t.uint32(40).int64(e.totalTokens),e.reasoningTokens!==void 0&&t.uint32(48).int64(e.reasoningTokens),e.cachedInputTokens!==void 0&&t.uint32(56).int64(e.cachedInputTokens),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=FC();for(;n.pos>>3){case 1:if(e!==10)break;i.provider=n.string();continue;case 2:if(e!==18)break;i.model=n.string();continue;case 3:if(e!==24)break;i.inputTokens=ZC(n.int64());continue;case 4:if(e!==32)break;i.outputTokens=ZC(n.int64());continue;case 5:if(e!==40)break;i.totalTokens=ZC(n.int64());continue;case 6:if(e!==48)break;i.reasoningTokens=ZC(n.int64());continue;case 7:if(e!==56)break;i.cachedInputTokens=ZC(n.int64());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return IC.fromPartial(e??{})},fromPartial(e){let t=FC();return t.provider=e.provider??void 0,t.model=e.model??void 0,t.inputTokens=e.inputTokens??void 0,t.outputTokens=e.outputTokens??void 0,t.totalTokens=e.totalTokens??void 0,t.reasoningTokens=e.reasoningTokens??void 0,t.cachedInputTokens=e.cachedInputTokens??void 0,t}};function LC(){return{baseEvent:void 0,threadId:``,runId:``,result:void 0,outcome:``,interrupts:[],usage:[]}}var RC={encode(e,t=new gS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.result!==void 0&&W.encode(W.wrap(e.result),t.uint32(34).fork()).join(),e.outcome!==``&&t.uint32(42).string(e.outcome);for(let n of e.interrupts)cC.encode(n,t.uint32(50).fork()).join();for(let n of e.usage)IC.encode(n,t.uint32(58).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=LC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.result=W.unwrap(W.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.outcome=n.string();continue;case 6:if(e!==50)break;i.interrupts.push(cC.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.usage.push(IC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return RC.fromPartial(e??{})},fromPartial(e){let t=LC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interrupts=e.interrupts?.map(e=>cC.fromPartial(e))||[],t.usage=e.usage?.map(e=>IC.fromPartial(e))||[],t}};function zC(){return{baseEvent:void 0,code:void 0,message:``,usage:[]}}var BC={encode(e,t=new gS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==``&&t.uint32(26).string(e.message);for(let n of e.usage)IC.encode(n,t.uint32(34).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=zC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.code=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.usage.push(IC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return BC.fromPartial(e??{})},fromPartial(e){let t=zC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??``,t.usage=e.usage?.map(e=>IC.fromPartial(e))||[],t}};function VC(){return{baseEvent:void 0,stepName:``}}var HC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=VC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return HC.fromPartial(e??{})},fromPartial(e){let t=VC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t}};function UC(){return{baseEvent:void 0,stepName:``}}var WC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=UC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return WC.fromPartial(e??{})},fromPartial(e){let t=UC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t}};function GC(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0}}var KC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),e.name!==void 0&&t.uint32(42).string(e.name),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=GC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue;case 5:if(e!==42)break;i.name=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return KC.fromPartial(e??{})},fromPartial(e){let t=GC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t}};function qC(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}var JC={encode(e,t=new gS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=qC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.delta=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return JC.fromPartial(e??{})},fromPartial(e){let t=qC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t}};function YC(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}var XC={encode(e,t=new gS){return e.textMessageStart!==void 0&&fC.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&mC.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&gC.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&vC.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&bC.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&SC.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&wC.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&EC.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&OC.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&AC.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&MC.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&PC.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&RC.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&BC.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&HC.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&WC.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&KC.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&JC.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=YC();for(;n.pos>>3){case 1:if(e!==10)break;i.textMessageStart=fC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.textMessageContent=mC.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.textMessageEnd=gC.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.toolCallStart=vC.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.toolCallArgs=bC.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.toolCallEnd=SC.decode(n,n.uint32());continue;case 7:if(e!==58)break;i.stateSnapshot=wC.decode(n,n.uint32());continue;case 8:if(e!==66)break;i.stateDelta=EC.decode(n,n.uint32());continue;case 9:if(e!==74)break;i.messagesSnapshot=OC.decode(n,n.uint32());continue;case 10:if(e!==82)break;i.raw=AC.decode(n,n.uint32());continue;case 11:if(e!==90)break;i.custom=MC.decode(n,n.uint32());continue;case 12:if(e!==98)break;i.runStarted=PC.decode(n,n.uint32());continue;case 13:if(e!==106)break;i.runFinished=RC.decode(n,n.uint32());continue;case 14:if(e!==114)break;i.runError=BC.decode(n,n.uint32());continue;case 15:if(e!==122)break;i.stepStarted=HC.decode(n,n.uint32());continue;case 16:if(e!==130)break;i.stepFinished=WC.decode(n,n.uint32());continue;case 17:if(e!==138)break;i.textMessageChunk=KC.decode(n,n.uint32());continue;case 18:if(e!==146)break;i.toolCallChunk=JC.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return XC.fromPartial(e??{})},fromPartial(e){let t=YC();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?fC.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?mC.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?gC.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?vC.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?bC.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?SC.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?wC.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?EC.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?OC.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?AC.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?MC.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?PC.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?RC.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?BC.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?HC.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?WC.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?KC.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?JC.fromPartial(e.toolCallChunk):void 0,t}};function ZC(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error(`Value is larger than Number.MAX_SAFE_INTEGER`);if(te&&typeof e==`object`?e:void 0,$C=e=>{let t=QC(e);if(t){if(t.data){let e=t.data;return{type:`data`,value:e.value,mimeType:e.mimeType}}if(t.url){let e=t.url;return{type:`url`,value:e.value,mimeType:e.mimeType}}}},ew=e=>{let t=QC(e);if(t){if(t.text)return{type:`text`,text:t.text.text};if(t.image){let e=t.image;return{type:`image`,source:$C(e.source),metadata:e.metadata}}if(t.audio){let e=t.audio;return{type:`audio`,source:$C(e.source),metadata:e.metadata}}if(t.video){let e=t.video;return{type:`video`,source:$C(e.source),metadata:e.metadata}}if(t.document){let e=t.document;return{type:`document`,source:$C(e.source),metadata:e.metadata}}}};function tw(e){let t=XC.decode(e),n=Object.values(t).find(e=>e!==void 0);if(!n)throw Error(`Invalid event`);if(n.type=lC[n.baseEvent.type],n.timestamp=n.baseEvent.timestamp,n.rawEvent=n.baseEvent.rawEvent,delete n.baseEvent,n.type===H.MESSAGES_SNAPSHOT)for(let e of n.messages){let t=e;if(t.role===`user`&&Array.isArray(t.contentParts)){let e=t.contentParts.map(e=>ew(e)).filter(e=>e!==void 0);e.length>0&&(t.content=e)}Array.isArray(t.contentParts)&&t.contentParts.length===0&&(t.contentParts=void 0),t.toolCalls?.length===0&&(t.toolCalls=void 0)}if(n.type===H.RUN_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interrupts)?e.interrupts:[];delete e.interrupts,t===`interrupt`?e.outcome={type:`interrupt`,interrupts:r}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if((n.type===H.RUN_FINISHED||n.type===H.RUN_ERROR)&&Array.isArray(n.usage)&&n.usage.length===0&&delete n.usage,n.type===H.STATE_DELTA)for(let e of n.delta)e.op=PS[e.op].toLowerCase(),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]});return Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),Ey.parse(n)}var nw;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(nw||={});var rw;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(rw||={});var K=nw.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),iw=e=>{switch(typeof e){case`undefined`:return K.undefined;case`string`:return K.string;case`number`:return Number.isNaN(e)?K.nan:K.number;case`boolean`:return K.boolean;case`function`:return K.function;case`bigint`:return K.bigint;case`symbol`:return K.symbol;case`object`:return Array.isArray(e)?K.array:e===null?K.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?K.promise:typeof Map<`u`&&e instanceof Map?K.map:typeof Set<`u`&&e instanceof Set?K.set:typeof Date<`u`&&e instanceof Date?K.date:K.object;default:return K.unknown}},q=nw.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),aw=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};aw.create=e=>new aw(e);var ow=(e,t)=>{let n;switch(e.code){case q.invalid_type:n=e.received===K.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,nw.jsonStringifyReplacer)}`;break;case q.unrecognized_keys:n=`Unrecognized key(s) in object: ${nw.joinValues(e.keys,`, `)}`;break;case q.invalid_union:n=`Invalid input`;break;case q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${nw.joinValues(e.options)}`;break;case q.invalid_enum_value:n=`Invalid enum value. Expected ${nw.joinValues(e.options)}, received '${e.received}'`;break;case q.invalid_arguments:n=`Invalid function arguments`;break;case q.invalid_return_type:n=`Invalid function return type`;break;case q.invalid_date:n=`Invalid date`;break;case q.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:nw.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case q.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case q.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case q.custom:n=`Invalid input`;break;case q.invalid_intersection_types:n=`Intersection results could not be merged`;break;case q.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case q.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,nw.assertNever(e)}return{message:n}},sw=ow;function cw(){return sw}var lw=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function J(e,t){let n=cw(),r=lw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ow?void 0:ow].filter(e=>!!e)});e.common.issues.push(r)}var uw=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return Y;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return Y;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},Y=Object.freeze({status:`aborted`}),dw=e=>({status:`dirty`,value:e}),fw=e=>({status:`valid`,value:e}),pw=e=>e.status===`aborted`,mw=e=>e.status===`dirty`,hw=e=>e.status===`valid`,gw=e=>typeof Promise<`u`&&e instanceof Promise,X;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(X||={});var _w=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},vw=(e,t)=>{if(hw(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new aw(e.common.issues);return this._error=t,this._error}}};function yw(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var bw=class{get description(){return this._def.description}_getType(e){return iw(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:iw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new uw,ctx:{common:e.parent.common,data:e.data,parsedType:iw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(gw(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:iw(e)};return vw(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:iw(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return hw(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>hw(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:iw(e)},r=this._parse({data:e,path:n.path,parent:n});return vw(n,await(gw(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:q.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new CT({schema:this,typeName:Z.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return wT.create(this,this._def)}nullable(){return TT.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return iT.create(this)}promise(){return ST.create(this,this._def)}or(e){return sT.create([this,e],this._def)}and(e){return dT.create(this,e,this._def)}transform(e){return new CT({...yw(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new ET({...yw(this._def),innerType:this,defaultValue:t,typeName:Z.ZodDefault})}brand(){return new kT({typeName:Z.ZodBranded,type:this,...yw(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new DT({...yw(this._def),innerType:this,catchValue:t,typeName:Z.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return AT.create(this,e)}readonly(){return jT.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},xw=/^c[^\s-]{8,}$/i,Sw=/^[0-9a-z]+$/,Cw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ww=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Tw=/^[a-z0-9_-]{21}$/i,Ew=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Dw=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ow=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kw=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Aw,jw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Nw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Pw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Fw=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Iw=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Lw=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Rw=RegExp(`^${Lw}$`);function zw(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Bw(e){return RegExp(`^${zw(e)}$`)}function Vw(e){let t=`${Lw}T${zw(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Hw(e,t){return!((t!==`v4`&&t||!jw.test(e))&&(t!==`v6`&&t||!Nw.test(e)))}function Uw(e,t){if(!Ew.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ww(e,t){return!((t!==`v4`&&t||!Mw.test(e))&&(t!==`v6`&&t||!Pw.test(e)))}var Gw=class e extends bw{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.string,received:t.parsedType}),Y}let t=new uw,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),J(n,{code:q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:q.invalid_string,...X.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...X.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...X.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...X.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...X.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...X.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...X.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...X.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...X.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...X.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...X.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...X.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...X.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...X.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...X.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...X.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...X.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...X.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...X.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...X.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...X.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...X.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...X.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...X.errToObj(t)})}nonempty(e){return this.min(1,X.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Gw({checks:[],typeName:Z.ZodString,coerce:e?.coerce??!1,...yw(e)});function Kw(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var qw=class e extends bw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.number,received:t.parsedType}),Y}let t,n=new uw;for(let r of this._def.checks)r.kind===`int`?nw.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),J(t,{code:q.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Kw(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),J(t,{code:q.not_finite,message:r.message}),n.dirty()):nw.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,X.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,X.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,X.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,X.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:X.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:X.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:X.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:X.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:X.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:X.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:X.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:X.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:X.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:X.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&nw.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew qw({checks:[],typeName:Z.ZodNumber,coerce:e?.coerce||!1,...yw(e)});var Jw=class e extends bw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let t,n=new uw;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):nw.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.bigint,received:t.parsedType}),Y}gte(e,t){return this.setLimit(`min`,e,!0,X.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,X.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,X.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,X.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:X.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:X.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:X.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:X.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:X.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:X.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Jw({checks:[],typeName:Z.ZodBigInt,coerce:e?.coerce??!1,...yw(e)});var Yw=class extends bw{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.boolean,received:t.parsedType}),Y}return fw(e.data)}};Yw.create=e=>new Yw({typeName:Z.ZodBoolean,coerce:e?.coerce||!1,...yw(e)});var Xw=class e extends bw{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.date,received:t.parsedType}),Y}if(Number.isNaN(e.data.getTime()))return J(this._getOrReturnCtx(e),{code:q.invalid_date}),Y;let t=new uw,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),J(n,{code:q.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):nw.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:X.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:X.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Xw({checks:[],coerce:e?.coerce||!1,typeName:Z.ZodDate,...yw(e)});var Zw=class extends bw{_parse(e){if(this._getType(e)!==K.symbol){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.symbol,received:t.parsedType}),Y}return fw(e.data)}};Zw.create=e=>new Zw({typeName:Z.ZodSymbol,...yw(e)});var Qw=class extends bw{_parse(e){if(this._getType(e)!==K.undefined){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.undefined,received:t.parsedType}),Y}return fw(e.data)}};Qw.create=e=>new Qw({typeName:Z.ZodUndefined,...yw(e)});var $w=class extends bw{_parse(e){if(this._getType(e)!==K.null){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.null,received:t.parsedType}),Y}return fw(e.data)}};$w.create=e=>new $w({typeName:Z.ZodNull,...yw(e)});var eT=class extends bw{constructor(){super(...arguments),this._any=!0}_parse(e){return fw(e.data)}};eT.create=e=>new eT({typeName:Z.ZodAny,...yw(e)});var tT=class extends bw{constructor(){super(...arguments),this._unknown=!0}_parse(e){return fw(e.data)}};tT.create=e=>new tT({typeName:Z.ZodUnknown,...yw(e)});var nT=class extends bw{_parse(e){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.never,received:t.parsedType}),Y}};nT.create=e=>new nT({typeName:Z.ZodNever,...yw(e)});var rT=class extends bw{_parse(e){if(this._getType(e)!==K.undefined){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.void,received:t.parsedType}),Y}return fw(e.data)}};rT.create=e=>new rT({typeName:Z.ZodVoid,...yw(e)});var iT=class e extends bw{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==K.array)return J(t,{code:q.invalid_type,expected:K.array,received:t.parsedType}),Y;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(J(t,{code:q.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new _w(t,e,t.path,n)))).then(e=>uw.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new _w(t,e,t.path,n)));return uw.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:X.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:X.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:X.toString(n)}})}nonempty(e){return this.min(1,e)}};iT.create=(e,t)=>new iT({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...yw(t)});function aT(e){if(e instanceof oT){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=wT.create(aT(r))}return new oT({...e._def,shape:()=>t})}return e instanceof iT?new iT({...e._def,type:aT(e.element)}):e instanceof wT?wT.create(aT(e.unwrap())):e instanceof TT?TT.create(aT(e.unwrap())):e instanceof fT?fT.create(e.items.map(e=>aT(e))):e}var oT=class e extends bw{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=nw.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==K.object){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.object,received:t.parsedType}),Y}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof nT&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new _w(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof nT){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(J(n,{code:q.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new _w(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>uw.mergeObjectSync(t,e)):uw.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return X.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:X.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Z.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of nw.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of nw.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return aT(this)}partial(t){let n={};for(let e of nw.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of nw.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof wT;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return yT(nw.objectKeys(this.shape))}};oT.create=(e,t)=>new oT({shape:()=>e,unknownKeys:`strip`,catchall:nT.create(),typeName:Z.ZodObject,...yw(t)}),oT.strictCreate=(e,t)=>new oT({shape:()=>e,unknownKeys:`strict`,catchall:nT.create(),typeName:Z.ZodObject,...yw(t)}),oT.lazycreate=(e,t)=>new oT({shape:e,unknownKeys:`strip`,catchall:nT.create(),typeName:Z.ZodObject,...yw(t)});var sT=class extends bw{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new aw(e.ctx.common.issues));return J(t,{code:q.invalid_union,unionErrors:n}),Y}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new aw(e));return J(t,{code:q.invalid_union,unionErrors:i}),Y}}get options(){return this._def.options}};sT.create=(e,t)=>new sT({options:e,typeName:Z.ZodUnion,...yw(t)});var cT=e=>e instanceof _T?cT(e.schema):e instanceof CT?cT(e.innerType()):e instanceof vT?[e.value]:e instanceof bT?e.options:e instanceof xT?nw.objectValues(e.enum):e instanceof ET?cT(e._def.innerType):e instanceof Qw?[void 0]:e instanceof $w?[null]:e instanceof wT?[void 0,...cT(e.unwrap())]:e instanceof TT?[null,...cT(e.unwrap())]:e instanceof kT||e instanceof jT?cT(e.unwrap()):e instanceof DT?cT(e._def.innerType):[],lT=class e extends bw{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==K.object)return J(t,{code:q.invalid_type,expected:K.object,received:t.parsedType}),Y;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(J(t,{code:q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=cT(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:Z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...yw(r)})}};function uT(e,t){let n=iw(e),r=iw(t);if(e===t)return{valid:!0,data:e};if(n===K.object&&r===K.object){let n=nw.objectKeys(t),r=nw.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=uT(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===K.array&&r===K.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(pw(e)||pw(r))return Y;let i=uT(e.value,r.value);return i.valid?((mw(e)||mw(r))&&t.dirty(),{status:t.value,value:i.data}):(J(n,{code:q.invalid_intersection_types}),Y)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};dT.create=(e,t,n)=>new dT({left:e,right:t,typeName:Z.ZodIntersection,...yw(n)});var fT=class e extends bw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.array)return J(n,{code:q.invalid_type,expected:K.array,received:n.parsedType}),Y;if(n.data.lengththis._def.items.length&&(J(n,{code:q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new _w(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>uw.mergeArray(t,e)):uw.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};fT.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new fT({items:e,typeName:Z.ZodTuple,rest:null,...yw(t)})};var pT=class e extends bw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.object)return J(n,{code:q.invalid_type,expected:K.object,received:n.parsedType}),Y;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new _w(n,e,n.path,e)),value:a._parse(new _w(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?uw.mergeObjectAsync(t,r):uw.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof bw?new e({keyType:t,valueType:n,typeName:Z.ZodRecord,...yw(r)}):new e({keyType:Gw.create(),valueType:t,typeName:Z.ZodRecord,...yw(n)})}},mT=class extends bw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.map)return J(n,{code:q.invalid_type,expected:K.map,received:n.parsedType}),Y;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new _w(n,e,n.path,[a,`key`])),value:i._parse(new _w(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return Y;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return Y;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};mT.create=(e,t,n)=>new mT({valueType:t,keyType:e,typeName:Z.ZodMap,...yw(n)});var hT=class e extends bw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.set)return J(n,{code:q.invalid_type,expected:K.set,received:n.parsedType}),Y;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(J(n,{code:q.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return Y;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new _w(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:X.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:X.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};hT.create=(e,t)=>new hT({valueType:e,minSize:null,maxSize:null,typeName:Z.ZodSet,...yw(t)});var gT=class e extends bw{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==K.function)return J(t,{code:q.invalid_type,expected:K.function,received:t.parsedType}),Y;function n(e,n){return lw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,cw(),ow].filter(e=>!!e),issueData:{code:q.invalid_arguments,argumentsError:n}})}function r(e,n){return lw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,cw(),ow].filter(e=>!!e),issueData:{code:q.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ST){let e=this;return fw(async function(...t){let o=new aw([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return fw(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new aw([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new aw([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:fT.create(t).rest(tT.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||fT.create([]).rest(tT.create()),returns:n||tT.create(),typeName:Z.ZodFunction,...yw(r)})}},_T=class extends bw{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};_T.create=(e,t)=>new _T({getter:e,typeName:Z.ZodLazy,...yw(t)});var vT=class extends bw{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return J(t,{received:t.data,code:q.invalid_literal,expected:this._def.value}),Y}return{status:`valid`,value:e.data}}get value(){return this._def.value}};vT.create=(e,t)=>new vT({value:e,typeName:Z.ZodLiteral,...yw(t)});function yT(e,t){return new bT({values:e,typeName:Z.ZodEnum,...yw(t)})}var bT=class e extends bw{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return J(t,{expected:nw.joinValues(n),received:t.parsedType,code:q.invalid_type}),Y}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return J(t,{received:t.data,code:q.invalid_enum_value,options:n}),Y}return fw(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};bT.create=yT;var xT=class extends bw{_parse(e){let t=nw.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==K.string&&n.parsedType!==K.number){let e=nw.objectValues(t);return J(n,{expected:nw.joinValues(e),received:n.parsedType,code:q.invalid_type}),Y}if(this._cache||=new Set(nw.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=nw.objectValues(t);return J(n,{received:n.data,code:q.invalid_enum_value,options:e}),Y}return fw(e.data)}get enum(){return this._def.values}};xT.create=(e,t)=>new xT({values:e,typeName:Z.ZodNativeEnum,...yw(t)});var ST=class extends bw{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==K.promise&&t.common.async===!1?(J(t,{code:q.invalid_type,expected:K.promise,received:t.parsedType}),Y):fw((t.parsedType===K.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};ST.create=(e,t)=>new ST({type:e,typeName:Z.ZodPromise,...yw(t)});var CT=class extends bw{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{J(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return Y;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?Y:r.status===`dirty`||t.value===`dirty`?dw(r.value):r});{if(t.value===`aborted`)return Y;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?Y:r.status===`dirty`||t.value===`dirty`?dw(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?Y:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?Y:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!hw(e))return Y;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>hw(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):Y)}nw.assertNever(r)}};CT.create=(e,t,n)=>new CT({schema:e,typeName:Z.ZodEffects,effect:t,...yw(n)}),CT.createWithPreprocess=(e,t,n)=>new CT({schema:t,effect:{type:`preprocess`,transform:e},typeName:Z.ZodEffects,...yw(n)});var wT=class extends bw{_parse(e){return this._getType(e)===K.undefined?fw(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};wT.create=(e,t)=>new wT({innerType:e,typeName:Z.ZodOptional,...yw(t)});var TT=class extends bw{_parse(e){return this._getType(e)===K.null?fw(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};TT.create=(e,t)=>new TT({innerType:e,typeName:Z.ZodNullable,...yw(t)});var ET=class extends bw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===K.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};ET.create=(e,t)=>new ET({innerType:e,typeName:Z.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...yw(t)});var DT=class extends bw{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return gw(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new aw(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new aw(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};DT.create=(e,t)=>new DT({innerType:e,typeName:Z.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...yw(t)});var OT=class extends bw{_parse(e){if(this._getType(e)!==K.nan){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.nan,received:t.parsedType}),Y}return{status:`valid`,value:e.data}}};OT.create=e=>new OT({typeName:Z.ZodNaN,...yw(e)});var kT=class extends bw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},AT=class e extends bw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Y:e.status===`dirty`?(t.dirty(),dw(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Y:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:Z.ZodPipeline})}},jT=class extends bw{_parse(e){let t=this._def.innerType._parse(e),n=e=>(hw(e)&&(e.value=Object.freeze(e.value)),e);return gw(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};jT.create=(e,t)=>new jT({innerType:e,typeName:Z.ZodReadonly,...yw(t)}),oT.lazycreate;var Z;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(Z||={});var MT=Gw.create;qw.create,OT.create,Jw.create;var NT=Yw.create;Xw.create,Zw.create,Qw.create,$w.create;var PT=eT.create;tT.create,nT.create,rT.create,iT.create;var FT=oT.create;oT.strictCreate,sT.create;var IT=lT.create;dT.create,fT.create,pT.create,mT.create,hT.create,gT.create,_T.create;var LT=vT.create,RT=bT.create;xT.create,ST.create,CT.create,wT.create,TT.create,CT.createWithPreprocess,AT.create;var zT=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,BT=e=>{if(typeof e!=`string`)throw TypeError(`Invalid argument expected string`);let t=e.match(zT);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},VT=e=>e===`*`||e===`x`||e===`X`,HT=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},UT=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],WT=(e,t)=>{if(VT(e)||VT(t))return 0;let[n,r]=UT(HT(e),HT(t));return n>r?1:n{for(let n=0;n{let n=BT(e),r=BT(t),i=n.pop(),a=r.pop(),o=GT(n,r);return o===0?i&&a?GT(i.split(`.`),a.split(`.`)):i||a?i?-1:1:0:o},qT=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function JT(){return Eg()}function YT(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&YT(t);return e}var XT=524288;function ZT(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 QT(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!ZT(t,n,XT),c=s?qT(t):t,l=s?qT(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(YT(c),YT(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=qT(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=qT(e.state),d=!0,n=!0),s&&n&&ZT(c,l,XT)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(o&&e instanceof TypeError){if(a)throw e;console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e)}else a||console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?qT(c):c}:{},...d?{state:Object.isFrozen(l)?qT(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function $T(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 eE(e){if(e instanceof tE)return e;if(e===!0)return new tE($T(!0))}var tE=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 nE(e){return e.enabled?new tE(e):void 0}function rE(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}var iE=(e,t,n,r,i)=>{let a=eE(i),o=qT(n.messages),s=qT(e.state),c={},l=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},u=()=>{let e=qT(c);return c={},e.messages!==void 0||e.state!==void 0?Nx(e):ex};return t.pipe(Ux(async t=>{let i=await QT(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(l(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 u();switch(t.type){case H.TEXT_MESSAGE_START:{let i=await QT(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,role:n=`assistant`,name:r}=t;if(!o.find(t=>t.id===e)){let t={id:e,role:n,content:``,...r!==void 0&&{name:r}};o.push(t),l({messages:o})}}return u()}case H.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}'`),u();let d=await QT(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 l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,l({messages:o})),u()}case H.TEXT_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);return a?(l(await QT(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:``}))),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()):(console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),u())}case H.TOOL_CALL_START:{let i=await QT(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r}=t,i=o.find(t=>t.toolCalls?.some(t=>t.id===e))?.toolCalls?.find(t=>t.id===e);if(i)return i.function.name!==n&&(console.warn(`TOOL_CALL_START: tool call '${e}' already exists with name '${i.function.name}' — updating it to '${n}'`),i.function.name=n,l({messages:o})),u();let a=rE(o,r,e);a.toolCalls??=[],a.toolCalls.push({id:e,type:`function`,function:{name:n,arguments:``}}),l({messages:o})}return u()}case H.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}'`),u();let d=c.toolCalls?.find(e=>e.id===i);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),u();let f=await QT(r,o,s,(r,i,a)=>{let o=d.function.arguments,s=d.function.name,c={};try{c=Xx(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return l(f),f.stopPropagation!==!0&&(d.function.arguments+=a,l({messages:o})),u()}case H.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}'`),u();let c=a.toolCalls?.find(e=>e.id===i);return c?(l(await QT(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})})),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),u()):(console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),u())}case H.TOOL_CALL_RESULT:{let i=await QT(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:u}=t,d={id:i,toolCallId:a,role:u||`tool`,content:c},f=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(f===-1)o.push(d);else{let e=f+1;for(;e{t.onNewMessage?.({message:d,messages:o,state:s,agent:n,input:e})})),l({messages:o})}return u()}case H.STATE_SNAPSHOT:{let i=await QT(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,l({state:s})}return u()}case H.STATE_DELTA:{let i=await QT(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=cb.applyPatch(s,e,!0,!1).newDocument,l({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 u()}case H.MESSAGES_SNAPSHOT:{let i=await QT(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messages:e}=t,n=new Map(e.map(e=>[e.id,e])),r=e.some(e=>e.role===`activity`),i=e.some(e=>e.role===`reasoning`),a=e=>e.role===`activity`&&!r||e.role===`reasoning`&&!i;o=o.filter(e=>a(e)||n.has(e.id)).map(e=>a(e)?e:n.get(e.id));let s=new Set(o.map(e=>e.id));for(let t of e)s.has(t.id)||o.push(t);l({messages:o})}return u()}case H.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,d=c?.role===`activity`?c:void 0,f=i.replace??!0,p=await QT(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d,existingMessage:c}));if(l(p),p.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:qT(i.content)},c;a===-1?(o.push(t),c=t):d?f&&(o[a]={...d,activityType:i.activityType,content:qT(i.content)}):f&&(o[a]=t,c=t),l({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return u()}case H.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return u();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),u();let d=c,f=await QT(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d}));if(l(f),f.stopPropagation!==!0)try{let e=qT(d.content??{}),t=cb.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...d,content:qT(t),activityType:i.activityType},l({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 u()}case H.RAW:return l(await QT(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case H.CUSTOM:return l(await QT(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case H.RUN_STARTED:{let i=await QT(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let e=t;if(e.input?.messages){for(let t of e.input.messages)o.find(e=>e.id===t.id)||o.push(t);l({messages:o})}}return u()}case H.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:{event:i,outcome:`success`,result:i.result},c=await QT(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return l(c),c.stopPropagation!==!0&&(n.pendingInterrupts=a.outcome===`interrupt`?[...a.interrupts]:[]),u()}case H.RUN_ERROR:return l(await QT(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case H.STEP_STARTED:return l(await QT(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case H.STEP_FINISHED:return l(await QT(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case H.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be tranformed before being applied`);case H.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be tranformed before being applied`);case H.THINKING_START:return u();case H.THINKING_END:return u();case H.THINKING_TEXT_MESSAGE_START:return u();case H.THINKING_TEXT_MESSAGE_CONTENT:return u();case H.THINKING_TEXT_MESSAGE_END:return u();case H.REASONING_START:return l(await QT(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case H.REASONING_MESSAGE_START:{let i=await QT(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e}=t;if(!o.find(t=>t.id===e)){let t={id:e,role:`reasoning`,content:``};o.push(t),l({messages:o})}}return u()}case H.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}'`),u();let d=await QT(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 l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,l({messages:o})),u()}case H.REASONING_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);return a?(l(await QT(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:``}))),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()):(console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),u())}case H.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case H.REASONING_END:return l(await QT(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case H.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:d}=t,f=await QT(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(f),f.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=d,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=d,e=!0)}e&&(c.messages=o)}return u()}}return t.type,u()}),Bx(),r.length>0?Wx({}):e=>e)},aE=e=>t=>{let n=eE(e),r=new Map,i=new Map,a=!1,o=!1,s=!1,c=new Map,l=!1,u=!1,d=!1,f=()=>{r.clear(),i.clear(),c.clear(),l=!1,u=!1,a=!1,o=!1,d=!0};return t.pipe(zx(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),o)return Px(()=>new Pv(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(a&&t!==H.RUN_ERROR&&t!==H.RUN_STARTED)return Px(()=>new Pv(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!s){if(s=!0,t!==H.RUN_STARTED&&t!==H.RUN_ERROR)return Px(()=>new Pv(`First event must be 'RUN_STARTED'`))}else if(t===H.RUN_STARTED){if(d&&!a)return Px(()=>new Pv(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));a&&f()}switch(t){case H.TEXT_MESSAGE_START:{let t=e.messageId;return r.has(t)?Px(()=>new Pv(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${t}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`)):(r.set(t,!0),Nx(e))}case H.TEXT_MESSAGE_CONTENT:{let t=e.messageId;return r.has(t)?Nx(e):Px(()=>new Pv(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${t}'. Start a text message with 'TEXT_MESSAGE_START' first.`))}case H.TEXT_MESSAGE_END:{let t=e.messageId;return r.has(t)?(r.delete(t),Nx(e)):Px(()=>new Pv(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${t}'. A 'TEXT_MESSAGE_START' event must be sent first.`))}case H.TOOL_CALL_START:{let t=e.toolCallId;return i.has(t)?Px(()=>new Pv(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${t}' is already in progress. Complete it with 'TOOL_CALL_END' first.`)):(i.set(t,!0),Nx(e))}case H.TOOL_CALL_ARGS:{let t=e.toolCallId;return i.has(t)?Nx(e):Px(()=>new Pv(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${t}'. Start a tool call with 'TOOL_CALL_START' first.`))}case H.TOOL_CALL_END:{let t=e.toolCallId;return i.has(t)?(i.delete(t),Nx(e)):Px(()=>new Pv(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${t}'. A 'TOOL_CALL_START' event must be sent first.`))}case H.STEP_STARTED:{let t=e.stepName;return c.has(t)?Px(()=>new Pv(`Step "${t}" is already active for 'STEP_STARTED'`)):(c.set(t,!0),Nx(e))}case H.STEP_FINISHED:{let t=e.stepName;return c.has(t)?(c.delete(t),Nx(e)):Px(()=>new Pv(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}case H.RUN_STARTED:return d=!0,Nx(e);case H.RUN_FINISHED:if(c.size>0){let e=Array.from(c.keys()).join(`, `);return Px(()=>new Pv(`Cannot send 'RUN_FINISHED' while steps are still active: ${e}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return Px(()=>new Pv(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return Px(()=>new Pv(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}return a=!0,Nx(e);case H.RUN_ERROR:return o=!0,Nx(e);case H.CUSTOM:return Nx(e);case H.THINKING_TEXT_MESSAGE_START:return l?u?Px(()=>new Pv(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.`)):(u=!0,Nx(e)):Px(()=>new Pv(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first.`));case H.THINKING_TEXT_MESSAGE_CONTENT:return u?Nx(e):Px(()=>new Pv(`Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first.`));case H.THINKING_TEXT_MESSAGE_END:return u?(u=!1,Nx(e)):Px(()=>new Pv(`Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first.`));case H.THINKING_START:return l?Px(()=>new Pv(`Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.`)):(l=!0,Nx(e));case H.THINKING_END:return l?(l=!1,Nx(e)):Px(()=>new Pv(`Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first.`));default:return Nx(e)}}))},oE=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),sE=e=>Vx(()=>Mx(e())).pipe(Kx(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return Mx(e.text()).pipe(zx(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,Px(()=>i)}))}let t={type:oE.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new Vb(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:oE.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!==`AbortError`)throw e})})):Px(()=>Error(`Failed to getReader() from response`))})),cE=(e,t)=>{let n=eE(t),r=new Xb,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==oE.HEADERS&&e.type===oE.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)}},error:e=>r.error(e),complete:()=>{a&&(a+=i.decode(),o(a)),r.complete()}});function o(e){let t=e.split(` + `):``,this.name=`UnsubscriptionError`,this.errors=t}});function wb(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Tb=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=lf(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(xb(c))try{c()}catch(e){i=e instanceof Cb?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=lf(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{Ob(f)}catch(e){i??=[],e instanceof Cb?i=df(df([],uf(i)),uf(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new Cb(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)Ob(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&wb(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&wb(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),Eb=Tb.EMPTY;function Db(e){return e instanceof Tb||e&&`closed`in e&&xb(e.remove)&&xb(e.add)&&xb(e.unsubscribe)}function Ob(e){xb(e)?e():e.unsubscribe()}var kb={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Ab={setTimeout:function(e,t){var n=[...arguments].slice(2),r=Ab.delegate;return r?.setTimeout?r.setTimeout.apply(r,df([e,t],uf(n))):setTimeout.apply(void 0,df([e,t],uf(n)))},clearTimeout:function(e){return(Ab.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function jb(e){Ab.setTimeout(function(){var t=kb.onUnhandledError;if(t)t(e);else throw e})}function Mb(){}var Nb=(function(){return Ib(`C`,void 0,void 0)})();function Pb(e){return Ib(`E`,void 0,e)}function Fb(e){return Ib(`N`,e,void 0)}function Ib(e,t,n){return{kind:e,value:t,error:n}}var Lb=null;function Rb(e){if(kb.useDeprecatedSynchronousErrorHandling){var t=!Lb;if(t&&(Lb={errorThrown:!1,error:null}),e(),t){var n=Lb,r=n.errorThrown,i=n.error;if(Lb=null,r)throw i}}else e()}function zb(e){kb.useDeprecatedSynchronousErrorHandling&&Lb&&(Lb.errorThrown=!0,Lb.error=e)}var Bb=function(e){rf(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Db(t)&&t.add(n)):n.destination=Jb,n}return t.create=function(e,t,n){return new Wb(e,t,n)},t.prototype.next=function(e){this.isStopped?qb(Fb(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?qb(Pb(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?qb(Nb,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Tb),Vb=Function.prototype.bind;function Hb(e,t){return Vb.call(e,t)}var Ub=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Gb(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Gb(e)}else Gb(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Gb(e)}},e}(),Wb=function(e){rf(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(xb(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&kb.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&Hb(t.next,o),error:t.error&&Hb(t.error,o),complete:t.complete&&Hb(t.complete,o)}):a=t}return i.destination=new Ub(a),i}return t}(Bb);function Gb(e){kb.useDeprecatedSynchronousErrorHandling?zb(e):jb(e)}function Kb(e){throw e}function qb(e,t){var n=kb.onStoppedNotification;n&&Ab.setTimeout(function(){return n(e,t)})}var Jb={closed:!0,next:Mb,error:Kb,complete:Mb},Yb=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function Xb(e){return e}function Zb(){return Qb([...arguments])}function Qb(e){return e.length===0?Xb:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var $b=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=nx(e)?e:new Wb(e,t,n);return Rb(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=ex(t),new t(function(t,r){var i=new Wb({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[Yb]=function(){return this},e.prototype.pipe=function(){return Qb([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=ex(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function ex(e){return e??kb.Promise??Promise}function tx(e){return e&&xb(e.next)&&xb(e.error)&&xb(e.complete)}function nx(e){return e&&e instanceof Bb||tx(e)&&Db(e)}function rx(e){return xb(e?.lift)}function ix(e){return function(t){if(rx(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function ax(e,t,n,r,i){return new ox(e,t,n,r,i)}var ox=function(e){rf(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(Bb),sx=Sb(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),cx=function(e){rf(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new lx(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new sx},t.prototype.next=function(e){var t=this;Rb(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=lf(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;Rb(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;Rb(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Eb:(this.currentObservers=null,a.push(e),new Tb(function(){t.currentObservers=null,wb(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new $b;return e.source=this,e},t.create=function(e,t){return new lx(e,t)},t}($b),lx=function(e){rf(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??Eb},t}(cx),ux={now:function(){return(ux.delegate||Date).now()},delegate:void 0},dx=function(e){rf(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=ux);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a=0}function cS(e){for(var t=[`topLevel`],n=0,r,i,a,o=function(e){return t.push(e)},s=function(e){return t[t.length-1]=e},c=function(e){r??(r=n,i=t.length,a=e)},l=function(e){e===a&&(r=void 0,i=void 0,a=void 0)},u=function(){return t.pop()},d=function(){return n--},f=function(e){if(`0`<=e&&e<=`9`){o(`number`);return}switch(e){case`"`:o(`string`);return;case`-`:o(`numberNeedsDigit`);return;case`t`:o(`true`);return;case`f`:o(`false`);return;case`n`:o(`null`);return;case`[`:o(`arrayNeedsValue`);return;case`{`:o(`objectNeedsKey`);return}},p=e.length;n`9`)&&(d(),u());break;case`numberNeedsDigit`:s(`number`);break;case`numberNeedsExponent`:s(m===`+`||m===`-`?`numberNeedsDigit`:`number`);break;case`true`:case`false`:case`null`:(m<`a`||m>`z`)&&(d(),u());break;case`arrayNeedsValue`:m===`]`?u():sS(m)||(l(`collectionItem`),s(`arrayNeedsComma`),f(m));break;case`arrayNeedsComma`:m===`]`?u():m===`,`&&(c(`collectionItem`),s(`arrayNeedsValue`));break;case`objectNeedsKey`:m===`}`?u():m===`"`&&(c(`collectionItem`),s(`objectNeedsColon`),o(`string`));break;case`objectNeedsColon`:m===`:`&&s(`objectNeedsValue`);break;case`objectNeedsValue`:sS(m)||(l(`collectionItem`),s(`objectNeedsComma`),f(m));break;case`objectNeedsComma`:m===`}`?u():m===`,`&&(c(`collectionItem`),s(`objectNeedsKey`))}}i!=null&&(t.length=i);for(var h=[r==null?e:e.slice(0,r)],g=function(t){return h.push(t.slice(e.length-e.lastIndexOf(t[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case`string`:h.push(`"`);break;case`numberNeedsDigit`:case`numberNeedsExponent`:h.push(`0`);break;case`true`:g(`true`);break;case`false`:g(`false`);break;case`null`:g(`null`);break;case`arrayNeedsValue`:case`arrayNeedsComma`:h.push(`]`);break;case`objectNeedsKey`:case`objectNeedsColon`:case`objectNeedsValue`:case`objectNeedsComma`:h.push(`}`)}return h.join(``)}function lS(){let e=this.buf,t=this.pos,n=0,r=0;for(let i=0;i<28;i+=7){let a=e[t++];if(n|=(a&127)<>4,!(i&128)){this.pos=t,this.assertBounds(),this.varint64Lo=n,this.varint64Hi=r;return}for(let i=3;i<=31;i+=7){let a=e[t++];if(r|=(a&127)<=uS&&(i+=r/uS|0,r%=uS)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?gS(r,i):hS(r,i)}function fS(e,t){let n=hS(e,t),r=n.hi&2147483648;r&&(n=gS(n.lo,n.hi));let i=pS(n.lo,n.hi);return r?`-`+i:i}function pS(e,t){if({lo:e,hi:t}=mS(e,t),t<=2097151)return String(uS*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+_S(o)+_S(a)}function mS(e,t){return{lo:e>>>0,hi:t>>>0}}function hS(e,t){return{lo:e|0,hi:t|0}}function gS(e,t){return t=~t,e?e=~e+1:t+=1,hS(e,t)}var _S=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function vS(){let e=this.buf[this.pos++];if(!(e&128))return this.assertBounds(),e;let t=e&127;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}var yS=bS();function bS(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(globalThis.Deno||globalThis.Bun||typeof process!=`object`||{}.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||ri||ta.call(e)),wS(i)}return CS}function ES(e){return(t,n)=>{let r=e(t);return n.set(r),{written:r.byteLength}}}var DS;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(DS||={});var OS=class{constructor(e){this.stackPos=[],this.encodeUtf8Into=e?ES(e):TS().encodeUtf8Into,this.buffer=jS,this.viewCache=MS,this.pos=0}ensureCapacity(e){let t=this.pos+e;if(t>this.buffer.length){let e=this.buffer.length||kS;for(;e0&&n.set(this.buffer),this.buffer=n}}view(){let e=this.buffer,t=this.viewCache;if(t.byteLength===e.byteLength)return t;let n=new DataView(e.buffer);return this.viewCache=n,n}finish(){let e=this.buffer.slice(0,this.pos);return this.pos=0,this.stackPos=[],e}fork(){return this.stackPos.push(this.pos),this.ensureCapacity(AS),this.buffer[this.pos++]=0,this}join(){let e=this.stackPos.pop();if(e===void 0)throw Error(`invalid state, fork stack empty`);let t=this.pos-e-AS,n=PS(t);return n>AS&&(this.ensureCapacity(n-AS),this.buffer.copyWithin(e+n,e+AS,this.pos)),this.pos=e,this.uint32(t),this.pos+=t,this}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.ensureCapacity(e.length),this.buffer.set(e,this.pos),this.pos+=e.length,this}uint32(e){if(IS(e),this.ensureCapacity(5),e<128)return this.buffer[this.pos++]=e,this;for(;e>127;)this.buffer[this.pos++]=e&127|128,e>>>=7;return this.buffer[this.pos++]=e,this}int32(e){if(FS(e),e>=0)return this.uint32(e);this.ensureCapacity(10);for(let t=0;t<9;t++)this.buffer[this.pos++]=e&127|128,e>>=7;return this.buffer[this.pos++]=1,this}bool(e){return this.ensureCapacity(1),this.buffer[this.pos++]=+!!e,this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){typeof e!=`string`&&(e=String(e));let t=e.length;if(t<=NS){this.ensureCapacity(t+1);let n=this.buffer,r=this.pos;n[r++]=t;let i=0;for(;i127)break;n[r++]=t}if(i==t)return this.pos=r,this}this.ensureCapacity(t*3+5);let n=PS(t),r=this.buffer,i=this.pos,{written:a}=this.encodeUtf8Into(e,r.subarray(i+n)),o=PS(a);return o!=n&&r.copyWithin(i+o,i+n,i+n+a),this.uint32(a),this.pos+=a,this}float(e){return LS(e),this.ensureCapacity(4),this.view().setFloat32(this.pos,e,!0),this.pos+=4,this}double(e){return this.ensureCapacity(8),this.view().setFloat64(this.pos,e,!0),this.pos+=8,this}fixed32(e){return IS(e),this.ensureCapacity(4),this.view().setUint32(this.pos,e,!0),this.pos+=4,this}sfixed32(e){return FS(e),this.ensureCapacity(4),this.view().setInt32(this.pos,e,!0),this.pos+=4,this}sint32(e){return FS(e),this.uint32((e<<1^e>>31)>>>0)}sfixed64(e){let t=yS.enc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}fixed64(e){let t=yS.uEnc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}int64(e){let t=yS.enc(e);return this.writeVarint64(t.lo,t.hi)}sint64(e){let t=yS.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return this.writeVarint64(r,i)}uint64(e){let t=yS.uEnc(e);return this.writeVarint64(t.lo,t.hi)}writeVarint64(e,t){this.ensureCapacity(10);let n=this.buffer,r=this.pos;for(let i=0;i<28;i+=7){let a=e>>>i,o=!(!(a>>>7)&&t==0);if(n[r++]=(o?a|128:a)&255,!o)return this.pos=r,this}let i=e>>>28&15|(t&7)<<4,a=!!(t>>3);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this;for(let e=3;e<31;e+=7){let i=t>>>e,a=!!(i>>>7);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this}return n[r++]=t>>>31&1,this.pos=r,this}},kS=128,AS=1,jS=new Uint8Array,MS=new DataView(jS.buffer),NS=32;function PS(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}var U=class{constructor(e,t=TS().decodeUtf8){this.decodeUtf8=t,this.varint64Lo=0,this.varint64Hi=0,this.varint64=lS,this.uint32=vS,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||n==5&&this.buf[this.pos-1]>15)throw Error(`illegal tag: varint overflows uint32`);let r=t>>>3,i=t&7;if(r<=0||i>5)throw Error(`illegal tag: field no `+r+` wire type `+i);return[r,i]}skip(e,t,n=100){let r=this.pos;switch(e){case DS.Varint:for(;this.buf[this.pos++]&128;);break;case DS.Bit64:this.pos+=4;case DS.Bit32:this.pos+=4;break;case DS.LengthDelimited:let r=this.uint32();this.pos+=r;break;case DS.StartGroup:if(n<=0)throw Error(`maximum recursion depth reached`);for(;;){let[e,r]=this.tag();if(r===DS.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(r,e,n-1)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return this.varint64(),yS.dec(this.varint64Lo,this.varint64Hi)}uint64(){return this.varint64(),yS.uDec(this.varint64Lo,this.varint64Hi)}sint64(){this.varint64();let e=this.varint64Lo,t=this.varint64Hi,n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,yS.dec(e,t)}bool(){let e=this.buf[this.pos];return e<128?(this.pos++,e!==0):(this.varint64(),this.varint64Lo!==0||this.varint64Hi!==0)}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return yS.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return yS.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){let t=this.bytes(),n=t.length;if(n<=NS){let r=Array(n);for(let i=0;i127)return this.decodeUtf8(t,e);r[i]=n}return String.fromCharCode.apply(String,r)}return this.decodeUtf8(t,e)}};function FS(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid int32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int32: `+e)}function IS(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid uint32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint32: `+e)}function LS(e){if(typeof e==`string`){let t=e;if(e=Number(e),Number.isNaN(e)&&t!==`NaN`)throw Error(`invalid float32: `+t)}else if(typeof e!=`number`)throw Error(`invalid float32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float32: `+e)}var RS=function(e){return e[e.NULL_VALUE=0]=`NULL_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function zS(){return{fields:{}}}var BS={encode(e,t=new OS){return Object.entries(e.fields).forEach(([e,n])=>{n!==void 0&&HS.encode({key:e,value:n},t.uint32(10).fork()).join()}),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=zS();for(;n.pos>>3){case 1:{if(e!==10)break;let t=HS.decode(n,n.uint32());t.value!==void 0&&(i.fields[t.key]=t.value);continue}}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return BS.fromPartial(e??{})},fromPartial(e){let t=zS();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{}),t},wrap(e){let t=zS();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function VS(){return{key:``,value:void 0}}var HS={encode(e,t=new OS){return e.key!==``&&t.uint32(10).string(e.key),e.value!==void 0&&W.encode(W.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=VS();for(;n.pos>>3){case 1:if(e!==10)break;i.key=n.string();continue;case 2:if(e!==18)break;i.value=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return HS.fromPartial(e??{})},fromPartial(e){let t=VS();return t.key=e.key??``,t.value=e.value??void 0,t}};function US(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var W={encode(e,t=new OS){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&BS.encode(BS.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&GS.encode(GS.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=US();for(;n.pos>>3){case 1:if(e!==8)break;i.nullValue=n.int32();continue;case 2:if(e!==17)break;i.numberValue=n.double();continue;case 3:if(e!==26)break;i.stringValue=n.string();continue;case 4:if(e!==32)break;i.boolValue=n.bool();continue;case 5:if(e!==42)break;i.structValue=BS.unwrap(BS.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.listValue=GS.unwrap(GS.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return W.fromPartial(e??{})},fromPartial(e){let t=US();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=US();if(e===null)t.nullValue=RS.NULL_VALUE;else if(typeof e==`boolean`)t.boolValue=e;else if(typeof e==`number`)t.numberValue=e;else if(typeof e==`string`)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e==`object`)t.structValue=e;else if(e!==void 0)throw new globalThis.Error(`Unsupported any value type: `+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function WS(){return{values:[]}}var GS={encode(e,t=new OS){for(let n of e.values)W.encode(W.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=WS();for(;n.pos>>3){case 1:if(e!==10)break;i.values.push(W.unwrap(W.decode(n,n.uint32())));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return GS.fromPartial(e??{})},fromPartial(e){let t=WS();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=WS();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty(`values`)&&globalThis.Array.isArray(e.values)?e.values:e}},KS=function(e){return e[e.ADD=0]=`ADD`,e[e.REMOVE=1]=`REMOVE`,e[e.REPLACE=2]=`REPLACE`,e[e.MOVE=3]=`MOVE`,e[e.COPY=4]=`COPY`,e[e.TEST=5]=`TEST`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function qS(){return{op:0,path:``,from:void 0,value:void 0}}var JS={encode(e,t=new OS){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==``&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&W.encode(W.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=qS();for(;n.pos>>3){case 1:if(e!==8)break;i.op=n.int32();continue;case 2:if(e!==18)break;i.path=n.string();continue;case 3:if(e!==26)break;i.from=n.string();continue;case 4:if(e!==34)break;i.value=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return JS.fromPartial(e??{})},fromPartial(e){let t=qS();return t.op=e.op??0,t.path=e.path??``,t.from=e.from??void 0,t.value=e.value??void 0,t}};function YS(){return{id:``,type:``,function:void 0,metadata:void 0}}var XS={encode(e,t=new OS){return e.id!==``&&t.uint32(10).string(e.id),e.type!==``&&t.uint32(18).string(e.type),e.function!==void 0&&QS.encode(e.function,t.uint32(26).fork()).join(),e.metadata!==void 0&&BS.encode(BS.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=YS();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.type=n.string();continue;case 3:if(e!==26)break;i.function=QS.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.metadata=BS.unwrap(BS.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return XS.fromPartial(e??{})},fromPartial(e){let t=YS();return t.id=e.id??``,t.type=e.type??``,t.function=e.function!==void 0&&e.function!==null?QS.fromPartial(e.function):void 0,t.metadata=e.metadata??void 0,t}};function ZS(){return{name:``,arguments:``}}var QS={encode(e,t=new OS){return e.name!==``&&t.uint32(10).string(e.name),e.arguments!==``&&t.uint32(18).string(e.arguments),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=ZS();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.arguments=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return QS.fromPartial(e??{})},fromPartial(e){let t=ZS();return t.name=e.name??``,t.arguments=e.arguments??``,t}};function $S(){return{value:``,mimeType:``}}var eC={encode(e,t=new OS){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==``&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=$S();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return eC.fromPartial(e??{})},fromPartial(e){let t=$S();return t.value=e.value??``,t.mimeType=e.mimeType??``,t}};function tC(){return{value:``,mimeType:void 0}}var nC={encode(e,t=new OS){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==void 0&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=tC();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return nC.fromPartial(e??{})},fromPartial(e){let t=tC();return t.value=e.value??``,t.mimeType=e.mimeType??void 0,t}};function rC(){return{data:void 0,url:void 0}}var iC={encode(e,t=new OS){return e.data!==void 0&&eC.encode(e.data,t.uint32(10).fork()).join(),e.url!==void 0&&nC.encode(e.url,t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=rC();for(;n.pos>>3){case 1:if(e!==10)break;i.data=eC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.url=nC.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return iC.fromPartial(e??{})},fromPartial(e){let t=rC();return t.data=e.data!==void 0&&e.data!==null?eC.fromPartial(e.data):void 0,t.url=e.url!==void 0&&e.url!==null?nC.fromPartial(e.url):void 0,t}};function aC(){return{text:``}}var oC={encode(e,t=new OS){return e.text!==``&&t.uint32(10).string(e.text),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=aC();for(;n.pos>>3){case 1:if(e!==10)break;i.text=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return oC.fromPartial(e??{})},fromPartial(e){let t=aC();return t.text=e.text??``,t}};function sC(){return{source:void 0,metadata:void 0}}var cC={encode(e,t=new OS){return e.source!==void 0&&iC.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=sC();for(;n.pos>>3){case 1:if(e!==10)break;i.source=iC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cC.fromPartial(e??{})},fromPartial(e){let t=sC();return t.source=e.source!==void 0&&e.source!==null?iC.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function lC(){return{source:void 0,metadata:void 0}}var uC={encode(e,t=new OS){return e.source!==void 0&&iC.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=lC();for(;n.pos>>3){case 1:if(e!==10)break;i.source=iC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return uC.fromPartial(e??{})},fromPartial(e){let t=lC();return t.source=e.source!==void 0&&e.source!==null?iC.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function dC(){return{source:void 0,metadata:void 0}}var fC={encode(e,t=new OS){return e.source!==void 0&&iC.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=dC();for(;n.pos>>3){case 1:if(e!==10)break;i.source=iC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return fC.fromPartial(e??{})},fromPartial(e){let t=dC();return t.source=e.source!==void 0&&e.source!==null?iC.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function pC(){return{source:void 0,metadata:void 0}}var mC={encode(e,t=new OS){return e.source!==void 0&&iC.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=pC();for(;n.pos>>3){case 1:if(e!==10)break;i.source=iC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mC.fromPartial(e??{})},fromPartial(e){let t=pC();return t.source=e.source!==void 0&&e.source!==null?iC.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function hC(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}var gC={encode(e,t=new OS){return e.text!==void 0&&oC.encode(e.text,t.uint32(10).fork()).join(),e.image!==void 0&&cC.encode(e.image,t.uint32(18).fork()).join(),e.audio!==void 0&&uC.encode(e.audio,t.uint32(26).fork()).join(),e.video!==void 0&&fC.encode(e.video,t.uint32(34).fork()).join(),e.document!==void 0&&mC.encode(e.document,t.uint32(42).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=hC();for(;n.pos>>3){case 1:if(e!==10)break;i.text=oC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.image=cC.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.audio=uC.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.video=fC.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.document=mC.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gC.fromPartial(e??{})},fromPartial(e){let t=hC();return t.text=e.text!==void 0&&e.text!==null?oC.fromPartial(e.text):void 0,t.image=e.image!==void 0&&e.image!==null?cC.fromPartial(e.image):void 0,t.audio=e.audio!==void 0&&e.audio!==null?uC.fromPartial(e.audio):void 0,t.video=e.video!==void 0&&e.video!==null?fC.fromPartial(e.video):void 0,t.document=e.document!==void 0&&e.document!==null?mC.fromPartial(e.document):void 0,t}};function _C(){return{id:``,role:``,content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[],metadata:void 0,subagentRunId:void 0}}var vC={encode(e,t=new OS){e.id!==``&&t.uint32(10).string(e.id),e.role!==``&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let n of e.toolCalls)XS.encode(n,t.uint32(42).fork()).join();e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error);for(let n of e.contentParts)gC.encode(n,t.uint32(66).fork()).join();return e.metadata!==void 0&&BS.encode(BS.wrap(e.metadata),t.uint32(74).fork()).join(),e.subagentRunId!==void 0&&t.uint32(82).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=_C();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.role=n.string();continue;case 3:if(e!==26)break;i.content=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.toolCalls.push(XS.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.toolCallId=n.string();continue;case 7:if(e!==58)break;i.error=n.string();continue;case 8:if(e!==66)break;i.contentParts.push(gC.decode(n,n.uint32()));continue;case 9:if(e!==74)break;i.metadata=BS.unwrap(BS.decode(n,n.uint32()));continue;case 10:if(e!==82)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vC.fromPartial(e??{})},fromPartial(e){let t=_C();return t.id=e.id??``,t.role=e.role??``,t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>XS.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>gC.fromPartial(e))||[],t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function yC(){return{id:``,reason:``,message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0,subagentRunId:void 0}}var bC={encode(e,t=new OS){return e.id!==``&&t.uint32(10).string(e.id),e.reason!==``&&t.uint32(18).string(e.reason),e.message!==void 0&&t.uint32(26).string(e.message),e.toolCallId!==void 0&&t.uint32(34).string(e.toolCallId),e.responseSchema!==void 0&&W.encode(W.wrap(e.responseSchema),t.uint32(42).fork()).join(),e.expiresAt!==void 0&&t.uint32(50).string(e.expiresAt),e.metadata!==void 0&&W.encode(W.wrap(e.metadata),t.uint32(58).fork()).join(),e.subagentRunId!==void 0&&t.uint32(66).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=yC();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.reason=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.responseSchema=W.unwrap(W.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.expiresAt=n.string();continue;case 7:if(e!==58)break;i.metadata=W.unwrap(W.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return bC.fromPartial(e??{})},fromPartial(e){let t=yC();return t.id=e.id??``,t.reason=e.reason??``,t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}},xC=function(e){return e[e.TEXT_MESSAGE_START=0]=`TEXT_MESSAGE_START`,e[e.TEXT_MESSAGE_CONTENT=1]=`TEXT_MESSAGE_CONTENT`,e[e.TEXT_MESSAGE_END=2]=`TEXT_MESSAGE_END`,e[e.TOOL_CALL_START=3]=`TOOL_CALL_START`,e[e.TOOL_CALL_ARGS=4]=`TOOL_CALL_ARGS`,e[e.TOOL_CALL_END=5]=`TOOL_CALL_END`,e[e.STATE_SNAPSHOT=6]=`STATE_SNAPSHOT`,e[e.STATE_DELTA=7]=`STATE_DELTA`,e[e.MESSAGES_SNAPSHOT=8]=`MESSAGES_SNAPSHOT`,e[e.RAW=9]=`RAW`,e[e.CUSTOM=10]=`CUSTOM`,e[e.RUN_STARTED=11]=`RUN_STARTED`,e[e.RUN_FINISHED=12]=`RUN_FINISHED`,e[e.RUN_ERROR=13]=`RUN_ERROR`,e[e.STEP_STARTED=14]=`STEP_STARTED`,e[e.STEP_FINISHED=15]=`STEP_FINISHED`,e[e.SUBAGENT_STARTED=16]=`SUBAGENT_STARTED`,e[e.SUBAGENT_FINISHED=17]=`SUBAGENT_FINISHED`,e[e.SUBAGENT_ERROR=18]=`SUBAGENT_ERROR`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function SC(){return{type:0,timestamp:void 0,rawEvent:void 0,metadata:void 0}}var G={encode(e,t=new OS){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&W.encode(W.wrap(e.rawEvent),t.uint32(26).fork()).join(),e.metadata!==void 0&&BS.encode(BS.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=SC();for(;n.pos>>3){case 1:if(e!==8)break;i.type=n.int32();continue;case 2:if(e!==16)break;i.timestamp=hw(n.int64());continue;case 3:if(e!==26)break;i.rawEvent=W.unwrap(W.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=BS.unwrap(BS.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=SC();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t.metadata=e.metadata??void 0,t}};function CC(){return{baseEvent:void 0,messageId:``,role:void 0,name:void 0,subagentRunId:void 0}}var wC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.name!==void 0&&t.uint32(34).string(e.name),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=CC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wC.fromPartial(e??{})},fromPartial(e){let t=CC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.role=e.role??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function TC(){return{baseEvent:void 0,messageId:``,delta:``,subagentRunId:void 0}}var EC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=TC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return EC.fromPartial(e??{})},fromPartial(e){let t=TC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function DC(){return{baseEvent:void 0,messageId:``,subagentRunId:void 0}}var OC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=DC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return OC.fromPartial(e??{})},fromPartial(e){let t=DC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function kC(){return{baseEvent:void 0,toolCallId:``,toolCallName:``,parentMessageId:void 0,subagentRunId:void 0}}var AC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.toolCallName!==``&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=kC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return AC.fromPartial(e??{})},fromPartial(e){let t=kC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.toolCallName=e.toolCallName??``,t.parentMessageId=e.parentMessageId??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function jC(){return{baseEvent:void 0,toolCallId:``,delta:``,subagentRunId:void 0}}var MC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=jC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return MC.fromPartial(e??{})},fromPartial(e){let t=jC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function NC(){return{baseEvent:void 0,toolCallId:``,subagentRunId:void 0}}var PC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=NC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return PC.fromPartial(e??{})},fromPartial(e){let t=NC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function FC(){return{baseEvent:void 0,snapshot:void 0,subagentRunId:void 0}}var IC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&W.encode(W.wrap(e.snapshot),t.uint32(18).fork()).join(),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=FC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.snapshot=W.unwrap(W.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return IC.fromPartial(e??{})},fromPartial(e){let t=FC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function LC(){return{baseEvent:void 0,delta:[],subagentRunId:void 0}}var RC={encode(e,t=new OS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.delta)JS.encode(n,t.uint32(18).fork()).join();return e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=LC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.delta.push(JS.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return RC.fromPartial(e??{})},fromPartial(e){let t=LC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>JS.fromPartial(e))||[],t.subagentRunId=e.subagentRunId??void 0,t}};function zC(){return{baseEvent:void 0,messages:[]}}var BC={encode(e,t=new OS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.messages)vC.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=zC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messages.push(vC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return BC.fromPartial(e??{})},fromPartial(e){let t=zC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>vC.fromPartial(e))||[],t}};function VC(){return{baseEvent:void 0,event:void 0,source:void 0,subagentRunId:void 0}}var HC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&W.encode(W.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=VC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.event=W.unwrap(W.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.source=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return HC.fromPartial(e??{})},fromPartial(e){let t=VC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function UC(){return{baseEvent:void 0,name:``,value:void 0,subagentRunId:void 0}}var WC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==``&&t.uint32(18).string(e.name),e.value!==void 0&&W.encode(W.wrap(e.value),t.uint32(26).fork()).join(),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=UC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.name=n.string();continue;case 3:if(e!==26)break;i.value=W.unwrap(W.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return WC.fromPartial(e??{})},fromPartial(e){let t=UC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.name=e.name??``,t.value=e.value??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function GC(){return{baseEvent:void 0,threadId:``,runId:``}}var KC={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=GC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return KC.fromPartial(e??{})},fromPartial(e){let t=GC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t}};function qC(){return{provider:void 0,model:void 0,inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0}}var JC={encode(e,t=new OS){return e.provider!==void 0&&t.uint32(10).string(e.provider),e.model!==void 0&&t.uint32(18).string(e.model),e.inputTokens!==void 0&&t.uint32(24).int64(e.inputTokens),e.outputTokens!==void 0&&t.uint32(32).int64(e.outputTokens),e.totalTokens!==void 0&&t.uint32(40).int64(e.totalTokens),e.reasoningTokens!==void 0&&t.uint32(48).int64(e.reasoningTokens),e.cachedInputTokens!==void 0&&t.uint32(56).int64(e.cachedInputTokens),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=qC();for(;n.pos>>3){case 1:if(e!==10)break;i.provider=n.string();continue;case 2:if(e!==18)break;i.model=n.string();continue;case 3:if(e!==24)break;i.inputTokens=hw(n.int64());continue;case 4:if(e!==32)break;i.outputTokens=hw(n.int64());continue;case 5:if(e!==40)break;i.totalTokens=hw(n.int64());continue;case 6:if(e!==48)break;i.reasoningTokens=hw(n.int64());continue;case 7:if(e!==56)break;i.cachedInputTokens=hw(n.int64());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return JC.fromPartial(e??{})},fromPartial(e){let t=qC();return t.provider=e.provider??void 0,t.model=e.model??void 0,t.inputTokens=e.inputTokens??void 0,t.outputTokens=e.outputTokens??void 0,t.totalTokens=e.totalTokens??void 0,t.reasoningTokens=e.reasoningTokens??void 0,t.cachedInputTokens=e.cachedInputTokens??void 0,t}};function YC(){return{baseEvent:void 0,threadId:``,runId:``,result:void 0,outcome:``,interrupts:[],usage:[]}}var XC={encode(e,t=new OS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.result!==void 0&&W.encode(W.wrap(e.result),t.uint32(34).fork()).join(),e.outcome!==``&&t.uint32(42).string(e.outcome);for(let n of e.interrupts)bC.encode(n,t.uint32(50).fork()).join();for(let n of e.usage)JC.encode(n,t.uint32(58).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=YC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.result=W.unwrap(W.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.outcome=n.string();continue;case 6:if(e!==50)break;i.interrupts.push(bC.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.usage.push(JC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return XC.fromPartial(e??{})},fromPartial(e){let t=YC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interrupts=e.interrupts?.map(e=>bC.fromPartial(e))||[],t.usage=e.usage?.map(e=>JC.fromPartial(e))||[],t}};function ZC(){return{baseEvent:void 0,code:void 0,message:``,usage:[]}}var QC={encode(e,t=new OS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==``&&t.uint32(26).string(e.message);for(let n of e.usage)JC.encode(n,t.uint32(34).fork()).join();return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=ZC();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.code=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.usage.push(JC.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return QC.fromPartial(e??{})},fromPartial(e){let t=ZC();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??``,t.usage=e.usage?.map(e=>JC.fromPartial(e))||[],t}};function $C(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var ew={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=$C();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return ew.fromPartial(e??{})},fromPartial(e){let t=$C();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function tw(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var nw={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=tw();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return nw.fromPartial(e??{})},fromPartial(e){let t=tw();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function rw(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0,subagentRunId:void 0}}var iw={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),e.name!==void 0&&t.uint32(42).string(e.name),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=rw();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue;case 5:if(e!==42)break;i.name=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return iw.fromPartial(e??{})},fromPartial(e){let t=rw();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function aw(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0,subagentRunId:void 0}}var ow={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=aw();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.delta=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return ow.fromPartial(e??{})},fromPartial(e){let t=aw();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function sw(){return{baseEvent:void 0,subagentRunId:``,name:``,description:void 0,parentSubagentRunId:void 0,parentToolCallId:void 0,parentMessageId:void 0}}var cw={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.name!==``&&t.uint32(26).string(e.name),e.description!==void 0&&t.uint32(34).string(e.description),e.parentSubagentRunId!==void 0&&t.uint32(42).string(e.parentSubagentRunId),e.parentToolCallId!==void 0&&t.uint32(50).string(e.parentToolCallId),e.parentMessageId!==void 0&&t.uint32(58).string(e.parentMessageId),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=sw();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.name=n.string();continue;case 4:if(e!==34)break;i.description=n.string();continue;case 5:if(e!==42)break;i.parentSubagentRunId=n.string();continue;case 6:if(e!==50)break;i.parentToolCallId=n.string();continue;case 7:if(e!==58)break;i.parentMessageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cw.fromPartial(e??{})},fromPartial(e){let t=sw();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.name=e.name??``,t.description=e.description??void 0,t.parentSubagentRunId=e.parentSubagentRunId??void 0,t.parentToolCallId=e.parentToolCallId??void 0,t.parentMessageId=e.parentMessageId??void 0,t}};function lw(){return{baseEvent:void 0,subagentRunId:``,result:void 0,outcome:``,interruptIds:[]}}var uw={encode(e,t=new OS){e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.result!==void 0&&W.encode(W.wrap(e.result),t.uint32(26).fork()).join(),e.outcome!==``&&t.uint32(34).string(e.outcome);for(let n of e.interruptIds)t.uint32(42).string(n);return t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=lw();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.result=W.unwrap(W.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.outcome=n.string();continue;case 5:if(e!==42)break;i.interruptIds.push(n.string());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return uw.fromPartial(e??{})},fromPartial(e){let t=lw();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interruptIds=e.interruptIds?.map(e=>e)||[],t}};function dw(){return{baseEvent:void 0,subagentRunId:``,message:``,code:void 0}}var fw={encode(e,t=new OS){return e.baseEvent!==void 0&&G.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.message!==``&&t.uint32(26).string(e.message),e.code!==void 0&&t.uint32(34).string(e.code),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=dw();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=G.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.code=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return fw.fromPartial(e??{})},fromPartial(e){let t=dw();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?G.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.message=e.message??``,t.code=e.code??void 0,t}};function pw(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0,subagentStarted:void 0,subagentFinished:void 0,subagentError:void 0}}var mw={encode(e,t=new OS){return e.textMessageStart!==void 0&&wC.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&EC.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&OC.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&AC.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&MC.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&PC.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&IC.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&RC.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&BC.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&HC.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&WC.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&KC.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&XC.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&QC.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&ew.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&nw.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&iw.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&ow.encode(e.toolCallChunk,t.uint32(146).fork()).join(),e.subagentStarted!==void 0&&cw.encode(e.subagentStarted,t.uint32(154).fork()).join(),e.subagentFinished!==void 0&&uw.encode(e.subagentFinished,t.uint32(162).fork()).join(),e.subagentError!==void 0&&fw.encode(e.subagentError,t.uint32(170).fork()).join(),t},decode(e,t){let n=e instanceof U?e:new U(e),r=t===void 0?n.len:n.pos+t,i=pw();for(;n.pos>>3){case 1:if(e!==10)break;i.textMessageStart=wC.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.textMessageContent=EC.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.textMessageEnd=OC.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.toolCallStart=AC.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.toolCallArgs=MC.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.toolCallEnd=PC.decode(n,n.uint32());continue;case 7:if(e!==58)break;i.stateSnapshot=IC.decode(n,n.uint32());continue;case 8:if(e!==66)break;i.stateDelta=RC.decode(n,n.uint32());continue;case 9:if(e!==74)break;i.messagesSnapshot=BC.decode(n,n.uint32());continue;case 10:if(e!==82)break;i.raw=HC.decode(n,n.uint32());continue;case 11:if(e!==90)break;i.custom=WC.decode(n,n.uint32());continue;case 12:if(e!==98)break;i.runStarted=KC.decode(n,n.uint32());continue;case 13:if(e!==106)break;i.runFinished=XC.decode(n,n.uint32());continue;case 14:if(e!==114)break;i.runError=QC.decode(n,n.uint32());continue;case 15:if(e!==122)break;i.stepStarted=ew.decode(n,n.uint32());continue;case 16:if(e!==130)break;i.stepFinished=nw.decode(n,n.uint32());continue;case 17:if(e!==138)break;i.textMessageChunk=iw.decode(n,n.uint32());continue;case 18:if(e!==146)break;i.toolCallChunk=ow.decode(n,n.uint32());continue;case 19:if(e!==154)break;i.subagentStarted=cw.decode(n,n.uint32());continue;case 20:if(e!==162)break;i.subagentFinished=uw.decode(n,n.uint32());continue;case 21:if(e!==170)break;i.subagentError=fw.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mw.fromPartial(e??{})},fromPartial(e){let t=pw();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?wC.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?EC.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?OC.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?AC.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?MC.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?PC.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?IC.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?RC.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?BC.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?HC.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?WC.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?KC.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?XC.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?QC.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?ew.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?nw.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?iw.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?ow.fromPartial(e.toolCallChunk):void 0,t.subagentStarted=e.subagentStarted!==void 0&&e.subagentStarted!==null?cw.fromPartial(e.subagentStarted):void 0,t.subagentFinished=e.subagentFinished!==void 0&&e.subagentFinished!==null?uw.fromPartial(e.subagentFinished):void 0,t.subagentError=e.subagentError!==void 0&&e.subagentError!==null?fw.fromPartial(e.subagentError):void 0,t}};function hw(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error(`Value is larger than Number.MAX_SAFE_INTEGER`);if(te&&typeof e==`object`?e:void 0,_w=e=>{let t=gw(e);if(t){if(t.data){let e=t.data;return{type:`data`,value:e.value,mimeType:e.mimeType}}if(t.url){let e=t.url;return{type:`url`,value:e.value,mimeType:e.mimeType}}}},vw=e=>{let t=gw(e);if(t){if(t.text)return{type:`text`,text:t.text.text};if(t.image){let e=t.image;return{type:`image`,source:_w(e.source),metadata:e.metadata}}if(t.audio){let e=t.audio;return{type:`audio`,source:_w(e.source),metadata:e.metadata}}if(t.video){let e=t.video;return{type:`video`,source:_w(e.source),metadata:e.metadata}}if(t.document){let e=t.document;return{type:`document`,source:_w(e.source),metadata:e.metadata}}}};function yw(e){let t=mw.decode(e),n=Object.values(t).find(e=>e!==void 0);if(!n)throw Error(`Invalid event`);if(n.type=xC[n.baseEvent.type],n.timestamp=n.baseEvent.timestamp,n.rawEvent=n.baseEvent.rawEvent,n.baseEvent.metadata!==void 0&&(n.metadata=n.baseEvent.metadata),delete n.baseEvent,n.type===V.MESSAGES_SNAPSHOT)for(let e of n.messages){let t=e;if(t.role===`user`&&Array.isArray(t.contentParts)){let e=t.contentParts.map(e=>vw(e)).filter(e=>e!==void 0);e.length>0&&(t.content=e)}Array.isArray(t.contentParts)&&t.contentParts.length===0&&(t.contentParts=void 0),t.toolCalls?.length===0&&(t.toolCalls=void 0)}if(n.type===V.RUN_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interrupts)?e.interrupts:[];delete e.interrupts,t===`interrupt`?e.outcome={type:`interrupt`,interrupts:r}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if(n.type===V.SUBAGENT_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interruptIds)?e.interruptIds:[];delete e.interruptIds,t===`suspended`?e.outcome={type:`suspended`,...r.length>0&&{interruptIds:r}}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if((n.type===V.RUN_FINISHED||n.type===V.RUN_ERROR)&&Array.isArray(n.usage)&&n.usage.length===0&&delete n.usage,n.type===V.STATE_DELTA)for(let e of n.delta)e.op=KS[e.op].toLowerCase(),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]});return Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),Ry.parse(n)}var bw;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(bw||={});var xw;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(xw||={});var K=bw.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),Sw=e=>{switch(typeof e){case`undefined`:return K.undefined;case`string`:return K.string;case`number`:return Number.isNaN(e)?K.nan:K.number;case`boolean`:return K.boolean;case`function`:return K.function;case`bigint`:return K.bigint;case`symbol`:return K.symbol;case`object`:return Array.isArray(e)?K.array:e===null?K.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?K.promise:typeof Map<`u`&&e instanceof Map?K.map:typeof Set<`u`&&e instanceof Set?K.set:typeof Date<`u`&&e instanceof Date?K.date:K.object;default:return K.unknown}},q=bw.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Cw=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Cw.create=e=>new Cw(e);var ww=(e,t)=>{let n;switch(e.code){case q.invalid_type:n=e.received===K.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,bw.jsonStringifyReplacer)}`;break;case q.unrecognized_keys:n=`Unrecognized key(s) in object: ${bw.joinValues(e.keys,`, `)}`;break;case q.invalid_union:n=`Invalid input`;break;case q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${bw.joinValues(e.options)}`;break;case q.invalid_enum_value:n=`Invalid enum value. Expected ${bw.joinValues(e.options)}, received '${e.received}'`;break;case q.invalid_arguments:n=`Invalid function arguments`;break;case q.invalid_return_type:n=`Invalid function return type`;break;case q.invalid_date:n=`Invalid date`;break;case q.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:bw.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case q.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case q.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case q.custom:n=`Invalid input`;break;case q.invalid_intersection_types:n=`Intersection results could not be merged`;break;case q.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case q.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,bw.assertNever(e)}return{message:n}},Tw=ww;function Ew(){return Tw}var Dw=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function J(e,t){let n=Ew(),r=Dw({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===ww?void 0:ww].filter(e=>!!e)});e.common.issues.push(r)}var Ow=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return Y;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return Y;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},Y=Object.freeze({status:`aborted`}),kw=e=>({status:`dirty`,value:e}),Aw=e=>({status:`valid`,value:e}),jw=e=>e.status===`aborted`,Mw=e=>e.status===`dirty`,Nw=e=>e.status===`valid`,Pw=e=>typeof Promise<`u`&&e instanceof Promise,X;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(X||={});var Fw=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Iw=(e,t)=>{if(Nw(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Cw(e.common.issues);return this._error=t,this._error}}};function Lw(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var Rw=class{get description(){return this._def.description}_getType(e){return Sw(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Sw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ow,ctx:{common:e.parent.common,data:e.data,parsedType:Sw(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(Pw(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sw(e)};return Iw(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sw(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Nw(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Nw(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Sw(e)},r=this._parse({data:e,path:n.path,parent:n});return Iw(n,await(Pw(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:q.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new VT({schema:this,typeName:Z.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return HT.create(this,this._def)}nullable(){return UT.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ST.create(this)}promise(){return BT.create(this,this._def)}or(e){return TT.create([this,e],this._def)}and(e){return kT.create(this,e,this._def)}transform(e){return new VT({...Lw(this._def),schema:this,typeName:Z.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new WT({...Lw(this._def),innerType:this,defaultValue:t,typeName:Z.ZodDefault})}brand(){return new qT({typeName:Z.ZodBranded,type:this,...Lw(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new GT({...Lw(this._def),innerType:this,catchValue:t,typeName:Z.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return JT.create(this,e)}readonly(){return YT.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},zw=/^c[^\s-]{8,}$/i,Bw=/^[0-9a-z]+$/,Vw=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Hw=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Uw=/^[a-z0-9_-]{21}$/i,Ww=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Gw=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Kw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,qw=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Jw,Yw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Zw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Qw=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$w=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,eT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,tT=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,nT=RegExp(`^${tT}$`);function rT(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function iT(e){return RegExp(`^${rT(e)}$`)}function aT(e){let t=`${tT}T${rT(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function oT(e,t){return!((t!==`v4`&&t||!Yw.test(e))&&(t!==`v6`&&t||!Zw.test(e)))}function sT(e,t){if(!Ww.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function cT(e,t){return!((t!==`v4`&&t||!Xw.test(e))&&(t!==`v6`&&t||!Qw.test(e)))}var lT=class e extends Rw{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.string,received:t.parsedType}),Y}let t=new Ow,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),J(n,{code:q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:q.invalid_string,...X.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...X.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...X.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...X.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...X.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...X.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...X.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...X.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...X.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...X.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...X.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...X.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...X.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...X.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...X.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...X.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...X.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...X.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...X.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...X.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...X.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...X.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...X.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...X.errToObj(t)})}nonempty(e){return this.min(1,X.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew lT({checks:[],typeName:Z.ZodString,coerce:e?.coerce??!1,...Lw(e)});function uT(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var dT=class e extends Rw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.number,received:t.parsedType}),Y}let t,n=new Ow;for(let r of this._def.checks)r.kind===`int`?bw.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),J(t,{code:q.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?uT(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),J(t,{code:q.not_finite,message:r.message}),n.dirty()):bw.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,X.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,X.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,X.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,X.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:X.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:X.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:X.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:X.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:X.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:X.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:X.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:X.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:X.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:X.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&bw.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew dT({checks:[],typeName:Z.ZodNumber,coerce:e?.coerce||!1,...Lw(e)});var fT=class e extends Rw{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let t,n=new Ow;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),J(t,{code:q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):bw.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.bigint,received:t.parsedType}),Y}gte(e,t){return this.setLimit(`min`,e,!0,X.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,X.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,X.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,X.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:X.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:X.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:X.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:X.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:X.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:X.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew fT({checks:[],typeName:Z.ZodBigInt,coerce:e?.coerce??!1,...Lw(e)});var pT=class extends Rw{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.boolean,received:t.parsedType}),Y}return Aw(e.data)}};pT.create=e=>new pT({typeName:Z.ZodBoolean,coerce:e?.coerce||!1,...Lw(e)});var mT=class e extends Rw{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.date,received:t.parsedType}),Y}if(Number.isNaN(e.data.getTime()))return J(this._getOrReturnCtx(e),{code:q.invalid_date}),Y;let t=new Ow,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),J(n,{code:q.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):bw.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:X.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:X.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew mT({checks:[],coerce:e?.coerce||!1,typeName:Z.ZodDate,...Lw(e)});var hT=class extends Rw{_parse(e){if(this._getType(e)!==K.symbol){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.symbol,received:t.parsedType}),Y}return Aw(e.data)}};hT.create=e=>new hT({typeName:Z.ZodSymbol,...Lw(e)});var gT=class extends Rw{_parse(e){if(this._getType(e)!==K.undefined){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.undefined,received:t.parsedType}),Y}return Aw(e.data)}};gT.create=e=>new gT({typeName:Z.ZodUndefined,...Lw(e)});var _T=class extends Rw{_parse(e){if(this._getType(e)!==K.null){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.null,received:t.parsedType}),Y}return Aw(e.data)}};_T.create=e=>new _T({typeName:Z.ZodNull,...Lw(e)});var vT=class extends Rw{constructor(){super(...arguments),this._any=!0}_parse(e){return Aw(e.data)}};vT.create=e=>new vT({typeName:Z.ZodAny,...Lw(e)});var yT=class extends Rw{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Aw(e.data)}};yT.create=e=>new yT({typeName:Z.ZodUnknown,...Lw(e)});var bT=class extends Rw{_parse(e){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.never,received:t.parsedType}),Y}};bT.create=e=>new bT({typeName:Z.ZodNever,...Lw(e)});var xT=class extends Rw{_parse(e){if(this._getType(e)!==K.undefined){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.void,received:t.parsedType}),Y}return Aw(e.data)}};xT.create=e=>new xT({typeName:Z.ZodVoid,...Lw(e)});var ST=class e extends Rw{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==K.array)return J(t,{code:q.invalid_type,expected:K.array,received:t.parsedType}),Y;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(J(t,{code:q.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new Fw(t,e,t.path,n)))).then(e=>Ow.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new Fw(t,e,t.path,n)));return Ow.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:X.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:X.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:X.toString(n)}})}nonempty(e){return this.min(1,e)}};ST.create=(e,t)=>new ST({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Z.ZodArray,...Lw(t)});function CT(e){if(e instanceof wT){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=HT.create(CT(r))}return new wT({...e._def,shape:()=>t})}return e instanceof ST?new ST({...e._def,type:CT(e.element)}):e instanceof HT?HT.create(CT(e.unwrap())):e instanceof UT?UT.create(CT(e.unwrap())):e instanceof AT?AT.create(e.items.map(e=>CT(e))):e}var wT=class e extends Rw{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=bw.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==K.object){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.object,received:t.parsedType}),Y}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof bT&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new Fw(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof bT){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(J(n,{code:q.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new Fw(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Ow.mergeObjectSync(t,e)):Ow.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return X.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:X.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Z.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of bw.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of bw.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return CT(this)}partial(t){let n={};for(let e of bw.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of bw.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof HT;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return LT(bw.objectKeys(this.shape))}};wT.create=(e,t)=>new wT({shape:()=>e,unknownKeys:`strip`,catchall:bT.create(),typeName:Z.ZodObject,...Lw(t)}),wT.strictCreate=(e,t)=>new wT({shape:()=>e,unknownKeys:`strict`,catchall:bT.create(),typeName:Z.ZodObject,...Lw(t)}),wT.lazycreate=(e,t)=>new wT({shape:e,unknownKeys:`strip`,catchall:bT.create(),typeName:Z.ZodObject,...Lw(t)});var TT=class extends Rw{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Cw(e.ctx.common.issues));return J(t,{code:q.invalid_union,unionErrors:n}),Y}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Cw(e));return J(t,{code:q.invalid_union,unionErrors:i}),Y}}get options(){return this._def.options}};TT.create=(e,t)=>new TT({options:e,typeName:Z.ZodUnion,...Lw(t)});var ET=e=>e instanceof FT?ET(e.schema):e instanceof VT?ET(e.innerType()):e instanceof IT?[e.value]:e instanceof RT?e.options:e instanceof zT?bw.objectValues(e.enum):e instanceof WT?ET(e._def.innerType):e instanceof gT?[void 0]:e instanceof _T?[null]:e instanceof HT?[void 0,...ET(e.unwrap())]:e instanceof UT?[null,...ET(e.unwrap())]:e instanceof qT||e instanceof YT?ET(e.unwrap()):e instanceof GT?ET(e._def.innerType):[],DT=class e extends Rw{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==K.object)return J(t,{code:q.invalid_type,expected:K.object,received:t.parsedType}),Y;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(J(t,{code:q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Y)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=ET(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:Z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Lw(r)})}};function OT(e,t){let n=Sw(e),r=Sw(t);if(e===t)return{valid:!0,data:e};if(n===K.object&&r===K.object){let n=bw.objectKeys(t),r=bw.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=OT(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===K.array&&r===K.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(jw(e)||jw(r))return Y;let i=OT(e.value,r.value);return i.valid?((Mw(e)||Mw(r))&&t.dirty(),{status:t.value,value:i.data}):(J(n,{code:q.invalid_intersection_types}),Y)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};kT.create=(e,t,n)=>new kT({left:e,right:t,typeName:Z.ZodIntersection,...Lw(n)});var AT=class e extends Rw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.array)return J(n,{code:q.invalid_type,expected:K.array,received:n.parsedType}),Y;if(n.data.lengththis._def.items.length&&(J(n,{code:q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new Fw(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Ow.mergeArray(t,e)):Ow.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};AT.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new AT({items:e,typeName:Z.ZodTuple,rest:null,...Lw(t)})};var jT=class e extends Rw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.object)return J(n,{code:q.invalid_type,expected:K.object,received:n.parsedType}),Y;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new Fw(n,e,n.path,e)),value:a._parse(new Fw(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Ow.mergeObjectAsync(t,r):Ow.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Rw?new e({keyType:t,valueType:n,typeName:Z.ZodRecord,...Lw(r)}):new e({keyType:lT.create(),valueType:t,typeName:Z.ZodRecord,...Lw(n)})}},MT=class extends Rw{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.map)return J(n,{code:q.invalid_type,expected:K.map,received:n.parsedType}),Y;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new Fw(n,e,n.path,[a,`key`])),value:i._parse(new Fw(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return Y;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return Y;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};MT.create=(e,t,n)=>new MT({valueType:t,keyType:e,typeName:Z.ZodMap,...Lw(n)});var NT=class e extends Rw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==K.set)return J(n,{code:q.invalid_type,expected:K.set,received:n.parsedType}),Y;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(J(n,{code:q.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return Y;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new Fw(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:X.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:X.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};NT.create=(e,t)=>new NT({valueType:e,minSize:null,maxSize:null,typeName:Z.ZodSet,...Lw(t)});var PT=class e extends Rw{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==K.function)return J(t,{code:q.invalid_type,expected:K.function,received:t.parsedType}),Y;function n(e,n){return Dw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ew(),ww].filter(e=>!!e),issueData:{code:q.invalid_arguments,argumentsError:n}})}function r(e,n){return Dw({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ew(),ww].filter(e=>!!e),issueData:{code:q.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof BT){let e=this;return Aw(async function(...t){let o=new Cw([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return Aw(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Cw([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Cw([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:AT.create(t).rest(yT.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||AT.create([]).rest(yT.create()),returns:n||yT.create(),typeName:Z.ZodFunction,...Lw(r)})}},FT=class extends Rw{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};FT.create=(e,t)=>new FT({getter:e,typeName:Z.ZodLazy,...Lw(t)});var IT=class extends Rw{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return J(t,{received:t.data,code:q.invalid_literal,expected:this._def.value}),Y}return{status:`valid`,value:e.data}}get value(){return this._def.value}};IT.create=(e,t)=>new IT({value:e,typeName:Z.ZodLiteral,...Lw(t)});function LT(e,t){return new RT({values:e,typeName:Z.ZodEnum,...Lw(t)})}var RT=class e extends Rw{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return J(t,{expected:bw.joinValues(n),received:t.parsedType,code:q.invalid_type}),Y}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return J(t,{received:t.data,code:q.invalid_enum_value,options:n}),Y}return Aw(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};RT.create=LT;var zT=class extends Rw{_parse(e){let t=bw.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==K.string&&n.parsedType!==K.number){let e=bw.objectValues(t);return J(n,{expected:bw.joinValues(e),received:n.parsedType,code:q.invalid_type}),Y}if(this._cache||=new Set(bw.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=bw.objectValues(t);return J(n,{received:n.data,code:q.invalid_enum_value,options:e}),Y}return Aw(e.data)}get enum(){return this._def.values}};zT.create=(e,t)=>new zT({values:e,typeName:Z.ZodNativeEnum,...Lw(t)});var BT=class extends Rw{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==K.promise&&t.common.async===!1?(J(t,{code:q.invalid_type,expected:K.promise,received:t.parsedType}),Y):Aw((t.parsedType===K.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};BT.create=(e,t)=>new BT({type:e,typeName:Z.ZodPromise,...Lw(t)});var VT=class extends Rw{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{J(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return Y;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?Y:r.status===`dirty`||t.value===`dirty`?kw(r.value):r});{if(t.value===`aborted`)return Y;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?Y:r.status===`dirty`||t.value===`dirty`?kw(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?Y:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?Y:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Nw(e))return Y;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Nw(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):Y)}bw.assertNever(r)}};VT.create=(e,t,n)=>new VT({schema:e,typeName:Z.ZodEffects,effect:t,...Lw(n)}),VT.createWithPreprocess=(e,t,n)=>new VT({schema:t,effect:{type:`preprocess`,transform:e},typeName:Z.ZodEffects,...Lw(n)});var HT=class extends Rw{_parse(e){return this._getType(e)===K.undefined?Aw(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};HT.create=(e,t)=>new HT({innerType:e,typeName:Z.ZodOptional,...Lw(t)});var UT=class extends Rw{_parse(e){return this._getType(e)===K.null?Aw(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};UT.create=(e,t)=>new UT({innerType:e,typeName:Z.ZodNullable,...Lw(t)});var WT=class extends Rw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===K.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};WT.create=(e,t)=>new WT({innerType:e,typeName:Z.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Lw(t)});var GT=class extends Rw{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Pw(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Cw(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Cw(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};GT.create=(e,t)=>new GT({innerType:e,typeName:Z.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Lw(t)});var KT=class extends Rw{_parse(e){if(this._getType(e)!==K.nan){let t=this._getOrReturnCtx(e);return J(t,{code:q.invalid_type,expected:K.nan,received:t.parsedType}),Y}return{status:`valid`,value:e.data}}};KT.create=e=>new KT({typeName:Z.ZodNaN,...Lw(e)});var qT=class extends Rw{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},JT=class e extends Rw{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Y:e.status===`dirty`?(t.dirty(),kw(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?Y:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:Z.ZodPipeline})}},YT=class extends Rw{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Nw(e)&&(e.value=Object.freeze(e.value)),e);return Pw(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};YT.create=(e,t)=>new YT({innerType:e,typeName:Z.ZodReadonly,...Lw(t)}),wT.lazycreate;var Z;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(Z||={});var XT=lT.create;dT.create,KT.create,fT.create;var ZT=pT.create;mT.create,hT.create,gT.create,_T.create;var QT=vT.create;yT.create,bT.create,xT.create,ST.create;var $T=wT.create;wT.strictCreate,TT.create;var eE=DT.create;kT.create,AT.create,jT.create,MT.create,NT.create,PT.create,FT.create;var tE=IT.create,nE=RT.create;zT.create,BT.create,VT.create,HT.create,UT.create,VT.createWithPreprocess,JT.create;var rE=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,iE=e=>{if(typeof e!=`string`)throw TypeError(`Invalid argument expected string`);let t=e.match(rE);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},aE=e=>e===`*`||e===`x`||e===`X`,oE=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},sE=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],cE=(e,t)=>{if(aE(e)||aE(t))return 0;let[n,r]=sE(oE(e),oE(t));return n>r?1:n{for(let n=0;n{let n=iE(e),r=iE(t),i=n.pop(),a=r.pop(),o=lE(n,r);return o===0?i&&a?lE(i.split(`.`),a.split(`.`)):i||a?i?-1:1:0:o},dE=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function fE(){return Eg()}function pE(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&pE(t);return e}var mE=524288;function hE(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 gE(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!hE(t,n,mE),c=s?dE(t):t,l=s?dE(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(pE(c),pE(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=dE(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=dE(e.state),d=!0,n=!0),s&&n&&hE(c,l,mE)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(o&&e instanceof TypeError){if(a)throw e;console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e)}else a||console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?dE(c):c}:{},...d?{state:Object.isFrozen(l)?dE(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function _E(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 vE(e){if(e instanceof yE)return e;if(e===!0)return new yE(_E(!0))}var yE=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 bE(e){return e.enabled?new yE(e):void 0}function xE(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 SE(e,t){return!e||t.metadata===void 0?!1:(e.metadata=_v(e.metadata,dE(t.metadata)),!0)}var CE=(e,t,n,r,i)=>{let a=vE(i),o=dE(n.messages),s=dE(e.state),c={},l=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},u=()=>{let e=dE(c);return c={},e.messages!==void 0||e.state!==void 0?Gx(e):fx};return t.pipe(tS(async t=>{let i=await gE(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(l(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 u();switch(t.type){case V.TEXT_MESSAGE_START:{let i=await gE(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(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`),u();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=SE(s,t);(!a||c)&&l({messages:o})}return u()}case V.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}'`),u();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`),u();let d=await gE(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 l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,SE(c,t),l({messages:o})),u()}case V.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}'`),u();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`),u();let c=await gE(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 l(c),c.stopPropagation!==!0&&SE(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case V.TOOL_CALL_START:{let i=await gE(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r,subagentRunId:i}=t,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),(SE(a,t)||r)&&l({messages:o}),u()}let s=new Set(o.map(e=>e.id)),c=xE(o,r,e);!s.has(c.id)&&i!=null&&c.subagentRunId===void 0&&(c.subagentRunId=i),c.toolCalls??=[];let d={id:e,type:`function`,function:{name:n,arguments:``}};c.toolCalls.push(d),SE(d,t),l({messages:o})}return u()}case V.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}'`),u();let d=c.toolCalls?.find(e=>e.id===i);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),u();let f=await gE(r,o,s,(r,i,a)=>{let o=d.function.arguments,s=d.function.name,c={};try{c=cS(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return l(f),f.stopPropagation!==!0&&(d.function.arguments+=a,SE(d,t),l({messages:o})),u()}case V.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}'`),u();let c=a.toolCalls?.find(e=>e.id===i);if(!c)return console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),u();let d=await gE(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 l(d),d.stopPropagation!==!0&&SE(c,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),u()}case V.TOOL_CALL_RESULT:{let i=await gE(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:u,subagentRunId:d}=t,f={id:i,toolCallId:a,role:u||`tool`,content:c,...d!=null&&{subagentRunId:d}};SE(f,t);let p=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(p===-1)o.push(f);else{let e=p+1;for(;e{t.onNewMessage?.({message:f,messages:o,state:s,agent:n,input:e})})),l({messages:o})}return u()}case V.STATE_SNAPSHOT:{let i=await gE(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,l({state:s})}return u()}case V.STATE_DELTA:{let i=await gE(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=bb.applyPatch(s,e,!0,!1).newDocument,l({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 u()}case V.MESSAGES_SNAPSHOT:{let i=await gE(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(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=n.some(e=>e.role===`activity`),a=n.some(e=>e.role===`reasoning`),s=e=>e.role===`activity`&&!i||e.role===`reasoning`&&!a;o=o.filter(e=>s(e)||r.has(e.id)).map(e=>s(e)?e:r.get(e.id));let c=new Set(o.map(e=>e.id));for(let e of n)c.has(e.id)||o.push(e);l({messages:o})}return u()}case V.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,d=c?.role===`activity`?c:void 0,f=i.replace??!0,p=await gE(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d,existingMessage:c}));if(l(p),p.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:dE(i.content),...i.subagentRunId!=null&&{subagentRunId:i.subagentRunId}},c,u;a===-1?(o.push(t),c=t,u=t):d?(f&&(o[a]={...d,activityType:i.activityType,content:dE(i.content),subagentRunId:i.subagentRunId},i.subagentRunId??delete o[a].subagentRunId),u=o[a]):f&&(o[a]=t,c=t,u=t),SE(u,i),l({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return u()}case V.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return u();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),u();let d=c,f=await gE(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d}));if(l(f),f.stopPropagation!==!0)try{SE(d,i)&&l({messages:o});let e=dE(d.content??{}),t=bb.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...d,content:dE(t),activityType:i.activityType},l({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 u()}case V.RAW:return l(await gE(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.CUSTOM:return l(await gE(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.RUN_STARTED:{let i=await gE(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),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)}l({messages:o})}}return u()}case V.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:{event:i,outcome:`success`,result:i.result},c=await gE(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return l(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}):[]),u()}case V.RUN_ERROR:return l(await gE(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.STEP_STARTED:return l(await gE(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.STEP_FINISHED:return l(await gE(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be transformed before being applied`);case V.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be transformed before being applied`);case V.THINKING_START:return u();case V.THINKING_END:return u();case V.THINKING_TEXT_MESSAGE_START:return u();case V.THINKING_TEXT_MESSAGE_CONTENT:return u();case V.THINKING_TEXT_MESSAGE_END:return u();case V.REASONING_START:return l(await gE(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.REASONING_MESSAGE_START:{let i=await gE(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,subagentRunId:n}=t,r=o.find(t=>t.id===e),i=r;if(!i){let t={id:e,role:`reasoning`,content:``,...n!=null&&{subagentRunId:n}};o.push(t),i=t}let a=SE(i,t);(!r||a)&&l({messages:o})}return u()}case V.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}'`),u();let d=await gE(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 l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,SE(c,t),l({messages:o})),u()}case V.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}'`),u();let c=await gE(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 l(c),c.stopPropagation!==!0&&SE(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case V.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case V.REASONING_END:return l(await gE(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:d}=t,f=await gE(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(f),f.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=d,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=d,e=!0)}e&&(c.messages=o)}return u()}case V.SUBAGENT_STARTED:return l(await gE(r,o,s,(r,i,a)=>r.onSubagentStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.SUBAGENT_FINISHED:return l(await gE(r,o,s,(r,i,a)=>r.onSubagentFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case V.SUBAGENT_ERROR:return l(await gE(r,o,s,(r,i,a)=>r.onSubagentErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u()}return t.type,u()}),Zx(),r.length>0?nS({}):e=>e)},wE=e=>t=>{let n=vE(e),r=new Set,i=new Set,a=new Set,o={message:new Map,toolCall:new Map,activity:new Map,reasoning:new Map},s=!1,c=!1,l=!1,u=new Map,d=e=>{let t=u.get(e);return t||(t=new Map,u.set(e,t)),t},f=()=>{for(let e of u.values())if(e.size>0)return!0;return!1},p=new Map,m=new Set,h=!1,g=!1,_=!1,v=()=>{r.clear(),i.clear(),a.clear(),o.message.clear(),o.toolCall.clear(),o.activity.clear(),o.reasoning.clear(),u.clear(),p.clear(),m.clear(),h=!1,g=!1,s=!1,c=!1,_=!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 Lv(`Cannot send a message (id '${e.id}') with 'subagentRunId: null'. The field is optional — omit it entirely.`);let n=e.role===`reasoning`?o.reasoning:e.role===`activity`?o.activity:o.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||!o.toolCall.has(n.id))&&o.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 Lv(`Cannot send '${e}': subagentRunId '${t}' does not match the ${r} '${i}' opener's subagent '${n.subagentRunId??`(the parent agent)`}'.`)};return t.pipe(Xx(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),c&&t!==V.RUN_STARTED)return H(()=>new Lv(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(s&&t!==V.RUN_ERROR&&t!==V.RUN_STARTED)return H(()=>new Lv(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!l){if(l=!0,t!==V.RUN_STARTED&&t!==V.RUN_ERROR)return H(()=>new Lv(`First event must be 'RUN_STARTED'`))}else if(t===V.RUN_STARTED){if(_&&!s&&!c)return H(()=>new Lv(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));(s||c)&&v()}if(e.subagentRunId===null)return H(()=>new Lv(`Cannot send '${t}' with 'subagentRunId: null'. The field is optional — omit it entirely.`));if(t===V.SUBAGENT_STARTED||t===V.SUBAGENT_FINISHED||t===V.SUBAGENT_ERROR){let n=t===V.SUBAGENT_STARTED?[`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`]:t===V.SUBAGENT_FINISHED?[`outcome`]:[`code`];for(let r of n)if(e[r]===null)return H(()=>new Lv(`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 H(()=>new Lv(`Cannot send '${t}' with outcome type '${String(r.type)}'. The outcome is either { type: "success" } or { type: "suspended" }.`));if(r&&r.interruptIds===null)return H(()=>new Lv(`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 H(()=>new Lv(`Cannot send '${t}' with a non-string entry in 'outcome.interruptIds'. Interrupt ids are strings.`))}if(t===V.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 H(()=>new Lv(`Cannot send 'RUN_FINISHED' with an interrupt (id '${e.id}') carrying 'subagentRunId: null'. The field is optional — omit it entirely.`))}}switch(t){case V.TEXT_MESSAGE_START:{let n=e.messageId;if(r.has(n))return H(()=>new Lv(`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=o.message.get(n);if(i){let r=b(t,e.subagentRunId,i,`message`,n);if(r)return H(()=>r)}return r.add(n),i||o.message.set(n,{subagentRunId:e.subagentRunId}),Gx(e)}case V.TEXT_MESSAGE_CONTENT:{let n=e.messageId;if(!r.has(n))return H(()=>new Lv(`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,o.message.get(n),`message`,n);return i?H(()=>i):Gx(e)}case V.TEXT_MESSAGE_END:{let n=e.messageId;if(!r.has(n))return H(()=>new Lv(`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,o.message.get(n),`message`,n);return i?H(()=>i):(r.delete(n),Gx(e))}case V.TOOL_CALL_START:{let n=e.toolCallId;if(i.has(n))return H(()=>new Lv(`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,s;if(r!==void 0){let e=o.message.get(r);if(e){if(a!==void 0&&a!==e.subagentRunId)return H(()=>new Lv(`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.`));s=e}}let c=o.toolCall.get(n);if(c){let e=b(t,a,c,`tool call`,n);if(e)return H(()=>e);if(a===void 0&&s&&s.subagentRunId!==c.subagentRunId)return H(()=>new Lv(`Cannot send 'TOOL_CALL_START': tool call '${n}' is owned by '${c.subagentRunId??`(the parent agent)`}' but its parent message '${r}' is owned by '${s.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`))}return i.add(n),c||o.toolCall.set(n,a===void 0?s??{subagentRunId:void 0}:{subagentRunId:a}),Gx(e)}case V.TOOL_CALL_ARGS:{let n=e.toolCallId;if(!i.has(n))return H(()=>new Lv(`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,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):Gx(e)}case V.TOOL_CALL_END:{let n=e.toolCallId;if(!i.has(n))return H(()=>new Lv(`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,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):(i.delete(n),Gx(e))}case V.STEP_STARTED:{let t=e.stepName,n=e.subagentRunId;return d(n).has(t)?H(()=>new Lv(`Step "${t}" is already active for 'STEP_STARTED'${n===void 0?``:` in subagent '${n}'`}`)):(d(n).set(t,!0),Gx(e))}case V.STEP_FINISHED:{let t=e.stepName,n=e.subagentRunId;if(!d(n).has(t)){let e,r=!1;for(let[i,a]of u)if(i!==n&&a.has(t)){e=i,r=!0;break}return H(r?()=>new Lv(`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 Lv(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}return d(n).delete(t),Gx(e)}case V.ACTIVITY_SNAPSHOT:{let t=e.messageId;return(!o.activity.has(t)||e.replace!==!1)&&o.activity.set(t,{subagentRunId:e.subagentRunId}),Gx(e)}case V.TOOL_CALL_RESULT:{let t=e.messageId;return typeof t==`string`&&o.message.set(t,{subagentRunId:e.subagentRunId}),Gx(e)}case V.REASONING_START:case V.REASONING_MESSAGE_START:{let n=e.messageId,r=o.reasoning.get(n);if(r){let i=b(t,e.subagentRunId,r,`reasoning message`,n);if(i)return H(()=>i)}return a.add(n),r||o.reasoning.set(n,{subagentRunId:e.subagentRunId}),Gx(e)}case V.REASONING_MESSAGE_CONTENT:case V.REASONING_MESSAGE_END:case V.REASONING_END:{let n=e.messageId,r=b(t,e.subagentRunId,o.reasoning.get(n),`reasoning message`,n);return r?H(()=>r):(t===V.REASONING_END&&a.delete(n),Gx(e))}case V.REASONING_ENCRYPTED_VALUE:{let n=e.entityId,r=e.subtype,i=r===`tool-call`?o.toolCall.get(n):r===`message`?o.message.get(n)??o.reasoning.get(n):o.reasoning.get(n),a=r===`tool-call`?`tool call`:r===`message`?`message`:`reasoning message`,s=b(t,e.subagentRunId,i,a,n);return s?H(()=>s):Gx(e)}case V.ACTIVITY_DELTA:{let n=e.messageId,r=b(t,e.subagentRunId,o.activity.get(n),`activity`,n);return r?H(()=>r):Gx(e)}case V.SUBAGENT_STARTED:{if(typeof e.subagentRunId!=`string`)return H(()=>new Lv(`Cannot send 'SUBAGENT_STARTED' without a 'subagentRunId'.`));if(typeof e.name!=`string`)return H(()=>new Lv(`Cannot send 'SUBAGENT_STARTED' without a 'name'.`));let t=e.subagentRunId,n=e.parentSubagentRunId;return p.has(t)?H(()=>new Lv(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' is already active. Finish it with 'SUBAGENT_FINISHED' first.`)):m.has(t)?H(()=>new Lv(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' has already finished in this run. Subagent IDs are per-invocation and cannot be reused.`)):n!==void 0&&!p.has(n)&&!m.has(n)?H(()=>new Lv(`Cannot send 'SUBAGENT_STARTED': parentSubagentRunId '${n}' has not been started in this run.`)):(p.set(t,!0),Gx(e))}case V.SUBAGENT_FINISHED:case V.SUBAGENT_ERROR:{if(typeof e.subagentRunId!=`string`)return H(()=>new Lv(`Cannot send '${t}' without a 'subagentRunId'.`));if(t===V.SUBAGENT_ERROR&&typeof e.message!=`string`)return H(()=>new Lv(`Cannot send 'SUBAGENT_ERROR' without a 'message'.`));let n=e.subagentRunId;return p.has(n)?(p.delete(n),m.add(n),Gx(e)):H(()=>new Lv(`Cannot send '${t}': no active subagent found with ID '${n}'. A 'SUBAGENT_STARTED' event must be sent first.`))}case V.MESSAGES_SNAPSHOT:{let t=y(e.messages,!0);if(t)return H(()=>t)}return Gx(e);case V.RUN_STARTED:_=!0;{let t=y((e.input??{}).messages,!1);if(t)return H(()=>t)}return Gx(e);case V.RUN_FINISHED:if(f()){let e=[];for(let[t,n]of u)for(let r of n.keys())e.push(t===void 0?r:`${r} (subagent '${t}')`);let t=e.join(`, `);return H(()=>new Lv(`Cannot send 'RUN_FINISHED' while steps are still active: ${t}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return H(()=>new Lv(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return H(()=>new Lv(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}if(p.size>0){let e=Array.from(p.keys()).join(`, `);return H(()=>new Lv(`Cannot send 'RUN_FINISHED' while subagents are still active: ${e}`))}return s=!0,Gx(e);case V.RUN_ERROR:return c=!0,Gx(e);case V.CUSTOM:return Gx(e);case V.THINKING_TEXT_MESSAGE_START:return h?g?H(()=>new Lv(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.`)):(g=!0,Gx(e)):H(()=>new Lv(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first.`));case V.THINKING_TEXT_MESSAGE_CONTENT:return g?Gx(e):H(()=>new Lv(`Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first.`));case V.THINKING_TEXT_MESSAGE_END:return g?(g=!1,Gx(e)):H(()=>new Lv(`Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first.`));case V.THINKING_START:return h?H(()=>new Lv(`Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.`)):(h=!0,Gx(e));case V.THINKING_END:return h?(h=!1,Gx(e)):H(()=>new Lv(`Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first.`));default:return Gx(e)}}))},TE=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),EE=e=>Qx(()=>Wx(e())).pipe(iS(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return Wx(e.text()).pipe(Xx(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,H(()=>i)}))}let t={type:TE.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new $b(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:TE.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!==`AbortError`)throw e})})):H(()=>Error(`Failed to getReader() from response`))})),DE=(e,t)=>{let n=vE(t),r=new cx,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==TE.HEADERS&&e.type===TE.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)}},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()},lE=e=>{let t=new Xb,n=new Uint8Array;e.subscribe({next:e=>{if(e.type!==oE.HEADERS&&e.type===oE.DATA&&e.data){let t=new Uint8Array(n.length+e.data.length);t.set(n,0),t.set(e.data,n.length),n=t,r()}},error:e=>t.error(e),complete:()=>{if(n.length>0)try{r()}catch{console.warn(`Incomplete or invalid protocol buffer data at stream end`)}t.complete()}});function r(){for(;n.length>=4;){let e=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length{let n=eE(t),r=new Xb,i=new $b,a=!1;return e.subscribe({next:e=>{if(i.next(e),e.type===oE.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`?lE(i).subscribe({next:e=>r.next(e),error:e=>r.error(e),complete:()=>r.complete()}):cE(i,n).subscribe({next:e=>{try{let t=Ey.parse(e);n?.event(`HTTP`,`Event validated:`,t,{type:t.type,valid:!0}),r.next(t)}catch(t){n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),r.error(t)}},error:e=>{if(e?.name===`AbortError`){r.next({type:H.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),r.complete();return}return r.error(e)},complete:()=>r.complete()})}else a||r.error(Error(`No headers event received before data events`))},error:e=>{i.error(e),r.error(e)},complete:()=>{i.complete()}}),r.asObservable()},dE=RT([`TextMessageStart`,`TextMessageContent`,`TextMessageEnd`,`ActionExecutionStart`,`ActionExecutionArgs`,`ActionExecutionEnd`,`ActionExecutionResult`,`AgentStateMessage`,`MetaEvent`,`RunStarted`,`RunFinished`,`RunError`,`NodeStarted`,`NodeFinished`]),fE=RT([`LangGraphInterruptEvent`,`PredictState`,`Exit`]);IT(`type`,[FT({type:LT(dE.enum.TextMessageStart),messageId:MT(),parentMessageId:MT().optional(),role:MT().optional()}),FT({type:LT(dE.enum.TextMessageContent),messageId:MT(),content:MT()}),FT({type:LT(dE.enum.TextMessageEnd),messageId:MT()}),FT({type:LT(dE.enum.ActionExecutionStart),actionExecutionId:MT(),actionName:MT(),parentMessageId:MT().optional()}),FT({type:LT(dE.enum.ActionExecutionArgs),actionExecutionId:MT(),args:MT()}),FT({type:LT(dE.enum.ActionExecutionEnd),actionExecutionId:MT()}),FT({type:LT(dE.enum.ActionExecutionResult),actionName:MT(),actionExecutionId:MT(),result:MT()}),FT({type:LT(dE.enum.AgentStateMessage),threadId:MT(),agentName:MT(),nodeName:MT(),runId:MT(),active:NT(),role:MT(),state:MT(),running:NT()}),FT({type:LT(dE.enum.MetaEvent),name:fE,value:PT()}),FT({type:LT(dE.enum.RunError),message:MT(),code:MT().optional()})]),FT({id:MT(),role:MT(),content:MT(),parentMessageId:MT().optional()}),FT({id:MT(),name:MT(),arguments:PT(),parentMessageId:MT().optional()}),FT({id:MT(),result:PT(),actionExecutionId:MT(),actionName:MT()});var pE=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(` -`)},mE=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(zx(r=>{switch(r.type){case H.TEXT_MESSAGE_START:{let e=r;return[{type:dE.enum.TextMessageStart,messageId:e.messageId,role:e.role}]}case H.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:dE.enum.TextMessageContent,messageId:e.messageId,content:e.delta}]}case H.TEXT_MESSAGE_END:{let e=r;return[{type:dE.enum.TextMessageEnd,messageId:e.messageId}]}case H.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:dE.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case H.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let p=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(Xx(d.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),p=!0):e.tool_argument||(f({...i,[e.state_key]:t}),p=!0)}catch{}}return[{type:dE.enum.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...p?[{type:dE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case H.TOOL_CALL_END:{let e=r;return[{type:dE.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case H.TOOL_CALL_RESULT:{let e=r;return[{type:dE.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||`unknown`}]}case H.RAW:return[];case H.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:dE.enum.MetaEvent,name:e.name,value:e.value}]}case H.STATE_SNAPSHOT:return f(r.snapshot),[{type:dE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case H.STATE_DELTA:{let c=r,l=cb.applyPatch(i,c.delta,!0,!1);return l?(f(l.newDocument),[{type:dE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]):[]}case H.MESSAGES_SNAPSHOT:return c=r.messages,[{type:dE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case H.RUN_STARTED:return[];case H.RUN_FINISHED:return c&&(i.messages=c),Object.keys(i).length===0?[]:[{type:dE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:hE(c)}:{}}),active:!1}];case H.RUN_ERROR:{let e=r;return[{type:dE.enum.RunError,message:e.message,code:e.code}]}case H.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:dE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case H.STEP_FINISHED:return u=[],l=null,[{type:dE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function hE(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=pE(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={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}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:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var gE=e=>t=>{let n=eE(e),r,i,a,o,s=()=>{if(!r||o!==`text`)throw Error(`No text message to close`);let e={type:H.TEXT_MESSAGE_END,messageId:r.messageId};return o=void 0,r=void 0,n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),e},c=()=>{if(!i||o!==`tool`)throw Error(`No tool call to close`);let e={type:H.TOOL_CALL_END,toolCallId:i.toolCallId};return o=void 0,i=void 0,n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),e},l=()=>{if(!a||o!==`reasoning`)throw Error(`No reasoning message to close`);let e={type:H.REASONING_MESSAGE_END,messageId:a.messageId};return o=void 0,a=void 0,n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),e},u=()=>o===`text`?[s()]:o===`tool`?[c()]:o===`reasoning`?[l()]:[];return t.pipe(zx(e=>{switch(e.type){case H.TEXT_MESSAGE_START:case H.TEXT_MESSAGE_CONTENT:case H.TEXT_MESSAGE_END:case H.TOOL_CALL_START:case H.TOOL_CALL_ARGS:case H.TOOL_CALL_END:case H.TOOL_CALL_RESULT:case H.STATE_SNAPSHOT:case H.STATE_DELTA:case H.MESSAGES_SNAPSHOT:case H.CUSTOM:case H.RUN_STARTED:case H.RUN_FINISHED:case H.RUN_ERROR:case H.STEP_STARTED:case H.STEP_FINISHED:case H.THINKING_START:case H.THINKING_END:case H.THINKING_TEXT_MESSAGE_START:case H.THINKING_TEXT_MESSAGE_CONTENT:case H.THINKING_TEXT_MESSAGE_END:case H.REASONING_START:case H.REASONING_MESSAGE_START:case H.REASONING_MESSAGE_CONTENT:case H.REASONING_MESSAGE_END:case H.REASONING_END:return[...u(),e];case H.RAW:case H.ACTIVITY_SNAPSHOT:case H.ACTIVITY_DELTA:case H.REASONING_ENCRYPTED_VALUE:return[e];case H.TEXT_MESSAGE_CHUNK:{let t=e,i=[];if((o!==`text`||t.messageId!==void 0&&t.messageId!==r?.messageId)&&i.push(...u()),o!==`text`){if(t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);r={messageId:t.messageId,name:t.name},o=`text`;let e={type:H.TEXT_MESSAGE_START,messageId:t.messageId,role:t.role||`assistant`,...t.name!==void 0&&{name:t.name}};i.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e={type:H.TEXT_MESSAGE_CONTENT,messageId:r.messageId,delta:t.delta};i.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,e,{messageId:r.messageId})}return i}case H.TOOL_CALL_CHUNK:{let t=e,r=[];if((o!==`tool`||t.toolCallId!==void 0&&t.toolCallId!==i?.toolCallId)&&r.push(...u()),o!==`tool`){if(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`);i={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId},o=`tool`;let e={type:H.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId};r.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0){let e={type:H.TOOL_CALL_ARGS,toolCallId:i.toolCallId,delta:t.delta};r.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,e,{toolCallId:i.toolCallId})}return r}case H.REASONING_MESSAGE_CHUNK:{let t=e,r=[];if((o!==`reasoning`||t.messageId&&t.messageId!==a?.messageId)&&r.push(...u()),o!==`reasoning`){if(t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);a={messageId:t.messageId},o=`reasoning`;let e={type:H.REASONING_MESSAGE_START,messageId:t.messageId};r.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e={type:H.REASONING_MESSAGE_CONTENT,messageId:a.messageId,delta:t.delta};r.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,e,{messageId:a.messageId})}return r}}return e.type,[]}),Gx(()=>{u()}))};function _E(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}var vE=class{runNext(e,t){return t.run(e).pipe(gE(!1))}runNextWithState(e,t){let n=qT(e.messages||[]),r=qT(e.state||{}),i=new $b;return iE(e,i,t,[]).subscribe(e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)}),this.runNext(e,t).pipe(Ux(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:qT(n),state:qT(r)})))}},yE=class extends vE{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function bE(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(``);return{...e,content:n}}return typeof t==`string`?e:{...e,content:``}}var xE=class extends vE{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(bE)};return this.runNext(i,t)}},SE=`THINKING_START`,CE=`THINKING_END`,wE=`THINKING_TEXT_MESSAGE_START`,TE=`THINKING_TEXT_MESSAGE_CONTENT`,EE=`THINKING_TEXT_MESSAGE_END`,DE=class extends vE{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(Lx(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case SE:{this.currentReasoningId=JT();let{title:t,...n}=e;return this.warnAboutTransformation(SE,H.REASONING_START),{...n,type:H.REASONING_START,messageId:this.currentReasoningId}}case wE:return this.currentMessageId=JT(),this.warnAboutTransformation(wE,H.REASONING_MESSAGE_START),{...e,type:H.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`assistant`};case TE:{let{delta:t,...n}=e;return this.warnAboutTransformation(TE,H.REASONING_MESSAGE_CONTENT),{...n,type:H.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??JT(),delta:t}}case EE:{let t=this.currentMessageId??JT();return this.warnAboutTransformation(EE,H.REASONING_MESSAGE_END),{...e,type:H.REASONING_MESSAGE_END,messageId:t}}case CE:{let t=this.currentReasoningId??JT();return this.warnAboutTransformation(CE,H.REASONING_END),{...e,type:H.REASONING_END,messageId:t}}default:return e}}};function OE(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function kE(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function AE(e){let t=OE(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}}:{}}:e}function jE(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>kE(e)?AE(e):e);return{...e,content:n}}var ME=class extends vE{run(e,t){let n={...e,messages:e.messages.map(jE)};return this.runNext(n,t)}},NE=`0.0.58`,PE=class{get maxVersion(){return NE}get debug(){return this._debug}set debug(e){this._debug=$T(e),this._debugLogger=nE(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?nE($T(!0)):void 0:e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??``,this.threadId=n??Eg(),this.messages=qT(r??[]),this.state=qT(i??{}),this._debug=$T(a),this._debugLogger=nE(this._debug),KT(this.maxVersion,`0.0.39`)<=0&&this.middlewares.unshift(new xE),KT(this.maxVersion,`0.0.45`)<=0&&this.middlewares.unshift(new DE),KT(this.maxVersion,`0.0.47`)<=0&&this.middlewares.unshift(new ME)}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 yE(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Eg();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=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new Xb;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await Ix(zb(()=>this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),gE(this.debugLogger),aE(this.debugLogger),e=>e.pipe(qx(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),Hx(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))),Gx(()=>{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}))(Nx(null)));let s=qT(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Fv}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Eg();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new Xb;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await Ix(zb(()=>Vx(()=>this.connect(n)),gE(this.debugLogger),aE(this.debugLogger),e=>e.pipe(qx(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),Hx(e=>(this.isRunning=!1,e instanceof Fv?ex:this.onError(n,e,a))),Gx(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(Nx(null)),{defaultValue:void 0});let s=qT(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}apply(e,t,n){return iE(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(Jx(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=qT(this.messages).filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Eg(),tools:qT(e?.tools??[]),context:qT(e?.context??[]),forwardedProps:qT(e?.forwardedProps??{}),state:qT(this.state),messages:t,...e?.resume===void 0?{}:{resume:qT(e.resume)}}}async onInitialize(e,t){if(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 Pv(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let e of this.pendingInterrupts)if(_E(e))throw new Pv(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await QT(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages&&(this.messages=n.messages,e.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state&&(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 Mx(QT(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(Lx(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 QT(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=qT(this.messages),e.state=qT(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=qT(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=qT(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=qT(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??Eg();let t=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(t):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t)).pipe(gE(this.debugLogger),aE(this.debugLogger),mE(this.threadId,t.runId,this.agentId),e=>e.pipe(Lx(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}},FE=class extends PE{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(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=qT(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return uE(sE(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=qT(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}},IE=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),LE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),RE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),zE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),BE=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M208,104v8a48,48,0,0,1-48,48H136a32,32,0,0,1,32,32v40H104V192a32,32,0,0,1,32-32H112a48,48,0,0,1-48-48v-8a49.28,49.28,0,0,1,8.51-27.3A51.92,51.92,0,0,1,76,32a52,52,0,0,1,43.83,24h32.34A52,52,0,0,1,196,32a51.92,51.92,0,0,1,3.49,44.7A49.28,49.28,0,0,1,208,104Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M208.3,75.68A59.74,59.74,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58,58,0,0,0,208.3,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.76,41.76,0,0,1,200,104Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M206.13,75.92A57.79,57.79,0,0,0,201.2,29a6,6,0,0,0-5.2-3,57.77,57.77,0,0,0-47,24H123A57.77,57.77,0,0,0,76,26a6,6,0,0,0-5.2,3,57.79,57.79,0,0,0-4.93,46.92A55.88,55.88,0,0,0,58,104v8a54.06,54.06,0,0,0,50.45,53.87A37.85,37.85,0,0,0,98,192v10H72a26,26,0,0,1-26-26A38,38,0,0,0,8,138a6,6,0,0,0,0,12,26,26,0,0,1,26,26,38,38,0,0,0,38,38H98v18a6,6,0,0,0,12,0V192a26,26,0,0,1,52,0v40a6,6,0,0,0,12,0V192a37.85,37.85,0,0,0-10.45-26.13A54.06,54.06,0,0,0,214,112v-8A55.88,55.88,0,0,0,206.13,75.92ZM202,112a42,42,0,0,1-42,42H112a42,42,0,0,1-42-42v-8a43.86,43.86,0,0,1,7.3-23.69,6,6,0,0,0,.81-5.76,45.85,45.85,0,0,1,1.43-36.42,45.85,45.85,0,0,1,35.23,21.1A6,6,0,0,0,119.83,62h32.34a6,6,0,0,0,5.06-2.76,45.83,45.83,0,0,1,35.23-21.11,45.85,45.85,0,0,1,1.43,36.42,6,6,0,0,0,.79,5.74A43.78,43.78,0,0,1,202,104Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M203.94,76.16A55.73,55.73,0,0,0,199.46,30,4,4,0,0,0,196,28a55.78,55.78,0,0,0-46,24H122A55.78,55.78,0,0,0,76,28a4,4,0,0,0-3.46,2,55.73,55.73,0,0,0-4.48,46.16A53.78,53.78,0,0,0,60,104v8a52.06,52.06,0,0,0,52,52h1.41A36,36,0,0,0,100,192v12H72a28,28,0,0,1-28-28A36,36,0,0,0,8,140a4,4,0,0,0,0,8,28,28,0,0,1,28,28,36,36,0,0,0,36,36h28v20a4,4,0,0,0,8,0V192a28,28,0,0,1,56,0v40a4,4,0,0,0,8,0V192a36,36,0,0,0-13.41-28H160a52.06,52.06,0,0,0,52-52v-8A53.78,53.78,0,0,0,203.94,76.16ZM204,112a44.05,44.05,0,0,1-44,44H112a44.05,44.05,0,0,1-44-44v-8a45.76,45.76,0,0,1,7.71-24.89,4,4,0,0,0,.53-3.84,47.82,47.82,0,0,1,2.1-39.21,47.8,47.8,0,0,1,38.12,22.1A4,4,0,0,0,119.83,60h32.34a4,4,0,0,0,3.37-1.84,47.8,47.8,0,0,1,38.12-22.1,47.82,47.82,0,0,1,2.1,39.21,4,4,0,0,0,.53,3.83A45.85,45.85,0,0,1,204,104Z`}))]]),VE=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm84,108a83.64,83.64,0,0,1-4.47,27L167,130a19.65,19.65,0,0,0-7.8-2.78l-22.82-3.08A20.14,20.14,0,0,0,117.72,132h-4.07l-2.71-5.6a19.88,19.88,0,0,0-13.8-10.84L94.46,115l4-7h14.39a20,20,0,0,0,9.66-2.49l12.25-6.76a20.57,20.57,0,0,0,3.74-2.68l26.92-24.33A20,20,0,0,0,172,56.49,84,84,0,0,1,212,128ZM140.76,45l6.2,11.1L122.75,78l-10.93,6H96.14A20.05,20.05,0,0,0,78.78,94.06l-4.49,7.85L67.68,84.28l9.91-23.42A83.91,83.91,0,0,1,140.76,45ZM44,128a83.52,83.52,0,0,1,4.4-26.77l7.74,20.65a19.89,19.89,0,0,0,14.52,12.53l19.53,4.2,3,6.1a20.11,20.11,0,0,0,13.55,10.77l-5,11.12a20,20,0,0,0,3.58,21.71l.21.22,18.16,18.7-.89,4.59A84.09,84.09,0,0,1,44,128Zm103.65,81.66a20.11,20.11,0,0,0-5-17.3l-.21-.22-17.72-18.25,11.37-25.52,19,2.56,41.43,25.48A84.2,84.2,0,0,1,147.65,209.66Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M213.09,172.48a96,96,0,0,1-80.41,51.41l3.17-16.44a8,8,0,0,0-2-6.95l-19.74-20.33a8,8,0,0,1-1.44-8.69l13.7-30.74a8,8,0,0,1,8.38-4.67l22.82,3.08a8.11,8.11,0,0,1,3.12,1.11ZM116.71,95,129,88.24a7.46,7.46,0,0,0,1.5-1.07l26.91-24.33A8,8,0,0,0,159,53l-10.5-18.81A96.62,96.62,0,0,0,128,32,95.61,95.61,0,0,0,67.78,53.23L56,81.08A8,8,0,0,0,55.88,87l11.5,30.67a8,8,0,0,0,5.81,5l2.69.58L89.2,100a8,8,0,0,1,6.94-4h16.71A7.9,7.9,0,0,0,116.71,95Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm90,102a89.55,89.55,0,0,1-7.46,35.86l-46.69-28.71a13.94,13.94,0,0,0-5.46-2l-22.82-3.07A14.06,14.06,0,0,0,121.06,138h-9.92a2,2,0,0,1-1.8-1.13l-3.8-7.86a13.94,13.94,0,0,0-9.66-7.59l-10.71-2.3L94.4,103a2,2,0,0,1,1.74-1h16.71a13.9,13.9,0,0,0,6.76-1.75l12.25-6.75a14.73,14.73,0,0,0,2.62-1.88l26.91-24.33a13.93,13.93,0,0,0,2.83-17.21L161,44.25A90.16,90.16,0,0,1,218,128ZM144.6,39.54l9.15,16.39a2,2,0,0,1-.41,2.46L126.43,82.72a1.84,1.84,0,0,1-.37.27l-12.25,6.76a2,2,0,0,1-1,.25H96.14A14,14,0,0,0,84,97L73.18,115.91a2,2,0,0,1-.19-.35L61.5,84.89a2,2,0,0,1,0-1.48L72.68,57.06A89.9,89.9,0,0,1,144.6,39.54ZM38,128A89.52,89.52,0,0,1,49.38,84.23a13.85,13.85,0,0,0,.89,4.87l11.49,30.67a13.94,13.94,0,0,0,10.16,8.78l21.44,4.6a2,2,0,0,1,1.38,1.09l3.8,7.86a14.07,14.07,0,0,0,12.6,7.9h4.56l-8.49,19a14,14,0,0,0,2.51,15.2l.1.11,19.68,20.26a2,2,0,0,1,.46,1.7L127.7,218A90.1,90.1,0,0,1,38,128Zm102.08,89.19,1.67-8.6a14.07,14.07,0,0,0-3.47-12.16l-.1-.11L118.5,176.06a2,2,0,0,1-.33-2.14l13.7-30.73A2,2,0,0,1,134,142l22.82,3.08a2,2,0,0,1,.78.27L205,174.55A90.18,90.18,0,0,1,140.08,217.19Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm92,100a91.44,91.44,0,0,1-8.58,38.76L162.8,136.85a12.07,12.07,0,0,0-4.68-1.67l-22.82-3.07a12,12,0,0,0-12.56,7l-.4.88h-11.2a4,4,0,0,1-3.6-2.26l-3.8-7.86a11.93,11.93,0,0,0-8.28-6.5L82.07,120.5,92.67,102a4,4,0,0,1,3.47-2h16.71a12,12,0,0,0,5.8-1.5l12.24-6.76a11.79,11.79,0,0,0,2.25-1.6L160.05,65.8a12,12,0,0,0,2.43-14.75l-5.86-10.49A92.17,92.17,0,0,1,220,128ZM145.89,37.75l9.6,17.2a4,4,0,0,1-.81,4.92L127.77,84.21a4.41,4.41,0,0,1-.75.53L114.78,91.5a4,4,0,0,1-1.93.5H96.14a12,12,0,0,0-10.41,6l-11.86,20.7a4,4,0,0,1-2.75-2.47L59.63,85.6a4,4,0,0,1,.06-3L71,55.81A91.51,91.51,0,0,1,128,36,92.53,92.53,0,0,1,145.89,37.75ZM36,128A91.52,91.52,0,0,1,56,70.77l-3.71,8.75a12,12,0,0,0-.18,8.88l11.49,30.67a11.93,11.93,0,0,0,8.72,7.52l21.43,4.61a4,4,0,0,1,2.76,2.17l3.8,7.86a12.07,12.07,0,0,0,10.8,6.77h7.64L109,169.85A12,12,0,0,0,111.26,183l19.68,20.26a4,4,0,0,1,1,3.47L129.36,220,128,220A92.1,92.1,0,0,1,36,128Zm101.6,91.5,2.18-11.29a12.08,12.08,0,0,0-3-10.49l-19.68-20.26a4,4,0,0,1-.71-4.35l13.7-30.74a4,4,0,0,1,4.18-2.33l22.82,3.07a4.12,4.12,0,0,1,1.56.56l49.11,30.2A92.12,92.12,0,0,1,137.6,219.5Z`}))]]),HE=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,24V92H44V60ZM44,116H92v80H44Zm72,80V116h96v80Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M104,104V208H40a8,8,0,0,1-8-8V104Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V96H40V56ZM40,112H96v88H40Zm176,88H112V112H216v88Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H216V96H40ZM216,200H112V112H216v88Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V98H38V56A2,2,0,0,1,40,54ZM38,200V110H98v92H40A2,2,0,0,1,38,200Zm178,2H110V110H218v90A2,2,0,0,1,216,202Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V96H40V56ZM40,112H96v88H40Zm176,88H112V112H216v88Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4v44H36V56A4,4,0,0,1,40,52ZM36,200V108h64v96H40A4,4,0,0,1,36,200Zm180,4H108V108H220v92A4,4,0,0,1,216,204Z`}))]]),UE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),WE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),GE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),KE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),qE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),JE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),YE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),XE=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),ZE=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:IE}));ZE.displayName=`ArrowUpRightIcon`;var QE=ZE,$E=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:LE}));$E.displayName=`ChatCircleTextIcon`;var eD=$E,tD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:RE}));tD.displayName=`ClockCounterClockwiseIcon`;var nD=tD,rD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:zE}));rD.displayName=`DotsThreeIcon`;var iD=rD,aD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:BE}));aD.displayName=`GithubLogoIcon`;var oD=aD,sD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:VE}));sD.displayName=`GlobeHemisphereWestIcon`;var cD=sD,lD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:HE}));lD.displayName=`LayoutIcon`;var uD=lD,dD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:UE}));dD.displayName=`MagnifyingGlassIcon`;var fD=dD,pD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:WE}));pD.displayName=`MoonIcon`;var mD=pD,hD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:GE}));hD.displayName=`PaperPlaneTiltIcon`;var gD=hD,_D=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:KE}));_D.displayName=`PencilSimpleIcon`;var vD=_D,yD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:qE}));yD.displayName=`PlusIcon`;var bD=yD,xD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:JE}));xD.displayName=`SignOutIcon`;var SD=xD,CD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:YE}));CD.displayName=`SunIcon`;var wD=CD,TD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:XE}));TD.displayName=`TrashIcon`;var ED=TD,DD=M.createContext(void 0),OD=e=>{let t=M.useContext(DD);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},kD=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,N.jsx)(DD.Provider,{value:e,children:t})),AD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},jD=new class{#e=AD;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 MD(e){setTimeout(e,0)}var ND=typeof window>`u`||`Deno`in globalThis;function PD(){}function FD(e,t){return typeof e==`function`?e(t):e}function ID(e){return typeof e==`number`&&e>=0&&e!==1/0}function LD(e,t){return Math.max(e+(t||0)-Date.now(),0)}function RD(e,t){return typeof e==`function`?e(t):e}function zD(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==VD(o,t.options))return!1}else if(!UD(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 BD(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(HD(t.options.mutationKey)!==HD(a))return!1}else if(!UD(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function VD(e,t){return(t?.queryKeyHashFn||HD)(e)}function HD(e){return JSON.stringify(e,(e,t)=>JD(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function UD(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n500)return t;let r=qD(e)&&qD(t);if(!r&&!(JD(e)&&JD(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{jD.setTimeout(t,e)})}function ZD(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:GD(e,t)}function QD(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function $D(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var eO=Symbol();function tO(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===eO?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function nO(e,t){return typeof e==`function`?e(...t):!!e}function rO(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 iO=()=>ND,aO=()=>iO(),oO=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(){}},sO=new class extends oO{#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`}},cO=MD;function lO(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=cO,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 uO=lO(),dO=new class extends oO{#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 fO(e){return Math.min(1e3*2**e,3e4)}function pO(e){return(e??`online`)!==`online`||dO.isOnline()}var mO=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function hO(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(PD);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new mO(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>sO.isFocused()&&(e.networkMode===`always`||dO.isOnline())&&e.canRun(),p=()=>pO(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(aO()?0:3),a=e.retryDelay??fO,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&nf()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var gO=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ID(this.gcTime)&&(this.#e=jD.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(aO()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(jD.clearTimeout(this.#e),this.#e=void 0)}};function _O(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=>{rO(e,()=>t.signal,()=>n=!0)},u=tO(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?$D:QD;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?yO:vO,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:vO(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 vO(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 yO(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function bO(e,t){return t?vO(e,t)!=null:!1}function xO(e,t){return!t||!e.getPreviousPageParam?!1:yO(e,t)!=null}var SO=class extends gO{#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=TO(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=TO(this.options);e.data!==void 0&&(this.setState(wO(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ZD(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(PD).catch(PD):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=>RD(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===eO||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>RD(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:!LD(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=tO(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`?_O(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=hO({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof mO&&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 mO){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,...CO(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...wO(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),uO.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function CO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pO(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function wO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function TO(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 EO=class extends oO{#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),OO(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kO(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kO(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 RD(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&&!KD(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&AO(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||RD(this.options.enabled,this.#t)!==RD(t.enabled,this.#t)||RD(this.options.staleTime,this.#t)!==RD(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||RD(this.options.enabled,this.#t)!==RD(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 KD(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(PD)),t}#h(e){return!aO()&&RD(this.options.enabled,this.#t)!==!1&&ID(e)}#g(){this.#b();let e=RD(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=LD(this.#r.dataUpdatedAt,e)+1;this.#u=jD.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=jD.setInterval(()=>{(this.options.refetchIntervalInBackground||sO.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(jD.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(jD.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&&OO(e,t),o=i&&AO(e,n,t,r);(a||o)&&(l={...l,...CO(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=ZD(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=ZD(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:jO(e,t),refetch:this.refetch,isEnabled:RD(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),KD(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)})})();uO.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 DO(e,t){return RD(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||RD(t.retryOnMount,e)!==!1)}function OO(e,t){return DO(e,t)||e.state.data!==void 0&&kO(e,t,t.refetchOnMount)}function kO(e,t,n){if(RD(t.enabled,e)!==!1&&RD(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&jO(e,t)}return!1}function AO(e,t,n,r){return(e!==t||RD(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&jO(e,n)}function jO(e,t){return RD(t.enabled,e)!==!1&&e.isStaleByTime(RD(t.staleTime,e))}var MO=class extends EO{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:bO(t,n.data),hasPreviousPage:xO(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},NO=class extends gO{#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||PO(),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=hO({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),uO.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function PO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var FO=class extends oO{#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 NO({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=IO(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=IO(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=IO(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=IO(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){uO.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=>BD(t,e))}findAll(e={}){return this.getAll().filter(t=>BD(e,t))}notify(e){uO.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return uO.batch(()=>Promise.all(e.map(e=>e.continue().catch(PD))))}};function IO(e){return e.options.scope?.id}var LO=class extends oO{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??VD(r,t),a=this.get(i);return a||(a=new SO({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){uO.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=>zD(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>zD(e,t)):t}notify(e){uO.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){uO.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){uO.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},RO=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new LO,this.#t=e.mutationCache||new FO,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=sO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=dO.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(RD(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=FD(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return uO.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;uO.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return uO.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=uO.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(PD).catch(PD)}invalidateQueries(e,t={}){return uO.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=uO.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(PD)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(PD)}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(RD(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(RD(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(PD).catch(PD)}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(PD).catch(PD)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return dO.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(HD(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{UD(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(HD(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{UD(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||=VD(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===eO&&(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()}},zO=M.createContext(!1),BO=()=>M.useContext(zO);zO.Provider;function VO(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var HO=M.createContext(VO()),UO=()=>M.useContext(HO),WO=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?nO(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},GO=e=>{M.useEffect(()=>{e.clearReset()},[e])},KO=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||nO(n,[e.error,r])),qO=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))}},JO=(e,t)=>e?.suspense&&t.isPending,YO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function XO(e,t,n){let r=BO(),i=UO(),a=OD(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,qO(o),WO(o,i,s),GO(i);let[l]=M.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(M.useSyncExternalStore(M.useCallback(e=>{let t=d?l.subscribe(uO.batchCalls(e)):PD;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),M.useEffect(()=>{l.setOptions(o)},[o,l]),JO(o,u))throw YO(o,l,i);if(KO({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function ZO(e,t){return XO(e,MO,t)}function QO(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var $O=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ek=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tk={};function nk(e,t){return((t||tk).jsx?ek:$O).test(e)}var rk=/[ \t\n\f\r]/g;function ik(e){return typeof e==`object`?e.type===`text`&&ak(e.value):ak(e)}function ak(e){return e.replace(rk,``)===``}var ok=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ok.prototype.normal={},ok.prototype.property={},ok.prototype.space=void 0;function sk(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ok(n,r,t)}function ck(e){return e.toLowerCase()}var lk=class{constructor(e,t){this.attribute=t,this.property=e}};lk.prototype.attribute=``,lk.prototype.booleanish=!1,lk.prototype.boolean=!1,lk.prototype.commaOrSpaceSeparated=!1,lk.prototype.commaSeparated=!1,lk.prototype.defined=!1,lk.prototype.mustUseProperty=!1,lk.prototype.number=!1,lk.prototype.overloadedBoolean=!1,lk.prototype.property=``,lk.prototype.spaceSeparated=!1,lk.prototype.space=void 0;var uk=c({boolean:()=>fk,booleanish:()=>pk,commaOrSpaceSeparated:()=>_k,commaSeparated:()=>gk,number:()=>Q,overloadedBoolean:()=>mk,spaceSeparated:()=>hk}),dk=0,fk=vk(),pk=vk(),mk=vk(),Q=vk(),hk=vk(),gk=vk(),_k=vk();function vk(){return 2**++dk}var yk=Object.keys(uk),bk=class extends lk{constructor(e,t,n,r){let i=-1;if(super(e,t),xk(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&Pk.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Nk,Lk);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Nk.test(e)){let n=e.replace(Mk,Ik);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=bk}return new i(r,t)}function Ik(e){return`-`+e.toLowerCase()}function Lk(e){return e.charAt(1).toUpperCase()}var Rk=sk([Ck,Ek,Ok,kk,Ak],`html`),zk=sk([Ck,Dk,Ok,kk,Ak],`svg`);function Bk(e){return e.join(` `).trim()}var Vk=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` -`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Hk=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Vk());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Uk=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Wk=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Hk()),r=Uk();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Gk=qk(`end`),Kk=qk(`start`);function qk(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Jk(e){let t=Kk(e),n=Gk(e);if(t&&n)return{start:t,end:n}}function Yk(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Zk(e.position):`start`in e||`end`in e?Zk(e):`line`in e||`column`in e?Xk(e):``}function Xk(e){return Qk(e&&e.line)+`:`+Qk(e&&e.column)}function Zk(e){return Xk(e&&e.start)+`-`+Xk(e&&e.end)}function Qk(e){return e&&typeof e==`number`?e:1}var $k=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Yk(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};$k.prototype.file=``,$k.prototype.name=``,$k.prototype.reason=``,$k.prototype.message=``,$k.prototype.stack=``,$k.prototype.column=void 0,$k.prototype.line=void 0,$k.prototype.ancestors=void 0,$k.prototype.cause=void 0,$k.prototype.fatal=void 0,$k.prototype.place=void 0,$k.prototype.ruleId=void 0,$k.prototype.source=void 0;var eA=r(Wk(),1),tA={}.hasOwnProperty,nA=new Map,rA=/[A-Z]/g,iA=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),aA=new Set([`td`,`th`]),oA=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function sA(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=vA(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=_A(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?zk:Rk,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=cA(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function cA(e,t,n){if(t.type===`element`)return lA(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return uA(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return fA(e,t,n);if(t.type===`mdxjsEsm`)return dA(e,t);if(t.type===`root`)return pA(e,t,n);if(t.type===`text`)return mA(e,t)}function lA(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=zk,e.schema=i),e.ancestors.push(t);let a=wA(e,t.tagName,!1),o=yA(e,t),s=xA(e,t);return iA.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!ik(e)})),hA(e,o,a,t),gA(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function uA(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}TA(e,t.position)}function dA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);TA(e,t.position)}function fA(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=zk,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:wA(e,t.name,!0),o=bA(e,t),s=xA(e,t);return hA(e,o,a,t),gA(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function pA(e,t,n){let r={};return gA(r,xA(e,t)),e.create(t,e.Fragment,r,n)}function mA(e,t){return t.value}function hA(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function gA(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function _A(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function vA(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Kk(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function yA(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&tA.call(t.properties,i)){let a=SA(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&aA.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function bA(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else TA(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else TA(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function xA(e,t){let n=[],r=-1,i=e.passKeys?new Map:nA;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(LA(e,e.length,0,t),e):t}var zA={}.hasOwnProperty;function BA(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function WA(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var GA=nj(/[A-Za-z]/),KA=nj(/[\dA-Za-z]/),qA=nj(/[#-'*+\--9=?A-Z^-~]/);function JA(e){return e!==null&&(e<32||e===127)}var YA=nj(/\d/),XA=nj(/[\dA-Fa-f]/),ZA=nj(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function QA(e){return e!==null&&(e<0||e===32)}function $A(e){return e===-2||e===-1||e===32}var ej=nj(/\p{P}|\p{S}/u),tj=nj(/\s/);function nj(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function rj(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ij(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $A(r)?(e.enter(n),s(r)):t(r)}function s(r){return $A(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function uj(e,t,n){return ij(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function dj(e){if(e===null||QA(e)||tj(e))return 1;if(ej(e))return 2}function fj(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};gj(d,-c),gj(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=RA(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=RA(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=RA(l,fj(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=RA(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=RA(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,LA(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&$A(t)?ij(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(kj,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$A(t)?ij(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$A(t)?ij(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Mj(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Nj={name:`codeIndented`,tokenize:Fj},Pj={partial:!0,tokenize:Ij};function Fj(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),ij(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(Pj,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Ij(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):ij(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var Lj={name:`codeText`,previous:zj,resolve:Rj,tokenize:Bj};function Rj(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Hj(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Hj(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Hj(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Xj(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||JA(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||QA(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$A(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Qj(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ij(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function $j(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$A(i)?ij(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var eM={name:`definition`,tokenize:nM},tM={partial:!0,tokenize:rM};function nM(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Zj.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=WA(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return QA(t)?$j(e,l)(t):l(t)}function l(t){return Xj(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(tM,d,d)(t)}function d(t){return $A(t)?ij(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function rM(e,t,n){return r;function r(t){return QA(t)?$j(e,i)(t):n(t)}function i(t){return Qj(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $A(t)?ij(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var iM={name:`hardBreakEscape`,tokenize:aM};function aM(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var oM={name:`headingAtx`,resolve:sM,tokenize:cM};function sM(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},LA(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function cM(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||QA(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):$A(n)?ij(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||QA(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var lM=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),uM=[`pre`,`script`,`style`,`textarea`],dM={concrete:!0,name:`htmlFlow`,resolveTo:mM,tokenize:hM},fM={partial:!0,tokenize:_M},pM={partial:!0,tokenize:gM};function mM(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function hM(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ae):GA(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):GA(a)?(e.consume(a),i=4,r.interrupt?t:ae):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ae):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return GA(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||QA(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&uM.includes(l)?(i=1,r.interrupt?t(s):O(s)):lM.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||KA(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $A(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||GA(t)?(e.consume(t),b):$A(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||KA(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$A(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$A(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||QA(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$A(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):$A(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ne):t===60&&i===1?(e.consume(t),re):t===62&&i===4?(e.consume(t),oe):t===63&&i===3?(e.consume(t),ae):t===93&&i===5?(e.consume(t),ie):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(fM,se,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(pM,ee,se)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function ne(t){return t===45?(e.consume(t),ae):O(t)}function re(t){return t===47?(e.consume(t),o=``,A):O(t)}function A(t){if(t===62){let n=o.toLowerCase();return uM.includes(n)?(e.consume(t),oe):O(t)}return GA(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),A):O(t)}function ie(t){return t===93?(e.consume(t),ae):O(t)}function ae(t){return t===62?(e.consume(t),oe):t===45&&i===2?(e.consume(t),ae):O(t)}function oe(t){return t===null||$(t)?(e.exit(`htmlFlowData`),se(t)):(e.consume(t),oe)}function se(n){return e.exit(`htmlFlow`),t(n)}}function gM(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function _M(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(yj,t,n)}}var vM={name:`htmlText`,tokenize:yM};function yM(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):GA(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):GA(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,re(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ne(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,re(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ne(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ne(t):$(t)?(o=v,re(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,re(t)):(e.consume(t),y)}function b(e){return e===62?ne(e):y(e)}function x(t){return GA(t)?(e.consume(t),S):n(t)}function S(t){return t===45||KA(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,re(t)):$A(t)?(e.consume(t),C):ne(t)}function w(t){return t===45||KA(t)?(e.consume(t),w):t===47||t===62||QA(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ne):t===58||t===95||GA(t)?(e.consume(t),E):$(t)?(o=T,re(t)):$A(t)?(e.consume(t),T):ne(t)}function E(t){return t===45||t===46||t===58||t===95||KA(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,re(t)):$A(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,re(t)):$A(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):$(t)?(o=k,re(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||QA(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||QA(e)?T(e):n(e)}function ne(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function re(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return $A(t)?ij(e,ie,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ie(t)}function ie(t){return e.enter(`htmlTextData`),o(t)}}var bM={name:`labelEnd`,resolveAll:wM,resolveTo:TM,tokenize:EM},xM={tokenize:DM},SM={tokenize:OM},CM={tokenize:kM};function wM(e){let t=-1,n=[];for(;++t=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$A(t)?ij(e,s,`whitespace`)(t):s(t))}}var RM={continuation:{tokenize:HM},exit:WM,name:`list`,tokenize:VM},zM={partial:!0,tokenize:GM},BM={partial:!0,tokenize:UM};function VM(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:YA(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(IM,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return YA(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(yj,r.interrupt?n:u,e.attempt(zM,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $A(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function HM(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(yj,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ij(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$A(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(BM,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ij(e,e.attempt(RM,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function UM(e,t,n){let r=this;return ij(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function WM(e){e.exit(this.containerState.type)}function GM(e,t,n){let r=this;return ij(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$A(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var KM={name:`setextUnderline`,resolveTo:qM,tokenize:JM};function qM(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function JM(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$A(t)?ij(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var YM={tokenize:XM};function XM(e){let t=this,n=e.attempt(yj,r,e.attempt(this.parser.constructs.flowInitial,i,ij(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Gj,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ZM={resolveAll:tN()},QM=eN(`string`),$M=eN(`text`);function eN(e){return{resolveAll:tN(e===`text`?nN:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++idN,contentInitial:()=>aN,disable:()=>fN,document:()=>iN,flow:()=>sN,flowInitial:()=>oN,insideSpan:()=>uN,string:()=>cN,text:()=>lN}),iN={42:RM,43:RM,45:RM,48:RM,49:RM,50:RM,51:RM,52:RM,53:RM,54:RM,55:RM,56:RM,57:RM,62:xj},aN={91:eM},oN={[-2]:Nj,[-1]:Nj,32:Nj},sN={35:oM,42:IM,45:[KM,IM],60:dM,61:KM,95:IM,96:Aj,126:Aj},cN={38:Dj,92:Tj},lN={[-5]:PM,[-4]:PM,[-3]:PM,33:AM,38:Dj,42:pj,60:[_j,vM],91:MM,92:[iM,Tj],93:bM,95:pj,96:Lj},uN={null:[pj,ZM]},dN={null:[42,95]},fN={null:[]};function pN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=RA(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=fj(a,l.events,l),l.events):[]}function f(e,t){return hN(p(e),t)}function p(e){return mN(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function hN(e,t){let n=-1,r=[],i;for(;++n{let t=new cx,n=new Uint8Array;e.subscribe({next:e=>{if(e.type!==TE.HEADERS&&e.type===TE.DATA&&e.data){let t=new Uint8Array(n.length+e.data.length);t.set(n,0),t.set(e.data,n.length),n=t,r()}},error:e=>t.error(e),complete:()=>{if(n.length>0)try{r()}catch{console.warn(`Incomplete or invalid protocol buffer data at stream end`)}t.complete()}});function r(){for(;n.length>=4;){let e=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length{let n=vE(t),r=new cx,i=new dx,a=!1;return e.subscribe({next:e=>{if(i.next(e),e.type===TE.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`?OE(i).subscribe({next:e=>r.next(e),error:e=>r.error(e),complete:()=>r.complete()}):DE(i,n).subscribe({next:e=>{try{let t=Ry.parse(e);n?.event(`HTTP`,`Event validated:`,t,{type:t.type,valid:!0}),r.next(t)}catch(t){n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),r.error(t)}},error:e=>{if(e?.name===`AbortError`){r.next({type:V.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),r.complete();return}return r.error(e)},complete:()=>r.complete()})}else a||r.error(Error(`No headers event received before data events`))},error:e=>{i.error(e),r.error(e)},complete:()=>{i.complete()}}),r.asObservable()},AE=nE([`TextMessageStart`,`TextMessageContent`,`TextMessageEnd`,`ActionExecutionStart`,`ActionExecutionArgs`,`ActionExecutionEnd`,`ActionExecutionResult`,`AgentStateMessage`,`MetaEvent`,`RunStarted`,`RunFinished`,`RunError`,`NodeStarted`,`NodeFinished`]),jE=nE([`LangGraphInterruptEvent`,`PredictState`,`Exit`]);eE(`type`,[$T({type:tE(AE.enum.TextMessageStart),messageId:XT(),parentMessageId:XT().optional(),role:XT().optional()}),$T({type:tE(AE.enum.TextMessageContent),messageId:XT(),content:XT()}),$T({type:tE(AE.enum.TextMessageEnd),messageId:XT()}),$T({type:tE(AE.enum.ActionExecutionStart),actionExecutionId:XT(),actionName:XT(),parentMessageId:XT().optional()}),$T({type:tE(AE.enum.ActionExecutionArgs),actionExecutionId:XT(),args:XT()}),$T({type:tE(AE.enum.ActionExecutionEnd),actionExecutionId:XT()}),$T({type:tE(AE.enum.ActionExecutionResult),actionName:XT(),actionExecutionId:XT(),result:XT()}),$T({type:tE(AE.enum.AgentStateMessage),threadId:XT(),agentName:XT(),nodeName:XT(),runId:XT(),active:ZT(),role:XT(),state:XT(),running:ZT()}),$T({type:tE(AE.enum.MetaEvent),name:jE,value:QT()}),$T({type:tE(AE.enum.RunError),message:XT(),code:XT().optional()})]),$T({id:XT(),role:XT(),content:XT(),parentMessageId:XT().optional()}),$T({id:XT(),name:XT(),arguments:QT(),parentMessageId:XT().optional()}),$T({id:XT(),result:QT(),actionExecutionId:XT(),actionName:XT()});var ME=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(` +`)},NE=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(Xx(r=>{switch(r.type){case V.TEXT_MESSAGE_START:{let e=r;return[{type:AE.enum.TextMessageStart,messageId:e.messageId,role:e.role}]}case V.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:AE.enum.TextMessageContent,messageId:e.messageId,content:e.delta}]}case V.TEXT_MESSAGE_END:{let e=r;return[{type:AE.enum.TextMessageEnd,messageId:e.messageId}]}case V.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:AE.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case V.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let p=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(cS(d.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),p=!0):e.tool_argument||(f({...i,[e.state_key]:t}),p=!0)}catch{}}return[{type:AE.enum.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...p?[{type:AE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case V.TOOL_CALL_END:{let e=r;return[{type:AE.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case V.TOOL_CALL_RESULT:{let e=r;return[{type:AE.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||`unknown`}]}case V.RAW:return[];case V.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:AE.enum.MetaEvent,name:e.name,value:e.value}]}case V.STATE_SNAPSHOT:return f(r.snapshot),[{type:AE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case V.STATE_DELTA:{let c=r,l=bb.applyPatch(i,c.delta,!0,!1);return l?(f(l.newDocument),[{type:AE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]):[]}case V.MESSAGES_SNAPSHOT:return c=r.messages,[{type:AE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case V.RUN_STARTED:return[];case V.RUN_FINISHED:return c&&(i.messages=c),Object.keys(i).length===0?[]:[{type:AE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:PE(c)}:{}}),active:!1}];case V.RUN_ERROR:{let e=r;return[{type:AE.enum.RunError,message:e.message,code:e.code}]}case V.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:AE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case V.STEP_FINISHED:return u=[],l=null,[{type:AE.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function PE(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=ME(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={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}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:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var FE=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,IE=e=>e===`tool`?`toolCallId`:`messageId`,LE=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},RE=e=>t=>{let n=vE(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:V.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:V.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:V.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{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&&FE(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 ${IE(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(Xx(e=>{switch(e.type){case V.TEXT_MESSAGE_START:case V.TEXT_MESSAGE_CONTENT:case V.TEXT_MESSAGE_END:case V.TOOL_CALL_START:case V.TOOL_CALL_ARGS:case V.TOOL_CALL_END:case V.TOOL_CALL_RESULT:case V.STATE_SNAPSHOT:case V.STATE_DELTA:case V.CUSTOM:case V.STEP_STARTED:case V.STEP_FINISHED:case V.THINKING_START:case V.THINKING_END:case V.THINKING_TEXT_MESSAGE_START:case V.THINKING_TEXT_MESSAGE_CONTENT:case V.THINKING_TEXT_MESSAGE_END:case V.REASONING_START:case V.REASONING_MESSAGE_START:case V.REASONING_MESSAGE_CONTENT:case V.REASONING_MESSAGE_END:case V.REASONING_END:return[...i(e.subagentRunId??void 0),e];case V.RUN_STARTED:case V.RUN_FINISHED:case V.RUN_ERROR:case V.MESSAGES_SNAPSHOT:return[...a(),e];case V.RAW:case V.ACTIVITY_SNAPSHOT:case V.ACTIVITY_DELTA:case V.REASONING_ENCRYPTED_VALUE:case V.SUBAGENT_STARTED:return[e];case V.SUBAGENT_FINISHED:case V.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case V.TEXT_MESSAGE_CHUNK:{let t=e,a=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),o=r.get(a),c=[],l;if(o?.kind===`text`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,name:t.name,subagentRunId:t.subagentRunId},r.set(a,{kind:`text`,fields:l});let e=LE({type:V.TEXT_MESSAGE_START,messageId:t.messageId,role:t.role||`assistant`,...t.name!==void 0&&{name:t.name},...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=LE({type:V.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case V.TOOL_CALL_CHUNK:{let t=e,a=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),o=r.get(a),c=[],l;if(o?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===o.fields.toolCallId))l=o.fields;else{if(c.push(...i(a)),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`);l={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`tool`,fields:l});let e=LE({type:V.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=LE({type:V.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:l.toolCallId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case V.REASONING_MESSAGE_CHUNK:{let t=e,a=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),o=r.get(a),c=[],l;if(o?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`reasoning`,fields:l});let e=LE({type:V.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=LE({type:V.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:V.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}}return e.type,[]}),rS(()=>{a()}))};function zE(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}var BE=class{runNext(e,t){return t.run(e).pipe(RE(!1))}runNextWithState(e,t){let n=dE(e.messages||[]),r=dE(e.state||{}),i=new dx;return CE(e,i,t,[]).subscribe(e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)}),this.runNext(e,t).pipe(tS(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:dE(n),state:dE(r)})))}},VE=class extends BE{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function HE(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(``);return{...e,content:n}}return typeof t==`string`?e:{...e,content:``}}var UE=class extends BE{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(HE)};return this.runNext(i,t)}},WE=`THINKING_START`,GE=`THINKING_END`,KE=`THINKING_TEXT_MESSAGE_START`,qE=`THINKING_TEXT_MESSAGE_CONTENT`,JE=`THINKING_TEXT_MESSAGE_END`,YE=class extends BE{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(Jx(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case WE:{this.currentReasoningId=fE();let{title:t,...n}=e;return this.warnAboutTransformation(WE,V.REASONING_START),{...n,type:V.REASONING_START,messageId:this.currentReasoningId}}case KE:return this.currentMessageId=fE(),this.warnAboutTransformation(KE,V.REASONING_MESSAGE_START),{...e,type:V.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`assistant`};case qE:{let{delta:t,...n}=e;return this.warnAboutTransformation(qE,V.REASONING_MESSAGE_CONTENT),{...n,type:V.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??fE(),delta:t}}case JE:{let t=this.currentMessageId??fE();return this.warnAboutTransformation(JE,V.REASONING_MESSAGE_END),{...e,type:V.REASONING_MESSAGE_END,messageId:t}}case GE:{let t=this.currentReasoningId??fE();return this.warnAboutTransformation(GE,V.REASONING_END),{...e,type:V.REASONING_END,messageId:t}}default:return e}}};function XE(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function ZE(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function QE(e){let t=XE(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}}:{}}:e}function $E(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>ZE(e)?QE(e):e);return{...e,content:n}}var eD=class extends BE{run(e,t){let n={...e,messages:e.messages.map($E)};return this.runNext(n,t)}},tD=`SUBAGENT_STARTED`,nD=`SUBAGENT_FINISHED`,rD=`SUBAGENT_ERROR`;function iD(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function aD(e){return e.map(e=>iD(e))}var oD=class extends BE{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=>iD(e))};return this.runNext(n,t).pipe(oS(e=>{let t=e.type;(t===tD||t===nD||t===rD)&&this.warnDroppedLifecycleEvent(t)}),$x(e=>{let t=e.type;return t!==tD&&t!==nD&&t!==rD}),Jx(e=>{let t=iD(e);if(t.type===V.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:aD(e.messages)}}if(t.type===V.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>iD(e))}}}if(t.type===V.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:aD(e.input.messages)}}}return t}))}},sD=`0.0.59`,cD=class{get maxVersion(){return sD}get debug(){return this._debug}set debug(e){this._debug=_E(e),this._debugLogger=bE(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?bE(_E(!0)):void 0:e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??``,this.threadId=n??Eg(),this.messages=dE(r??[]),this.state=dE(i??{}),this._debug=_E(a),this._debugLogger=bE(this._debug),uE(this.maxVersion,`0.0.39`)<=0&&this.middlewares.unshift(new UE),uE(this.maxVersion,`0.0.45`)<=0&&this.middlewares.unshift(new YE),uE(this.maxVersion,`0.0.47`)<=0&&this.middlewares.unshift(new eD),uE(this.maxVersion,`0.0.57`)<=0&&this.middlewares.unshift(new oD)}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 VE(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Eg();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=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new cx;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await qx(Zb(()=>this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),RE(this.debugLogger),wE(this.debugLogger),e=>e.pipe(aS(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),eS(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))),rS(()=>{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}))(Gx(null)));let s=dE(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Rv}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Eg();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new cx;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await qx(Zb(()=>Qx(()=>this.connect(n)),RE(this.debugLogger),wE(this.debugLogger),e=>e.pipe(aS(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),eS(e=>(this.isRunning=!1,e instanceof Rv?fx:this.onError(n,e,a))),rS(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(Gx(null)),{defaultValue:void 0});let s=dE(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}apply(e,t,n){return CE(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(oS(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=dE(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||Eg(),tools:dE(e?.tools??[]),context:dE(e?.context??[]),forwardedProps:dE(e?.forwardedProps??{}),state:dE(this.state),messages:n,...e?.resume===void 0?{}:{resume:dE(e.resume)}}}async onInitialize(e,t){if(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 Lv(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let e of this.pendingInterrupts)if(zE(e))throw new Lv(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await gE(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,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state&&(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 Wx(gE(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(Jx(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 gE(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=dE(this.messages),e.state=dE(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=dE(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=dE(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=dE(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??Eg();let t=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(t):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t)).pipe(RE(this.debugLogger),wE(this.debugLogger),NE(this.threadId,t.runId,this.agentId),e=>e.pipe(Jx(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function lD(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 uD=class extends cD{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(lD(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=dE(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return kE(EE(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=dE(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}},dD=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),fD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),pD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),mD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),hD=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M212.62,75.17A63.7,63.7,0,0,0,206.39,26,12,12,0,0,0,196,20a63.71,63.71,0,0,0-50,24H126A63.71,63.71,0,0,0,76,20a12,12,0,0,0-10.39,6,63.7,63.7,0,0,0-6.23,49.17A61.5,61.5,0,0,0,52,104v8a60.1,60.1,0,0,0,45.76,58.28A43.66,43.66,0,0,0,92,192v4H76a20,20,0,0,1-20-20,44.05,44.05,0,0,0-44-44,12,12,0,0,0,0,24,20,20,0,0,1,20,20,44.05,44.05,0,0,0,44,44H92v12a12,12,0,0,0,24,0V192a20,20,0,0,1,40,0v40a12,12,0,0,0,24,0V192a43.66,43.66,0,0,0-5.76-21.72A60.1,60.1,0,0,0,220,112v-8A61.5,61.5,0,0,0,212.62,75.17ZM196,112a36,36,0,0,1-36,36H112a36,36,0,0,1-36-36v-8a37.87,37.87,0,0,1,6.13-20.12,11.65,11.65,0,0,0,1.58-11.49,39.9,39.9,0,0,1-.4-27.72,39.87,39.87,0,0,1,26.41,17.8A12,12,0,0,0,119.82,68h32.35a12,12,0,0,0,10.11-5.53,39.84,39.84,0,0,1,26.41-17.8,39.9,39.9,0,0,1-.4,27.72,12,12,0,0,0,1.61,11.53A37.85,37.85,0,0,1,196,104Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M208,104v8a48,48,0,0,1-48,48H136a32,32,0,0,1,32,32v40H104V192a32,32,0,0,1,32-32H112a48,48,0,0,1-48-48v-8a49.28,49.28,0,0,1,8.51-27.3A51.92,51.92,0,0,1,76,32a52,52,0,0,1,43.83,24h32.34A52,52,0,0,1,196,32a51.92,51.92,0,0,1,3.49,44.7A49.28,49.28,0,0,1,208,104Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M208.3,75.68A59.74,59.74,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58,58,0,0,0,208.3,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.76,41.76,0,0,1,200,104Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,104v8a56.06,56.06,0,0,1-48.44,55.47A39.8,39.8,0,0,1,176,192v40a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V216H72a40,40,0,0,1-40-40A24,24,0,0,0,8,152a8,8,0,0,1,0-16,40,40,0,0,1,40,40,24,24,0,0,0,24,24H96v-8a39.8,39.8,0,0,1,8.44-24.53A56.06,56.06,0,0,1,56,112v-8a58.14,58.14,0,0,1,7.69-28.32A59.78,59.78,0,0,1,69.07,28,8,8,0,0,1,76,24a59.75,59.75,0,0,1,48,24h24a59.75,59.75,0,0,1,48-24,8,8,0,0,1,6.93,4,59.74,59.74,0,0,1,5.37,47.68A58,58,0,0,1,216,104Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M206.13,75.92A57.79,57.79,0,0,0,201.2,29a6,6,0,0,0-5.2-3,57.77,57.77,0,0,0-47,24H123A57.77,57.77,0,0,0,76,26a6,6,0,0,0-5.2,3,57.79,57.79,0,0,0-4.93,46.92A55.88,55.88,0,0,0,58,104v8a54.06,54.06,0,0,0,50.45,53.87A37.85,37.85,0,0,0,98,192v10H72a26,26,0,0,1-26-26A38,38,0,0,0,8,138a6,6,0,0,0,0,12,26,26,0,0,1,26,26,38,38,0,0,0,38,38H98v18a6,6,0,0,0,12,0V192a26,26,0,0,1,52,0v40a6,6,0,0,0,12,0V192a37.85,37.85,0,0,0-10.45-26.13A54.06,54.06,0,0,0,214,112v-8A55.88,55.88,0,0,0,206.13,75.92ZM202,112a42,42,0,0,1-42,42H112a42,42,0,0,1-42-42v-8a43.86,43.86,0,0,1,7.3-23.69,6,6,0,0,0,.81-5.76,45.85,45.85,0,0,1,1.43-36.42,45.85,45.85,0,0,1,35.23,21.1A6,6,0,0,0,119.83,62h32.34a6,6,0,0,0,5.06-2.76,45.83,45.83,0,0,1,35.23-21.11,45.85,45.85,0,0,1,1.43,36.42,6,6,0,0,0,.79,5.74A43.78,43.78,0,0,1,202,104Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M208.31,75.68A59.78,59.78,0,0,0,202.93,28,8,8,0,0,0,196,24a59.75,59.75,0,0,0-48,24H124A59.75,59.75,0,0,0,76,24a8,8,0,0,0-6.93,4,59.78,59.78,0,0,0-5.38,47.68A58.14,58.14,0,0,0,56,104v8a56.06,56.06,0,0,0,48.44,55.47A39.8,39.8,0,0,0,96,192v8H72a24,24,0,0,1-24-24A40,40,0,0,0,8,136a8,8,0,0,0,0,16,24,24,0,0,1,24,24,40,40,0,0,0,40,40H96v16a8,8,0,0,0,16,0V192a24,24,0,0,1,48,0v40a8,8,0,0,0,16,0V192a39.8,39.8,0,0,0-8.44-24.53A56.06,56.06,0,0,0,216,112v-8A58.14,58.14,0,0,0,208.31,75.68ZM200,112a40,40,0,0,1-40,40H112a40,40,0,0,1-40-40v-8a41.74,41.74,0,0,1,6.9-22.48A8,8,0,0,0,80,73.83a43.81,43.81,0,0,1,.79-33.58,43.88,43.88,0,0,1,32.32,20.06A8,8,0,0,0,119.82,64h32.35a8,8,0,0,0,6.74-3.69,43.87,43.87,0,0,1,32.32-20.06A43.81,43.81,0,0,1,192,73.83a8.09,8.09,0,0,0,1,7.65A41.72,41.72,0,0,1,200,104Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M203.94,76.16A55.73,55.73,0,0,0,199.46,30,4,4,0,0,0,196,28a55.78,55.78,0,0,0-46,24H122A55.78,55.78,0,0,0,76,28a4,4,0,0,0-3.46,2,55.73,55.73,0,0,0-4.48,46.16A53.78,53.78,0,0,0,60,104v8a52.06,52.06,0,0,0,52,52h1.41A36,36,0,0,0,100,192v12H72a28,28,0,0,1-28-28A36,36,0,0,0,8,140a4,4,0,0,0,0,8,28,28,0,0,1,28,28,36,36,0,0,0,36,36h28v20a4,4,0,0,0,8,0V192a28,28,0,0,1,56,0v40a4,4,0,0,0,8,0V192a36,36,0,0,0-13.41-28H160a52.06,52.06,0,0,0,52-52v-8A53.78,53.78,0,0,0,203.94,76.16ZM204,112a44.05,44.05,0,0,1-44,44H112a44.05,44.05,0,0,1-44-44v-8a45.76,45.76,0,0,1,7.71-24.89,4,4,0,0,0,.53-3.84,47.82,47.82,0,0,1,2.1-39.21,47.8,47.8,0,0,1,38.12,22.1A4,4,0,0,0,119.83,60h32.34a4,4,0,0,0,3.37-1.84,47.8,47.8,0,0,1,38.12-22.1,47.82,47.82,0,0,1,2.1,39.21,4,4,0,0,0,.53,3.83A45.85,45.85,0,0,1,204,104Z`}))]]),gD=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm84,108a83.64,83.64,0,0,1-4.47,27L167,130a19.65,19.65,0,0,0-7.8-2.78l-22.82-3.08A20.14,20.14,0,0,0,117.72,132h-4.07l-2.71-5.6a19.88,19.88,0,0,0-13.8-10.84L94.46,115l4-7h14.39a20,20,0,0,0,9.66-2.49l12.25-6.76a20.57,20.57,0,0,0,3.74-2.68l26.92-24.33A20,20,0,0,0,172,56.49,84,84,0,0,1,212,128ZM140.76,45l6.2,11.1L122.75,78l-10.93,6H96.14A20.05,20.05,0,0,0,78.78,94.06l-4.49,7.85L67.68,84.28l9.91-23.42A83.91,83.91,0,0,1,140.76,45ZM44,128a83.52,83.52,0,0,1,4.4-26.77l7.74,20.65a19.89,19.89,0,0,0,14.52,12.53l19.53,4.2,3,6.1a20.11,20.11,0,0,0,13.55,10.77l-5,11.12a20,20,0,0,0,3.58,21.71l.21.22,18.16,18.7-.89,4.59A84.09,84.09,0,0,1,44,128Zm103.65,81.66a20.11,20.11,0,0,0-5-17.3l-.21-.22-17.72-18.25,11.37-25.52,19,2.56,41.43,25.48A84.2,84.2,0,0,1,147.65,209.66Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M213.09,172.48a96,96,0,0,1-80.41,51.41l3.17-16.44a8,8,0,0,0-2-6.95l-19.74-20.33a8,8,0,0,1-1.44-8.69l13.7-30.74a8,8,0,0,1,8.38-4.67l22.82,3.08a8.11,8.11,0,0,1,3.12,1.11ZM116.71,95,129,88.24a7.46,7.46,0,0,0,1.5-1.07l26.91-24.33A8,8,0,0,0,159,53l-10.5-18.81A96.62,96.62,0,0,0,128,32,95.61,95.61,0,0,0,67.78,53.23L56,81.08A8,8,0,0,0,55.88,87l11.5,30.67a8,8,0,0,0,5.81,5l2.69.58L89.2,100a8,8,0,0,1,6.94-4h16.71A7.9,7.9,0,0,0,116.71,95Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm90,102a89.55,89.55,0,0,1-7.46,35.86l-46.69-28.71a13.94,13.94,0,0,0-5.46-2l-22.82-3.07A14.06,14.06,0,0,0,121.06,138h-9.92a2,2,0,0,1-1.8-1.13l-3.8-7.86a13.94,13.94,0,0,0-9.66-7.59l-10.71-2.3L94.4,103a2,2,0,0,1,1.74-1h16.71a13.9,13.9,0,0,0,6.76-1.75l12.25-6.75a14.73,14.73,0,0,0,2.62-1.88l26.91-24.33a13.93,13.93,0,0,0,2.83-17.21L161,44.25A90.16,90.16,0,0,1,218,128ZM144.6,39.54l9.15,16.39a2,2,0,0,1-.41,2.46L126.43,82.72a1.84,1.84,0,0,1-.37.27l-12.25,6.76a2,2,0,0,1-1,.25H96.14A14,14,0,0,0,84,97L73.18,115.91a2,2,0,0,1-.19-.35L61.5,84.89a2,2,0,0,1,0-1.48L72.68,57.06A89.9,89.9,0,0,1,144.6,39.54ZM38,128A89.52,89.52,0,0,1,49.38,84.23a13.85,13.85,0,0,0,.89,4.87l11.49,30.67a13.94,13.94,0,0,0,10.16,8.78l21.44,4.6a2,2,0,0,1,1.38,1.09l3.8,7.86a14.07,14.07,0,0,0,12.6,7.9h4.56l-8.49,19a14,14,0,0,0,2.51,15.2l.1.11,19.68,20.26a2,2,0,0,1,.46,1.7L127.7,218A90.1,90.1,0,0,1,38,128Zm102.08,89.19,1.67-8.6a14.07,14.07,0,0,0-3.47-12.16l-.1-.11L118.5,176.06a2,2,0,0,1-.33-2.14l13.7-30.73A2,2,0,0,1,134,142l22.82,3.08a2,2,0,0,1,.78.27L205,174.55A90.18,90.18,0,0,1,140.08,217.19Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.62,87.62,0,0,1-6.4,32.94l-44.7-27.49a15.92,15.92,0,0,0-6.24-2.23l-22.82-3.08a16.11,16.11,0,0,0-16,7.86h-8.72l-3.8-7.86a15.91,15.91,0,0,0-11-8.67l-8-1.73L96.14,104h16.71a16.06,16.06,0,0,0,7.73-2l12.25-6.76a16.62,16.62,0,0,0,3-2.14l26.91-24.34A15.93,15.93,0,0,0,166,49.1l-.36-.65A88.11,88.11,0,0,1,216,128ZM143.31,41.34,152,56.9,125.09,81.24,112.85,88H96.14a16,16,0,0,0-13.88,8l-8.73,15.23L63.38,84.19,74.32,58.32a87.87,87.87,0,0,1,69-17ZM40,128a87.53,87.53,0,0,1,8.54-37.8l11.34,30.27a16,16,0,0,0,11.62,10l21.43,4.61L96.74,143a16.09,16.09,0,0,0,14.4,9h1.48l-7.23,16.23a16,16,0,0,0,2.86,17.37l.14.14L128,205.94l-1.94,10A88.11,88.11,0,0,1,40,128Zm102.58,86.78,1.13-5.81a16.09,16.09,0,0,0-4-13.9,1.85,1.85,0,0,1-.14-.14L120,174.74,133.7,144l22.82,3.08,45.72,28.12A88.18,88.18,0,0,1,142.58,214.78Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm92,100a91.44,91.44,0,0,1-8.58,38.76L162.8,136.85a12.07,12.07,0,0,0-4.68-1.67l-22.82-3.07a12,12,0,0,0-12.56,7l-.4.88h-11.2a4,4,0,0,1-3.6-2.26l-3.8-7.86a11.93,11.93,0,0,0-8.28-6.5L82.07,120.5,92.67,102a4,4,0,0,1,3.47-2h16.71a12,12,0,0,0,5.8-1.5l12.24-6.76a11.79,11.79,0,0,0,2.25-1.6L160.05,65.8a12,12,0,0,0,2.43-14.75l-5.86-10.49A92.17,92.17,0,0,1,220,128ZM145.89,37.75l9.6,17.2a4,4,0,0,1-.81,4.92L127.77,84.21a4.41,4.41,0,0,1-.75.53L114.78,91.5a4,4,0,0,1-1.93.5H96.14a12,12,0,0,0-10.41,6l-11.86,20.7a4,4,0,0,1-2.75-2.47L59.63,85.6a4,4,0,0,1,.06-3L71,55.81A91.51,91.51,0,0,1,128,36,92.53,92.53,0,0,1,145.89,37.75ZM36,128A91.52,91.52,0,0,1,56,70.77l-3.71,8.75a12,12,0,0,0-.18,8.88l11.49,30.67a11.93,11.93,0,0,0,8.72,7.52l21.43,4.61a4,4,0,0,1,2.76,2.17l3.8,7.86a12.07,12.07,0,0,0,10.8,6.77h7.64L109,169.85A12,12,0,0,0,111.26,183l19.68,20.26a4,4,0,0,1,1,3.47L129.36,220,128,220A92.1,92.1,0,0,1,36,128Zm101.6,91.5,2.18-11.29a12.08,12.08,0,0,0-3-10.49l-19.68-20.26a4,4,0,0,1-.71-4.35l13.7-30.74a4,4,0,0,1,4.18-2.33l22.82,3.07a4.12,4.12,0,0,1,1.56.56l49.11,30.2A92.12,92.12,0,0,1,137.6,219.5Z`}))]]),_D=new Map([[`bold`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,24V92H44V60ZM44,116H92v80H44Zm72,80V116h96v80Z`}))],[`duotone`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M104,104V208H40a8,8,0,0,1-8-8V104Z`,opacity:`0.2`}),M.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V96H40V56ZM40,112H96v88H40Zm176,88H112V112H216v88Z`}))],[`fill`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H216V96H40ZM216,200H112V112H216v88Z`}))],[`light`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V98H38V56A2,2,0,0,1,40,54ZM38,200V110H98v92H40A2,2,0,0,1,38,200Zm178,2H110V110H218v90A2,2,0,0,1,216,202Z`}))],[`regular`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V96H40V56ZM40,112H96v88H40Zm176,88H112V112H216v88Z`}))],[`thin`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4v44H36V56A4,4,0,0,1,40,52ZM36,200V108h64v96H40A4,4,0,0,1,36,200Zm180,4H108V108H220v92A4,4,0,0,1,216,204Z`}))]]),vD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),yD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),bD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),xD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),SD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),CD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),wD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),TD=new Map([[`bold`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`,M.createElement(M.Fragment,null,M.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`}))]]),ED=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:dD}));ED.displayName=`ArrowUpRightIcon`;var DD=ED,OD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:fD}));OD.displayName=`ChatCircleTextIcon`;var kD=OD,AD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:pD}));AD.displayName=`ClockCounterClockwiseIcon`;var jD=AD,MD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:mD}));MD.displayName=`DotsThreeIcon`;var ND=MD,PD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:hD}));PD.displayName=`GithubLogoIcon`;var FD=PD,ID=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:gD}));ID.displayName=`GlobeHemisphereWestIcon`;var LD=ID,RD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:_D}));RD.displayName=`LayoutIcon`;var zD=RD,BD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:vD}));BD.displayName=`MagnifyingGlassIcon`;var VD=BD,HD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:yD}));HD.displayName=`MoonIcon`;var UD=HD,WD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:bD}));WD.displayName=`PaperPlaneTiltIcon`;var GD=WD,KD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:xD}));KD.displayName=`PencilSimpleIcon`;var qD=KD,JD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:SD}));JD.displayName=`PlusIcon`;var YD=JD,XD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:CD}));XD.displayName=`SignOutIcon`;var ZD=XD,QD=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:wD}));QD.displayName=`SunIcon`;var $D=QD,eO=M.forwardRef((e,t)=>M.createElement(Ne,{ref:t,...e,weights:TD}));eO.displayName=`TrashIcon`;var tO=eO,nO=M.createContext(void 0),rO=e=>{let t=M.useContext(nO);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},iO=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,N.jsx)(nO.Provider,{value:e,children:t})),aO={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},oO=new class{#e=aO;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 sO(e){setTimeout(e,0)}var cO=typeof window>`u`||`Deno`in globalThis;function lO(){}function uO(e,t){return typeof e==`function`?e(t):e}function dO(e){return typeof e==`number`&&e>=0&&e!==1/0}function fO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pO(e,t){return typeof e==`function`?e(t):e}function mO(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==gO(o,t.options))return!1}else if(!vO(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 hO(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(_O(t.options.mutationKey)!==_O(a))return!1}else if(!vO(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function gO(e,t){return(t?.queryKeyHashFn||_O)(e)}function _O(e){return JSON.stringify(e,(e,t)=>CO(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function vO(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n500)return t;let r=SO(e)&&SO(t);if(!r&&!(CO(e)&&CO(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{oO.setTimeout(t,e)})}function EO(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:bO(e,t)}function DO(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function OO(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var kO=Symbol();function AO(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===kO?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function jO(e,t){return typeof e==`function`?e(...t):!!e}function MO(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 NO=()=>cO,PO=()=>NO(),FO=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(){}},IO=new class extends FO{#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`}},LO=sO;function RO(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=LO,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 zO=RO(),BO=new class extends FO{#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 VO(e){return Math.min(1e3*2**e,3e4)}function HO(e){return(e??`online`)!==`online`||BO.isOnline()}var UO=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function WO(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(lO);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new UO(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>IO.isFocused()&&(e.networkMode===`always`||BO.isOnline())&&e.canRun(),p=()=>HO(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(PO()?0:3),a=e.retryDelay??VO,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&nf()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var GO=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),dO(this.gcTime)&&(this.#e=oO.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(PO()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(oO.clearTimeout(this.#e),this.#e=void 0)}};function KO(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=>{MO(e,()=>t.signal,()=>n=!0)},u=AO(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?OO:DO;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?JO:qO,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:qO(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 qO(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 JO(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function YO(e,t){return t?qO(e,t)!=null:!1}function XO(e,t){return!t||!e.getPreviousPageParam?!1:JO(e,t)!=null}var ZO=class extends GO{#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=ek(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=ek(this.options);e.data!==void 0&&(this.setState($O(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=EO(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(lO).catch(lO):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=>pO(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kO||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>pO(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:!fO(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=AO(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`?KO(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=WO({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof UO&&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 UO){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,...QO(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...$O(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),zO.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function QO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:HO(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function $O(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ek(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 tk=class extends FO{#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),rk(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ik(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ik(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 pO(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&&!xO(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&ak(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||pO(this.options.enabled,this.#t)!==pO(t.enabled,this.#t)||pO(this.options.staleTime,this.#t)!==pO(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||pO(this.options.enabled,this.#t)!==pO(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 xO(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(lO)),t}#h(e){return!PO()&&pO(this.options.enabled,this.#t)!==!1&&dO(e)}#g(){this.#b();let e=pO(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=fO(this.#r.dataUpdatedAt,e)+1;this.#u=oO.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=oO.setInterval(()=>{(this.options.refetchIntervalInBackground||IO.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(oO.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(oO.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&&rk(e,t),o=i&&ak(e,n,t,r);(a||o)&&(l={...l,...QO(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=EO(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=EO(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:ok(e,t),refetch:this.refetch,isEnabled:pO(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),xO(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)})})();zO.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 nk(e,t){return pO(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||pO(t.retryOnMount,e)!==!1)}function rk(e,t){return nk(e,t)||e.state.data!==void 0&&ik(e,t,t.refetchOnMount)}function ik(e,t,n){if(pO(t.enabled,e)!==!1&&pO(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ok(e,t)}return!1}function ak(e,t,n,r){return(e!==t||pO(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ok(e,n)}function ok(e,t){return pO(t.enabled,e)!==!1&&e.isStaleByTime(pO(t.staleTime,e))}var sk=class extends tk{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:YO(t,n.data),hasPreviousPage:XO(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},ck=class extends GO{#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||lk(),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=WO({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),zO.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function lk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var uk=class extends FO{#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 ck({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=dk(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=dk(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=dk(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=dk(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){zO.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=>hO(t,e))}findAll(e={}){return this.getAll().filter(t=>hO(e,t))}notify(e){zO.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return zO.batch(()=>Promise.all(e.map(e=>e.continue().catch(lO))))}};function dk(e){return e.options.scope?.id}var fk=class extends FO{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??gO(r,t),a=this.get(i);return a||(a=new ZO({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){zO.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=>mO(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>mO(e,t)):t}notify(e){zO.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){zO.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){zO.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},pk=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new fk,this.#t=e.mutationCache||new uk,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=IO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=BO.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(pO(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=uO(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return zO.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;zO.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return zO.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=zO.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(lO).catch(lO)}invalidateQueries(e,t={}){return zO.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=zO.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(lO)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(lO)}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(pO(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(pO(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(lO).catch(lO)}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(lO).catch(lO)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return BO.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(_O(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{vO(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(_O(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{vO(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||=gO(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===kO&&(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()}},mk=M.createContext(!1),hk=()=>M.useContext(mk);mk.Provider;function gk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var _k=M.createContext(gk()),vk=()=>M.useContext(_k),yk=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?jO(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},bk=e=>{M.useEffect(()=>{e.clearReset()},[e])},xk=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||jO(n,[e.error,r])),Sk=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))}},Ck=(e,t)=>e?.suspense&&t.isPending,wk=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Tk(e,t,n){let r=hk(),i=vk(),a=rO(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Sk(o),yk(o,i,s),bk(i);let[l]=M.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(M.useSyncExternalStore(M.useCallback(e=>{let t=d?l.subscribe(zO.batchCalls(e)):lO;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),M.useEffect(()=>{l.setOptions(o)},[o,l]),Ck(o,u))throw wk(o,l,i);if(xk({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Ek(e,t){return Tk(e,sk,t)}function Dk(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ok=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ak={};function jk(e,t){return((t||Ak).jsx?kk:Ok).test(e)}var Mk=/[ \t\n\f\r]/g;function Nk(e){return typeof e==`object`?e.type===`text`&&Pk(e.value):Pk(e)}function Pk(e){return e.replace(Mk,``)===``}var Fk=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Fk.prototype.normal={},Fk.prototype.property={},Fk.prototype.space=void 0;function Ik(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Fk(n,r,t)}function Lk(e){return e.toLowerCase()}var Rk=class{constructor(e,t){this.attribute=t,this.property=e}};Rk.prototype.attribute=``,Rk.prototype.booleanish=!1,Rk.prototype.boolean=!1,Rk.prototype.commaOrSpaceSeparated=!1,Rk.prototype.commaSeparated=!1,Rk.prototype.defined=!1,Rk.prototype.mustUseProperty=!1,Rk.prototype.number=!1,Rk.prototype.overloadedBoolean=!1,Rk.prototype.property=``,Rk.prototype.spaceSeparated=!1,Rk.prototype.space=void 0;var zk=c({boolean:()=>Vk,booleanish:()=>Hk,commaOrSpaceSeparated:()=>Kk,commaSeparated:()=>Gk,number:()=>Q,overloadedBoolean:()=>Uk,spaceSeparated:()=>Wk}),Bk=0,Vk=qk(),Hk=qk(),Uk=qk(),Q=qk(),Wk=qk(),Gk=qk(),Kk=qk();function qk(){return 2**++Bk}var Jk=Object.keys(zk),Yk=class extends Rk{constructor(e,t,n,r){let i=-1;if(super(e,t),Xk(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&lA.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(cA,fA);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!cA.test(e)){let n=e.replace(sA,dA);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Yk}return new i(r,t)}function dA(e){return`-`+e.toLowerCase()}function fA(e){return e.charAt(1).toUpperCase()}var pA=Ik([Qk,tA,rA,iA,aA],`html`),mA=Ik([Qk,nA,rA,iA,aA],`svg`);function hA(e){return e.join(` `).trim()}var gA=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` +`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),_A=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(gA());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),vA=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),yA=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(_A()),r=vA();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),bA=SA(`end`),xA=SA(`start`);function SA(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function CA(e){let t=xA(e),n=bA(e);if(t&&n)return{start:t,end:n}}function wA(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?EA(e.position):`start`in e||`end`in e?EA(e):`line`in e||`column`in e?TA(e):``}function TA(e){return DA(e&&e.line)+`:`+DA(e&&e.column)}function EA(e){return TA(e&&e.start)+`-`+TA(e&&e.end)}function DA(e){return e&&typeof e==`number`?e:1}var OA=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=wA(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};OA.prototype.file=``,OA.prototype.name=``,OA.prototype.reason=``,OA.prototype.message=``,OA.prototype.stack=``,OA.prototype.column=void 0,OA.prototype.line=void 0,OA.prototype.ancestors=void 0,OA.prototype.cause=void 0,OA.prototype.fatal=void 0,OA.prototype.place=void 0,OA.prototype.ruleId=void 0,OA.prototype.source=void 0;var kA=r(yA(),1),AA={}.hasOwnProperty,jA=new Map,MA=/[A-Z]/g,NA=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),PA=new Set([`td`,`th`]),FA=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function IA(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=qA(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=KA(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?mA:pA,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=LA(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function LA(e,t,n){if(t.type===`element`)return RA(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return zA(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return VA(e,t,n);if(t.type===`mdxjsEsm`)return BA(e,t);if(t.type===`root`)return HA(e,t,n);if(t.type===`text`)return UA(e,t)}function RA(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=mA,e.schema=i),e.ancestors.push(t);let a=$A(e,t.tagName,!1),o=JA(e,t),s=XA(e,t);return NA.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Nk(e)})),WA(e,o,a,t),GA(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function zA(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ej(e,t.position)}function BA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ej(e,t.position)}function VA(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=mA,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:$A(e,t.name,!0),o=YA(e,t),s=XA(e,t);return WA(e,o,a,t),GA(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function HA(e,t,n){let r={};return GA(r,XA(e,t)),e.create(t,e.Fragment,r,n)}function UA(e,t){return t.value}function WA(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function GA(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function KA(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function qA(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=xA(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function JA(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&AA.call(t.properties,i)){let a=ZA(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&PA.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function YA(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ej(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else ej(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function XA(e,t){let n=[],r=-1,i=e.passKeys?new Map:jA;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(fj(e,e.length,0,t),e):t}var mj={}.hasOwnProperty;function hj(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function yj(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var bj=jj(/[A-Za-z]/),xj=jj(/[\dA-Za-z]/),Sj=jj(/[#-'*+\--9=?A-Z^-~]/);function Cj(e){return e!==null&&(e<32||e===127)}var wj=jj(/\d/),Tj=jj(/[\dA-Fa-f]/),Ej=jj(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function Dj(e){return e!==null&&(e<0||e===32)}function Oj(e){return e===-2||e===-1||e===32}var kj=jj(/\p{P}|\p{S}/u),Aj=jj(/\s/);function jj(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Mj(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Nj(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Oj(r)?(e.enter(n),s(r)):t(r)}function s(r){return Oj(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function zj(e,t,n){return Nj(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Bj(e){if(e===null||Dj(e)||Aj(e))return 1;if(kj(e))return 2}function Vj(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Gj(d,-c),Gj(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=pj(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=pj(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=pj(l,Vj(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=pj(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=pj(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,fj(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&Oj(t)?Nj(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(iM,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Oj(t)?Nj(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Oj(t)?Nj(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function sM(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var cM={name:`codeIndented`,tokenize:uM},lM={partial:!0,tokenize:dM};function uM(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Nj(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(lM,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function dM(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Nj(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var fM={name:`codeText`,previous:mM,resolve:pM,tokenize:hM};function pM(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&_M(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),_M(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),_M(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function TM(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Cj(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Dj(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Oj(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function DM(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Nj(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function OM(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Oj(i)?Nj(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var kM={name:`definition`,tokenize:jM},AM={partial:!0,tokenize:MM};function jM(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return EM.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=yj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Dj(t)?OM(e,l)(t):l(t)}function l(t){return TM(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(AM,d,d)(t)}function d(t){return Oj(t)?Nj(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function MM(e,t,n){return r;function r(t){return Dj(t)?OM(e,i)(t):n(t)}function i(t){return DM(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Oj(t)?Nj(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var NM={name:`hardBreakEscape`,tokenize:PM};function PM(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var FM={name:`headingAtx`,resolve:IM,tokenize:LM};function IM(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},fj(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function LM(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Dj(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):Oj(n)?Nj(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Dj(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var RM=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),zM=[`pre`,`script`,`style`,`textarea`],BM={concrete:!0,name:`htmlFlow`,resolveTo:UM,tokenize:WM},VM={partial:!0,tokenize:KM},HM={partial:!0,tokenize:GM};function UM(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function WM(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ae):bj(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):bj(a)?(e.consume(a),i=4,r.interrupt?t:ae):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ae):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return bj(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Dj(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&zM.includes(l)?(i=1,r.interrupt?t(s):O(s)):RM.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||xj(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Oj(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||bj(t)?(e.consume(t),b):Oj(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||xj(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Oj(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Oj(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Dj(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Oj(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):Oj(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ne):t===60&&i===1?(e.consume(t),re):t===62&&i===4?(e.consume(t),oe):t===63&&i===3?(e.consume(t),ae):t===93&&i===5?(e.consume(t),ie):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(VM,se,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(HM,ee,se)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function ne(t){return t===45?(e.consume(t),ae):O(t)}function re(t){return t===47?(e.consume(t),o=``,A):O(t)}function A(t){if(t===62){let n=o.toLowerCase();return zM.includes(n)?(e.consume(t),oe):O(t)}return bj(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),A):O(t)}function ie(t){return t===93?(e.consume(t),ae):O(t)}function ae(t){return t===62?(e.consume(t),oe):t===45&&i===2?(e.consume(t),ae):O(t)}function oe(t){return t===null||$(t)?(e.exit(`htmlFlowData`),se(t)):(e.consume(t),oe)}function se(n){return e.exit(`htmlFlow`),t(n)}}function GM(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function KM(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Jj,t,n)}}var qM={name:`htmlText`,tokenize:JM};function JM(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):bj(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):bj(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,re(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ne(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,re(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ne(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ne(t):$(t)?(o=v,re(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,re(t)):(e.consume(t),y)}function b(e){return e===62?ne(e):y(e)}function x(t){return bj(t)?(e.consume(t),S):n(t)}function S(t){return t===45||xj(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,re(t)):Oj(t)?(e.consume(t),C):ne(t)}function w(t){return t===45||xj(t)?(e.consume(t),w):t===47||t===62||Dj(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ne):t===58||t===95||bj(t)?(e.consume(t),E):$(t)?(o=T,re(t)):Oj(t)?(e.consume(t),T):ne(t)}function E(t){return t===45||t===46||t===58||t===95||xj(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,re(t)):Oj(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,re(t)):Oj(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):$(t)?(o=k,re(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Dj(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||Dj(e)?T(e):n(e)}function ne(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function re(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return Oj(t)?Nj(e,ie,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ie(t)}function ie(t){return e.enter(`htmlTextData`),o(t)}}var YM={name:`labelEnd`,resolveAll:$M,resolveTo:eN,tokenize:tN},XM={tokenize:nN},ZM={tokenize:rN},QM={tokenize:iN};function $M(e){let t=-1,n=[];for(;++t=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Oj(t)?Nj(e,s,`whitespace`)(t):s(t))}}var pN={continuation:{tokenize:_N},exit:yN,name:`list`,tokenize:gN},mN={partial:!0,tokenize:bN},hN={partial:!0,tokenize:vN};function gN(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:wj(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(dN,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return wj(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Jj,r.interrupt?n:u,e.attempt(mN,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Oj(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function _N(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Jj,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Nj(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Oj(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hN,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Nj(e,e.attempt(pN,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function vN(e,t,n){let r=this;return Nj(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function yN(e){e.exit(this.containerState.type)}function bN(e,t,n){let r=this;return Nj(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Oj(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var xN={name:`setextUnderline`,resolveTo:SN,tokenize:CN};function SN(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function CN(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Oj(t)?Nj(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var wN={tokenize:TN};function TN(e){let t=this,n=e.attempt(Jj,r,e.attempt(this.parser.constructs.flowInitial,i,Nj(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bM,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var EN={resolveAll:AN()},DN=kN(`string`),ON=kN(`text`);function kN(e){return{resolveAll:AN(e===`text`?jN:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++iBN,contentInitial:()=>PN,disable:()=>VN,document:()=>NN,flow:()=>IN,flowInitial:()=>FN,insideSpan:()=>zN,string:()=>LN,text:()=>RN}),NN={42:pN,43:pN,45:pN,48:pN,49:pN,50:pN,51:pN,52:pN,53:pN,54:pN,55:pN,56:pN,57:pN,62:Xj},PN={91:kM},FN={[-2]:cM,[-1]:cM,32:cM},IN={35:FM,42:dN,45:[xN,dN],60:BM,61:xN,95:dN,96:aM,126:aM},LN={38:nM,92:eM},RN={[-5]:lN,[-4]:lN,[-3]:lN,33:aN,38:nM,42:Hj,60:[Kj,qM],91:sN,92:[NM,eM],93:YM,95:Hj,96:fM},zN={null:[Hj,EN]},BN={null:[42,95]},VN={null:[]};function HN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=pj(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Vj(a,l.events,l),l.events):[]}function f(e,t){return WN(p(e),t)}function p(e){return UN(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function WN(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||kN).call(a,void 0,e[0])}for(r.position={start:EN(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:EN(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function PN(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function FN(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IN(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=rj(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function LN(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function RN(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zN(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function BN(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zN(e,t);let i={src:rj(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function VN(e,t){let n={src:rj(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function HN(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function UN(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return zN(e,t);let i={href:rj(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function WN(e,t){let n={href:rj(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function GN(e,t,n){let r=e.all(t),i=n?KN(n):qN(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||iP).call(a,void 0,e[0])}for(r.position={start:tP(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:tP(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function lP(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uP(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dP(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Mj(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function fP(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pP(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function mP(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function hP(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return mP(e,t);let i={src:Mj(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function gP(e,t){let n={src:Mj(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function _P(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function vP(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return mP(e,t);let i={href:Mj(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function yP(e,t){let n={href:Mj(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bP(e,t,n){let r=e.all(t),i=n?xP(n):SP(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function JN(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Kk(t.children[1]),o=Gk(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function $N(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(iP(t.slice(i),i>0,!1)),a.join(``)}function iP(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===tP||t===nP;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===tP||t===nP;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function aP(e,t){let n={type:`text`,value:rP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function oP(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var sP={blockquote:jN,break:MN,code:NN,delete:PN,emphasis:FN,footnoteReference:IN,heading:LN,html:RN,imageReference:BN,image:VN,inlineCode:HN,linkReference:UN,link:WN,listItem:GN,list:JN,paragraph:YN,root:XN,strong:ZN,table:QN,tableCell:eP,tableRow:$N,text:aP,thematicBreak:oP,toml:cP,yaml:cP,definition:cP,footnoteDefinition:cP};function cP(){}var{defineProperty:lP}=Object,uP=typeof self==`object`?self:globalThis,dP=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new uP[e](t)},fP=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?lP(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof uP[e]==`function`?dP(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(dP(a,o),i)};return r},pP=e=>fP(new Map,e)(0),mP=``,{toString:hP}={},{keys:gP,is:_P}=Object,vP=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=hP.call(e).slice(8,-1);switch(n){case`Array`:return[1,mP];case`Object`:return[2,mP];case`Date`:return[3,mP];case`RegExp`:return[4,mP];case`Map`:return[5,mP];case`Set`:return[6,mP];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},yP=([e,t])=>e===0&&(t===`function`||t===`symbol`),bP=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=vP(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&_P(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of gP(o))(e||!yP(vP(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?mP:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(yP(vP(n))||yP(vP(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!yP(vP(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},xP=(e,{json:t,lossy:n}={})=>{let r=[];return bP(!(t||n),!!t,new Map,r)(e),r},SP=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?pP(xP(e,t)):structuredClone(e):(e,t)=>pP(xP(e,t));function CP(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function wP(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function TP(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||CP,r=e.options.footnoteBackLabel||wP,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...SP(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` +`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function xP(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r1}function CP(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=xA(t.children[1]),o=bA(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function OP(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(NP(t.slice(i),i>0,!1)),a.join(``)}function NP(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===AP||t===jP;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===AP||t===jP;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function PP(e,t){let n={type:`text`,value:MP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function FP(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var IP={blockquote:oP,break:sP,code:cP,delete:lP,emphasis:uP,footnoteReference:dP,heading:fP,html:pP,imageReference:hP,image:gP,inlineCode:_P,linkReference:vP,link:yP,listItem:bP,list:CP,paragraph:wP,root:TP,strong:EP,table:DP,tableCell:kP,tableRow:OP,text:PP,thematicBreak:FP,toml:LP,yaml:LP,definition:LP,footnoteDefinition:LP};function LP(){}var{defineProperty:RP}=Object,zP=typeof self==`object`?self:globalThis,BP=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new zP[e](t)},VP=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?RP(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof zP[e]==`function`?BP(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(BP(a,o),i)};return r},HP=e=>VP(new Map,e)(0),UP=``,{toString:WP}={},{keys:GP,is:KP}=Object,qP=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=WP.call(e).slice(8,-1);switch(n){case`Array`:return[1,UP];case`Object`:return[2,UP];case`Date`:return[3,UP];case`RegExp`:return[4,UP];case`Map`:return[5,UP];case`Set`:return[6,UP];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},JP=([e,t])=>e===0&&(t===`function`||t===`symbol`),YP=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=qP(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&KP(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of GP(o))(e||!JP(qP(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?UP:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(JP(qP(n))||JP(qP(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!JP(qP(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},XP=(e,{json:t,lossy:n}={})=>{let r=[];return YP(!(t||n),!!t,new Map,r)(e),r},ZP=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?HP(XP(e,t)):structuredClone(e):(e,t)=>HP(XP(e,t));function QP(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function $P(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function eF(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||QP,r=e.options.footnoteBackLabel||$P,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...ZP(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` -`}]}}var EP=(function(e){if(e==null)return jP;if(typeof e==`function`)return AP(e);if(typeof e==`object`)return Array.isArray(e)?DP(e):OP(e);if(typeof e==`string`)return kP(e);throw Error(`Expected function, string, or object as test`)});function DP(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=PP,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=IP(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d`:``))+`)`})}return u;function u(){let l=lF,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=dF(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d0&&n.push({type:`text`,value:` -`}),n}function GP(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function KP(e,t){let n=BP(e,t),r=n.one(e,void 0),i=TP(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` -`},i)),a}function qP(e,t){return e&&`run`in e?async function(n,r){let i=KP(n,{file:r,...t});await e.run(i,r)}:function(n,r){return KP(n,{file:r,...e||t})}}function JP(e){if(e)throw e}var YP=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var $P={basename:eF,dirname:tF,extname:nF,join:rF,sep:`/`};function eF(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);oF(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function tF(e){if(oF(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function nF(e){oF(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function rF(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function aF(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function oF(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var sF={cwd:cF};function cF(){return`/`}function lF(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function uF(e){if(typeof e==`string`)e=new URL(e);else if(!lF(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return dF(e)}function dF(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];XP(o)&&XP(r)&&(r=(0,yF.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function SF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function CF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function wF(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function TF(e){if(!XP(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function EF(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function DF(e){return OF(e)?e:new pF(e)}function OF(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function kF(e){return typeof e==`string`||AF(e)}function AF(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var jF=[],MF={allowDangerousHtml:!0},NF=/^(https?|ircs?|mailto|xmpp)$/i,PF=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function FF(e){let t=IF(e),n=LF(e);return RF(t.runSync(t.parse(n),n),e)}function IF(e){let t=e.rehypePlugins||jF,n=e.remarkPlugins||jF,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...MF}:MF;return xF().use(AN).use(n).use(qP,r).use(t)}function LF(e){let t=e.children||``,n=new pF;return typeof t==`string`?n.value=t:``+t,n}function RF(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||zF;for(let e of PF)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return LP(e,l),sA(e,{Fragment:N.Fragment,components:i,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in kA)if(Object.hasOwn(kA,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=kA[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function zF(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||NF.test(e.slice(0,t))?e:``}function BF(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function VF(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function HF(e,t,n){let r=EP((n||{}).ignore||[]),i=UF(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=BF(e,`(`),a=BF(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function sI(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||tj(n)||ej(n))&&(!t||n!==47)}_I.peek=gI;function cI(){this.buffer()}function lI(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function uI(){this.buffer()}function dI(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function fI(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pI(e){this.exit(e)}function mI(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=WA(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hI(e){this.exit(e)}function gI(){return`[`}function _I(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function vI(){return{enter:{gfmFootnoteCallString:cI,gfmFootnoteCall:lI,gfmFootnoteDefinitionLabelString:uI,gfmFootnoteDefinition:dI},exit:{gfmFootnoteCallString:fI,gfmFootnoteCall:pI,gfmFootnoteDefinitionLabelString:mI,gfmFootnoteDefinition:hI}}}function yI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:_I},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` -`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?xI:bI))),s(),o}}function bI(e,t,n){return t===0?e:xI(e,t,n)}function xI(e,t,n){return(n?``:` `)+e}var SI=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];DI.peek=OI;function CI(){return{canContainEols:[`delete`],enter:{strikethrough:TI},exit:{strikethrough:EI}}}function wI(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:SI}],handlers:{delete:DI}}}function TI(e){this.enter({type:`delete`,children:[]},e)}function EI(e){this.exit(e)}function DI(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function OI(){return`~`}function kI(e){return e.length}function AI(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||kI,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),PI);return i(),o}function PI(e,t,n){return`>`+(n?``:` `)+e}function FI(e,t){return II(e,t.inConstruct,!0)&&!II(e,t.notInConstruct,!1)}function II(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function zI(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function BI(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function VI(e,t,n,r){let i=BI(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(zI(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,HI);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(RI(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` +`}),n}function bF(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xF(e,t){let n=hF(e,t),r=n.one(e,void 0),i=eF(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` +`},i)),a}function SF(e,t){return e&&`run`in e?async function(n,r){let i=xF(n,{file:r,...t});await e.run(i,r)}:function(n,r){return xF(n,{file:r,...e||t})}}function CF(e){if(e)throw e}var wF=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var OF={basename:kF,dirname:AF,extname:jF,join:MF,sep:`/`};function kF(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);FF(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function AF(e){if(FF(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function jF(e){FF(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function MF(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function PF(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function FF(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var IF={cwd:LF};function LF(){return`/`}function RF(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function zF(e){if(typeof e==`string`)e=new URL(e);else if(!RF(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return BF(e)}function BF(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];TF(o)&&TF(r)&&(r=(0,JF.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function ZF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function QF(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function $F(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function eI(e){if(!TF(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function tI(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function nI(e){return rI(e)?e:new HF(e)}function rI(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function iI(e){return typeof e==`string`||aI(e)}function aI(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var oI=[],sI={allowDangerousHtml:!0},cI=/^(https?|ircs?|mailto|xmpp)$/i,lI=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function uI(e){let t=dI(e),n=fI(e);return pI(t.runSync(t.parse(n),n),e)}function dI(e){let t=e.rehypePlugins||oI,n=e.remarkPlugins||oI,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...sI}:sI;return XF().use(aP).use(n).use(SF,r).use(t)}function fI(e){let t=e.children||``,n=new HF;return typeof t==`string`?n.value=t:``+t,n}function pI(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||mI;for(let e of lI)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return fF(e,l),IA(e,{Fragment:N.Fragment,components:i,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in ij)if(Object.hasOwn(ij,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=ij[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function mI(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||cI.test(e.slice(0,t))?e:``}function hI(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function gI(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function _I(e,t,n){let r=tF((n||{}).ignore||[]),i=vI(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=hI(e,`(`),a=hI(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function II(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Aj(n)||kj(n))&&(!t||n!==47)}KI.peek=GI;function LI(){this.buffer()}function RI(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function zI(){this.buffer()}function BI(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function VI(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function HI(e){this.exit(e)}function UI(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function WI(e){this.exit(e)}function GI(){return`[`}function KI(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function qI(){return{enter:{gfmFootnoteCallString:LI,gfmFootnoteCall:RI,gfmFootnoteDefinitionLabelString:zI,gfmFootnoteDefinition:BI},exit:{gfmFootnoteCallString:VI,gfmFootnoteCall:HI,gfmFootnoteDefinitionLabelString:UI,gfmFootnoteDefinition:WI}}}function JI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:KI},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?XI:YI))),s(),o}}function YI(e,t,n){return t===0?e:XI(e,t,n)}function XI(e,t,n){return(n?``:` `)+e}var ZI=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];nL.peek=rL;function QI(){return{canContainEols:[`delete`],enter:{strikethrough:eL},exit:{strikethrough:tL}}}function $I(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:ZI}],handlers:{delete:nL}}}function eL(e){this.enter({type:`delete`,children:[]},e)}function tL(e){this.exit(e)}function nL(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function rL(){return`~`}function iL(e){return e.length}function aL(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||iL,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),lL);return i(),o}function lL(e,t,n){return`>`+(n?``:` `)+e}function uL(e,t){return dL(e,t.inConstruct,!0)&&!dL(e,t.notInConstruct,!1)}function dL(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function mL(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function hL(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function gL(e,t,n,r){let i=hL(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(mL(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,_L);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(pL(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` `,encode:["`"],...s.current()})),t()}return u+=s.move(` `),a&&(u+=s.move(a+` -`)),u+=s.move(c),l(),u}function HI(e,t,n){return(n?``:` `)+e}function UI(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function WI(e,t,n,r){let i=UI(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` -`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function GI(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function KI(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function qI(e,t,n){let r=dj(e),i=dj(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}JI.peek=YI;function JI(e,t,n,r){let i=GI(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=qI(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=KI(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=qI(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+KI(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function YI(e,t,n){return n.options.emphasis||`*`}function XI(e,t){let n=!1;return LP(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&jA(e)&&(t.options.setext||n))}function ZI(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(XI(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` +`)),u+=s.move(c),l(),u}function _L(e,t,n){return(n?``:` `)+e}function vL(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yL(e,t,n,r){let i=vL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` +`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function bL(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xL(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function SL(e,t,n){let r=Bj(e),i=Bj(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}CL.peek=wL;function CL(e,t,n,r){let i=bL(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=SL(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=xL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=SL(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+xL(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function wL(e,t,n){return n.options.emphasis||`*`}function TL(e,t){let n=!1;return fF(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&oj(e)&&(t.options.setext||n))}function EL(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(TL(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` `,after:` `});return r(),t(),o+` `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` -`,...a.current()});return/^[\t ]/.test(l)&&(l=KI(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}QI.peek=$I;function QI(e){return e.value||``}function $I(){return`<`}eL.peek=tL;function eL(e,t,n,r){let i=UI(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function tL(){return`!`}nL.peek=rL;function nL(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function rL(){return`!`}iL.peek=aL;function iL(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}sL.peek=cL;function sL(e,t,n,r){let i=UI(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(oL(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function cL(e,t,n){return oL(e,n)?`<`:`[`}lL.peek=uL;function lL(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function uL(){return`[`}function dL(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function fL(e){let t=dL(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function pL(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mL(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hL(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?pL(n):dL(n),s=e.ordered?o===`.`?`)`:`.`:fL(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),mL(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function vL(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var yL=EP([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function bL(e,t,n,r){return(e.children.some(function(e){return yL(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function xL(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}SL.peek=CL;function SL(e,t,n,r){let i=xL(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=qI(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=KI(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=qI(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+KI(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function CL(e,t,n){return n.options.strong||`*`}function wL(e,t,n,r){return n.safe(e.value,r)}function TL(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function EL(e,t,n){let r=(mL(n)+(n.options.ruleSpaces?` `:``)).repeat(TL(n));return n.options.ruleSpaces?r.slice(0,-1):r}var DL={blockquote:NI,break:LI,code:VI,definition:WI,emphasis:JI,hardBreak:LI,heading:ZI,html:QI,image:eL,imageReference:nL,inlineCode:iL,link:sL,linkReference:lL,list:hL,listItem:_L,paragraph:vL,root:bL,strong:SL,text:wL,thematicBreak:EL};function OL(){return{enter:{table:kL,tableData:NL,tableHeader:NL,tableRow:jL},exit:{codeText:PL,table:AL,tableData:ML,tableHeader:ML,tableRow:ML}}}function kL(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function AL(e){this.exit(e),this.data.inTable=void 0}function jL(e){this.enter({type:`tableRow`,children:[]},e)}function ML(e){this.exit(e)}function NL(e){this.enter({type:`tableCell`,children:[]},e)}function PL(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,FL));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function FL(e,t){return t===`|`?t:e}function IL(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` +`,...a.current()});return/^[\t ]/.test(l)&&(l=xL(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}DL.peek=OL;function DL(e){return e.value||``}function OL(){return`<`}kL.peek=AL;function kL(e,t,n,r){let i=vL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function AL(){return`!`}jL.peek=ML;function jL(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ML(){return`!`}NL.peek=PL;function NL(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}IL.peek=LL;function IL(e,t,n,r){let i=vL(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(FL(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function LL(e,t,n){return FL(e,n)?`<`:`[`}RL.peek=zL;function RL(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function zL(){return`[`}function BL(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function VL(e){let t=BL(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function HL(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function UL(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function WL(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?HL(n):BL(n),s=e.ordered?o===`.`?`)`:`.`:VL(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),UL(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function qL(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var JL=tF([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function YL(e,t,n,r){return(e.children.some(function(e){return JL(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function XL(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ZL.peek=QL;function ZL(e,t,n,r){let i=XL(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=SL(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=xL(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=SL(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+xL(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function QL(e,t,n){return n.options.strong||`*`}function $L(e,t,n,r){return n.safe(e.value,r)}function eR(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function tR(e,t,n){let r=(UL(n)+(n.options.ruleSpaces?` `:``)).repeat(eR(n));return n.options.ruleSpaces?r.slice(0,-1):r}var nR={blockquote:cL,break:fL,code:gL,definition:yL,emphasis:CL,hardBreak:fL,heading:EL,html:DL,image:kL,imageReference:jL,inlineCode:NL,link:IL,linkReference:RL,list:WL,listItem:KL,paragraph:qL,root:YL,strong:ZL,text:$L,thematicBreak:tR};function rR(){return{enter:{table:iR,tableData:cR,tableHeader:cR,tableRow:oR},exit:{codeText:lR,table:aR,tableData:sR,tableHeader:sR,tableRow:sR}}}function iR(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function aR(e){this.exit(e),this.data.inTable=void 0}function oR(e){this.enter({type:`tableRow`,children:[]},e)}function sR(e){this.exit(e)}function cR(e){this.enter({type:`tableCell`,children:[]},e)}function lR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,uR));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function uR(e,t){return t===`|`?t:e}function dR(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` -`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return AI(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var mR={tokenize:SR,partial:!0};function hR(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:yR,continuation:{tokenize:bR},exit:xR}},text:{91:{name:`gfmFootnoteCall`,tokenize:vR},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:gR,resolveTo:_R}}}}function gR(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=WA(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function _R(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function vR(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||QA(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(WA(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return QA(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function yR(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||QA(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=WA(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return QA(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),ij(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function bR(e,t,n){return e.check(yj,t,e.attempt(mR,t,n))}function xR(e){e.exit(`gfmFootnoteDefinition`)}function SR(e,t,n){let r=this;return ij(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function CR(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=dj(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var wR=class{constructor(){this.map=[]}add(e,t,n){TR(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function TR(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$A(t)?ij(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||QA(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$A(t)?ij(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $A(t)?ij(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $A(t)?ij(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):$A(n)?ij(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||QA(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function kR(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new wR;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},MR(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function jR(e,t,n,r,i){let a=[],o=MR(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function MR(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var NR={name:`tasklistCheck`,tokenize:FR};function PR(){return{text:{91:NR}}}function FR(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return QA(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):$A(r)?e.check({tokenize:IR},t,n)(r):n(r)}}function IR(e,t,n){return ij(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function LR(e){return BA([$L(),hR(),CR(e),DR(),PR()])}var RR={};function zR(e){let t=this,n=e||RR,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(LR(n)),a.push(HL()),o.push(UL(n))}var BR=[`agent-threads`];async function VR(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await ve(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load conversations (${r.status})`);return r.json()}function HR({opened:e,activeThreadID:t,onClose:n,onNewChat:r,onSelect:i,onDeleted:a}){let o=Me(`(max-width: 48em)`),s=OD(),[c,l]=(0,M.useState)(``),[u]=Ha(c.trim(),250),[d,f]=(0,M.useState)(null),[p,m]=(0,M.useState)(null),[g,_]=(0,M.useState)(``),[v,y]=(0,M.useState)(``),[b,x]=(0,M.useState)(!1),S=(0,M.useRef)(null),C=ZO({queryKey:[...BR,u],queryFn:({pageParam:e})=>VR(u,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),w=(0,M.useMemo)(()=>C.data?.pages.flatMap(e=>e.threads)??[],[C.data]),T=(0,M.useMemo)(()=>GR(w),[w]);(0,M.useEffect)(()=>{e&&requestAnimationFrame(()=>S.current?.focus())},[e]);function E(e){y(``),_(e.title),f(e)}async function D(){if(d&&g.trim()){x(!0),y(``);try{let e=await ve(`/api/agent/threads/${encodeURIComponent(d.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:g.trim()})});if(!e.ok)throw Error(`Unable to rename conversation (${e.status})`);await s.invalidateQueries({queryKey:BR}),f(null)}catch(e){y(e instanceof Error?e.message:`Unable to rename this conversation.`)}finally{x(!1)}}}async function O(){if(p){x(!0),y(``);try{let e=await ve(`/api/agent/threads/${encodeURIComponent(p.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete conversation (${e.status})`);let t=p.threadId;m(null),await s.invalidateQueries({queryKey:BR}),a(t)}catch(e){y(e instanceof Error?e.message:`Unable to delete this conversation.`)}finally{x(!1)}}}return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(zm,{opened:e,onClose:n,position:`left`,size:o?`100%`:372,title:(0,N.jsx)(Ce,{fw:700,children:`Investigations`}),padding:`md`,overlayProps:{backgroundOpacity:.24,blur:1},children:(0,N.jsxs)(Le,{gap:`sm`,h:`calc(100dvh - 86px)`,children:[(0,N.jsx)(Oe,{leftSection:(0,N.jsx)(bD,{size:17,weight:`bold`}),onClick:r,children:`New investigation`}),(0,N.jsx)(xe,{ref:S,value:c,onChange:e=>l(e.currentTarget.value),leftSection:(0,N.jsx)(fD,{size:16}),placeholder:`Search investigations`,"aria-label":`Search investigations`}),(0,N.jsx)(ym,{}),(0,N.jsxs)(id,{type:`auto`,offsetScrollbars:!0,flex:1,children:[C.isLoading&&(0,N.jsx)(me,{py:`xl`,children:(0,N.jsx)(le,{size:`sm`})}),C.isError&&(0,N.jsx)(_e,{color:`bad`,title:`History unavailable`,children:`Your conversations could not be loaded.`}),!C.isLoading&&!C.isError&&w.length===0&&(0,N.jsxs)(Be,{py:`xl`,px:`sm`,ta:`center`,children:[(0,N.jsx)(Ce,{fw:600,children:u?`No matching investigations`:`No investigations yet`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`sm`,mt:4,children:u?`Try words from the opening question.`:`Your completed investigations will appear here.`})]}),(0,N.jsxs)(Le,{gap:`lg`,pb:`md`,children:[T.map(e=>(0,N.jsxs)(Le,{gap:4,children:[(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e.label}),e.threads.map(e=>{let n=e.threadId===t;return(0,N.jsx)(Be,{"data-active":n||void 0,className:`chat-history-item`,children:(0,N.jsxs)(ze,{gap:2,wrap:`nowrap`,children:[(0,N.jsx)(h,{onClick:()=>i(e.threadId),"aria-current":n?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,N.jsxs)(ze,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,N.jsx)(Ce,{size:`sm`,fw:n?650:500,truncate:!0,children:e.title}),(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,style:{flexShrink:0},children:KR(e.updatedAt)})]})}),(0,N.jsxs)(Mh,{position:`bottom-end`,withinPortal:!0,children:[(0,N.jsx)(Mh.Target,{children:(0,N.jsx)(Zd,{className:`chat-history-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:6,"aria-label":`Actions for ${e.title}`,children:(0,N.jsx)(iD,{size:18,weight:`bold`})})}),(0,N.jsxs)(Mh.Dropdown,{children:[(0,N.jsx)(Mh.Item,{leftSection:(0,N.jsx)(vD,{size:15}),onClick:()=>E(e),children:`Rename`}),(0,N.jsx)(Mh.Item,{color:`bad`,leftSection:(0,N.jsx)(ED,{size:15}),onClick:()=>{y(``),m(e)},children:`Delete`})]})]})]})},e.threadId)})]},e.label)),C.hasNextPage&&(0,N.jsx)(Oe,{variant:`subtle`,color:`gray`,loading:C.isFetchingNextPage,onClick:()=>void C.fetchNextPage(),children:`Load older`})]})]})]})}),(0,N.jsx)(Jh,{opened:d!==null,onClose:()=>!b&&f(null),title:`Rename investigation`,centered:!0,children:(0,N.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),D()},children:(0,N.jsxs)(Le,{children:[(0,N.jsx)(xe,{label:`Name`,value:g,onChange:e=>_(e.currentTarget.value),maxLength:120,autoFocus:!0}),v&&(0,N.jsx)(_e,{color:`bad`,children:v}),(0,N.jsxs)(ze,{justify:`flex-end`,children:[(0,N.jsx)(Oe,{variant:`default`,onClick:()=>f(null),disabled:b,children:`Cancel`}),(0,N.jsx)(Oe,{type:`submit`,loading:b,disabled:!g.trim(),children:`Save`})]})]})})}),(0,N.jsx)(Jh,{opened:p!==null,onClose:()=>!b&&m(null),title:`Delete investigation?`,centered:!0,children:(0,N.jsxs)(Le,{children:[(0,N.jsxs)(Ce,{size:`sm`,children:[`This permanently removes `,(0,N.jsx)(Ce,{span:!0,fw:650,children:p?.title}),` and its saved conversation.`]}),v&&(0,N.jsx)(_e,{color:`bad`,children:v}),(0,N.jsxs)(ze,{justify:`flex-end`,children:[(0,N.jsx)(Oe,{variant:`default`,onClick:()=>m(null),disabled:b,children:`Cancel`}),(0,N.jsx)(Oe,{color:`bad`,loading:b,onClick:()=>void O(),children:`Delete`})]})]})})]})}function UR(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function WR(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function GR(e){let t=WR(new Date),n=new Map;for(let r of e){let e=Math.floor((t-WR(UR(r.updatedAt)))/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[...n].map(([e,t])=>({label:e,threads:t}))}function KR(e){let t=UR(e),n=WR(new Date);return Math.floor((n-WR(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)}var qR=[];for(let e=0;e<256;++e)qR.push((e+256).toString(16).slice(1));function JR(e,t=0){return(qR[e[t+0]]+qR[e[t+1]]+qR[e[t+2]]+qR[e[t+3]]+`-`+qR[e[t+4]]+qR[e[t+5]]+`-`+qR[e[t+6]]+qR[e[t+7]]+`-`+qR[e[t+8]]+qR[e[t+9]]+`-`+qR[e[t+10]]+qR[e[t+11]]+qR[e[t+12]]+qR[e[t+13]]+qR[e[t+14]]+qR[e[t+15]]).toLowerCase()}var YR=new Uint8Array(16);function XR(){return crypto.getRandomValues(YR)}var ZR={};function QR(e,t,n){let r;if(e)r=ez(e.random??e.rng?.()??XR(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=XR();$R(ZR,e,i),r=ez(i,ZR.msecs,ZR.seq,t,n)}return t??JR(r)}function $R(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=tz(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function ez(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??=tz(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 tz(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function nz(){return QR()}var rz=`modulepreload`,iz=function(e){return`/`+e},az={},oz=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=iz(t,n),t=s(t),t in az)return;az[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:rz,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},sz=(0,M.lazy)(()=>oz(()=>import(`./mcp-app-frame-C0HSbiNW.js`),__vite__mapDeps([0,1,2]))),cz=(0,M.createContext)(null);function lz(){let e=(0,M.useContext)(cz);if(!e)throw Error(`Fanout app context is unavailable`);return e}function uz(){let{agent_available:e}=Te(),t=o(),n=OD(),r=va({select:e=>e.location.pathname}),i=r===`/chat`||r===`/chat/`||r.startsWith(`/chat/`),{threadId:a}=Oi({strict:!1}),s=(0,M.useRef)(nz()).current,[c,l]=(0,M.useState)(a??``),u=a??(c||s),[d,f]=(0,M.useState)([]),[p,m]=(0,M.useState)(``),[h,g]=(0,M.useState)(!1),[_,v]=(0,M.useState)(``),[y,b]=(0,M.useState)(``),[x,S]=(0,M.useState)(!1),C=(0,M.useRef)(``),w=(0,M.useRef)(null),T=(0,M.useRef)(null),E=(0,M.useMemo)(()=>new FE({url:`/api/agent`,threadId:u,fetch:(e,t)=>ve(e,t)}),[u]),D=!e||p===u;(0,M.useEffect)(()=>{a&&l(a)},[a]),(0,M.useEffect)(()=>{let t=!0;if(f([]),m(``),g(!1),b(``),!e){m(u);return}ve(`/api/agent/threads/${encodeURIComponent(u)}`).then(async e=>e.status===404?{messages:[]}:e.ok?e.json():Promise.reject(Error(`Unable to load thread (${e.status})`))).then(e=>{t&&(E.setMessages(e.messages??[]),f([...e.messages??[]]),m(u))}).catch(()=>{t&&(C.current=``,b(`This conversation could not be restored. Start a new chat or try again.`))});let r=E.subscribe({onEvent:({messages:e})=>f([...e]),onRunInitialized:()=>{g(!0),b(``)},onRunFinalized:({messages:e})=>{f([...e]),g(!1),n.invalidateQueries({queryKey:BR})},onRunFailed:e=>{console.error(`Agent run failed`,e),b(`Fanout could not complete this analysis. Please try again.`),g(!1),n.invalidateQueries({queryKey:BR})}});return()=>{t=!1,r.unsubscribe(),E.abortRun()}},[E,e,n,u]),(0,M.useEffect)(()=>{w.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[d,h]),(0,M.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,r=n?.matches(`input, textarea, [contenteditable='true']`);if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`){e.preventDefault(),S(!0);return}e.key===`/`&&!r&&(e.preventDefault(),t(c?{to:`/chat/$threadId`,params:{threadId:c}}:{to:`/chat`}),requestAnimationFrame(()=>T.current?.focus())),e.key===`Escape`&&n===T.current&&(v(``),T.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,c,t]);async function O(t){let n=t.trim();if(!e||!n||h||!D)return;let r={id:nz(),role:`user`,content:n};E.addMessage(r),f([...E.messages]),v(``),g(!0),b(``);try{await E.runAgent()}catch(e){console.error(`Agent run failed`,e),b(`Fanout could not complete this analysis. Please try again.`),g(!1)}}(0,M.useEffect)(()=>{let e=C.current;D&&i&&e&&(C.current=``,O(e))},[i,D,u]);function k(e){e.preventDefault(),O(_)}function ee(n){if(!e)return;let r=nz();C.current=n??``,S(!1),t({to:`/chat/$threadId`,params:{threadId:r}})}function te(){E.abortRun(),C.current=``,S(!1),t({to:`/chat`})}function ne(){t(c?{to:`/chat/$threadId`,params:{threadId:c}}:{to:`/chat`})}function re(e){S(!1),t({to:`/chat/$threadId`,params:{threadId:e}})}return(0,N.jsxs)(cz.Provider,{value:{agentAvailable:e,messages:d,ready:D,running:h,input:_,setInput:v,error:y,bottomRef:w,inputRef:T,send:O,submit:k,openChat:ee},children:[e&&(0,N.jsx)(HR,{opened:x,activeThreadID:i?u:void 0,onClose:()=>S(!1),onNewChat:te,onSelect:re,onDeleted:e=>{e===u&&te()}}),(0,N.jsxs)(rm,{header:{height:56},footer:{height:42},padding:0,children:[(0,N.jsx)(rm.Header,{children:(0,N.jsxs)(ze,{h:`100%`,px:{base:`sm`,sm:`lg`},justify:`space-between`,wrap:`nowrap`,children:[(0,N.jsx)(je,{size:`small`}),(0,N.jsxs)(ze,{gap:`xs`,wrap:`nowrap`,children:[(0,N.jsxs)(ze,{gap:6,mr:4,visibleFrom:`md`,children:[(0,N.jsx)(Be,{w:7,h:7,bg:`ok`,style:{borderRadius:`50%`}}),(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,fw:600,children:`Live`})]}),(e||i)&&(0,N.jsx)(Oe,{variant:`subtle`,color:`gray`,size:`compact-sm`,leftSection:i?(0,N.jsx)(uD,{size:16,weight:`bold`}):(0,N.jsx)(eD,{size:16,weight:`bold`}),onClick:()=>i?void t({to:`/dashboards`}):ne(),children:i?`Dashboard`:`Chat`}),e&&(0,N.jsx)(cg,{label:`Conversation history`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`Conversation history`,onClick:()=>S(!0),children:(0,N.jsx)(nD,{size:17,weight:`bold`})})}),e&&i&&(0,N.jsx)(cg,{label:`New chat`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`New chat`,onClick:te,children:(0,N.jsx)(bD,{size:17,weight:`bold`})})}),(0,N.jsx)(dz,{}),(0,N.jsx)(cg,{label:`Sign out`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`Sign out`,onClick:()=>void se().catch(e=>b(e instanceof Error?e.message:`Sign-out failed — your session is still active.`)),children:(0,N.jsx)(SD,{size:17})})})]})]})}),(0,N.jsxs)(rm.Main,{children:[(0,N.jsx)(ca,{}),e&&i&&(0,N.jsx)(fz,{})]}),(0,N.jsx)(hz,{})]})]})}function dz(){let{setColorScheme:e}=xo(),t=wo(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`;return(0,N.jsx)(cg,{label:`Switch to ${n} theme`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onClick:()=>e(n),children:t===`dark`?(0,N.jsx)(wD,{size:17,weight:`bold`}):(0,N.jsx)(mD,{size:17,weight:`bold`})})})}function fz(){let{input:e,setInput:t,inputRef:n,submit:r,send:i,ready:a,running:o}=lz();return(0,N.jsx)(Be,{pos:`fixed`,bottom:42,left:0,right:0,pb:`md`,pt:`md`,bg:`var(--mantine-color-body)`,style:{zIndex:20},children:(0,N.jsx)(Be,{maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`,lg:72},children:(0,N.jsx)(ee,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,shadow:`sm`,radius:28,py:6,pl:`lg`,pr:6,children:(0,N.jsxs)(ze,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,N.jsx)(qm,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),i(e))},placeholder:o?`Fanout is analyzing…`:`Ask about health, errors, or latency…`,disabled:!a||o,autosize:!0,minRows:1,maxRows:6,variant:`unstyled`,flex:1}),(0,N.jsx)(Zd,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!a||o,"aria-label":`Send message`,children:(0,N.jsx)(gD,{size:17,weight:`fill`})})]})})})})}function pz(){let{agentAvailable:e,messages:t,ready:n,running:r,error:i,bottomRef:a,send:o}=lz();if(!e)return(0,N.jsx)(fe,{size:`sm`,py:96,children:(0,N.jsx)(ee,{withBorder:!0,radius:`xl`,p:{base:`xl`,sm:40},children:(0,N.jsxs)(Le,{gap:`md`,children:[(0,N.jsx)(Ce,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,N.jsx)(ue,{order:1,children:`Chat is not configured`}),(0,N.jsx)(Ce,{c:`dimmed`,children:`Add an AI provider key to enable investigation chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,N.jsx)(Oe,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let s=t.filter(e=>e.role!==`tool`);return n?(0,N.jsxs)(fe,{size:1440,px:{base:`md`,sm:`xl`,lg:72},pt:{base:36,sm:64},pb:190,children:[s.length===0&&(0,N.jsx)(mz,{onSelect:o}),(0,N.jsxs)(Le,{gap:`xl`,"aria-live":`polite`,children:[s.map(e=>(0,N.jsx)(gz,{message:e,send:o},e.id)),r&&(0,N.jsxs)(ze,{gap:`xs`,children:[(0,N.jsx)(le,{type:`dots`,size:`sm`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`sm`,children:`Analyzing your system`})]}),i&&(0,N.jsx)(_e,{color:`bad`,title:`Something went wrong`,children:i}),(0,N.jsx)(`div`,{ref:a})]})]}):(0,N.jsxs)(me,{mih:`50vh`,children:[(0,N.jsx)(le,{size:`sm`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading conversation`})]})}function mz({onSelect:e}){return(0,N.jsxs)(Le,{align:`center`,gap:`lg`,maw:780,mx:`auto`,mb:56,ta:`center`,children:[(0,N.jsx)(je,{size:`large`}),(0,N.jsx)(Ce,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.14em`,children:`Your system, understood`}),(0,N.jsxs)(ue,{order:1,fz:{base:40,sm:56},lh:1.05,lts:`-0.045em`,children:[`See what changed.`,(0,N.jsx)(`br`,{}),`Know what to do next.`]}),(0,N.jsx)(Ce,{c:`dimmed`,maw:620,children:`Ask about service health, latency, errors, or dependencies. Fanout turns live signals into clear answers and focused views.`}),(0,N.jsx)(_g,{cols:{base:1,sm:3},spacing:`sm`,w:`100%`,mt:`md`,children:[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`].map((t,n)=>(0,N.jsx)(h,{onClick:()=>void e(t),children:(0,N.jsx)(ee,{withBorder:!0,radius:`lg`,p:`md`,mih:{base:74,sm:120},h:`100%`,children:(0,N.jsxs)(Le,{justify:`space-between`,h:`100%`,gap:`md`,children:[(0,N.jsxs)(Ce,{c:`dimmed`,size:`xs`,fw:700,children:[`0`,n+1]}),(0,N.jsxs)(ze,{justify:`space-between`,wrap:`nowrap`,children:[(0,N.jsx)(Ce,{size:`sm`,fw:500,children:t}),(0,N.jsx)(QE,{size:17,weight:`bold`})]})]})})},t))})]})}function hz(){return(0,N.jsx)(rm.Footer,{children:(0,N.jsxs)(ze,{h:`100%`,px:{base:`sm`,sm:`lg`},justify:`space-between`,wrap:`nowrap`,children:[(0,N.jsxs)(Ce,{c:`dimmed`,size:`xs`,children:[`© 2026 Fanout by `,(0,N.jsx)(Ce,{component:`a`,href:`https://labstack.com`,target:`_blank`,rel:`noreferrer`,inherit:!0,fw:600,c:`var(--mantine-color-text)`,children:`LabStack`})]}),(0,N.jsxs)(ze,{gap:4,children:[(0,N.jsx)(cg,{label:`GitHub`,children:(0,N.jsx)(Zd,{component:`a`,href:`https://github.com/labstack/fanout`,target:`_blank`,rel:`noreferrer`,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Fanout on GitHub`,children:(0,N.jsx)(oD,{size:14,weight:`bold`})})}),(0,N.jsx)(cg,{label:`LabStack`,children:(0,N.jsx)(Zd,{component:`a`,href:`https://labstack.com`,target:`_blank`,rel:`noreferrer`,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`LabStack website`,children:(0,N.jsx)(cD,{size:14})})})]})]})})}function gz({message:e,send:t}){if(e.role===`activity`){let n=e;return n.activityType===`mcp-app`?(0,N.jsx)(ee,{radius:`lg`,shadow:`md`,style:{overflow:`hidden`},"aria-label":_z(n.content.toolName),children:(0,N.jsx)(M.Suspense,{fallback:(0,N.jsx)(me,{mih:180,children:(0,N.jsx)(le,{size:`sm`})}),children:(0,N.jsx)(sz,{content:n.content,onMessage:t})})}):null}let n=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!n&&e.role===`assistant`)return null;let r=e.role===`user`;return(0,N.jsxs)(Le,{gap:`xs`,align:r?`flex-end`:`stretch`,maw:r?`min(92%, 650px)`:780,ml:r?`auto`:void 0,children:[(0,N.jsxs)(ze,{gap:`xs`,justify:r?`flex-end`:`flex-start`,children:[(0,N.jsx)(hm,{size:22,radius:`sm`,color:r?`gray`:`brand`,children:r?`Y`:`F`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,children:r?`You`:`Fanout`})]}),r?(0,N.jsx)(ee,{withBorder:!0,radius:`lg`,p:`sm`,bg:`var(--mantine-color-brand-light)`,children:(0,N.jsx)(Ce,{style:{whiteSpace:`pre-wrap`},children:n})}):(0,N.jsx)(yg,{children:(0,N.jsx)(FF,{remarkPlugins:[zR],children:n})})]})}function _z(e){return{observability_overview:`System health`,service_topology:`Service map`,service_performance:`Performance`,trace_detail:`Trace analysis`,search_logs:`Logs`}[e]??`System analysis`}function vz(){let e=(0,M.useMemo)(()=>new RO,[]);return(0,N.jsx)(kD,{client:e,children:(0,N.jsx)(Fe,{children:(0,N.jsx)(uz,{})})})}var yz=Yi({component:vz,notFoundComponent:()=>(0,N.jsx)(d,{to:`/`,replace:!0})}),bz=Xi(`/`)({component:Zi(()=>oz(()=>import(`./routes-UYU1YEPx.js`),__vite__mapDeps([3,1,2])),`component`)}),xz=Xi(`/chat/`)({component:Zi(()=>oz(()=>import(`./chat.index-B-B4AZ2m.js`),__vite__mapDeps([4,1])),`component`)}),Sz=Xi(`/chat/$threadId`)({component:Zi(()=>oz(()=>import(`./chat._threadId-Bn3zmcjJ.js`),[]),`component`)}),Cz=Xi(`/dashboards/`)({component:Zi(()=>oz(()=>import(`./dashboards.index-BoPfccdT.js`),__vite__mapDeps([5,1,6,2])),`component`)}),wz=Xi(`/dashboards/$dashboardId`)({component:Zi(()=>oz(()=>import(`./dashboards._dashboardId-BUndKTeA.js`),__vite__mapDeps([7,1,6,2])),`component`)}),Tz=bz.update({id:`/`,path:`/`,getParentRoute:()=>yz}),Ez=xz.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>yz}),Dz=Sz.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>yz}),Oz=Cz.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>yz}),kz={IndexRoute:Tz,ChatThreadIdRoute:Dz,DashboardsDashboardIdRoute:wz.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>yz}),ChatIndexRoute:Ez,DashboardsIndexRoute:Oz},Az=ma({routeTree:yz._addFileChildren(kz)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),jz=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],Mz=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],Nz=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],Pz=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Fz=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Iz=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],Lz={display:`"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},Rz={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:jz,brand:Mz,ok:Nz,warn:Pz,bad:Fz,info:Iz},defaultRadius:`md`,fontFamily:Lz.body,fontFamilyMonospace:Lz.display,headings:{fontFamily:Lz.display,fontWeight:`500`},cursorType:`pointer`},zz=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{},dark:{}}),Bz=Ro(Rz);(0,mv.createRoot)(document.getElementById(`root`)).render((0,N.jsx)(M.StrictMode,{children:(0,N.jsx)(Lo,{theme:Bz,defaultColorScheme:`auto`,cssVariablesResolver:zz,children:(0,N.jsx)(_a,{router:Az})})}));export{ro as A,Ud as C,mo as D,_o as E,xa as M,po as O,Zd as S,wo as T,_g as _,XO as a,ym as b,uO as c,PD as d,KD as f,QE as g,bD as h,nz as i,Sa as j,io as k,oO as l,OD as m,pz as n,PO as o,nO as p,lz as r,EO as s,wz as t,HD as u,cg as v,id as w,im as x,Mh as y}; \ No newline at end of file +`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return aL(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var UR={tokenize:ZR,partial:!0};function WR(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:JR,continuation:{tokenize:YR},exit:XR}},text:{91:{name:`gfmFootnoteCall`,tokenize:qR},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:GR,resolveTo:KR}}}}function GR(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=yj(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function KR(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function qR(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Dj(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(yj(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Dj(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function JR(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Dj(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=yj(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Dj(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Nj(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function YR(e,t,n){return e.check(Jj,t,e.attempt(UR,t,n))}function XR(e){e.exit(`gfmFootnoteDefinition`)}function ZR(e,t,n){let r=this;return Nj(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function QR(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Bj(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var $R=class{constructor(){this.map=[]}add(e,t,n){ez(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function ez(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Oj(t)?Nj(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Dj(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Oj(t)?Nj(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Oj(t)?Nj(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Oj(t)?Nj(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):Oj(n)?Nj(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Dj(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function iz(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new $R;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},sz(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function oz(e,t,n,r,i){let a=[],o=sz(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function sz(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var cz={name:`tasklistCheck`,tokenize:uz};function lz(){return{text:{91:cz}}}function uz(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Dj(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):Oj(r)?e.check({tokenize:dz},t,n)(r):n(r)}}function dz(e,t,n){return Nj(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function fz(e){return hj([OR(),WR(),QR(e),nz(),lz()])}var pz={};function mz(e){let t=this,n=e||pz,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(fz(n)),a.push(_R()),o.push(vR(n))}var hz=[`agent-threads`];async function gz(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await ve(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load conversations (${r.status})`);return r.json()}function _z({opened:e,activeThreadID:t,onClose:n,onNewChat:r,onSelect:i,onDeleted:a}){let o=Me(`(max-width: 48em)`),s=rO(),[c,l]=(0,M.useState)(``),[u]=Ha(c.trim(),250),[d,f]=(0,M.useState)(null),[p,m]=(0,M.useState)(null),[g,_]=(0,M.useState)(``),[v,y]=(0,M.useState)(``),[b,x]=(0,M.useState)(!1),S=(0,M.useRef)(null),C=Ek({queryKey:[...hz,u],queryFn:({pageParam:e})=>gz(u,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),w=(0,M.useMemo)(()=>C.data?.pages.flatMap(e=>e.threads)??[],[C.data]),T=(0,M.useMemo)(()=>bz(w),[w]);(0,M.useEffect)(()=>{e&&requestAnimationFrame(()=>S.current?.focus())},[e]);function E(e){y(``),_(e.title),f(e)}async function D(){if(d&&g.trim()){x(!0),y(``);try{let e=await ve(`/api/agent/threads/${encodeURIComponent(d.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:g.trim()})});if(!e.ok)throw Error(`Unable to rename conversation (${e.status})`);await s.invalidateQueries({queryKey:hz}),f(null)}catch(e){y(e instanceof Error?e.message:`Unable to rename this conversation.`)}finally{x(!1)}}}async function O(){if(p){x(!0),y(``);try{let e=await ve(`/api/agent/threads/${encodeURIComponent(p.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete conversation (${e.status})`);let t=p.threadId;m(null),await s.invalidateQueries({queryKey:hz}),a(t)}catch(e){y(e instanceof Error?e.message:`Unable to delete this conversation.`)}finally{x(!1)}}}return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(zm,{opened:e,onClose:n,position:`left`,size:o?`100%`:372,title:(0,N.jsx)(Ce,{fw:700,children:`Investigations`}),padding:`md`,overlayProps:{backgroundOpacity:.24,blur:1},children:(0,N.jsxs)(Le,{gap:`sm`,h:`calc(100dvh - 86px)`,children:[(0,N.jsx)(Oe,{leftSection:(0,N.jsx)(YD,{size:17,weight:`bold`}),onClick:r,children:`New investigation`}),(0,N.jsx)(xe,{ref:S,value:c,onChange:e=>l(e.currentTarget.value),leftSection:(0,N.jsx)(VD,{size:16}),placeholder:`Search investigations`,"aria-label":`Search investigations`}),(0,N.jsx)(ym,{}),(0,N.jsxs)(id,{type:`auto`,offsetScrollbars:!0,flex:1,children:[C.isLoading&&(0,N.jsx)(me,{py:`xl`,children:(0,N.jsx)(le,{size:`sm`})}),C.isError&&(0,N.jsx)(_e,{color:`bad`,title:`History unavailable`,children:`Your conversations could not be loaded.`}),!C.isLoading&&!C.isError&&w.length===0&&(0,N.jsxs)(Be,{py:`xl`,px:`sm`,ta:`center`,children:[(0,N.jsx)(Ce,{fw:600,children:u?`No matching investigations`:`No investigations yet`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`sm`,mt:4,children:u?`Try words from the opening question.`:`Your completed investigations will appear here.`})]}),(0,N.jsxs)(Le,{gap:`lg`,pb:`md`,children:[T.map(e=>(0,N.jsxs)(Le,{gap:4,children:[(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e.label}),e.threads.map(e=>{let n=e.threadId===t;return(0,N.jsx)(Be,{"data-active":n||void 0,className:`chat-history-item`,children:(0,N.jsxs)(ze,{gap:2,wrap:`nowrap`,children:[(0,N.jsx)(h,{onClick:()=>i(e.threadId),"aria-current":n?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,N.jsxs)(ze,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,N.jsx)(Ce,{size:`sm`,fw:n?650:500,truncate:!0,children:e.title}),(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,style:{flexShrink:0},children:xz(e.updatedAt)})]})}),(0,N.jsxs)(Mh,{position:`bottom-end`,withinPortal:!0,children:[(0,N.jsx)(Mh.Target,{children:(0,N.jsx)(Zd,{className:`chat-history-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:6,"aria-label":`Actions for ${e.title}`,children:(0,N.jsx)(ND,{size:18,weight:`bold`})})}),(0,N.jsxs)(Mh.Dropdown,{children:[(0,N.jsx)(Mh.Item,{leftSection:(0,N.jsx)(qD,{size:15}),onClick:()=>E(e),children:`Rename`}),(0,N.jsx)(Mh.Item,{color:`bad`,leftSection:(0,N.jsx)(tO,{size:15}),onClick:()=>{y(``),m(e)},children:`Delete`})]})]})]})},e.threadId)})]},e.label)),C.hasNextPage&&(0,N.jsx)(Oe,{variant:`subtle`,color:`gray`,loading:C.isFetchingNextPage,onClick:()=>void C.fetchNextPage(),children:`Load older`})]})]})]})}),(0,N.jsx)(Jh,{opened:d!==null,onClose:()=>!b&&f(null),title:`Rename investigation`,centered:!0,children:(0,N.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),D()},children:(0,N.jsxs)(Le,{children:[(0,N.jsx)(xe,{label:`Name`,value:g,onChange:e=>_(e.currentTarget.value),maxLength:120,autoFocus:!0}),v&&(0,N.jsx)(_e,{color:`bad`,children:v}),(0,N.jsxs)(ze,{justify:`flex-end`,children:[(0,N.jsx)(Oe,{variant:`default`,onClick:()=>f(null),disabled:b,children:`Cancel`}),(0,N.jsx)(Oe,{type:`submit`,loading:b,disabled:!g.trim(),children:`Save`})]})]})})}),(0,N.jsx)(Jh,{opened:p!==null,onClose:()=>!b&&m(null),title:`Delete investigation?`,centered:!0,children:(0,N.jsxs)(Le,{children:[(0,N.jsxs)(Ce,{size:`sm`,children:[`This permanently removes `,(0,N.jsx)(Ce,{span:!0,fw:650,children:p?.title}),` and its saved conversation.`]}),v&&(0,N.jsx)(_e,{color:`bad`,children:v}),(0,N.jsxs)(ze,{justify:`flex-end`,children:[(0,N.jsx)(Oe,{variant:`default`,onClick:()=>m(null),disabled:b,children:`Cancel`}),(0,N.jsx)(Oe,{color:`bad`,loading:b,onClick:()=>void O(),children:`Delete`})]})]})})]})}function vz(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function yz(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}function bz(e){let t=yz(new Date),n=new Map;for(let r of e){let e=Math.floor((t-yz(vz(r.updatedAt)))/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[...n].map(([e,t])=>({label:e,threads:t}))}function xz(e){let t=vz(e),n=yz(new Date);return Math.floor((n-yz(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)}var Sz=[];for(let e=0;e<256;++e)Sz.push((e+256).toString(16).slice(1));function Cz(e,t=0){return(Sz[e[t+0]]+Sz[e[t+1]]+Sz[e[t+2]]+Sz[e[t+3]]+`-`+Sz[e[t+4]]+Sz[e[t+5]]+`-`+Sz[e[t+6]]+Sz[e[t+7]]+`-`+Sz[e[t+8]]+Sz[e[t+9]]+`-`+Sz[e[t+10]]+Sz[e[t+11]]+Sz[e[t+12]]+Sz[e[t+13]]+Sz[e[t+14]]+Sz[e[t+15]]).toLowerCase()}var wz=new Uint8Array(16);function Tz(){return crypto.getRandomValues(wz)}var Ez={};function Dz(e,t,n){let r;if(e)r=kz(e.random??e.rng?.()??Tz(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=Tz();Oz(Ez,e,i),r=kz(i,Ez.msecs,Ez.seq,t,n)}return t??Cz(r)}function Oz(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=Az(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function kz(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??=Az(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 Az(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function jz(){return Dz()}var Mz=`modulepreload`,Nz=function(e){return`/`+e},Pz={},Fz=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Nz(t,n),t=s(t),t in Pz)return;Pz[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Mz,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Iz=(0,M.lazy)(()=>Fz(()=>import(`./mcp-app-frame-BwFqSNsw.js`),__vite__mapDeps([0,1,2]))),Lz=(0,M.createContext)(null);function Rz(){let e=(0,M.useContext)(Lz);if(!e)throw Error(`Fanout app context is unavailable`);return e}function zz(){let{agent_available:e}=Te(),t=o(),n=rO(),r=va({select:e=>e.location.pathname}),i=r===`/chat`||r===`/chat/`||r.startsWith(`/chat/`),{threadId:a}=Oi({strict:!1}),s=(0,M.useRef)(jz()).current,[c,l]=(0,M.useState)(a??``),u=a??(c||s),[d,f]=(0,M.useState)([]),[p,m]=(0,M.useState)(``),[h,g]=(0,M.useState)(!1),[_,v]=(0,M.useState)(``),[y,b]=(0,M.useState)(``),[x,S]=(0,M.useState)(!1),C=(0,M.useRef)(``),w=(0,M.useRef)(null),T=(0,M.useRef)(null),E=(0,M.useMemo)(()=>new uD({url:`/api/agent`,threadId:u,fetch:(e,t)=>ve(e,t)}),[u]),D=!e||p===u;(0,M.useEffect)(()=>{a&&l(a)},[a]),(0,M.useEffect)(()=>{let t=!0;if(f([]),m(``),g(!1),b(``),!e){m(u);return}ve(`/api/agent/threads/${encodeURIComponent(u)}`).then(async e=>e.status===404?{messages:[]}:e.ok?e.json():Promise.reject(Error(`Unable to load thread (${e.status})`))).then(e=>{t&&(E.setMessages(e.messages??[]),f([...e.messages??[]]),m(u))}).catch(()=>{t&&(C.current=``,b(`This conversation could not be restored. Start a new chat or try again.`))});let r=E.subscribe({onEvent:({messages:e})=>f([...e]),onRunInitialized:()=>{g(!0),b(``)},onRunFinalized:({messages:e})=>{f([...e]),g(!1),n.invalidateQueries({queryKey:hz})},onRunFailed:e=>{console.error(`Agent run failed`,e),b(`Fanout could not complete this analysis. Please try again.`),g(!1),n.invalidateQueries({queryKey:hz})}});return()=>{t=!1,r.unsubscribe(),E.abortRun()}},[E,e,n,u]),(0,M.useEffect)(()=>{w.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[d,h]),(0,M.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,r=n?.matches(`input, textarea, [contenteditable='true']`);if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`){e.preventDefault(),S(!0);return}e.key===`/`&&!r&&(e.preventDefault(),t(c?{to:`/chat/$threadId`,params:{threadId:c}}:{to:`/chat`}),requestAnimationFrame(()=>T.current?.focus())),e.key===`Escape`&&n===T.current&&(v(``),T.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,c,t]);async function O(t){let n=t.trim();if(!e||!n||h||!D)return;let r={id:jz(),role:`user`,content:n};E.addMessage(r),f([...E.messages]),v(``),g(!0),b(``);try{await E.runAgent()}catch(e){console.error(`Agent run failed`,e),b(`Fanout could not complete this analysis. Please try again.`),g(!1)}}(0,M.useEffect)(()=>{let e=C.current;D&&i&&e&&(C.current=``,O(e))},[i,D,u]);function k(e){e.preventDefault(),O(_)}function ee(n){if(!e)return;let r=jz();C.current=n??``,S(!1),t({to:`/chat/$threadId`,params:{threadId:r}})}function te(){E.abortRun(),C.current=``,S(!1),t({to:`/chat`})}function ne(){t(c?{to:`/chat/$threadId`,params:{threadId:c}}:{to:`/chat`})}function re(e){S(!1),t({to:`/chat/$threadId`,params:{threadId:e}})}return(0,N.jsxs)(Lz.Provider,{value:{agentAvailable:e,messages:d,ready:D,running:h,input:_,setInput:v,error:y,bottomRef:w,inputRef:T,send:O,submit:k,openChat:ee},children:[e&&(0,N.jsx)(_z,{opened:x,activeThreadID:i?u:void 0,onClose:()=>S(!1),onNewChat:te,onSelect:re,onDeleted:e=>{e===u&&te()}}),(0,N.jsxs)(rm,{header:{height:56},footer:{height:42},padding:0,children:[(0,N.jsx)(rm.Header,{children:(0,N.jsxs)(ze,{h:`100%`,px:{base:`sm`,sm:`lg`},justify:`space-between`,wrap:`nowrap`,children:[(0,N.jsx)(je,{size:`small`}),(0,N.jsxs)(ze,{gap:`xs`,wrap:`nowrap`,children:[(0,N.jsxs)(ze,{gap:6,mr:4,visibleFrom:`md`,children:[(0,N.jsx)(Be,{w:7,h:7,bg:`ok`,style:{borderRadius:`50%`}}),(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,fw:600,children:`Live`})]}),(e||i)&&(0,N.jsx)(Oe,{variant:`subtle`,color:`gray`,size:`compact-sm`,leftSection:i?(0,N.jsx)(zD,{size:16,weight:`bold`}):(0,N.jsx)(kD,{size:16,weight:`bold`}),onClick:()=>i?void t({to:`/dashboards`}):ne(),children:i?`Dashboard`:`Chat`}),e&&(0,N.jsx)(cg,{label:`Conversation history`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`Conversation history`,onClick:()=>S(!0),children:(0,N.jsx)(jD,{size:17,weight:`bold`})})}),e&&i&&(0,N.jsx)(cg,{label:`New chat`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`New chat`,onClick:te,children:(0,N.jsx)(YD,{size:17,weight:`bold`})})}),(0,N.jsx)(Bz,{}),(0,N.jsx)(cg,{label:`Sign out`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`Sign out`,onClick:()=>void se().catch(e=>b(e instanceof Error?e.message:`Sign-out failed — your session is still active.`)),children:(0,N.jsx)(ZD,{size:17})})})]})]})}),(0,N.jsxs)(rm.Main,{children:[(0,N.jsx)(ca,{}),e&&i&&(0,N.jsx)(Vz,{})]}),(0,N.jsx)(Wz,{})]})]})}function Bz(){let{setColorScheme:e}=xo(),t=wo(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`;return(0,N.jsx)(cg,{label:`Switch to ${n} theme`,children:(0,N.jsx)(Zd,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onClick:()=>e(n),children:t===`dark`?(0,N.jsx)($D,{size:17,weight:`bold`}):(0,N.jsx)(UD,{size:17,weight:`bold`})})})}function Vz(){let{input:e,setInput:t,inputRef:n,submit:r,send:i,ready:a,running:o}=Rz();return(0,N.jsx)(Be,{pos:`fixed`,bottom:42,left:0,right:0,pb:`md`,pt:`md`,bg:`var(--mantine-color-body)`,style:{zIndex:20},children:(0,N.jsx)(Be,{maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`,lg:72},children:(0,N.jsx)(ee,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,shadow:`sm`,radius:28,py:6,pl:`lg`,pr:6,children:(0,N.jsxs)(ze,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,N.jsx)(qm,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),i(e))},placeholder:o?`Fanout is analyzing…`:`Ask about health, errors, or latency…`,disabled:!a||o,autosize:!0,minRows:1,maxRows:6,variant:`unstyled`,flex:1}),(0,N.jsx)(Zd,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!a||o,"aria-label":`Send message`,children:(0,N.jsx)(GD,{size:17,weight:`fill`})})]})})})})}function Hz(){let{agentAvailable:e,messages:t,ready:n,running:r,error:i,bottomRef:a,send:o}=Rz();if(!e)return(0,N.jsx)(fe,{size:`sm`,py:96,children:(0,N.jsx)(ee,{withBorder:!0,radius:`xl`,p:{base:`xl`,sm:40},children:(0,N.jsxs)(Le,{gap:`md`,children:[(0,N.jsx)(Ce,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,N.jsx)(ue,{order:1,children:`Chat is not configured`}),(0,N.jsx)(Ce,{c:`dimmed`,children:`Add an AI provider key to enable investigation chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,N.jsx)(Oe,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let s=t.filter(e=>e.role!==`tool`);return n?(0,N.jsxs)(fe,{size:1440,px:{base:`md`,sm:`xl`,lg:72},pt:{base:36,sm:64},pb:190,children:[s.length===0&&(0,N.jsx)(Uz,{onSelect:o}),(0,N.jsxs)(Le,{gap:`xl`,"aria-live":`polite`,children:[s.map(e=>(0,N.jsx)(Gz,{message:e,send:o},e.id)),r&&(0,N.jsxs)(ze,{gap:`xs`,children:[(0,N.jsx)(le,{type:`dots`,size:`sm`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`sm`,children:`Analyzing your system`})]}),i&&(0,N.jsx)(_e,{color:`bad`,title:`Something went wrong`,children:i}),(0,N.jsx)(`div`,{ref:a})]})]}):(0,N.jsxs)(me,{mih:`50vh`,children:[(0,N.jsx)(le,{size:`sm`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading conversation`})]})}function Uz({onSelect:e}){return(0,N.jsxs)(Le,{align:`center`,gap:`lg`,maw:780,mx:`auto`,mb:56,ta:`center`,children:[(0,N.jsx)(je,{size:`large`}),(0,N.jsx)(Ce,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.14em`,children:`Your system, understood`}),(0,N.jsxs)(ue,{order:1,fz:{base:40,sm:56},lh:1.05,lts:`-0.045em`,children:[`See what changed.`,(0,N.jsx)(`br`,{}),`Know what to do next.`]}),(0,N.jsx)(Ce,{c:`dimmed`,maw:620,children:`Ask about service health, latency, errors, or dependencies. Fanout turns live signals into clear answers and focused views.`}),(0,N.jsx)(_g,{cols:{base:1,sm:3},spacing:`sm`,w:`100%`,mt:`md`,children:[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`].map((t,n)=>(0,N.jsx)(h,{onClick:()=>void e(t),children:(0,N.jsx)(ee,{withBorder:!0,radius:`lg`,p:`md`,mih:{base:74,sm:120},h:`100%`,children:(0,N.jsxs)(Le,{justify:`space-between`,h:`100%`,gap:`md`,children:[(0,N.jsxs)(Ce,{c:`dimmed`,size:`xs`,fw:700,children:[`0`,n+1]}),(0,N.jsxs)(ze,{justify:`space-between`,wrap:`nowrap`,children:[(0,N.jsx)(Ce,{size:`sm`,fw:500,children:t}),(0,N.jsx)(DD,{size:17,weight:`bold`})]})]})})},t))})]})}function Wz(){return(0,N.jsx)(rm.Footer,{children:(0,N.jsxs)(ze,{h:`100%`,px:{base:`sm`,sm:`lg`},justify:`space-between`,wrap:`nowrap`,children:[(0,N.jsxs)(Ce,{c:`dimmed`,size:`xs`,children:[`© 2026 Fanout by `,(0,N.jsx)(Ce,{component:`a`,href:`https://labstack.com`,target:`_blank`,rel:`noreferrer`,inherit:!0,fw:600,c:`var(--mantine-color-text)`,children:`LabStack`})]}),(0,N.jsxs)(ze,{gap:4,children:[(0,N.jsx)(cg,{label:`GitHub`,children:(0,N.jsx)(Zd,{component:`a`,href:`https://github.com/labstack/fanout`,target:`_blank`,rel:`noreferrer`,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Fanout on GitHub`,children:(0,N.jsx)(FD,{size:14,weight:`bold`})})}),(0,N.jsx)(cg,{label:`LabStack`,children:(0,N.jsx)(Zd,{component:`a`,href:`https://labstack.com`,target:`_blank`,rel:`noreferrer`,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`LabStack website`,children:(0,N.jsx)(LD,{size:14})})})]})]})})}function Gz({message:e,send:t}){if(e.role===`activity`){let n=e;return n.activityType===`mcp-app`?(0,N.jsx)(ee,{radius:`lg`,shadow:`md`,style:{overflow:`hidden`},"aria-label":Kz(n.content.toolName),children:(0,N.jsx)(M.Suspense,{fallback:(0,N.jsx)(me,{mih:180,children:(0,N.jsx)(le,{size:`sm`})}),children:(0,N.jsx)(Iz,{content:n.content,onMessage:t})})}):null}let n=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!n&&e.role===`assistant`)return null;let r=e.role===`user`;return(0,N.jsxs)(Le,{gap:`xs`,align:r?`flex-end`:`stretch`,maw:r?`min(92%, 650px)`:780,ml:r?`auto`:void 0,children:[(0,N.jsxs)(ze,{gap:`xs`,justify:r?`flex-end`:`flex-start`,children:[(0,N.jsx)(hm,{size:22,radius:`sm`,color:r?`gray`:`brand`,children:r?`Y`:`F`}),(0,N.jsx)(Ce,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,children:r?`You`:`Fanout`})]}),r?(0,N.jsx)(ee,{withBorder:!0,radius:`lg`,p:`sm`,bg:`var(--mantine-color-brand-light)`,children:(0,N.jsx)(Ce,{style:{whiteSpace:`pre-wrap`},children:n})}):(0,N.jsx)(yg,{children:(0,N.jsx)(uI,{remarkPlugins:[mz],children:n})})]})}function Kz(e){return{observability_overview:`System health`,service_topology:`Service map`,service_performance:`Performance`,trace_detail:`Trace analysis`,search_logs:`Logs`}[e]??`System analysis`}function qz(){let e=(0,M.useMemo)(()=>new pk,[]);return(0,N.jsx)(iO,{client:e,children:(0,N.jsx)(Fe,{children:(0,N.jsx)(zz,{})})})}var Jz=Yi({component:qz,notFoundComponent:()=>(0,N.jsx)(d,{to:`/`,replace:!0})}),Yz=Xi(`/`)({component:Zi(()=>Fz(()=>import(`./routes-UYU1YEPx.js`),__vite__mapDeps([3,1,2])),`component`)}),Xz=Xi(`/chat/`)({component:Zi(()=>Fz(()=>import(`./chat.index-BCfx7LKm.js`),__vite__mapDeps([4,1])),`component`)}),Zz=Xi(`/chat/$threadId`)({component:Zi(()=>Fz(()=>import(`./chat._threadId-CzfhQ5YC.js`),[]),`component`)}),Qz=Xi(`/dashboards/`)({component:Zi(()=>Fz(()=>import(`./dashboards.index-DzfpVEyI.js`),__vite__mapDeps([5,1,6,2])),`component`)}),$z=Xi(`/dashboards/$dashboardId`)({component:Zi(()=>Fz(()=>import(`./dashboards._dashboardId-Cd4hot0K.js`),__vite__mapDeps([7,1,6,2])),`component`)}),eB=Yz.update({id:`/`,path:`/`,getParentRoute:()=>Jz}),tB=Xz.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>Jz}),nB=Zz.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>Jz}),rB=Qz.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>Jz}),iB={IndexRoute:eB,ChatThreadIdRoute:nB,DashboardsDashboardIdRoute:$z.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>Jz}),ChatIndexRoute:tB,DashboardsIndexRoute:rB},aB=ma({routeTree:Jz._addFileChildren(iB)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),oB=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],sB=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],cB=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],lB=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],uB=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],dB=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],fB={display:`"IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},pB={primaryColor:`brand`,primaryShade:{light:7,dark:5},autoContrast:!0,colors:{dark:oB,brand:sB,ok:cB,warn:lB,bad:uB,info:dB},defaultRadius:`md`,fontFamily:fB.body,fontFamilyMonospace:fB.display,headings:{fontFamily:fB.display,fontWeight:`500`},cursorType:`pointer`},mB=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{},dark:{}}),hB=Ro(pB);(0,hv.createRoot)(document.getElementById(`root`)).render((0,N.jsx)(M.StrictMode,{children:(0,N.jsx)(Lo,{theme:hB,defaultColorScheme:`auto`,cssVariablesResolver:mB,children:(0,N.jsx)(_a,{router:aB})})}));export{ro as A,Ud as C,mo as D,_o as E,xa as M,po as O,Zd as S,wo as T,_g as _,Tk as a,ym as b,zO as c,lO as d,xO as f,DD as g,YD as h,jz as i,Sa as j,io as k,FO as l,rO as m,Hz as n,lk as o,jO as p,Rz as r,tk as s,$z as t,_O as u,cg as v,id as w,im as x,Mh as y}; \ No newline at end of file diff --git a/internal/ui/dist/assets/mcp-app-frame-C0HSbiNW.js b/internal/ui/dist/assets/mcp-app-frame-BwFqSNsw.js similarity index 99% rename from internal/ui/dist/assets/mcp-app-frame-C0HSbiNW.js rename to internal/ui/dist/assets/mcp-app-frame-BwFqSNsw.js index b6f7f90..c6627b2 100644 --- a/internal/ui/dist/assets/mcp-app-frame-C0HSbiNW.js +++ b/internal/ui/dist/assets/mcp-app-frame-BwFqSNsw.js @@ -1,4 +1,4 @@ -import{a as e,d as t,f as n,g as r,h as i,m as a,p as o,u as s}from"./useNavigate-BEpS2iE5.js";import{b as c,f as l,h as u,i as d,m as f,w as p}from"./auth-DhIxmh_D.js";import{T as m}from"./index-Ckl_dWuh.js";function h(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function g(e,t=`|`){return e.map(e=>se(e)).join(t)}function _(e,t){return typeof t==`bigint`?t.toString():t}function v(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function y(e){return e==null}function b(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function x(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r){};function w(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var re=v(()=>{if(Ke.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function T(e){if(w(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return w(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ie(e){return T(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ae=new Set([`string`,`number`,`symbol`]);function oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function E(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ce(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var le={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return E(e,C(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&S(e,r,n.shape[r])}return S(this,`shape`,e),e},checks:[]}))}function de(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return E(e,C(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return S(this,`shape`,r),r},checks:[]}))}function fe(e,t){if(!T(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n}}))}function pe(e,t){if(!T(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n}}))}function me(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return S(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function he(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return E(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return S(this,`shape`,i),i},checks:[]}))}function ge(e,t,n){return E(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return S(this,`shape`,i),i}}))}function _e(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function be(e){return typeof e==`string`?e:e?.message}function xe(e,t,n){var r;for(let i=t;ie;return t[Le]=!0,t}var ze,Be=Object.freeze({status:`aborted`}),Ve={value:void 0,enumerable:!1},He=`captureStackTrace`in Error?Error:null;function Ue(e){let t=He;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return He=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ve.value=new a(r);try{Object.defineProperty(n,"_zod",Ve)}finally{Ve.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Oe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ue(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var We=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ge=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ze=globalThis).__zod_globalConfig??(ze.__zod_globalConfig={});var Ke=globalThis.__zod_globalConfig;function qe(e){return e&&Object.assign(Ke,e),Ke}function Je(){let e=this._zod;return e.message??=JSON.stringify(e.def,_,2),e.message}function Ye(e){this._zod.message=e}var Xe={get:Je,set:Ye,enumerable:!0,configurable:!0},Ze={value:void 0,enumerable:!1},Qe={value:void 0,enumerable:!1},$e=new WeakSet([Object.prototype,Error.prototype]),et=(e,t)=>{e.name=`$ZodError`,Ze.value=e._zod,Object.defineProperty(e,"_zod",Ze),Qe.value=t,Object.defineProperty(e,"issues",Qe),Ze.value=void 0,Qe.value=void 0,Object.defineProperty(e,"message",Xe);let n=Object.getPrototypeOf(e);$e.has(n)||($e.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},tt=k(`$ZodError`,et),nt=k(`$ZodError`,et,void 0,{Parent:Error});function rt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function it(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?rt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function at(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new We;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Se(e,o,qe())));throw ne(n,a?.callee??t),n}return s.value};return t},ct=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Se(e,o,qe())));throw ne(n,a?.callee??t),n}return s.value};return t},lt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new We;return a.issues.length?{success:!1,error:new(e??tt)(a.issues.map(e=>Se(e,i,qe())))}:{success:!0,data:a.value}},ut=lt(nt),dt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Se(e,i,qe())))}:{success:!0,data:a.value}},ft=dt(nt),pt=e=>{let t=st(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ot(n,a))};return n},mt=e=>{let t=st(e),n=(e,r,i,a)=>t(e,r,i,ot(n,a));return n},ht=e=>{let t=ct(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ot(n,a))};return n},gt=e=>{let t=ct(e),n=async(e,r,i,a)=>await t(e,r,i,ot(n,a));return n},_t=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lt(e)(t,n,i)},vt=e=>(t,n,r)=>lt(e)(t,n,r),yt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return dt(e)(t,n,i)},bt=e=>async(t,n,r)=>dt(e)(t,n,r),xt=/^[cC][0-9a-z]{6,}$/,St=/^[0-9a-z]+$/,Ct=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,wt=/^[0-9a-vA-V]{20}$/,Tt=/^[A-Za-z0-9]{27}$/,Et=/^[a-zA-Z0-9_-]{21}$/;function Dt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ot=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,At=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Mt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Nt(){return new RegExp(Mt,`u`)}var Pt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ft=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,It=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Lt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Rt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,zt=/^[A-Za-z0-9_-]*$/,Bt=/^https?$/,Vt=/^\+[1-9]\d{6,14}$/,Ht=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Ut(e){return RegExp(`^${e}$`)}var Wt=Ut(Ht);function Gt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kt(e){return RegExp(`^${Gt(e)}$`)}function qt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Gt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Gt({precision:e.precision})}`:n;return RegExp(`^${Ht}T(?:${r})$`)}var Jt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Yt=/^-?\d+$/,Xt=/^-?\d+(?:\.\d+)?$/,Zt=/^(?:true|false)$/i,Qt=/^null$/i,$t=/^undefined$/i,en=/^[^A-Z]*$/,tn=/^[^a-z]*$/,nn=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rn=e=>{let t=e.value;return!y(t)&&t.length!==void 0},an={number:`number`,bigint:`bigint`,object:`date`},on=k(`$ZodCheckLessThan`,(e,t)=>{nn.init(e,t);let n=an[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{nn.init(e,t);let n=an[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:an[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cn=k(`$ZodCheckMultipleOf`,(e,t)=>{nn.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):x(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ln=k(`$ZodCheckNumberFormat`,(e,t)=>{nn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=le[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Yt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),un=k(`$ZodCheckMaxLength`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?we(r):i)<=t.maximum)return;let a=Te(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dn=k(`$ZodCheckMinLength`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Te(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fn=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?we(r):i;if(a===t.length)return;let o=Te(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),pn=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;nn.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),mn=k(`$ZodCheckRegex`,(e,t)=>{pn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),hn=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=en,pn.init(e,t)}),gn=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=tn,pn.init(e,t)}),_n=k(`$ZodCheckIncludes`,(e,t)=>{nn.init(e,t);let n=oe(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),vn=k(`$ZodCheckStartsWith`,(e,t)=>{nn.init(e,t);let n=RegExp(`^${oe(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),yn=k(`$ZodCheckEndsWith`,(e,t)=>{nn.init(e,t);let n=RegExp(`.*${oe(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),bn=k(`$ZodCheckOverwrite`,(e,t)=>{nn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),xn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +import{a as e,d as t,f as n,g as r,h as i,m as a,p as o,u as s}from"./useNavigate-BEpS2iE5.js";import{b as c,f as l,h as u,i as d,m as f,w as p}from"./auth-DhIxmh_D.js";import{T as m}from"./index-DDtGd6G7.js";function h(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function g(e,t=`|`){return e.map(e=>se(e)).join(t)}function _(e,t){return typeof t==`bigint`?t.toString():t}function v(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function y(e){return e==null}function b(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function x(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r){};function w(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var re=v(()=>{if(Ke.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function T(e){if(w(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return w(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function ie(e){return T(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ae=new Set([`string`,`number`,`symbol`]);function oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function E(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function D(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function se(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ce(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var le={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function ue(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return E(e,C(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&S(e,r,n.shape[r])}return S(this,`shape`,e),e},checks:[]}))}function de(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return E(e,C(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return S(this,`shape`,r),r},checks:[]}))}function fe(e,t){if(!T(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n}}))}function pe(e,t){if(!T(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return S(this,`shape`,n),n}}))}function me(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return E(e,C(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return S(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function he(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return E(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return S(this,`shape`,i),i},checks:[]}))}function ge(e,t,n){return E(t,C(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return S(this,`shape`,i),i}}))}function _e(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function be(e){return typeof e==`string`?e:e?.message}function xe(e,t,n){var r;for(let i=t;ie;return t[Le]=!0,t}var ze,Be=Object.freeze({status:`aborted`}),Ve={value:void 0,enumerable:!1},He=`captureStackTrace`in Error?Error:null;function Ue(e){let t=He;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return He=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ve.value=new a(r);try{Object.defineProperty(n,"_zod",Ve)}finally{Ve.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Oe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ue(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var We=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ge=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ze=globalThis).__zod_globalConfig??(ze.__zod_globalConfig={});var Ke=globalThis.__zod_globalConfig;function qe(e){return e&&Object.assign(Ke,e),Ke}function Je(){let e=this._zod;return e.message??=JSON.stringify(e.def,_,2),e.message}function Ye(e){this._zod.message=e}var Xe={get:Je,set:Ye,enumerable:!0,configurable:!0},Ze={value:void 0,enumerable:!1},Qe={value:void 0,enumerable:!1},$e=new WeakSet([Object.prototype,Error.prototype]),et=(e,t)=>{e.name=`$ZodError`,Ze.value=e._zod,Object.defineProperty(e,"_zod",Ze),Qe.value=t,Object.defineProperty(e,"issues",Qe),Ze.value=void 0,Qe.value=void 0,Object.defineProperty(e,"message",Xe);let n=Object.getPrototypeOf(e);$e.has(n)||($e.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},tt=k(`$ZodError`,et),nt=k(`$ZodError`,et,void 0,{Parent:Error});function rt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function it(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?rt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function at(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new We;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Se(e,o,qe())));throw ne(n,a?.callee??t),n}return s.value};return t},ct=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Se(e,o,qe())));throw ne(n,a?.callee??t),n}return s.value};return t},lt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new We;return a.issues.length?{success:!1,error:new(e??tt)(a.issues.map(e=>Se(e,i,qe())))}:{success:!0,data:a.value}},ut=lt(nt),dt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Se(e,i,qe())))}:{success:!0,data:a.value}},ft=dt(nt),pt=e=>{let t=st(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ot(n,a))};return n},mt=e=>{let t=st(e),n=(e,r,i,a)=>t(e,r,i,ot(n,a));return n},ht=e=>{let t=ct(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ot(n,a))};return n},gt=e=>{let t=ct(e),n=async(e,r,i,a)=>await t(e,r,i,ot(n,a));return n},_t=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lt(e)(t,n,i)},vt=e=>(t,n,r)=>lt(e)(t,n,r),yt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return dt(e)(t,n,i)},bt=e=>async(t,n,r)=>dt(e)(t,n,r),xt=/^[cC][0-9a-z]{6,}$/,St=/^[0-9a-z]+$/,Ct=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,wt=/^[0-9a-vA-V]{20}$/,Tt=/^[A-Za-z0-9]{27}$/,Et=/^[a-zA-Z0-9_-]{21}$/;function Dt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Ot=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,At=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Mt=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Nt(){return new RegExp(Mt,`u`)}var Pt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ft=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,It=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Lt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Rt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,zt=/^[A-Za-z0-9_-]*$/,Bt=/^https?$/,Vt=/^\+[1-9]\d{6,14}$/,Ht=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Ut(e){return RegExp(`^${e}$`)}var Wt=Ut(Ht);function Gt(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kt(e){return RegExp(`^${Gt(e)}$`)}function qt(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Gt({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Gt({precision:e.precision})}`:n;return RegExp(`^${Ht}T(?:${r})$`)}var Jt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Yt=/^-?\d+$/,Xt=/^-?\d+(?:\.\d+)?$/,Zt=/^(?:true|false)$/i,Qt=/^null$/i,$t=/^undefined$/i,en=/^[^A-Z]*$/,tn=/^[^a-z]*$/,nn=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),rn=e=>{let t=e.value;return!y(t)&&t.length!==void 0},an={number:`number`,bigint:`bigint`,object:`date`},on=k(`$ZodCheckLessThan`,(e,t)=>{nn.init(e,t);let n=an[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{nn.init(e,t);let n=an[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:an[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cn=k(`$ZodCheckMultipleOf`,(e,t)=>{nn.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):x(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ln=k(`$ZodCheckNumberFormat`,(e,t)=>{nn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=le[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Yt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),un=k(`$ZodCheckMaxLength`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?we(r):i)<=t.maximum)return;let a=Te(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dn=k(`$ZodCheckMinLength`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Te(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fn=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;nn.init(e,t),(n=e._zod.def).when??(n.when=rn),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?we(r):i;if(a===t.length)return;let o=Te(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),pn=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;nn.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),mn=k(`$ZodCheckRegex`,(e,t)=>{pn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),hn=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=en,pn.init(e,t)}),gn=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=tn,pn.init(e,t)}),_n=k(`$ZodCheckIncludes`,(e,t)=>{nn.init(e,t);let n=oe(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),vn=k(`$ZodCheckStartsWith`,(e,t)=>{nn.init(e,t);let n=RegExp(`^${oe(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),yn=k(`$ZodCheckEndsWith`,(e,t)=>{nn.init(e,t);let n=RegExp(`.*${oe(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),bn=k(`$ZodCheckOverwrite`,(e,t)=>{nn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),xn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` `)}\n};`)(...Object.values(this.closed))}},Sn={major:4,minor:5,patch:4},A=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=_e(t),a;for(let o of n){if(o._zod.def.when){if(ve(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new We;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(xe(t.issues,n,e),i||=_e(t,n))});else{if(t.issues.length===n)continue;xe(t.issues,n,e),i||=_e(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(_e(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new We;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new We;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ae(this,`~standard`,wn(this))},set"~standard"(e){ke(this,`~standard`,e)}}),Cn=e=>e.success?{value:e.data}:{issues:e.error?.issues};function wn(e){return{validate:t=>{try{return Cn(ut(e,t))}catch{return ft(e,t).then(Cn)}},vendor:`zod`,version:1}}var Tn=k(`$ZodString`,(e,t)=>{A.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Jt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),j=k(`$ZodStringFormat`,(e,t)=>{pn.init(e,t),Tn.init(e,t)}),En=k(`$ZodGUID`,(e,t)=>{t.pattern??=kt,j.init(e,t)}),Dn=k(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=At(e)}else t.pattern??=At();j.init(e,t)}),On=k(`$ZodEmail`,(e,t)=>{t.pattern??=jt,j.init(e,t)});function kn(e,t){if(!t.normalize&&t.protocol?.source===Bt.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var An=/[\t\n\r]/g;function jn(e){return e.replace(An,``)}function Mn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Nn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Pn=k(`$ZodURL`,(e,t)=>{j.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=kn(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Mn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Nn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:jn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Fn=k(`$ZodEmoji`,(e,t)=>{t.pattern??=Nt(),j.init(e,t)}),In=k(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Et:Dt(t.length),j.init(e,t)}),Ln=k(`$ZodCUID`,(e,t)=>{t.pattern??=xt,j.init(e,t)}),Rn=k(`$ZodCUID2`,(e,t)=>{t.pattern??=St,j.init(e,t)}),zn=k(`$ZodULID`,(e,t)=>{t.pattern??=Ct,j.init(e,t)}),Bn=k(`$ZodXID`,(e,t)=>{t.pattern??=wt,j.init(e,t)}),Vn=k(`$ZodKSUID`,(e,t)=>{t.pattern??=Tt,j.init(e,t)}),Hn=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=qt(t),j.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Un=k(`$ZodISODate`,(e,t)=>{t.pattern??=Wt,j.init(e,t)}),Wn=k(`$ZodISOTime`,(e,t)=>{t.pattern??=Kt(t),j.init(e,t)}),Gn=k(`$ZodISODuration`,(e,t)=>{t.pattern??=Ot,j.init(e,t)}),Kn=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Pt,j.init(e,t),e._zod.bag.format=`ipv4`}),qn=/^[0-9a-fA-F:.]+$/;function Jn(e){if(!qn.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var Yn=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Ft,j.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Jn(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Xn=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=It,j.init(e,t)});function Zn(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Jn(n)}var Qn=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Lt,j.init(e,t),e._zod.check=n=>{Zn(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function $n(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var er=k(`$ZodBase64`,(e,t)=>{t.pattern??=Rt,j.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{$n(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function tr(e){if(!zt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return $n(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var nr=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=zt,j.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{tr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),rr=k(`$ZodE164`,(e,t)=>{t.pattern??=Vt,j.init(e,t)});function ir(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ar=k(`$ZodJWT`,(e,t)=>{j.init(e,t),e._zod.check=n=>{ir(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),or=k(`$ZodNumber`,(e,t)=>{A.init(e,t),e._zod.pattern=e._zod.bag.pattern??Xt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),sr=k(`$ZodNumberFormat`,(e,t)=>{ln.init(e,t),or.init(e,t)}),cr=k(`$ZodBoolean`,(e,t)=>{A.init(e,t),e._zod.pattern=Zt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),lr=k(`$ZodUndefined`,(e,t)=>{A.init(e,t),e._zod.pattern=$t,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),ur=k(`$ZodNull`,(e,t)=>{A.init(e,t),e._zod.pattern=Qt,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),dr=k(`$ZodAny`,(e,t)=>{A.init(e,t),e._zod.parse=e=>e}),fr=k(`$ZodUnknown`,(e,t)=>{A.init(e,t),e._zod.parse=e=>e}),pr=k(`$ZodNever`,(e,t)=>{A.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function mr(e,t,n){e.issues.length&&t.issues.push(...ye(n,e.issues)),t.value[n]=e.value}var hr=k(`$ZodArray`,(e,t)=>{A.init(e,t);let n=Ke.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;emr(t,r,e))):mr(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}});function gr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...ye(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}var _r=[];function vr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:_r,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ce(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function yr(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>gr(e,n,i,t,u,d))):gr(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var br=new WeakMap,xr=k(`$ZodObject`,(e,t)=>{if(A.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;br.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),br.set(t,n),n}})}let n=v(()=>vr(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||S(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=w,i=t.catchall,a,o=Ke.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>gr(n,t,e,c,r,i))):gr(a,t,e,c,r,i)}return i?yr(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Sr=k(`$ZodObjectJIT`,(e,t)=>{xr.init(e,t);let n=e._zod.parse,r=v(()=>vr(t)),i=Ke.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new xn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` for (let i = 0; i < ${e}.issues.length; i++) { diff --git a/internal/ui/dist/index.html b/internal/ui/dist/index.html index 4260692..f7820dc 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/bun.lock b/ui/host/bun.lock index 7f79bb5..9d47107 100644 --- a/ui/host/bun.lock +++ b/ui/host/bun.lock @@ -5,7 +5,7 @@ "": { "name": "@fanout/web", "dependencies": { - "@ag-ui/client": "0.0.58", + "@ag-ui/client": "0.0.59", "@fontsource/ibm-plex-mono": "^5.3.0", "@fontsource/ibm-plex-sans": "^5.3.0", "@mantine/core": "9.5.2", @@ -13,7 +13,7 @@ "@modelcontextprotocol/ext-apps": "1.7.5", "@modelcontextprotocol/sdk": "1.30.0", "@phosphor-icons/react": "2.1.10", - "@tanstack/react-query": "5.102.5", + "@tanstack/react-query": "5.102.8", "@tanstack/react-router": "1.170.32", "react": "19.2.8", "react-dom": "19.2.8", @@ -27,7 +27,7 @@ "@types/react": "19.2.18", "@types/react-dom": "19.2.5", "@vitejs/plugin-react": "6.1.0", - "happy-dom": "20.11.6", + "happy-dom": "20.11.12", "typescript": "7.0.2", "vite": "8.2.2", "vitest": "^4.1.11", @@ -42,13 +42,13 @@ "nanoid": "3.3.18", }, "packages": { - "@ag-ui/client": ["@ag-ui/client@0.0.58", "", { "dependencies": { "@ag-ui/core": "0.0.58", "@ag-ui/encoder": "0.0.58", "@ag-ui/proto": "0.0.58", "@types/uuid": "^10.0.0", "compare-versions": "^6.1.1", "fast-json-patch": "^3.1.1", "rxjs": "7.8.1", "untruncate-json": "^0.0.1", "uuid": "^11.1.0", "zod": "^3.22.4" } }, "sha512-9tAUJ6Ot0y2f5Va7xGFhUSO5OPAjilMsPdmKNmAUR774LKWcvNpriJ6mqH3p/ewUue1zfoUo4vpX+9Xo/zsuzA=="], + "@ag-ui/client": ["@ag-ui/client@0.0.59", "", { "dependencies": { "@ag-ui/core": "0.0.59", "@ag-ui/encoder": "0.0.59", "@ag-ui/proto": "0.0.59", "@types/uuid": "^10.0.0", "compare-versions": "^6.1.1", "fast-json-patch": "^3.1.1", "rxjs": "7.8.1", "untruncate-json": "^0.0.1", "uuid": "^11.1.0", "zod": "^3.22.4" } }, "sha512-d7++r8sBAq6z9G/D/WKrMznQ1Mdvew14pCqOVATReFIvl06mCi1BPqTwmos3zCDGAIiSgcvxc/8m472rYQgFFQ=="], - "@ag-ui/core": ["@ag-ui/core@0.0.58", "", { "dependencies": { "zod": "^3.22.4" } }, "sha512-XgGb7YmhV+yMBaEmlrpsd5S+nUxq0JgSegss2t4gIFR1j7w3w0ibtKfRgcQHWeMvwZxcT5S28VEEarqtgxYYHw=="], + "@ag-ui/core": ["@ag-ui/core@0.0.59", "", { "dependencies": { "zod": "^3.22.4" } }, "sha512-hDgy4ipTqXieT8YG8Mr917Y+FD/f11VK1GefZ5CwTDCuNqS/oTwjJ5l/DZkicThgS8hQW/Y7wPylPBMBJ8BkUg=="], - "@ag-ui/encoder": ["@ag-ui/encoder@0.0.58", "", { "dependencies": { "@ag-ui/core": "0.0.58", "@ag-ui/proto": "0.0.58" } }, "sha512-eMfjJbfAGTQECgNX3QO0Mt0V5OrIViowSPmGLzdO92q2x506K2hRs2VBlfEuAzpDFp6Eq23Q/vjNHFzv37StZw=="], + "@ag-ui/encoder": ["@ag-ui/encoder@0.0.59", "", { "dependencies": { "@ag-ui/core": "0.0.59", "@ag-ui/proto": "0.0.59" } }, "sha512-wQCzBsStyZMm8nzhTdTx1G0B1C8yv5rbzZLnz1ka/l5LcJEsK3KTounU8CR9l+7QtcpOUUDJKd0xAbyI6gNcSw=="], - "@ag-ui/proto": ["@ag-ui/proto@0.0.58", "", { "dependencies": { "@ag-ui/core": "0.0.58", "@bufbuild/protobuf": "^2.2.5", "@protobuf-ts/protoc": "^2.11.1" } }, "sha512-fErOnFPfpZlNSreeOEdUVuCzTQI463JoUo1DNx4grAvSZPOg4tVgqvG2s82qJE9pZoh48VSUqk6hyV82GT/wIA=="], + "@ag-ui/proto": ["@ag-ui/proto@0.0.59", "", { "dependencies": { "@ag-ui/core": "0.0.59", "@bufbuild/protobuf": "^2.2.5", "@protobuf-ts/protoc": "^2.11.1" } }, "sha512-X+uvDaegLEHw5kJu8tv2eSqHH8ouat+JCfFokGV1uuMquY8qCEQSlGsM7xzexwX9fujuxgHOWumg5kJDqa0+RA=="], "@babel/code-frame": ["@babel/code-frame@7.29.7", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.29.7", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw=="], @@ -160,9 +160,9 @@ "@tanstack/history": ["@tanstack/history@1.162.1", "", {}, "sha512-DR9t6lfLVdrjgCwpglrR9DR7Ok8/HlXjcOE+goWXF3zyuLUO/ug7vMbSFxTqrQTtbRghJfyhmIZ0S6LhPIy44w=="], - "@tanstack/query-core": ["@tanstack/query-core@5.102.5", "", {}, "sha512-RjCmHf9cPRYcH/dpO0Jagw3rxCM1bLzMKKSGzaDkQJADDKGpv5RFjN54IyHSOIPa822AUA7ASOXDjjy1jfyzIA=="], + "@tanstack/query-core": ["@tanstack/query-core@5.102.8", "", {}, "sha512-ZNjkJ33CqvPNec/6lZBnHqLc3EVGPZ9ySLhYahU9TcuRFdmwXewuj0c4hwSWcGHqEUwcSrKeZ+oGcvPBqXcQcg=="], - "@tanstack/react-query": ["@tanstack/react-query@5.102.5", "", { "dependencies": { "@tanstack/query-core": "5.102.5" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-PyTmSq2nW4MnPuQ/T4hZbH2BYShpgCLSJNwCaPEEYO3RWd9yX611wOMm7etz2SZWVh4N7Azag5iZLMDqYTzfNA=="], + "@tanstack/react-query": ["@tanstack/react-query@5.102.8", "", { "dependencies": { "@tanstack/query-core": "5.102.8" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-TYBea4OuXWD7MhaSHq069TWbFe7rcwWN6kzT7JF0OKi1K6c1gTv2IzD6A6ExJsCMozdkqBWeuIUZmu4KQg0O5A=="], "@tanstack/react-router": ["@tanstack/react-router@1.170.32", "", { "dependencies": { "@tanstack/history": "1.162.1", "@tanstack/react-store": "^0.9.3", "@tanstack/router-core": "1.171.27", "isbot": "^5.1.22" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-SIpxvaTKco100a5ZR3ePmArbhtm3XOx+w1dpGYY9gxHDta4iXSKDdQuhLonwJbIMkVJsU1rwXf0UDHMrF/1snw=="], @@ -424,7 +424,7 @@ "gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="], - "happy-dom": ["happy-dom@20.11.6", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-Hldbg8AdAa5a5oDcZpjqnGitp7JB0hqWmfv/8qr+kft4vzSD8BHsbdRfzYvL/0QcbKcURC/yyoygbeDQarPvYg=="], + "happy-dom": ["happy-dom@20.11.12", "", { "dependencies": { "@types/node": ">=20.0.0", "@types/whatwg-mimetype": "^3.0.2", "@types/ws": "^8.18.1", "buffer-image-size": "^0.6.4", "entities": "^7.0.1", "whatwg-mimetype": "^3.0.0", "ws": "^8.21.0" } }, "sha512-7+mrTTD+6fOG3dx0URrDLrCX8QDTE+YujSOQD4VPZcYze/yJ0vVhRKaIBTjqlk+R4NetxVz21odnevHYIjIJ+g=="], "has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="], @@ -644,7 +644,7 @@ "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="], - "postcss": ["postcss@8.5.27", "", { "dependencies": { "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-79Iho8QeYyooJ8e9lCRyTVlyTAkS/kXBYKff6TMzS3kEWGQ8Ds5UEtXpGrSUDLUWok6QTvxeYy0GO8fopHnaSA=="], + "postcss": ["postcss@8.5.28", "", { "dependencies": { "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A=="], "prettier": ["prettier@3.9.6", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g=="], diff --git a/ui/host/package.json b/ui/host/package.json index a9a4b61..52cff30 100644 --- a/ui/host/package.json +++ b/ui/host/package.json @@ -12,7 +12,7 @@ "test": "vitest run" }, "dependencies": { - "@ag-ui/client": "0.0.58", + "@ag-ui/client": "0.0.59", "@fontsource/ibm-plex-mono": "^5.3.0", "@fontsource/ibm-plex-sans": "^5.3.0", "@mantine/core": "9.5.2", @@ -20,7 +20,7 @@ "@modelcontextprotocol/ext-apps": "1.7.5", "@modelcontextprotocol/sdk": "1.30.0", "@phosphor-icons/react": "2.1.10", - "@tanstack/react-query": "5.102.5", + "@tanstack/react-query": "5.102.8", "@tanstack/react-router": "1.170.32", "react": "19.2.8", "react-dom": "19.2.8", @@ -34,7 +34,7 @@ "@types/react": "19.2.18", "@types/react-dom": "19.2.5", "@vitejs/plugin-react": "6.1.0", - "happy-dom": "20.11.6", + "happy-dom": "20.11.12", "typescript": "7.0.2", "vite": "8.2.2", "vitest": "^4.1.11"