@lsamien/yaovi 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/build-info.json +12 -4
  2. package/dist/assets/{AboutDialog-CDpS-zAu.js → AboutDialog-2Zq3b7ma.js} +2 -2
  3. package/dist/assets/{AboutDialog-CDpS-zAu.js.map → AboutDialog-2Zq3b7ma.js.map} +1 -1
  4. package/dist/assets/{BotAutomationsView-RXBQzdfc.js → BotAutomationsView-C4EwHtYy.js} +2 -2
  5. package/dist/assets/{BotAutomationsView-RXBQzdfc.js.map → BotAutomationsView-C4EwHtYy.js.map} +1 -1
  6. package/dist/assets/{BotControlSettingsPanel-GQEVHXbw.js → BotControlSettingsPanel-DJ71O3Kh.js} +2 -2
  7. package/dist/assets/{BotControlSettingsPanel-GQEVHXbw.js.map → BotControlSettingsPanel-DJ71O3Kh.js.map} +1 -1
  8. package/dist/assets/{BotPluginsDialog-HIhXqyGn.js → BotPluginsDialog-Cgqn4RlP.js} +2 -2
  9. package/dist/assets/{BotPluginsDialog-HIhXqyGn.js.map → BotPluginsDialog-Cgqn4RlP.js.map} +1 -1
  10. package/dist/assets/{BotSettingsPanel-Bkqal3lR.js → BotSettingsPanel-C_1zAGWJ.js} +3 -3
  11. package/dist/assets/{BotSettingsPanel-Bkqal3lR.js.map → BotSettingsPanel-C_1zAGWJ.js.map} +1 -1
  12. package/dist/assets/{ComputerPanel-Dt73pgTG.js → ComputerPanel-CuVl9oX7.js} +2 -2
  13. package/dist/assets/{ComputerPanel-Dt73pgTG.js.map → ComputerPanel-CuVl9oX7.js.map} +1 -1
  14. package/dist/assets/{ComputerViewerView-ChYgaS9q.js → ComputerViewerView-BoI_aqLr.js} +2 -2
  15. package/dist/assets/{ComputerViewerView-ChYgaS9q.js.map → ComputerViewerView-BoI_aqLr.js.map} +1 -1
  16. package/dist/assets/{ConversationsView-EdF5AM1T.css → ConversationsView-aPMgqa0O.css} +1 -1
  17. package/dist/assets/{ConversationsView-DzcDJZh3.js → ConversationsView-kztie5lF.js} +16 -16
  18. package/dist/assets/ConversationsView-kztie5lF.js.map +1 -0
  19. package/dist/assets/{LocalVmSettingsPanel-DLbDb5Tq.js → LocalVmSettingsPanel-BZ1Jeqqk.js} +2 -2
  20. package/dist/assets/{LocalVmSettingsPanel-DLbDb5Tq.js.map → LocalVmSettingsPanel-BZ1Jeqqk.js.map} +1 -1
  21. package/dist/assets/{ModelNetworkChoice-Cfyt4Unl.js → ModelNetworkChoice-BQ8m2N3V.js} +2 -2
  22. package/dist/assets/{ModelNetworkChoice-Cfyt4Unl.js.map → ModelNetworkChoice-BQ8m2N3V.js.map} +1 -1
  23. package/dist/assets/{StandaloneDialog-Cte829Ai.js → StandaloneDialog-hF3z7bfi.js} +2 -2
  24. package/dist/assets/{StandaloneDialog-Cte829Ai.js.map → StandaloneDialog-hF3z7bfi.js.map} +1 -1
  25. package/dist/assets/{UpdateCheckDialog-BaMo_M4n.js → UpdateCheckDialog-Bz8JhRh4.js} +2 -2
  26. package/dist/assets/{UpdateCheckDialog-BaMo_M4n.js.map → UpdateCheckDialog-Bz8JhRh4.js.map} +1 -1
  27. package/dist/assets/{UsageView-CklMPG4n.js → UsageView-ZsSbQzIY.js} +2 -2
  28. package/dist/assets/{UsageView-CklMPG4n.js.map → UsageView-ZsSbQzIY.js.map} +1 -1
  29. package/dist/assets/WorkspaceKnowledgePanel-E549Ct1E.js +3 -0
  30. package/dist/assets/{WorkspaceKnowledgePanel-BdbhD3rO.js.map → WorkspaceKnowledgePanel-E549Ct1E.js.map} +1 -1
  31. package/dist/assets/{WorkspaceRoutinesPanel-VpRoMe1x.js → WorkspaceRoutinesPanel-NFWzy1R-.js} +2 -2
  32. package/dist/assets/{WorkspaceRoutinesPanel-VpRoMe1x.js.map → WorkspaceRoutinesPanel-NFWzy1R-.js.map} +1 -1
  33. package/dist/assets/{WorkstreamsView-BwZpuuhs.js → WorkstreamsView-CxZ8YUvP.js} +2 -2
  34. package/dist/assets/{WorkstreamsView-BwZpuuhs.js.map → WorkstreamsView-CxZ8YUvP.js.map} +1 -1
  35. package/dist/assets/{index-Cx1SdzRY.js → index-P_kZCZ2-.js} +3 -3
  36. package/dist/assets/{index-Cx1SdzRY.js.map → index-P_kZCZ2-.js.map} +1 -1
  37. package/dist/assets/{pdf-CoNh_Rmj.js → pdf-CNS_Rszb.js} +2 -2
  38. package/dist/assets/{pdf-CoNh_Rmj.js.map → pdf-CNS_Rszb.js.map} +1 -1
  39. package/dist/index.html +1 -1
  40. package/dist-server/server/workspaceCollaboration.js +9 -12
  41. package/dist-server/server/workspaceStore.js +3 -1
  42. package/dist-server/shared/peerExchange.js +26 -0
  43. package/package.json +1 -1
  44. package/release.json +3 -3
  45. package/dist/assets/ConversationsView-DzcDJZh3.js.map +0 -1
  46. package/dist/assets/WorkspaceKnowledgePanel-BdbhD3rO.js +0 -3
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ComputerViewerView-ChYgaS9q.js","assets/_plugin-vue_export-helper-CD0r-vVb.js","assets/ComputerPanel-Dt73pgTG.js","assets/ComputerPanel-BcXhqQ9K.css","assets/ComputerViewerView-BSlZUXAH.css","assets/UsageView-CklMPG4n.js","assets/UsageView-1aPSK3B8.css","assets/BotAutomationsView-RXBQzdfc.js","assets/WorkspaceRoutinesPanel-VpRoMe1x.js","assets/WorkspaceRoutinesPanel-CbLiNc6R.css","assets/BotAutomationsView-DeJ-e3y5.css","assets/WorkstreamsView-BwZpuuhs.js","assets/backgroundTaskPresentation-CJMcreMr.js","assets/WorkstreamsView-CiQeYI0x.css","assets/ConversationsView-DzcDJZh3.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/WorkspaceKnowledgePanel-BdbhD3rO.js","assets/WorkspaceKnowledgePanel-CBlUplay.css","assets/StandaloneDialog-Cte829Ai.js","assets/StandaloneDialog-BS6Ta2zL.css","assets/ModelNetworkChoice-Cfyt4Unl.js","assets/ModelNetworkChoice-CvoBde4M.css","assets/ConversationsView-EdF5AM1T.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ComputerViewerView-BoI_aqLr.js","assets/_plugin-vue_export-helper-CD0r-vVb.js","assets/ComputerPanel-CuVl9oX7.js","assets/ComputerPanel-BcXhqQ9K.css","assets/ComputerViewerView-BSlZUXAH.css","assets/UsageView-ZsSbQzIY.js","assets/UsageView-1aPSK3B8.css","assets/BotAutomationsView-C4EwHtYy.js","assets/WorkspaceRoutinesPanel-NFWzy1R-.js","assets/WorkspaceRoutinesPanel-CbLiNc6R.css","assets/BotAutomationsView-DeJ-e3y5.css","assets/WorkstreamsView-CxZ8YUvP.js","assets/backgroundTaskPresentation-CJMcreMr.js","assets/WorkstreamsView-CiQeYI0x.css","assets/ConversationsView-kztie5lF.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/WorkspaceKnowledgePanel-E549Ct1E.js","assets/WorkspaceKnowledgePanel-CBlUplay.css","assets/StandaloneDialog-hF3z7bfi.js","assets/StandaloneDialog-BS6Ta2zL.css","assets/ModelNetworkChoice-BQ8m2N3V.js","assets/ModelNetworkChoice-CvoBde4M.css","assets/ConversationsView-aPMgqa0O.css"])))=>i.map(i=>d[i]);
2
2
  import{i as e,t}from"./rolldown-runtime-Dd_uD5pT.js";import{A as n,C as r,Ct as i,D as a,Dt as o,Et as s,F as c,G as l,H as u,I as d,J as f,K as p,L as m,M as h,N as g,O as _,Ot as v,Q as y,S as ee,St as te,Tt as b,X as x,Y as S,Z as C,_ as w,_t as T,a as E,at as ne,b as D,bt as re,c as ie,ct as ae,d as O,dt as oe,et as k,f as se,ft as ce,gt as le,h as ue,ht as de,j as fe,kt as pe,lt as me,m as A,mt as he,n as ge,nt as _e,p as ve,pt as ye,q as be,r as xe,rt as Se,st as j,t as Ce,tt as we,u as Te,ut as Ee,v as De,vt as Oe,w as ke,wt as Ae,xt as je,yt as Me,z as Ne}from"./_plugin-vue_export-helper-CD0r-vVb.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 Pe=void 0,Fe=typeof window<`u`&&window.trustedTypes;if(Fe)try{Pe=Fe.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ie=Pe?e=>Pe.createHTML(e):e=>e,Le=`http://www.w3.org/2000/svg`,Re=`http://www.w3.org/1998/Math/MathML`,ze=typeof document<`u`?document:null,Be=ze&&ze.createElement(`template`),Ve={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ze.createElementNS(Le,e):t===`mathml`?ze.createElementNS(Re,e):n?ze.createElement(e,{is:n}):ze.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ze.createTextNode(e),createComment:e=>ze.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ze.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Be.innerHTML=Ie(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Be.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},He=`transition`,Ue=`animation`,We=Symbol(`_vtc`),Ge={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ke=Ee({},xe,Ge),qe=(e=>(e.displayName=`Transition`,e.props=Ke,e))((e,{slots:t})=>ee(ge,Xe(e),t)),Je=(e,t=[])=>{he(e)?e.forEach(e=>e(...t)):e&&e(...t)},Ye=e=>e?he(e)?e.some(e=>e.length>1):e.length>1:!1;function Xe(e){let t={};for(let n in e)n in Ge||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=Ze(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:ee,onLeaveCancelled:te,onBeforeAppear:b=_,onAppear:x=v,onAppearCancelled:S=y}=t,C=(e,t,n,r)=>{e._enterCancelled=r,et(e,t?u:s),et(e,t?l:o),n&&n()},w=(e,t)=>{e._isLeaving=!1,et(e,d),et(e,p),et(e,f),t&&t()},T=e=>(t,n)=>{let i=e?x:v,o=()=>C(t,e,n);Je(i,[t,o]),tt(()=>{et(t,e?c:a),$e(t,e?u:s),Ye(i)||rt(t,r,h,o)})};return Ee(t,{onBeforeEnter(e){Je(_,[e]),$e(e,a),$e(e,o)},onBeforeAppear(e){Je(b,[e]),$e(e,c),$e(e,l)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>w(e,t);$e(e,d),e._enterCancelled?($e(e,f),st(e)):(st(e),$e(e,f)),tt(()=>{e._isLeaving&&(et(e,d),$e(e,p),Ye(ee)||rt(e,r,g,n))}),Je(ee,[e,n])},onEnterCancelled(e){C(e,!1,void 0,!0),Je(y,[e])},onAppearCancelled(e){C(e,!0,void 0,!0),Je(S,[e])},onLeaveCancelled(e){w(e),Je(te,[e])}})}function Ze(e){if(e==null)return null;if(T(e))return[Qe(e.enter),Qe(e.leave)];{let t=Qe(e);return[t,t]}}function Qe(e){return pe(e)}function $e(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[We]||(e[We]=new Set)).add(t)}function et(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[We];n&&(n.delete(t),n.size||(e[We]=void 0))}function tt(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var nt=0;function rt(e,t,n,r){let i=e._endId=++nt,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=it(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function it(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${He}Delay`),a=r(`${He}Duration`),o=at(i,a),s=r(`${Ue}Delay`),c=r(`${Ue}Duration`),l=at(s,c),u=null,d=0,f=0;t===He?o>0&&(u=He,d=o,f=a.length):t===Ue?l>0&&(u=Ue,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?He:Ue:null,f=u?u===He?a.length:c.length:0);let p=u===He&&/\b(?:transform|all)(?:,|$)/.test(r(`${He}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function at(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>ot(t)+ot(e[n])))}function ot(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function st(e){return(e?e.ownerDocument:document).body.offsetHeight}function ct(e,t,n){let r=e[We];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var lt=Symbol(`_vod`),ut=Symbol(`_vsh`),dt={name:`show`,beforeMount(e,{value:t},{transition:n}){e[lt]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):ft(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),ft(e,!0),r.enter(e)):r.leave(e,()=>{ft(e,!1)}):ft(e,t))},beforeUnmount(e,{value:t}){ft(e,t)}};function ft(e,t){e.style.display=t?e[lt]:`none`,e[ut]=!t}var pt=Symbol(``),mt=/(?:^|;)\s*display\s*:/;function ht(e,t,n){let r=e.style,i=je(n),a=!1;if(n&&!i){if(t){if(je(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??_t(r,t,``)}else for(let e in t)n[e]??_t(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?_t(r,i,``):xt(e,i,!je(t)&&t?t[i]:void 0,o)||_t(r,i,o)}}else if(i){if(t!==n){let e=r[pt];e&&(n+=`;`+e),r.cssText=n,a=mt.test(n)}}else t&&e.removeAttribute(`style`);lt in e&&(e[lt]=a?r.display:``,e[ut]&&(r.display=`none`))}var gt=/\s*!important$/;function _t(e,t,n){if(he(n))n.forEach(n=>_t(e,t,n));else if(n??=``,t.startsWith(`--`))gt.test(n)?e.setProperty(t,n.replace(gt,``),`important`):e.setProperty(t,n);else{let r=bt(e,t);gt.test(n)?e.setProperty(oe(r),n.replace(gt,``),`important`):e[r]=n}}var vt=[`Webkit`,`Moz`,`ms`],yt={};function bt(e,t){let n=yt[t];if(n)return n;let r=ae(t);if(r!==`filter`&&r in e)return yt[t]=r;r=me(r);for(let n=0;n<vt.length;n++){let i=vt[n]+r;if(i in e)return yt[t]=i}return t}function xt(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&je(r)&&n===r}var St=`http://www.w3.org/1999/xlink`;function Ct(e,t,n,r,i,a=re(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(St,t.slice(6,t.length)):e.setAttributeNS(St,t,n):n==null||a&&!ce(n)?e.removeAttribute(t):e.setAttribute(t,a?``:te(n)?String(n):n)}function wt(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Ie(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ce(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Tt(e,t,n,r){e.addEventListener(t,n,r)}function Et(e,t,n,r){e.removeEventListener(t,n,r)}var Dt=Symbol(`_vei`);function Ot(e,t,n,r,i=null){let a=e[Dt]||(e[Dt]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=jt(t);r?Tt(e,n,a[t]=Ft(r,i),s):o&&(Et(e,n,o,s),a[t]=void 0)}}var kt=/(Once|Passive|Capture)$/,At=/^on:?(?:Once|Passive|Capture)$/;function jt(e){let t,n;for(;(n=e.match(kt))&&!At.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):oe(e.slice(2)),t]}var Mt=0,Nt=Promise.resolve(),Pt=()=>Mt||=(Nt.then(()=>Mt=0),Date.now());function Ft(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(he(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&ie(e,t,5,a)}}else ie(r,t,5,[e])};return n.value=e,n.attached=Pt(),n}var It=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Lt=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?ct(e,r,o):t===`style`?ht(e,n,r):Oe(t)?le(t)||Ot(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):Rt(e,t,r,o))?(wt(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Ct(e,t,r,o,a,t!==`value`)):e._isVueCE&&(zt(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!je(r)))?wt(e,ae(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Ct(e,t,r,o))};function Rt(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&It(t)&&de(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return It(t)&&je(n)?!1:t in e}function zt(e,t){let n=e._def.props;if(!n)return!1;let r=ae(t);return Array.isArray(n)?n.some(e=>ae(e)===r):Object.keys(n).some(e=>ae(e)===r)}var Bt=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return he(t)?e=>ye(t,e):t};function Vt(e){e.target.composing=!0}function Ht(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Ut=Symbol(`_assign`),Wt=Symbol(`_initialValue`);function Gt(e,t,n){return t&&(e=e.trim()),n&&(e=b(e)),e}var Kt={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[Wt]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[Wt]=e.defaultValue.replace(/\r\n?/g,`
3
3
  `))),e[Ut]=Bt(i);let a=r||i.props&&i.props.type===`number`;Tt(e,t?`change`:`input`,t=>{t.target.composing||e[Ut](Gt(e.value,n,a))}),(n||a)&&Tt(e,`change`,()=>{e.value=Gt(e.value,n,a)}),t||(Tt(e,`compositionstart`,Vt),Tt(e,`compositionend`,Ht),Tt(e,`change`,Ht))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[Wt];delete e[Wt],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[Ut](Gt(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Ut]=Bt(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?b(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},qt={deep:!0,created(e,t,n){e[Ut]=Bt(n),Tt(e,`change`,()=>{let t=e._modelValue,n=$t(e),r=e.checked,i=e[Ut];if(he(t)){let e=Ae(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(Me(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(en(e,r))})},mounted:Jt,beforeUpdate(e,t,n){e[Ut]=Bt(n),Jt(e,t,n)}};function Jt(e,{value:t,oldValue:n},r){e._modelValue=t;let a;if(he(t))a=Ae(t,r.props.value)>-1;else if(Me(t))a=t.has(r.props.value);else{if(t===n)return;a=i(t,en(e,!0))}e.checked!==a&&(e.checked=a)}var Yt={created(e,{value:t},n){e.checked=i(t,n.props.value),e[Ut]=Bt(n),Tt(e,`change`,()=>{e[Ut]($t(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Ut]=Bt(r),t!==n&&(e.checked=i(t,r.props.value))}},Xt={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Tt(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?b($t(e)):$t(e)),r=e.multiple,i=r?Me(e._modelValue)?new Set(t):t:t[0],o=e._pendingValue=[r,r?he(i)?t.slice():t:i];try{e[Ut](i)}finally{a(()=>{e._pendingValue===o&&(e._pendingValue=void 0)})}}),e[Ut]=Bt(r)},mounted(e,{value:t}){Qt(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Ut]=Bt(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Zt(t,n[1],n[0]))&&Qt(e,t)}};function Zt(e,t,n){if(!n||he(e))return i(e,t);if(Me(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function Qt(e,t){let n=e.multiple,r=he(t);if(!(n&&!r&&!Me(t))){for(let a=0,o=e.options.length;a<o;a++){let o=e.options[a],s=$t(o);if(n){if(r){let e=typeof s;o.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(s)):Ae(t,s)>-1}else o.selected=t.has(s)}else if(i($t(o),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function $t(e){return`_value`in e?e._value:e.value}function en(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var tn={created(e,t,n){rn(e,t,n,null,`created`)},mounted(e,t,n){rn(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){rn(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){rn(e,t,n,r,`updated`)}};function nn(e,t){switch(e){case`SELECT`:return Xt;case`TEXTAREA`:return Kt;default:switch(t){case`checkbox`:return qt;case`radio`:return Yt;default:return Kt}}}function rn(e,t,n,r,i){let a=nn(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}var an=[`ctrl`,`shift`,`alt`,`meta`],on={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>an.some(n=>e[`${n}Key`]&&!t.includes(n))},sn=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=on[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},cn={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},ln=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=oe(n.key);if(t.some(e=>e===r||cn[e]===r))return e(n)}))},un=Ee({patchProp:Lt},Ve),dn;function fn(){return dn||=ue(un)}var pn=((...e)=>{let t=fn().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=hn(e);if(!r)return;let i=t._component;!de(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,mn(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function mn(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function hn(e){return je(e)?document.querySelector(e):e}var gn=typeof window<`u`,_n,vn=e=>_n=e,yn=Symbol();function bn(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var xn;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(xn||={});var Sn=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function Cn(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function wn(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){kn(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Tn(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function En(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var Dn=typeof navigator==`object`?navigator:{userAgent:``},On=/Macintosh/.test(Dn.userAgent)&&/AppleWebKit/.test(Dn.userAgent)&&!/Safari/.test(Dn.userAgent),kn=gn?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!On?An:`msSaveOrOpenBlob`in Dn?jn:Mn:()=>{};function An(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?En(r):Tn(r.href)?wn(e,t,n):(r.target=`_blank`,En(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){En(r)},0))}function jn(e,t=`download`,n){if(typeof e==`string`){if(Tn(e))wn(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){En(t)})}}else navigator.msSaveOrOpenBlob(Cn(e,n),t)}function Mn(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return wn(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Sn.HTMLElement))||`safari`in Sn,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||On)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:Nn}=Object;function Pn(){let e=p(!0),t=e.run(()=>k({})),n=[],r=[],i=x({install(e){vn(i),i._a=e,e.provide(yn,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var Fn=()=>{};function In(e,t,n,r=Fn){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&be()&&C(i),i}function Ln(e,...t){e.forEach(e=>{e(...t)})}var Rn=e=>e(),zn=Symbol(),Bn=Symbol();function Vn(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];e[n]=bn(i)&&bn(r)&&e.hasOwnProperty(n)&&!S(r)&&!f(r)?Vn(i,r):r}return e}var Hn=Symbol();function Un(e){return!bn(e)||!Object.prototype.hasOwnProperty.call(e,Hn)}var{assign:Wn}=Object;function Gn(e){return!!(S(e)&&e.effect)}function Kn(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),Wn(ne(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=x(Te(()=>{vn(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=qn(e,l,t,n,r,!0),c}function qn(e,t,n={},r,i,o){let s,c=Wn({actions:{}},n),l={deep:!0},d,m,h=new Set,g=new Set,_,v=r.state.value[e];!o&&!v&&(r.state.value[e]={}),k({});let ee;function te(t){let n;d=m=!1,typeof t==`function`?(t(r.state.value[e]),n={type:xn.patchFunction,storeId:e,events:_}):(Vn(r.state.value[e],t),n={type:xn.patchObject,payload:t,storeId:e,events:_});let i=ee=Symbol();a().then(()=>{ee===i&&(d=!0)}),m=!0,Ln(h,n,r.state.value[e])}let b=o?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{Wn(e,t)})}:Fn;function x(){s.stop(),h.clear(),g.clear(),r._s.delete(e)}let C=(t,n=``)=>{if(zn in t)return t[Bn]=n,t;let i=function(){vn(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}Ln(g,{args:n,name:i[Bn],store:T,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:T,n)}catch(e){throw Ln(o,e),e}return l instanceof Promise?l.then(e=>(Ln(a,e),e)).catch(e=>(Ln(o,e),Promise.reject(e))):(Ln(a,l),l)};return i[zn]=!0,i[Bn]=n,i},w={_p:r,$id:e,$onAction:In.bind(null,g),$patch:te,$reset:b,$subscribe(t,n={}){let i=In(h,t,n.detached,()=>a()),a=s.run(()=>u(()=>r.state.value[e],r=>{(n.flush===`sync`?m:d)&&t({storeId:e,type:xn.direct,events:_},r)},Wn({},l,n)));return i},$dispose:x},T=y(w);r._s.set(e,T);let E=(r._a&&r._a.runWithContext||Rn)(()=>r._e.run(()=>(s=p()).run(()=>t({action:C}))));for(let t in E){let n=E[t];S(n)&&!Gn(n)||f(n)?o||(v&&Un(n)&&(S(n)?n.value=v[t]:Vn(n,v[t])),r.state.value[e][t]=n):typeof n==`function`&&(E[t]=C(n,t),c.actions[t]=n)}return Wn(T,E),Wn(Se(T),E),Object.defineProperty(T,"$state",{get:()=>r.state.value[e],set:e=>{te(t=>{Wn(t,e)})}}),r._p.forEach(e=>{Wn(T,s.run(()=>e({store:T,app:r._a,pinia:r,options:c})))}),v&&o&&n.hydrate&&n.hydrate(T.$state,v),d=!0,m=!0,T}function Jn(e,t,n){let i,a=typeof t==`function`;i=a?n:t;function o(n,o){let s=r();return n||=s?ke(yn,null):null,n&&vn(n),n=_n,n._s.has(e)||(a?qn(e,t,i,n):Kn(e,i,n)),n._s.get(e)}return o.$id=e,o}var Yn=typeof document<`u`;function Xn(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Zn(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Xn(e.default)}var Qn=Object.assign;function $n(e,t){let n={};for(let r in t){let i=t[r];n[r]=tr(i)?i.map(e):e(i)}return n}var er=()=>{},tr=Array.isArray;function nr(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var rr=/#/g,ir=/&/g,ar=/\//g,or=/=/g,sr=/\?/g,cr=/\+/g,lr=/%5B/g,ur=/%5D/g,dr=/%5E/g,fr=/%60/g,pr=/%7B/g,mr=/%7C/g,hr=/%7D/g,gr=/%20/g;function _r(e){return e==null?``:encodeURI(``+e).replace(mr,`|`).replace(lr,`[`).replace(ur,`]`)}function vr(e){return _r(e).replace(pr,`{`).replace(hr,`}`).replace(dr,`^`)}function yr(e){return _r(e).replace(cr,`%2B`).replace(gr,`+`).replace(rr,`%23`).replace(ir,`%26`).replace(fr,"`").replace(pr,`{`).replace(hr,`}`).replace(dr,`^`)}function br(e){return yr(e).replace(or,`%3D`)}function xr(e){return _r(e).replace(rr,`%23`).replace(sr,`%3F`)}function Sr(e){return xr(e).replace(ar,`%2F`)}function Cr(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var wr=/\/$/,Tr=e=>e.replace(wr,``);function Er(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=Pr(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Cr(o)}}function Dr(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Or(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function kr(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Ar(t.matched[r],n.matched[i])&&jr(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ar(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function jr(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Mr(e[n],t[n]))return!1;return!0}function Mr(e,t){return tr(e)?Nr(e,t):tr(t)?Nr(t,e):e?.valueOf()===t?.valueOf()}function Nr(e,t){return tr(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function Pr(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`){if(s===`..`)a>1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var Fr={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},Ir=function(e){return e.pop=`pop`,e.push=`push`,e}({}),Lr=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function Rr(e){if(!e){if(Yn){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Tr(e)}var zr=/^[^#]+#/;function Br(e,t){return e.replace(zr,`#`)+t}function Vr(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Hr=()=>({left:window.scrollX,top:window.scrollY});function Ur(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Vr(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Wr(e,t){return(history.state?history.state.position-t:-1)+e}var Gr=new Map;function Kr(e,t){Gr.set(e,t)}function qr(e){let t=Gr.get(e);return Gr.delete(e),t}function Jr(e){return typeof e==`string`||e&&typeof e==`object`}function Yr(e){return typeof e==`string`||typeof e==`symbol`}var Xr=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Zr=Symbol(``);Xr.MATCHER_NOT_FOUND,Xr.NAVIGATION_GUARD_REDIRECT,Xr.NAVIGATION_ABORTED,Xr.NAVIGATION_CANCELLED,Xr.NAVIGATION_DUPLICATED;function Qr(e,t){return Qn(Error(),{type:e,[Zr]:!0},t)}function $r(e,t){return e instanceof Error&&Zr in e&&(t==null||!!(e.type&t))}function ei(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(cr,` `),i=r.indexOf(`=`),a=Cr(i<0?r:r.slice(0,i)),o=i<0?null:Cr(r.slice(i+1));if(a in t){let e=t[a];tr(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function ti(e){let t=``;for(let n in e){let r=e[n];if(n=br(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(tr(r)?r.map(e=>e&&yr(e)):[r&&yr(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function ni(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=tr(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var ri=Symbol(``),ii=Symbol(``),ai=Symbol(``),oi=Symbol(``),si=Symbol(``);function ci(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function li(e,t,n){let r=()=>{e[t].delete(n)};g(r),fe(r),_(()=>{e[t].add(n)}),e[t].add(n)}function ui(e){let t=ke(ri,{}).value;t&&li(t,`leaveGuards`,e)}function di(e){let t=ke(ri,{}).value;t&&li(t,`updateGuards`,e)}function fi(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Qr(Xr.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):Jr(e)?c(Qr(Xr.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function pi(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e])){if(Xn(s)){let c=(s.__vccOpts||s)[t];c&&a.push(fi(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Zn(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&fi(c,n,r,o,e,i)()}))}}}return a}function mi(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>Ar(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>Ar(e,s))||i.push(s))}return[n,r,i]}var hi=()=>location.protocol+`//`+location.host;function gi(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Or(n,``)}return Or(n,e)+r+i}function _i(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=gi(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:Ir.pop,direction:u?u>0?Lr.forward:Lr.back:Lr.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(Qn({},e.state,{scroll:Hr()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function vi(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Hr():null}}function yi(e){let{history:t,location:n}=window,r={value:gi(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:hi()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,Qn({},t.state,vi(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=Qn({},i.value,t.state,{forward:e,scroll:Hr()});a(o.current,o,!0),a(e,Qn({},vi(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function bi(e){e=Rr(e);let t=yi(e),n=_i(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=Qn({location:``,base:e,go:r,createHref:Br.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function xi(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),bi(e)}var Si=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Ci=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Ci||{}),wi={type:Si.Static,value:``},Ti=/[a-zA-Z0-9_]/;function Ei(e){if(!e)return[[]];if(e===`/`)return[[wi]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Ci.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Ci.Static?a.push({type:Si.Static,value:l}):n===Ci.Param||n===Ci.ParamRegExp||n===Ci.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Si.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==Ci.ParamRegExp){r=n,n=Ci.EscapeNext;continue}switch(n){case Ci.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=Ci.Param):f();break;case Ci.EscapeNext:f(),n=r;break;case Ci.Param:c===`(`?n=Ci.ParamRegExp:Ti.test(c)?f():(d(),n=Ci.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case Ci.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=Ci.ParamRegExpEnd:u+=c;break;case Ci.ParamRegExpEnd:d(),n=Ci.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`)}}return n===Ci.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Di=`[^/]+?`,Oi={sensitive:!1,strict:!1,start:!0,end:!0},ki=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}(ki||{}),Ai=/[.+*?^${}()[\]/\\]/g;function ji(e,t){let n=Qn({},Oi,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[ki.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=ki.Segment+(n.sensitive?ki.BonusCaseSensitive:0);if(o.type===Si.Static)r||(i+=`/`),i+=o.value.replace(Ai,`\\$&`),s+=ki.Static;else if(o.type===Si.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Di;if(u!==Di){s+=ki.BonusCustomRegExp;try{`${u}`}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=ki.Dynamic,c&&(s+=ki.BonusOptional),n&&(s+=ki.BonusRepeatable),u===`.*`&&(s+=ki.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=ki.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===Si.Static)n+=e.value;else if(e.type===Si.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(tr(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=tr(c)?c.join(`/`):c;if(!l){if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`)}n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Mi(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===ki.Static+ki.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===ki.Static+ki.Segment?1:-1:0}function Ni(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Mi(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Pi(r))return 1;if(Pi(i))return-1}return i.length-r.length}function Pi(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Fi={strict:!1,end:!0,sensitive:!1};function Ii(e,t,n){let r=Qn(ji(Ei(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Li(e,t){let n=[],r=new Map;t=nr(Fi,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=zi(e);s.aliasOf=r&&r.record;let l=nr(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(zi(Qn({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Ii(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Vi(d)&&o(e.name)),Gi(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:er}function o(e){if(Yr(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Ui(e,n);n.splice(t,0,e),e.record.name&&!Vi(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Qr(Xr.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=Qn(Ri(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Ri(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Qr(Xr.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=Qn({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Hi(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Ri(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function zi(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Bi(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Bi(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Vi(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Hi(e){return e.reduce((e,t)=>Qn(e,t.meta),{})}function Ui(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Ni(e,t[i])<0?r=i:n=i+1}let i=Wi(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function Wi(e){let t=e;for(;t=t.parent;)if(Gi(t)&&Ni(e,t)===0)return t}function Gi({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Ki(e){let t=ke(ai),n=ke(oi),r=Te(()=>{let n=j(e.to);return t.resolve(n)}),i=Te(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(Ar.bind(null,i));if(o>-1)return o;let s=Zi(e[t-2]);return t>1&&Zi(i)===s&&a[a.length-1].path!==s?a.findIndex(Ar.bind(null,e[t-2])):o}),a=Te(()=>i.value>-1&&Xi(n.params,r.value.params)),o=Te(()=>i.value>-1&&i.value===n.matched.length-1&&jr(n.params,r.value.params));function s(n={}){if(Yi(n)){let n=t[j(e.replace)?`replace`:`push`](j(e.to)).catch(er);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:Te(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function qi(e){return e.length===1?e[0]:e}var Ji=D({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:Ki,setup(e,{slots:t}){let n=y(Ki(e)),{options:r}=ke(ai),i=Te(()=>({[Qi(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Qi(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&qi(t.default(n));return e.custom?r:ee(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function Yi(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Xi(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!tr(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function Zi(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Qi=(e,t,n)=>e??t??n,$i=D({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=ke(si),i=Te(()=>e.route||r.value),a=ke(ii,0),o=Te(()=>{let e=j(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=Te(()=>i.value.matched[o.value]);d(ii,Te(()=>o.value+1)),d(ri,s),d(si,i);let c=k();return u(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!Ar(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return ea(n.default,{Component:l,route:r});let u=o.props[a],d=u?u===!0?r.params:typeof u==`function`?u(r):u:null,f=ee(l,Qn({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return ea(n.default,{Component:f,route:r})||f}}});function ea(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var ta=$i;function na(e){let t=Li(e.routes,e),n=e.parseQuery||ei,r=e.stringifyQuery||ti,i=e.history,o=ci(),s=ci(),c=ci(),l=_e(Fr),u=Fr;Yn&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=$n.bind(null,e=>``+e),f=$n.bind(null,Sr),p=$n.bind(null,Cr);function m(e,n){let r,i;return Yr(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function h(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function g(){return t.getRoutes().map(e=>e.record)}function _(e){return!!t.getRecordMatcher(e)}function v(e,a){if(a=Qn({},a||l.value),typeof e==`string`){let r=Er(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return Qn(r,o,{params:p(o.params),hash:Cr(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=Qn({},e,{path:Er(n,e.path,a.path).path});else{let t=Qn({},e.params);for(let e in t)t[e]??delete t[e];o=Qn({},e,{params:f(t)}),a.params=f(a.params)}let s=t.resolve(o,a),c=e.hash||``;s.params=d(p(s.params));let u=Dr(r,Qn({},e,{hash:vr(c),path:s.path})),m=i.createHref(u);return Qn({fullPath:u,hash:c,query:r===ti?ni(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function y(e){return typeof e==`string`?Er(n,e,l.value.path):Qn({},e)}function ee(e,t){if(u!==e)return Qr(Xr.NAVIGATION_CANCELLED,{from:t,to:e})}function te(e){return S(e)}function b(e){return te(Qn(y(e),{replace:!0}))}function x(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=y(i):{path:i},i.params={}),Qn({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function S(e,t){let n=u=v(e),i=l.value,a=e.state,o=e.force,s=e.replace===!0,c=x(n,i);if(c)return S(Qn(y(c),{state:typeof c==`object`?Qn({},a,c.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&kr(r,i,n)&&(f=Qr(Xr.NAVIGATION_DUPLICATED,{to:d,from:i}),ce(i,i,!0,!1)),(f?Promise.resolve(f):T(d,i)).catch(e=>$r(e)?$r(e,Xr.NAVIGATION_GUARD_REDIRECT)?e:se(e):oe(e,d,i)).then(e=>{if(e){if($r(e,Xr.NAVIGATION_GUARD_REDIRECT))return S(Qn({replace:s},y(e.to),{state:typeof e.to==`object`?Qn({},a,e.to.state):a,force:o}),t||d)}else e=ne(d,i,!0,s,a);return E(d,i,e),e})}function C(e,t){let n=ee(e,t);return n?Promise.reject(n):Promise.resolve()}function w(e){let t=de.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function T(e,t){let n,[r,i,a]=mi(e,t);n=pi(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(fi(r,e,t))});let c=C.bind(null,e,t);return n.push(c),pe(n).then(()=>{n=[];for(let r of o.list())n.push(fi(r,e,t));return n.push(c),pe(n)}).then(()=>{n=pi(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(fi(r,e,t))});return n.push(c),pe(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter){if(tr(r.beforeEnter))for(let i of r.beforeEnter)n.push(fi(i,e,t));else n.push(fi(r.beforeEnter,e,t))}return n.push(c),pe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=pi(a,`beforeRouteEnter`,e,t,w),n.push(c),pe(n))).then(()=>{n=[];for(let r of s.list())n.push(fi(r,e,t));return n.push(c),pe(n)}).catch(e=>$r(e,Xr.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function E(e,t,n){c.list().forEach(r=>w(()=>r(e,t,n)))}function ne(e,t,n,r,a){let o=ee(e,t);if(o)return o;let s=t===Fr,c=Yn?history.state:{};n&&(r||s?i.replace(e.fullPath,Qn({scroll:s&&c&&c.scroll},a)):i.push(e.fullPath,a)),l.value=e,ce(e,t,n,s),se()}let D;function re(){D||=i.listen((e,t,n)=>{if(!fe.listening)return;let r=v(e),a=x(r,fe.currentRoute.value);if(a){S(Qn(a,{replace:!0,force:!0}),r).catch(er);return}u=r;let o=l.value;Yn&&Kr(Wr(o.fullPath,n.delta),Hr()),T(r,o).catch(e=>$r(e,Xr.NAVIGATION_ABORTED|Xr.NAVIGATION_CANCELLED)?e:$r(e,Xr.NAVIGATION_GUARD_REDIRECT)?(S(Qn(y(e.to),{force:!0}),r).then(e=>{$r(e,Xr.NAVIGATION_ABORTED|Xr.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===Ir.pop&&i.go(-1,!1)}).catch(er),Promise.reject()):(n.delta&&i.go(-n.delta,!1),oe(e,r,o))).then(e=>{e||=ne(r,o,!1),e&&(n.delta&&!$r(e,Xr.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===Ir.pop&&$r(e,Xr.NAVIGATION_ABORTED|Xr.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),E(r,o,e)}).catch(er)})}let ie=ci(),ae=ci(),O;function oe(e,t,n){se(e);let r=ae.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function k(){return O&&l.value!==Fr?Promise.resolve():new Promise((e,t)=>{ie.add([e,t])})}function se(e){return O||(O=!e,re(),ie.list().forEach(([t,n])=>e?n(e):t()),ie.reset()),e}function ce(t,n,r,i){let{scrollBehavior:o}=e;if(!Yn||!o)return Promise.resolve();let s=!r&&qr(Wr(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return a().then(()=>o(t,n,s)).then(e=>e&&Ur(e)).catch(e=>oe(e,t,n))}let le=e=>i.go(e),ue,de=new Set,fe={currentRoute:l,listening:!0,addRoute:m,removeRoute:h,clearRoutes:t.clearRoutes,hasRoute:_,getRoutes:g,resolve:v,options:e,push:te,replace:b,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:o.add,beforeResolve:s.add,afterEach:c.add,onError:ae.add,isReady:k,install(e){e.component(`RouterLink`,Ji),e.component(`RouterView`,ta),e.config.globalProperties.$router=fe,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>j(l)}),Yn&&!ue&&l.value===Fr&&(ue=!0,te(i.location).catch(e=>{}));let t={};for(let e in Fr)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(ai,fe),e.provide(oi,we(t)),e.provide(si,l);let n=e.unmount;de.add(e),e.unmount=function(){de.delete(e),de.size<1&&(u=Fr,D&&D(),D=null,l.value=Fr,ue=!1,O=!1),n()}}};function pe(e){return e.reduce((e,t)=>e.then(()=>w(t)),Promise.resolve())}return fe}function ra(){return ke(ai)}function ia(e){return ke(oi)}async function aa(e){let t=new Worker(new URL(`/assets/transferStorage.worker-DxQNZarj.js`,``+import.meta.url),{type:`module`}),n=new Map,r=0,i=!1;t.onmessage=e=>{let t=n.get(e.data.id);t&&(n.delete(e.data.id),e.data.error?t.reject(Error(e.data.error)):t.resolve(e.data.result))},t.onerror=()=>{for(let e of n.values())e.reject(Error(`文件存储不可用`));n.clear(),t.terminate(),i=!0};let a=(e,a=[])=>new Promise((o,s)=>{if(i){s(Error(`TRANSFER_STORAGE_CLOSED`));return}let c=++r;n.set(c,{resolve:o,reject:s}),t.postMessage({id:c,method:e,args:a},e===`write`?[a[1]]:[])});try{await a(`open`,[e])}catch(e){throw t.terminate(),e}return{size:()=>a(`size`),read:(e,t)=>a(`read`,[e,t]),write:(e,t)=>a(`write`,[e,Uint8Array.from(t).buffer]),reset:()=>a(`reset`),async close(){if(!i)try{await a(`close`)}finally{i=!0,t.terminate()}}}}async function oa(e){return(await(await(await navigator.storage.getDirectory()).getDirectoryHandle(`yaovi-remote-files-v1`,{create:!0})).getFileHandle(e+`.part`)).getFile()}async function sa(e){try{await(await(await navigator.storage.getDirectory()).getDirectoryHandle(`yaovi-remote-files-v1`)).removeEntry(e+`.part`)}catch{}}var ca=Object.create,la=Object.defineProperty,ua=Object.getOwnPropertyDescriptor,da=Object.getOwnPropertyNames,fa=Object.getPrototypeOf,pa=Object.prototype.hasOwnProperty,ma=(e,t)=>function(){try{return t||(0,e[da(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},ha=(e,t)=>{for(var n in t)la(e,n,{get:t[n],enumerable:!0})},ga=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of da(t))!pa.call(e,i)&&i!==n&&la(e,i,{get:()=>t[i],enumerable:!(r=ua(t,i))||r.enumerable});return e},_a=((e,t,n)=>(n=e==null?{}:ca(fa(e)),ga(t||!e||!e.__esModule?la(n,`default`,{value:e,enumerable:!0}):n,e)))(ma({"node_modules/canonicalize/lib/canonicalize.js"(e,t){t.exports=function e(t){if(typeof t==`number`&&isNaN(t))throw Error(`NaN is not allowed`);if(typeof t==`number`&&!isFinite(t))throw Error(`Infinity is not allowed`);return typeof t!=`object`||!t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce((t,n,r)=>`${t}${r===0?``:`,`}${e(n===void 0||typeof n==`symbol`?null:n)}`,``)}]`:`{${Object.keys(t).sort().reduce((n,r)=>t[r]===void 0||typeof t[r]==`symbol`?n:`${n}${n.length===0?``:`,`}${e(r)}:${e(t[r])}`,``)}}`}}})(),1),va=BigInt(2**32-1),ya=BigInt(32);function ba(e,t=!1){return t?{h:Number(e&va),l:Number(e>>ya&va)}:{h:Number(e>>ya&va)|0,l:Number(e&va)|0}}function xa(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=ba(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}var Sa=e=>e/2**32|0,Ca=e=>e>>>0;function wa(e,t,n,r){let i=Sa(n),a=Ca(n);e.setUint32(t,r?a:i,r),e.setUint32(t+4,r?i:a,r)}var Ta=(e,t,n)=>e>>>n,Ea=(e,t,n)=>e<<32-n|t>>>n,Da=(e,t,n)=>e>>>n|t<<32-n,Oa=(e,t,n)=>e<<32-n|t>>>n,ka=(e,t,n)=>e<<64-n|t>>>n-32,Aa=(e,t,n)=>e>>>n-32|t<<64-n;function ja(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}var Ma=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Na=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Pa=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Fa=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,Ia=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),La=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0;function Ra(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}var za=e=>e?`"${e}" `:``;function Ba(e,t=``){if(typeof e!=`number`)throw TypeError(za(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(za(t)+`expected integer >= 0, got `+e);return e}function Va(e,t,n=``){if(Ra(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Ba(t,`length`);let r=Ra(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=za(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}function Ha(e){if(typeof e!=`function`||typeof e.create!=`function`)throw TypeError(`expected hash wrapped by utils.createHasher`);if(Ba(e.outputLen),Ba(e.blockLen),e.outputLen<1||e.blockLen<1)throw Error(`hash blockLen / outputLen must be >= 1`)}var Ua=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError((t===`object`?``:`"${t}" `)+`expected object, got type=`+typeof e)},Wa=(e,t)=>{Ua(e,t);let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,`__proto__`))throw TypeError(`"${t}.__proto__" is not allowed`)};function Ga(e,t=!0){if(e.destroyed)throw Error(`hash was destroyed`);if(t&&e.finished)throw Error(`digest() was already called`)}function Ka(e,t){Va(e,void 0,`output`);let n=t.outputLen;if(!(e.length>=n))throw RangeError(`"output" expected length >= `+n)}function qa(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Ja(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Ya(e,t){return e<<32-t|e>>>t}var Xa=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,Za=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function Qa(e){if(Va(e),Xa)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=Za[e[n]];return t}function $a(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function eo(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);if(Xa)try{return Uint8Array.fromHex(e)}catch(e){throw e instanceof SyntaxError?RangeError(e.message):e}let t=e.length,n=t/2;if(t%2)throw RangeError(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=$a(e.charCodeAt(i)),a=$a(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw RangeError(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function to(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];Va(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function no(e,t,n=`opts`){return Wa(e,`defaults`),t!==void 0&&Wa(t,n),Object.assign(Object.create(null),e,t)}function ro(e,t={}){if(typeof e!=`function`)throw TypeError(`"hashCons" expected function, got type=`+typeof e);t=no({},t,`info`);let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}function io(e=32){Ba(e,`bytesLength`);let t=typeof globalThis==`object`?globalThis.crypto:null;if(typeof t?.getRandomValues!=`function`)throw Error(`crypto.getRandomValues must be defined`);if(e>65536)throw RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}var ao=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function oo(e,t,n){return e&t^~e&n}function so(e,t,n){return e&t^e&n^t&n}var co=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Ja(this.buffer)}update(e){Ga(this),Va(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length,a=!1;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);if(s===r){let t=Ja(e);for(;r<=i-o;o+=r)this.process(t,o);a=!0;continue}n.set(o===0&&s===i?e:e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0,a=!0)}return this.length+=e.length,a&&this.roundClean(),this}digestInto(e){Ga(this),Ka(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,t.fill(0,a),this.padOffset>r-a&&(this.process(n,0),t.fill(0)),wa(n,r-8,this.length*8,i),this.process(n,0),this.roundClean();let o=e===t?n:Ja(e),s=this.outputLen,c=s/4,l=this.get();if(s%4||c>l.length)throw Error(`invalid outputLen`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneIntoMeta(e){let{buffer:t,length:n,finished:r,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=r,e.length=n,e.pos=a,a&&e.buffer.set(t),e}clone(){return this._cloneInto()}},lo=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),uo=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),fo=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),po=new Uint32Array(64),mo=class extends co{A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;constructor(e,t){super(64,e,8,!1),this.A=t[0]|0,this.B=t[1]|0,this.C=t[2]|0,this.D=t[3]|0,this.E=t[4]|0,this.F=t[5]|0,this.G=t[6]|0,this.H=t[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,t){for(let n=0;n<16;n++,t+=4)po[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=po[e-15],n=po[e-2],r=Ya(t,7)^Ya(t,18)^t>>>3,i=Ya(n,17)^Ya(n,19)^n>>>10;po[e]=i+po[e-7]+r+po[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=Ya(o,6)^Ya(o,11)^Ya(o,25),u=l+t+oo(o,s,c)+fo[e]+po[e]|0,d=(Ya(n,2)^Ya(n,13)^Ya(n,22))+so(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){qa(po)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),qa(this.buffer)}},ho=class extends mo{constructor(){super(32,lo)}},go=xa(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),_o=go[0],vo=go[1],yo=new Uint32Array(80),bo=new Uint32Array(80),xo=class extends co{Ah=0;Al=0;Bh=0;Bl=0;Ch=0;Cl=0;Dh=0;Dl=0;Eh=0;El=0;Fh=0;Fl=0;Gh=0;Gl=0;Hh=0;Hl=0;constructor(e,t){super(128,e,16,!1),this.Ah=t[0]|0,this.Al=t[1]|0,this.Bh=t[2]|0,this.Bl=t[3]|0,this.Ch=t[4]|0,this.Cl=t[5]|0,this.Dh=t[6]|0,this.Dl=t[7]|0,this.Eh=t[8]|0,this.El=t[9]|0,this.Fh=t[10]|0,this.Fl=t[11]|0,this.Gh=t[12]|0,this.Gl=t[13]|0,this.Hh=t[14]|0,this.Hl=t[15]|0}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,t){for(let n=0;n<16;n++,t+=4)yo[n]=e.getUint32(t),bo[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=yo[e-15]|0,n=bo[e-15]|0,r=Da(t,n,1)^Da(t,n,8)^Ta(t,n,7),i=Oa(t,n,1)^Oa(t,n,8)^Ea(t,n,7),a=yo[e-2]|0,o=bo[e-2]|0,s=Da(a,o,19)^ka(a,o,61)^Ta(a,o,6),c=Pa(i,Oa(a,o,19)^Aa(a,o,61)^Ea(a,o,6),bo[e-7],bo[e-16]),l=Fa(c,r,s,yo[e-7],yo[e-16]);yo[e]=l|0,bo[e]=c|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=Da(u,d,14)^Da(u,d,18)^ka(u,d,41),v=Oa(u,d,14)^Oa(u,d,18)^Aa(u,d,41),y=u&f^~u&m,ee=d&p^~d&h,te=Ia(_,v,ee,vo[e],bo[e]),b=La(te,g,t,y,_o[e],yo[e]),x=te|0,S=Da(n,r,28)^ka(n,r,34)^ka(n,r,39),C=Oa(n,r,28)^Aa(n,r,34)^Aa(n,r,39),w=n&i^n&o^i&o,T=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=ja(c|0,l|0,b|0,x|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let E=Ma(x,C,T);n=Na(E,b,S,w),r=E|0}({h:n,l:r}=ja(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=ja(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=ja(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=ja(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=ja(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=ja(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=ja(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=ja(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){qa(yo,bo)}destroy(){this.destroyed=!0,qa(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},So=class extends xo{constructor(){super(64,uo)}},Co=ro(()=>new ho,ao(1)),wo=ro(()=>new So,ao(3));function To(e,t,n=()=>{}){if(!Array.isArray(e))throw TypeError(`"${t}" expected array, got type=${typeof e}`);for(let r=0;r<e.length;r++)n(e[r],`${t}[${r}]`);return e}var Eo=(e,t,n)=>Va(e,t,n),Do=Ba;function Oo(e,t=`object`){if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(t===`object`?`expected valid options object`:`"${t}" expected object, got type=${typeof e}`);return e}function ko(e,t){if(typeof e!=`function`)throw TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}var Ao=Qa,jo=(...e)=>to(...e),Mo=e=>eo(e),No=Ra,Po=e=>io(e),Fo=BigInt(0),Io=BigInt(1),Lo=e=>e?`"${e}" `:``;function Ro(e,t=``){if(typeof e!=`boolean`)throw TypeError(Lo(t)+`expected boolean, got type=`+typeof e);return e}function zo(e){if(typeof e==`bigint`){if(!qo(e))throw RangeError(`positive bigint expected, got `+e)}else Do(e);return e}function Bo(e,t=``){if(typeof e!=`number`){let n=t&&`"${t}" `;throw TypeError(n+`expected number, got type=`+typeof e)}if(!Number.isSafeInteger(e)){let n=t&&`"${t}" `;throw RangeError(n+`expected safe integer, got `+e)}}function Vo(e){if(typeof e!=`string`)throw TypeError(`hex string expected, got `+typeof e);return e===``?Fo:BigInt(`0x`+e)}function Ho(e){return Vo(Qa(e))}function Uo(e){return Vo(Qa(Ko(Va(e)).reverse()))}function Wo(e,t){if(Ba(t),t===0)throw Error(`zero output length is invalid`);e=zo(e);let n=t*2,r=e.toString(16);if(r.length>n)throw RangeError(`number is too large`);return eo(r.padStart(n,`0`))}function Go(e,t){return Wo(e,t).reverse()}function Ko(e){return Uint8Array.from(Eo(e))}function qo(e){return typeof e==`bigint`&&Fo<=e}function Jo(e,t,n){return qo(e)&&qo(t)&&qo(n)&&t<=e&&e<n}function Yo(e,t,n,r){if(!Jo(t,n,r))throw RangeError(`expected valid `+e+`: `+n+` <= n < `+r+`, got `+t)}function Xo(e){if(e<Fo)throw Error(`expected non-negative bigint, got `+e);return e===Fo?0:e.toString(2).length}var Zo=e=>(Bo(e,`n`),(Io<<BigInt(e))-Io);function Qo(e,t={},n={},r=`object`){Oo(e,r),Oo(t,`fields`),Oo(n,`optFields`);function i(t,n,i){let a=r===`object`?`param "${String(t)}"`:`"${r}.${String(t)}"`,o=e[t];if(!Object.hasOwn(e,t)&&(i?o!==void 0:n!==`function`))throw TypeError(`${a} is invalid: expected own property`);if(i&&o===void 0)return;let s=typeof o;if(s!==n||o===null)throw TypeError(`${a} is invalid: expected ${n}, got ${s}`)}let a=(e,t)=>Object.entries(e).forEach(([e,n])=>i(e,n,t));a(t,!1),a(n,!0)}var $o=BigInt(0),es=BigInt(1),ts=BigInt(2),ns=BigInt(3),rs=BigInt(4),is=BigInt(5),as=BigInt(7),os=BigInt(8),ss=BigInt(9),cs=BigInt(15),ls=BigInt(16),us=BigInt(`0x10000000000000000`);function ds(e,t){if(t<=$o)throw Error(`mod: expected positive modulus, got `+t);let n=e%t;return n>=$o?n:t+n}function fs(e,t,n){if(n<=es)throw Error(`pow: expected modulus > 1, got `+n);if(typeof t!=`bigint`)throw TypeError(`invalid exponent: expected bigint, got `+typeof t);if(t<$o)throw Error(`invalid exponent, negatives unsupported`);if(t===$o)return es;if(t===es)return e;let r=e%n;if(r<$o&&(r+=n),t<us){let e=es;for(;t>$o;)t&es&&(e=e*r%n),r=r*r%n,t>>=es;return e}let i=[];for(;t>$o;)i.push(Number(t&cs)),t>>=rs;let a=Array(16);a[0]=es,a[1]=r;for(let e=2;e<16;e++)a[e]=a[e-1]*r%n;let o=a[i[i.length-1]];for(let e=i.length-2;e>=0;e--){o=o*o%n,o=o*o%n,o=o*o%n,o=o*o%n;let t=i[e];t!==0&&(o=o*a[t]%n)}return o}function ps(e,t,n){if(n<=es)throw Error(`pow2: expected modulus > 1, got `+n);if(t<$o)throw Error(`pow2: expected non-negative exponent, got `+t);let r=e;for(;t-->$o;)r*=r,r%=n;return r}function ms(e,t){if(e===$o)throw Error(`invert: expected non-zero number`);if(t<=es)throw Error(`invert: expected modulus > 1, got `+t);let n=ds(e,t),r=t,i=$o,a=es;for(;n!==$o;){let e=r/n,t=r-n*e,o=i-a*e;r=n,n=t,i=a,a=o}if(r!==es)throw Error(`invert: does not exist`);return ds(i,t)}function hs(e,t,n){let r=e;if(!r.eql(r.sqr(t),n))throw Error(`Cannot find square root`)}function gs(e,t){if((e&es)===$o)throw Error(t+`: expected odd modulus, got `+e)}function _s(e,t){let n=e,r=(n.ORDER+es)/rs,i=n.pow(t,r);return hs(n,i,t),i}function vs(e,t){let n=e,r=(n.ORDER-is)/os,i=n.mul(t,ts),a=n.pow(i,r),o=n.mul(t,a),s=n.mul(n.mul(o,ts),a),c=n.mul(o,n.sub(s,n.ONE));return hs(n,c,t),c}function ys(e){let t=As(e),n=bs(e),r=n(t,t.neg(t.ONE)),i=n(t,r),a=n(t,t.neg(r)),o=(e+as)/ls;return((e,t)=>{let n=e,s=n.pow(t,o),c=n.mul(s,r),l=n.mul(s,i),u=n.mul(s,a),d=n.eql(n.sqr(c),t),f=n.eql(n.sqr(l),t);s=n.cmov(s,c,d),c=n.cmov(u,l,f);let p=n.eql(n.sqr(c),t),m=n.cmov(s,c,p);return hs(n,m,t),m})}function bs(e){if(e<ns)throw Error(`sqrt is not defined for small field`);gs(e,`tonelliShanks`);let t=e-es,n=0;for(;t%ts===$o;)t/=ts,n++;let r=ts,i=As(e);for(;Es(i,r)===1;)if(r++>1e3)throw Error(`Cannot find square root: probably non-prime P`);if(n===1)return _s;let a=i.pow(r,t),o=(t+es)/ts;return function(e,r){let i=e;if(i.is0(r))return r;if(Es(i,r)!==1)throw Error(`Cannot find square root`);let s=n,c=i.mul(i.ONE,a),l=i.pow(r,t),u=i.pow(r,o);for(;!i.eql(l,i.ONE);){if(i.is0(l))throw Error(`Cannot find square root: probably non-prime P`);let e=1,t=i.sqr(l);for(;!i.eql(t,i.ONE);)if(e++,t=i.sqr(t),e===s)throw Error(`Cannot find square root`);let n=es<<BigInt(s-e-1),r=i.pow(c,n);s=e,c=i.sqr(r),l=i.mul(l,c),u=i.mul(u,r)}return u}}function xs(e){return gs(e,`Fp.sqrt`),e%rs===ns?_s:e%os===is?vs:e%ls===ss?ys(e):bs(e)}var Ss=(e,t)=>(ds(e,t)&es)===es,Cs=[`create`,`isValid`,`is0`,`neg`,`inv`,`sqrt`,`sqr`,`eql`,`add`,`sub`,`mul`,`pow`,`div`,`addN`,`subN`,`mulN`,`sqrN`];function ws(e){if(Oo(e,`field`),typeof e.ORDER!=`bigint`)throw TypeError(`param "ORDER" is invalid: expected bigint, got `+typeof e.ORDER);Bo(e.BYTES,`BYTES`),Bo(e.BITS,`BITS`);for(let t of Cs)ko(e[t],`field.`+t);if(e.BYTES<1||e.BITS<1)throw Error(`invalid field: expected BYTES/BITS > 0`);if(e.ORDER<=es)throw Error(`invalid field: expected ORDER > 1, got `+e.ORDER);return e}function Ts(e,t,n=!1){ws(e),To(t,`nums`),Ro(n,`passZero`);let r=e,i=Array(t.length).fill(n?r.ZERO:void 0),a=t.reduce((e,t,n)=>r.is0(t)?e:(i[n]=e,r.mul(e,t)),r.ONE),o=r.inv(a);return t.reduceRight((e,t,n)=>r.is0(t)?e:(i[n]=r.mul(e,i[n]),r.mul(e,t)),o),i}function Es(e,t){ws(e);let n=e;gs(n.ORDER,`FpLegendre`);let r=(n.ORDER-es)/ts,i=n.pow(t,r),a=n.eql(i,n.ONE),o=n.eql(i,n.ZERO),s=n.eql(i,n.neg(n.ONE));if(!a&&!o&&!s)throw Error(`invalid Legendre symbol result`);return a?1:o?0:-1}function Ds(e,t){if(t!==void 0&&Do(t),e<=$o)throw Error(`invalid n length: expected positive n, got `+e);if(t!==void 0&&t<1)throw Error(`invalid n length: expected positive bit length, got `+t);let n=Xo(e);if(t!==void 0&&t<n)throw Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);let r=t===void 0?n:t;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}var Os=new WeakMap,ks=class{ORDER;BITS;BYTES;isLE;ZERO=$o;ONE=es;_lengths;_mod;constructor(e,t={}){if(e<=es)throw Error(`invalid field: expected ORDER > 1, got `+e);let n;this.isLE=!1,typeof t==`object`&&t&&(typeof t.BITS==`number`&&(n=t.BITS),typeof t.sqrt==`function`&&Object.defineProperty(this,"sqrt",{value:t.sqrt,enumerable:!0}),typeof t.isLE==`boolean`&&(this.isLE=t.isLE),t.allowedLengths&&(this._lengths=Object.freeze(t.allowedLengths.slice())),typeof t.modFromBytes==`boolean`&&(this._mod=t.modFromBytes));let{nBitLength:r,nByteLength:i}=Ds(e,n);if(i>2048)throw Error(`invalid field: expected ORDER of <= 2048 bytes`);this.ORDER=e,this.BITS=r,this.BYTES=i,Object.freeze(this)}create(e){return ds(e,this.ORDER)}isValid(e){if(typeof e!=`bigint`)throw TypeError(`invalid field element: expected bigint, got `+typeof e);return $o<=e&&e<this.ORDER}is0(e){return e===$o}isValidNot0(e){return!this.is0(e)&&this.isValid(e)}isOdd(e){return(e&es)===es}neg(e){return ds(-e,this.ORDER)}eql(e,t){return e===t}sqr(e){return ds(e*e,this.ORDER)}add(e,t){return ds(e+t,this.ORDER)}sub(e,t){return ds(e-t,this.ORDER)}mul(e,t){return ds(e*t,this.ORDER)}pow(e,t){return fs(e,t,this.ORDER)}div(e,t){return ds(e*ms(t,this.ORDER),this.ORDER)}sqrN(e){return e*e}addN(e,t){return e+t}subN(e,t){return e-t}mulN(e,t){return e*t}inv(e){return ms(e,this.ORDER)}sqrt(e){let t=Os.get(this);return t||Os.set(this,t=xs(this.ORDER)),t(this,e)}toBytes(e){return this.isLE?Go(e,this.BYTES):Wo(e,this.BYTES)}fromBytes(e,t=!1){Eo(e);let{_lengths:n,BYTES:r,isLE:i,ORDER:a,_mod:o}=this;if(n){if(e.length<1||!n.includes(e.length)||e.length>r)throw Error(`Field.fromBytes: expected `+n+` bytes, got `+e.length);let t=new Uint8Array(r);t.set(e,i?0:t.length-e.length),e=t}if(e.length!==r)throw Error(`Field.fromBytes: expected `+r+` bytes, got `+e.length);let s=i?Uo(e):Ho(e);if(o&&(s=ds(s,a)),!t&&!this.isValid(s))throw Error(`invalid field element: outside of range 0..ORDER`);return s}invertBatch(e){return Ts(this,e,!0)}cmov(e,t,n){return Ro(n,`condition`),n?t:e}};function As(e,t={}){return Object.freeze(ks.prototype),new ks(e,t)}var js=BigInt(0),Ms=BigInt(1),Ns=BigInt(4),Ps=16,Fs=128,Is=5,Ls=2**31;function Rs(e){let t=e;if(typeof t!=`function`)throw TypeError(`"Point" expected constructor, got type=`+typeof e);ko(t.fromAffine,`Point.fromAffine`),ko(t.fromBytes,`Point.fromBytes`),ko(t.fromHex,`Point.fromHex`),Oo(t.BASE,`Point.BASE`),Oo(t.ZERO,`Point.ZERO`),ws(t.Fp),ws(t.Fn)}function zs(e,t){Rs(e),Us(t,e);let n=Ts(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function Bs(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw Error(`invalid window size, expected [`+n+`..`+t+`], got W=`+e)}function Vs(e,t){let n=e*(4*t+128);if(n>Ls)throw Error(`invalid window size: table would need ~`+Math.ceil(n/2**20)+` MiB, max `+Ls/2**20+` MiB`)}function Hs(e,t){if(e!==void 0){ko(e,`randomBytes`);try{let n=e(t);if(!No(n)||n.length!==t)return}catch{return}return e}}function Us(e,t){To(e,`points`),e.forEach((e,n)=>{if(!(e instanceof t))throw Error(`invalid point at index `+n)})}function Ws(e,t,n){if(!Array.isArray(e))throw Error(`array of scalars expected`);e.forEach((e,r)=>{if(!(n===void 0?t.isValid(e):qo(e)&&e<n))throw Error(`invalid scalar at index `+r)})}var Gs=new WeakMap;function Ks(e){return Gs.get(e)||1}function qs(e,t){let n=e.double(),r=[e];for(let e=1;e<t;e++)r.push(r[e-1].add(n));return r}function Js(e,t){let n=2**t,r=n/2,i=BigInt(n-1),a=[];for(;e>js;){let t=0;e&Ms&&(t=Number(e&i),t>=r&&(t-=n),e-=BigInt(t)),a.push(t),e>>=Ms}return a}function Ys(e,t,n){let r=2**t,i=r/2,a=BigInt(r-1),o=BigInt(t),s=[];for(let t=0;t<n;t++){let t=Number(e&a);e>>=o,t>i&&(t-=r,e+=Ms),s.push(t)}if(e!==js)throw Error(`invalid wnaf`);return s}function Xs(e,t,n){let r=0;for(let e of n)r=Math.max(r,e.length);let i=e;for(let e=r-1;e>=0;e--){e!==r-1&&(i=i.double());for(let r=0;r<n.length;r++){let a=n[r][e];if(a){let e=t[r][Math.abs(a)-1>>1];i=i.add(a<0?e.negate():e)}}}return i}var Zs=class{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(e,t){Rs(e),this.randomBytes=Hs(t,Ps),this.Point=e,this.BASE=e.BASE,this.ZERO=e.ZERO,this.bits=e.Fn.BITS}buildWnafTable(e,t,n){let r=Math.ceil(n/t)+1,i=2**(t-1),a=[],o=e;for(let e=0;e<r;e++){let e=o;for(let t=0;t<i;t++)a.push(e),e=e.add(o);o=a[a.length-1].double()}return{W:t,bits:n,windows:r,comp:a}}wnafCachedCT(e,t){let{W:n,windows:r,comp:i}=e,a=2**(n-1),o=Ys(t,n,r),s=this.ZERO,c=this.BASE;for(let e=0;e<r;e++){let t=o[e],n=e*a,r=Math.abs(t)-1,l=i[n];for(let e=1;e<a;e++)l=e===r?i[n+e]:l;let u=l.negate();t===0?c=c.add(i[n]):s=s.add(t<0?u:l)}return{p:s,f:c}}getWnafPrecomputes(e,t,n,r){let i=this.wnafPrecomputes.get(t),a=i?.find(t=>t.W===e&&t.bits===n);return a||(a=this.buildWnafTable(t,e,n),typeof r==`function`&&(a={...a,comp:r(a.comp)}),i||(i=[],this.wnafPrecomputes.set(t,i)),i.push(a)),a}assertPoint(e){if(!(e instanceof this.Point))throw TypeError(`"point" expected Point instance, got type=`+typeof e)}validateMulInput(e,t){if(this.assertPoint(e),!Jo(t,Ms,this.Point.Fn.ORDER))throw Error(`invalid scalar`)}runCT(e,t,n,r){let i=Ks(e);return i===1?this.fixedWindowCT(e,t,n):this.wnafCachedCT(this.getWnafPrecomputes(i,e,n,r),t)}mulCT(e,t,n){return this.validateMulInput(e,t),this.runCT(e,t,this.bits,n)}mulCTBlinded(e,t,n){if(this.validateMulInput(e,t),this.randomBytes===void 0)throw Error(`randomBytes is required for scalar blinding`);let r=this.Point.Fn.BITS+Fs,i=this.randomBytes(Ps);if(!No(i)||i.length!==Ps)throw Error(`randomBytes returned invalid byte array`);i[0]=i[0]&63|128;let a=t+Ho(i)*this.Point.Fn.ORDER;return this.runCT(e,a,r,n)}fixedWindowCT(e,t,n){let r=Is,i=1<<r,a=Zo(r),o=Array(i);o[0]=this.ZERO;for(let t=1;t<i;t++)o[t]=o[t-1].add(e);let s=Math.ceil(n/r),c=this.ZERO;for(let e=s-1;e>=0;e--){if(e!==s-1)for(let e=0;e<r;e++)c=c.double();let n=Number(t>>BigInt(e*r)&a),l=o[0];for(let e=1;e<i;e++)l=e===n?o[e]:l;c=c.add(l)}return{p:c,f:c}}shouldBlind(e,t){return this.randomBytes===void 0?!1:t===Ms||e===this.BASE&&(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(e,t,n,r){return this.shouldBlind(e,n)?this.mulCTBlinded(e,t,r):this.mulCT(e,t,r)}mulUnsafe(e,t,n){if(this.assertPoint(e),!qo(t))throw Error(`invalid scalar`);let r=Ks(e);if(r===1||t>=this.Point.Fn.ORDER)return Qs(this.Point,[e],[t],!0);let i=this.getWnafPrecomputes(r,e,this.bits,n);return this.wnafCachedCT(i,t).p}setWindowSize(e,t){this.assertPoint(e),Bs(t,this.bits),Vs((Math.ceil((this.bits+Fs)/t)+1)*2**(t-1),this.Point.Fp.BYTES),Gs.set(e,t),this.wnafPrecomputes.delete(e)}hasWindowSize(e){return Ks(e)!==1}};function Qs(e,t,n,r=!1){if(Rs(e),Us(t,e),Ro(r,`allowOversized`),Ws(n,e.Fn,r?e.Fn.ORDER**Ns:void 0),t.length!==n.length)throw Error(`arrays of points and scalars must have equal length`);let i=t.map(e=>qs(e,4)),a=n.map(e=>Js(e,4));return Xs(e.ZERO,i,a)}function $s(e,t,n){if(t){if(t.ORDER!==e)throw Error(`Field.ORDER must match order: Fp == p, Fn == n`);return ws(t),t}return As(e,{isLE:n})}function ec(e,t,n={},r){if(e!==`weierstrass`&&e!==`edwards`)throw Error(`expected curve type "weierstrass" or "edwards"`);if(r===void 0&&(r=e===`edwards`),!t||typeof t!=`object`)throw Error(`expected valid ${e} CURVE object`);Qo(n);for(let e of[`p`,`n`,`h`]){let n=t[e];if(!(qo(n)&&n!==js))throw Error(`CURVE.${e} must be positive bigint`)}let i=$s(t.p,n.Fp,r),a=$s(t.n,n.Fn,r),o=[`Gx`,`Gy`,`a`,e===`weierstrass`?`b`:`d`];for(let e of o)if(!i.isValid(t[e]))throw Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:i,Fn:a}}function tc(e,t){return function(n){let r=e(n);return{secretKey:r,publicKey:t(r)}}}var nc=BigInt(0),rc=BigInt(1),ic=BigInt(2),ac=BigInt(4),oc=BigInt(8);function sc(e,t,n,r){let i=e.sqr(n),a=e.sqr(r),o=e.add(e.mul(t.a,i),a),s=e.add(e.ONE,e.mul(t.d,e.mul(i,a)));return e.eql(o,s)}function cc(e,t={}){Qo(t,{},{},`extraOpts`);let n=t,r=ec(`edwards`,e,n,n.FpFnLE),{Fp:i,Fn:a}=r,o=r.CURVE,{h:s}=o;if(Es(i,o.a)!==1)throw Error(`edwards: CURVE.a must be a square in Fp for complete addition formulas`);if(Es(i,o.d)!==-1)throw Error(`edwards: CURVE.d must be a non-square in Fp for complete addition formulas`);Qo(n,{},{uvRatio:`function`,randomBytes:`function`});let c=n.randomBytes===void 0?Po:n.randomBytes,l=ic<<BigInt(i.BYTES*8)-rc;function u(e){if(!i.isOdd)throw Error(`Field does not have .isOdd()`);return i.isOdd(e)}let d=n.uvRatio===void 0?(e,t)=>{try{return{isValid:!0,value:i.sqrt(i.div(e,t))}}catch{return{isValid:!1,value:nc}}}:n.uvRatio;if(!sc(i,o,o.Gx,o.Gy))throw Error(`bad curve params: generator point`);let f=i.eql(o.a,i.neg(i.ONE))?e=>i.neg(e):i.eql(o.a,i.ONE)?e=>e:e=>i.mul(o.a,e);function p(e,t,n=!1){let r=n?rc:nc;return Yo(`coordinate `+e,t,r,l),t}function m(e){if(!(e instanceof h))throw Error(`EdwardsPoint expected`)}class h{static BASE=new h(o.Gx,o.Gy,i.ONE,i.mul(o.Gx,o.Gy));static ZERO=new h(i.ZERO,i.ONE,i.ONE,i.ZERO);static Fp=i;static Fn=a;X;Y;Z;T;constructor(e,t,n,r){this.X=p(`x`,e),this.Y=p(`y`,t),this.Z=p(`z`,n,!0),this.T=p(`t`,r),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){if(e instanceof h)throw Error(`extended point not allowed`);let{x:t,y:n}=e||{};return p(`x`,t),p(`y`,n),new h(t,n,i.ONE,i.mul(t,n))}static fromBytes(e,t=!1){let n=i.BYTES,{a:r,d:a}=o;e=Ko(Eo(e,n,`point`)),Ro(t,`zip215`);let s=Ko(e),c=e[n-1];s[n-1]=c&-129;let f=Uo(s);Yo(`point.y`,f,nc,t?l:i.ORDER);let p=i.sqr(f),m=i.sub(p,i.ONE),g=i.sub(i.mulN(a,p),r),{isValid:_,value:v}=d(m,g);if(!_)throw Error(`bad point: invalid y coordinate`);let y=u(v),ee=!!(c&128);if(!t&&i.is0(v)&&ee)throw Error(`bad point: x=0 and x_0=1`);return ee!==y&&(v=i.neg(v)),h.fromAffine({x:v,y:f})}static fromHex(e,t=!1){return h.fromBytes(Mo(e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=6,t=!0){return _.setWindowSize(this,e),t||this.multiply(ic),this}assertValidity(){let e=this,{a:t,d:n}=o;if(e.is0())throw Error(`bad point: ZERO`);let{X:r,Y:a,Z:s,T:c}=e,l=i.sqr(r),u=i.sqr(a),d=i.sqr(s),f=i.sqr(d),p=i.mul(l,t),m=i.mul(i.add(p,u),d),h=i.add(f,i.mul(n,i.mul(l,u)));if(!i.eql(m,h))throw Error(`bad point: equation left != right (1)`);let g=i.mul(r,a),_=i.mul(s,c);if(!i.eql(g,_))throw Error(`bad point: equation left != right (2)`)}equals(e){m(e);let{X:t,Y:n,Z:r}=this,{X:a,Y:o,Z:s}=e,c=i.mul(t,s),l=i.mul(a,r),u=i.mul(n,s),d=i.mul(o,r);return i.eql(c,l)&&i.eql(u,d)}is0(){return this.equals(h.ZERO)}negate(){return new h(i.neg(this.X),this.Y,this.Z,i.neg(this.T))}double(){let{X:e,Y:t,Z:n}=this,r=i.sqr(e),a=i.sqr(t),o=i.mul(i.sqr(n),ic),s=f(r),c=i.addN(e,t),l=i.sub(i.subN(i.sqr(c),r),a),u=i.addN(s,a),d=i.subN(u,o),p=i.subN(s,a),m=i.mul(l,d),g=i.mul(u,p),_=i.mul(l,p),v=i.mul(d,u);return new h(m,g,v,_)}add(e){m(e);let{d:t}=o,{X:n,Y:r,Z:a,T:s}=this,{X:c,Y:l,Z:u,T:d}=e,p=i.mul(n,c),g=i.mul(r,l),_=i.mul(i.mulN(s,t),d),v=i.mul(a,u),y=i.sub(i.subN(i.mulN(i.addN(n,r),i.addN(c,l)),p),g),ee=i.subN(v,_),te=i.addN(v,_),b=i.sub(g,f(p)),x=i.mul(y,ee),S=i.mul(te,b),C=i.mul(y,b),w=i.mul(ee,te);return new h(x,S,w,C)}subtract(e){return m(e),this.add(e.negate())}multiply(e){if(!a.isValidNot0(e))throw RangeError(`invalid scalar: expected 1 <= sc < curve.n`);let{p:t,f:n}=_.mulSecret(this,e,s,g);return g([t,n])[0]}multiplyUnsafe(e){if(!a.isValid(e))throw RangeError(`invalid scalar: expected 0 <= sc < curve.n`);return e===nc?h.ZERO:this.is0()||e===rc?this:_.mulUnsafe(this,e,g)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return _.mulUnsafe(this,o.n).is0()}toAffine(e){let t=this,n=e;if(n!=null&&typeof n!=`bigint`)throw TypeError(`"invertedZ" expected bigint, got type=`+typeof n);let{X:r,Y:a,Z:o}=t,s=t.is0();n??=s?i.create(oc):i.inv(o);let c=i.mul(r,n),l=i.mul(a,n),u=i.mul(o,n);if(s)return{x:i.ZERO,y:i.ONE};if(!i.eql(u,i.ONE))throw Error(`invZ was invalid`);return{x:c,y:l}}clearCofactor(){return s===rc?this:s===ic?this.double():s===ac?this.double().double():s===oc?this.double().double().double():this.multiplyUnsafe(s)}toBytes(){let{x:e,y:t}=this.toAffine(),n=i.toBytes(t);return n[n.length-1]|=u(e)?128:0,n}toHex(){return Ao(this.toBytes())}toString(){return`<Point ${this.is0()?`ZERO`:this.toHex()}>`}}let g=e=>zs(h,e),_=new Zs(h,c);return _.bits>=6&&h.BASE.precompute(6),Object.freeze(h.prototype),Object.freeze(h),h}function lc(e,t,n={}){if(Rs(e),typeof t!=`function`)throw Error(`"hash" function param is required`);let r=t,i=n;Qo(i,{},{adjustScalarBytes:`function`,randomBytes:`function`,domain:`function`,prehash:`function`,zip215:`boolean`,mapToCurve:`function`,toMontgomery:`function`,toMontgomerySecret:`function`});let{prehash:a}=i,{BASE:o,Fp:s,Fn:c}=e,l=r.outputLen,u=2*s.BYTES;if(l!==void 0&&(Bo(l,`hash.outputLen`),l!==u))throw Error(`hash.outputLen must be ${u}, got ${l}`);let d=i.randomBytes===void 0?Po:i.randomBytes,f=i.toMontgomery,p=i.toMontgomerySecret,m=i.adjustScalarBytes===void 0?e=>e:i.adjustScalarBytes,h=i.domain===void 0?(e,t,n)=>{if(Ro(n,`phflag`),t.length||n)throw Error(`Contexts/pre-hash are not supported`);return e}:i.domain;function g(e){return c.create(Uo(e))}function _(e){let t=C.secretKey;Eo(e,C.secretKey,`secretKey`);let n=Eo(r(e),2*t,`hashedSecretKey`),i=m(n.slice(0,t));return{head:i,prefix:n.slice(t,2*t),scalar:g(i)}}function v(e){let{head:t,prefix:n,scalar:r}=_(e),i=o.multiply(r);return{head:t,prefix:n,scalar:r,point:i,pointBytes:i.toBytes()}}function y(e){return v(e).pointBytes}function ee(e=Uint8Array.of(),...t){let n=jo(...t);return g(r(h(n,Eo(e,void 0,`context`),!!a)))}function te(e,t,n={}){Qo(n,{},{},`options`),e=Ko(Eo(e,void 0,`message`)),a&&(e=a(e));let{prefix:r,scalar:i,pointBytes:s}=v(t),l=ee(n.context,r,e),u=o.multiply(l).toBytes(),d=ee(n.context,u,s,e),f=c.create(l+d*i);if(!c.isValid(f))throw Error(`sign failed: invalid s`);return Eo(jo(u,c.toBytes(f)),C.signature,`result`)}let b={zip215:i.zip215};function x(t,n,r,i=b){Qo(i);let{context:s}=i,c=i.zip215===void 0?!!b.zip215:i.zip215,l=C.signature;t=Eo(t,l,`signature`),n=Eo(n,void 0,`message`),r=Eo(r,C.publicKey,`publicKey`),c!==void 0&&Ro(c,`zip215`),a&&(n=a(n));let u=l/2,d=t.subarray(0,u),f=Uo(t.subarray(u,l)),p,m,h;try{p=e.fromBytes(r,c),m=e.fromBytes(d,c),h=o.multiplyUnsafe(f)}catch{return!1}if(!c&&p.isSmallOrder())return!1;let g=ee(s,d,r,n);return m.add(p.multiplyUnsafe(g)).subtract(h).clearCofactor().is0()}let S=s.BYTES,C={secretKey:S,publicKey:S,signature:2*S,seed:S};function w(e){return e=e===void 0?d(C.seed):e,Eo(e,C.seed,`seed`)}function T(e){return No(e)&&e.length===C.secretKey}function E(t,n){try{return!!e.fromBytes(t,n===void 0?b.zip215:n)}catch{return!1}}let ne={getExtendedPublicKey:v,randomSecretKey:w,isValidSecretKey:T,isValidPublicKey:E,toMontgomery(t){if(f===void 0)throw Error(`Montgomery conversion is not supported for this curve`);return f(e.fromBytes(t))},toMontgomerySecret(e){if(p===void 0)throw Error(`Montgomery conversion is not supported for this curve`);return p(e)}};return Object.freeze(C),Object.freeze(ne),Object.freeze({keygen:tc(w,y),getPublicKey:y,sign:te,verify:x,utils:ne,Point:e,lengths:C})}var uc=BigInt(0),dc=BigInt(1),fc=BigInt(2);function pc(e,t){return e+t-(t>>dc<<dc)}function mc(e){let t=BigInt(6)*e;return(n,r,i)=>{let a=r+i,o=((t+i-r)*n+r)%e;return{x_2:o,x_3:a-o}}}function hc(e){return Qo(e,{P:`bigint`,type:`string`,adjustScalarBytes:`function`,powPminus2:`function`},{randomBytes:`function`,scalarMultBase:`function`}),Object.freeze({...e})}function gc(e){let t=hc(e),{P:n,type:r,adjustScalarBytes:i,powPminus2:a,randomBytes:o}=t,s=t.scalarMultBase,c=r===`x25519`;if(!c&&r!==`x448`)throw Error(`invalid type`);let l=o===void 0?Po:o,u=c?255:448,d=mc(n),f=c?32:56,p=BigInt(c?9:5),m=BigInt(c?121665:39081),h=c?fc**BigInt(254):fc**BigInt(447),g=h+(c?BigInt(8)*(fc**BigInt(251)-dc):BigInt(4)*(fc**BigInt(445)-dc))+dc,_=e=>ds(e,n),v=y(p);function y(e){return Go(_(e),f)}function ee(e){let t=Ko(Eo(e,f,`uCoordinate`));return c&&(t[31]&=127),_(Uo(t))}function te(e){return Uo(i(Ko(Eo(e,f,`scalar`))))}let b=new Set(c?[uc,dc,n-dc,BigInt(`325606250916557431795983626356110631294008115727848805560023387167927233504`),BigInt(`39382357235489614581723060781553021112529911719440698176882885853963445705823`)]:[uc,dc,n-dc]);function x(e,t){let n=ee(t);if(b.has(n))throw Error(`invalid private or public key received`);let r=T(n,te(e));if(r===uc)throw Error(`invalid private or public key received`);return y(r)}function S(e){if(s===void 0)return x(e,v);let t=te(e);Yo(`scalar`,t,h,g);let n=_(s(t));if(n===uc)throw Error(`invalid private or public key received`);return y(n)}let C=S,w=x;function T(e,t){Yo(`u`,e,uc,n),Yo(`scalar`,t,h,g);let r=t,i=e,o=dc,s=uc,c=e,l=dc,f=r^r>>dc;for(let e=BigInt(u-1);e>=uc;e--){let t=pc(n,f>>e);({x_2:o,x_3:c}=d(t,o,c)),{x_2:s,x_3:l}=d(t,s,l);let r=o+s,a=_(r*r),u=o-s,p=_(u*u),h=a-p,g=c+l,v=c-l,y=_(v*r),ee=_(g*u),te=y+ee,b=y-ee;c=_(te*te),l=_(i*_(b*b)),o=_(a*p),s=_(h*(a+_(m*h)))}let p=pc(n,r);({x_2:o,x_3:c}=d(p,o,c)),{x_2:s,x_3:l}=d(p,s,l);let v=a(s);return _(o*v)}let E={secretKey:f,publicKey:f,seed:f},ne=e=>(e=e===void 0?l(f):e,Eo(e,E.seed,`seed`),e),D={randomSecretKey:ne};return Object.freeze(E),Object.freeze(D),Object.freeze({keygen:tc(ne,C),getSharedSecret:w,getPublicKey:C,scalarMult:x,scalarMultBase:S,utils:D,GuBytes:v.slice(),lengths:E})}var _c=BigInt(0),vc=BigInt(1),yc=BigInt(2),bc=BigInt(3),xc=BigInt(5),Sc=BigInt(8),Cc=BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed`),wc={p:Cc,n:BigInt(`0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed`),h:Sc,a:BigInt(`0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec`),d:BigInt(`0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3`),Gx:BigInt(`0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a`),Gy:BigInt(`0x6666666666666666666666666666666666666666666666666666666666666658`)};function Tc(e){let t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),a=Cc,o=e*e%a*e%a,s=ps(ps(o,yc,a)*o%a,vc,a)*e%a,c=ps(s,xc,a)*s%a,l=ps(c,t,a)*c%a,u=ps(l,n,a)*l%a,d=ps(u,r,a)*u%a;return{pow_p_5_8:ps(ps(ps(ps(d,i,a)*d%a,i,a)*d%a,t,a)*c%a,yc,a)*e%a,b2:o}}function Ec(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}var Dc=BigInt(`19681161376707505956807079304988542015446066515923890162744021073123829784752`);function Oc(e,t){let n=Cc,r=ds(t*t*t,n),i=Tc(e*ds(r*r*t,n)).pow_p_5_8,a=ds(e*r*i,n),o=ds(t*a*a,n),s=a,c=ds(a*Dc,n),l=o===e,u=o===ds(-e,n),d=o===ds(-e*Dc,n);return l&&(a=s),(u||d)&&(a=c),Ss(a,n)&&(a=ds(-a,n)),{isValid:l||u,value:a}}var kc=cc(wc,{uvRatio:Oc}),Ac=kc.Fp;function jc(e){let{y:t}=e;return Ac.toBytes(Ac.div(vc+t,vc-t))}function Mc(e){let t=kc.Fp.BYTES;return Va(e,t),Ec(wo(e.subarray(0,t))).subarray(0,t)}function Nc(e){return lc(kc,wo,Object.assign({adjustScalarBytes:Ec,toMontgomery:jc,toMontgomerySecret:Mc,zip215:!0},e))}var Pc=Nc({}),Fc=(()=>{let e=Cc,t=t=>{let{pow_p_5_8:n,b2:r}=Tc(t);return ds(ps(n,bc,e)*r,e)};return gc({P:e,type:`x25519`,powPminus2:t,adjustScalarBytes:Ec,scalarMultBase:n=>{let r=ds(n,kc.Fn.ORDER);if(r===_c)return _c;let i=kc.BASE.multiply(r);return ds((i.Z+i.Y)*t(ds(i.Z-i.Y,e)),e)}})})(),Ic=_a.default,Lc=new TextEncoder,Rc=e=>Lc.encode(e);function zc(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function Bc(e){return Uint8Array.from(atob(e.replace(/-/g,`+`).replace(/_/g,`/`)+`=`.repeat((4-e.length%4)%4)),e=>e.charCodeAt(0))}var Vc=()=>zc(crypto.getRandomValues(new Uint8Array(32)));async function Hc(e){return zc(Co(typeof e==`string`?Rc(e):e))}function Uc(e){let t=Ic(e);if(t===void 0)throw Error(`Invalid canonical payload`);return t}async function Wc(e){return Hc(Uc(e))}async function Gc(){let e=crypto.getRandomValues(new Uint8Array(32)),t=crypto.getRandomValues(new Uint8Array(32));return{deviceId:crypto.randomUUID(),identityKey:zc(Fc.getPublicKey(e)),proofKey:zc(Pc.getPublicKey(t)),identityPrivateKey:e,proofPrivateKey:t}}function Kc(e){return Rc(Uc({domain:`YAOVI-DEVICE-PROOF`,version:1,method:e.method,path:e.path,transactionId:e.transactionId,nonce:e.nonce,issuedAt:e.issuedAt,requestBodyHash:e.requestBodyHash,identityKeyFingerprint:e.identityKeyFingerprint}))}async function qc(e,t){return{nonce:t.nonce,issuedAt:t.issuedAt,signature:zc(Pc.sign(Kc(t),e.proofPrivateKey))}}function Jc(e,t){return zc(Pc.sign(Rc(Uc(t)),e.proofPrivateKey))}function Yc(e,t,n){try{return Pc.verify(Bc(n),Rc(Uc(t)),Bc(e),{zip215:!1})}catch{return!1}}function Xc(e){return{publicKey:Bc(e.identityKey),secretKey:new Uint8Array(e.identityPrivateKey)}}var Zc=32,Qc=16,$c=65535,el=32,tl=4,nl=8,rl=8;new TextEncoder().encode(`clatter.hybrid_dual_layer.outer`);var il=class extends Error{code;constructor(e,t){super(t??e),this.code=e,this.name=`CipherError`}},al=class extends Error{code;causeErr;constructor(e,t,n){super(t??e),this.code=e,this.causeErr=n,this.name=`HandshakeError`}},ol=class extends Error{kind;constructor(e,t){super(t??e),this.kind=e,this.name=`PatternError`}},sl=class extends Error{code;constructor(e,t){super(t??e),this.code=e,this.name=`TransportError`}};function cl(e,t){for(let t of e)if(t.length>nl)throw Error(`Too many tokens in one handshake message`);for(let e of t)if(e.length>nl)throw Error(`Too many tokens in one handshake message`);if(e.length>rl||t.length>rl)throw Error(`Too many handshake messages per role`)}function ll(e){let t=e=>e===6||e===7;return e.initiator.some(e=>e.some(t))||e.responder.some(e=>e.some(t))}function ul(e){let t=e=>e===2||e===3||e===4||e===5;return e.initiator.some(e=>e.some(t))||e.responder.some(e=>e.some(t))}function dl(e){return e.initiator.some(e=>e.includes(8))||e.responder.some(e=>e.includes(8))}function fl(e){for(let t of e){let e=!1,n=!1;for(let r of t)if(r===6){if(n||e)throw new ol(`PqTokenOrderViolation`)}else if(r===7){if(e=!0,n)throw new ol(`PqTokenOrderViolation`)}else(r===0||r===1)&&(n=!0)}}function pl(e){let t=!1;for(let n of e)for(let e of n)if(e===8)t=!0;else if(e===0||e===6)return;else if(e===7){if(t)throw new ol(`PskValidityViolation`);return}else if(e===1&&t)throw new ol(`PskValidityViolation`)}var ml=class e{name;hasPskFlag;hsType;preInitiator;preResponder;messagePattern;constructor(e,t,n,r,i){this.name=e,cl(r,i),this.preInitiator=[...t],this.preResponder=[...n],this.messagePattern={initiator:r.map(e=>[...e]),responder:i.map(e=>[...e])};let a=ll(this.messagePattern),o=ul(this.messagePattern);if(a&&o)this.hsType=2;else if(a)this.hsType=1;else if(o)this.hsType=0;else throw Error(`Invalid handshake pattern`);this.hasPskFlag=dl(this.messagePattern),this.hasPskFlag&&(pl(this.messagePattern.initiator),pl(this.messagePattern.responder)),a&&(fl(this.messagePattern.initiator),fl(this.messagePattern.responder))}getMessagePattern(){return this.messagePattern}getInitiatorPatternLen(){return this.messagePattern.initiator.length}getResponderPatternLen(){return this.messagePattern.responder.length}getInitiatorPreShared(){return this.preInitiator}getResponderPreShared(){return this.preResponder}getInitiatorPattern(e){return this.messagePattern.initiator[e]??[]}getResponderPattern(e){return this.messagePattern.responder[e]??[]}hasPsk(){return this.hasPskFlag}getName(){return this.name}isOneWay(){return this.messagePattern.responder.length===0}getType(){return this.hsType}addPsks(t,n){let r=this.messagePattern.initiator.map(e=>[...e]),i=this.messagePattern.responder.map(e=>[...e]);for(let e of t)if(e===0)(r[0]??=[]).unshift(8);else if(e%2==0){let t=e/2-1;(i[t]??=[]).push(8)}else{let t=(e-1)/2;(r[t]??=[]).push(8)}return new e(n,this.preInitiator,this.preResponder,r,i)}},hl=1152921504606846975n,gl=class{C;key;n=0n;overflowed=!1;constructor(e,t,n){this.C=e,this.key=Uint8Array.from(t),this.n=n}getNonce(){return this.n}setNonce(e){this.n=e}getKey(){return Uint8Array.from(this.key)}encryptWithAd(e,t,n){if(this.overflowed)throw new il(`NonceOverflow`);this.C.encrypt(this.key,this.n,e,t,n),this.bumpNonce()}encryptWithAdInPlace(e,t,n){if(this.overflowed)throw new il(`NonceOverflow`);let r=this.C.encryptInPlace(this.key,this.n,e,t,n);return this.bumpNonce(),r}decryptWithAd(e,t,n){if(this.overflowed)throw new il(`NonceOverflow`);this.C.decrypt(this.key,this.n,e,t,n),this.bumpNonce()}decryptWithAdInPlace(e,t,n){if(this.overflowed)throw new il(`NonceOverflow`);let r=this.C.decryptInPlace(this.key,this.n,e,t,n);return this.bumpNonce(),r}rekey(){this.key.set(this.C.rekey(this.key))}bumpNonce(){if(this.n===hl){this.overflowed=!0;return}this.n+=1n}},_l=class{initiatorToResponder;responderToInitiator;constructor(e,t){this.initiatorToResponder=e,this.responderToInitiator=t}};function vl(e,t){return e.slice(0,t.keyLen)}var yl=class{C;H;cipherstate;h;ck;constructor(e,t,n){this.C=e,this.H=t;let r=new TextEncoder().encode(n);this.h=t.newOutput(),this.ck=t.newOutput(),this.h.fill(0),r.length<=t.hashLen?this.h.set(r,0):this.h.set(t.hash(r).subarray(0,t.hashLen)),this.ck.set(this.h)}mixHash(e){this.h.set(this.H.hash(bl(this.h,e)).subarray(0,this.H.hashLen))}mixKey(e){let[t,n]=this.H.hkdf(this.ck,e);this.ck.set(t.subarray(0,this.H.hashLen));let r=vl(n,this.C);this.cipherstate=new gl(this.C,r,0n)}mixKeyAndHash(e){let[t,n,r]=this.H.hkdf3(this.ck,e);this.ck.set(t.subarray(0,this.H.hashLen)),this.mixHash(n);let i=vl(r,this.C);this.cipherstate=new gl(this.C,i,0n)}encryptAndHash(e,t){this.cipherstate?this.cipherstate.encryptWithAd(this.h,e,t):t.set(e),this.mixHash(t)}decryptAndHash(e,t){this.cipherstate?this.cipherstate.decryptWithAd(this.h,e,t):t.set(e),this.mixHash(e)}split(){if(!this.hasKey())throw new il(`MissingKeyMaterial`);let[e,t]=this.H.hkdf(this.ck,new Uint8Array),n=vl(e,this.C),r=vl(t,this.C);return new _l(new gl(this.C,n,0n),new gl(this.C,r,0n))}getHash(){return Uint8Array.from(this.h)}getChainingKey(){return Uint8Array.from(this.ck)}hasKey(){return this.cipherstate!==void 0}zeroize(){this.h.fill(0),this.ck.fill(0),this.cipherstate=void 0}};function bl(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e,0),n.set(t,e.length),n}function xl(e){if(e instanceof sl)return e;if(e instanceof il)return new sl(`Cipher`,e.message);throw e}var Sl=class{pattern;cipherStates;h;initiator;tagLen;constructor(e){this.pattern=e.pattern,this.cipherStates=e.cipherStates,this.h=e.handshakeHash,this.initiator=e.initiator,this.tagLen=e.tagLen}getHandshakeHash(){return this.h}getHandshakeHashValue(){return this.h}send(e,t){let n=this.tagLen,r=e.length+n;if(r>$c)throw Error(`Maximum Noise message length exceeded`);if(t.length<r)throw new sl(`BufferTooSmall`);if(this.pattern.isOneWay()&&!this.initiator)throw new sl(`OneWayViolation`);let i=this.outCipher();try{i.encryptWithAd(new Uint8Array,e,t.subarray(0,r))}catch(e){throw xl(e)}return r}sendInPlace(e,t){let n=t+this.tagLen;if(n>$c)throw Error(`Maximum Noise message length exceeded`);if(e.length<n)throw new sl(`BufferTooSmall`);if(this.pattern.isOneWay()&&!this.initiator)throw new sl(`OneWayViolation`);let r=this.outCipher();try{return r.encryptWithAdInPlace(new Uint8Array,e,t)}catch(e){throw xl(e)}}sendVec(e){let t=this.tagLen,n=new Uint8Array(e.length+t);return this.send(e,n),n}receive(e,t){let n=this.tagLen;if(e.length<n)throw new sl(`TooShort`);if(e.length>$c)throw Error(`Maximum Noise message length exceeded`);if(this.pattern.isOneWay()&&this.initiator)throw new sl(`OneWayViolation`);let r=this.inCipher(),i=e.length-n;if(t.length<i)throw new sl(`BufferTooSmall`);try{r.decryptWithAd(new Uint8Array,e,t.subarray(0,i))}catch(e){throw xl(e)}return i}receiveInPlace(e,t){if(t<this.tagLen)throw new sl(`TooShort`);if(t>$c)throw Error(`Maximum Noise message length exceeded`);if(t>e.length)throw new sl(`BufferTooSmall`);if(this.pattern.isOneWay()&&this.initiator)throw new sl(`OneWayViolation`);let n=this.inCipher();try{return n.decryptWithAdInPlace(new Uint8Array,e,t)}catch(e){throw xl(e)}}receiveVec(e){let t=this.tagLen,n=new Uint8Array(e.length-t);return this.receive(e,n),n}sendingNonce(){return this.outCipher().getNonce()}receivingNonce(){return this.inCipher().getNonce()}setReceivingNonce(e){this.inCipher().setNonce(e)}rekeySender(){try{this.outCipher().rekey()}catch(e){throw xl(e)}}rekeyReceiver(){try{this.inCipher().rekey()}catch(e){throw xl(e)}}takeCiphers(){return this.cipherStates}outCipher(){return this.initiator?this.cipherStates.initiatorToResponder:this.cipherStates.responderToInitiator}inCipher(){return this.initiator?this.cipherStates.responderToInitiator:this.cipherStates.initiatorToResponder}},Cl=32,wl=`25519`;function Tl(e){let t=e(32);return{secretKey:t,publicKey:Fc.getPublicKey(t)}}function El(e,t){return Fc.getSharedSecret(e,t)}function Dl(){return Cl}function Ol(e,t,n){return`Noise_${e}_${wl}_${t.name}_${n.name}`}var kl=()=>Dl(),Al=class{pattern;config;symmetric;s;e;rs;re;status;initiatorPatternIndex=0;responderPatternIndex=0;psks=[];pskApplied=!1;ownRandomnessApplied=!1;constructor(e,t){if(this.pattern=e,this.config=t,e.getType()!==0)throw new al(`InvalidPattern`);let n=Ol(e.getName(),t.cipher,t.hash);this.symmetric=new yl(t.cipher,t.hash,n),this.symmetric.mixHash(t.prologue);let r=t.initiator;for(let n of e.getInitiatorPreShared())if(n===1)this.symmetric.mixHash((r?t.s?.publicKey:t.rs)??jl());else throw Error(`Invalid pre-shared token in pattern`);for(let n of e.getResponderPreShared())if(n===1)this.symmetric.mixHash((r?t.rs:t.s?.publicKey)??jl());else if(n===0){if(r){let n=t.re??jl();this.symmetric.mixHash(n),e.hasPsk()&&this.symmetric.mixKey(n)}else{let n=t.e?.publicKey??jl();this.symmetric.mixHash(n),e.hasPsk()&&this.symmetric.mixKey(n)}}else throw Error(`Invalid pre-shared token in pattern`);this.s=t.s,this.e=t.e,this.rs=t.rs,this.re=t.re,this.status=+!t.initiator}getPattern(){return this.pattern}isInitiator(){return this.config.initiator}isWriteTurn(){return this.status===0}isFinished(){return this.status===2}mixHash(e){this.symmetric.mixHash(e)}mixKeyAndHash(e){this.symmetric.mixKeyAndHash(e)}pushPsk(e){if(e.length!==el)throw Error(`PSK must be ${el} bytes`);if(this.psks.length>=tl)throw Error(`PSK queue full`);this.psks.push(Uint8Array.from(e))}getName(){return Ol(this.pattern.getName(),this.config.cipher,this.config.hash)}getHash(){return this.symmetric.getHash()}getRemoteStatic(){return this.rs?Uint8Array.from(this.rs):void 0}getRemoteEphemeral(){return this.re?Uint8Array.from(this.re):void 0}getCiphers(){try{return this.symmetric.split()}catch(e){throw e instanceof il?new al(`Cipher`,void 0,e):e}}finalize(){if(!this.isFinished())throw new al(`InvalidState`);return new Sl({pattern:this.pattern,cipherStates:this.getCiphers(),handshakeHash:this.getHash(),initiator:this.isInitiator(),tagLen:this.config.cipher.tagLen})}nextTokensForCurrentTurn(){let e=this.config.initiator,t=this.status;if(t===3||t===2)throw new al(`InvalidState`);return e&&t===0||!e&&t===1?this.pattern.getInitiatorPattern(this.initiatorPatternIndex)??Ml():this.pattern.getResponderPattern(this.responderPatternIndex)??Ml()}getNextMessageOverhead(){let e=this.nextTokensForCurrentTurn(),t=0,n=this.symmetric.hasKey(),r=this.pattern.hasPsk(),{cipher:i}=this.config,a=kl();for(let o of e)if(o===0)t+=a,r&&(n=!0);else if(o===1)t+=a,n&&(t+=i.tagLen);else if(o===2||o===3||o===4||o===5)n=!0;else if(o!==8)throw Error(`Incompatible pattern`);return n&&(t+=i.tagLen),t}writeMessage(e,t){if(this.status===3)throw new al(`ErrorState`);if(!this.isWriteTurn())throw new al(`InvalidState`);let n=this.getNextMessageOverhead(),r=e.length+n;if(r>$c)throw Error(`Maximum Noise message length exceeded`);if(t.length<r)throw new al(`BufferTooSmall`);try{return this.writeMessageImpl(e,t,r)}catch(e){throw this.setError(),e}}readMessage(e,t){if(e.length>$c)throw Error(`Maximum Noise message length exceeded`);if(this.status===3)throw new al(`ErrorState`);if(this.isWriteTurn())throw new al(`InvalidState`);let n=this.getNextMessageOverhead();if(e.length<n)throw new al(`InvalidMessage`);let r=e.length-n;if(t.length<r)throw new al(`BufferTooSmall`);try{return this.readMessageImpl(e,t,r)}catch(e){throw this.setError(),e}}setError(){this.status=3,this.symmetric.zeroize()}pskValidityCheck(){if(this.pskApplied&&!this.ownRandomnessApplied)throw new al(`Pattern`,`PskValidityViolation`,new ol(`PskValidityViolation`))}takePsk(){let e=this.psks.shift();if(!e)throw new al(`PskMissing`);return this.pskApplied=!0,e}mapDh(e){let t=e=>{if(!e)throw new al(`MissingMaterial`);return e},n=e=>{if(!e)throw new al(`MissingMaterial`);return e},r;try{if(e===2)r=El(t(this.e).secretKey,n(this.re));else if(e===3)r=this.isInitiator()?El(t(this.e).secretKey,n(this.rs)):El(t(this.s).secretKey,n(this.re));else if(e===4)r=this.isInitiator()?El(t(this.s).secretKey,n(this.re)):El(t(this.e).secretKey,n(this.rs));else if(e===5)r=El(t(this.s).secretKey,n(this.rs));else throw Error(`mapDh`)}catch(e){throw e instanceof al?e:new al(`Dh`,e instanceof Error?e.message:String(e))}if(r.length!==32)throw new al(`Dh`,`Invalid shared secret length`);return r}updateHsStatus(){this.status=this.initiatorPatternIndex===this.pattern.getInitiatorPatternLen()&&this.responderPatternIndex===this.pattern.getResponderPatternLen()?2:this.status===1?0:1}writeMessageImpl(e,t,n){let r=this.isInitiator()?this.pattern.getInitiatorPattern(this.initiatorPatternIndex++):this.pattern.getResponderPattern(this.responderPatternIndex++);if(!r)throw new al(`InvalidState`);let{cipher:i,rng:a}=this.config,o=kl(),s=0;for(let e of r)if(e===0){this.e||=Tl(a);let e=this.e.publicKey;this.symmetric.mixHash(e),this.pattern.hasPsk()&&this.symmetric.mixKey(e),t.set(e,s),s+=o,this.ownRandomnessApplied=!0}else if(e===1){if(!this.s)throw new al(`MissingMaterial`);this.pskValidityCheck();let e=this.symmetric.hasKey()?o+i.tagLen:o;this.symmetric.encryptAndHash(this.s.publicKey,t.subarray(s,s+e)),s+=e}else if(e===8)this.symmetric.mixKeyAndHash(this.takePsk());else if(e===2||e===3||e===4||e===5)this.symmetric.mixKey(this.mapDh(e));else throw Error(`Incompatible pattern`);if(e.length>0&&this.pskApplied&&!this.ownRandomnessApplied)throw new al(`Pattern`,`PskValidityViolation`,new ol(`PskValidityViolation`));return this.symmetric.encryptAndHash(e,t.subarray(s,n)),this.updateHsStatus(),n}readMessageImpl(e,t,n){let r=e,i=e=>{if(r.length<e)throw new al(`InvalidMessage`);let t=r.subarray(0,e);return r=r.subarray(e),t},a=this.isInitiator()?this.pattern.getResponderPattern(this.responderPatternIndex++):this.pattern.getInitiatorPattern(this.initiatorPatternIndex++);if(!a)throw new al(`InvalidState`);let{cipher:o}=this.config,s=kl();for(let e of a)if(e===0){let e=Uint8Array.from(i(s));this.symmetric.mixHash(e),this.pattern.hasPsk()&&this.symmetric.mixKey(e),this.re=e}else if(e===1){let e=this.symmetric.hasKey()?s+o.tagLen:s,t=new Uint8Array(s);this.symmetric.decryptAndHash(i(e),t),this.rs=t}else if(e===8)this.symmetric.mixKeyAndHash(this.takePsk());else if(e===2||e===3||e===4||e===5)this.symmetric.mixKey(this.mapDh(e));else throw Error(`Incompatible pattern`);return this.symmetric.decryptAndHash(r,t.subarray(0,n)),this.updateHsStatus(),n}};function jl(){throw new al(`MissingMaterial`)}function Ml(){throw new al(`InvalidState`)}var Nl=class{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(e,t){if(Ha(e),Va(t,void 0,`key`),this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`expected Hash instance`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,r=new Uint8Array(n);r.set(t.length>n?e.create().update(t).digest():t);for(let e=0;e<r.length;e++)r[e]^=54;this.iHash.update(r),this.oHash=e.create();for(let e=0;e<r.length;e++)r[e]^=106;this.oHash.update(r),qa(r)}update(e){return Ga(this),this.iHash.update(e),this}digestInto(e){Ga(this),Ka(e,this),this.finished=!0;let t=e.subarray(0,this.outputLen);this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o,canXOF:s}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.canXOF=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Pl=(()=>{let e=((e,t,n)=>new Nl(e,t).update(n).digest());return e.create=(e,t)=>new Nl(e,t),e})();function Fl(e,t,n,r){let i=e=>t.create().update(e).digest(),a=(e,n)=>Pl(t,e,n),o=(e,t)=>a(e,t.length===1?t[0]:to(...t));return{name:e,hashLen:n,blockLen:r,hash:i,hmac:a,hmacMany:o,hkdf(e,t){let n=a(e,t),r=a(n,new Uint8Array([1]));return[r,o(n,[r,new Uint8Array([2])])]},hkdf3(e,t){let n=a(e,t),r=a(n,new Uint8Array([1])),i=o(n,[r,new Uint8Array([2])]);return[r,i,o(n,[i,new Uint8Array([3])])]},newOutput(){return new Uint8Array(n)}}}var Il=Fl(`SHA256`,Co,32,64);function Ll(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}var Rl=e=>e?`"${e}" `:``;function zl(e,t=``){if(typeof e!=`boolean`)throw TypeError(Rl(t)+`expected boolean, got type=`+typeof e);return e}function Bl(e,t=``){if(typeof e!=`number`)throw TypeError(Rl(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(Rl(t)+`expected integer >= 0, got `+e);return e}function Vl(e,t,n=``){if(Ll(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Bl(t,`length`);let r=Ll(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=Rl(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}var Hl=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(t===`object`?`expected valid options object`:`"${t}" expected object, got type=${typeof e}`)};function Ul(e,t=!0){if(e.destroyed)throw Error(`hash was destroyed`);if(t&&e.finished)throw Error(`digest() was already called`)}function Wl(e,t){Vl(e,void 0,`output`);let n=t.outputLen;if(!(e.length>=n))throw RangeError(`"output" expected length >= `+n)}function Gl(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Kl(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ql(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}var Jl=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Yl(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Xl(e){for(let t=0;t<e.length;t++)e[t]=Yl(e[t]);return e}var Zl=Jl?e=>e:Xl;function Ql(e,t){return!e.byteLength||!t.byteLength?!1:e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function $l(e,t){if(Ql(e,t)&&e.byteOffset<t.byteOffset)throw Error(`complex overlap of input and output is not supported`)}function eu(e,t){return Hl(e,`defaults`),Hl(t,`opts`),Object.assign(e,t)}function tu(e,t){if(e=Vl(e),t=Vl(t),e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function nu(e,t,n){let r=t,i=n||(()=>[]),a=(e,t)=>r(t,...i(e)).update(e).digest(),o=r(new Uint8Array(e),...i(new Uint8Array));return a.outputLen=o.outputLen,a.blockLen=o.blockLen,a.create=(e,...t)=>r(e,...t),a}var ru=(e,t)=>{function n(n,...r){if(Vl(n,void 0,`key`),e.nonceLength!==void 0){let t=r[0];Vl(t,e.varSizeNonce?void 0:e.nonceLength,`nonce`)}let i=e.tagLength,a=e.nonceLength===void 0?0:1;if(!e.withAAD){for(let e=a;e<r.length;e++)if(Ll(r[e]))throw Error(`AAD not supported`)}e.withAAD&&r[a]!==void 0&&Vl(r[a],void 0,`AAD`);let o=t(n,...r),s=(e,t)=>{if(t!==void 0){if(e!==2)throw Error(`cipher output not supported`);Vl(t,void 0,`output`)}},c=!1;return{encrypt(e,t){if(c)throw Error(`cannot encrypt() twice with same key + nonce`);return c=!0,Vl(e,void 0,`data`),s(o.encrypt.length,t),o.encrypt(e,t)},decrypt(e,t){if(Vl(e,void 0,`data`),i&&e.length<i)throw Error(`"ciphertext" expected length >= tagLength=`+i);return s(o.decrypt.length,t),o.decrypt(e,t)}}}return Object.assign(n,e),n};function iu(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(Vl(t,e,`output`),n&&!ou(t))throw Error(`invalid output, must be aligned`);return t}function au(e,t,n){Bl(e),Bl(t),zl(n);let r=new Uint8Array(16),i=ql(r);return i.setBigUint64(0,BigInt(t),n),i.setBigUint64(8,BigInt(e),n),r}function ou(e){return e.byteOffset%4==0}function su(e){return Uint8Array.from(Vl(e))}var cu=e=>Uint8Array.from(e.split(``),e=>e.charCodeAt(0)),lu=Zl(Gl(cu(`expand 16-byte k`))),uu=Zl(Gl(cu(`expand 32-byte k`)));function du(e,t){return e<<t|e>>>32-t}var fu=64,pu=16,mu=2**32-1,hu=Uint32Array.of();function gu(e,t,n,r,i,a,o,s){let c=i.length,l=new Uint8Array(fu),u=Gl(l),d=Jl&&ou(i)&&ou(a),f=d?Gl(i):hu,p=d?Gl(a):hu;if(!Jl){for(let d=0;d<c;o++){if(e(t,n,r,u,o,s),Zl(u),o>=mu)throw Error(`arx: counter overflow`);let f=Math.min(fu,c-d);for(let e=0,t;e<f;e++)t=d+e,a[t]=i[t]^l[e];d+=f}return}for(let m=0;m<c;o++){if(e(t,n,r,u,o,s),o>=mu)throw Error(`arx: counter overflow`);let h=Math.min(fu,c-m);if(d&&h===fu){let e=m/4;if(m%4!=0)throw Error(`arx: invalid block position`);for(let t=0,n;t<pu;t++)n=e+t,p[n]=f[n]^u[t];m+=fu;continue}for(let e=0,t;e<h;e++)t=m+e,a[t]=i[t]^l[e];m+=h}}function _u(e,t){let{allowShortKeys:n,extendNonceFn:r,counterLength:i,counterRight:a,rounds:o}=eu({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!=`function`)throw Error(`core must be a function`);return Bl(i),Bl(o),zl(a),zl(n),(t,s,c,l,u=0)=>{Vl(t,void 0,`key`),Vl(s,void 0,`nonce`),Vl(c,void 0,`data`);let d=c.length,f=l!==void 0;if(l=iu(d,l,!1),f&&$l(c,l),Bl(u),u<0||u>=mu)throw Error(`arx: counter overflow`);let p=[],m=t.length,h,g;if(m===32)p.push(h=su(t)),g=uu;else if(m===16&&n)h=new Uint8Array(32),h.set(t),h.set(t,16),g=lu,p.push(h);else throw Vl(t,32,`arx key`),Error(`invalid key size`);(!Jl||!ou(s))&&p.push(s=su(s));let _=Gl(h);if(r){if(s.length!==24)throw Error(`arx: extended nonce must be 24 bytes`);let e=s.subarray(0,16);if(Jl)r(g,_,Gl(e),_);else{let t=Zl(Uint32Array.from(g));r(t,_,Gl(e),_),Kl(t),Zl(_)}s=s.subarray(16)}else Jl||Zl(_);let v=16-i;if(v!==s.length)throw Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){let e=new Uint8Array(12);e.set(s,a?0:12-s.length),s=e,p.push(s)}let y=Zl(Gl(s));try{return gu(e,g,_,y,c,l,u,o),l}finally{Kl(...p)}}}function vu(e,t){return e[t++]&255|(e[t++]&255)<<8}var yu=class{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;destroyed=!1;constructor(e){e=su(Vl(e,32,`key`));let t=vu(e,0),n=vu(e,2),r=vu(e,4),i=vu(e,6),a=vu(e,8),o=vu(e,10),s=vu(e,12),c=vu(e,14);this.r[0]=t&8191,this.r[1]=(t>>>13|n<<3)&8191,this.r[2]=(n>>>10|r<<6)&7939,this.r[3]=(r>>>7|i<<9)&8191,this.r[4]=(i>>>4|a<<12)&255,this.r[5]=a>>>1&8190,this.r[6]=(a>>>14|o<<2)&8191,this.r[7]=(o>>>11|s<<5)&8065,this.r[8]=(s>>>8|c<<8)&8191,this.r[9]=c>>>5&127;for(let t=0;t<8;t++)this.pad[t]=vu(e,16+2*t)}process(e,t,n=!1){let r=n?0:2048,{h:i,r:a}=this,o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],d=a[5],f=a[6],p=a[7],m=a[8],h=a[9],g=vu(e,t+0),_=vu(e,t+2),v=vu(e,t+4),y=vu(e,t+6),ee=vu(e,t+8),te=vu(e,t+10),b=vu(e,t+12),x=vu(e,t+14),S=i[0]+(g&8191),C=i[1]+((g>>>13|_<<3)&8191),w=i[2]+((_>>>10|v<<6)&8191),T=i[3]+((v>>>7|y<<9)&8191),E=i[4]+((y>>>4|ee<<12)&8191),ne=i[5]+(ee>>>1&8191),D=i[6]+((ee>>>14|te<<2)&8191),re=i[7]+((te>>>11|b<<5)&8191),ie=i[8]+((b>>>8|x<<8)&8191),ae=i[9]+(x>>>5|r),O=0,oe=O+S*o+5*h*C+5*m*w+5*p*T+5*f*E;O=oe>>>13,oe&=8191,oe+=5*d*ne+5*u*D+5*l*re+5*c*ie+5*s*ae,O+=oe>>>13,oe&=8191;let k=O+S*s+C*o+5*h*w+5*m*T+5*p*E;O=k>>>13,k&=8191,k+=5*f*ne+5*d*D+5*u*re+5*l*ie+5*c*ae,O+=k>>>13,k&=8191;let se=O+S*c+C*s+w*o+5*h*T+5*m*E;O=se>>>13,se&=8191,se+=5*p*ne+5*f*D+5*d*re+5*u*ie+5*l*ae,O+=se>>>13,se&=8191;let ce=O+S*l+C*c+w*s+T*o+5*h*E;O=ce>>>13,ce&=8191,ce+=5*m*ne+5*p*D+5*f*re+5*d*ie+5*u*ae,O+=ce>>>13,ce&=8191;let le=O+S*u+C*l+w*c+T*s+E*o;O=le>>>13,le&=8191,le+=5*h*ne+5*m*D+5*p*re+5*f*ie+5*d*ae,O+=le>>>13,le&=8191;let ue=O+S*d+C*u+w*l+T*c+E*s;O=ue>>>13,ue&=8191,ue+=ne*o+5*h*D+5*m*re+5*p*ie+5*f*ae,O+=ue>>>13,ue&=8191;let de=O+S*f+C*d+w*u+T*l+E*c;O=de>>>13,de&=8191,de+=ne*s+D*o+5*h*re+5*m*ie+5*p*ae,O+=de>>>13,de&=8191;let fe=O+S*p+C*f+w*d+T*u+E*l;O=fe>>>13,fe&=8191,fe+=ne*c+D*s+re*o+5*h*ie+5*m*ae,O+=fe>>>13,fe&=8191;let pe=O+S*m+C*p+w*f+T*d+E*u;O=pe>>>13,pe&=8191,pe+=ne*l+D*c+re*s+ie*o+5*h*ae,O+=pe>>>13,pe&=8191;let me=O+S*h+C*m+w*p+T*f+E*d;O=me>>>13,me&=8191,me+=ne*u+D*l+re*c+ie*s+ae*o,O+=me>>>13,me&=8191,O=(O<<2)+O|0,O=O+oe|0,oe=O&8191,O>>>=13,k+=O,i[0]=oe,i[1]=k,i[2]=se,i[3]=ce,i[4]=le,i[5]=ue,i[6]=de,i[7]=fe,i[8]=pe,i[9]=me}finalize(){let{h:e,pad:t}=this,n=new Uint16Array(10),r=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=r,r=e[t]>>>13,e[t]&=8191;e[0]+=r*5,r=e[0]>>>13,e[0]&=8191,e[1]+=r,r=e[1]>>>13,e[1]&=8191,e[2]+=r,n[0]=e[0]+5,r=n[0]>>>13,n[0]&=8191;for(let t=1;t<10;t++)n[t]=e[t]+r,r=n[t]>>>13,n[t]&=8191;n[9]-=8192;let i=(r^1)-1;for(let e=0;e<10;e++)n[e]&=i;i=~i;for(let t=0;t<10;t++)e[t]=e[t]&i|n[t];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let a=e[0]+t[0];e[0]=a&65535;for(let n=1;n<8;n++)a=(e[n]+t[n]|0)+(a>>>16)|0,e[n]=a&65535;Kl(n)}update(e){Ul(this),Vl(e),e=su(e);let{buffer:t,blockLen:n}=this,r=e.length;for(let i=0;i<r;){let a=Math.min(n-this.pos,r-i);if(a===n){for(;n<=r-i;i+=n)this.process(e,i);continue}t.set(e.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===n&&(this.process(t,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,Kl(this.h,this.r,this.buffer,this.pad)}digestInto(e){Ul(this),Wl(e,this),this.finished=!0;let{buffer:t,h:n}=this,{pos:r}=this;if(r){for(t[r++]=1;r<16;r++)t[r]=0;this.process(t,0,!0)}this.finalize();let i=0;for(let t=0;t<8;t++)e[i++]=n[t]>>>0,e[i++]=n[t]>>>8}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}},bu=nu(32,e=>new yu(e));function xu(e,t,n,r,i,a=20){let o=e[0],s=e[1],c=e[2],l=e[3],u=t[0],d=t[1],f=t[2],p=t[3],m=t[4],h=t[5],g=t[6],_=t[7],v=i,y=n[0],ee=n[1],te=n[2],b=o,x=s,S=c,C=l,w=u,T=d,E=f,ne=p,D=m,re=h,ie=g,ae=_,O=v,oe=y,k=ee,se=te;for(let e=0;e<a;e+=2)b=b+w|0,O=du(O^b,16),D=D+O|0,w=du(w^D,12),b=b+w|0,O=du(O^b,8),D=D+O|0,w=du(w^D,7),x=x+T|0,oe=du(oe^x,16),re=re+oe|0,T=du(T^re,12),x=x+T|0,oe=du(oe^x,8),re=re+oe|0,T=du(T^re,7),S=S+E|0,k=du(k^S,16),ie=ie+k|0,E=du(E^ie,12),S=S+E|0,k=du(k^S,8),ie=ie+k|0,E=du(E^ie,7),C=C+ne|0,se=du(se^C,16),ae=ae+se|0,ne=du(ne^ae,12),C=C+ne|0,se=du(se^C,8),ae=ae+se|0,ne=du(ne^ae,7),b=b+T|0,se=du(se^b,16),ie=ie+se|0,T=du(T^ie,12),b=b+T|0,se=du(se^b,8),ie=ie+se|0,T=du(T^ie,7),x=x+E|0,O=du(O^x,16),ae=ae+O|0,E=du(E^ae,12),x=x+E|0,O=du(O^x,8),ae=ae+O|0,E=du(E^ae,7),S=S+ne|0,oe=du(oe^S,16),D=D+oe|0,ne=du(ne^D,12),S=S+ne|0,oe=du(oe^S,8),D=D+oe|0,ne=du(ne^D,7),C=C+w|0,k=du(k^C,16),re=re+k|0,w=du(w^re,12),C=C+w|0,k=du(k^C,8),re=re+k|0,w=du(w^re,7);let ce=0;r[ce++]=o+b|0,r[ce++]=s+x|0,r[ce++]=c+S|0,r[ce++]=l+C|0,r[ce++]=u+w|0,r[ce++]=d+T|0,r[ce++]=f+E|0,r[ce++]=p+ne|0,r[ce++]=m+D|0,r[ce++]=h+re|0,r[ce++]=g+ie|0,r[ce++]=_+ae|0,r[ce++]=v+O|0,r[ce++]=y+oe|0,r[ce++]=ee+k|0,r[ce++]=te+se|0}var Su=_u(xu,{counterRight:!1,counterLength:4,allowShortKeys:!1}),Cu=new Uint8Array(16),wu=(e,t)=>{e.update(t);let n=t.length%16;n&&e.update(Cu.subarray(n))},Tu=new Uint8Array(32);function Eu(e,t,n,r,i){i!==void 0&&Vl(i,void 0,`AAD`);let a=e(t,n,Tu),o=au(r.length,i?i.length:0,!0),s=bu.create(a);i&&wu(s,i),wu(s,r),s.update(o);let c=s.digest();return Kl(a,o),c}var Du=ru({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},(e=>(t,n,r)=>({encrypt(i,a){let o=i.length;a=iu(o+16,a,!1),a.set(i);let s=a.subarray(0,-16);e(t,n,s,s,1);let c=Eu(e,t,n,s,r);return a.set(c,o),Kl(c),a},decrypt(i,a){a=iu(i.length-16,a,!1);let o=i.subarray(0,-16),s=i.subarray(-16),c=Eu(e,t,n,o,r);if(!tu(s,c))throw Kl(c),Error(`invalid tag`);return a.set(i.subarray(0,-16)),e(t,n,a,a,1),Kl(c),a}}))(Su)),Ou=1152921504606846975n;function ku(e){let t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,e,!0),t}function Au(e,t){return e instanceof il?e:new il(t,e instanceof Error?e.message:String(e))}var ju={name:`ChaChaPoly`,keyLen:32,tagLen:16,encrypt(e,t,n,r,i){let a=Du(e,ku(t),n).encrypt(r);i.set(a)},encryptInPlace(e,t,n,r,i){let a=r.subarray(0,i+16),o=r.subarray(0,i);try{let r=Du(e,ku(t),n).encrypt(o);return a.set(r),r.length}catch(e){throw Au(e,`Encrypt`)}},decrypt(e,t,n,r,i){try{let a=Du(e,ku(t),n).decrypt(r);i.set(a)}catch(e){throw Au(e,`Decrypt`)}},decryptInPlace(e,t,n,r,i){let a=r.subarray(0,i);try{let i=Du(e,ku(t),n).decrypt(a);return r.set(i),i.length}catch(e){throw Au(e,`Decrypt`)}},rekey(e){let t=new Uint8Array(Zc+Qc),n=new Uint8Array(32),r=Du(e,ku(Ou),new Uint8Array).encrypt(n);return t.set(r),t.subarray(0,32)}};function Mu(){return new ml(`IK`,[],[1],[[0,3,1,5]],[[0,2,4]])}var M={};ha(M,{$brand:()=>yf,$input:()=>yb,$output:()=>vb,INVALID:()=>Cb,NEVER:()=>hf,TimePrecision:()=>SS,ZodAny:()=>OD,ZodArray:()=>RD,ZodBase64:()=>UE,ZodBase64URL:()=>GE,ZodBigInt:()=>_D,ZodBigIntFormat:()=>yD,ZodBoolean:()=>hD,ZodCIDRv4:()=>zE,ZodCIDRv6:()=>VE,ZodCUID:()=>CE,ZodCUID2:()=>TE,ZodCatch:()=>NO,ZodCodec:()=>zO,ZodCompileAsyncError:()=>Tb,ZodCompileUnsupportedError:()=>Eb,ZodCreditCard:()=>YE,ZodCustom:()=>$O,ZodCustomStringFormat:()=>tD,ZodDate:()=>ID,ZodDefault:()=>TO,ZodDiscriminatedUnion:()=>YD,ZodE164:()=>qE,ZodEmail:()=>sE,ZodEmoji:()=>yE,ZodEnum:()=>lO,ZodError:()=>IT,ZodExactOptional:()=>bO,ZodFile:()=>mO,ZodFirstPartyTypeKind:()=>mk,ZodFunction:()=>ZO,ZodGUID:()=>lE,ZodIBAN:()=>ZE,ZodIPv4:()=>NE,ZodIPv6:()=>LE,ZodISODate:()=>iE,ZodISODateTime:()=>rE,ZodISODuration:()=>oE,ZodISOTime:()=>aE,ZodInstanceOf:()=>ok,ZodIntersection:()=>ZD,ZodIssueCode:()=>dk,ZodJWT:()=>$E,ZodKSUID:()=>jE,ZodLazy:()=>qO,ZodLiteral:()=>fO,ZodMAC:()=>FE,ZodMap:()=>aO,ZodNaN:()=>FO,ZodNanoID:()=>xE,ZodNever:()=>MD,ZodNonOptional:()=>kO,ZodNull:()=>ED,ZodNullable:()=>SO,ZodNumber:()=>sD,ZodNumberFormat:()=>lD,ZodObject:()=>VD,ZodOptional:()=>vO,ZodPipe:()=>LO,ZodPrefault:()=>DO,ZodPreprocess:()=>HO,ZodPromise:()=>YO,ZodReadonly:()=>UO,ZodRealError:()=>LT,ZodRecord:()=>tO,ZodSet:()=>sO,ZodString:()=>eE,ZodStringFormat:()=>nE,ZodSuccess:()=>jO,ZodSymbol:()=>SD,ZodTemplateLiteral:()=>GO,ZodTransform:()=>gO,ZodTuple:()=>$D,ZodType:()=>QT,ZodULID:()=>DE,ZodURL:()=>gE,ZodUUID:()=>dE,ZodUndefined:()=>wD,ZodUnion:()=>GD,ZodUnknown:()=>AD,ZodVoid:()=>PD,ZodXID:()=>kE,ZodXor:()=>qD,_ZodString:()=>$T,_default:()=>EO,_function:()=>QO,any:()=>kD,array:()=>zD,base64:()=>WE,base64url:()=>KE,bigint:()=>vD,boolean:()=>gD,catch:()=>PO,check:()=>ek,cidrv4:()=>BE,cidrv6:()=>HE,clone:()=>bd,codec:()=>BO,coerce:()=>Gk,compile:()=>Ob,config:()=>Cf,core:()=>Nu,creditCard:()=>XE,cuid:()=>wE,cuid2:()=>EE,currencyCode:()=>aD,custom:()=>tk,date:()=>LD,decode:()=>UT,decodeAsync:()=>GT,deepPartial:()=>zk,describe:()=>ik,discriminatedUnion:()=>XD,e164:()=>JE,email:()=>cE,emoji:()=>bE,encode:()=>HT,encodeAsync:()=>WT,endsWith:()=>gC,enum:()=>uO,exactOptional:()=>xO,file:()=>hO,flattenError:()=>Nf,float32:()=>dD,float64:()=>fD,formatError:()=>Pf,fromJSONSchema:()=>Ik,function:()=>QO,getDiscriminatedOption:()=>Ig,getErrorMap:()=>pk,globalRegistry:()=>Sb,gt:()=>QS,gte:()=>$S,guid:()=>uE,hash:()=>oD,hex:()=>iD,hostname:()=>rD,httpUrl:()=>vE,iban:()=>QE,includes:()=>mC,input:()=>Uk,instanceof:()=>sk,int:()=>uD,int32:()=>pD,int64:()=>bD,intersection:()=>QD,invertCodec:()=>VO,ipv4:()=>PE,ipv6:()=>RE,iso:()=>hk,json:()=>lk,jwt:()=>eD,keyof:()=>BD,ksuid:()=>ME,lazy:()=>JO,length:()=>uC,literal:()=>pO,locales:()=>J_,looseObject:()=>WD,looseRecord:()=>iO,lowercase:()=>fC,lt:()=>XS,lte:()=>ZS,mac:()=>IE,map:()=>oO,maxLength:()=>cC,maxSize:()=>aC,memoizer:()=>K_,meta:()=>ak,mime:()=>yC,minLength:()=>lC,minSize:()=>oC,multipleOf:()=>iC,nan:()=>IO,nanoid:()=>SE,nativeEnum:()=>dO,negative:()=>tC,never:()=>ND,nonnegative:()=>rC,nonoptional:()=>AO,nonpositive:()=>nC,normalize:()=>xC,null:()=>DD,nullable:()=>CO,nullish:()=>wO,number:()=>cD,object:()=>HD,optional:()=>yO,output:()=>Wk,overwrite:()=>bC,parse:()=>RT,parseAsync:()=>zT,partialRecord:()=>rO,pipe:()=>RO,positive:()=>eC,prefault:()=>OO,preprocess:()=>uk,prettifyError:()=>Lf,promise:()=>XO,properties:()=>vC,property:()=>_C,readonly:()=>WO,record:()=>nO,refine:()=>nk,regex:()=>dC,regexes:()=>hp,registry:()=>xb,safeDecode:()=>qT,safeDecodeAsync:()=>YT,safeEncode:()=>KT,safeEncodeAsync:()=>JT,safeParse:()=>BT,safeParseAsync:()=>VT,set:()=>cO,setErrorMap:()=>fk,size:()=>sC,slugify:()=>TC,startsWith:()=>hC,strictObject:()=>UD,string:()=>tE,stringFormat:()=>nD,stringbool:()=>ck,success:()=>MO,superRefine:()=>rk,symbol:()=>CD,templateLiteral:()=>KO,toJSONSchema:()=>OT,toLowerCase:()=>CC,toUpperCase:()=>wC,toZod:()=>Iu,transform:()=>_O,treeifyError:()=>Ff,trim:()=>SC,tuple:()=>eO,uint32:()=>mD,uint64:()=>xD,ulid:()=>OE,undefined:()=>TD,union:()=>KD,unknown:()=>jD,uppercase:()=>pC,url:()=>_E,util:()=>N,uuid:()=>fE,uuidv4:()=>pE,uuidv6:()=>mE,uuidv7:()=>hE,validate:()=>Xf,validateAsync:()=>Qf,void:()=>FD,withParser:()=>kb,xid:()=>AE,xor:()=>JD});var Nu={};ha(Nu,{$ZodAny:()=>hg,$ZodArray:()=>Tg,$ZodAsyncError:()=>bf,$ZodBase64:()=>Kh,$ZodBase64URL:()=>Yh,$ZodBigInt:()=>ug,$ZodBigIntFormat:()=>dg,$ZodBoolean:()=>lg,$ZodCIDRv4:()=>Vh,$ZodCIDRv6:()=>Uh,$ZodCUID:()=>Dh,$ZodCUID2:()=>Oh,$ZodCatch:()=>f_,$ZodCheck:()=>Mm,$ZodCheckBigIntFormat:()=>Bm,$ZodCheckEndsWith:()=>$m,$ZodCheckGreaterThan:()=>Lm,$ZodCheckIncludes:()=>Zm,$ZodCheckLengthEquals:()=>Km,$ZodCheckLessThan:()=>Im,$ZodCheckLowerCase:()=>Ym,$ZodCheckMaxLength:()=>Wm,$ZodCheckMaxSize:()=>Vm,$ZodCheckMimeType:()=>rh,$ZodCheckMinLength:()=>Gm,$ZodCheckMinSize:()=>Hm,$ZodCheckMultipleOf:()=>Rm,$ZodCheckNumberFormat:()=>zm,$ZodCheckOverwrite:()=>ih,$ZodCheckProperties:()=>nh,$ZodCheckProperty:()=>th,$ZodCheckRegex:()=>Jm,$ZodCheckSizeEquals:()=>Um,$ZodCheckStartsWith:()=>Qm,$ZodCheckStringFormat:()=>qm,$ZodCheckUpperCase:()=>Xm,$ZodCodec:()=>g_,$ZodCreditCard:()=>eg,$ZodCustom:()=>O_,$ZodCustomStringFormat:()=>og,$ZodCyclicError:()=>A_,$ZodDate:()=>yg,$ZodDefault:()=>a_,$ZodDiscriminatedUnion:()=>Rg,$ZodE164:()=>Xh,$ZodEmail:()=>mh,$ZodEmoji:()=>Th,$ZodEncodeError:()=>xf,$ZodEnum:()=>Zg,$ZodError:()=>Af,$ZodExactOptional:()=>r_,$ZodFile:()=>$g,$ZodFunction:()=>T_,$ZodGUID:()=>fh,$ZodIBAN:()=>rg,$ZodIPv4:()=>Ih,$ZodIPv6:()=>zh,$ZodISODate:()=>Nh,$ZodISODateTime:()=>Mh,$ZodISODuration:()=>Fh,$ZodISOTime:()=>Ph,$ZodIntersection:()=>zg,$ZodJWT:()=>ag,$ZodKSUID:()=>jh,$ZodLazy:()=>D_,$ZodLiteral:()=>Qg,$ZodMAC:()=>Bh,$ZodMap:()=>qg,$ZodNaN:()=>p_,$ZodNanoID:()=>Eh,$ZodNever:()=>_g,$ZodNonOptional:()=>c_,$ZodNull:()=>mg,$ZodNullable:()=>i_,$ZodNumber:()=>sg,$ZodNumberFormat:()=>cg,$ZodObject:()=>Ag,$ZodObjectJIT:()=>jg,$ZodOptional:()=>n_,$ZodPipe:()=>m_,$ZodPrefault:()=>s_,$ZodPreprocess:()=>y_,$ZodPromise:()=>E_,$ZodReadonly:()=>b_,$ZodRealError:()=>jf,$ZodRecord:()=>Kg,$ZodRegistry:()=>bb,$ZodSet:()=>Yg,$ZodString:()=>uh,$ZodStringFormat:()=>dh,$ZodSuccess:()=>u_,$ZodSymbol:()=>fg,$ZodTemplateLiteral:()=>w_,$ZodTransform:()=>e_,$ZodTuple:()=>Hg,$ZodType:()=>z,$ZodULID:()=>kh,$ZodURL:()=>wh,$ZodUUID:()=>ph,$ZodUndefined:()=>pg,$ZodUnion:()=>Ng,$ZodUnknown:()=>gg,$ZodVoid:()=>vg,$ZodXID:()=>Ah,$ZodXor:()=>Fg,$brand:()=>yf,$constructor:()=>R,$input:()=>yb,$output:()=>vb,Doc:()=>ah,INVALID:()=>Cb,JSONSchema:()=>AT,JSONSchemaGenerator:()=>kT,NEVER:()=>hf,TimePrecision:()=>SS,URL_BAD_FORMAT:()=>hh,URL_UNPARSEABLE:()=>gh,ZodCompileAsyncError:()=>Tb,ZodCompileUnsupportedError:()=>Eb,_any:()=>US,_array:()=>EC,_base64:()=>gS,_base64url:()=>_S,_bigint:()=>IS,_boolean:()=>PS,_catch:()=>GC,_check:()=>ew,_cidrv4:()=>mS,_cidrv6:()=>hS,_coercedBigint:()=>LS,_coercedBoolean:()=>FS,_coercedDate:()=>JS,_coercedNumber:()=>OS,_coercedString:()=>Xx,_creditCard:()=>yS,_cuid:()=>oS,_cuid2:()=>sS,_custom:()=>ZC,_date:()=>qS,_decode:()=>tp,_decodeAsync:()=>ap,_default:()=>HC,_discriminatedUnion:()=>kC,_e164:()=>vS,_email:()=>Zx,_emoji:()=>iS,_encode:()=>$f,_encodeAsync:()=>rp,_endsWith:()=>gC,_enum:()=>FC,_file:()=>RC,_float32:()=>AS,_float64:()=>jS,_gt:()=>QS,_gte:()=>$S,_guid:()=>Qx,_iban:()=>bS,_includes:()=>mC,_int:()=>kS,_int32:()=>MS,_int64:()=>RS,_intersection:()=>AC,_ipv4:()=>dS,_ipv6:()=>fS,_isoDate:()=>wS,_isoDateTime:()=>CS,_isoDuration:()=>ES,_isoTime:()=>TS,_jwt:()=>xS,_ksuid:()=>uS,_lazy:()=>YC,_length:()=>uC,_literal:()=>LC,_lowercase:()=>fC,_lt:()=>XS,_lte:()=>ZS,_mac:()=>pS,_map:()=>NC,_max:()=>ZS,_maxLength:()=>cC,_maxSize:()=>aC,_mime:()=>yC,_min:()=>$S,_minLength:()=>lC,_minSize:()=>oC,_multipleOf:()=>iC,_nan:()=>YS,_nanoid:()=>aS,_nativeEnum:()=>IC,_negative:()=>tC,_never:()=>GS,_nonnegative:()=>rC,_nonoptional:()=>UC,_nonpositive:()=>nC,_normalize:()=>xC,_null:()=>HS,_nullable:()=>VC,_number:()=>DS,_optional:()=>BC,_overwrite:()=>bC,_parse:()=>zf,_parseAsync:()=>Vf,_pipe:()=>KC,_positive:()=>eC,_promise:()=>XC,_properties:()=>vC,_property:()=>_C,_readonly:()=>qC,_record:()=>MC,_refine:()=>QC,_regex:()=>dC,_safeDecode:()=>lp,_safeDecodeAsync:()=>pp,_safeEncode:()=>sp,_safeEncodeAsync:()=>dp,_safeParse:()=>Uf,_safeParseAsync:()=>Kf,_set:()=>PC,_size:()=>sC,_slugify:()=>TC,_startsWith:()=>hC,_string:()=>Yx,_stringFormat:()=>iw,_stringbool:()=>rw,_success:()=>WC,_superRefine:()=>$C,_symbol:()=>BS,_templateLiteral:()=>JC,_toLowerCase:()=>CC,_toUpperCase:()=>wC,_transform:()=>zC,_trim:()=>SC,_tuple:()=>jC,_uint32:()=>NS,_uint64:()=>zS,_ulid:()=>cS,_undefined:()=>VS,_union:()=>DC,_unknown:()=>WS,_uppercase:()=>pC,_url:()=>rS,_uuid:()=>$x,_uuidv4:()=>eS,_uuidv6:()=>tS,_uuidv7:()=>nS,_void:()=>KS,_xid:()=>lS,_xor:()=>OC,base64Charset:()=>Gh,base64urlCharset:()=>qh,canParseURL:()=>_h,clone:()=>bd,compile:()=>Ob,compileFn:()=>jb,config:()=>Cf,createStandardJSONSchemaMethod:()=>bw,createToJSONSchemaMethod:()=>yw,decode:()=>np,decodeAsync:()=>op,describe:()=>tw,encode:()=>ep,encodeAsync:()=>ip,extractDefs:()=>uw,finalize:()=>_w,flattenError:()=>Nf,formatError:()=>Pf,getDiscriminatedOption:()=>Ig,globalConfig:()=>Sf,globalRegistry:()=>Sb,handleUnrepresentable:()=>sw,initializeContext:()=>ow,isBackEdge:()=>q_,isRecursiveSchema:()=>V_,isValidBase64:()=>Wh,isValidBase64URL:()=>Jh,isValidCIDRv6:()=>Hh,isValidCreditCard:()=>$h,isValidIBAN:()=>ng,isValidIPv6:()=>Rh,isValidJWT:()=>ig,locales:()=>J_,memoizer:()=>K_,mergeValues:()=>Bg,meta:()=>nw,parse:()=>Bf,parseAsync:()=>Hf,parseURLObject:()=>yh,prettifyError:()=>Lf,process:()=>cw,processSchema:()=>cw,regexes:()=>hp,registry:()=>xb,safeDecode:()=>up,safeDecodeAsync:()=>mp,safeEncode:()=>cp,safeEncodeAsync:()=>fp,safeParse:()=>Wf,safeParseAsync:()=>qf,standardProps:()=>lh,stripTabAndNewline:()=>xh,toDotPath:()=>If,toJSONSchema:()=>OT,toZod:()=>Iu,treeifyError:()=>Ff,urlHostnameOk:()=>Sh,urlProtocolOk:()=>Ch,util:()=>N,validate:()=>Xf,validateAsync:()=>Qf,validateURL:()=>vh,version:()=>oh,withParser:()=>kb});var N={};ha(N,{BIGINT_FORMAT_RANGES:()=>wd,CONSTANT_CATCH:()=>ff,Class:()=>$d,NUMBER_FORMAT_RANGES:()=>Cd,aborted:()=>Pd,allowsEval:()=>fd,assert:()=>zu,assertEqual:()=>Pu,assertIs:()=>Lu,assertNever:()=>Ru,assertNotEqual:()=>Fu,assignProp:()=>Xu,attachSchema:()=>zd,base64ToUint8Array:()=>qd,base64urlToUint8Array:()=>Yd,cached:()=>Uu,captureStackTrace:()=>ud,cleanEnum:()=>Kd,cleanRegex:()=>Gu,clone:()=>bd,cloneDef:()=>id,codePointLength:()=>Ud,constantCatch:()=>pf,createTransparentProxy:()=>xd,defineLazy:()=>Ju,defineLazyInternal:()=>uf,derived:()=>rf,esc:()=>cd,escapeRegex:()=>yd,explicitlyAborted:()=>Fd,extend:()=>Od,finalizeIssue:()=>Bd,floatSafeRemainder:()=>Ku,getElementAtPath:()=>ad,getEnumValues:()=>Bu,getLengthableOrigin:()=>Wd,getParsedType:()=>gd,getSizableOrigin:()=>Vd,hexToUint8Array:()=>Zd,hide:()=>nf,installLazyProp:()=>df,isObject:()=>dd,isPlainObject:()=>pd,issue:()=>Gd,joinValues:()=>P,jsonStringifyReplacer:()=>Vu,members:()=>ef,merge:()=>jd,mergeDefs:()=>rd,normalizeParams:()=>F,nullish:()=>Wu,numKeys:()=>hd,objectClone:()=>Yu,omit:()=>Dd,optionalKeys:()=>Sd,own:()=>tf,parsedType:()=>L,partial:()=>Md,pick:()=>Td,prefixIssues:()=>Id,primitiveTypes:()=>vd,promiseAllObject:()=>od,propertyKeyTypes:()=>_d,randomString:()=>sd,rawShape:()=>Zu,required:()=>Nd,safeExtend:()=>Ad,shallowClone:()=>md,sizeCaps:()=>Rd,slugify:()=>ld,stringifyPrimitive:()=>I,toZod:()=>Iu,uint8ArrayToBase64:()=>Jd,uint8ArrayToBase64url:()=>Xd,uint8ArrayToHex:()=>Qd,unwrapMessage:()=>Ld});function Pu(e){return e}function Fu(e){return e}function Iu(){return e=>e}function Lu(e){}function Ru(e){throw Error(`Unexpected value in exhaustive check`)}function zu(e){}function Bu(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 P(e,t=`|`){return e.map(e=>I(e)).join(t)}function Vu(e,t){return typeof t==`bigint`?t.toString():t}var Hu=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Uu(e){return new Hu(e)}function Wu(e){return e==null}function Gu(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ku(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)<i?0:n-r}var qu=Symbol(`evaluating`);function Ju(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==qu)return r===void 0&&(r=qu,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Yu(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Xu(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zu(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function Qu(e){return Zu(e._zod.def)??e._zod.def.shape}function $u(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Xu(this,t,e),e},enumerable:!0,configurable:!0})}function ed(e,t,n){t in e?Xu(e,t,n):e[t]=n}function td(e,t,n,r){let i=Qu(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?$u(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ed(e,a,r?r(n.value,a):n.value))}}function nd(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?$u(e,n,()=>t[n]):ed(e,n,r.value))}}function rd(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function id(e){return rd(e._zod.def)}function ad(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function od(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function sd(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function cd(e){return JSON.stringify(e)}function ld(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ud=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function dd(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fd=Uu(()=>{if(Sf.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function pd(e){if(dd(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return dd(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function md(e){return pd(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function hd(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var gd=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},_d=new Set([`string`,`number`,`symbol`]),vd=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function yd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function bd(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function F(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 xd(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function I(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Sd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Cd={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},wd={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Td(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`);let i={};return td(i,e,Ed(e,t)),bd(e,rd(n,{shape:i,checks:[]}))}function Ed(e,t){let n=Qu(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Dd(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`);let i=new Set(Ed(e,t)),a={};return td(a,e,Reflect.ownKeys(Qu(e)).filter(e=>!i.has(e))),bd(e,rd(n,{shape:a,checks:[]}))}function Od(e,t){if(!pd(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=Qu(e);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 bd(e,rd(e._zod.def,{shape:kd(e,t)}))}function kd(e,t){let n={};return td(n,e,Reflect.ownKeys(Qu(e))),nd(n,t),n}function Ad(e,t){if(!pd(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return bd(e,rd(e._zod.def,{shape:kd(e,t)}))}function jd(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.`);let n={};return td(n,e,Reflect.ownKeys(Qu(e))),td(n,t,Reflect.ownKeys(Qu(t))),bd(e,rd(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Md(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`);let a=n?new Set(Ed(t,n)):void 0,o={};return td(o,t,Reflect.ownKeys(Qu(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),bd(t,rd(t._zod.def,{shape:o,checks:[]}))}function Nd(e,t,n){let r=n?new Set(Ed(t,n)):void 0,i={};return td(i,t,Reflect.ownKeys(Qu(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),bd(t,rd(t._zod.def,{shape:i}))}function Pd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Fd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Id(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ld(e){return typeof e==`string`?e:e?.message}function Rd(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function zd(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Bd(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Ld(e.inst?._zod.def?.error?.(e))??Ld(a?.(e))??Ld(t?.error?.(e))??Ld(n.customError?.(e))??Ld(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}function Vd(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}var Hd=/[\uD800-\uDBFF]/;function Ud(e){let t=e.length;if(!Hd.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Wd(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function L(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Gd(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Kd(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function qd(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Jd(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Yd(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return qd(t+`=`.repeat((4-t.length%4)%4))}function Xd(e){return Jd(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Zd(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function Qd(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var $d=class{constructor(...e){}};function ef(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):af(e,n,r.value)}}function tf(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function nf(e,t,n){return tf(e,t,n,!1)}function rf(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return tf(this,n,r(this))},set(e){tf(this,n,e)}})}return t}function af(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:tf(this,t,n.bind(this))},set(e){tf(this,t,e)}})}function of(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var sf,cf=!1,lf={configurable:!0,get(){cf=!0}};function uf(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&sf!==e._zod){sf=void 0;return}sf=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,lf);let e=cf;cf=!1;try{let r=n(this);return cf?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),cf||=e,r}catch(n){throw delete this[t],cf||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function df(e,t,n,r){let i=of(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var ff=`~constantCatch`;function pf(e){let t=()=>e;return t[ff]=!0,t}var mf,hf=Object.freeze({status:`aborted`}),gf={value:void 0,enumerable:!1},_f=`captureStackTrace`in Error?Error:null;function vf(e){let t=_f;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return _f=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function R(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){gf.value=new a(r);try{Object.defineProperty(n,"_zod",gf)}finally{gf.value=void 0}}else 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),ef(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?vf(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 yf=Symbol(`zod_brand`),bf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},xf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(mf=globalThis).__zod_globalConfig??(mf.__zod_globalConfig={});var Sf=globalThis.__zod_globalConfig;function Cf(e){return e&&Object.assign(Sf,e),Sf}function wf(){let e=this._zod;return e.message??=JSON.stringify(e.def,Vu,2),e.message}function Tf(e){this._zod.message=e}var Ef={get:wf,set:Tf,enumerable:!0,configurable:!0},Df={value:void 0,enumerable:!1},Of=new WeakSet([Object.prototype,Error.prototype]),kf=(e,t)=>{e.name=`$ZodError`,Df.value=t,Object.defineProperty(e,"issues",Df),Df.value=void 0,Object.defineProperty(e,"message",Ef);let n=Object.getPrototypeOf(e);Of.has(n)||(Of.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})}}))},Af=R(`$ZodError`,kf),jf=R(`$ZodError`,kf,void 0,{Parent:Error});function Mf(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 Nf(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Mf(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Pf(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<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ff(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;s<e.length;){let n=e[s],i=s===e.length-1;typeof n==`string`?(r.properties??(r.properties={}),Object.prototype.hasOwnProperty.call(r.properties,n)||Object.defineProperty(r.properties,n,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),r=r.properties[n]):(r.items??(r.items=[]),(a=r.items)[n]??(a[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(o)),s++}}};return r(e),n}function If(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Lf(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`\u2716 ${e.message}`),e.path?.length&&t.push(` \u2192 at ${If(e.path)}`);return t.join(`
4
4
  `)}function Rf(e,t){return{callee:t?.callee??e,Err:t?.Err}}var zf=e=>{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 bf;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Bd(e,o,Cf())));throw ud(n,a?.callee??t),n}return s.value};return t},Bf=zf(jf),Vf=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=>Bd(e,o,Cf())));throw ud(n,a?.callee??t),n}return s.value};return t},Hf=Vf(jf),Uf=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 bf;return a.issues.length?Gf(e,a.issues,i):{success:!0,data:a.value}},Wf=Uf(jf);function Gf(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Bd(e,n,Cf()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Kf=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?Gf(e,a.issues,i):{success:!0,data:a.value}},qf=Kf(jf),Jf=Symbol.for(`zod.compile.invalid`),Yf=Symbol.for(`zod.compile.fallback`),Xf=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Jf)return!0;if(r.definite===!0&&n===void 0)return!1}return Zf(e,t,n)});function Zf(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Yf]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new bf;return a.issues.length===0}var Qf=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},$f=e=>{let t=zf(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Rf(n,a))};return n},ep=$f(jf),tp=e=>{let t=zf(e),n=(e,r,i,a)=>t(e,r,i,Rf(n,a));return n},np=tp(jf),rp=e=>{let t=Vf(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Rf(n,a))};return n},ip=rp(jf),ap=e=>{let t=Vf(e),n=async(e,r,i,a)=>await t(e,r,i,Rf(n,a));return n},op=ap(jf),sp=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Uf(e)(t,n,i)},cp=sp(jf),lp=e=>(t,n,r)=>Uf(e)(t,n,r),up=lp(jf),dp=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Kf(e)(t,n,i)},fp=dp(jf),pp=e=>async(t,n,r)=>Kf(e)(t,n,r),mp=pp(jf),hp={};ha(hp,{anyString:()=>im,base64:()=>Up,base64url:()=>Wp,bigint:()=>om,boolean:()=>lm,browserEmail:()=>Fp,cidrv4:()=>Vp,cidrv6:()=>Hp,creditCard:()=>Yp,cuid:()=>gp,cuid2:()=>_p,currencyCode:()=>Xp,date:()=>em,datetime:()=>rm,domain:()=>Kp,duration:()=>Cp,e164:()=>Jp,email:()=>Ap,emoji:()=>Lp,extendedDuration:()=>wp,guid:()=>Tp,hex:()=>mm,hostname:()=>Gp,html5Email:()=>jp,httpProtocol:()=>qp,iban:()=>Zp,idnEmail:()=>Pp,integer:()=>sm,ipv4:()=>Rp,ipv6:()=>zp,ksuid:()=>bp,lowercase:()=>fm,mac:()=>Bp,md5_base64:()=>vm,md5_base64url:()=>ym,md5_hex:()=>_m,nanoid:()=>xp,nanoidOfLength:()=>Sp,null:()=>um,number:()=>cm,rfc5322Email:()=>Mp,sha1_base64:()=>xm,sha1_base64url:()=>Sm,sha1_hex:()=>bm,sha256_base64:()=>wm,sha256_base64url:()=>Tm,sha256_hex:()=>Cm,sha384_base64:()=>Dm,sha384_base64url:()=>Om,sha384_hex:()=>Em,sha512_base64:()=>Am,sha512_base64url:()=>jm,sha512_hex:()=>km,string:()=>am,time:()=>nm,ulid:()=>vp,undefined:()=>dm,unicodeEmail:()=>Np,uppercase:()=>pm,uuid:()=>Ep,uuid4:()=>Dp,uuid6:()=>Op,uuid7:()=>kp,xid:()=>yp});var gp=/^[cC][0-9a-z]{6,}$/,_p=/^[0-9a-z]+$/,vp=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,yp=/^[0-9a-vA-V]{20}$/,bp=/^[A-Za-z0-9]{27}$/,xp=/^[a-zA-Z0-9_-]{21}$/;function Sp(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Cp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,wp=/^[-+]?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)?)??$/,Tp=/^([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})$/,Ep=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)$/,Dp=Ep(4),Op=Ep(6),kp=Ep(7),Ap=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Mp=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Np=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Pp=Np,Fp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ip=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Lp(){return new RegExp(Ip,`u`)}var Rp=/^(?:(?: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])$/,zp=/^(([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}|:))$/,Bp=e=>{let t=yd(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Vp=/^((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])$/,Hp=/^(([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])$/,Up=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Wp=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Gp=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Kp=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,qp=/^https?$/,Jp=/^\+[1-9]\d{6,14}$/,Yp=/^\d(?:[ -]?\d){11,18}$/,Xp=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Zp=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,Qp=`(?:(?:\\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 $p(e){return RegExp(`^${e}$`)}var em=$p(Qp);function tm(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 nm(e){return RegExp(`^${tm(e)}$`)}function rm(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${tm({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${tm({precision:e.precision})}`:n;return RegExp(`^${Qp}T(?:${r})$`)}var im=/^[\s\S]{0,}$/,am=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},om=/^-?\d+n?$/,sm=/^-?\d+$/,cm=/^-?\d+(?:\.\d+)?$/,lm=/^(?:true|false)$/i,um=/^null$/i,dm=/^undefined$/i,fm=/^[^A-Z]*$/,pm=/^[^a-z]*$/,mm=/^[0-9a-fA-F]*$/;function hm(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function gm(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var _m=/^[0-9a-fA-F]{32}$/,vm=hm(22,`==`),ym=gm(22),bm=/^[0-9a-fA-F]{40}$/,xm=hm(27,`=`),Sm=gm(27),Cm=/^[0-9a-fA-F]{64}$/,wm=hm(43,`=`),Tm=gm(43),Em=/^[0-9a-fA-F]{96}$/,Dm=hm(64,``),Om=gm(64),km=/^[0-9a-fA-F]{128}$/,Am=hm(86,`==`),jm=gm(86),Mm=R(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Nm=e=>{let t=e.value;return!Wu(t)&&t.size!==void 0},Pm=e=>{let t=e.value;return!Wu(t)&&t.length!==void 0},Fm={number:`number`,bigint:`bigint`,object:`date`},Im=R(`$ZodCheckLessThan`,(e,t)=>{Mm.init(e,t);let n=Fm[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Fm[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Lm=R(`$ZodCheckGreaterThan`,(e,t)=>{Mm.init(e,t);let n=Fm[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Fm[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})}}),Rm=R(`$ZodCheckMultipleOf`,(e,t)=>{Mm.init(e,t),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):Ku(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})}}),zm=R(`$ZodCheckNumberFormat`,(e,t)=>{Mm.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Cd[t.format];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}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Bm=R(`$ZodCheckBigIntFormat`,(e,t)=>{Mm.init(e,t);let[n,r]=wd[t.format];e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Vm=R(`$ZodCheckMaxSize`,(e,t)=>{var n;Mm.init(e,t),(n=e._zod.def).when??(n.when=Nm),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Vd(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Hm=R(`$ZodCheckMinSize`,(e,t)=>{var n;Mm.init(e,t),(n=e._zod.def).when??(n.when=Nm),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Vd(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Um=R(`$ZodCheckSizeEquals`,(e,t)=>{var n;Mm.init(e,t),(n=e._zod.def).when??(n.when=Nm),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Vd(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Wm=R(`$ZodCheckMaxLength`,(e,t)=>{var n;Mm.init(e,t),(n=e._zod.def).when??(n.when=Pm),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ud(r):i)<=t.maximum)return;let a=Wd(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Gm=R(`$ZodCheckMinLength`,(e,t)=>{var n;Mm.init(e,t),(n=e._zod.def).when??(n.when=Pm),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ud(r):i)>=t.minimum)return;let a=Wd(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Km=R(`$ZodCheckLengthEquals`,(e,t)=>{var n;Mm.init(e,t),(n=e._zod.def).when??(n.when=Pm),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ud(r):i;if(a===t.length)return;let o=Wd(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})}}),qm=R(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Mm.init(e,t),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=()=>{})}),Jm=R(`$ZodCheckRegex`,(e,t)=>{qm.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})}}),Ym=R(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=fm,qm.init(e,t)}),Xm=R(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=pm,qm.init(e,t)}),Zm=R(`$ZodCheckIncludes`,(e,t)=>{Mm.init(e,t);let n=yd(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),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})}}),Qm=R(`$ZodCheckStartsWith`,(e,t)=>{Mm.init(e,t);let n=RegExp(`^${yd(t.prefix)}.*`);t.pattern??=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})}}),$m=R(`$ZodCheckEndsWith`,(e,t)=>{Mm.init(e,t);let n=RegExp(`.*${yd(t.suffix)}$`);t.pattern??=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})}});function eh(e,t,n){e.issues.length&&t.issues.push(...Id(n,e.issues))}var th=R(`$ZodCheckProperty`,(e,t)=>{Mm.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>eh(n,e,t.property));eh(n,e,t.property)}}),nh=R(`$ZodCheckProperties`,(e,t)=>{Mm.init(e,t),nf(e,Symbol.iterator,function*(){yield e});let n;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:`object`,code:`invalid_type`,input:r.value,inst:e});return}n??=Reflect.ownKeys(t.shape).map(e=>[e,t.shape[e]]);let i=r.value,a;for(let[e,t]of n){let n=t._zod.run({value:i[e],issues:[]},{});n instanceof Promise?(a??=[],a.push(n.then(t=>eh(t,r,e)))):eh(n,r,e)}if(a)return Promise.all(a).then(()=>void 0)}}),rh=R(`$ZodCheckMimeType`,(e,t)=>{Mm.init(e,t);let n=new Set(t.mime);e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),ih=R(`$ZodCheckOverwrite`,(e,t)=>{Mm.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),ah=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
@@ -135,5 +135,5 @@ ${c}
135
135
 
136
136
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function wq(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;wq(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Tq=new Set([`type`,`properties`,`required`,`additionalProperties`]),Eq=[`oneOf`,`anyOf`];function Dq(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Oq(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Tq.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Dq(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}uP(n,r,e.length===1?e[0]:Oq(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Dq(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function kq(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Tq)if(t in e)return;let n=t.filter(e=>Eq.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Oq(t);else{let e=n[0],i=Eq.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Oq([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,vq(e,r))}function Aq(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):vq(i,s),vq(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())wq(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])kq(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}vq(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,uP(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Nq(t,`input`,e.processors),output:Nq(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function jq(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return jq(r.element,n);if(r.type===`set`)return jq(r.valueType,n);if(r.type===`lazy`)return jq(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return jq(r.innerType,n);if(r.type===`intersection`)return jq(r.left,n)||jq(r.right,n);if(r.type===`record`||r.type===`map`)return jq(r.keyType,n)||jq(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:jq(r.in,n)||jq(r.out,n);if(r.type===`object`){for(let e in r.shape)if(jq(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(jq(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(jq(e,n))return!0;return!!(r.rest&&jq(r.rest,n))}return!1}var Mq=(e,t={})=>n=>{let r=yq({...n,processors:t});return xq(e,r),Cq(r,e),Aq(r,e)},Nq=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=yq({...i??{},target:a,io:t,processors:n});return xq(e,o),Cq(o,e),Aq(o,e)},Pq=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Fq=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Iq=(e,t)=>{Pq(e,`minimum`,t),Fq(e,`maximum`,t)},Lq=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Rq=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},zq=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Bq=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Vq=(e,t)=>Pq(e,`minimum`,t.minimum),Hq=(e,t)=>Fq(e,`maximum`,t.maximum),Uq=e=>(t,n)=>{Bq(t,n.format);let[r,i]=e[n.format];Pq(t,`minimum`,r),Fq(t,`maximum`,i)},Wq={greater_than:(e,t)=>Pq(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Fq(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Lq(e,t.value),number_format:Uq(LP),bigint_format:Uq(RP),min_length:Vq,max_length:Hq,length_equals:(e,t)=>Iq(e,t.length),min_size:Vq,max_size:Hq,size_equals:(e,t)=>Iq(e,t.size),string_format:(e,t)=>{Bq(e,t.format),t.pattern&&Rq(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>zq(e,t.mime)};function Gq(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Wq[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Pq(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Pq(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Fq(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Fq(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Lq(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&zq(t,i.mime);for(let e of i.patterns??[])Rq(t,e);return t}var Kq={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},qq=new Map([[iz,nL],[oz,rL]]),Jq=e=>qq.get(e)??e,Yq=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Gq(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Kq[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Jq);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Xq=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Gq(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):bq(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Zq=(e,t,n,r)=>{n.type=`boolean`},Qq=(e,t,n,r)=>{bq(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},$q=(e,t,n,r)=>{bq(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},eJ=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},tJ=(e,t,n,r)=>{bq(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},nJ=(e,t,n,r)=>{bq(e,t,n,r,`Void cannot be represented in JSON Schema`)},rJ=(e,t,n,r)=>{n.not={}},iJ=(e,t,n,r)=>{},aJ=(e,t,n,r)=>{},oJ=(e,t,n,r)=>{bq(e,t,n,r,`Date cannot be represented in JSON Schema`)},sJ=(e,t,n,r)=>{let i=e._zod.def,a=eP(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},cJ=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(bq(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(bq(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},lJ=(e,t,n,r)=>{bq(e,t,n,r,`NaN cannot be represented in JSON Schema`)},uJ=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},dJ=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Gq(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},fJ=(e,t,n,r)=>{n.type=`boolean`},pJ=(e,t,n,r)=>{bq(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},mJ=(e,t,n,r)=>{bq(e,t,n,r,`Function types cannot be represented in JSON Schema`)},hJ=(e,t,n,r)=>{bq(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},gJ=(e,t,n,r)=>{bq(e,t,n,r,`Map cannot be represented in JSON Schema`)},_J=(e,t,n,r)=>{bq(e,t,n,r,`Set cannot be represented in JSON Schema`)},vJ=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Gq(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=xq(a.element,t,{...r,path:[...r.path,`items`]})};function yJ(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?yJ(t.out):t.type===`catch`?yJ(t.innerType):e._zod.optin}var bJ=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&bq(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)uP(i.properties,e,xq(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?yJ(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=xq(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},xJ=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>xq(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},SJ=(e,t,n,r)=>{let i=e._zod.def,a=xq(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=xq(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},CJ=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>xq(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?xq(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?yJ(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Gq(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function wJ(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=wJ(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>wJ(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?xL:bL).source),p):p}var TJ=new WeakMap;function EJ(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of TJ.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=wJ(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var DJ=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Gq(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=xq(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)uP(i.patternProperties,Jq(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=xq(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=TJ.get(t);n||(n=[],TJ.set(t,n),t.deferred.push(()=>EJ(t))),n.push(e)}i.additionalProperties=xq(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&yJ(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},OJ=(e,t,n,r)=>{let i=e._zod.def,a=xq(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},kJ=(e,t,n,r)=>{let i=e._zod.def;xq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},AJ=Symbol();function jJ(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(bq(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),AJ):JSON.parse(o)}var MJ=(e,t,n,r)=>{let i=e._zod.def;xq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=jJ(i.defaultValue,e,t,n,r);o!==AJ&&(n.default=o)},NJ=(e,t,n,r)=>{let i=e._zod.def;xq(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=jJ(i.defaultValue,e,t,n,r);o!==AJ&&(n._prefault=o)},PJ=(e,t,n,r)=>{let i=e._zod.def;xq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{bq(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},FJ=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;xq(o,t,r);let s=t.seen.get(e);s.ref=o},IJ=(e,t,n,r)=>{let i=e._zod.def;xq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},LJ=(e,t,n,r)=>{let i=e._zod.def;xq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},RJ=(e,t,n,r)=>{let i=e._zod.def;xq(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},zJ=(e,t,n,r)=>{let i=e._zod.innerType;xq(i,t,r);let a=t.seen.get(e);a.ref=i},BJ={string:Yq,number:Xq,boolean:Zq,bigint:Qq,symbol:$q,null:eJ,undefined:tJ,void:nJ,never:rJ,any:iJ,unknown:aJ,date:oJ,enum:sJ,literal:cJ,nan:lJ,template_literal:uJ,file:dJ,success:fJ,custom:pJ,function:mJ,transform:hJ,map:gJ,set:_J,array:vJ,object:bJ,union:xJ,intersection:SJ,tuple:CJ,record:DJ,nullable:OJ,nonoptional:kJ,default:MJ,prefault:NJ,catch:PJ,pipe:FJ,readonly:IJ,promise:LJ,optional:RJ,lazy:zJ};function VJ(e,t){if(`_idmap`in e){let n=e,r=yq({...t,processors:BJ}),i={};for(let e of n._idmap.entries()){let[t,n]=e;xq(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Cq(r,n),uP(a,t,Aq(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=yq({...t,processors:BJ});return xq(e,n),Cq(n,e),Aq(n,e)}var HJ=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=yq({processors:BJ,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return xq(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Cq(this.ctx,e);let{"~standard":n,...r}=Aq(this.ctx,e);return r}},UJ={},WJ={};GN(WJ,{ZodAny:()=>VX,ZodArray:()=>ZX,ZodBase64:()=>nX,ZodBase64URL:()=>iX,ZodBigInt:()=>AX,ZodBigIntFormat:()=>MX,ZodBoolean:()=>OX,ZodCIDRv4:()=>QY,ZodCIDRv6:()=>eX,ZodCUID:()=>IY,ZodCUID2:()=>RY,ZodCatch:()=>KZ,ZodCodec:()=>QZ,ZodCreditCard:()=>cX,ZodCustom:()=>fQ,ZodCustomStringFormat:()=>mX,ZodDate:()=>YX,ZodDefault:()=>RZ,ZodDiscriminatedUnion:()=>cZ,ZodE164:()=>oX,ZodEmail:()=>bY,ZodEmoji:()=>MY,ZodEnum:()=>SZ,ZodExactOptional:()=>NZ,ZodFile:()=>DZ,ZodFunction:()=>uQ,ZodGUID:()=>SY,ZodIBAN:()=>uX,ZodIPv4:()=>KY,ZodIPv6:()=>XY,ZodISODate:()=>_Y,ZodISODateTime:()=>gY,ZodISODuration:()=>yY,ZodISOTime:()=>vY,ZodInstanceOf:()=>yQ,ZodIntersection:()=>uZ,ZodJWT:()=>fX,ZodKSUID:()=>WY,ZodLazy:()=>oQ,ZodLiteral:()=>TZ,ZodMAC:()=>JY,ZodMap:()=>vZ,ZodNaN:()=>JZ,ZodNanoID:()=>PY,ZodNever:()=>GX,ZodNonOptional:()=>HZ,ZodNull:()=>zX,ZodNullable:()=>FZ,ZodNumber:()=>bX,ZodNumberFormat:()=>SX,ZodObject:()=>eZ,ZodOptional:()=>jZ,ZodPipe:()=>XZ,ZodPrefault:()=>BZ,ZodPreprocess:()=>tQ,ZodPromise:()=>cQ,ZodReadonly:()=>nQ,ZodRecord:()=>mZ,ZodSet:()=>bZ,ZodString:()=>pY,ZodStringFormat:()=>hY,ZodSuccess:()=>WZ,ZodSymbol:()=>FX,ZodTemplateLiteral:()=>iQ,ZodTransform:()=>kZ,ZodTuple:()=>fZ,ZodType:()=>dY,ZodULID:()=>BY,ZodURL:()=>kY,ZodUUID:()=>wY,ZodUndefined:()=>LX,ZodUnion:()=>iZ,ZodUnknown:()=>UX,ZodVoid:()=>qX,ZodXID:()=>HY,ZodXor:()=>oZ,_ZodString:()=>fY,_default:()=>zZ,_function:()=>dQ,any:()=>HX,array:()=>QX,base64:()=>rX,base64url:()=>aX,bigint:()=>jX,boolean:()=>kX,catch:()=>qZ,check:()=>pQ,cidrv4:()=>$Y,cidrv6:()=>tX,codec:()=>$Z,creditCard:()=>lX,cuid:()=>LY,cuid2:()=>zY,currencyCode:()=>vX,custom:()=>mQ,date:()=>XX,describe:()=>_Q,discriminatedUnion:()=>lZ,e164:()=>sX,email:()=>xY,emoji:()=>NY,enum:()=>CZ,exactOptional:()=>PZ,file:()=>OZ,float32:()=>wX,float64:()=>TX,function:()=>dQ,guid:()=>CY,hash:()=>yX,hex:()=>_X,hostname:()=>gX,httpUrl:()=>jY,iban:()=>dX,instanceof:()=>bQ,int:()=>CX,int32:()=>EX,int64:()=>NX,intersection:()=>dZ,invertCodec:()=>eQ,ipv4:()=>qY,ipv6:()=>ZY,json:()=>SQ,jwt:()=>pX,keyof:()=>$X,ksuid:()=>GY,lazy:()=>sQ,literal:()=>EZ,looseObject:()=>rZ,looseRecord:()=>_Z,mac:()=>YY,map:()=>yZ,meta:()=>vQ,nan:()=>YZ,nanoid:()=>FY,nativeEnum:()=>wZ,never:()=>KX,nonoptional:()=>UZ,null:()=>BX,nullable:()=>IZ,nullish:()=>LZ,number:()=>xX,object:()=>tZ,optional:()=>MZ,partialRecord:()=>gZ,pipe:()=>ZZ,prefault:()=>VZ,preprocess:()=>CQ,promise:()=>lQ,readonly:()=>rQ,record:()=>hZ,refine:()=>hQ,set:()=>xZ,strictObject:()=>nZ,string:()=>mY,stringFormat:()=>hX,stringbool:()=>xQ,success:()=>GZ,superRefine:()=>gQ,symbol:()=>IX,templateLiteral:()=>aQ,transform:()=>AZ,tuple:()=>pZ,uint32:()=>DX,uint64:()=>PX,ulid:()=>VY,undefined:()=>RX,union:()=>aZ,unknown:()=>WX,url:()=>AY,uuid:()=>TY,uuidv4:()=>EY,uuidv6:()=>DY,uuidv7:()=>OY,void:()=>JX,xid:()=>UY,xor:()=>sZ});var GJ={};GN(GJ,{endsWith:()=>kK,gt:()=>dK,gte:()=>fK,includes:()=>DK,length:()=>CK,lowercase:()=>TK,lt:()=>lK,lte:()=>uK,maxLength:()=>xK,maxSize:()=>vK,mime:()=>MK,minLength:()=>SK,minSize:()=>yK,multipleOf:()=>_K,negative:()=>mK,nonnegative:()=>gK,nonpositive:()=>hK,normalize:()=>PK,overwrite:()=>NK,positive:()=>pK,properties:()=>jK,property:()=>AK,regex:()=>wK,size:()=>bK,slugify:()=>RK,startsWith:()=>OK,toLowerCase:()=>IK,toUpperCase:()=>LK,trim:()=>FK,uppercase:()=>EK});var KJ=new WeakSet([Object.prototype,Error.prototype]);function qJ(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var JJ=(e,t)=>{UF.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);KJ.has(n)||(KJ.add(n),qJ(n,`format`,e=>t=>qF(e,t)),qJ(n,`flatten`,e=>t=>KF(e,t)),qJ(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,tP,2)}),qJ(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,tP,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},YJ=J(`ZodError`,JJ),XJ=J(`ZodError`,JJ,void 0,{Parent:Error}),ZJ=QF(XJ),QJ=eI(XJ),$J=nI(XJ),eY=aI(XJ),tY=fI(XJ),nY=mI(XJ),rY=gI(XJ),iY=vI(XJ),aY=bI(XJ),oY=SI(XJ),sY=wI(XJ),cY=EI(XJ);function lY(){FF.localeError||IF(MV())}function uY(){FF.memoizer||IF({memoizer:aV()})}var dY=J(`ZodType`,(e,t)=>(lY(),Y.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(U.mergeDefs(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return PP(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(hQ(e,t))},superRefine(e,t){return this.check(gQ(e,t))},overwrite(e){return this.check(NK(e))},optional(){return MZ(this)},exactOptional(){return PZ(this)},nullable(){return IZ(this)},nullish(){return MZ(IZ(this))},nonoptional(e){return UZ(this,e)},array(){return QX(this)},or(e){return aZ([this,e])},and(e){return dZ(this,e)},transform(e){return ZZ(this,AZ(e))},default(e){return zZ(this,e)},prefault(e){return VZ(this,e)},catch(e){return qZ(this,e)},pipe(e){return ZZ(this,e)},readonly(){return rQ(this)},describe(e){let t=this.clone();return FU.add(t,{description:e}),t},meta(...e){if(e.length===0)return FU.get(this);let t=this.clone();return FU.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return U.hide(this,`~standard`,{...SR(this),jsonSchema:{input:Nq(this,`input`),output:Nq(this,`output`)}})},set"~standard"(e){U.own(this,`~standard`,e)},parse:function e(t,n){return ZJ(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await QJ(this,t,n,{callee:e})},safeParse(e,t){return $J(this,e,t)},async safeParseAsync(e,t){return eY(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){U.own(this,`spa`,e)},validate(e,t){return lI(this,e,t)},validateAsync(e,t){return dI(this,e,t)},encode:function e(t,n){return tY(this,t,n,{callee:e})},decode:function e(t,n){return nY(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await rY(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await iY(this,t,n,{callee:e})},safeEncode(e,t){return aY(this,e,t)},safeDecode(e,t){return oY(this,e,t)},async safeEncodeAsync(e,t){return sY(this,e,t)},async safeDecodeAsync(e,t){return cY(this,e,t)},toJSONSchema(e){return Mq(this,{})(e)},get description(){return FU.get(this)?.description},get _def(){return this._zod.def}}),fY=J(`_ZodString`,(e,t)=>{CR.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yq(e,t,n,r)},U.derived({format:e=>Gq(e).format??null,minLength:e=>Gq(e).minimum??null,maxLength:e=>Gq(e).maximum??null},{regex(...e){return this.check(wK(...e))},includes(...e){return this.check(DK(...e))},startsWith(...e){return this.check(OK(...e))},endsWith(...e){return this.check(kK(...e))},min(...e){return this.check(SK(...e))},max(...e){return this.check(xK(...e))},length(...e){return this.check(CK(...e))},nonempty(...e){return this.check(SK(1,...e))},lowercase(e){return this.check(TK(e))},uppercase(e){return this.check(EK(e))},trim(){return this.check(FK())},normalize(...e){return this.check(PK(...e))},toLowerCase(){return this.check(IK())},toUpperCase(){return this.check(LK())},slugify(){return this.check(RK())}})),pY=J(`ZodString`,(e,t)=>{CR.init(e,t),fY.init(e,t)},{email(e){return this.check(uG(bY,e))},url(e){return this.check(gG(kY,e))},jwt(e){return this.check(PG(fX,e))},emoji(e){return this.check(_G(MY,e))},guid(e){return this.check(dG(SY,e))},uuid(e){return this.check(fG(wY,e))},uuidv4(e){return this.check(pG(wY,e))},uuidv6(e){return this.check(mG(wY,e))},uuidv7(e){return this.check(hG(wY,e))},nanoid(e){return this.check(vG(PY,e))},cuid(e){return this.check(yG(IY,e))},cuid2(e){return this.check(bG(RY,e))},ulid(e){return this.check(xG(BY,e))},base64(e){return this.check(kG(nX,e))},base64url(e){return this.check(AG(iX,e))},xid(e){return this.check(SG(HY,e))},ksuid(e){return this.check(CG(WY,e))},ipv4(e){return this.check(wG(KY,e))},ipv6(e){return this.check(TG(XY,e))},cidrv4(e){return this.check(DG(QY,e))},cidrv6(e){return this.check(OG(eX,e))},e164(e){return this.check(jG(oX,e))},datetime(e){return this.check(IG(gY,e))},date(e){return this.check(LG(_Y,e))},time(e){return this.check(RG(vY,e))},duration(e){return this.check(zG(yY,e))}});function mY(e){return cG(pY,e)}var hY=J(`ZodStringFormat`,(e,t)=>{wR.init(e,t),fY.init(e,t)}),gY=J(`ZodISODateTime`,(e,t)=>{GR.init(e,t),hY.init(e,t)}),_Y=J(`ZodISODate`,(e,t)=>{KR.init(e,t),hY.init(e,t)}),vY=J(`ZodISOTime`,(e,t)=>{qR.init(e,t),hY.init(e,t)}),yY=J(`ZodISODuration`,(e,t)=>{JR.init(e,t),hY.init(e,t)}),bY=J(`ZodEmail`,(e,t)=>{DR.init(e,t),hY.init(e,t)});function xY(e){return uG(bY,e)}var SY=J(`ZodGUID`,(e,t)=>{TR.init(e,t),hY.init(e,t)});function CY(e){return dG(SY,e)}var wY=J(`ZodUUID`,(e,t)=>{ER.init(e,t),hY.init(e,t)});function TY(e){return fG(wY,e)}function EY(e){return pG(wY,e)}function DY(e){return mG(wY,e)}function OY(e){return hG(wY,e)}var kY=J(`ZodURL`,(e,t)=>{LR.init(e,t),hY.init(e,t)});function AY(e){return gG(kY,e)}function jY(e){return gG(kY,{protocol:oL,hostname:aL,...U.normalizeParams(e)})}var MY=J(`ZodEmoji`,(e,t)=>{RR.init(e,t),hY.init(e,t)});function NY(e){return _G(MY,e)}var PY=J(`ZodNanoID`,(e,t)=>{zR.init(e,t),hY.init(e,t)});function FY(e){return vG(PY,e)}var IY=J(`ZodCUID`,(e,t)=>{BR.init(e,t),hY.init(e,t)});function LY(e){return yG(IY,e)}var RY=J(`ZodCUID2`,(e,t)=>{VR.init(e,t),hY.init(e,t)});function zY(e){return bG(RY,e)}var BY=J(`ZodULID`,(e,t)=>{HR.init(e,t),hY.init(e,t)});function VY(e){return xG(BY,e)}var HY=J(`ZodXID`,(e,t)=>{UR.init(e,t),hY.init(e,t)});function UY(e){return SG(HY,e)}var WY=J(`ZodKSUID`,(e,t)=>{WR.init(e,t),hY.init(e,t)});function GY(e){return CG(WY,e)}var KY=J(`ZodIPv4`,(e,t)=>{YR.init(e,t),hY.init(e,t)});function qY(e){return wG(KY,e)}var JY=J(`ZodMAC`,(e,t)=>{$R.init(e,t),hY.init(e,t)});function YY(e){return EG(JY,e)}var XY=J(`ZodIPv6`,(e,t)=>{QR.init(e,t),hY.init(e,t)});function ZY(e){return TG(XY,e)}var QY=J(`ZodCIDRv4`,(e,t)=>{ez.init(e,t),hY.init(e,t)});function $Y(e){return DG(QY,e)}var eX=J(`ZodCIDRv6`,(e,t)=>{nz.init(e,t),hY.init(e,t)});function tX(e){return OG(eX,e)}var nX=J(`ZodBase64`,(e,t)=>{az.init(e,t),hY.init(e,t)});function rX(e){return kG(nX,e)}var iX=J(`ZodBase64URL`,(e,t)=>{cz.init(e,t),hY.init(e,t)});function aX(e){return AG(iX,e)}var oX=J(`ZodE164`,(e,t)=>{lz.init(e,t),hY.init(e,t)});function sX(e){return jG(oX,e)}var cX=J(`ZodCreditCard`,(e,t)=>{pz.init(e,t),hY.init(e,t)});function lX(e){return MG(cX,e)}var uX=J(`ZodIBAN`,(e,t)=>{gz.init(e,t),hY.init(e,t)});function dX(e){return NG(uX,e)}var fX=J(`ZodJWT`,(e,t)=>{vz.init(e,t),hY.init(e,t)});function pX(e){return PG(fX,e)}var mX=J(`ZodCustomStringFormat`,(e,t)=>{yz.init(e,t),hY.init(e,t)});function hX(e,t,n={}){return _q(mX,e,t,n)}function gX(e){return _q(mX,`hostname`,iL,e)}function _X(e){return _q(mX,`hex`,DL,e)}function vX(e){return _q(mX,`currency_code`,lL,e)}function yX(e,t){let n=`${e}_${t?.enc??`hex`}`,r=OI[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return _q(mX,n,r,t)}var bX=J(`ZodNumber`,(e,t)=>{bz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xq(e,t,n,r),e.isFinite=!0},U.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Gq(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Gq(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Gq(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Gq(e).format??null},{gt(e,t){return this.check(dK(e,t))},gte(e,t){return this.check(fK(e,t))},min(e,t){return this.check(fK(e,t))},lt(e,t){return this.check(lK(e,t))},lte(e,t){return this.check(uK(e,t))},max(e,t){return this.check(uK(e,t))},int(e){return this.check(CX(e))},safe(e){return this.check(CX(e))},positive(e){return this.check(dK(0,e))},nonnegative(e){return this.check(fK(0,e))},negative(e){return this.check(lK(0,e))},nonpositive(e){return this.check(uK(0,e))},multipleOf(e,t){return this.check(_K(e,t))},step(e,t){return this.check(_K(e,t))},finite(){return this}}));function xX(e){return BG(bX,e)}var SX=J(`ZodNumberFormat`,(e,t)=>{xz.init(e,t),bX.init(e,t)});function CX(e){return HG(SX,e)}function wX(e){return UG(SX,e)}function TX(e){return WG(SX,e)}function EX(e){return GG(SX,e)}function DX(e){return KG(SX,e)}var OX=J(`ZodBoolean`,(e,t)=>{Sz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zq(e,t,n,r)});function kX(e){return qG(OX,e)}var AX=J(`ZodBigInt`,(e,t)=>{Cz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qq(e,t,n,r)},U.derived({minValue:e=>Gq(e).minimum??null,maxValue:e=>Gq(e).maximum??null,format:e=>Gq(e).format??null},{gte(e,t){return this.check(fK(e,t))},min(e,t){return this.check(fK(e,t))},gt(e,t){return this.check(dK(e,t))},lt(e,t){return this.check(lK(e,t))},lte(e,t){return this.check(uK(e,t))},max(e,t){return this.check(uK(e,t))},positive(e){return this.check(dK(BigInt(0),e))},negative(e){return this.check(lK(BigInt(0),e))},nonpositive(e){return this.check(uK(BigInt(0),e))},nonnegative(e){return this.check(fK(BigInt(0),e))},multipleOf(e,t){return this.check(_K(e,t))}}));function jX(e){return YG(AX,e)}var MX=J(`ZodBigIntFormat`,(e,t)=>{wz.init(e,t),AX.init(e,t)});function NX(e){return ZG(MX,e)}function PX(e){return QG(MX,e)}var FX=J(`ZodSymbol`,(e,t)=>{Tz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$q(e,t,n,r)});function IX(e){return $G(FX,e)}var LX=J(`ZodUndefined`,(e,t)=>{Ez.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tJ(e,t,n,r)});function RX(e){return eK(LX,e)}var zX=J(`ZodNull`,(e,t)=>{Dz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eJ(e,t,n,r)});function BX(e){return tK(zX,e)}var VX=J(`ZodAny`,(e,t)=>{Oz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function HX(){return nK(VX)}var UX=J(`ZodUnknown`,(e,t)=>{kz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function WX(){return rK(UX)}var GX=J(`ZodNever`,(e,t)=>{Az.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rJ(e,t,n,r)});function KX(e){return iK(GX,e)}var qX=J(`ZodVoid`,(e,t)=>{jz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nJ(e,t,n,r)});function JX(e){return aK(qX,e)}var YX=J(`ZodDate`,(e,t)=>{Mz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oJ(e,t,n,r),e.min=(t,n)=>e.check(fK(t,n)),e.max=(t,n)=>e.check(uK(t,n))},U.derived({minDate:e=>{let{minimum:t}=Gq(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Gq(e);return t?new Date(t):null}},{}));function XX(e){return oK(YX,e)}var ZX=J(`ZodArray`,(e,t)=>{uY(),Rz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vJ(e,t,n,r),e.element=t.element},{min(e,t){return this.check(SK(e,t))},nonempty(e){return this.check(SK(1,e))},max(e,t){return this.check(xK(e,t))},length(e,t){return this.check(CK(e,t))},unwrap(){return this.element}});function QX(e,t){return zK(ZX,e,t)}function $X(e){let t=e._zod.def.shape;return CZ(Object.keys(t))}var eZ=J(`ZodObject`,(e,t)=>{uY(),Wz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bJ(e,t,n,r),U.installLazyProp(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return CZ(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(U.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(U.mergeDefs(this._zod.def,{catchall:WX()}))},loose(){return this.clone(U.mergeDefs(this._zod.def,{catchall:WX()}))},strict(){return this.clone(U.mergeDefs(this._zod.def,{catchall:KX()}))},strip(){return this.clone(U.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return U.extend(this,e)},safeExtend(e){return U.safeExtend(this,e)},merge(e){return U.merge(this,e)},pick(e){return U.pick(this,e)},omit(e){return U.omit(this,e)},partial(...e){return U.partial(jZ,this,e[0])},exactPartial(...e){return U.partial(NZ,this,e[0],`exactPartial`)},required(...e){return U.required(HZ,this,e[0])}});function tZ(e,t){return new eZ({type:`object`,shape:e??{},...U.normalizeParams(t)})}function nZ(e,t){return new eZ({type:`object`,shape:e,catchall:KX(),...U.normalizeParams(t)})}function rZ(e,t){return new eZ({type:`object`,shape:e,catchall:WX(),...U.normalizeParams(t)})}var iZ=J(`ZodUnion`,(e,t)=>{Kz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xJ(e,t,n,r),e.options=t.options});function aZ(e,t){return new iZ({type:`union`,options:e,...U.normalizeParams(t)})}var oZ=J(`ZodXor`,(e,t)=>{iZ.init(e,t),Jz.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xJ(e,t,n,r),e.options=t.options});function sZ(e,t){return new oZ({type:`union`,options:e,inclusive:!1,...U.normalizeParams(t)})}var cZ=J(`ZodDiscriminatedUnion`,(e,t)=>{iZ.init(e,t),Zz.init(e,t)});function lZ(e,t,n){return new cZ({type:`union`,options:t,discriminator:e,...U.normalizeParams(n)})}var uZ=J(`ZodIntersection`,(e,t)=>{Qz.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SJ(e,t,n,r)});function dZ(e,t){return new uZ({type:`intersection`,left:e,right:t})}var fZ=J(`ZodTuple`,(e,t)=>{uY(),tB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CJ(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new jZ({type:`optional`,innerType:e}))})}});function pZ(e,t,n){let r=t instanceof Y,i=r?n:t;return new fZ({type:`tuple`,items:e,rest:r?t:null,...U.normalizeParams(i)})}var mZ=J(`ZodRecord`,(e,t)=>{uY(),aB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DJ(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function hZ(e,t,n){return!t||!t._zod?new mZ({type:`record`,keyType:mY(),valueType:e,...U.normalizeParams(t)}):new mZ({type:`record`,keyType:e,valueType:t,...U.normalizeParams(n)})}function gZ(e,t,n){return new mZ({type:`record`,keyType:e,valueType:t,...U.normalizeParams(n),partial:!0})}function _Z(e,t,n){return new mZ({type:`record`,keyType:e,valueType:t,mode:`loose`,...U.normalizeParams(n)})}var vZ=J(`ZodMap`,(e,t)=>{uY(),oB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gJ(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(yK(...t)),e.nonempty=t=>e.check(yK(1,t)),e.max=(...t)=>e.check(vK(...t)),e.size=(...t)=>e.check(bK(...t))});function yZ(e,t,n){return new vZ({type:`map`,keyType:e,valueType:t,...U.normalizeParams(n)})}var bZ=J(`ZodSet`,(e,t)=>{uY(),cB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_J(e,t,n,r),e.min=(...t)=>e.check(yK(...t)),e.nonempty=t=>e.check(yK(1,t)),e.max=(...t)=>e.check(vK(...t)),e.size=(...t)=>e.check(bK(...t))});function xZ(e,t){return new bZ({type:`set`,valueType:e,...U.normalizeParams(t)})}var SZ=J(`ZodEnum`,(e,t)=>{uB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sJ(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new SZ({...t,checks:[],...U.normalizeParams(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new SZ({...t,checks:[],...U.normalizeParams(r),entries:i})}});function CZ(e,t){return new SZ({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...U.normalizeParams(t)})}function wZ(e,t){return new SZ({type:`enum`,entries:e,...U.normalizeParams(t)})}var TZ=J(`ZodLiteral`,(e,t)=>{dB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cJ(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function EZ(e,t){return new TZ({type:`literal`,values:Array.isArray(e)?e:[e],...U.normalizeParams(t)})}var DZ=J(`ZodFile`,(e,t)=>{fB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dJ(e,t,n,r),e.min=(t,n)=>e.check(yK(t,n)),e.max=(t,n)=>e.check(vK(t,n)),e.mime=(t,n)=>e.check(MK(Array.isArray(t)?t:[t],n))});function OZ(e){return ZK(DZ,e)}var kZ=J(`ZodTransform`,(e,t)=>{uY(),pB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hJ(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new PF(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(U.issue(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(U.issue(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function AZ(e){return new kZ({type:`transform`,transform:e})}var jZ=J(`ZodOptional`,(e,t)=>{hB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function MZ(e){return new jZ({type:`optional`,innerType:e})}var NZ=J(`ZodExactOptional`,(e,t)=>{gB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function PZ(e){return new NZ({type:`optional`,innerType:e})}var FZ=J(`ZodNullable`,(e,t)=>{_B.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function IZ(e){return new FZ({type:`nullable`,innerType:e})}function LZ(e){return MZ(IZ(e))}var RZ=J(`ZodDefault`,(e,t)=>{vB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function zZ(e,t){return new RZ({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():U.shallowClone(t)}})}var BZ=J(`ZodPrefault`,(e,t)=>{bB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function VZ(e,t){return new BZ({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():U.shallowClone(t)}})}var HZ=J(`ZodNonOptional`,(e,t)=>{xB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function UZ(e,t){return new HZ({type:`nonoptional`,innerType:e,...U.normalizeParams(t)})}var WZ=J(`ZodSuccess`,(e,t)=>{CB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function GZ(e){return new WZ({type:`success`,innerType:e})}var KZ=J(`ZodCatch`,(e,t)=>{TB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qZ(e,t){return new KZ({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:U.constantCatch(t)})}var JZ=J(`ZodNaN`,(e,t)=>{EB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lJ(e,t,n,r)});function YZ(e){return cK(JZ,e)}var XZ=J(`ZodPipe`,(e,t)=>{DB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FJ(e,t,n,r),e.in=t.in,e.out=t.out});function ZZ(e,t){return new XZ({type:`pipe`,in:e,out:t})}var QZ=J(`ZodCodec`,(e,t)=>{XZ.init(e,t),kB.init(e,t)});function $Z(e,t,n){return new QZ({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function eQ(e){let t=e._zod.def;return new QZ({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var tQ=J(`ZodPreprocess`,(e,t)=>{XZ.init(e,t),MB.init(e,t)}),nQ=J(`ZodReadonly`,(e,t)=>{NB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rQ(e){return new nQ({type:`readonly`,innerType:e})}var iQ=J(`ZodTemplateLiteral`,(e,t)=>{LB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uJ(e,t,n,r)});function aQ(e,t){return new iQ({type:`template_literal`,parts:e,...U.normalizeParams(t)})}var oQ=J(`ZodLazy`,(e,t)=>{BB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zJ(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function sQ(e){return new oQ({type:`lazy`,getter:e})}var cQ=J(`ZodPromise`,(e,t)=>{zB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LJ(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lQ(e){return new cQ({type:`promise`,innerType:e})}var uQ=J(`ZodFunction`,(e,t)=>{RB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mJ(e,t,n,r)});function dQ(e){return new uQ({type:`function`,input:Array.isArray(e?.input)?pZ(e?.input):e?.input??QX(WX()),output:e?.output??WX()})}var fQ=J(`ZodCustom`,(e,t)=>{VB.init(e,t),dY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pJ(e,t,n,r)});function pQ(e){let t=new GL({check:`custom`});return t._zod.check=e,t}function mQ(e,t){return uq(fQ,e??(()=>!0),t)}function hQ(e,t={}){return dq(fQ,e,t)}function gQ(e,t){return fq(e,t)}var _Q=mq,vQ=hq,yQ=J(`ZodInstanceOf`,(e,t)=>{fQ.init(e,t)},{properties(e,t){return this.check(jK(e,t))}});function bQ(e,t={}){let n=new yQ({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...U.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var xQ=(...e)=>gq({Codec:QZ,Boolean:OX,String:pY},...e);function SQ(e){let t=sQ(()=>aZ([mY(e),xX(),kX(),BX(),QX(t),hZ(mY(),t)]));return t}function CQ(e,t){return new tQ({type:`pipe`,in:AZ(e),out:t})}var wQ={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`};function TQ(e){IF({customError:e})}function EQ(){return IF().customError}var DQ;DQ||={};var OQ={};GN(OQ,{ZodISODate:()=>_Y,ZodISODateTime:()=>gY,ZodISODuration:()=>yY,ZodISOTime:()=>vY,date:()=>AQ,datetime:()=>kQ,duration:()=>MQ,time:()=>jQ});function kQ(e){return IG(gY,e)}function AQ(e){return LG(_Y,e)}function jQ(e){return RG(vY,e)}function MQ(e){return zG(yY,e)}var Q={...WJ,...GJ,iso:OQ},NQ=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`));function PQ(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function FQ(e,t){return e.map((e,n)=>n<t?e:e.optional())}function IQ(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function LQ(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1]===void 0?void 0:IQ(n[1]);if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function RQ(e,t){return Q.transform(e=>e).check(n=>{let r=n.value;if(typeof r!=`object`||!r||Array.isArray(r))return;let i=Object.getOwnPropertyNames(r);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:`object`,code:`too_small`,minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:r,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:`object`,code:`too_big`,maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:r,inst:e,continue:!0}),t.keySchema)for(let e of i){let r=t.keySchema.safeParse(e);r.success||n.issues.push({code:`invalid_key`,origin:`record`,issues:r.error.issues,input:e,path:[e],continue:!0})}}).pipe(e)}function zQ(e,t){if(e===null)return`z`;let n=typeof e;if(n!==`object`){if(n===`number`&&Number.isNaN(e))return null;let t=String(e);return`${n[0]}${t.length}:${t}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let n=[];for(let r of e){let e=zQ(r,t);if(e===null)return null;n.push(e)}return`a${n.length}:[${n.join(`,`)}]`}let n=Object.keys(e).sort(),r=[];for(let i of n){let n=zQ(e[i],t);if(n===null)return null;r.push(`${i.length}:${i}=${n}`)}return`o${r.length}:{${r.join(`,`)}}`}finally{t.delete(e)}}var BQ=new Set([`items`,`prefixItems`,`additionalItems`,`additionalProperties`,`contains`,`propertyNames`,`not`,`if`,`then`,`else`,`allOf`,`anyOf`,`oneOf`,`unevaluatedItems`,`unevaluatedProperties`,`contentSchema`]),VQ=new Set([`properties`,`patternProperties`,`dependentSchemas`,`dependencies`,`$defs`,`definitions`]);function HQ(e){return typeof e!=`object`||!e?!1:Array.isArray(e)?e.some(HQ):typeof e.$ref==`string`||Object.entries(e).some(([e,t])=>BQ.has(e)?HQ(t):!VQ.has(e)||typeof t!=`object`||!t?!1:Object.values(t).some(HQ))}function UQ(e){return e===1?`element`:`elements`}function WQ(e,t){return Q.transform(e=>e).check(e=>{let n=e.value;if(Array.isArray(n)){if(t.uniqueItems===!0){let t=new Map;for(let r=0;r<n.length;r++){let i=zQ(n[r],new Set);if(i===null)continue;let a=t.get(i);if(a===void 0){t.set(i,r);continue}e.issues.push({code:`custom`,message:`Array items must be unique: element at index ${r} duplicates the one at index ${a}`,input:n,path:[r],continue:!0})}}if(t.containsSchema){let r=t.minContains??1,i=t.maxContains===void 0?1/0:t.maxContains+1,a=0;for(let e of n)if(t.containsSchema.safeParse(e).success&&++a>=i)break;a<r&&e.issues.push({code:`custom`,message:`Array must contain at least ${r} matching ${UQ(r)}; found ${a}`,input:n,continue:!0}),t.maxContains!==void 0&&a>t.maxContains&&e.issues.push({code:`custom`,message:`Array must contain at most ${t.maxContains} matching ${UQ(t.maxContains)}`,input:n,continue:!0})}}}).pipe(e)}function GQ(e,t){if(e!==!1)return e===void 0||e===!0?Q.any():JQ(e,t)}var KQ=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function qQ(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return Q.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return Q.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=JQ(LQ(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return Q.null();if(n.length===0)return Q.never();if(n.length===1)return Q.literal(n[0]);if(n.every(e=>typeof e==`string`))return Q.enum(n);let r=n.map(e=>Q.literal(e));return r.length<2?r[0]:Q.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return Q.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>qQ({...e,type:n},t));return r.length===0?Q.never():r.length===1?r[0]:Q.union(r)}if(!n)return Q.any();let r;switch(n){case`string`:{let t=Q.string();if(e.format){let n=e.format;n===`email`?t=t.check(Q.email()):n===`uri`||n===`uri-reference`?t=t.check(Q.url()):n===`uuid`||n===`guid`?t=t.check(Q.uuid()):n===`date-time`?t=t.check(Q.iso.datetime({offset:!0})):n===`date`?t=t.check(Q.iso.date()):n===`time`?t=t.check(Q.regex(KQ)):n===`duration`?t=t.check(Q.iso.duration()):n===`hostname`?t=t.check(Q.hostname()):n===`ipv4`?t=t.check(Q.ipv4()):n===`ipv6`?t=t.check(Q.ipv6()):n===`mac`?t=t.check(Q.mac()):n===`cidr`?t=t.check(Q.cidrv4()):n===`cidr-v6`?t=t.check(Q.cidrv6()):n===`base64`?t=t.check(Q.base64()):n===`base64url`?t=t.check(Q.base64url()):n===`e164`?t=t.check(Q.e164()):n===`credit_card`?t=t.check(Q.creditCard()):n===`iban`?t=t.check(Q.iban()):n===`jwt`?t=t.check(Q.jwt()):n===`emoji`?t=t.check(Q.emoji()):n===`nanoid`?t=t.check(Q.nanoid()):n===`cuid`?t=t.check(Q.cuid()):n===`cuid2`?t=t.check(Q.cuid2()):n===`ulid`?t=t.check(Q.ulid()):n===`xid`?t=t.check(Q.xid()):n===`ksuid`&&(t=t.check(Q.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?Q.number().int():Q.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=Q.boolean();break;case`null`:r=Q.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?JQ(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=JQ(r,t);uP(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=JQ(i[e],t),r=Q.string().regex(new RegExp(e));o.push(Q.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(Q.object(n).passthrough()),s.push(...o),s.length===0)r=Q.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=Q.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=Q.intersection(e,s[t]);r=e}if(e.additionalProperties===!1){let e=Object.keys(n),t=a.map(e=>new RegExp(e)),i=r;r=r.check(n=>{if(!DP(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=Q.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}let s=e.propertyNames!==void 0&&e.propertyNames!==!0,c=typeof e.minProperties==`number`?e.minProperties:void 0,l=typeof e.maxProperties==`number`?e.maxProperties:void 0;if(s||c!==void 0||l!==void 0){let n;s&&(n=JQ(typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames,t)),r=RQ(r,{keySchema:n,minProperties:c,maxProperties:l})}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=FQ(n.map(e=>JQ(e,t)),a),s=Array.isArray(i)?void 0:GQ(i,t),c=Q.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=FQ(i.map(e=>JQ(e,t)),n),o=GQ(e.additionalItems,t),s=Q.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check(Q.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(Q.maxLength(e.maxItems)))}else if(i!==void 0){let n=JQ(i,t),a=Q.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=Q.array(Q.any());(e.uniqueItems===!0||e.contains!==void 0)&&(r=WQ(r,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains===void 0?void 0:JQ(e.contains,t),minContains:typeof e.minContains==`number`?e.minContains:void 0,maxContains:typeof e.maxContains==`number`?e.maxContains:void 0}));break}default:throw Error(`Unsupported type: ${n}`)}return r}function JQ(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n=qQ(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>JQ(e,t)),a=Q.union(i);n=r?Q.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>JQ(e,t)),a=Q.xor(i);n=r?Q.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:Q.any();else{let i=r?n:JQ(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=Q.intersection(i,JQ(e.allOf[n],t));n=i}}e.nullable===!0&&t.version===`openapi-3.0`&&(n=Q.nullable(n)),e.readOnly===!0&&(n=Q.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);if(e.type===`object`&&e.$ref===void 0){e.propertyNames!==void 0&&!HQ(e.propertyNames)&&(i.propertyNames=e.propertyNames);for(let t of[`minProperties`,`maxProperties`])e[t]!==void 0&&(i[t]=e[t])}if(e.type===`array`&&e.$ref===void 0){e.contains!==void 0&&!HQ(e.contains)&&(i.contains=e.contains);for(let t of[`uniqueItems`,`minContains`,`maxContains`])e[t]!==void 0&&(i[t]=e[t])}for(let t of Object.keys(e))NQ.has(t)||uP(i,t,e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function YQ(e,t){if(typeof e==`boolean`)return e?Q.any():Q.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:PQ(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??FU};return JQ(n,r)}var XQ=Symbol(`z.visit/resolving`);function ZQ(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===XQ)return new BB({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,XQ);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?PP(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:PP(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?PP(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:PP(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:PP(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?PP(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:PP(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:PP(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:PP(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:PP(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return PP(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}function QQ(e){return ZQ(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:aZ(t.options)}})}function $Q(e,t){if(!t?.length)return e;let n=e._zod.def;return PP(e,_P(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function e$(e){return $Q(e.out,e.checks)}function t$(e){return e.in._zod.traits.has(`$ZodTransform`)?e$(e):e.in}function n$(e){return ZQ(e,{pipe:e=>t$(e._zod.def),default:(e,t)=>t?MZ(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function r$(e){return ZQ(e,{pipe:e=>e$(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var i$={};GN(i$,{bigint:()=>c$,boolean:()=>s$,date:()=>l$,number:()=>o$,string:()=>a$});function a$(e){return lG(pY,e)}function o$(e){return VG(bX,e)}function s$(e){return JG(OX,e)}function c$(e){return XG(AX,e)}function l$(e){return sK(YX,e)}Object.freeze({qrTtlMs:18e4,proofTtlMs:3e4,pollMs:2e3,claimAttempts:5,claimRecoveryMs:6e4,grantTtlMs:6e4,leaseMs:3e5,accessMs:3e5,refreshIdleMs:6048e5,refreshAbsoluteMs:2592e6,maxStreams:32,maxTransfers:2,chunkBytes:16384,windowBytes:524288,queueBytes:4194304,socketHighWater:65536,ciphertextBytes:65535,relayBytes:134217728});var u$=KN.uuid(),d$=KN.string().regex(/^[A-Za-z0-9_-]{43}$/).refine(e=>{try{return Uint8Array.from(atob(e.replace(/-/g,`+`).replace(/_/g,`/`)+`=`),e=>e.charCodeAt(0)).length===32}catch{return!1}},`32 byte public key required`),f$=KN.string().refine(e=>Array.from(e).length>=1&&Array.from(e).length<=80,`name length 1–80 Unicode characters`);KN.strictObject({purpose:KN.literal(`client_login`),kind:KN.enum([`native`,`web`]),requesterDeviceId:u$,identityKey:d$,proofKey:d$,claimSecretHash:d$,challenge:d$,displayName:f$}),KN.strictObject({deviceId:u$,identityKey:d$,proofKey:d$,method:KN.literal(`POST`),path:KN.string().max(512).regex(/^\/api\/v1\/[a-z0-9/-]+$/),transactionId:u$,requestBodyHash:d$});var p$=KN.strictObject({nonce:u$,issuedAt:KN.number().int(),signature:KN.string().regex(/^[A-Za-z0-9_-]{86}$/)});KN.strictObject({payload:KN.record(KN.string(),KN.unknown()),proof:p$}),KN.strictObject({decision:KN.enum([`approve`,`deny`]),payloadHash:d$}),KN.strictObject({claimSecret:d$,verifier:KN.string().regex(/^[A-Za-z0-9_-]{43,128}$/)}),KN.strictObject({hostId:u$,challenge:d$,requestId:u$,clientKey:d$,hostKey:d$,capabilities:KN.array(KN.enum([`rpc`,`events`,`files`,`rtc`,`wss`])).max(5)});var m$=KN.record(KN.string(),KN.string().max(8192)).refine(e=>Object.keys(e).every(e=>[`accept`,`content-type`,`if-none-match`].includes(e.toLowerCase())),`untrusted headers rejected`);KN.strictObject({version:KN.literal(1),streamId:KN.number().int().min(1),seq:KN.number().int().min(0),type:KN.literal(`request.open`),method:KN.enum([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`]),path:KN.string().max(2048).regex(/^\/api\/(?!\/)[^\\#]*$/),headers:m$,operationId:u$.optional(),deadline:KN.number().int()}),KN.string().min(1).max(128);var h$=class extends Error{constructor(e,t=400,n=!1){super(e),this.code=e,this.status=t,this.retryable=n}code;status;retryable};function g$(e){if(typeof RTCPeerConnection>`u`)throw new h$(`RTC_UNAVAILABLE`,503);return new RTCPeerConnection(e)}var _$=[{value:`auto`,label:`自动(推荐)`},{value:`p2p`,label:`仅 P2P 直连`},{value:`turn`,label:`仅 TURN 加密转发`},{value:`wss`,label:`仅加密中继`},{value:`lan`,label:`仅局域网直连`}],v$=`yaovi-remote-path`;function y$(){try{let e=localStorage.getItem(v$);return e===`p2p`||e===`turn`||e===`wss`||e===`lan`?e:`auto`}catch{return`auto`}}function b$(e){try{e===`auto`?localStorage.removeItem(v$):localStorage.setItem(v$,e)}catch{}}var x$=e=>e===`auto`||e===`lan`?void 0:e,S$=(e,t)=>`yaovi-lan-v1:${e}:${t}`,C$=e=>`yaovi-hosts-v1:${e}`;function w$(e,t){try{let n=localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}function T$(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function E$(e,t,n){if(!Array.isArray(n))return;let r=n.filter(e=>typeof e?.address==`string`&&Number.isInteger(e?.port)).filter(e=>{try{return AA(e),!0}catch{return!1}}).slice(0,8);r.length&&T$(S$(e,t),r)}function D$(e,t){T$(C$(e),t.filter(e=>typeof e?.id==`string`&&!e.upgradeRequired).map(e=>({id:e.id,name:String(e.name??``).slice(0,80)})))}function O$(e){return w$(C$(e),[])}function k$(e){try{for(let t of Object.keys(localStorage))(t===C$(e)||t.startsWith(`yaovi-lan-v1:${e}:`)||t.startsWith(`yaovi-trust-v1:${e}:`))&&localStorage.removeItem(t)}catch{}}function A$(e){let t=window.yaoviDesktop.lan,n=crypto.randomUUID(),r=0,i={readyState:0,get bufferedAmount(){return r},onopen:null,onclose:null,onerror:null,onmessage:null,send(e){if(r+=e.length,r>4194304)throw Error(`SLOW_CONSUMER`);t.socketSend(n,e).catch(()=>i.onerror?.({})).finally(()=>r-=e.length)},close(){i.readyState!==3&&(i.readyState=3,t.socketClose(n).catch(()=>{}),a(),i.onclose?.({}))}},a=t.onSocket(e=>{e.id===n&&(e.type===`open`&&(i.readyState=1,i.onopen?.({})),e.type===`message`&&i.onmessage?.({data:e.data}),e.type===`error`&&i.onerror?.({}),e.type===`close`&&i.close())});return t.socketOpen(n,e).catch(()=>{i.readyState=3,a(),i.onerror?.({}),i.onclose?.({})}),i}var j$=()=>!!window.yaoviDesktop?.lan;async function M$(e,t,n){if(!j$()||!t.hostDeviceId)throw Error(`LAN_UNAVAILABLE`);let r=w$(S$(e.deviceId,t.hostId),[]),i=await window.yaoviDesktop.lan.discover(await kA(t.hostId)).catch(()=>[]),a=[...new Set([...r,...i].flatMap(e=>{try{return[AA(e)]}catch{return[]}}))].slice(0,8);if(!a.length)throw Error(`LAN_HOST_NOT_FOUND`);let o=a.map(r=>LA(A$(r),t,e,n));try{let e=await Promise.any(o);for(let t of o)t.then(t=>t!==e&&t.close(),()=>{});return e}catch(e){throw e instanceof AggregateError&&e.errors.find(e=>e instanceof Error&&/UNAUTHORIZED|IDENTITY|KEY_|TRUST_|SECURITY_CONTEXT_CHANGED/.test(e.message))||Error(`LAN_HOST_NOT_FOUND`)}}var N$=`https://auth.samien.cn`,$=y({signedIn:!1,accountId:``,busy:!1,error:``,hosts:[],connecting:``,connectionState:`closed`,selectedHostId:``,offline:!1});function P$(e){let t=e;return typeof t?.status==`number`&&t.status>0?t.status>=500:!/IDENTITY|KEY_|TRUST_|LOGIN_REQUIRED|UNAUTHORIZED|SESSION_REVOKED|SECURITY_CONTEXT_CHANGED|HOST_UPGRADE_REQUIRED|HOST_PAUSED|DEVICE_REVOKED|登录需要重新验证|请先登录/.test(t?.message??``)}var F$,I$,L$,R$=0,z$,B$,V$=0,H$,U$=0,W$=0,G$=()=>`yaovi-selected-host:`+B$+`:`+F$?.keys.deviceId;function K$(){return $.signedIn?localStorage.getItem(G$()):null}function q$(){U$++,V$++,H$=void 0,Q$()?.cancelLogin().catch(()=>{})}function J$(e=!0){W$++,z$?.close(),z$=void 0,I$?.close(),I$=void 0,Tj(),$.selectedHostId=``,$.connectionState=`closed`,e&&F$&&localStorage.removeItem(G$())}async function Y$(e,t){let n=F$,r=++W$,i=localStorage.getItem(`yaovi-trust-v1:`+n.keys.deviceId+`:`+e),a;try{await u1(),a=await lj(n,e,i?JSON.parse(i):void 0)}catch(e){if(!i||!j$()||!(P$(e)||e?.message===`HOST_OFFLINE`))throw e;a=JSON.parse(i)}if(r!==W$||F$!==n)throw Error(`SECURITY_CONTEXT_CHANGED`);await f1(t,a)}var X$={HOST_UPGRADE_REQUIRED:`这台服务器需要在本机「设置 → 远程访问」升级为账号授权`,HOST_PAUSED:`这台服务器已暂停远程访问`,HOST_OFFLINE:`这台服务器当前离线`,HOST_AUTHORIZATION_TIMEOUT:`服务器暂未响应授权,请稍后重试`,HOST_AUTHORIZATION_DENIED:`服务器拒绝了此设备,请重新登录后重试`,LAN_HOST_NOT_FOUND:`无法连接云端,局域网中也没有找到这台服务器`,LAN_UNAUTHORIZED:`这台服务器已撤销此设备,请联网后重新登录`,LAN_UNAVAILABLE:`此设备尚未在线连接过这台服务器,请联网后先登录一次`};function Z$(e){let t=(e instanceof Error?e.message:``).replace(/^Error invoking remote method '[^']+': (?:\w*Error: )?/,``);return X$[t]??(t||`暂时无法连接服务器`)}var Q$=()=>[`file:`,`yaovi-app:`].includes(location.protocol)?window.yaoviDesktop?.cloud:void 0,$$=()=>document.cookie.split(`; `).find(e=>e.startsWith(`yaovi-csrf=`))?.slice(11)??``;function e1(e){let t=Q$(),n=crypto.randomUUID(),r=0,i={readyState:0,get bufferedAmount(){return r},onopen:null,onclose:null,onerror:null,onmessage:null,send(e){if(r+=e.length,r>4194304)throw Error(`SLOW_CONSUMER`);t.socketSend(n,e).catch(()=>i.onerror?.({})).finally(()=>r-=e.length)},close(){i.readyState=3,t.socketClose(n).catch(()=>{}),a()}},a=t.onSocket(e=>{e.id===n&&(e.type===`open`&&(i.readyState=1,i.onopen?.({})),e.type===`message`&&i.onmessage?.({data:e.data}),e.type===`error`&&i.onerror?.({}),e.type===`close`&&(i.readyState=3,a(),i.onclose?.({})))});return t.socketOpen(n).catch(()=>{i.readyState=3,a(),i.onerror?.({}),i.onclose?.({})}),i}async function t1(e){if(!e.session)return!1;let t=Q$(),n=async(e,n)=>{let r=new URL(String(e)),i=new Headers(n?.headers);if(r.origin!==`https://auth.samien.cn`)throw Error(`UNTRUSTED_AUTH_ORIGIN`);let a=await t.request(r.pathname,{method:n?.method,body:n?.body,idempotencyKey:i.get(`idempotency-key`)??void 0});return new Response(a.body,{status:a.status,headers:a.headers})},r=uA(e.device);return(!F$||B$!==e.session.accountId||F$.keys.deviceId!==r.deviceId)&&(z$?.close(),z$=void 0,Tj(),$.hosts=[],$.signedIn=!1,F$=new cA(N$,r,n)),B$=e.session.accountId,$.accountId=B$,F$.accessToken=e.session.accessToken,R$=Date.parse(e.session.expiresAt),!0}function n1(){if(H$)return H$;let e=r1().finally(()=>{H$===e&&(H$=void 0)});return H$=e,e}async function r1(){let e=V$,t=()=>{if(e!==V$)throw Error(`SECURITY_CONTEXT_CHANGED`)};if(Q$()){let e=await Q$().view();if(t(),!e.session)return!1;await t1(e);try{R$<Date.now()+12e4&&await u1()}catch(e){if(!P$(e))throw e;return t(),$.offline=!0,$.signedIn=!0,$.hosts=O$(F$.keys.deviceId),!0}}else{if(location.origin!==`https://auth.samien.cn`)return!1;let e=await fetch(`https://auth.samien.cn/api/v1/me`,{credentials:`include`}).then(e=>{if(!e.ok)throw Error(`LOGIN_REQUIRED`);return e.json()});t();let n=await dA({accountId:e.accountId,deviceId:e.deviceId});if(t(),!F$||B$!==e.accountId||F$.keys.deviceId!==n.deviceId){z$?.close(),z$=void 0,Tj(),$.hosts=[],$.signedIn=!1,F$=new cA(N$,n,void 0,$$,!0);let r=await F$.attachBrowser();t(),R$=Date.parse(r.expiresAt),B$=e.accountId,$.accountId=B$}else await u1()}return t(),$.signedIn=!0,await c1(),!0}async function i1(){let e=++V$,t=++U$;if(H$=void 0,window.yaoviDesktop?.cloud&&!Q$())return window.yaoviDesktop.cloud.open();if(Q$()){let n=await Q$().login();if(e!==V$||t!==U$)throw Error(`SECURITY_CONTEXT_CHANGED`);await t1(n),localStorage.removeItem(G$()),$.signedIn=!0,await c1()}else location.assign(`https://auth.samien.cn/auth/start`)}async function a1(){if(await s1(),window.yaoviDesktop?.cloud&&!Q$())throw await window.yaoviDesktop.cloud.open(),Error(`请在客户端扫码页面继续`);if(Q$())return Q$().qrCreate();if(location.origin!==`https://auth.samien.cn`)throw location.assign(`https://auth.samien.cn/login?tab=qr`),Error(`正在打开扫码登录`);return L$=new sA(N$,void 0,`web`,()=>dA({fresh:!0})),L$.create()}async function o1(){let e=U$,t=V$,n=Q$()?await Q$().qrStatus():await L$.status();if(n.state===`approved`){if(e!==U$||t!==V$)throw Error(`LOGIN_CANCELLED`);if(Q$()){let n=await Q$().qrClaim();if(e!==U$||t!==V$)throw Error(`LOGIN_CANCELLED`);await t1(n),localStorage.removeItem(G$())}else await L$.claim(),await n1();return $.signedIn=!0,await c1(),`claimed`}return n.state}async function s1(){U$++;let e=L$;L$=void 0,await e?.cancel().catch(()=>{}),await Q$()?.qrCancel().catch(()=>{})}async function c1(){let e=F$,t=V$;if(!e)throw Error(`LOGIN_REQUIRED`);let n;try{n=await e.json(`/api/v1/hosts`)}catch(n){if(!P$(n))throw n;if(F$!==e||t!==V$)throw Error(`SECURITY_CONTEXT_CHANGED`);$.offline=!0,$.hosts=O$(e.keys.deviceId);return}if(F$!==e||t!==V$)throw Error(`SECURITY_CONTEXT_CHANGED`);$.offline=!1,$.hosts=n.hosts,D$(e.keys.deviceId,n.hosts)}var l1;function u1(){let e=F$;if(!e)return Promise.reject(Error(`LOGIN_REQUIRED`));if(l1?.api===e)return l1.promise;let t={api:e,promise:d1()};return l1=t,t.promise.finally(()=>{l1===t&&(l1=void 0)}).catch(()=>{}),t.promise}async function d1(){if(R$>Date.now()+12e4)return;let e=F$,t=V$;if(!e)throw Error(`LOGIN_REQUIRED`);let n=()=>{if(F$!==e||t!==V$)throw Error(`SECURITY_CONTEXT_CHANGED`)};if(Q$()){let t=await Q$().refresh();if(n(),!t.session)throw Error(`LOGIN_REQUIRED`);e.accessToken=t.session.accessToken,R$=Date.parse(t.session.expiresAt)}else{let t=await e.attachBrowser();n(),R$=Date.parse(t.expiresAt)}}async function f1(e,t){$.busy=!0,$.error=``;try{localStorage.setItem(`yaovi-trust-v1:`+F$.keys.deviceId+`:`+t.hostId,JSON.stringify(t)),z$?.close();let n=F$,r=W$,i;z$=new sj(async a=>{if(F$!==n||!$.signedIn||r!==W$)throw Error(`SECURITY_CONTEXT_CHANGED`);let o=y$(),s,c,l=()=>{c?.close(),s?.close()};a.addEventListener(`abort`,l,{once:!0});try{let u;if(o===`lan`)u=await M$(n.keys,t,a);else try{if(await u1(),a.aborted||F$!==n||r!==W$)throw Error(`SECURITY_CONTEXT_CHANGED`);s=new hA(n,`client`,Q$()?e1:void 0),I$=s,await s.connect(),u=await DA(n,s,t,e=>g$(e),{refresh:u1,signal:a,force:x$(o)}),$.offline=!1}catch(e){s?.close(),s=void 0;let r=e?.message;if(o!==`auto`||a.aborted||!j$()||!(P$(e)||r===`HOST_OFFLINE`))throw e;u=await M$(n.keys,t,a),$.offline=r!==`HOST_OFFLINE`}if(a.aborted||F$!==n||r!==W$)throw u.close(),Error(`SECURITY_CONTEXT_CHANGED`);c=u;let d=await vj(u,{hostId:t.hostId,deviceId:n.keys.deviceId,ownerId:i});if(i=d.ownerId,E$(n.keys.deviceId,t.hostId,d.lanEndpoints),a.aborted||F$!==n||r!==W$)throw d(),Error(`SECURITY_CONTEXT_CHANGED`);return $.selectedHostId=t.hostId,localStorage.setItem(G$(),t.hostId),await e(),{value:u,onClose:e=>u.transport.onClose(e),close(){a.removeEventListener(`abort`,l),l()}}}catch(e){throw a.removeEventListener(`abort`,l),l(),e}},(e,t)=>{r===W$&&($.connectionState=e,mj.setTransport(e),e===`ready`?$.error=``:e===`failed`&&($.error=Z$(t)))}),await z$.start()}finally{$.busy=!1}}function p1(e){b$(e),z$?.current?.close()}async function m1(){F$&&(localStorage.removeItem(G$()),k$(F$.keys.deviceId)),U$++,W$++,V$++,H$=void 0,z$?.close(),z$=void 0,I$?.close(),I$=void 0,Tj();try{Q$()?await Q$().logout():await F$?.json(`/api/v1/logout`,{})}finally{F$=void 0,B$=void 0,$.accountId=``,$.signedIn=!1,$.offline=!1,$.hosts=[]}}var h1=0;function g1(){!F$||!$.signedIn||document.visibilityState!==`visible`||Date.now()-h1<6e4||(h1=Date.now(),F$.user(`/api/v1/activity`,F$.keys.deviceId,{}).catch(()=>{}))}if(typeof window<`u`){let e=()=>{document.visibilityState===`visible`&&z$&&z$.verify(Ej).catch(()=>{})};window.addEventListener(`online`,e),window.addEventListener(`focus`,e),window.addEventListener(`yaovi-remote-stream-interrupted`,e),document.addEventListener(`visibilitychange`,e),window.addEventListener(`pointerdown`,g1,{passive:!0}),window.addEventListener(`keydown`,g1)}function _1(e){return e instanceof Error?e.message:`认证请求失败`}var v1=Jn(`auth`,()=>{let e=k(`checking`),t=k(),n=0,r=0,i=k(),a=Te(()=>t.value?.displayName||i.value?.displayName||i.value?.username||`服务器`),o=k(``),s=k(),c=k(!0),l=k(!1),u=k(!1),d=k(),f=Te(()=>e.value===`authenticated`);function p(e){t.value?.serverId===e.serverId&&t.value.revision>e.revision||(t.value?.serverId!==e.serverId||t.value.revision!==e.revision||t.value.name!==e.name||t.value.displayName!==e.displayName)&&(t.value=e)}async function m(){if(!f.value)return;let e=++n,t=i.value?.id;try{let r=await RN();e===n&&f.value&&i.value?.id===t&&p(r)}catch{}}let h=LN(e=>{f.value&&p(e)}),g=()=>{m()};typeof window<`u`&&window.addEventListener(`focus`,g),C(()=>{h(),typeof window<`u`&&window.removeEventListener(`focus`,g)});function _(t){t.serverIdentity&&p(t.serverIdentity),c.value=t.authRequired,o.value=t.csrfToken,l.value=!!t.groupUploadsEnabled,u.value=!!t.upstreamReady,d.value=t.upstreamError,i.value=t.user??(t.authRequired?void 0:{id:`local`,username:`本机 Yaovi`,role:`local`}),e.value=i.value?`authenticated`:`anonymous`,s.value=void 0}function v(){r++,mj.expire(),e.value=`expired`,i.value=void 0,t.value=void 0,n++,o.value=``,wN()}ON(v);async function y(){let t=++r;mj.synchronize(),e.value=`checking`,s.value=void 0;try{let e=await VN();t===r&&_(e)}catch(n){if(t!==r)return;n instanceof gN&&[401,403].includes(n.status)?e.value=`anonymous`:e.value=`error`,s.value=_1(n),i.value=void 0}}function ee(){J$(),v(),e.value=`anonymous`}async function te(){if(mj.synchronize(),Oj()){await m1().catch(()=>{}),v(),e.value=`anonymous`;return}try{await HN()}catch{}await window.yaoviDesktop?.forgetLogin?.(),e.value=`anonymous`,i.value=void 0,t.value=void 0,n++,o.value=``,wN();try{_(await VN())}catch{e.value=`anonymous`}}async function b(e){i.value=await UN(e)}return{serverIdentity:t,accountDisplayName:a,acceptServerIdentity:p,refreshServerIdentity:m,status:e,user:i,csrfToken:o,error:s,authRequired:c,groupUploadsEnabled:l,upstreamReady:u,upstreamError:d,isAuthenticated:f,bootstrap:y,logout:te,switchHost:ee,updateAccountAvatar:b,expire:v}}),y1=Jn(`theme`,()=>{let e=localStorage.getItem(`yaovi:theme`),t=k(e===`light`||e===`dark`?e:`system`),r=window.matchMedia(`(prefers-color-scheme: dark)`),i=k(r.matches),a=e=>{i.value=e.matches};r.addEventListener(`change`,a),n(()=>r.removeEventListener(`change`,a));let o=Te(()=>t.value===`system`?i.value?`dark`:`light`:t.value);function s(e){t.value=e,e===`system`?localStorage.removeItem(`yaovi:theme`):localStorage.setItem(`yaovi:theme`,e)}function c(){s(o.value===`dark`?`light`:`dark`)}return{theme:t,resolvedTheme:o,setTheme:s,toggle:c}}),b1={class:`login-shell`},x1={class:`login-bar`},S1=[`aria-label`],C1={class:`login-panel`,"aria-labelledby":`unified-login-title`},w1={id:`unified-login-title`},T1={class:`subtitle`},E1=[`aria-selected`,`tabindex`],D1=[`aria-selected`,`tabindex`],O1={id:`account-panel`,class:`tab-panel`,role:`tabpanel`,"aria-labelledby":`account-tab`},k1={class:`note`},A1=[`disabled`],j1={key:0,viewBox:`0 0 24 24`,"aria-hidden":`true`},M1={id:`qr-panel`,class:`tab-panel`,role:`tabpanel`,"aria-labelledby":`qr-tab`},N1=[`src`],P1={key:1,class:`qr-state`},F1={key:2,class:`qr-state`},I1={class:`hint`},L1=[`disabled`],R1=[`href`],z1={key:1,class:`signed-in`},B1={key:0,class:`banner`},V1={key:1,class:`empty`},H1={key:2,class:`host-list`},U1=[`disabled`,`onClick`],W1={class:`host-state`},G1={key:3,class:`hint`},K1={class:`actions`},q1=[`disabled`],J1=[`disabled`],Y1={key:2,class:`banner`},X1={key:3,class:`banner banner--error`,role:`alert`},Z1=Ce(D({__name:`LoginView`,setup(e){let t=v1(),r=y1(),i=k(!1),a=k(`account`),o=k(``),d=k(``),f=k(0),p=k(Date.now()),g=k(``),_=!!window.yaoviDesktop,y=Te(()=>Math.max(0,Math.ceil((f.value-p.value)/1e3))),ee=e=>e.upgradeRequired?{tone:`warn`,text:`需在主机上升级`}:$.offline?{tone:`lan`,text:`局域网直连`}:e.remoteEnabled===!1?{tone:`warn`,text:`已暂停`}:e.online?{tone:`on`,text:`在线`}:{tone:`off`,text:`离线`},te=0,b=0,x,S,C=!1;async function T(e){let t=++te;$.error=``,$.busy=!0;try{await e()}catch(e){t===te&&($.error=Z$(e))}finally{t===te&&($.busy=!1)}}function ne(){b++,clearTimeout(x),o.value=``,d.value=``,s1()}async function D(){if(ne(),!_){g.value=`请在 Yaovi 桌面客户端或手机 App 中扫码登录`;return}let e=b;i.value=!1,g.value=`正在生成二维码…`;try{let t=await a1();if(C||e!==b||a.value!==`qr`){s1();return}f.value=Date.parse(t.expiresAt),d.value=t.approveUrl,o.value=await EM.toDataURL(t.approveUrl,{width:220,margin:2}),g.value=``,x=setTimeout(()=>void re(e),2e3)}catch(t){e===b&&(i.value=!0,g.value=Z$(t)||`二维码生成失败`)}}async function re(e){if(!(C||e!==b))try{let t=await o1();if(C||e!==b)return;if(t===`claimed`){ne();return}if(t!==`pending`){i.value=!0,g.value=`二维码已失效`,o.value=``;return}x=setTimeout(()=>void re(e),2e3)}catch{e===b&&(i.value=!0,g.value=`暂时无法连接,请刷新重试`,o.value=``)}}function ie(e){e!==a.value&&(te++,$.busy=!1,$.error=``,ne(),q$(),[`file:`,`yaovi-app:`].includes(location.protocol)&&window.yaoviDesktop?.cloud?.cancelLogin().catch(()=>{}),a.value=e,e===`qr`&&D())}function ae(){te++,$.busy=!1,q$(),[`file:`,`yaovi-app:`].includes(location.protocol)&&window.yaoviDesktop?.cloud?.cancelLogin().catch(()=>{})}function oe(e){if([`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key)){e.preventDefault();let t=e.key===`Home`?`account`:e.key===`End`||a.value===`account`?`qr`:`account`;ie(t),document.getElementById(t+`-tab`)?.focus()}}return h(()=>{S=setInterval(()=>{p.value=Date.now(),f.value&&p.value>f.value&&o.value&&(ne(),i.value=!0,g.value=`二维码已过期`)},1e3),T(async()=>{if(await n1()){let e=K$();e&&await Y$(e,()=>t.bootstrap())}})}),n(()=>{C=!0,ne(),clearInterval(S)}),u(()=>$.signedIn,e=>{e&&ne()}),(e,n)=>(c(),A(`main`,b1,[O(`header`,x1,[n[6]||=O(`span`,{class:`login-brand`},[O(`img`,{src:`/brand/AppIcon-1024.png`,alt:``,class:`login-logo`}),w(`Yaovi`)],-1),O(`button`,{type:`button`,class:`icon-button`,"aria-label":j(r).resolvedTheme===`dark`?`切换浅色主题`:`切换深色主题`,onClick:n[0]||=e=>j(r).toggle()},[De(sN,{name:j(r).resolvedTheme===`dark`?`sun`:`moon`,size:20},null,8,[`name`])],8,S1)]),O(`section`,C1,[n[14]||=O(`img`,{src:`/brand/AppIcon-1024.png`,alt:``,class:`login-logo login-hero`},null,-1),O(`h1`,w1,v(j($).signedIn?`我的 Yaovi`:`登录 Yaovi`),1),O(`p`,T1,v(j($).signedIn?`选择要进入的服务器`:`连接你的服务器,继续工作`),1),j($).signedIn?(c(),A(`div`,z1,[j($).offline?(c(),A(`p`,B1,` 当前无法连接云端。同一局域网内,已授权过的服务器仍可直接进入。 `)):ve(``,!0),j($).hosts.length?(c(),A(`div`,H1,[(c(!0),A(E,null,m(j($).hosts,e=>(c(),A(`button`,{key:e.id,type:`button`,class:`host`,disabled:j($).busy||e.upgradeRequired,onClick:n=>T(()=>j(Y$)(e.id,()=>j(t).bootstrap()))},[O(`span`,{class:s([`dot`,`dot--`+ee(e).tone]),"aria-hidden":`true`},null,2),O(`strong`,null,v(e.name),1),O(`span`,W1,v(ee(e).text),1),De(sN,{name:`chevron-right`,size:18})],8,U1))),128))])):(c(),A(`div`,V1,[De(sN,{name:`monitor`,size:26}),n[10]||=O(`strong`,null,`还没有 Yaovi 服务器`,-1),n[11]||=O(`small`,null,`在服务器本机「设置 → 远程访问」生成绑定码,再到 auth.samien.cn 绑定。`,-1)])),j($).hosts.some(e=>e.upgradeRequired)?(c(),A(`p`,G1,` “需在主机上升级”的服务器:在那台电脑本机打开 Yaovi →「设置 → 远程访问」→ 升级为账号授权。 `)):ve(``,!0),O(`div`,K1,[O(`button`,{type:`button`,class:`link`,disabled:j($).busy,onClick:n[4]||=e=>T(j(c1))},[De(sN,{name:`refresh`,size:15}),n[12]||=w(`刷新列表 `,-1)],8,q1),O(`button`,{type:`button`,class:`link`,disabled:j($).busy,onClick:n[5]||=e=>T(j(m1))},[De(sN,{name:`logout`,size:15}),n[13]||=w(`退出账号 `,-1)],8,J1)])])):(c(),A(E,{key:0},[O(`div`,{class:`login-tabs`,role:`tablist`,"aria-label":`登录方式`,onKeydown:oe},[O(`button`,{id:`account-tab`,type:`button`,role:`tab`,"aria-selected":a.value===`account`,tabindex:a.value===`account`?0:-1,"aria-controls":`account-panel`,onClick:n[1]||=e=>ie(`account`)},` 密码登录 `,8,E1),O(`button`,{id:`qr-tab`,type:`button`,role:`tab`,"aria-selected":a.value===`qr`,tabindex:a.value===`qr`?0:-1,"aria-controls":`qr-panel`,onClick:n[2]||=e=>ie(`qr`)},` 扫码登录 `,8,D1)],32),l(O(`section`,O1,[O(`div`,k1,[De(sN,{name:`globe`,size:22}),O(`span`,null,[O(`strong`,null,v(j($).busy?`请在浏览器中完成登录`:`在浏览器中安全登录`),1),O(`small`,null,v(_?`打开 Yaovi 登录页输入账号和密码,完成后会自动回到这里。`:`请在 Yaovi 桌面客户端或手机 App 中登录;浏览器不能直接进入其他服务器。`),1)])]),O(`button`,{type:`button`,class:`primary`,disabled:j($).busy||!_,onClick:n[3]||=e=>T(j(i1))},[O(`span`,null,v(j($).busy?`等待浏览器完成登录…`:`登录`),1),j($).busy?ve(``,!0):(c(),A(`svg`,j1,[...n[7]||=[O(`path`,{d:`M5 12h14m-6-6 6 6-6 6`},null,-1)]]))],8,A1),j($).busy?(c(),A(`button`,{key:0,type:`button`,class:`link`,onClick:ae},`取消`)):ve(``,!0)],512),[[dt,a.value===`account`]]),l(O(`section`,M1,[O(`div`,{class:s([`qr-frame`,{"qr-frame--muted":!o.value}])},[o.value?(c(),A(`img`,{key:0,src:o.value,alt:`Yaovi 登录二维码`,width:`196`,height:`196`},null,8,N1)):i.value?(c(),A(`span`,P1,[De(sN,{name:`refresh`,size:22}),w(` `+v(g.value),1)])):(c(),A(`span`,F1,v(g.value),1))],2),n[9]||=O(`ol`,{class:`qr-steps`},[O(`li`,null,[O(`b`,null,`1`),w(`用手机相机扫描二维码`)]),O(`li`,null,[O(`b`,null,`2`),w(`在打开的页面确认登录`)])],-1),O(`p`,I1,[o.value?(c(),A(E,{key:0},[w(v(y.value)+` 秒后失效 · `,1)],64)):ve(``,!0),O(`button`,{type:`button`,class:`link`,disabled:j($).busy,onClick:D},`刷新二维码`,8,L1),d.value?(c(),A(E,{key:1},[n[8]||=w(` · `,-1),O(`a`,{href:d.value,target:`_blank`,rel:`noopener noreferrer`},`在本机打开授权页`,8,R1)],64)):ve(``,!0)])],512),[[dt,a.value===`qr`]])],64)),j($).connectionState===`reconnecting`?(c(),A(`p`,Y1,`连接已中断,正在安全重连…`)):ve(``,!0),j($).error?(c(),A(`p`,X1,v(j($).error),1)):ve(``,!0)]),n[15]||=O(`footer`,{class:`login-foot`},`本机服务器可用时自动进入,无需登录`,-1)]))}}),[[`__scopeId`,`data-v-255c142f`]]),Q1=()=>({total:0,bot:0,chat:0,conversations:[]}),$1=()=>{let e=k(Q1()),t=k(``),n=k(``),r=0,i=0,a,o;function s(s=``){r++,i++,n.value=s,e.value=Q1(),t.value=``,o=void 0,clearInterval(a),a=void 0}function c(r){e.value=r,t.value=``,window.yaoviDesktop?.unreadState?.(n.value).catch(()=>{})}async function l(){if(!n.value)return;if(o)return o;let e=r,a=i,s=jN(`/api/app/unread`).then(t=>{e===r&&a===i&&c(t)}).catch(n=>{e===r&&a===i&&(t.value=n instanceof Error?n.message:`未读同步失败`)});o=s;try{await s}finally{o===s&&(o=void 0)}}function u(e){s(e),window.yaoviDesktop?.unreadState?.(e).catch(()=>{}),l(),a=setInterval(()=>void l(),3e3)}async function d(e){let t=r,a=n.value,s=++i;o=void 0;let u=await jN(`/api/app/unread/read`,{method:`POST`,body:JSON.parse(JSON.stringify({items:e.map(({mode:e,id:t,profile:n,messages:r})=>({mode:e,id:t,profile:n,messages:r}))}))});if(t===r&&a===n.value){if(s===i){c(u);return}i++,o=void 0,await l()}}async function f(t,r,i,a){if(!a.length||!n.value)return;let o=e.value.conversations.find(e=>e.mode===t&&e.id===r&&(t===`bot`||e.profile===i));if(!o)return;let s=new Set(a),c=o.messages.filter(e=>s.has(e.id));c.length&&await d([{...o,messages:c}])}let p=Te(()=>e.value.total);return y({snapshot:e,total:p,error:t,reset:s,start:u,refresh:l,read:d,visible:f})},e0,t0=()=>e0??=$1(),n0=`yaovi-identity`,r0=`yaovi-avatar:v2:`,i0=[`circle`,`square`,`triangle`,`ellipse`,`capsule`,`hexagon`,`cloud`,`droplet`],a0=[`circle`,`ellipse`,`square`,`capsule`,`triangle`,`hexagon`,`cloud`,`droplet`],o0=[`idle`,`happy`,`curious`,`drowsy`,`working`,`thinking`,`listening`,`sleeping`,`suspicious`,`proud`],s0=[`cursor`,`blob`,`circle`,`squircle`,`capsule`,`drop`,`shield`,`hexagon`,`diamond`,`star`],c0={cursor:`光标`,blob:`软团`,circle:`圆球`,squircle:`圆角块`,capsule:`胶囊体`,drop:`液滴`,shield:`盾牌`,hexagon:`六边体`,diamond:`菱形`,star:`星星`},l0={idle:`默认`,happy:`开心`,curious:`好奇`,drowsy:`困倦`,working:`工作`,thinking:`思考`,listening:`倾听`,sleeping:`睡眠`,suspicious:`疑惑`,proud:`自豪`},u0=[`#000000`,`#94643a`,`#ff2d45`,`#ff6b00`,`#ff9900`,`#00c875`,`#00b9ac`,`#1488ff`,`#9655f7`,`#f52ba5`,`#808080`],d0={"#000000":`黑色`,"#94643a":`棕色`,"#ff2d45":`红色`,"#ff6b00":`橙色`,"#ff9900":`金黄色`,"#00c875":`绿色`,"#00b9ac":`青绿色`,"#1488ff":`蓝色`,"#9655f7":`紫色`,"#f52ba5":`粉色`,"#808080":`灰色`},f0=[`circle`,`rounded`,`square`],p0=/^data:image\/(png|jpeg|webp);base64,[A-Za-z0-9+/]+={0,2}$/i,m0=/^yaovi-mascot:v1:(circle|square|triangle|ellipse|capsule|hexagon|cloud|droplet):([0-9a-f]{6}):(friendly|focused|curious|calm)$/i;function h0(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function g0(e){return typeof e==`string`?e.trim().replace(/\s+/g,` `).slice(0,100):``}function _0(e){return typeof e==`string`&&e.length<=28e5&&p0.test(e)}function v0(e,t){return{version:2,displayName:g0(t)||g0(e)||`default`,avatarMode:`mascot`,shape:`circle`,color:`#00c875`,expression:`idle`,bodyId:null,imageCrop:`rounded`}}function y0(e,t,n=Math.random){let r=v0(e,t),i=i0.length+s0.length,a=Math.min(i-1,Math.max(0,Math.floor(n()*i)));return a<i0.length?r.shape=i0[a]:r.bodyId=s0[a-i0.length],r.color=u0[Math.min(u0.length-1,Math.max(0,Math.floor(n()*u0.length)))],r.expression=o0[Math.min(o0.length-1,Math.max(0,Math.floor(n()*o0.length)))],r}function b0(e){return e.version!==2||![`mascot`,`image`].includes(String(e.avatarMode))||!i0.includes(e.shape)||typeof e.color!=`string`||!/^#[0-9a-f]{6}$/i.test(e.color)||!o0.includes(e.expression)||e.bodyId!=null&&!s0.includes(e.bodyId)||e.imageCrop!=null&&!f0.includes(e.imageCrop)||e.imageDataURL!=null&&!_0(e.imageDataURL)||e.avatarMode===`image`&&!_0(e.imageDataURL)?null:{version:2,displayName:g0(e.displayName),avatarMode:e.avatarMode,shape:e.shape,color:e.color.toLowerCase(),expression:e.expression,bodyId:e.bodyId??null,imageCrop:e.imageCrop??`rounded`,...e.imageDataURL?{imageDataURL:e.imageDataURL}:{}}}function x0(e){if(!e||e.length>2804096)return null;if(_0(e))return{...v0(``),avatarMode:`image`,imageDataURL:e};if(m0.test(e))return v0(``);if(!e.startsWith(`yaovi-avatar:v2:`))return null;try{return b0(h0(JSON.parse(e.slice(16))))}catch{return null}}function S0(e){let t=b0({...e,version:2,bodyId:e.bodyId??null,imageCrop:e.imageCrop??`rounded`});if(!t)throw Error(`无效的头像设置`);let{displayName:n,...r}=t;return r0+JSON.stringify(r)}function C0(e){let t=h0(h0(e.ui_meta)[n0]),n={},r=g0(t.display_name)||g0(n.title)||g0(e.display_name)||g0(e.displayName)||g0(e.description)||g0(e.name),i=v0(g0(e.name),r),a=_0(t.image_data_url)?t.image_data_url:_0(n.avatar)?n.avatar:void 0;return t.version===2?b0({version:2,displayName:r,avatarMode:t.avatar_mode,shape:t.shape,color:t.color,expression:t.expression,bodyId:t.body_id,imageCrop:t.image_crop,imageDataURL:t.image_data_url})??i:{...i,...a?{imageDataURL:a,avatarMode:t.avatar_mode===`image`||!Object.keys(t).length?`image`:`mascot`}:{}}}var w0={source:{project:`LaoA-GrokBot`,commit:`527c3b5746bed34da3a6d4f9747e483c84534a41`,license:`MIT`},faceBox:228.541,shapes:{circle:{path:`M228.541 114.228 C228.541 130.133 225.184 145.994 218.738 160.534 C212.674 174.217 203.904 186.669 193.065 196.988 C155.933 232.34 99.497 238.596 55.5255 212.24 C45.097 205.99 35.6851 198.072 27.7451 188.866 C19.1926 178.953 12.3686 167.569 7.65781 155.351 C2.60712 142.264 0 128.257 0 114.228 C0 98.3219 3.35751 82.4611 9.80315 67.9215 C15.8672 54.2382 24.6377 41.7862 35.4767 31.4668 C72.6081 -3.88483 129.044 -10.1413 173.016 16.2153 C183.444 22.4653 192.856 30.3829 200.796 39.5896 C209.349 49.5018 216.173 60.8859 220.883 73.1037 C225.934 86.1906 228.541 100.198 228.541 114.228 Z`,bounds:[0,-18e-6,228.541,228.455006],viewport:[0,-.043015,228.541,228.541],anchor:[120,122.5,1]},square:{path:`M55 10 C55 10 174 10 174 10 C204 10 219 25 219 55 C219 55 219 174 219 174 C219 204 204 219 174 219 C174 219 55 219 55 219 C25 219 10 204 10 174 C10 174 10 55 10 55 C10 25 25 10 55 10 Z`,bounds:[10,10,209,209],viewport:[10,10,209,209],anchor:[120,122.5,1]},triangle:{path:`M114 9 C119.333333 9 124 13 128 21 C128 21 220 194 220 194 C224.666667 204.666667 220.333333 210 207 210 C207 210 21 210 21 210 C7.666667 210 3.666667 204.666667 9 194 C9 194 101 21 101 21 C104.333333 13 108.666667 9 114 9 Z`,bounds:[6.714286,9,215.100529,201],viewport:[6.714286,1.949736,215.100529,215.100529],anchor:[114.2705,135,.648232]},capsule:{path:`M61 31 C61 31 168 31 168 31 C202 31 220 65 220 114 C220 163 202 197 168 197 C168 197 61 197 61 197 C27 197 9 163 9 114 C9 65 27 31 61 31 Z`,bounds:[9,31,211,166],viewport:[9,8.5,211,211],anchor:[120,122.5,.857243]},hexagon:{path:`M114 5 C114 5 207 58 207 58 C214.333333 62 218 68.666667 218 78 C218 78 218 153 218 153 C218 162.333333 214.333333 169 207 173 C207 173 128 218 128 218 C118.666667 223.333333 109.333333 223.333333 100 218 C100 218 21 173 21 173 C13.666667 169 10 162.333333 10 153 C10 153 10 78 10 78 C10 68.666667 13.666667 62 21 58 C21 58 100 12 100 12 C109.333333 7.333333 114 5 114 5 Z`,bounds:[10,5,208,217],viewport:[5.5,5,217,217],anchor:[120,122.5,.903046]},cloud:{path:`M55 188 C21 188 6 169 12 142 C-1 113 20 86 51 84 C61 48 96 35 124 55 C151 28 195 46 195 82 C226 91 235 128 213 149 C214 174 193 190 165 188 Z`,bounds:[8.084666,42,217.061825,146.168243],viewport:[8.084666,6.553209,217.061825,217.061825],anchor:[114.2705,125,.723114]},droplet:{path:`M114 5 C137 42 202 103 202 151 C202 196 165 222 114 222 C63 222 26 196 26 151 C26 103 91 42 114 5 Z`,bounds:[26,5,176,217],viewport:[5.5,5,217,217],anchor:[114.2705,140,.799557]},ellipse:{path:`M222.2705 114.2705 C222.2705 162.87156 173.91726 202.2705 114.2705 202.2705 C54.62374 202.2705 6.2705 162.87156 6.2705 114.2705 C6.2705 65.66944 54.62374 26.2705 114.2705 26.2705 C173.91726 26.2705 222.2705 65.66944 222.2705 114.2705 Z`,bounds:[6.2705,26.2705,216,176],viewport:[6.2705,6.2705,216,216],anchor:[120,122.5,.849079]}},bodies:{cursor:{path:`M68.1612 9.8302 C68.831234 10.393712 69.501706 10.956705 70.172633 11.519154 C71.473231 12.612873 72.76878 13.712192 74.06094 14.815863 C76.21486 16.652222 78.406422 18.440939 80.600998 20.228405 C83.254447 22.393239 85.896206 24.572195 88.538851 26.750193 C90.735631 28.560646 92.933229 30.37007 95.133429 32.176365 C99.342117 35.633384 103.532995 39.10744 107.680527 42.637645 C109.992566 44.600401 112.351114 46.496137 114.728083 48.37919 C116.894556 50.12803 119.009216 51.935729 121.128942 53.740692 C123.047682 55.370493 124.985481 56.967974 126.959082 58.531476 C129.61943 60.639025 132.205397 62.825128 134.789056 65.025134 C136.707796 66.654935 138.645595 68.252416 140.619196 69.815918 C142.936319 71.651561 145.198846 73.542032 147.449253 75.458139 C150.11596 77.727456 152.814417 79.944432 155.557626 82.121157 C161.253424 86.684046 166.859244 91.359265 172.416574 96.089395 C174.728943 98.052453 177.087826 99.948479 179.465145 101.83181 C181.631618 103.58065 183.746278 105.388349 185.866004 107.193312 C187.784744 108.823113 189.722543 110.420594 191.696144 111.984096 C208.585019 125.429073 208.585019 125.429073 209.674343 134.041422 C210.226056 141.247584 209.259036 147.105107 204.76234 152.964438 C200.997198 157.019206 196.301874 160.965349 190.536607 161.358328 C190.12914 161.360617 189.721672 161.362907 189.301858 161.365266 C188.830866 161.369363 188.359874 161.37346 187.874609 161.377681 C187.107301 161.380009 187.107301 161.380009 186.324492 161.382385 C185.78139 161.386356 185.238289 161.390328 184.67873 161.39442 C183.499146 161.402761 182.319553 161.409826 181.139955 161.41577 C179.26633 161.425543 177.392774 161.439348 175.519183 161.454313 C170.191725 161.496252 164.864237 161.531864 159.536702 161.562474 C156.276035 161.581492 153.015446 161.606046 149.754843 161.63386 C148.518472 161.6433 147.282083 161.650652 146.045687 161.65578 C130.20765 161.722366 116.122166 163.77051 104.110929 175.187933 C101.273668 178.121188 98.933382 181.49907 96.535284 184.790091 C94.662461 187.338038 92.727917 189.838936 90.804324 192.348625 C87.653746 196.478727 84.525937 200.625264 81.412995 204.783783 C80.679154 205.76131 79.945264 206.738801 79.211323 207.716254 C77.794563 209.603742 76.386941 211.497599 74.984297 213.395594 C69.969699 220.137131 65.038901 226.744542 56.28284 228.392024 C48.307097 228.902538 41.854814 228.332827 35.49571 222.995722 C30.438415 218.155733 27.895411 212.353431 27.550951 205.403539 C27.516173 204.72367 27.481395 204.043802 27.445563 203.343331 C27.409792 202.59961 27.374022 201.855889 27.337167 201.089631 C27.297125 200.290022 27.256889 199.490422 27.216475 198.690832 C27.106207 196.497924 26.998722 194.304888 26.891687 192.111821 C26.776145 189.754577 26.657993 187.397464 26.540178 185.040333 C26.257518 179.374261 25.978905 173.707992 25.700605 168.041705 C25.569689 165.378314 25.438309 162.714946 25.306921 160.051579 C25.267717 159.256766 25.267717 159.256766 25.227721 158.445896 C25.174698 157.370935 25.121674 156.295974 25.068649 155.221013 C24.934589 152.503119 24.800566 149.785224 24.666585 147.067326 C24.639839 146.524792 24.613094 145.982258 24.585539 145.423284 C24.421628 142.097243 24.258108 138.771183 24.094845 135.44511 C23.405243 121.398569 22.698924 107.352996 21.97623 93.308121 C21.647065 86.90534 21.32378 80.50226 21.001302 74.09914 C20.742868 68.972682 20.479546 63.846522 20.210069 58.720633 C20.026397 55.217973 19.848861 51.715035 19.676035 48.211823 C19.576841 46.205016 19.474106 44.198564 19.36572 42.192221 C18.094317 18.580052 18.094317 18.580052 25.380544 8.865083 C37.931636 -4.997317 55.481838 -1.008206 68.1612 9.8302 Z`,bounds:[18.726874,-.006974,191.087499,228.548177],viewport:[-.003465,-.006974,228.548177,228.548177],anchor:[85.54,106.35,.602064]},blob:{path:`M224.983261 131.323825 C224.292417 141.255635 222.108097 150.893986 218.430311 160.23888 C214.752513 169.583774 209.758683 178.157057 203.44881 185.958716 C197.138937 193.760376 189.908636 200.513829 181.757895 206.219074 C173.607154 211.924319 164.930375 216.53186 155.727535 220.041676 C146.524706 223.551492 137.060895 225.983984 127.33609 227.339175 C117.611297 228.694354 107.829598 228.906726 97.990993 227.976301 C88.152377 227.045865 78.556952 224.841324 69.204705 221.362678 C59.852458 217.884033 51.183259 213.113434 43.197107 207.050904 C35.210955 200.988374 28.337451 193.876956 22.576572 185.71665 C16.815703 177.556332 12.373567 168.799125 9.250187 159.445017 C6.126807 150.090909 4.240551 140.582561 3.59142 130.919983 C2.942288 121.257394 3.319669 111.695919 4.72355 102.235569 C6.127431 92.775219 8.450855 83.519274 11.693833 74.467736 C14.936812 65.416197 19.171671 56.727981 24.39841 48.403085 C29.625161 40.078178 35.931494 32.489174 43.317409 25.636072 C50.703335 18.782969 59.023589 13.174878 68.278206 8.81182 C77.532823 4.448762 87.258252 1.704589 97.454516 0.579289 C107.650768 -0.54601 117.71241 -0.04363 127.639443 2.08644 C137.566475 4.21651 146.900283 7.63901 155.640866 12.353941 C164.38145 17.068871 172.362404 22.648493 179.583742 29.092806 C186.805067 35.537108 193.27785 42.5778 199.002079 50.21487 C204.726307 57.851941 209.647459 66.009331 213.765546 74.68704 C217.883632 83.364761 220.955485 92.490691 222.981106 102.064852 C225.006715 111.639014 225.674104 121.392005 224.983261 131.323825 Z`,bounds:[3.283553,-.004194,221.963248,228.548633],viewport:[-.00914,-.004194,228.548633,228.548633],anchor:[111.22,116.58,.791]},circle:{path:`M228.541 114.2705 C228.541 177.380349 177.380349 228.541 114.2705 228.541 C51.160651 228.541 0 177.380349 0 114.2705 C0 51.160651 51.160651 0 114.2705 0 C177.380349 0 228.541 51.160651 228.541 114.2705 Z`,bounds:[0,0,228.541,228.541],viewport:[0,0,228.541,228.541],anchor:[113.82,110.27,.791]},squircle:{path:`M57.13525 0 C95.225413 0 133.315587 0 171.40575 0 C202.96068 0 228.541 25.58032 228.541 57.13525 C228.541 95.225413 228.541 133.315587 228.541 171.40575 C228.541 202.96068 202.96068 228.541 171.40575 228.541 C133.315587 228.541 95.225413 228.541 57.13525 228.541 C25.58032 228.541 0 202.96068 0 171.40575 C0 133.315587 0 95.225413 0 57.13525 C0 25.58032 25.58032 0 57.13525 0 Z`,bounds:[0,0,228.541,228.541],viewport:[0,0,228.541,228.541],anchor:[111.78,111.79,.791]},capsule:{path:`M114.2705 0 C161.602895 0 199.973375 38.37048 199.973375 85.702875 C199.973375 104.747962 199.973375 123.793038 199.973375 142.838125 C199.973375 190.17052 161.602895 228.541 114.2705 228.541 C66.938105 228.541 28.567625 190.17052 28.567625 142.838125 C28.567625 123.793038 28.567625 104.747962 28.567625 85.702875 C28.567625 38.37048 66.938105 0 114.2705 0 Z`,bounds:[28.567625,0,171.40575,228.541],viewport:[0,0,228.541,228.541],anchor:[113.82,131.68,.791]},drop:{path:`M114.2705 0.000038 C185.942819 88.616781 206.158088 118.155696 206.158088 136.653374 C206.158088 187.401487 165.018613 228.540962 114.2705 228.540962 C63.522387 228.540962 22.382912 187.401487 22.382912 136.653374 C22.382912 118.155696 42.598181 88.616781 114.2705 0.000038 Z`,bounds:[22.382912,38e-6,183.775176,228.540924],viewport:[38e-6,38e-6,228.540924,228.540924],anchor:[112.47,138.8,.791]},shield:{path:`M60.220991 24.322358 C96.253997 -8.107347 132.287003 -8.107347 168.320009 24.322358 C182.412922 72.57709 196.505823 120.831809 210.598736 169.08654 C226.453259 208.722847 214.562367 228.541 174.92606 228.541 C134.489024 228.541 94.051976 228.541 53.61494 228.541 C13.978633 228.541 2.087741 208.722847 17.942264 169.08654 C32.035177 120.831809 46.128078 72.57709 60.220991 24.322358 Z`,bounds:[11.147468,79e-6,206.246063,228.540921],viewport:[39e-6,79e-6,228.540921,228.540921],anchor:[112.38,170.61,.663994]},hexagon:{path:`M108.24241 1.740183 C112.261137 -0.58003 116.279863 -0.58003 120.29859 1.740183 C149.769246 18.755072 179.239913 35.769974 208.710568 52.784863 C212.729295 55.105076 214.738658 58.585395 214.738658 63.22582 C214.738658 97.255611 214.738658 131.285389 214.738658 165.31518 C214.738658 169.955605 212.729295 173.435924 208.710568 175.756137 C179.239913 192.771026 149.769246 209.785928 120.29859 226.800817 C116.279863 229.12103 112.261137 229.12103 108.24241 226.800817 C78.771754 209.785928 49.301087 192.771026 19.830432 175.756137 C15.811705 173.435924 13.802342 169.955605 13.802342 165.31518 C13.802342 131.285389 13.802342 97.255611 13.802342 63.22582 C13.802342 58.585395 15.811705 55.105076 19.830432 52.784863 C49.301087 35.769974 78.771754 18.755072 108.24241 1.740183 Z`,bounds:[13.802342,23e-6,200.936316,228.540954],viewport:[23e-6,23e-6,228.540954,228.540954],anchor:[112.26,110.7,.791]},diamond:{path:`M107.202223 3.534153 C111.914408 -1.178032 116.626592 -1.178032 121.338777 3.534153 C155.894804 38.09018 190.45082 72.646196 225.006847 107.202223 C229.719032 111.914408 229.719032 116.626592 225.006847 121.338777 C190.45082 155.894804 155.894804 190.45082 121.338777 225.006847 C116.626592 229.719032 111.914408 229.719032 107.202223 225.006847 C72.646196 190.45082 38.09018 155.894804 3.534153 121.338777 C-1.178032 116.626592 -1.178032 111.914408 3.534153 107.202223 C38.09018 72.646196 72.646196 38.09018 107.202223 3.534153 Z`,bounds:[14e-6,14e-6,228.540972,228.540972],viewport:[14e-6,14e-6,228.540972,228.540972],anchor:[112.53,109.95,.784132]},star:{path:`M114.2705 5.592764 C127.21806 27.822355 140.16562 50.051946 153.113192 72.281524 C178.255798 77.726075 203.398404 83.170613 228.541023 88.615152 C211.400445 107.798347 194.259868 126.98153 177.119291 146.164714 C179.710718 171.75921 182.302145 197.353707 184.89356 222.948216 C161.352544 212.574478 137.811516 202.200751 114.2705 191.827025 C90.729484 202.200751 67.188456 212.574478 43.64744 222.948216 C46.238855 197.353707 48.830282 171.75921 51.421709 146.164714 C34.281132 126.98153 17.140555 107.798347 -0.000023 88.615152 C25.142596 83.170613 50.285202 77.726075 75.427808 72.281524 C88.37538 50.051946 101.32294 27.822355 114.2705 5.592764 Z`,bounds:[-23e-6,5.592764,228.541046,217.355452],viewport:[-23e-6,-33e-6,228.541046,228.541046],anchor:[113.82,125.43,.629299]}},expressions:[[[[130.36,45.98],[132.71,46.19],[134.98,46.81],[137.11,47.83],[138.97,49.28],[140.47,51.09],[141.68,53.12],[142.73,55.23],[143.76,57.36],[144.78,59.49],[145.79,61.62],[146.79,63.76],[147.76,65.91],[148.71,68.07],[149.63,70.25],[150.52,72.43],[151.37,74.63],[151.99,76.91],[152.1,79.26],[151.64,81.57],[150.59,83.68],[149.04,85.45],[147.1,86.78],[144.9,87.62],[142.56,87.93],[140.22,87.71],[137.98,86.99],[135.93,85.82],[134.17,84.24],[132.78,82.34],[131.69,80.25],[130.77,78.08],[129.87,75.89],[128.94,73.72],[128,71.56],[127.03,69.4],[126.05,67.26],[125.05,65.12],[124.03,62.99],[122.93,60.9],[121.87,58.79],[121.03,56.59],[120.72,54.26],[121.1,51.93],[122.15,49.83],[123.75,48.1],[125.76,46.89],[128.01,46.19]],[[176.61,37.08],[178.72,37.59],[180.7,38.48],[182.52,39.65],[184.2,41.03],[185.71,42.59],[187.03,44.31],[188.2,46.14],[189.26,48.03],[190.27,49.96],[191.26,51.89],[192.23,53.84],[193.16,55.8],[194.05,57.78],[194.92,59.77],[195.74,61.78],[196.53,63.8],[197.27,65.84],[197.97,67.9],[198.47,70.01],[198.63,72.18],[198.4,74.33],[197.58,76.33],[195.95,77.72],[193.83,78.08],[191.71,77.65],[189.76,76.69],[188.03,75.38],[186.53,73.82],[185.28,72.05],[184.25,70.13],[183.4,68.14],[182.63,66.11],[181.87,64.07],[181.07,62.05],[180.25,60.04],[179.39,58.05],[178.49,56.07],[177.57,54.1],[176.61,52.15],[175.62,50.22],[174.59,48.31],[173.53,46.41],[172.54,44.48],[171.86,42.42],[171.76,40.26],[172.62,38.3],[174.45,37.19]]],[[[86.14,124.79],[89.16,124.92],[92.06,125.76],[94.68,127.27],[96.86,129.36],[98.48,131.92],[99.51,134.76],[100.12,137.73],[100.56,140.72],[101.01,143.72],[101.52,146.71],[102.06,149.69],[102.62,152.67],[103.2,155.64],[103.81,158.61],[104.44,161.57],[105.11,164.52],[105.81,167.47],[106.49,170.42],[106.72,173.44],[106.01,176.37],[104.37,178.9],[102.03,180.81],[99.26,181.99],[96.27,182.46],[93.25,182.25],[90.34,181.43],[87.65,180.04],[85.32,178.11],[83.51,175.7],[82.37,172.9],[81.66,169.96],[80.98,167],[80.32,164.05],[79.69,161.08],[79.08,158.12],[78.5,155.14],[77.94,152.16],[77.4,149.18],[76.89,146.2],[76.4,143.21],[75.93,140.21],[75.56,137.21],[75.7,134.19],[76.6,131.3],[78.22,128.76],[80.47,126.74],[83.18,125.4]],[[147.23,112.87],[150.24,113.13],[153.07,114.19],[155.53,115.94],[157.46,118.26],[158.73,121.01],[159.53,123.93],[160.21,126.88],[160.88,129.84],[161.52,132.8],[162.15,135.76],[162.74,138.73],[163.32,141.71],[163.87,144.69],[164.39,147.67],[164.9,150.66],[165.39,153.65],[165.8,156.65],[165.76,159.67],[164.98,162.59],[163.56,165.26],[161.61,167.58],[159.23,169.45],[156.52,170.77],[153.57,171.46],[150.55,171.4],[147.67,170.52],[145.19,168.79],[143.45,166.33],[142.57,163.44],[142.08,160.45],[141.61,157.46],[141.11,154.47],[140.59,151.48],[140.04,148.5],[139.47,145.53],[138.87,142.56],[138.25,139.59],[137.6,136.63],[136.94,133.68],[136.25,130.72],[135.59,127.77],[135.47,124.75],[136.07,121.78],[137.34,119.04],[139.19,116.65],[141.53,114.74],[144.26,113.44]]],[[[104.84,104.08],[109.39,104.89],[113.63,106.73],[117.32,109.5],[120.25,113.08],[122.22,117.25],[123.15,121.77],[122.92,126.39],[121.86,130.89],[120.61,135.35],[119.37,139.81],[118.15,144.27],[116.94,148.74],[115.74,153.21],[114.56,157.69],[113.39,162.17],[112.24,166.65],[111.13,171.15],[110.04,175.65],[108.89,180.13],[106.98,184.33],[103.8,187.67],[99.75,189.87],[95.25,190.93],[90.63,190.93],[86.11,189.97],[81.86,188.16],[78.05,185.54],[74.89,182.18],[72.62,178.16],[71.54,173.67],[71.94,169.08],[73.01,164.57],[74.13,160.08],[75.26,155.59],[76.42,151.11],[77.59,146.63],[78.77,142.15],[79.97,137.68],[81.18,133.22],[82.41,128.75],[83.65,124.29],[84.87,119.83],[86.33,115.43],[88.67,111.46],[91.9,108.15],[95.83,105.72],[100.23,104.35]],[[174.26,115.55],[178.59,116.54],[182.37,118.86],[185.31,122.2],[187.23,126.21],[188.12,130.57],[188.06,135.02],[187.52,139.44],[186.86,143.85],[186.11,148.25],[185.25,152.62],[184.3,156.98],[183.24,161.31],[182.07,165.61],[180.79,169.88],[179.39,174.12],[177.89,178.31],[176.27,182.47],[174.47,186.55],[172.17,190.35],[169.21,193.68],[165.73,196.46],[161.84,198.64],[157.66,200.16],[153.27,200.91],[148.83,200.69],[144.65,199.19],[141.47,196.14],[140.18,191.91],[140.82,187.53],[142.46,183.38],[144.16,179.26],[145.73,175.09],[147.18,170.87],[148.51,166.62],[149.73,162.33],[150.84,158.01],[151.84,153.67],[152.74,149.3],[153.54,144.91],[154.24,140.51],[154.85,136.1],[155.58,131.7],[156.93,127.46],[159.15,123.6],[162.12,120.29],[165.73,117.68],[169.84,116]]],[[[44.72,103.35],[47.95,103.93],[51.04,105.05],[53.93,106.62],[56.58,108.57],[58.97,110.83],[61.09,113.35],[62.93,116.07],[64.5,118.97],[65.79,121.99],[66.8,125.13],[67.52,128.34],[67.94,131.6],[68.08,134.89],[67.9,138.17],[67.4,141.42],[66.56,144.6],[65.33,147.66],[63.71,150.52],[61.69,153.11],[59.3,155.36],[56.54,157.16],[53.51,158.42],[50.29,159.07],[47,159.09],[43.76,158.5],[40.67,157.39],[37.78,155.82],[35.13,153.87],[32.75,151.6],[30.63,149.09],[28.78,146.36],[27.21,143.47],[25.92,140.44],[24.92,137.31],[24.2,134.1],[23.77,130.84],[23.64,127.55],[23.81,124.27],[24.31,121.01],[25.16,117.84],[26.38,114.78],[28,111.92],[30.02,109.33],[32.42,107.08],[35.17,105.28],[38.21,104.02],[41.43,103.37]],[[114.62,83.64],[118.31,83.88],[121.94,84.6],[125.44,85.77],[128.77,87.38],[131.86,89.4],[134.67,91.81],[137.13,94.56],[139.2,97.62],[140.85,100.93],[142.05,104.42],[142.79,108.05],[143.05,111.73],[142.83,115.42],[142.13,119.05],[140.95,122.55],[139.34,125.88],[137.3,128.96],[134.88,131.75],[132.11,134.2],[129.05,136.27],[125.75,137.93],[122.25,139.13],[118.63,139.86],[114.94,140.1],[111.25,139.86],[107.63,139.14],[104.12,137.97],[100.8,136.36],[97.7,134.34],[94.9,131.93],[92.44,129.18],[90.36,126.12],[88.72,122.81],[87.51,119.31],[86.78,115.69],[86.52,112.01],[86.74,108.32],[87.44,104.69],[88.61,101.18],[90.23,97.86],[92.27,94.78],[94.69,91.99],[97.45,89.54],[100.51,87.47],[103.82,85.81],[107.31,84.61],[110.94,83.88]]],[[[90.44,99.25],[93.11,99.26],[95.74,99.79],[98.37,100.3],[101,100.82],[103.64,101.33],[106.27,101.85],[108.9,102.37],[111.53,102.89],[114.16,103.41],[116.79,103.94],[119.42,104.47],[122.06,105],[124.69,105.53],[127.32,106.06],[129.94,106.6],[132.57,107.14],[135.2,107.68],[137.65,108.73],[139.5,110.65],[140.44,113.14],[140.36,115.81],[139.35,118.28],[137.48,120.18],[135,121.14],[132.32,121.11],[129.7,120.56],[127.08,120],[124.45,119.46],[121.82,118.93],[119.19,118.4],[116.56,117.87],[113.93,117.35],[111.29,116.83],[108.66,116.32],[106.02,115.82],[103.39,115.31],[100.76,114.79],[98.12,114.28],[95.49,113.75],[92.86,113.22],[90.23,112.68],[87.77,111.66],[85.93,109.74],[85.01,107.24],[85.06,104.57],[86.07,102.1],[87.96,100.22]],[[156.6,112.56],[158.91,112.66],[161.18,113.15],[163.45,113.64],[165.72,114.13],[167.99,114.62],[170.26,115.12],[172.53,115.62],[174.8,116.12],[177.07,116.62],[179.34,117.13],[181.6,117.64],[183.87,118.15],[186.14,118.67],[188.4,119.18],[190.67,119.7],[192.94,120.2],[195.12,120.96],[196.7,122.63],[197.45,124.82],[197.53,127.14],[197.07,129.41],[196.08,131.51],[194.49,133.18],[192.33,133.97],[190.04,133.68],[187.79,133.09],[185.52,132.57],[183.26,132.05],[180.99,131.54],[178.72,131.03],[176.45,130.53],[174.18,130.03],[171.91,129.54],[169.64,129.05],[167.37,128.56],[165.1,128.07],[162.83,127.58],[160.56,127.08],[158.29,126.57],[156.02,126.05],[153.9,125.14],[152.26,123.51],[151.32,121.4],[151.08,119.1],[151.53,116.82],[152.65,114.8],[154.41,113.31]]],[[[79.94,130.44],[83.08,130.57],[86.11,131.41],[88.89,132.89],[91.27,134.94],[93.15,137.46],[94.39,140.35],[95.11,143.42],[95.65,146.52],[96.2,149.62],[96.78,152.72],[97.39,155.81],[98.04,158.89],[98.72,161.97],[99.43,165.04],[100.18,168.1],[100.97,171.15],[101.81,174.18],[102.64,177.22],[103.01,180.34],[102.35,183.4],[100.66,186.04],[98.19,187.98],[95.28,189.16],[92.17,189.6],[89.03,189.37],[85.99,188.56],[83.16,187.2],[80.63,185.33],[78.55,182.97],[77.05,180.21],[76.1,177.21],[75.28,174.17],[74.5,171.11],[73.74,168.06],[73.02,164.99],[72.33,161.92],[71.68,158.83],[71.06,155.75],[70.47,152.65],[69.91,149.55],[69.37,146.45],[68.97,143.32],[69.12,140.18],[70.04,137.18],[71.7,134.51],[74.03,132.41],[76.86,131.04]],[[168.95,136.28],[171.31,136.97],[172.99,138.76],[173.66,141.13],[173.36,143.58],[172.24,145.79],[170.45,147.49],[168.22,148.58],[165.89,149.43],[163.57,150.31],[161.24,151.18],[158.9,152.02],[156.56,152.85],[154.21,153.65],[151.85,154.44],[149.48,155.2],[147.11,155.94],[144.73,156.65],[142.34,157.34],[139.95,158.01],[137.55,158.66],[135.14,159.27],[132.73,159.86],[130.31,160.43],[127.84,160.54],[125.53,159.69],[123.77,157.96],[122.89,155.66],[123.09,153.21],[124.36,151.09],[126.34,149.61],[128.69,148.83],[131.1,148.24],[133.51,147.62],[135.91,146.98],[138.31,146.32],[140.7,145.65],[143.08,144.95],[145.46,144.23],[147.83,143.49],[150.2,142.73],[152.56,141.95],[154.91,141.15],[157.25,140.32],[159.59,139.48],[161.92,138.61],[164.24,137.72],[166.54,136.78]]],[[[119.79,105.35],[121.94,105.42],[124.03,105.87],[126,106.72],[127.77,107.93],[129.27,109.47],[130.45,111.26],[131.29,113.23],[131.73,115.33],[131.79,117.47],[131.53,119.6],[131.11,121.71],[130.66,123.81],[130.27,125.92],[129.88,128.03],[129.49,130.14],[129.07,132.25],[128.62,134.35],[127.96,136.39],[126.96,138.29],[125.62,139.96],[123.99,141.36],[122.13,142.43],[120.11,143.15],[118,143.5],[115.85,143.45],[113.75,143],[111.79,142.15],[110.03,140.93],[108.54,139.38],[107.36,137.59],[106.53,135.61],[106.1,133.51],[106.07,131.37],[106.35,129.24],[106.77,127.14],[107.22,125.04],[107.64,122.93],[108.05,120.82],[108.45,118.71],[108.84,116.6],[109.25,114.49],[109.86,112.44],[110.83,110.52],[112.16,108.84],[113.78,107.44],[115.65,106.38],[117.67,105.68]],[[174.73,114.1],[176.71,114.59],[178.5,115.55],[180.04,116.88],[181.27,118.5],[182.17,120.33],[182.71,122.29],[182.9,124.32],[182.82,126.36],[182.56,128.38],[182.23,130.39],[181.89,132.4],[181.53,134.41],[181.16,136.41],[180.75,138.41],[180.3,140.4],[179.82,142.38],[179.18,144.31],[178.28,146.15],[177.14,147.83],[175.74,149.31],[174.11,150.53],[172.29,151.44],[170.32,151.97],[168.29,152.07],[166.29,151.69],[164.45,150.83],[162.87,149.54],[161.66,147.91],[160.83,146.06],[160.38,144.07],[160.29,142.04],[160.53,140.01],[160.98,138.02],[161.43,136.03],[161.84,134.04],[162.24,132.04],[162.62,130.03],[162.93,128.02],[163.24,126],[163.6,124],[164.11,122.03],[164.91,120.15],[165.99,118.43],[167.35,116.91],[168.94,115.64],[170.74,114.69],[172.7,114.15]]],[[[105.72,72.58],[108.82,72.78],[111.75,73.82],[114.27,75.64],[116.39,77.92],[118.42,80.29],[120.45,82.66],[122.47,85.03],[124.48,87.41],[126.49,89.8],[128.48,92.2],[130.47,94.6],[132.45,97.01],[134.43,99.42],[136.4,101.83],[138.37,104.25],[140.3,106.7],[141.85,109.39],[142.65,112.4],[142.63,115.51],[141.8,118.5],[140.21,121.17],[137.95,123.31],[135.17,124.7],[132.11,125.26],[129.02,124.98],[126.12,123.86],[123.67,121.94],[121.61,119.6],[119.66,117.17],[117.69,114.75],[115.73,112.33],[113.75,109.92],[111.77,107.52],[109.77,105.12],[107.77,102.73],[105.76,100.34],[103.75,97.96],[101.72,95.59],[99.68,93.23],[97.63,90.89],[95.91,88.3],[94.95,85.34],[94.92,82.24],[95.84,79.27],[97.56,76.68],[99.9,74.63],[102.67,73.22]],[[176.73,63.75],[179.52,64.43],[182.02,65.85],[184.15,67.78],[185.85,70.1],[187.08,72.7],[187.76,75.5],[187.76,78.37],[187.23,81.2],[186.58,84.01],[185.89,86.8],[185.16,89.59],[184.39,92.36],[183.59,95.13],[182.76,97.89],[181.88,100.64],[180.98,103.37],[180.02,106.09],[179.03,108.79],[177.99,111.48],[176.9,114.15],[175.5,116.66],[173.51,118.72],[171,120.11],[168.18,120.66],[165.34,120.29],[162.75,119.04],[160.62,117.12],[159.02,114.73],[158,112.04],[157.63,109.19],[157.98,106.34],[158.83,103.59],[159.86,100.9],[160.87,98.2],[161.85,95.49],[162.79,92.76],[163.7,90.03],[164.57,87.29],[165.41,84.53],[166.21,81.76],[166.98,78.99],[167.7,76.2],[168.38,73.4],[169,70.58],[169.79,67.82],[171.41,65.46],[173.88,64.03]]],[[[64.12,83.43],[66.69,84.08],[68.9,85.53],[70.57,87.6],[71.56,90.05],[71.86,92.69],[71.53,95.32],[70.55,97.78],[69.06,99.99],[67.36,102.03],[65.64,104.06],[63.95,106.11],[62.28,108.18],[60.63,110.27],[59,112.38],[57.41,114.5],[55.84,116.65],[54.29,118.82],[52.78,121],[51.31,123.22],[49.86,125.45],[48.42,127.69],[46.67,129.68],[44.36,130.96],[41.73,131.22],[39.22,130.38],[37.16,128.72],[35.64,126.55],[34.65,124.08],[34.2,121.46],[34.29,118.81],[34.94,116.24],[36.12,113.86],[37.54,111.61],[39.04,109.41],[40.54,107.21],[42.06,105.03],[43.61,102.87],[45.18,100.73],[46.79,98.6],[48.41,96.5],[50.07,94.42],[51.74,92.35],[53.45,90.31],[55.17,88.28],[56.94,86.3],[59.04,84.67],[61.48,83.65]],[[104.23,93.09],[106.97,93.77],[109.4,95.24],[111.32,97.31],[112.59,99.85],[113.4,102.57],[114.13,105.32],[114.87,108.06],[115.62,110.8],[116.37,113.54],[117.14,116.28],[117.9,119.02],[118.67,121.75],[119.45,124.49],[120.23,127.22],[121.03,129.95],[121.83,132.68],[122.6,135.41],[122.98,138.22],[122.57,141.02],[121.34,143.57],[119.44,145.67],[117.05,147.19],[114.34,148.04],[111.51,148.14],[108.77,147.45],[106.33,146.01],[104.38,143.96],[103.07,141.44],[102.21,138.73],[101.43,136],[100.65,133.27],[99.87,130.53],[99.09,127.8],[98.32,125.06],[97.55,122.33],[96.79,119.59],[96.04,116.85],[95.28,114.11],[94.53,111.37],[93.79,108.62],[93.05,105.88],[92.73,103.07],[93.18,100.27],[94.42,97.72],[96.32,95.62],[98.7,94.08],[101.4,93.21]]],[[[108.14,135.9],[111.13,136.06],[114.08,136.56],[116.95,137.39],[119.71,138.55],[122.31,140.03],[124.71,141.81],[126.86,143.89],[128.73,146.23],[130.27,148.8],[131.44,151.55],[132.22,154.44],[132.56,157.41],[132.47,160.4],[131.93,163.34],[130.96,166.17],[129.6,168.83],[127.87,171.28],[125.83,173.46],[123.51,175.35],[120.96,176.91],[118.23,178.13],[115.36,179],[112.42,179.52],[109.43,179.7],[106.44,179.54],[103.49,179.04],[100.62,178.21],[97.86,177.06],[95.26,175.58],[92.86,173.79],[90.71,171.71],[88.84,169.37],[87.3,166.81],[86.13,164.06],[85.35,161.17],[85.01,158.2],[85.11,155.21],[85.64,152.26],[86.61,149.43],[87.97,146.77],[89.7,144.33],[91.74,142.14],[94.06,140.25],[96.61,138.69],[99.34,137.47],[102.21,136.6],[105.15,136.08]],[[175.67,128.81],[177.16,128.85],[178.62,129.14],[180.01,129.67],[181.28,130.44],[182.41,131.42],[183.36,132.57],[184.12,133.85],[184.68,135.23],[185.05,136.68],[185.24,138.15],[185.27,139.64],[185.13,141.13],[184.85,142.59],[184.42,144.02],[183.85,145.4],[183.15,146.72],[182.33,147.96],[181.38,149.11],[180.32,150.16],[179.15,151.08],[177.88,151.87],[176.53,152.49],[175.1,152.91],[173.62,153.11],[172.13,153.07],[170.67,152.78],[169.28,152.24],[168.01,151.47],[166.88,150.49],[165.93,149.35],[165.18,148.06],[164.61,146.68],[164.24,145.24],[164.05,143.76],[164.02,142.27],[164.16,140.78],[164.44,139.32],[164.87,137.89],[165.44,136.51],[166.14,135.2],[166.96,133.95],[167.91,132.8],[168.97,131.75],[170.14,130.83],[171.4,130.04],[172.76,129.43],[174.19,129.01]]],[[[103.39,78.25],[106.56,78.38],[109.59,79.28],[112.29,80.94],[114.43,83.28],[115.86,86.1],[116.52,89.2],[116.32,92.37],[115.62,95.46],[114.86,98.55],[114.1,101.63],[113.36,104.72],[112.63,107.81],[111.91,110.91],[111.2,114.01],[110.51,117.1],[109.82,120.21],[109.16,123.31],[108.52,126.42],[107.84,129.53],[106.8,132.52],[105.04,135.16],[102.66,137.25],[99.81,138.63],[96.7,139.2],[93.54,138.96],[90.53,137.95],[87.87,136.24],[85.71,133.92],[84.21,131.13],[83.48,128.05],[83.5,124.88],[84,121.74],[84.7,118.64],[85.4,115.54],[86.08,112.44],[86.77,109.34],[87.48,106.24],[88.19,103.15],[88.92,100.05],[89.66,96.96],[90.41,93.88],[91.18,90.8],[91.95,87.71],[93.1,84.76],[94.95,82.19],[97.4,80.19],[100.28,78.86]],[[161.99,91.57],[165.07,92],[167.9,93.28],[170.32,95.23],[172.22,97.69],[173.49,100.53],[174.05,103.59],[173.93,106.7],[173.45,109.78],[172.9,112.85],[172.33,115.91],[171.71,118.97],[171.06,122.02],[170.38,125.06],[169.66,128.09],[168.91,131.12],[168.13,134.14],[167.33,137.15],[166.5,140.16],[165.58,143.14],[164.33,145.98],[162.5,148.5],[160.15,150.53],[157.38,151.95],[154.34,152.61],[151.24,152.43],[148.32,151.38],[145.83,149.52],[143.99,147.01],[142.95,144.08],[142.73,140.98],[143.25,137.91],[144.09,134.91],[144.94,131.91],[145.76,128.9],[146.54,125.89],[147.29,122.86],[148.01,119.83],[148.69,116.79],[149.34,113.74],[149.95,110.68],[150.54,107.62],[151.09,104.55],[151.6,101.47],[152.44,98.48],[154,95.79],[156.21,93.6],[158.94,92.12]]],[[[47.23,91.05],[51.61,92.47],[55.26,95.29],[57.96,99.03],[59.7,103.31],[60.56,107.85],[61.28,112.42],[62.11,116.97],[63.06,121.51],[64.11,126.01],[65.28,130.49],[66.56,134.94],[67.95,139.35],[69.44,143.73],[71.05,148.07],[72.77,152.37],[74.62,156.61],[76.52,160.83],[78.06,165.19],[78.52,169.78],[77.62,174.3],[75.2,178.22],[71.44,180.86],[66.96,181.91],[62.36,181.55],[57.99,180.06],[54.03,177.68],[50.59,174.58],[47.77,170.92],[45.62,166.83],[43.74,162.6],[41.96,158.33],[40.29,154.01],[38.72,149.66],[37.27,145.26],[35.93,140.83],[34.69,136.37],[33.56,131.88],[32.55,127.37],[31.65,122.83],[30.85,118.27],[30.2,113.69],[30.08,109.07],[30.85,104.51],[32.49,100.19],[35.01,96.32],[38.44,93.24],[42.64,91.35]],[[108.93,73.38],[113.76,73.6],[118.38,75.01],[122.49,77.56],[125.82,81.07],[128.1,85.34],[129.65,89.93],[131.04,94.58],[132.43,99.22],[133.82,103.87],[135.22,108.51],[136.6,113.16],[137.99,117.81],[139.36,122.46],[140.73,127.11],[142.13,131.76],[143.51,136.41],[144.82,141.08],[145.51,145.86],[144.91,150.66],[143.09,155.14],[140.17,158.99],[136.38,162.01],[132,164.05],[127.26,165.03],[122.42,164.86],[117.79,163.48],[113.67,160.95],[110.36,157.43],[108.17,153.11],[106.72,148.49],[105.36,143.83],[103.99,139.18],[102.62,134.53],[101.24,129.88],[99.87,125.23],[98.48,120.58],[97.09,115.93],[95.7,111.29],[94.29,106.64],[92.89,102],[91.49,97.36],[90.81,92.57],[91.38,87.77],[93.14,83.26],[96.02,79.37],[99.79,76.34],[104.18,74.32]]],[[[102.86,129.56],[106.39,129.96],[109.85,130.76],[113.21,131.94],[116.4,133.5],[119.39,135.42],[122.13,137.69],[124.56,140.28],[126.64,143.16],[128.33,146.29],[129.59,149.61],[130.37,153.08],[130.66,156.62],[130.43,160.16],[129.68,163.63],[128.42,166.96],[126.7,170.07],[124.54,172.89],[122.02,175.39],[119.18,177.52],[116.07,179.25],[112.76,180.54],[109.31,181.4],[105.78,181.82],[102.23,181.83],[98.7,181.42],[95.24,180.62],[91.88,179.44],[88.69,177.88],[85.7,175.96],[82.96,173.69],[80.53,171.1],[78.45,168.22],[76.76,165.1],[75.5,161.77],[74.72,158.31],[74.44,154.77],[74.67,151.22],[75.41,147.75],[76.67,144.42],[78.39,141.32],[80.55,138.49],[83.07,135.99],[85.91,133.86],[89.02,132.14],[92.33,130.84],[95.78,129.99],[99.31,129.56]],[[180.44,141.06],[183.61,141.1],[186.72,141.68],[189.66,142.86],[192.28,144.63],[194.43,146.96],[196,149.71],[197,152.72],[197.48,155.86],[197.51,159.03],[197.15,162.18],[196.43,165.27],[195.38,168.26],[194.07,171.15],[192.52,173.92],[190.74,176.55],[188.77,179.03],[186.6,181.35],[184.25,183.48],[181.74,185.41],[179.06,187.12],[176.23,188.56],[173.28,189.71],[170.21,190.52],[167.07,190.95],[163.9,190.91],[160.78,190.33],[157.84,189.15],[155.22,187.37],[153.08,185.04],[151.51,182.29],[150.51,179.28],[150.03,176.15],[150,172.98],[150.36,169.83],[151.07,166.74],[152.12,163.74],[153.43,160.85],[154.99,158.09],[156.76,155.46],[158.74,152.98],[160.91,150.66],[163.25,148.53],[165.77,146.59],[168.45,144.89],[171.27,143.45],[174.23,142.3],[177.29,141.48]]],[[[86.02,131.33],[88.42,131.69],[90.54,132.87],[92.12,134.71],[93.03,136.97],[93.17,139.39],[92.41,141.69],[90.78,143.48],[88.59,144.52],[86.19,144.97],[83.78,145.34],[81.37,145.72],[78.96,146.09],[76.54,146.45],[74.13,146.81],[71.72,147.16],[69.3,147.5],[66.88,147.84],[64.47,148.16],[62.05,148.47],[59.62,148.76],[57.2,149.03],[54.77,149.27],[52.34,149.49],[49.91,149.68],[47.53,149.28],[45.52,147.92],[44.04,145.99],[43.12,143.74],[42.85,141.32],[43.44,138.97],[45.04,137.17],[47.33,136.4],[49.76,136.2],[52.19,135.96],[54.62,135.7],[57.04,135.43],[59.46,135.15],[61.89,134.85],[64.31,134.54],[66.72,134.22],[69.14,133.89],[71.56,133.54],[73.97,133.19],[76.38,132.83],[78.79,132.45],[81.2,132.06],[83.61,131.67]],[[153.42,116.84],[155.92,117.69],[157.78,119.56],[158.72,122.03],[158.73,124.68],[157.84,127.18],[156.08,129.15],[153.71,130.33],[151.13,131],[148.55,131.65],[145.98,132.32],[143.4,132.98],[140.82,133.63],[138.23,134.27],[135.65,134.9],[133.06,135.53],[130.47,136.15],[127.88,136.76],[125.29,137.36],[122.69,137.94],[120.09,138.51],[117.49,139.06],[114.88,139.59],[112.27,140.1],[109.62,140.12],[107.17,139.14],[105.28,137.29],[104.18,134.88],[104.06,132.23],[105.03,129.78],[106.92,127.93],[109.35,126.87],[111.96,126.34],[114.57,125.8],[117.17,125.24],[119.77,124.67],[122.37,124.09],[124.96,123.5],[127.56,122.9],[130.15,122.29],[132.74,121.68],[135.32,121.05],[137.91,120.41],[140.49,119.76],[143.07,119.11],[145.65,118.44],[148.22,117.76],[150.78,117.03]]],[[[83.36,65.84],[86.61,66.42],[89.57,67.88],[92,70.12],[93.67,72.97],[94.46,76.17],[94.31,79.47],[93.61,82.71],[92.8,85.92],[92.02,89.14],[91.27,92.36],[90.56,95.6],[89.88,98.84],[89.23,102.09],[88.62,105.34],[88.03,108.61],[87.51,111.88],[87.01,115.15],[86.5,118.42],[85.65,121.62],[84.11,124.54],[81.9,126.99],[79.13,128.79],[75.98,129.8],[72.68,129.91],[69.47,129.13],[66.6,127.49],[64.24,125.18],[62.49,122.38],[61.42,119.25],[61.08,115.97],[61.36,112.67],[61.87,109.4],[62.45,106.13],[63.01,102.87],[63.61,99.61],[64.24,96.36],[64.9,93.11],[65.6,89.87],[66.33,86.64],[67.09,83.42],[67.89,80.2],[68.73,77],[69.89,73.9],[71.7,71.14],[74.1,68.86],[76.93,67.16],[80.07,66.12]],[[119.49,99.16],[121.99,99.28],[124.44,99.82],[126.9,100.34],[129.36,100.86],[131.81,101.38],[134.27,101.91],[136.72,102.44],[139.17,102.98],[141.62,103.52],[144.08,104.07],[146.52,104.62],[148.97,105.18],[151.42,105.74],[153.86,106.31],[156.31,106.89],[158.75,107.47],[161.2,108.02],[163.49,109.03],[165.16,110.87],[165.95,113.24],[165.87,115.74],[164.94,118.05],[163.17,119.8],[160.79,120.55],[158.31,120.29],[155.88,119.65],[153.44,119.06],[150.99,118.49],[148.55,117.92],[146.1,117.36],[143.65,116.81],[141.2,116.26],[138.75,115.73],[136.29,115.2],[133.84,114.67],[131.38,114.15],[128.93,113.62],[126.47,113.1],[124.02,112.57],[121.56,112.04],[119.11,111.5],[116.81,110.53],[115.08,108.73],[114.22,106.39],[114.29,103.9],[115.28,101.61],[117.12,99.93]]],[[[168.71,85.67],[170.73,86],[172.64,86.75],[174.37,87.85],[175.88,89.24],[177.11,90.88],[178.04,92.71],[178.71,94.65],[179.21,96.64],[179.64,98.65],[180.05,100.66],[180.45,102.67],[180.83,104.69],[181.18,106.71],[181.5,108.74],[181.77,110.78],[181.88,112.82],[181.71,114.87],[181.22,116.86],[180.41,118.74],[179.27,120.45],[177.83,121.91],[176.12,123.03],[174.2,123.74],[172.16,123.99],[170.13,123.75],[168.21,123.04],[166.49,121.93],[165.03,120.48],[163.88,118.79],[163.02,116.93],[162.49,114.95],[162.17,112.92],[161.85,110.89],[161.51,108.87],[161.14,106.84],[160.77,104.83],[160.37,102.81],[159.96,100.8],[159.52,98.79],[159.24,96.76],[159.3,94.71],[159.71,92.7],[160.48,90.8],[161.58,89.08],[163.01,87.61],[164.73,86.49],[166.67,85.83]],[[206.57,78.24],[208.3,78.8],[209.77,79.87],[210.99,81.22],[212.01,82.73],[212.85,84.34],[213.53,86.03],[214.08,87.77],[214.54,89.54],[214.95,91.31],[215.34,93.09],[215.7,94.88],[216.04,96.67],[216.36,98.46],[216.64,100.26],[216.89,102.07],[217.11,103.88],[217.25,105.7],[217.26,107.52],[217.1,109.33],[216.75,111.12],[216.16,112.84],[215.3,114.44],[214.04,115.75],[212.34,116.35],[210.58,115.96],[209.11,114.89],[207.97,113.48],[207.1,111.88],[206.44,110.18],[205.97,108.42],[205.62,106.63],[205.35,104.83],[205.11,103.02],[204.85,101.22],[204.55,99.42],[204.22,97.63],[203.87,95.84],[203.49,94.05],[203.09,92.28],[202.67,90.5],[202.32,88.71],[202.1,86.91],[202.1,85.08],[202.32,83.28],[202.77,81.51],[203.54,79.86],[204.82,78.59]]],[[[39.78,104.3],[42.64,105.01],[45.03,106.74],[46.73,109.15],[47.75,111.93],[48.35,114.83],[48.81,117.76],[49.31,120.68],[49.87,123.6],[50.48,126.5],[51.15,129.39],[51.86,132.27],[52.63,135.13],[53.44,137.98],[54.3,140.82],[55.19,143.65],[56.13,146.46],[57.1,149.26],[58.1,152.05],[58.86,154.92],[58.96,157.87],[58.18,160.72],[56.43,163.09],[53.84,164.48],[50.9,164.62],[48.08,163.75],[45.58,162.16],[43.51,160.05],[41.89,157.57],[40.67,154.87],[39.67,152.08],[38.73,149.26],[37.81,146.44],[36.94,143.61],[36.11,140.76],[35.34,137.9],[34.61,135.03],[33.92,132.14],[33.28,129.24],[32.7,126.34],[32.16,123.42],[31.67,120.5],[31.23,117.57],[31.14,114.61],[31.65,111.69],[32.74,108.94],[34.47,106.54],[36.89,104.86]],[[108.97,125.73],[111.9,126.2],[114.63,127.37],[117,129.16],[118.84,131.49],[119.99,134.23],[120.32,137.18],[119.85,140.11],[118.59,142.8],[116.78,145.16],[114.84,147.42],[112.89,149.67],[110.93,151.92],[108.97,154.16],[107.01,156.39],[105.03,158.62],[103.05,160.85],[101.07,163.06],[99.07,165.28],[97.09,167.5],[95.09,169.71],[93.05,171.88],[90.69,173.67],[87.89,174.66],[84.93,174.81],[82.02,174.22],[79.31,173],[76.92,171.24],[74.99,168.98],[73.7,166.3],[73.26,163.37],[73.74,160.45],[75.2,157.86],[77.17,155.63],[79.18,153.43],[81.18,151.23],[83.17,149.02],[85.16,146.8],[87.14,144.58],[89.11,142.35],[91.08,140.11],[93.04,137.87],[95,135.63],[96.95,133.38],[98.89,131.12],[100.87,128.89],[103.25,127.12],[106.02,126.04]]],[[[115.43,87.59],[118.19,88.24],[120.69,89.59],[122.69,91.59],[124.03,94.09],[124.63,96.87],[124.41,99.7],[123.7,102.45],[122.9,105.18],[122.12,107.92],[121.34,110.65],[120.57,113.39],[119.79,116.13],[119.02,118.87],[118.25,121.61],[117.48,124.35],[116.72,127.09],[115.97,129.83],[115.23,132.58],[114.45,135.32],[113.3,137.91],[111.49,140.09],[109.13,141.65],[106.41,142.48],[103.58,142.56],[100.82,141.91],[98.33,140.54],[96.33,138.53],[94.99,136.03],[94.38,133.26],[94.57,130.43],[95.25,127.67],[96.02,124.93],[96.79,122.19],[97.55,119.45],[98.31,116.7],[99.08,113.96],[99.85,111.22],[100.62,108.49],[101.4,105.75],[102.18,103.01],[102.95,100.27],[103.74,97.54],[104.51,94.8],[105.68,92.21],[107.5,90.04],[109.88,88.5],[112.59,87.67]],[[155.37,78.64],[158.04,79.15],[160.48,80.37],[162.53,82.16],[164.33,84.22],[166.1,86.3],[167.85,88.4],[169.58,90.51],[171.29,92.64],[172.98,94.78],[174.65,96.94],[176.3,99.12],[177.92,101.32],[179.51,103.54],[181.06,105.79],[182.57,108.07],[184.03,110.37],[185.2,112.83],[185.77,115.5],[185.73,118.23],[185.07,120.87],[183.8,123.28],[181.94,125.26],[179.57,126.6],[176.89,127.03],[174.24,126.43],[171.99,124.92],[170.26,122.8],[168.75,120.53],[167.22,118.27],[165.66,116.03],[164.07,113.81],[162.45,111.6],[160.82,109.41],[159.16,107.25],[157.47,105.1],[155.76,102.97],[154.03,100.85],[152.28,98.76],[150.51,96.68],[148.74,94.6],[147.29,92.29],[146.49,89.69],[146.36,86.97],[146.94,84.31],[148.23,81.91],[150.19,80.02],[152.66,78.89]]],[[[92.71,76.24],[95.76,76.59],[98.73,77.35],[101.56,78.53],[104.21,80.08],[106.63,81.96],[108.78,84.16],[110.61,86.62],[112.09,89.31],[113.19,92.17],[113.91,95.15],[114.24,98.2],[114.18,101.27],[113.73,104.31],[112.9,107.26],[111.7,110.09],[110.15,112.73],[108.28,115.17],[106.12,117.35],[103.71,119.24],[101.08,120.83],[98.27,122.07],[95.33,122.95],[92.3,123.44],[89.23,123.51],[86.18,123.17],[83.21,122.41],[80.38,121.23],[77.73,119.69],[75.31,117.8],[73.16,115.61],[71.33,113.14],[69.86,110.45],[68.75,107.59],[68.02,104.61],[67.7,101.56],[67.76,98.49],[68.22,95.46],[69.05,92.5],[70.25,89.68],[71.8,87.03],[73.67,84.59],[75.83,82.41],[78.24,80.52],[80.87,78.93],[83.67,77.69],[86.61,76.81],[89.64,76.32]],[[157.73,102.08],[159.31,102.13],[160.86,102.42],[162.35,102.95],[163.74,103.69],[165.01,104.62],[166.15,105.72],[167.13,106.95],[167.96,108.29],[168.63,109.72],[169.13,111.22],[169.45,112.76],[169.59,114.34],[169.55,115.91],[169.31,117.47],[168.88,118.99],[168.28,120.45],[167.52,121.83],[166.58,123.1],[165.48,124.23],[164.25,125.22],[162.89,126.02],[161.43,126.63],[159.91,127.02],[158.34,127.2],[156.76,127.14],[155.21,126.85],[153.73,126.33],[152.33,125.59],[151.06,124.65],[149.93,123.56],[148.94,122.33],[148.11,120.99],[147.44,119.56],[146.95,118.06],[146.62,116.51],[146.48,114.94],[146.52,113.37],[146.76,111.8],[147.18,110.28],[147.78,108.83],[148.56,107.45],[149.5,106.18],[150.59,105.05],[151.83,104.07],[153.18,103.26],[154.64,102.65],[156.17,102.26]]],[[[57.98,112.03],[61.01,112.26],[63.82,113.41],[66.22,115.27],[68.09,117.67],[69.36,120.44],[70.14,123.39],[70.64,126.39],[71.07,129.41],[71.58,132.42],[72.15,135.41],[72.76,138.4],[73.4,141.38],[74.09,144.35],[74.82,147.31],[75.59,150.26],[76.42,153.2],[77.3,156.12],[78.16,159.04],[78.68,162.04],[78.42,165.07],[77.28,167.88],[75.25,170.13],[72.54,171.49],[69.52,171.87],[66.51,171.44],[63.69,170.32],[61.16,168.61],[59.03,166.44],[57.38,163.89],[56.23,161.06],[55.34,158.15],[54.53,155.21],[53.73,152.27],[52.97,149.31],[52.25,146.35],[51.57,143.38],[50.93,140.4],[50.34,137.41],[49.78,134.41],[49.26,131.4],[48.78,128.39],[48.37,125.37],[48.37,122.33],[49.06,119.36],[50.44,116.65],[52.47,114.39],[55.04,112.78]],[[117.45,101.46],[120.57,101.84],[123.48,103.02],[125.99,104.91],[127.97,107.35],[129.25,110.23],[130.05,113.27],[130.76,116.34],[131.46,119.41],[132.15,122.49],[132.85,125.56],[133.55,128.63],[134.24,131.71],[134.93,134.78],[135.61,137.86],[136.32,140.93],[137.01,144],[137.66,147.09],[137.87,150.22],[137.25,153.3],[135.83,156.1],[133.73,158.45],[131.15,160.23],[128.22,161.38],[125.11,161.83],[121.98,161.5],[119.05,160.37],[116.52,158.51],[114.57,156.05],[113.37,153.14],[112.64,150.08],[111.95,147],[111.27,143.93],[110.58,140.85],[109.89,137.78],[109.2,134.7],[108.51,131.63],[107.81,128.56],[107.12,125.48],[106.42,122.41],[105.71,119.34],[105.02,116.27],[104.83,113.13],[105.42,110.04],[106.79,107.22],[108.84,104.83],[111.41,103.02],[114.33,101.87]]],[[[113.75,120.08],[118.16,120.78],[122.31,122.43],[125.98,124.96],[128.94,128.29],[131.02,132.23],[132.12,136.56],[132.1,141.02],[131.16,145.38],[129.94,149.68],[128.69,153.98],[127.44,158.27],[126.19,162.56],[124.92,166.85],[123.64,171.14],[122.35,175.42],[121.05,179.69],[119.76,183.97],[118.46,188.25],[117.05,192.49],[114.84,196.36],[111.47,199.27],[107.42,201.12],[103.04,201.99],[98.58,201.97],[94.18,201.19],[89.97,199.7],[86.1,197.48],[82.8,194.48],[80.41,190.72],[79.31,186.41],[79.87,182],[81.24,177.74],[82.57,173.47],[83.88,169.2],[85.19,164.92],[86.48,160.64],[87.75,156.36],[89.02,152.07],[90.28,147.78],[91.53,143.49],[92.77,139.19],[93.97,134.88],[95.5,130.69],[97.93,126.95],[101.16,123.87],[105.02,121.64],[109.3,120.36]],[[181.19,127.71],[185.4,128.03],[189.23,129.79],[192.19,132.8],[194.06,136.59],[194.87,140.74],[194.76,144.98],[194.21,149.18],[193.55,153.37],[192.79,157.55],[191.91,161.69],[190.91,165.82],[189.8,169.91],[188.57,173.97],[187.22,177.99],[185.72,181.96],[184.07,185.87],[182.26,189.7],[180.26,193.44],[177.85,196.92],[174.93,199.99],[171.62,202.64],[168,204.85],[164.13,206.59],[160.07,207.78],[155.86,208.24],[151.69,207.6],[148.31,205.16],[147.33,201.11],[148.48,197.06],[150.4,193.28],[152.24,189.46],[153.93,185.56],[155.48,181.61],[156.89,177.62],[158.17,173.57],[159.32,169.49],[160.35,165.38],[161.26,161.23],[162.06,157.07],[162.7,152.87],[163.29,148.67],[164.12,144.52],[165.46,140.5],[167.49,136.78],[170.16,133.49],[173.37,130.73],[177.08,128.7]]],[[[52.43,111.88],[55.76,112.3],[59,113.21],[62.08,114.57],[64.96,116.3],[67.61,118.36],[70.01,120.71],[72.16,123.3],[74.02,126.1],[75.61,129.06],[76.9,132.17],[77.89,135.38],[78.56,138.68],[78.89,142.02],[78.86,145.39],[78.45,148.72],[77.63,151.98],[76.39,155.11],[74.74,158.03],[72.67,160.68],[70.2,162.96],[67.38,164.79],[64.28,166.08],[61,166.78],[57.64,166.91],[54.3,166.49],[51.07,165.57],[47.99,164.22],[45.11,162.49],[42.46,160.42],[40.05,158.07],[37.91,155.48],[36.04,152.68],[34.46,149.72],[33.16,146.62],[32.17,143.4],[31.51,140.11],[31.18,136.76],[31.21,133.4],[31.62,130.06],[32.44,126.8],[33.67,123.68],[35.33,120.75],[37.4,118.1],[39.86,115.82],[42.68,114],[45.79,112.71],[49.07,112.01]],[[126.89,95.19],[130.56,95.44],[134.16,96.17],[137.64,97.36],[140.94,98.99],[143.98,101.06],[146.73,103.5],[149.13,106.29],[151.14,109.37],[152.72,112.69],[153.86,116.19],[154.54,119.8],[154.74,123.47],[154.45,127.14],[153.67,130.74],[152.43,134.2],[150.76,137.48],[148.69,140.51],[146.25,143.27],[143.48,145.69],[140.43,147.75],[137.14,149.39],[133.66,150.59],[130.06,151.32],[126.39,151.56],[122.72,151.31],[119.11,150.59],[115.63,149.4],[112.34,147.76],[109.29,145.7],[106.54,143.26],[104.14,140.47],[102.13,137.39],[100.55,134.07],[99.41,130.57],[98.73,126.96],[98.53,123.28],[98.83,119.62],[99.6,116.02],[100.84,112.56],[102.51,109.28],[104.59,106.25],[107.03,103.49],[109.79,101.07],[112.84,99.01],[116.13,97.36],[119.61,96.16],[123.22,95.43]]],[[[72.34,79.33],[74.93,79.64],[77.52,79.94],[80.12,80.25],[82.71,80.57],[85.3,80.91],[87.88,81.26],[90.47,81.63],[93.05,82],[95.63,82.39],[98.21,82.79],[100.79,83.21],[103.37,83.63],[105.94,84.07],[108.51,84.52],[111.09,84.92],[113.65,85.44],[115.99,86.56],[117.75,88.47],[118.68,90.89],[118.57,93.48],[117.47,95.83],[115.57,97.6],[113.16,98.56],[110.56,98.58],[108,98.1],[105.43,97.64],[102.85,97.19],[100.28,96.76],[97.7,96.33],[95.12,95.93],[92.54,95.53],[89.96,95.14],[87.38,94.77],[84.79,94.4],[82.2,94.06],[79.62,93.72],[77.02,93.41],[74.43,93.11],[71.84,92.81],[69.24,92.5],[66.78,91.69],[64.99,89.83],[64.25,87.35],[64.5,84.76],[65.58,82.39],[67.38,80.53],[69.74,79.45]],[[136.83,90.25],[139.33,90.71],[141.8,91.34],[144.28,91.93],[146.75,92.53],[149.22,93.14],[151.69,93.77],[154.15,94.4],[156.62,95.05],[159.08,95.71],[161.53,96.38],[163.98,97.07],[166.43,97.76],[168.88,98.47],[171.32,99.2],[173.75,99.94],[176.19,100.67],[178.49,101.74],[180.18,103.62],[181.12,105.98],[181.31,108.51],[180.69,110.96],[179.21,113.01],[176.98,114.19],[174.46,114.13],[172.02,113.41],[169.58,112.66],[167.14,111.93],[164.7,111.22],[162.25,110.52],[159.8,109.84],[157.34,109.17],[154.88,108.52],[152.42,107.88],[149.95,107.26],[147.48,106.64],[145.01,106.03],[142.54,105.42],[140.06,104.81],[137.59,104.21],[135.12,103.61],[132.78,102.62],[130.96,100.86],[129.93,98.55],[129.77,96.02],[130.49,93.59],[132.06,91.61],[134.31,90.46]]],[[[107.05,116.19],[110.26,116.71],[113.26,118],[115.85,119.97],[117.92,122.49],[119.29,125.45],[120.04,128.63],[120.54,131.86],[121.04,135.09],[121.54,138.31],[122.06,141.54],[122.59,144.77],[123.12,147.99],[123.67,151.21],[124.22,154.43],[124.8,157.65],[125.4,160.86],[125.95,164.08],[126.04,167.34],[125.2,170.49],[123.53,173.28],[121.14,175.49],[118.26,177.02],[115.11,177.87],[111.85,178.04],[108.63,177.56],[105.58,176.41],[102.87,174.58],[100.72,172.14],[99.35,169.18],[98.61,166],[98.04,162.78],[97.47,159.57],[96.91,156.35],[96.36,153.13],[95.83,149.9],[95.3,146.68],[94.78,143.45],[94.27,140.22],[93.76,137],[93.26,133.77],[92.82,130.53],[92.96,127.27],[93.87,124.15],[95.55,121.35],[97.88,119.07],[100.68,117.41],[103.79,116.44]],[[189.21,121.96],[191.36,122.71],[192.8,124.5],[193.41,126.73],[193.32,129.04],[192.59,131.23],[191.22,133.09],[189.28,134.34],[187.12,135.19],[184.95,136],[182.78,136.83],[180.61,137.63],[178.43,138.43],[176.24,139.2],[174.05,139.95],[171.85,140.69],[169.64,141.4],[167.43,142.09],[165.21,142.76],[162.98,143.42],[160.75,144.05],[158.51,144.66],[156.27,145.25],[154.02,145.81],[151.72,145.98],[149.57,145.18],[148.01,143.49],[147.25,141.31],[147.31,139],[148.16,136.86],[149.7,135.14],[151.74,134.05],[153.97,133.43],[156.21,132.84],[158.45,132.22],[160.68,131.59],[162.91,130.93],[165.13,130.26],[167.34,129.58],[169.55,128.87],[171.76,128.15],[173.95,127.41],[176.15,126.65],[178.33,125.87],[180.51,125.08],[182.68,124.26],[184.84,123.41],[186.98,122.53]]],[[[98.62,121.53],[100.72,121.6],[102.78,122.03],[104.72,122.83],[106.49,123.97],[108.01,125.42],[109.24,127.12],[110.15,129.02],[110.66,131.05],[110.78,133.15],[110.62,135.25],[110.34,137.33],[110.04,139.42],[109.76,141.5],[109.49,143.59],[109.21,145.68],[108.92,147.76],[108.6,149.84],[108.08,151.88],[107.18,153.78],[105.92,155.45],[104.34,156.83],[102.51,157.86],[100.51,158.52],[98.43,158.81],[96.33,158.72],[94.28,158.27],[92.33,157.47],[90.57,156.33],[89.03,154.89],[87.78,153.21],[86.85,151.32],[86.29,149.3],[86.13,147.2],[86.28,145.11],[86.57,143.02],[86.9,140.94],[87.2,138.86],[87.49,136.78],[87.79,134.69],[88.08,132.61],[88.4,130.53],[88.96,128.5],[89.88,126.61],[91.15,124.94],[92.73,123.56],[94.56,122.52],[96.54,121.84]],[[155.31,127.29],[157.36,127.43],[159.33,127.99],[161.14,128.96],[162.7,130.29],[163.95,131.92],[164.84,133.77],[165.35,135.75],[165.49,137.8],[165.35,139.85],[165.07,141.89],[164.79,143.92],[164.53,145.96],[164.26,148],[163.97,150.04],[163.65,152.06],[163.27,154.09],[162.7,156.06],[161.83,157.92],[160.68,159.62],[159.29,161.13],[157.69,162.41],[155.9,163.42],[153.97,164.1],[151.94,164.41],[149.89,164.32],[147.9,163.82],[146.06,162.92],[144.47,161.62],[143.24,159.98],[142.41,158.1],[142,156.09],[142.01,154.04],[142.32,152.01],[142.64,149.98],[142.96,147.95],[143.25,145.92],[143.51,143.88],[143.73,141.83],[143.97,139.79],[144.27,137.76],[144.74,135.76],[145.53,133.87],[146.62,132.13],[147.98,130.59],[149.57,129.28],[151.35,128.27],[153.28,127.58]]]],pools:{sleeping:[13,22,4],waking:[13],idle:[0,8],listening:[10,1,19],thinking:[8,16,14,17,5],searching:[15,9,3,20,12,18],working:[7,16,11,10],excited:[2,17,21,3,11],surprised:[3,21],suspicious:[14,5,23],angry:[7,16],drowsy:[4,22,13],happy:[2,11,17,19],curious:[3,21,0,15],confused:[14,5,8],bored:[4,22,0],proud:[15,8,2],shy:[0,24,13],sad:[4,13,22],laughing:[2,11,17],scared:[3,21],playful:[2,17,11,8],celebrate:[2,8,17],orbit:[0,8],radar:[0,8],progress:[0,8],spawning:[3,0],humming:[0,8],loading:[0,8],dictating:[10,1,19],sending:[0,8],receiving:[19,0,8],uploading:[15,9,8],writing:[15,9],notifying:[3,21,0],alerting:[3,21],bouncing:[2,17],dragging:[3,15,0],"powering-down":[13,22],"thinking-dots":[8,16,14,17,5]}};function T0(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 E0(e,t=`|`){return e.map(e=>V0(e)).join(t)}function D0(e,t){return typeof t==`bigint`?t.toString():t}function O0(e){return e==null}function k0(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function A0(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function j0(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function M0(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}var N0=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function P0(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function F0(e){if(P0(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return P0(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function I0(e){return F0(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var L0=new Set([`string`,`number`,`symbol`]);function R0(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function z0(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function B0(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 V0(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}var H0={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},U0={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function W0(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function G0(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function K0(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function q0(e){return typeof e==`string`?e:e?.message}function J0(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Y0(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function X0(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:q0(e.inst?._zod.def?.error?.(e))??q0(a?.(e))??q0(t?.error?.(e))??q0(n.customError?.(e))??q0(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Z0=/[\uD800-\uDBFF]/;function Q0(e){let t=e.length;if(!Z0.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function $0(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function e2(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function t2(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function n2(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):a2(e,n,r.value)}}function r2(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function i2(e,t,n){return r2(e,t,n,!1)}function a2(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:r2(this,t,n.bind(this))},set(e){r2(this,t,e)}})}var o2,s2=!1,c2={configurable:!0,get(){s2=!0}};function l2(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&o2!==e._zod){o2=void 0;return}o2=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,c2);let e=s2;s2=!1;try{let r=n(this);return s2?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),s2||=e,r}catch(n){throw delete this[t],s2||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}var u2=`~constantCatch`;function d2(e){let t=()=>e;return t[u2]=!0,t}var f2,p2={value:void 0,enumerable:!1},m2=`captureStackTrace`in Error?Error:null;function h2(e){let t=m2;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return m2=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function g2(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){p2.value=new a(r);try{Object.defineProperty(n,"_zod",p2)}finally{p2.value=void 0}}else 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),n2(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?h2(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 _2=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},v2=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(f2=globalThis).__zod_globalConfig??(f2.__zod_globalConfig={});var y2=globalThis.__zod_globalConfig;function b2(e){return e&&Object.assign(y2,e),y2}function x2(){let e=this._zod;return e.message??=JSON.stringify(e.def,D0,2),e.message}function S2(e){this._zod.message=e}var C2={get:x2,set:S2,enumerable:!0,configurable:!0},w2={value:void 0,enumerable:!1},T2=new WeakSet([Object.prototype,Error.prototype]),E2=(e,t)=>{e.name=`$ZodError`,w2.value=t,Object.defineProperty(e,"issues",w2),w2.value=void 0,Object.defineProperty(e,"message",C2);let n=Object.getPrototypeOf(e);T2.has(n)||(T2.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})}}))},D2=g2(`$ZodError`,E2);g2(`$ZodError`,E2,void 0,{Parent:Error});function O2(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 k2(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?O2(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function A2(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<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function j2(e,t){return{callee:t?.callee??e,Err:t?.Err}}var M2=e=>{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 _2;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>X0(e,o,b2())));throw N0(n,a?.callee??t),n}return s.value};return t},N2=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=>X0(e,o,b2())));throw N0(n,a?.callee??t),n}return s.value};return t},P2=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 _2;return a.issues.length?F2(e,a.issues,i):{success:!0,data:a.value}};function F2(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>X0(e,n,b2()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var I2=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?F2(e,a.issues,i):{success:!0,data:a.value}},L2=Symbol.for(`zod.compile.invalid`),R2=Symbol.for(`zod.compile.fallback`),z2=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==L2)return!0;if(r.definite===!0&&n===void 0)return!1}return B2(e,t,n)});function B2(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[R2]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new _2;return a.issues.length===0}var V2=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},H2=e=>{let t=M2(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,j2(n,a))};return n},U2=e=>{let t=M2(e),n=(e,r,i,a)=>t(e,r,i,j2(n,a));return n},W2=e=>{let t=N2(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,j2(n,a))};return n},G2=e=>{let t=N2(e),n=async(e,r,i,a)=>await t(e,r,i,j2(n,a));return n},K2=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return P2(e)(t,n,i)},q2=e=>(t,n,r)=>P2(e)(t,n,r),J2=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return I2(e)(t,n,i)},Y2=e=>async(t,n,r)=>I2(e)(t,n,r),X2=g2(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Z2=e=>{let t=e.value;return!O0(t)&&t.length!==void 0},Q2=g2(`$ZodCheckMaxLength`,(e,t)=>{var n;X2.init(e,t),(n=e._zod.def).when??(n.when=Z2),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Q0(r):i)<=t.maximum)return;let a=$0(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$2=g2(`$ZodCheckMinLength`,(e,t)=>{var n;X2.init(e,t),(n=e._zod.def).when??(n.when=Z2),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Q0(r):i)>=t.minimum)return;let a=$0(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),e4=g2(`$ZodCheckLengthEquals`,(e,t)=>{var n;X2.init(e,t),(n=e._zod.def).when??(n.when=Z2),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Q0(r):i;if(a===t.length)return;let o=$0(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})}}),t4=g2(`$ZodCheckOverwrite`,(e,t)=>{X2.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),n4={major:4,minor:6,patch:7},r4=g2(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=n4;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=W0(t),a;for(let o of n){if(o._zod.def.when){if(G0(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 _2;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Y0(t.issues,n,e),i||=W0(t,n))});else{if(t.issues.length===n)continue;Y0(t.issues,n,e),i||=W0(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(W0(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new _2;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 _2;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return i2(this,`~standard`,o4(this))},set"~standard"(e){r2(this,`~standard`,e)}}),i4=(e,t)=>e.issues.length?{issues:e.issues.map(e=>X0(e,t,b2()))}:{value:e.value};async function a4(e,t){let n={async:!0};return i4(await e._zod.run({value:t,issues:[]},n),n)}function o4(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return i4(r,n)}catch{}return a4(e,t)},vendor:`zod`,version:1}}function s4(e,t){let n=J0(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of J0(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Y0(n.issues,t,e),n}}return i(n,a)}}var c4=e=>Array.isArray(e)?e.length:-1;function l4(e,t,n){e.issues.length&&t.issues.push(...K0(n,e.issues)),t.value[n]=e.value}var u4=g2(`$ZodArray`,(e,t)=>{r4.init(e,t);let n=y2.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=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>l4(t,r,e)));else if(l4(c,r,e),s&&c.issues.length!==0&&W0(c))break}return o.length?Promise.all(o).then(()=>r):r},s4(e,c4)});function d4(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!W0(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>X0(e,r,b2())))}),t)}var f4=g2(`$ZodUnion`,(e,t)=>{r4.init(e,t),l2(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),l2(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),l2(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),l2(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>k0(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>d4(t,r,e,i)):d4(o,r,e,i)}}),p4=g2(`$ZodIntersection`,(e,t)=>{r4.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>h4(e,t,n)):h4(e,i,a)}});function m4(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(F0(e)&&F0(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=m4(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=m4(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function h4(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=m4(t.value,n.value);if(!c.valid){if(W0(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var g4=g2(`$ZodEnum`,(e,t)=>{r4.init(e,t);let n=T0(t.entries),r=new Set(n);e._zod.values=r,l2(e,`pattern`,e=>{let t=T0(e.def.entries).filter(e=>L0.has(typeof e));return RegExp(t.length?`^(${t.map(e=>R0(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),_4=g2(`$ZodTransform`,(e,t)=>{r4.init(e,t),e._zod.optin=`optional`,y2.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new v2(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new _2;return n.value=i,n}});function v4(e,t){return e.value=t.issues.length?void 0:t.value,e}var y4=g2(`$ZodOptional`,(e,t)=>{r4.init(e,t),l2(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,l2(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),l2(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${k0(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>v4(e,t)):v4(e,r)}return t.innerType._zod.run(e,n)}}),b4=g2(`$ZodExactOptional`,(e,t)=>{y4.init(e,t),l2(e,`values`,e=>e.def.innerType._zod.values),l2(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),x4=g2(`$ZodNullable`,(e,t)=>{r4.init(e,t),l2(e,`optin`,e=>e.def.innerType._zod.optin),l2(e,`optout`,e=>e.def.innerType._zod.optout),l2(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${k0(t.source)}|null)$`):void 0}),l2(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),S4=g2(`$ZodDefault`,(e,t)=>{r4.init(e,t),e._zod.optin=`defaulted`,l2(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>C4(e,t)):C4(r,t)}});function C4(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var w4=g2(`$ZodPrefault`,(e,t)=>{r4.init(e,t),e._zod.optin=`defaulted`,l2(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),T4=g2(`$ZodNonOptional`,(e,t)=>{r4.init(e,t),l2(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>E4(t,e)):E4(i,e)}});function E4(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function D4(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>X0(e,r,b2()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var O4=g2(`$ZodCatch`,(e,t)=>{r4.init(e,t),l2(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),l2(e,`optout`,e=>e.def.innerType._zod.optout),l2(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>D4(e,r,t,n)):D4(e,r,t,n)}}),k4=g2(`$ZodPipe`,(e,t)=>{r4.init(e,t),l2(e,`values`,e=>e.def.in._zod.values),l2(e,`optin`,e=>e.def.in._zod.optin),l2(e,`optout`,e=>e.def.out._zod.optout),l2(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>A4(e,t.in,n)):A4(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>A4(e,t.out,n)):A4(r,t.out,n)}});function A4(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var j4=g2(`$ZodReadonly`,(e,t)=>{r4.init(e,t),l2(e,`propValues`,e=>e.def.innerType._zod.propValues),l2(e,`values`,e=>e.def.innerType._zod.values),l2(e,`optin`,e=>e.def.innerType?._zod?.optin),l2(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(M4):M4(r)}});function M4(e){return e.memo||(e.value=Object.freeze(e.value)),e}var N4=g2(`$ZodCustom`,(e,t)=>{X2.init(e,t),r4.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>P4(t,n,r,e));P4(i,n,r,e)}});function P4(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(t2(e))}}var F4=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},I4=`~memo`,L4=[];function R4(e){return typeof e==`object`&&!!e}function z4(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var B4=new WeakMap,V4=0,H4=1,U4=2;function W4(e,t,n){let r=B4.get(e);if(r!==void 0)return r?U4:V4;if(t.has(e))return U4;t.add(e);let i=V4,a=e=>{if(i!==U4&&e?._zod){let r=W4(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=V4;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?H4:o.value?._zod?W4(o.value,t,n):V4;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=j0(c);s(e?o(e,!0):H4),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?W4(r,t,!1):H4);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),G4(e,i)}function G4(e,t){return t!==H4&&B4.set(e,t===U4),t}function K4(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var q4,J4=[],Y4={alloc(e,t,n){let r=q4;if(!r)return n;q4=void 0;let i={value:n,issues:null};return r.set(t.value,i),J4.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Z4(n,e.value))throw new F4;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=W4(e,new Set,!1);if(i===V4)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===U4||r?n=!0:r=!0}let l=s.value;if(!R4(l))return t(s,c);let u=c[I4];u||(u={buckets:new WeakMap,backEdges:void 0},c[I4]=u);let d;i===c?d=a:(d=K4(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...z4(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;q4=d;let p=J4.length,m=t(s,c);q4=void 0;let h=J4.length>p?J4.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?z4(e.issues):L4),e)):(h&&(h.issues=m.issues.length?z4(m.issues):L4),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function X4(){return Y4}function Z4(e,t){let n=e[I4]?.backEdges;return n!==void 0&&R4(t)&&n.has(t)}var Q4=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(e2(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${V0(e.values[0])}`:`Invalid option: expected one of ${E0(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${E0(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function $4(){return{localeError:Q4()}}var e3,t3=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function n3(){return new t3}(e3=globalThis).__zod_globalRegistry??(e3.__zod_globalRegistry=n3());var r3=globalThis.__zod_globalRegistry;function i3(e,t){return new Q2({check:`max_length`,...B0(t),maximum:e})}function a3(e,t){return new $2({check:`min_length`,...B0(t),minimum:e})}function o3(e,t){return new e4({check:`length_equals`,...B0(t),length:e})}function s3(e){return new t4({check:`overwrite`,tx:e})}function c3(e,t,n){return new e({type:`array`,element:t,...B0(n)})}function l3(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...B0(n)})}function u3(e,t){let n=d3(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(t2(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(t2(r))}},e(t.value,t)),t);return n}function d3(e,t){let n=new X2({check:`custom`,...B0(t)});return n._zod.check=e,n}function f3(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&A0(e,t,n[t]);return e}function p3(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??r3,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function m3(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function h3(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,h3(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&f3(o.schema,c),t.io===`input`&&T3(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function g3(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function _3(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${g3(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+g3(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
137
137
 
138
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function v3(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;v3(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var y3=new Set([`type`,`properties`,`required`,`additionalProperties`]),b3=[`oneOf`,`anyOf`];function x3(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function S3(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!y3.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??x3(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}A0(n,r,e.length===1?e[0]:S3(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=x3(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function C3(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of y3)if(t in e)return;let n=t.filter(e=>b3.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=S3(t);else{let e=n[0],i=b3.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>S3([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,f3(e,r))}function w3(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):f3(i,s),f3(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())v3(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])C3(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}f3(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,A0(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:D3(t,`input`,e.processors),output:D3(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function T3(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return T3(r.element,n);if(r.type===`set`)return T3(r.valueType,n);if(r.type===`lazy`)return T3(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return T3(r.innerType,n);if(r.type===`intersection`)return T3(r.left,n)||T3(r.right,n);if(r.type===`record`||r.type===`map`)return T3(r.keyType,n)||T3(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:T3(r.in,n)||T3(r.out,n);if(r.type===`object`){for(let e in r.shape)if(T3(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(T3(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(T3(e,n))return!0;return!!(r.rest&&T3(r.rest,n))}return!1}var E3=(e,t={})=>n=>{let r=p3({...n,processors:t});return h3(e,r),_3(r,e),w3(r,e)},D3=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=p3({...i??{},target:a,io:t,processors:n});return h3(e,o),_3(o,e),w3(o,e)},O3=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},k3=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},A3=(e,t)=>{O3(e,`minimum`,t),k3(e,`maximum`,t)},j3=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},M3=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},N3=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},P3=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},F3=(e,t)=>O3(e,`minimum`,t.minimum),I3=(e,t)=>k3(e,`maximum`,t.maximum),L3=e=>(t,n)=>{P3(t,n.format);let[r,i]=e[n.format];O3(t,`minimum`,r),k3(t,`maximum`,i)},R3={greater_than:(e,t)=>O3(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>k3(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>j3(e,t.value),number_format:L3(H0),bigint_format:L3(U0),min_length:F3,max_length:I3,length_equals:(e,t)=>A3(e,t.length),min_size:F3,max_size:I3,size_equals:(e,t)=>A3(e,t.size),string_format:(e,t)=>{P3(e,t.format),t.pattern&&M3(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>N3(e,t.mime)};function z3(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)R3[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&O3(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&O3(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&k3(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&k3(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&j3(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&N3(t,i.mime);for(let e of i.patterns??[])M3(t,e);return t}var B3=(e,t,n,r)=>{let i=e._zod.def,a=T0(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},V3=(e,t,n,r)=>{m3(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},H3=(e,t,n,r)=>{m3(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},U3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=z3(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=h3(a.element,t,{...r,path:[...r.path,`items`]})},W3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>h3(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},G3=(e,t,n,r)=>{let i=e._zod.def,a=h3(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=h3(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},K3=(e,t,n,r)=>{let i=e._zod.def,a=h3(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},q3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},J3=Symbol();function Y3(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(m3(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),J3):JSON.parse(o)}var X3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Y3(i.defaultValue,e,t,n,r);o!==J3&&(n.default=o)},Z3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Y3(i.defaultValue,e,t,n,r);o!==J3&&(n._prefault=o)},Q3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{m3(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},$3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;h3(o,t,r);let s=t.seen.get(e);s.ref=o},e6=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},t6=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},n6=new WeakSet([Object.prototype,Error.prototype]);function r6(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var i6=g2(`ZodError`,(e,t)=>{D2.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);n6.has(n)||(n6.add(n),r6(n,`format`,e=>t=>A2(e,t)),r6(n,`flatten`,e=>t=>k2(e,t)),r6(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,D0,2)}),r6(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,D0,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),a6=M2(i6),o6=N2(i6),s6=P2(i6),c6=I2(i6),l6=H2(i6),u6=U2(i6),d6=W2(i6),f6=G2(i6),p6=K2(i6),m6=q2(i6),h6=J2(i6),g6=Y2(i6);function _6(){y2.localeError||b2($4())}function v6(){y2.memoizer||b2({memoizer:X4()})}var y6=g2(`ZodType`,(e,t)=>(_6(),r4.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(M0(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return z0(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Y6(e,t))},superRefine(e,t){return this.check(X6(e,t))},overwrite(e){return this.check(s3(e))},optional(){return j6(this)},exactOptional(){return N6(this)},nullable(){return F6(this)},nullish(){return j6(F6(this))},nonoptional(e){return V6(this,e)},array(){return x6(this)},or(e){return C6([this,e])},and(e){return T6(this,e)},transform(e){return G6(this,k6(e))},default(e){return L6(this,e)},prefault(e){return z6(this,e)},catch(e){return U6(this,e)},pipe(e){return G6(this,e)},readonly(){return q6(this)},describe(e){let t=this.clone();return r3.add(t,{description:e}),t},meta(...e){if(e.length===0)return r3.get(this);let t=this.clone();return r3.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return i2(this,`~standard`,{...o4(this),jsonSchema:{input:D3(this,`input`),output:D3(this,`output`)}})},set"~standard"(e){r2(this,`~standard`,e)},parse:function e(t,n){return a6(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await o6(this,t,n,{callee:e})},safeParse(e,t){return s6(this,e,t)},async safeParseAsync(e,t){return c6(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){r2(this,`spa`,e)},validate(e,t){return z2(this,e,t)},validateAsync(e,t){return V2(this,e,t)},encode:function e(t,n){return l6(this,t,n,{callee:e})},decode:function e(t,n){return u6(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await d6(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await f6(this,t,n,{callee:e})},safeEncode(e,t){return p6(this,e,t)},safeDecode(e,t){return m6(this,e,t)},async safeEncodeAsync(e,t){return h6(this,e,t)},async safeDecodeAsync(e,t){return g6(this,e,t)},toJSONSchema(e){return E3(this,{})(e)},get description(){return r3.get(this)?.description},get _def(){return this._zod.def}}),b6=g2(`ZodArray`,(e,t)=>{v6(),u4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U3(e,t,n,r),e.element=t.element},{min(e,t){return this.check(a3(e,t))},nonempty(e){return this.check(a3(1,e))},max(e,t){return this.check(i3(e,t))},length(e,t){return this.check(o3(e,t))},unwrap(){return this.element}});function x6(e,t){return c3(b6,e,t)}var S6=g2(`ZodUnion`,(e,t)=>{f4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W3(e,t,n,r),e.options=t.options});function C6(e,t){return new S6({type:`union`,options:e,...B0(t)})}var w6=g2(`ZodIntersection`,(e,t)=>{p4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G3(e,t,n,r)});function T6(e,t){return new w6({type:`intersection`,left:e,right:t})}var E6=g2(`ZodEnum`,(e,t)=>{g4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B3(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new E6({...t,checks:[],...B0(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new E6({...t,checks:[],...B0(r),entries:i})}});function D6(e,t){return new E6({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B0(t)})}var O6=g2(`ZodTransform`,(e,t)=>{v6(),_4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H3(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new v2(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(t2(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(t2(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function k6(e){return new O6({type:`transform`,transform:e})}var A6=g2(`ZodOptional`,(e,t)=>{y4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function j6(e){return new A6({type:`optional`,innerType:e})}var M6=g2(`ZodExactOptional`,(e,t)=>{b4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function N6(e){return new M6({type:`optional`,innerType:e})}var P6=g2(`ZodNullable`,(e,t)=>{x4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function F6(e){return new P6({type:`nullable`,innerType:e})}var I6=g2(`ZodDefault`,(e,t)=>{S4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function L6(e,t){return new I6({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():I0(t)}})}var R6=g2(`ZodPrefault`,(e,t)=>{w4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function z6(e,t){return new R6({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():I0(t)}})}var B6=g2(`ZodNonOptional`,(e,t)=>{T4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function V6(e,t){return new B6({type:`nonoptional`,innerType:e,...B0(t)})}var H6=g2(`ZodCatch`,(e,t)=>{O4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function U6(e,t){return new H6({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:d2(t)})}var W6=g2(`ZodPipe`,(e,t)=>{k4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$3(e,t,n,r),e.in=t.in,e.out=t.out});function G6(e,t){return new W6({type:`pipe`,in:e,out:t})}var K6=g2(`ZodReadonly`,(e,t)=>{j4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function q6(e){return new K6({type:`readonly`,innerType:e})}var J6=g2(`ZodCustom`,(e,t)=>{N4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V3(e,t,n,r)});function Y6(e,t={}){return l3(J6,e,t)}function X6(e,t){return u3(e,t)}D6([`cursor`,`blob`,`circle`,`squircle`,`capsule`,`drop`,`shield`,`hexagon`,`diamond`,`star`]);var Z6={cursor:{id:`cursor`,name:`Cursor`,fit:`translate(68.1612 9.8302) scale(0.593918)`,body:`<path fill="{{GRADIENT}}" d="M0 0 C1.12815992 0.94880479 2.25705591 1.89673511 3.38671875 2.84375 C5.57657936 4.68528228 7.75793952 6.53624249 9.93359375 8.39453125 C13.5602214 11.48647103 17.25022962 14.49819427 20.9453125 17.5078125 C25.41301487 21.15281776 29.86103386 24.8215994 34.31054688 28.48876953 C38.00933931 31.5370903 41.70951059 34.58367973 45.4140625 37.625 C52.50037463 43.44570076 59.55669812 49.29508834 66.54003906 55.23901367 C70.43289872 58.54377434 74.40406577 61.73568847 78.40625 64.90625 C82.05401433 67.85083084 85.6145398 70.89451533 89.18359375 73.93359375 C92.41424312 76.67774533 95.67698054 79.36747809 99 82 C103.47931906 85.54855146 107.83340036 89.22936876 112.18359375 92.93359375 C115.41424312 95.67774533 118.67698054 98.36747809 122 101 C125.9014198 104.09073517 129.71091352 107.27378506 133.5 110.5 C137.99002543 114.32092614 142.53350963 118.0537239 147.15234375 121.71875 C156.74255328 129.40144186 166.1812645 137.27326897 175.53833008 145.23754883 C179.4317456 148.54281661 183.40347641 151.73522157 187.40625 154.90625 C191.05401433 157.85083084 194.6145398 160.89451533 198.18359375 163.93359375 C201.41424312 166.67774533 204.67698054 169.36747809 208 172 C236.43637507 194.63776677 236.43637507 194.63776677 238.27050781 209.13867188 C239.19944445 221.27193361 237.57124038 231.13444436 230 241 C223.66050278 247.82715086 215.75482398 254.47140646 206.04764748 255.13307858 C205.3615811 255.13693349 204.67551472 255.1407884 203.96865845 255.14476013 C203.17563324 255.15165863 202.38260803 255.15855713 201.56555176 255.16566467 C200.27360901 255.16958473 200.27360901 255.16958473 198.95556641 255.17358398 C198.04112762 255.180271 197.12668884 255.18695801 196.18453979 255.19384766 C194.19843498 255.20789156 192.21231409 255.21978771 190.22618484 255.22979546 C187.07149762 255.24625057 183.91692738 255.26949556 180.76229858 255.29469299 C171.79227585 255.36530712 162.82220292 255.42526708 153.85205078 255.47680664 C148.36195434 255.5088283 142.87198905 255.55017011 137.38199997 255.59700203 C135.30028042 255.61289593 133.21853066 255.62527474 131.13676834 255.63390923 C104.46972494 255.74602279 80.75351522 259.19455182 60.52978516 278.41845703 C55.75259196 283.35727885 51.81217213 289.04473423 47.77441406 294.5859375 C44.62107661 298.87600364 41.36381878 303.08685058 38.125 307.3125 C32.82026548 314.26649347 27.55386673 321.24815866 22.3125 328.25 C21.07690581 329.89589556 19.84122979 331.5417297 18.60546875 333.1875 C16.22002164 336.36552908 13.84996009 339.55428087 11.48828125 342.75 C3.0450311 354.10095576 -5.25712203 365.22607871 -20 368 C-33.42903027 368.85957067 -44.2929604 367.90032788 -55 358.9140625 C-63.51513963 350.76480778 -67.79688328 340.99527428 -68.37686157 329.29350281 C-68.43541887 328.1487851 -68.49397617 327.00406738 -68.55430794 325.82466125 C-68.61453573 324.57243271 -68.67476353 323.32020416 -68.73681641 322.0300293 C-68.80423726 320.68369989 -68.87198477 319.33738681 -68.94003105 317.99108887 C-69.12569162 314.29881586 -69.30666938 310.60632592 -69.48688698 306.91378379 C-69.68142908 302.94481208 -69.88036562 298.97606035 -70.07873535 295.00727844 C-70.55465828 285.46711948 -71.02377004 275.92663022 -71.49235249 266.3861084 C-71.71278092 261.90166682 -71.93398876 257.41726373 -72.1552124 252.93286133 C-72.22122149 251.59460763 -72.22122149 251.59460763 -72.28856409 250.2293185 C-72.37783973 248.41936974 -72.46711776 246.6094211 -72.55639815 244.79947257 C-72.7821203 240.22326204 -73.00777832 235.64704836 -73.23336792 231.0708313 C-73.2783997 230.15734865 -73.32343148 229.24386601 -73.36982787 228.30270207 C-73.64581049 222.70253299 -73.92113412 217.10233189 -74.19602597 211.50210917 C-75.35713101 187.85146938 -76.54638525 164.20245932 -77.76320994 140.55462319 C-78.3174362 129.77404232 -78.86176258 118.9929594 -79.40472984 108.2118063 C-79.83986282 99.58021501 -80.28322749 90.94912395 -80.73695588 82.31848997 C-81.04621068 76.42094211 -81.34513355 70.52292566 -81.63612723 64.62444884 C-81.8031421 61.24551841 -81.97612174 57.86718776 -82.15861511 54.48903847 C-84.29931862 14.73242483 -84.29931862 14.73242483 -72.03125 -1.625 C-50.89854752 -24.96559677 -21.34867451 -18.24899383 0 0 Z "/>`,clip:`<path d="M0 0 C1.12815992 0.94880479 2.25705591 1.89673511 3.38671875 2.84375 C5.57657936 4.68528228 7.75793952 6.53624249 9.93359375 8.39453125 C13.5602214 11.48647103 17.25022962 14.49819427 20.9453125 17.5078125 C25.41301487 21.15281776 29.86103386 24.8215994 34.31054688 28.48876953 C38.00933931 31.5370903 41.70951059 34.58367973 45.4140625 37.625 C52.50037463 43.44570076 59.55669812 49.29508834 66.54003906 55.23901367 C70.43289872 58.54377434 74.40406577 61.73568847 78.40625 64.90625 C82.05401433 67.85083084 85.6145398 70.89451533 89.18359375 73.93359375 C92.41424312 76.67774533 95.67698054 79.36747809 99 82 C103.47931906 85.54855146 107.83340036 89.22936876 112.18359375 92.93359375 C115.41424312 95.67774533 118.67698054 98.36747809 122 101 C125.9014198 104.09073517 129.71091352 107.27378506 133.5 110.5 C137.99002543 114.32092614 142.53350963 118.0537239 147.15234375 121.71875 C156.74255328 129.40144186 166.1812645 137.27326897 175.53833008 145.23754883 C179.4317456 148.54281661 183.40347641 151.73522157 187.40625 154.90625 C191.05401433 157.85083084 194.6145398 160.89451533 198.18359375 163.93359375 C201.41424312 166.67774533 204.67698054 169.36747809 208 172 C236.43637507 194.63776677 236.43637507 194.63776677 238.27050781 209.13867188 C239.19944445 221.27193361 237.57124038 231.13444436 230 241 C223.66050278 247.82715086 215.75482398 254.47140646 206.04764748 255.13307858 C205.3615811 255.13693349 204.67551472 255.1407884 203.96865845 255.14476013 C203.17563324 255.15165863 202.38260803 255.15855713 201.56555176 255.16566467 C200.27360901 255.16958473 200.27360901 255.16958473 198.95556641 255.17358398 C198.04112762 255.180271 197.12668884 255.18695801 196.18453979 255.19384766 C194.19843498 255.20789156 192.21231409 255.21978771 190.22618484 255.22979546 C187.07149762 255.24625057 183.91692738 255.26949556 180.76229858 255.29469299 C171.79227585 255.36530712 162.82220292 255.42526708 153.85205078 255.47680664 C148.36195434 255.5088283 142.87198905 255.55017011 137.38199997 255.59700203 C135.30028042 255.61289593 133.21853066 255.62527474 131.13676834 255.63390923 C104.46972494 255.74602279 80.75351522 259.19455182 60.52978516 278.41845703 C55.75259196 283.35727885 51.81217213 289.04473423 47.77441406 294.5859375 C44.62107661 298.87600364 41.36381878 303.08685058 38.125 307.3125 C32.82026548 314.26649347 27.55386673 321.24815866 22.3125 328.25 C21.07690581 329.89589556 19.84122979 331.5417297 18.60546875 333.1875 C16.22002164 336.36552908 13.84996009 339.55428087 11.48828125 342.75 C3.0450311 354.10095576 -5.25712203 365.22607871 -20 368 C-33.42903027 368.85957067 -44.2929604 367.90032788 -55 358.9140625 C-63.51513963 350.76480778 -67.79688328 340.99527428 -68.37686157 329.29350281 C-68.43541887 328.1487851 -68.49397617 327.00406738 -68.55430794 325.82466125 C-68.61453573 324.57243271 -68.67476353 323.32020416 -68.73681641 322.0300293 C-68.80423726 320.68369989 -68.87198477 319.33738681 -68.94003105 317.99108887 C-69.12569162 314.29881586 -69.30666938 310.60632592 -69.48688698 306.91378379 C-69.68142908 302.94481208 -69.88036562 298.97606035 -70.07873535 295.00727844 C-70.55465828 285.46711948 -71.02377004 275.92663022 -71.49235249 266.3861084 C-71.71278092 261.90166682 -71.93398876 257.41726373 -72.1552124 252.93286133 C-72.22122149 251.59460763 -72.22122149 251.59460763 -72.28856409 250.2293185 C-72.37783973 248.41936974 -72.46711776 246.6094211 -72.55639815 244.79947257 C-72.7821203 240.22326204 -73.00777832 235.64704836 -73.23336792 231.0708313 C-73.2783997 230.15734865 -73.32343148 229.24386601 -73.36982787 228.30270207 C-73.64581049 222.70253299 -73.92113412 217.10233189 -74.19602597 211.50210917 C-75.35713101 187.85146938 -76.54638525 164.20245932 -77.76320994 140.55462319 C-78.3174362 129.77404232 -78.86176258 118.9929594 -79.40472984 108.2118063 C-79.83986282 99.58021501 -80.28322749 90.94912395 -80.73695588 82.31848997 C-81.04621068 76.42094211 -81.34513355 70.52292566 -81.63612723 64.62444884 C-81.8031421 61.24551841 -81.97612174 57.86718776 -82.15861511 54.48903847 C-84.29931862 14.73242483 -84.29931862 14.73242483 -72.03125 -1.625 C-50.89854752 -24.96559677 -21.34867451 -18.24899383 0 0 Z "/>`,anchor:{x:85.54,y:106.35,scale:.791}},blob:{id:`blob`,name:`Blob`,fit:`translate(-0.7217 2.9555) scale(1.134706)`,body:`<path fill="{{GRADIENT}}" d="M198.91052 113.12915C198.30169 121.88191 196.37668 130.37605 193.1355 138.61157C189.89431 146.84709 185.49332 154.4026 179.93252 161.27809C174.37172 168.15358 167.99976 174.1053 160.81663 179.13325C153.6335 184.1612 145.98678 188.22176 137.87645 191.31491C129.76613 194.40806 121.42581 196.55178 112.85548 197.74609C104.28516 198.94039 95.66469 199.12755 86.99407 198.30758C78.32344 197.4876 69.86713 195.54477 61.62513 192.47909C53.38313 189.41341 45.74309 185.20915 38.70501 179.86633C31.66693 174.52351 25.60941 168.25632 20.53243 161.06476C15.45546 153.87319 11.54067 146.15559 8.78808 137.91195C6.03549 129.66831 4.37316 121.28874 3.80109 112.77325C3.22902 104.25775 3.5616 95.83136 4.79882 87.49409C6.03604 79.15682 8.08364 70.99969 10.94163 63.0227C13.79962 55.04571 17.53174 47.38891 22.13799 40.0523C26.74425 32.71568 32.30193 26.0276 38.81103 19.98806C45.32014 13.94852 52.65266 9.00619 60.80862 5.16109C68.96458 1.31599 77.53546 -1.10241 86.52128 -2.09412C95.50709 -3.08583 104.37427 -2.64309 113.12282 -0.76589C121.87137 1.11131 130.09712 4.12751 137.80007 8.28271C145.50302 12.43791 152.53652 17.35515 158.90058 23.03443C165.26463 28.7137 170.969 34.91856 176.01368 41.649C181.05836 48.37944 185.3953 55.56843 189.02451 63.21597C192.65372 70.86352 195.3609 78.90607 197.14605 87.34364C198.93119 95.78121 199.51935 104.37638 198.91052 113.12915Z"/>`,clip:`<path d="M198.91052 113.12915C198.30169 121.88191 196.37668 130.37605 193.1355 138.61157C189.89431 146.84709 185.49332 154.4026 179.93252 161.27809C174.37172 168.15358 167.99976 174.1053 160.81663 179.13325C153.6335 184.1612 145.98678 188.22176 137.87645 191.31491C129.76613 194.40806 121.42581 196.55178 112.85548 197.74609C104.28516 198.94039 95.66469 199.12755 86.99407 198.30758C78.32344 197.4876 69.86713 195.54477 61.62513 192.47909C53.38313 189.41341 45.74309 185.20915 38.70501 179.86633C31.66693 174.52351 25.60941 168.25632 20.53243 161.06476C15.45546 153.87319 11.54067 146.15559 8.78808 137.91195C6.03549 129.66831 4.37316 121.28874 3.80109 112.77325C3.22902 104.25775 3.5616 95.83136 4.79882 87.49409C6.03604 79.15682 8.08364 70.99969 10.94163 63.0227C13.79962 55.04571 17.53174 47.38891 22.13799 40.0523C26.74425 32.71568 32.30193 26.0276 38.81103 19.98806C45.32014 13.94852 52.65266 9.00619 60.80862 5.16109C68.96458 1.31599 77.53546 -1.10241 86.52128 -2.09412C95.50709 -3.08583 104.37427 -2.64309 113.12282 -0.76589C121.87137 1.11131 130.09712 4.12751 137.80007 8.28271C145.50302 12.43791 152.53652 17.35515 158.90058 23.03443C165.26463 28.7137 170.969 34.91856 176.01368 41.649C181.05836 48.37944 185.3953 55.56843 189.02451 63.21597C192.65372 70.86352 195.3609 78.90607 197.14605 87.34364C198.93119 95.78121 199.51935 104.37638 198.91052 113.12915Z"/>`,anchor:{x:111.22,y:116.58,scale:.791}},circle:{id:`circle`,name:`Circle`,fit:`translate(0 0) scale(1.142705)`,body:`<path fill="{{GRADIENT}}" d="M200 100C200 155.22847 155.22847 200 100 200C44.77153 200 0 155.22847 0 100C0 44.77153 44.77153 0 100 0C155.22847 0 200 44.77153 200 100Z"/>`,clip:`<path d="M200 100C200 155.22847 155.22847 200 100 200C44.77153 200 0 155.22847 0 100C0 44.77153 44.77153 0 100 0C155.22847 0 200 44.77153 200 100Z"/>`,anchor:{x:113.82,y:110.27,scale:.791}},squircle:{id:`squircle`,name:`Squircle`,fit:`translate(0 0) scale(1.142705)`,body:`<path fill="{{GRADIENT}}" d="M50 0C83.33333 0 116.66667 0 150 0C177.61424 0 200 22.38576 200 50C200 83.33333 200 116.66667 200 150C200 177.61424 177.61424 200 150 200C116.66667 200 83.33333 200 50 200C22.38576 200 0 177.61424 0 150C0 116.66667 0 83.33333 0 50C0 22.38576 22.38576 0 50 0Z"/>`,clip:`<path d="M50 0C83.33333 0 116.66667 0 150 0C177.61424 0 200 22.38576 200 50C200 83.33333 200 116.66667 200 150C200 177.61424 177.61424 200 150 200C116.66667 200 83.33333 200 50 200C22.38576 200 0 177.61424 0 150C0 116.66667 0 83.33333 0 50C0 22.38576 22.38576 0 50 0Z"/>`,anchor:{x:111.78,y:111.79,scale:.791}},capsule:{id:`capsule`,name:`Capsule`,fit:`translate(0 0) scale(1.142705)`,body:`<path fill="{{GRADIENT}}" d="M100 0C141.42136 0 175 33.57864 175 75C175 91.66667 175 108.33333 175 125C175 166.42136 141.42136 200 100 200C58.57864 200 25 166.42136 25 125C25 108.33333 25 91.66667 25 75C25 33.57864 58.57864 0 100 0Z"/>`,clip:`<path d="M100 0C141.42136 0 175 33.57864 175 75C175 91.66667 175 108.33333 175 125C175 166.42136 141.42136 200 100 200C58.57864 200 25 166.42136 25 125C25 108.33333 25 91.66667 25 75C25 33.57864 58.57864 0 100 0Z"/>`,anchor:{x:113.82,y:131.68,scale:.791}},drop:{id:`drop`,name:`Drop`,fit:`translate(-3.5341 -3.5341) scale(1.178046)`,body:`<path fill="{{GRADIENT}}" d="M100 3C160.84 78.2235 178 103.298 178 119C178 162.07821 143.07821 197 100 197C56.92179 197 22 162.07821 22 119C22 103.298 39.16 78.2235 100 3Z"/>`,clip:`<path d="M100 3C160.84 78.2235 178 103.298 178 119C178 162.07821 143.07821 197 100 197C56.92179 197 22 162.07821 22 119C22 103.298 39.16 78.2235 100 3Z"/>`,anchor:{x:112.47,y:138.8,scale:.791}},shield:{id:`shield`,name:`Shield`,fit:`translate(-12.1611 -24.3222) scale(1.264316)`,body:`<path fill="{{GRADIENT}}" d="M57.25 38.475C85.75 12.825 114.25 12.825 142.75 38.475C153.89667 76.64167 165.04333 114.80833 176.19 152.975C188.73 184.325 179.325 200 147.975 200C115.99167 200 84.00833 200 52.025 200C20.675 200 11.27 184.325 23.81 152.975C34.95667 114.80833 46.10333 76.64167 57.25 38.475Z"/>`,clip:`<path d="M57.25 38.475C85.75 12.825 114.25 12.825 142.75 38.475C153.89667 76.64167 165.04333 114.80833 176.19 152.975C188.73 184.325 179.325 200 147.975 200C115.99167 200 84.00833 200 52.025 200C20.675 200 11.27 184.325 23.81 152.975C34.95667 114.80833 46.10333 76.64167 57.25 38.475Z"/>`,anchor:{x:112.38,y:170.61,scale:.791}},hexagon:{id:`hexagon`,name:`Hexagon`,fit:`translate(-4.1077 -4.1077) scale(1.183782)`,body:`<path fill="{{GRADIENT}}" d="M94.90777 4.94C98.30259 2.98 101.69741 2.98 105.09223 4.94C129.98757 19.31333 154.88292 33.68667 179.77826 48.06C183.17308 50.02 184.87049 52.96 184.87049 56.88C184.87049 85.62667 184.87049 114.37333 184.87049 143.12C184.87049 147.04 183.17308 149.98 179.77826 151.94C154.88292 166.31333 129.98757 180.68667 105.09223 195.06C101.69741 197.02 98.30259 197.02 94.90777 195.06C70.01243 180.68667 45.11708 166.31333 20.22174 151.94C16.82692 149.98 15.12951 147.04 15.12951 143.12C15.12951 114.37333 15.12951 85.62667 15.12951 56.88C15.12951 52.96 16.82692 50.02 20.22174 48.06C45.11708 33.68667 70.01243 19.31333 94.90777 4.94Z"/>`,clip:`<path d="M94.90777 4.94C98.30259 2.98 101.69741 2.98 105.09223 4.94C129.98757 19.31333 154.88292 33.68667 179.77826 48.06C183.17308 50.02 184.87049 52.96 184.87049 56.88C184.87049 85.62667 184.87049 114.37333 184.87049 143.12C184.87049 147.04 183.17308 149.98 179.77826 151.94C154.88292 166.31333 129.98757 180.68667 105.09223 195.06C101.69741 197.02 98.30259 197.02 94.90777 195.06C70.01243 180.68667 45.11708 166.31333 20.22174 151.94C16.82692 149.98 15.12951 147.04 15.12951 143.12C15.12951 114.37333 15.12951 85.62667 15.12951 56.88C15.12951 52.96 16.82692 50.02 20.22174 48.06C45.11708 33.68667 70.01243 19.31333 94.90777 4.94Z"/>`,anchor:{x:112.26,y:110.7,scale:.791}},diamond:{id:`diamond`,name:`Diamond`,fit:`translate(-5.9383 -5.9383) scale(1.202088)`,body:`<path fill="{{GRADIENT}}" d="M94.12 7.88C98.04 3.96 101.96 3.96 105.88 7.88C134.62667 36.62667 163.37333 65.37333 192.12 94.12C196.04 98.04 196.04 101.96 192.12 105.88C163.37333 134.62667 134.62667 163.37333 105.88 192.12C101.96 196.04 98.04 196.04 94.12 192.12C65.37333 163.37333 36.62667 134.62667 7.88 105.88C3.96 101.96 3.96 98.04 7.88 94.12C36.62667 65.37333 65.37333 36.62667 94.12 7.88Z"/>`,clip:`<path d="M94.12 7.88C98.04 3.96 101.96 3.96 105.88 7.88C134.62667 36.62667 163.37333 65.37333 192.12 94.12C196.04 98.04 196.04 101.96 192.12 105.88C163.37333 134.62667 134.62667 163.37333 105.88 192.12C101.96 196.04 98.04 196.04 94.12 192.12C65.37333 163.37333 36.62667 134.62667 7.88 105.88C3.96 101.96 3.96 98.04 7.88 94.12C36.62667 65.37333 65.37333 36.62667 94.12 7.88Z"/>`,anchor:{x:112.53,y:109.95,scale:.791}},star:{id:`star`,name:`Star`,fit:`translate(-8.3327 3.1407) scale(1.226032)`,body:`<path fill="{{GRADIENT}}" d="M100 2C110.56054 20.13133 121.12108 38.26266 131.68163 56.39398C152.18893 60.83477 172.69623 65.27555 193.20354 69.71633C179.22301 85.3629 165.24248 101.00946 151.26195 116.65602C153.37562 137.5319 155.48929 158.40778 157.60295 179.28367C138.40197 170.82244 119.20098 162.36122 100 153.9C80.79902 162.36122 61.59803 170.82244 42.39705 179.28367C44.51071 158.40778 46.62438 137.5319 48.73805 116.65602C34.75752 101.00946 20.77699 85.3629 6.79646 69.71633C27.30377 65.27555 47.81107 60.83477 68.31837 56.39398C78.87892 38.26266 89.43946 20.13133 100 2Z"/>`,clip:`<path d="M100 2C110.56054 20.13133 121.12108 38.26266 131.68163 56.39398C152.18893 60.83477 172.69623 65.27555 193.20354 69.71633C179.22301 85.3629 165.24248 101.00946 151.26195 116.65602C153.37562 137.5319 155.48929 158.40778 157.60295 179.28367C138.40197 170.82244 119.20098 162.36122 100 153.9C80.79902 162.36122 61.59803 170.82244 42.39705 179.28367C44.51071 158.40778 46.62438 137.5319 48.73805 116.65602C34.75752 101.00946 20.77699 85.3629 6.79646 69.71633C27.30377 65.27555 47.81107 60.83477 68.31837 56.39398C78.87892 38.26266 89.43946 20.13133 100 2Z"/>`,anchor:{x:113.82,y:125.43,scale:.791}}},Q6=228.541,$6=[120,122.5],e8={x:13.2,y:8.4},t8=w0.expressions.map(e=>e.map(e=>e.map(e=>[e[0],e[1]]))),n8=t8.length,{id:r8,...i8}=Z6.cursor,a8=`-15 -15 ${Q6+30} ${Q6+30}`,o8=114.2705,s8=105,c8={sleeping:{pulse:[.028,4600],tilt:2},waking:{enter:[.92,700],pulse:[.03,2200]},idle:{pulse:[.014,3600]},listening:{bob:[2,2600],pulse:[.012,2600]},thinking:{sway:[1.6,3e3],pulse:[.01,3e3]},searching:{bob:[3,1400],sway:[2.2,1400]},working:{bob:[2.5,900],squash:.22},excited:{bob:[9,520],sway:[3,1040],squash:.35},surprised:{enter:[1.14,340],jitter:[.8,120]},suspicious:{sway:[2.4,2600],tilt:-3},angry:{jitter:[1.3,95],tilt:2},drowsy:{pulse:[.026,5e3],tilt:3},happy:{bob:[5,820],squash:.28},curious:{sway:[3.4,1900],tilt:-4},confused:{sway:[3,2200]},bored:{pulse:[.016,5200],tilt:2},proud:{bob:[1.6,2400],pulse:[.02,2400]},shy:{pulse:[.016,3e3],tilt:4},sad:{pulse:[.02,4600],tilt:3},laughing:{bob:[7,430],squash:.4},scared:{jitter:[2.2,75]},playful:{bob:[6,620],sway:[5,1240],squash:.3},celebrate:{bob:[10,480],sway:[4,960],squash:.35},orbit:{circle:[6,3200]},radar:{sway:[6,2400],pulse:[.012,2400]},progress:{pulse:[.022,1600]},spawning:{enter:[.02,820],pulse:[.014,3600]},humming:{pulse:[.016,2800]},loading:{sway:[2.2,1500],pulse:[.012,1500]},dictating:{bob:[2,2e3]},writing:{bob:[1.6,1100]},sending:{bob:[3,900]},receiving:{bob:[3,900]},uploading:{bob:[3,1e3]},notifying:{bob:[4,700],sway:[2.5,700]},alerting:{jitter:[2.6,85]},dragging:{tilt:-6,sway:[2,900]},bouncing:{bob:[12,560],squash:.45},"powering-down":{settle:.05,tilt:4}},l8=1400,u8=Math.PI*2,d8=e=>{let t=Math.sin(e*127.1+311.7)*43758.5453;return t-Math.floor(t)},f8=[`#F472B6`,`#C084FC`,`#818CF8`,`#38BDF8`,`#34D399`,`#FACC15`,`#FB7185`],p8=[`#4ADE80`,`#34D399`,`#22D3EE`,`#60A5FA`],m8=`<path fill="{{GRADIENT}}" d="M99 58 Q99 43 114.3 43 Q129.6 43 129.6 58 L123 150 Q122 161 114.3 161 Q106.6 161 105.6 150 Z"/><circle fill="{{GRADIENT}}" cx="114.3" cy="188" r="15"/>`,h8={celebrate:{confetti:{count:16,period:1500,life:1300,origin:74,spread:54}},excited:{confetti:{count:9,period:2e3,life:1100,origin:72,spread:44}},laughing:{confetti:{count:7,period:2400,life:1e3,origin:70,spread:38}},working:{trails:{count:3,period:2200,radius:126}},orbit:{trails:{count:3,period:2600,radius:128}},radar:{trails:{count:2,period:2e3,radius:132}},progress:{trails:{count:3,period:1800,radius:124}},loading:{trails:{count:2,period:2200,radius:126}},uploading:{trails:{count:2,period:1700,radius:122}},sending:{trails:{count:2,period:1500,radius:120}},receiving:{trails:{count:2,period:1500,radius:120}},alerting:{glyph:{markup:m8,period:2600,hold:1100}},notifying:{glyph:{markup:m8,period:4200,hold:900}},confused:{glyph:{markup:`<path fill="none" stroke="{{GRADIENT}}" stroke-width="19" stroke-linecap="round" d="M88 76 A27 27 0 1 1 114.3 112 L114.3 132"/><circle fill="{{GRADIENT}}" cx="114.3" cy="170" r="13"/>`,period:5200,hold:1200}}},g8=`http://www.w3.org/2000/svg`;function _8(e,t){for(;e.childNodes.length>t;)e.removeChild(e.lastChild);for(;e.childNodes.length<t;){let t=document.createElementNS(g8,`path`);t.setAttribute(`stroke-linecap`,`round`),t.setAttribute(`fill`,`none`),e.appendChild(t)}return Array.from(e.querySelectorAll(`:scope > path`))}function v8(e,t,n,r,i,a){let o=_8(e,t.count);for(let e=0;e<t.count;e++){let s=o[e],c=d8(e+1),l=d8(e+41),u=d8(e+91),d=(n+u*t.period)%t.period/t.life*1;if(d>1){s.setAttribute(`opacity`,`0`);continue}let f=c*u8,p=t.spread*(.45+l*.55)*(1-(1-d)*(1-d)),m=(t.origin+p)*r,h=34*r*d*d,g=i+Math.cos(f)*m,_=a+Math.sin(f)*m+h,v=11+l*12,y=f+(u-.5)*5*d,ee=g+Math.cos(y)*v,te=_+Math.sin(y)*v,b=(c-.5)*v*.7,x=(g+ee)/2-Math.sin(y)*b,S=(_+te)/2+Math.cos(y)*b;s.setAttribute(`d`,`M${g.toFixed(1)} ${_.toFixed(1)} Q${x.toFixed(1)} ${S.toFixed(1)} ${ee.toFixed(1)} ${te.toFixed(1)}`),s.setAttribute(`stroke`,f8[e%f8.length]),s.setAttribute(`stroke-width`,(4+l*2.4).toFixed(1)),s.setAttribute(`opacity`,(d<.12?d/.12:1-(d-.12)/.88).toFixed(3))}}function y8(e,t,n,r,i,a){let o=_8(e,t.count);for(let e=0;e<t.count;e++){let s=o[e],c=d8(e+3),l=d8(e+29),u=e%2==0?1:-1,d=t.period*(.8+c*.5),f=t.radius*r*(.78+l*.4),p=n/d*u*u8+c*u8,m=.85+l*.7,h=``;for(let e=0;e<=12;e++){let t=e/12,n=p+m*t,r=f*(1+Math.sin(t*Math.PI)*.14),o=i+Math.cos(n)*r,s=a+Math.sin(n)*r*.78;h+=(e===0?`M`:`L`)+o.toFixed(1)+` `+s.toFixed(1)}s.setAttribute(`d`,h),s.setAttribute(`stroke`,p8[e%p8.length]),s.setAttribute(`stroke-width`,(5+c*3).toFixed(1)),s.setAttribute(`opacity`,`0.85`)}}function b8(e,t){let n=t%e.period,r=e.period-e.hold;if(n<r)return 0;let i=n-r,a=e.hold-i;return Math.max(0,Math.min(1,Math.min(i,a)/200))}function x8(e){let t=h8[e.state],n=Q6/2,r=e.strength;if(e.trails&&(t?.trails&&e.showEffects&&e.showTrails!==!1&&r>0?y8(e.trails,t.trails,e.elapsed,r,n,n):e.trails.childNodes.length&&e.trails.replaceChildren()),e.confetti&&(t?.confetti&&e.showEffects&&r>0?v8(e.confetti,t.confetti,e.elapsed,r,n,n):e.confetti.childNodes.length&&e.confetti.replaceChildren()),e.glyph&&e.bodyContent){if(t?.glyph&&e.showGlyphs){let r=b8(t.glyph,e.elapsed),i=t.glyph.markup.replace(/\{\{GRADIENT\}\}/g,e.paint);e.glyph.getAttribute(`data-glyph`)!==i&&(e.glyph.setAttribute(`data-glyph`,i),e.glyph.innerHTML=i),e.glyph.style.opacity=String(r);let a=.72+.28*r;e.glyph.setAttribute(`transform`,`translate(${n} ${n}) scale(${a.toFixed(3)}) translate(${-n} ${-n})`),e.bodyContent.style.opacity=String(1-r)}else e.glyph.getAttribute(`data-glyph`)&&(e.glyph.removeAttribute(`data-glyph`),e.glyph.replaceChildren()),e.glyph.style.opacity=`0`,e.bodyContent.style.opacity=`1`}}var S8=Object.fromEntries(Object.entries(w0.pools).map(([e,t])=>[e,[...t]])),C8={sleeping:[6e3,1e4],waking:[800,800],idle:[9e3,16e3],listening:[2800,5e3],thinking:[2e3,3600],searching:[1e3,1800],working:[1800,3200],excited:[1100,2e3],surprised:[2500,4e3],suspicious:[2600,4500],angry:[2200,3800],drowsy:[4e3,8e3],happy:[2500,4500],curious:[1800,3200],confused:[2200,3800],bored:[3500,6e3],proud:[3500,6e3],shy:[3e3,5500],sad:[4e3,7e3],laughing:[1200,2400],scared:[900,1800],playful:[1500,3e3],celebrate:[1400,2600],orbit:[4e3,8e3],radar:[4e3,8e3],progress:[4e3,8e3],spawning:[1200,1200],humming:[5e3,9e3],loading:[6e3,1e4],dictating:[4e3,8e3],sending:[4e3,8e3],receiving:[4e3,8e3],uploading:[4e3,8e3],writing:[4e3,8e3],notifying:[1500,2600],alerting:[2e3,3600],bouncing:[3e3,6e3],dragging:[1600,3e3],"powering-down":[6e3,9e3]},w8={sleeping:null,waking:null,idle:[6e3,14e3],listening:[3e3,7e3],thinking:[3500,7e3],searching:[1600,4e3],working:[2800,5500],excited:[2e3,4e3],surprised:[1800,3500],suspicious:[4500,8e3],angry:[3500,7e3],drowsy:null,happy:[2500,5e3],curious:[2500,5500],confused:[2800,5500],bored:[4e3,8e3],proud:[3500,7e3],shy:[3e3,6e3],sad:[4e3,8e3],laughing:[2500,5e3],scared:[1200,3e3],playful:[2e3,4500],celebrate:[2200,4500],orbit:null,radar:null,progress:null,spawning:null,humming:[4e3,8e3],loading:null,dictating:null,sending:null,receiving:null,uploading:null,writing:null,notifying:[2e3,4e3],alerting:null,bouncing:null,dragging:[2200,4500],"powering-down":null};Object.keys(S8).filter(e=>e in S8);var T8=(e,t,n)=>Math.max(t,Math.min(n,e)),E8=()=>null,D8=e=>`M`+e.map(e=>e[0].toFixed(2)+` `+e[1].toFixed(2)).join(`L`)+`Z`,O8=e=>e.map(e=>e.map(e=>[e[0],e[1]])),k8=e=>{let t=0,n=0;for(let r of e)t+=r[0],n+=r[1];return[t/e.length,n/e.length]},A8=e=>`translate(${e.x} ${e.y}) scale(${e.scale}) translate(${-$6[0]} ${-$6[1]})`,j8=e=>{let t=e-1;return 1+2.7*t*t*t+1.7*t*t},M8=e=>e<.5?2*e*e:1-2*(1-e)*(1-e);function N8(e,t,n){if(n<=0)return``;let r=Q6/2,i=Q6,a=(e,n=0)=>Math.sin(t/e*Math.PI*2+n),o=0,s=0,c=e.tilt?e.tilt*n:0,l=1,u=1,d=1;if(e.bob){let[t,r]=e.bob,i=a(r);if(s-=t*n*i,e.squash){let t=e.squash*n*Math.max(0,-i);d=1-t*.5,u=1+t*.5}}if(e.circle){let[t,r]=e.circle;o+=t*n*a(r),s+=t*n*a(r,Math.PI/2)}if(e.sway){let[t,r]=e.sway;c+=t*n*a(r)}if(e.pulse){let[t,r]=e.pulse;l*=1+t*n*a(r)}if(e.jitter){let[t,r]=e.jitter;o+=t*n*a(r),s+=t*n*a(r*.63,1.1)}if(e.enter){let[n,r]=e.enter,i=t/r;l*=i>=1?1:n+(1-n)*j8(Math.max(i,0))}if(e.settle!==void 0){let r=Math.min(Math.max(t/l8,0),1);l*=1+(e.settle-1)*M8(r)*n}let f=[];return(o||s)&&f.push(`translate(${o.toFixed(2)} ${s.toFixed(2)})`),c&&f.push(`rotate(${c.toFixed(2)} ${r} ${r})`),l!==1&&f.push(`translate(${r} ${r}) scale(${l.toFixed(4)}) translate(${-r} ${-r})`),(u!==1||d!==1)&&f.push(`translate(${r} ${i}) scale(${u.toFixed(4)} ${d.toFixed(4)}) translate(${-r} ${-i})`),f.join(` `)}function P8(){return{current:O8(t8[0]),target:t8[0],expression:0,morph:1,velocity:0,blinkStart:E8(),spinStart:E8(),spinDuration:900,last:0,stateStart:0,lastState:`idle`,lastBodyTransform:``,props:{state:`idle`,expression:void 0,gaze:void 0,turn:0,spring:7,eyeScale:1,paused:!0,motionStrength:0,effects:!0,glyphs:!0,ribbons:!0}}}var F8=0;function I8(e,t){let n=`maus-${++F8}`,r={current:P8()},i={current:t.color},a=t=>({current:e.querySelector(`[data-part="${t}"]`)});e.setAttribute(`viewBox`,a8),e.innerHTML=`<defs><clipPath id="${n}-clip" data-part="clip" /></defs><g data-part="trails"/><g data-part="bodyGroup"><g data-part="bodyContent"><g data-part="outline"/><g clip-path="url(#${n}-clip)"><g data-part="face"><path data-part="eye0" fill="white"/><path data-part="eye1" fill="white"/></g></g></g><g data-part="glyph" opacity="0"/></g><g data-part="confetti"/>`;let o=a(`eye0`),s=a(`eye1`),c=a(`bodyGroup`),l=a(`bodyContent`),u=a(`trails`),d=a(`confetti`),f=a(`glyph`),p=(e,t=!1)=>{let n=r.current,i=(e%n8+n8)%n8;i===n.expression&&n.morph>=1&&!t||(n.current=L8(n),n.target=t8[i],n.expression=i,n.morph=+!!t,n.velocity=0)},m=(e,t,n)=>{let r=e.props,a=L8(e),p=T8(r.gaze?.x??0,-1,1)*e8.x,m=T8(r.gaze?.y??0,-1,1)*e8.y,h=((r.turn??0)+n)*Math.PI/180,g=r.eyeScale??1,_=R8(e,t);a.forEach((e,t)=>{let n=t===0?o.current:s.current;if(!n)return;let r=k8(e),i=Math.asin(T8((r[0]-o8)/s8,-1,1)),a=i+h,c=Math.cos(a),l=Math.max(c,.02)/Math.max(Math.cos(i),.02);n.setAttribute(`d`,D8(e)),n.setAttribute(`transform`,`translate(${(o8+s8*Math.sin(a)+p).toFixed(2)} ${(r[1]+m).toFixed(2)}) scale(${T8(l*g,.02,2.4).toFixed(4)} ${T8(_*g,.02,2.4).toFixed(4)}) translate(${(-r[0]).toFixed(2)} ${(-r[1]).toFixed(2)})`),n.style.opacity=c>.02?`1`:`0`});let v=c.current;if(v){r.state!==e.lastState&&(e.lastState=r.state,e.stateStart=t);let n=N8(c8[r.state]??{},t-e.stateStart,r.motionStrength??1);n!==e.lastBodyTransform&&(e.lastBodyTransform=n,n?v.setAttribute(`transform`,n):v.removeAttribute(`transform`))}x8({trails:u.current,confetti:d.current,glyph:f.current,bodyContent:l.current,state:r.state,elapsed:t-e.stateStart,strength:r.motionStrength??1,paint:i.current,showEffects:r.effects!==!1,showGlyphs:r.glyphs!==!1,showTrails:r.ribbons!==!1})},h=t,g=0,_,v,y=!1;function ee(){cancelAnimationFrame(g),g=0,clearTimeout(_),clearTimeout(v)}function te(){let e=w8[h.state];h.paused||h.fixedTime!==void 0||!e||(_=setTimeout(()=>{r.current.blinkStart=performance.now(),te()},e[0]+Math.random()*(e[1]-e[0])))}function b(){if(h.paused||h.fixedTime!==void 0||h.expression!==void 0)return;let[e,t]=C8[h.state];v=setTimeout(()=>{let e=S8[h.state].filter(e=>e!==r.current.expression);p(e.length?e[Math.floor(Math.random()*e.length)]:S8[h.state][0]),b()},e+Math.random()*(t-e))}function x(e){if(g=0,y||h.paused||h.fixedTime!==void 0)return;let t=r.current,n=Math.min((e-t.last)/1e3,.1);t.last=e,t.velocity+=(-14*t.velocity-49*(t.morph-1))*n,t.morph+=t.velocity*n,Number.isFinite(t.morph)||(t.morph=1,t.velocity=0),m(t,e,0),g=requestAnimationFrame(x)}let S=``,C=``;function w(t){let n=h.state!==t.state||h.expression!==t.expression,o=h.paused!==t.paused||h.fixedTime!==t.fixedTime;h=t,e.setAttribute(`viewBox`,t.silhouette.viewBox??a8);let s=r.current,d=performance.now();i.current=t.color,s.props={...s.props,state:t.state,expression:t.expression,gaze:t.gaze,paused:t.paused,motionStrength:+!t.paused,ribbons:t.ribbons!==!1};let[f,_,v,y]=(t.silhouette.viewBox??a8).split(/\s+/).map(Number),w=f+v/2,T=_+y/2;!t.paused&&t.ribbons!==!1&&h8[t.state]?.trails,c.current.style.visibility=t.effectsOnly?`hidden`:``,l.current.setAttribute(`transform`,``),u.current.setAttribute(`transform`,`translate(${w} ${T}) scale(${Math.min(v,y)/Q6}) translate(${-Q6/2} ${-Q6/2})`);let E=a(`outline`).current,ne=a(`clip`).current,D=a(`face`).current,re=t.silhouette.body.replace(/\{\{GRADIENT\}\}/g,t.color);S!==re&&(E.innerHTML=re,S=re),C!==t.silhouette.clip&&(ne.innerHTML=t.silhouette.clip,C=t.silhouette.clip),E.setAttribute(`transform`,t.silhouette.fit||``),ne.setAttribute(`transform`,t.silhouette.fit||``),D.setAttribute(`transform`,A8(t.silhouette.anchor)),(n||t.paused||s.last===0)&&p(t.expression??S8[t.state][0],t.paused||s.last===0),(n||s.last===0)&&(s.stateStart=d,s.lastState=t.state),s.last=d,(n||o||!g)&&(ee(),te(),b()),m(s,t.paused?s.stateStart+(t.fixedTime??0):t.fixedTime===void 0?d:s.stateStart+t.fixedTime,0),!t.paused&&t.fixedTime===void 0&&!g&&(g=requestAnimationFrame(x))}return w(t),{update:w,dispose(){y=!0,ee(),e.replaceChildren()}}}function L8(e){let t=T8(e.morph,0,1);return e.current.map((n,r)=>n.map((n,i)=>[n[0]+(e.target[r][i][0]-n[0])*t,n[1]+(e.target[r][i][1]-n[1])*t]))}function R8(e,t){if(e.blinkStart===null)return 1;let n=(t-e.blinkStart)/320;return n>=1?(e.blinkStart=null,1):Math.max(n<.42?1-n/.42:(n-.42)/.58,.04)}function z8(e,t){let[n,r,i]=t.anchor;return{name:e,fit:``,body:`<path d="${t.path}" fill="{{GRADIENT}}"/>`,clip:`<path d="${t.path}"/>`,anchor:{x:n,y:r,scale:i},viewBox:t.viewport.join(` `)}}var B8=Object.fromEntries(Object.entries(w0.shapes).map(([e,t])=>[e===`ellipse`?`oval`:e,z8(e,t)])),V8=Object.fromEntries(Object.entries(w0.bodies).map(([e,t])=>[e,z8(e,t)])),H8=`#34C759`;function U8(e){return e===`working`||e===`loading`}function W8(e){return e<20?0:Math.max(8,Math.round(e/4))}function G8(e,t){return t?`${e},正在工作`:e}function K8(e,t,r){let i=k(!1),a;u(t,e=>{clearTimeout(a),i.value=!1,e===`loading`&&(a=setTimeout(()=>{i.value=!0},300))},{immediate:!0}),n(()=>clearTimeout(a));let o=Te(()=>e()&&U8(t())&&(t()===`working`||i.value)),s=Te(()=>W8(r()));return{active:o,dotSize:s,visible:Te(()=>o.value&&s.value>0)}}var q8=`#FF9500`,J8=`#4D73FA`;function Y8(e){return e?J8:q8}function X8(e){return e>=64?24:e>=48?18:e>=40?16:10}var Z8=[`aria-label`,`data-animated`,`data-expression`],Q8={key:0,class:`agent-avatar__placeholder`,"aria-hidden":`true`},$8=[`src`],e5=Ce(D({__name:`AgentAvatar`,props:{name:{},avatar:{default:``},size:{default:32},mainBot:{type:Boolean},unread:{type:Boolean,default:!1},state:{default:`idle`},animated:{type:Boolean,default:void 0},fixedTime:{},expressionIndex:{},activityKey:{},ribbons:{type:Boolean,default:!1},workingDot:{type:Boolean,default:!1}},setup(e){let t=e,r=Te(()=>X8(t.size)),i=Te(()=>Y8(t.unread)),a=K8(()=>t.workingDot,()=>t.state,()=>t.size),l=Te(()=>t.mainBot&&!a.visible.value),d=k(),f=k(),p=k(!0),m=k(!0),g=k(!1),_=k(!1),v=k({x:0,y:0}),y=k(),ee=k(!1),te=k(!1),b,x,S,C,w=Te(()=>x0(t.avatar)),T=Te(()=>w.value?.avatarMode===`image`&&!!w.value.imageDataURL&&!te.value),E=Te(()=>w.value?.avatarMode===`mascot`),ne=Te(()=>T.value||E.value),D=Te(()=>w.value?.imageCrop===`circle`?`50%`:w.value?.imageCrop===`square`?`0`:`22%`),re={idle:`idle`,working:`working`,loading:`loading`,waiting:`alerting`,notifying:`notifying`,success:`happy`,failure:`sad`},ie=Te(()=>t.state!==`idle`&&!ee.value),ae=Te(()=>T.value&&t.ribbons!==!1&&ie.value&&[`working`,`loading`].includes(t.state)),O=Te(()=>ie.value?re[t.state]:y.value??w.value?.expression??`idle`),oe=Te(()=>ne.value&&p.value&&m.value&&!g.value&&t.animated!==!1&&(t.animated===!0||t.size>=56||ie.value||!!y.value||_.value)),se=Te(()=>w.value&&ne.value?{state:O.value,paused:!oe.value,color:w.value.color,gaze:v.value,silhouette:T.value?B8.circle:w.value.bodyId?V8[w.value.bodyId]:B8[w.value.shape===`ellipse`?`oval`:w.value.shape],fixedTime:t.fixedTime,expression:t.expressionIndex,effectsOnly:T.value,ribbons:t.ribbons!==!1&&(ie.value||O.value!==`working`)}:void 0);function ce(){if(!f.value||!se.value||T.value&&!ae.value){C?.dispose(),C=void 0;return}C?C.update(se.value):C=I8(f.value,se.value)}function le(e){if(g.value||t.animated===!1)return;let n=e.currentTarget.getBoundingClientRect();_.value=!0,v.value={x:Math.max(-1,Math.min(1,(e.clientX-n.left)/n.width*2-1)),y:Math.max(-1,Math.min(1,(e.clientY-n.top)/n.height*2-1))}}function ue(){_.value=!1,v.value={x:0,y:0}}function de(){m.value=document.visibilityState!==`hidden`}function fe(){g.value=S?.matches??!1}return u(()=>t.avatar,()=>{te.value=!1}),u(()=>[t.state,t.activityKey],([e])=>{clearTimeout(b),ee.value=!1,y.value=void 0,t.fixedTime===void 0&&[`success`,`failure`,`notifying`].includes(e)&&(b=setTimeout(()=>{ee.value=!0},1400))},{immediate:!0}),u([se,f,ae],ce,{flush:`post`}),h(()=>{de(),S=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),fe(),S?.addEventListener(`change`,fe),document.addEventListener(`visibilitychange`,de),typeof IntersectionObserver<`u`&&d.value&&(x=new IntersectionObserver(e=>{p.value=e[0]?.isIntersecting??!1}),x.observe(d.value)),ce()}),n(()=>{C?.dispose(),x?.disconnect(),clearTimeout(b),S?.removeEventListener(`change`,fe),document.removeEventListener(`visibilitychange`,de)}),(n,u)=>(c(),A(`span`,{ref_key:`host`,ref:d,class:s([`agent-avatar`,[`agent-avatar--${t.state}`,{"agent-avatar--image":T.value,"agent-avatar--image-active":ae.value&&oe.value}]]),style:o({width:`${e.size}px`,height:`${e.size}px`}),role:`img`,"aria-label":j(G8)(`${e.name} 的头像${e.mainBot?`,主 Bot`:``}${e.mainBot&&e.unread&&!j(a).visible.value?`,未读`:``}`,j(a).visible.value),onPointermove:le,onPointerleave:ue,"data-animated":oe.value&&(!T.value||ae.value),"data-expression":O.value},[ne.value?ve(``,!0):(c(),A(`span`,Q8)),T.value?(c(),A(`img`,{key:1,onError:u[0]||=e=>te.value=!0,src:w.value?.imageDataURL,alt:``,style:o({borderRadius:D.value})},null,44,$8)):ve(``,!0),E.value||ae.value?(c(),A(`svg`,{key:2,ref_key:`svg`,ref:f,"aria-hidden":`true`},null,512)):ve(``,!0),j(a).visible.value?(c(),A(`span`,{key:3,class:`working-dot`,"data-working-dot":``,style:o({width:`${j(a).dotSize.value}px`,height:`${j(a).dotSize.value}px`,background:j(H8)}),"aria-hidden":`true`},null,4)):ve(``,!0),l.value?(c(),A(`span`,{key:4,class:`main-bot-star`,style:o({width:`${r.value}px`,height:`${r.value}px`,background:i.value}),"aria-hidden":`true`},[De(sN,{name:`star-filled`,size:Math.round(r.value*.65)},null,8,[`size`])],4)):ve(``,!0)],46,Z8))}}),[[`__scopeId`,`data-v-458f3dde`]]),t5=[`aria-label`],n5=[`src`],r5={key:2,class:`team-avatar__cluster`,"aria-hidden":`true`},i5=Ce(D({__name:`TeamAvatar`,props:{name:{},avatar:{default:``},members:{default:()=>[]},fallbackKey:{default:``},size:{default:32},workingDot:{type:Boolean}},setup(e){let t=e,n=Te(()=>t.members.some(e=>e.state===`working`)?`working`:t.members.some(e=>e.state===`loading`)?`loading`:`idle`),r=K8(()=>t.workingDot,()=>n.value,()=>t.size),i=Te(()=>/^data:image\/(png|jpeg|webp);base64,/i.test(t.avatar)),a=Te(()=>t.members.slice(0,3).map(e=>({name:e.name,avatar:e.avatar||``,state:e.state||`idle`,activityKey:e.activityKey})));return(t,n)=>(c(),A(`span`,{class:`team-avatar`,style:o({width:`${e.size}px`,height:`${e.size}px`}),role:`img`,"aria-label":j(G8)(`${e.name}团队头像`,j(r).visible.value)},[i.value?(c(),A(`img`,{key:0,class:`team-avatar__image`,src:e.avatar,alt:``},null,8,n5)):a.value.length?(c(),A(`span`,r5,[(c(!0),A(E,null,m(a.value,(t,n)=>(c(),se(e5,{key:`${t.name}:${n}`,class:s([`team-avatar__member`,`team-avatar__member--${n+1}`]),name:t.name,avatar:t.avatar,state:t.state,"activity-key":t.activityKey,size:Math.round(e.size*.64)},null,8,[`class`,`name`,`avatar`,`state`,`activity-key`,`size`]))),128))])):(c(),se(sN,{key:1,name:`groups`,size:e.size},null,8,[`size`])),j(r).visible.value?(c(),A(`span`,{key:3,class:`working-dot`,"data-working-dot":``,style:o({width:`${j(r).dotSize.value}px`,height:`${j(r).dotSize.value}px`,background:j(H8)}),"aria-hidden":`true`},null,4)):ve(``,!0)],12,t5))}}),[[`__scopeId`,`data-v-5afded22`]]),a5={class:`identity-fixture`},o5={class:`shape-row`,"aria-label":`三种头像形状`},s5={class:`state-list`,"aria-label":`头像状态动画`},c5={class:`group-preview`,"aria-label":`群聊组合头像`},l5=Ce(D({__name:`AgentIdentityFixture`,setup(e){let t=e=>S0({...v0(`preview`),shape:e}),n=[{name:`圆圆`,avatar:t(`circle`)},{name:`方方`,avatar:t(`square`)},{name:`小三角`,avatar:t(`triangle`)}],r=[{name:`工作中`,detail:`状态驱动的眼睛和身体动作`,avatar:t(`triangle`),state:`working`},{name:`有新消息`,detail:`头像弹跳并提醒`,avatar:t(`triangle`),state:`notifying`},{name:`等待你操作`,detail:`状态驱动的眼睛和身体动作`,avatar:t(`square`),state:`waiting`}],i=n.map(e=>({name:e.name,avatar:e.avatar}));return(e,t)=>(c(),A(`main`,a5,[t[1]||=O(`header`,null,[O(`span`,null,`跨端角色系统`),O(`h1`,null,`自定义机器人角色`),O(`p`,null,`采用 OpenMausBot 的纯色轮廓、五官与状态动画。`)],-1),O(`section`,o5,[(c(),A(E,null,m(n,e=>O(`article`,{key:e.name},[De(e5,{name:e.name,avatar:e.avatar,size:88},null,8,[`name`,`avatar`]),O(`strong`,null,v(e.name),1)])),64))]),O(`section`,s5,[(c(),A(E,null,m(r,e=>O(`article`,{key:e.name},[De(e5,{name:e.name,avatar:e.avatar,size:58,state:e.state},null,8,[`name`,`avatar`,`state`]),O(`div`,null,[O(`strong`,null,v(e.name),1),O(`span`,null,v(e.detail),1)])])),64))]),O(`section`,c5,[De(i5,{name:`产品设计团队`,members:j(i),"fallback-key":`design-team`,size:92},null,8,[`members`]),t[0]||=O(`div`,null,[O(`strong`,null,`产品设计团队`),O(`span`,null,`群聊图标由成员角色自动组成`)],-1)])]))}}),[[`__scopeId`,`data-v-45178542`]]),u5=0;function d5(e=`web`){let t=globalThis.crypto?.randomUUID?.();return t?t.toLowerCase():(u5+=1,`${e}-${Date.now().toString(36)}-${u5.toString(36)}-${Math.random().toString(36).slice(2,10)}`)}function f5(){let e=globalThis.crypto?.randomUUID?.();if(e)return e.toLowerCase();let t=new Uint8Array(16);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let e=0;e<t.length;e+=1)t[e]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}var p5=k(null);function m5(e,t){let r=window.yaoviDesktop;if(!r?.attentionState)return;let i=f5();async function a(){if(e())try{let e=await r.systemState?.()??{idleSeconds:0,locked:!1};await jN(`/api/app/presence`,{method:`POST`,body:{clientId:i,focused:document.hasFocus()&&document.visibilityState===`visible`,conversationId:p5.value,idleSeconds:e.idleSeconds,locked:e.locked}})}catch{}}u(()=>[e(),p5.value],([e,t])=>{r.attentionState(e?{account:e,conversationId:t}:null).catch(()=>{}),a()},{immediate:!0});let o=setInterval(()=>void a(),3e4),s=()=>void a();for(let e of[`focus`,`blur`])window.addEventListener(e,s);document.addEventListener(`visibilitychange`,s);let c=r.onOpenConversation?.(t),l=r.onSystemChanged?.(s);n(()=>{clearInterval(o),c?.(),l?.();for(let e of[`focus`,`blur`])window.removeEventListener(e,s);document.removeEventListener(`visibilitychange`,s)})}var h5=D({__name:`App`,setup(e){let t=t0(),n=v1();u(()=>n.isAuthenticated?`${n.serverIdentity?.serverId??location.origin}:${n.user?.id??``}`:``,()=>{n.isAuthenticated&&n.user?t.start(n.user.id):(t.reset(),window.yaoviDesktop?.unreadState?.(null).catch(()=>{}))},{immediate:!0});let r=y1(),i=ia(),a=ra();m5(()=>n.isAuthenticated?n.user?.id??null:null,e=>{a.push({path:`/conversations/${e.conversationId}`,query:{...e.conversationTaskId?{taskId:e.conversationTaskId}:{},...e.messageId?{unread:e.messageId}:{}}})});let o=Te(()=>`${i.name===`computer`?`电脑接管`:i.name===`bot-automations`?`自动化`:i.name===`bot-workstreams`?`工作流`:i.name===`token-usage`?`Token 用量`:`Bot`} · Yaovi`);return u(()=>r.resolvedTheme,e=>{document.documentElement.classList.toggle(`dark`,e===`dark`),document.documentElement.dataset.theme=e,document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,e===`dark`?`#181817`:`#f8f8f6`)},{immediate:!0}),u(o,e=>{document.title=e},{immediate:!0}),h(()=>{n.bootstrap()}),(e,t)=>{let r=Ne(`RouterView`);return j(!1)?(c(),se(l5,{key:0})):j(n).status===`checking`?(c(),se(Yj,{key:1})):j(n).isAuthenticated?(c(),A(E,{key:3},[De(Uj),De(r)],64)):(c(),se(Z1,{key:2}))}}}),g5=`modulepreload`,_5=function(e){return`/`+e},v5={},y5=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=_5(t,n),t=s(t),t in v5)return;v5[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`:g5,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)})},b5=na({history:[`file:`,`yaovi-app:`].includes(location.protocol)?xi():bi(`/`),routes:[{path:`/`,redirect:`/conversations`},{path:`/chat/:sessionId?`,name:`chat`,redirect:`/conversations`},{path:`/history/:sessionId?`,name:`history`,redirect:`/conversations`},{path:`/conversations/computer/:agentId`,name:`computer`,component:()=>y5(()=>import(`./ComputerViewerView-ChYgaS9q.js`),__vite__mapDeps([0,1,2,3,4]))},{path:`/conversations/usage`,name:`token-usage`,component:()=>y5(()=>import(`./UsageView-CklMPG4n.js`),__vite__mapDeps([5,1,6]))},{path:`/conversations/automations`,name:`bot-automations`,component:()=>y5(()=>import(`./BotAutomationsView-RXBQzdfc.js`),__vite__mapDeps([7,1,8,9,10]))},{path:`/conversations/workstreams`,name:`bot-workstreams`,component:()=>y5(()=>import(`./WorkstreamsView-BwZpuuhs.js`),__vite__mapDeps([11,1,12,13]))},{path:`/conversations/:id?`,name:`conversations`,component:()=>y5(()=>import(`./ConversationsView-DzcDJZh3.js`).then(e=>e.t),__vite__mapDeps([14,15,1,16,17,18,19,20,21,8,9,2,3,12,22]))},{path:`/kanban/:boardSlug?`,name:`kanban`,redirect:`/conversations`},{path:`/files`,redirect:`/conversations`},{path:`/artifacts`,redirect:`/conversations`},{path:`/:pathMatch(.*)*`,redirect:`/conversations`}],scrollBehavior:()=>({top:0})}),x5=pn(h5);x5.config.errorHandler=(e,t,n)=>{console.error(`Vue render error (${n})`,e)},b5.onError(e=>{console.error(`Router navigation error`,e)}),x5.use(Pn()).use(b5).mount(`#app`);export{ui as $,gN as A,sN as B,v1 as C,_$ as D,y$ as E,dN as F,Oj as G,Kj as H,uN as I,Mj as J,Cj as K,cN as L,MN as M,CN as N,IN as O,NN as P,ra as Q,lN as R,y1 as S,p1 as T,Wj as U,CM as V,kj as W,sa as X,mj as Y,ia as Z,x0 as _,i5 as a,Xt as at,y0 as b,s0 as c,ln as ct,d0 as d,di as et,o0 as f,C0 as g,a0 as h,f5 as i,Yt as it,jN as j,zN as k,c0 as l,sn as lt,i0 as m,p5 as n,qt as nt,e5 as o,Kt as ot,l0 as p,Nj as q,d5 as r,tn as rt,f0 as s,dt as st,y5 as t,qe as tt,u0 as u,v0 as v,$ as w,t0 as x,S0 as y,fN as z};
139
- //# sourceMappingURL=index-Cx1SdzRY.js.map
138
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function v3(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;v3(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var y3=new Set([`type`,`properties`,`required`,`additionalProperties`]),b3=[`oneOf`,`anyOf`];function x3(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function S3(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!y3.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??x3(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}A0(n,r,e.length===1?e[0]:S3(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=x3(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function C3(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of y3)if(t in e)return;let n=t.filter(e=>b3.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=S3(t);else{let e=n[0],i=b3.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>S3([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,f3(e,r))}function w3(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):f3(i,s),f3(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())v3(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])C3(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}f3(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,A0(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:D3(t,`input`,e.processors),output:D3(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function T3(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return T3(r.element,n);if(r.type===`set`)return T3(r.valueType,n);if(r.type===`lazy`)return T3(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return T3(r.innerType,n);if(r.type===`intersection`)return T3(r.left,n)||T3(r.right,n);if(r.type===`record`||r.type===`map`)return T3(r.keyType,n)||T3(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:T3(r.in,n)||T3(r.out,n);if(r.type===`object`){for(let e in r.shape)if(T3(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(T3(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(T3(e,n))return!0;return!!(r.rest&&T3(r.rest,n))}return!1}var E3=(e,t={})=>n=>{let r=p3({...n,processors:t});return h3(e,r),_3(r,e),w3(r,e)},D3=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=p3({...i??{},target:a,io:t,processors:n});return h3(e,o),_3(o,e),w3(o,e)},O3=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},k3=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},A3=(e,t)=>{O3(e,`minimum`,t),k3(e,`maximum`,t)},j3=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},M3=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},N3=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},P3=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},F3=(e,t)=>O3(e,`minimum`,t.minimum),I3=(e,t)=>k3(e,`maximum`,t.maximum),L3=e=>(t,n)=>{P3(t,n.format);let[r,i]=e[n.format];O3(t,`minimum`,r),k3(t,`maximum`,i)},R3={greater_than:(e,t)=>O3(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>k3(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>j3(e,t.value),number_format:L3(H0),bigint_format:L3(U0),min_length:F3,max_length:I3,length_equals:(e,t)=>A3(e,t.length),min_size:F3,max_size:I3,size_equals:(e,t)=>A3(e,t.size),string_format:(e,t)=>{P3(e,t.format),t.pattern&&M3(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>N3(e,t.mime)};function z3(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)R3[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&O3(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&O3(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&k3(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&k3(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&j3(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&N3(t,i.mime);for(let e of i.patterns??[])M3(t,e);return t}var B3=(e,t,n,r)=>{let i=e._zod.def,a=T0(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},V3=(e,t,n,r)=>{m3(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},H3=(e,t,n,r)=>{m3(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},U3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=z3(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=h3(a.element,t,{...r,path:[...r.path,`items`]})},W3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>h3(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},G3=(e,t,n,r)=>{let i=e._zod.def,a=h3(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=h3(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},K3=(e,t,n,r)=>{let i=e._zod.def,a=h3(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},q3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},J3=Symbol();function Y3(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(m3(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),J3):JSON.parse(o)}var X3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Y3(i.defaultValue,e,t,n,r);o!==J3&&(n.default=o)},Z3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Y3(i.defaultValue,e,t,n,r);o!==J3&&(n._prefault=o)},Q3=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{m3(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},$3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;h3(o,t,r);let s=t.seen.get(e);s.ref=o},e6=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},t6=(e,t,n,r)=>{let i=e._zod.def;h3(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},n6=new WeakSet([Object.prototype,Error.prototype]);function r6(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var i6=g2(`ZodError`,(e,t)=>{D2.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);n6.has(n)||(n6.add(n),r6(n,`format`,e=>t=>A2(e,t)),r6(n,`flatten`,e=>t=>k2(e,t)),r6(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,D0,2)}),r6(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,D0,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),a6=M2(i6),o6=N2(i6),s6=P2(i6),c6=I2(i6),l6=H2(i6),u6=U2(i6),d6=W2(i6),f6=G2(i6),p6=K2(i6),m6=q2(i6),h6=J2(i6),g6=Y2(i6);function _6(){y2.localeError||b2($4())}function v6(){y2.memoizer||b2({memoizer:X4()})}var y6=g2(`ZodType`,(e,t)=>(_6(),r4.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(M0(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return z0(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Y6(e,t))},superRefine(e,t){return this.check(X6(e,t))},overwrite(e){return this.check(s3(e))},optional(){return j6(this)},exactOptional(){return N6(this)},nullable(){return F6(this)},nullish(){return j6(F6(this))},nonoptional(e){return V6(this,e)},array(){return x6(this)},or(e){return C6([this,e])},and(e){return T6(this,e)},transform(e){return G6(this,k6(e))},default(e){return L6(this,e)},prefault(e){return z6(this,e)},catch(e){return U6(this,e)},pipe(e){return G6(this,e)},readonly(){return q6(this)},describe(e){let t=this.clone();return r3.add(t,{description:e}),t},meta(...e){if(e.length===0)return r3.get(this);let t=this.clone();return r3.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return i2(this,`~standard`,{...o4(this),jsonSchema:{input:D3(this,`input`),output:D3(this,`output`)}})},set"~standard"(e){r2(this,`~standard`,e)},parse:function e(t,n){return a6(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await o6(this,t,n,{callee:e})},safeParse(e,t){return s6(this,e,t)},async safeParseAsync(e,t){return c6(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){r2(this,`spa`,e)},validate(e,t){return z2(this,e,t)},validateAsync(e,t){return V2(this,e,t)},encode:function e(t,n){return l6(this,t,n,{callee:e})},decode:function e(t,n){return u6(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await d6(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await f6(this,t,n,{callee:e})},safeEncode(e,t){return p6(this,e,t)},safeDecode(e,t){return m6(this,e,t)},async safeEncodeAsync(e,t){return h6(this,e,t)},async safeDecodeAsync(e,t){return g6(this,e,t)},toJSONSchema(e){return E3(this,{})(e)},get description(){return r3.get(this)?.description},get _def(){return this._zod.def}}),b6=g2(`ZodArray`,(e,t)=>{v6(),u4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U3(e,t,n,r),e.element=t.element},{min(e,t){return this.check(a3(e,t))},nonempty(e){return this.check(a3(1,e))},max(e,t){return this.check(i3(e,t))},length(e,t){return this.check(o3(e,t))},unwrap(){return this.element}});function x6(e,t){return c3(b6,e,t)}var S6=g2(`ZodUnion`,(e,t)=>{f4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W3(e,t,n,r),e.options=t.options});function C6(e,t){return new S6({type:`union`,options:e,...B0(t)})}var w6=g2(`ZodIntersection`,(e,t)=>{p4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G3(e,t,n,r)});function T6(e,t){return new w6({type:`intersection`,left:e,right:t})}var E6=g2(`ZodEnum`,(e,t)=>{g4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B3(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new E6({...t,checks:[],...B0(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new E6({...t,checks:[],...B0(r),entries:i})}});function D6(e,t){return new E6({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B0(t)})}var O6=g2(`ZodTransform`,(e,t)=>{v6(),_4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H3(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new v2(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(t2(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(t2(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function k6(e){return new O6({type:`transform`,transform:e})}var A6=g2(`ZodOptional`,(e,t)=>{y4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function j6(e){return new A6({type:`optional`,innerType:e})}var M6=g2(`ZodExactOptional`,(e,t)=>{b4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function N6(e){return new M6({type:`optional`,innerType:e})}var P6=g2(`ZodNullable`,(e,t)=>{x4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function F6(e){return new P6({type:`nullable`,innerType:e})}var I6=g2(`ZodDefault`,(e,t)=>{S4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function L6(e,t){return new I6({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():I0(t)}})}var R6=g2(`ZodPrefault`,(e,t)=>{w4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function z6(e,t){return new R6({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():I0(t)}})}var B6=g2(`ZodNonOptional`,(e,t)=>{T4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function V6(e,t){return new B6({type:`nonoptional`,innerType:e,...B0(t)})}var H6=g2(`ZodCatch`,(e,t)=>{O4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function U6(e,t){return new H6({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:d2(t)})}var W6=g2(`ZodPipe`,(e,t)=>{k4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$3(e,t,n,r),e.in=t.in,e.out=t.out});function G6(e,t){return new W6({type:`pipe`,in:e,out:t})}var K6=g2(`ZodReadonly`,(e,t)=>{j4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function q6(e){return new K6({type:`readonly`,innerType:e})}var J6=g2(`ZodCustom`,(e,t)=>{N4.init(e,t),y6.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V3(e,t,n,r)});function Y6(e,t={}){return l3(J6,e,t)}function X6(e,t){return u3(e,t)}D6([`cursor`,`blob`,`circle`,`squircle`,`capsule`,`drop`,`shield`,`hexagon`,`diamond`,`star`]);var Z6={cursor:{id:`cursor`,name:`Cursor`,fit:`translate(68.1612 9.8302) scale(0.593918)`,body:`<path fill="{{GRADIENT}}" d="M0 0 C1.12815992 0.94880479 2.25705591 1.89673511 3.38671875 2.84375 C5.57657936 4.68528228 7.75793952 6.53624249 9.93359375 8.39453125 C13.5602214 11.48647103 17.25022962 14.49819427 20.9453125 17.5078125 C25.41301487 21.15281776 29.86103386 24.8215994 34.31054688 28.48876953 C38.00933931 31.5370903 41.70951059 34.58367973 45.4140625 37.625 C52.50037463 43.44570076 59.55669812 49.29508834 66.54003906 55.23901367 C70.43289872 58.54377434 74.40406577 61.73568847 78.40625 64.90625 C82.05401433 67.85083084 85.6145398 70.89451533 89.18359375 73.93359375 C92.41424312 76.67774533 95.67698054 79.36747809 99 82 C103.47931906 85.54855146 107.83340036 89.22936876 112.18359375 92.93359375 C115.41424312 95.67774533 118.67698054 98.36747809 122 101 C125.9014198 104.09073517 129.71091352 107.27378506 133.5 110.5 C137.99002543 114.32092614 142.53350963 118.0537239 147.15234375 121.71875 C156.74255328 129.40144186 166.1812645 137.27326897 175.53833008 145.23754883 C179.4317456 148.54281661 183.40347641 151.73522157 187.40625 154.90625 C191.05401433 157.85083084 194.6145398 160.89451533 198.18359375 163.93359375 C201.41424312 166.67774533 204.67698054 169.36747809 208 172 C236.43637507 194.63776677 236.43637507 194.63776677 238.27050781 209.13867188 C239.19944445 221.27193361 237.57124038 231.13444436 230 241 C223.66050278 247.82715086 215.75482398 254.47140646 206.04764748 255.13307858 C205.3615811 255.13693349 204.67551472 255.1407884 203.96865845 255.14476013 C203.17563324 255.15165863 202.38260803 255.15855713 201.56555176 255.16566467 C200.27360901 255.16958473 200.27360901 255.16958473 198.95556641 255.17358398 C198.04112762 255.180271 197.12668884 255.18695801 196.18453979 255.19384766 C194.19843498 255.20789156 192.21231409 255.21978771 190.22618484 255.22979546 C187.07149762 255.24625057 183.91692738 255.26949556 180.76229858 255.29469299 C171.79227585 255.36530712 162.82220292 255.42526708 153.85205078 255.47680664 C148.36195434 255.5088283 142.87198905 255.55017011 137.38199997 255.59700203 C135.30028042 255.61289593 133.21853066 255.62527474 131.13676834 255.63390923 C104.46972494 255.74602279 80.75351522 259.19455182 60.52978516 278.41845703 C55.75259196 283.35727885 51.81217213 289.04473423 47.77441406 294.5859375 C44.62107661 298.87600364 41.36381878 303.08685058 38.125 307.3125 C32.82026548 314.26649347 27.55386673 321.24815866 22.3125 328.25 C21.07690581 329.89589556 19.84122979 331.5417297 18.60546875 333.1875 C16.22002164 336.36552908 13.84996009 339.55428087 11.48828125 342.75 C3.0450311 354.10095576 -5.25712203 365.22607871 -20 368 C-33.42903027 368.85957067 -44.2929604 367.90032788 -55 358.9140625 C-63.51513963 350.76480778 -67.79688328 340.99527428 -68.37686157 329.29350281 C-68.43541887 328.1487851 -68.49397617 327.00406738 -68.55430794 325.82466125 C-68.61453573 324.57243271 -68.67476353 323.32020416 -68.73681641 322.0300293 C-68.80423726 320.68369989 -68.87198477 319.33738681 -68.94003105 317.99108887 C-69.12569162 314.29881586 -69.30666938 310.60632592 -69.48688698 306.91378379 C-69.68142908 302.94481208 -69.88036562 298.97606035 -70.07873535 295.00727844 C-70.55465828 285.46711948 -71.02377004 275.92663022 -71.49235249 266.3861084 C-71.71278092 261.90166682 -71.93398876 257.41726373 -72.1552124 252.93286133 C-72.22122149 251.59460763 -72.22122149 251.59460763 -72.28856409 250.2293185 C-72.37783973 248.41936974 -72.46711776 246.6094211 -72.55639815 244.79947257 C-72.7821203 240.22326204 -73.00777832 235.64704836 -73.23336792 231.0708313 C-73.2783997 230.15734865 -73.32343148 229.24386601 -73.36982787 228.30270207 C-73.64581049 222.70253299 -73.92113412 217.10233189 -74.19602597 211.50210917 C-75.35713101 187.85146938 -76.54638525 164.20245932 -77.76320994 140.55462319 C-78.3174362 129.77404232 -78.86176258 118.9929594 -79.40472984 108.2118063 C-79.83986282 99.58021501 -80.28322749 90.94912395 -80.73695588 82.31848997 C-81.04621068 76.42094211 -81.34513355 70.52292566 -81.63612723 64.62444884 C-81.8031421 61.24551841 -81.97612174 57.86718776 -82.15861511 54.48903847 C-84.29931862 14.73242483 -84.29931862 14.73242483 -72.03125 -1.625 C-50.89854752 -24.96559677 -21.34867451 -18.24899383 0 0 Z "/>`,clip:`<path d="M0 0 C1.12815992 0.94880479 2.25705591 1.89673511 3.38671875 2.84375 C5.57657936 4.68528228 7.75793952 6.53624249 9.93359375 8.39453125 C13.5602214 11.48647103 17.25022962 14.49819427 20.9453125 17.5078125 C25.41301487 21.15281776 29.86103386 24.8215994 34.31054688 28.48876953 C38.00933931 31.5370903 41.70951059 34.58367973 45.4140625 37.625 C52.50037463 43.44570076 59.55669812 49.29508834 66.54003906 55.23901367 C70.43289872 58.54377434 74.40406577 61.73568847 78.40625 64.90625 C82.05401433 67.85083084 85.6145398 70.89451533 89.18359375 73.93359375 C92.41424312 76.67774533 95.67698054 79.36747809 99 82 C103.47931906 85.54855146 107.83340036 89.22936876 112.18359375 92.93359375 C115.41424312 95.67774533 118.67698054 98.36747809 122 101 C125.9014198 104.09073517 129.71091352 107.27378506 133.5 110.5 C137.99002543 114.32092614 142.53350963 118.0537239 147.15234375 121.71875 C156.74255328 129.40144186 166.1812645 137.27326897 175.53833008 145.23754883 C179.4317456 148.54281661 183.40347641 151.73522157 187.40625 154.90625 C191.05401433 157.85083084 194.6145398 160.89451533 198.18359375 163.93359375 C201.41424312 166.67774533 204.67698054 169.36747809 208 172 C236.43637507 194.63776677 236.43637507 194.63776677 238.27050781 209.13867188 C239.19944445 221.27193361 237.57124038 231.13444436 230 241 C223.66050278 247.82715086 215.75482398 254.47140646 206.04764748 255.13307858 C205.3615811 255.13693349 204.67551472 255.1407884 203.96865845 255.14476013 C203.17563324 255.15165863 202.38260803 255.15855713 201.56555176 255.16566467 C200.27360901 255.16958473 200.27360901 255.16958473 198.95556641 255.17358398 C198.04112762 255.180271 197.12668884 255.18695801 196.18453979 255.19384766 C194.19843498 255.20789156 192.21231409 255.21978771 190.22618484 255.22979546 C187.07149762 255.24625057 183.91692738 255.26949556 180.76229858 255.29469299 C171.79227585 255.36530712 162.82220292 255.42526708 153.85205078 255.47680664 C148.36195434 255.5088283 142.87198905 255.55017011 137.38199997 255.59700203 C135.30028042 255.61289593 133.21853066 255.62527474 131.13676834 255.63390923 C104.46972494 255.74602279 80.75351522 259.19455182 60.52978516 278.41845703 C55.75259196 283.35727885 51.81217213 289.04473423 47.77441406 294.5859375 C44.62107661 298.87600364 41.36381878 303.08685058 38.125 307.3125 C32.82026548 314.26649347 27.55386673 321.24815866 22.3125 328.25 C21.07690581 329.89589556 19.84122979 331.5417297 18.60546875 333.1875 C16.22002164 336.36552908 13.84996009 339.55428087 11.48828125 342.75 C3.0450311 354.10095576 -5.25712203 365.22607871 -20 368 C-33.42903027 368.85957067 -44.2929604 367.90032788 -55 358.9140625 C-63.51513963 350.76480778 -67.79688328 340.99527428 -68.37686157 329.29350281 C-68.43541887 328.1487851 -68.49397617 327.00406738 -68.55430794 325.82466125 C-68.61453573 324.57243271 -68.67476353 323.32020416 -68.73681641 322.0300293 C-68.80423726 320.68369989 -68.87198477 319.33738681 -68.94003105 317.99108887 C-69.12569162 314.29881586 -69.30666938 310.60632592 -69.48688698 306.91378379 C-69.68142908 302.94481208 -69.88036562 298.97606035 -70.07873535 295.00727844 C-70.55465828 285.46711948 -71.02377004 275.92663022 -71.49235249 266.3861084 C-71.71278092 261.90166682 -71.93398876 257.41726373 -72.1552124 252.93286133 C-72.22122149 251.59460763 -72.22122149 251.59460763 -72.28856409 250.2293185 C-72.37783973 248.41936974 -72.46711776 246.6094211 -72.55639815 244.79947257 C-72.7821203 240.22326204 -73.00777832 235.64704836 -73.23336792 231.0708313 C-73.2783997 230.15734865 -73.32343148 229.24386601 -73.36982787 228.30270207 C-73.64581049 222.70253299 -73.92113412 217.10233189 -74.19602597 211.50210917 C-75.35713101 187.85146938 -76.54638525 164.20245932 -77.76320994 140.55462319 C-78.3174362 129.77404232 -78.86176258 118.9929594 -79.40472984 108.2118063 C-79.83986282 99.58021501 -80.28322749 90.94912395 -80.73695588 82.31848997 C-81.04621068 76.42094211 -81.34513355 70.52292566 -81.63612723 64.62444884 C-81.8031421 61.24551841 -81.97612174 57.86718776 -82.15861511 54.48903847 C-84.29931862 14.73242483 -84.29931862 14.73242483 -72.03125 -1.625 C-50.89854752 -24.96559677 -21.34867451 -18.24899383 0 0 Z "/>`,anchor:{x:85.54,y:106.35,scale:.791}},blob:{id:`blob`,name:`Blob`,fit:`translate(-0.7217 2.9555) scale(1.134706)`,body:`<path fill="{{GRADIENT}}" d="M198.91052 113.12915C198.30169 121.88191 196.37668 130.37605 193.1355 138.61157C189.89431 146.84709 185.49332 154.4026 179.93252 161.27809C174.37172 168.15358 167.99976 174.1053 160.81663 179.13325C153.6335 184.1612 145.98678 188.22176 137.87645 191.31491C129.76613 194.40806 121.42581 196.55178 112.85548 197.74609C104.28516 198.94039 95.66469 199.12755 86.99407 198.30758C78.32344 197.4876 69.86713 195.54477 61.62513 192.47909C53.38313 189.41341 45.74309 185.20915 38.70501 179.86633C31.66693 174.52351 25.60941 168.25632 20.53243 161.06476C15.45546 153.87319 11.54067 146.15559 8.78808 137.91195C6.03549 129.66831 4.37316 121.28874 3.80109 112.77325C3.22902 104.25775 3.5616 95.83136 4.79882 87.49409C6.03604 79.15682 8.08364 70.99969 10.94163 63.0227C13.79962 55.04571 17.53174 47.38891 22.13799 40.0523C26.74425 32.71568 32.30193 26.0276 38.81103 19.98806C45.32014 13.94852 52.65266 9.00619 60.80862 5.16109C68.96458 1.31599 77.53546 -1.10241 86.52128 -2.09412C95.50709 -3.08583 104.37427 -2.64309 113.12282 -0.76589C121.87137 1.11131 130.09712 4.12751 137.80007 8.28271C145.50302 12.43791 152.53652 17.35515 158.90058 23.03443C165.26463 28.7137 170.969 34.91856 176.01368 41.649C181.05836 48.37944 185.3953 55.56843 189.02451 63.21597C192.65372 70.86352 195.3609 78.90607 197.14605 87.34364C198.93119 95.78121 199.51935 104.37638 198.91052 113.12915Z"/>`,clip:`<path d="M198.91052 113.12915C198.30169 121.88191 196.37668 130.37605 193.1355 138.61157C189.89431 146.84709 185.49332 154.4026 179.93252 161.27809C174.37172 168.15358 167.99976 174.1053 160.81663 179.13325C153.6335 184.1612 145.98678 188.22176 137.87645 191.31491C129.76613 194.40806 121.42581 196.55178 112.85548 197.74609C104.28516 198.94039 95.66469 199.12755 86.99407 198.30758C78.32344 197.4876 69.86713 195.54477 61.62513 192.47909C53.38313 189.41341 45.74309 185.20915 38.70501 179.86633C31.66693 174.52351 25.60941 168.25632 20.53243 161.06476C15.45546 153.87319 11.54067 146.15559 8.78808 137.91195C6.03549 129.66831 4.37316 121.28874 3.80109 112.77325C3.22902 104.25775 3.5616 95.83136 4.79882 87.49409C6.03604 79.15682 8.08364 70.99969 10.94163 63.0227C13.79962 55.04571 17.53174 47.38891 22.13799 40.0523C26.74425 32.71568 32.30193 26.0276 38.81103 19.98806C45.32014 13.94852 52.65266 9.00619 60.80862 5.16109C68.96458 1.31599 77.53546 -1.10241 86.52128 -2.09412C95.50709 -3.08583 104.37427 -2.64309 113.12282 -0.76589C121.87137 1.11131 130.09712 4.12751 137.80007 8.28271C145.50302 12.43791 152.53652 17.35515 158.90058 23.03443C165.26463 28.7137 170.969 34.91856 176.01368 41.649C181.05836 48.37944 185.3953 55.56843 189.02451 63.21597C192.65372 70.86352 195.3609 78.90607 197.14605 87.34364C198.93119 95.78121 199.51935 104.37638 198.91052 113.12915Z"/>`,anchor:{x:111.22,y:116.58,scale:.791}},circle:{id:`circle`,name:`Circle`,fit:`translate(0 0) scale(1.142705)`,body:`<path fill="{{GRADIENT}}" d="M200 100C200 155.22847 155.22847 200 100 200C44.77153 200 0 155.22847 0 100C0 44.77153 44.77153 0 100 0C155.22847 0 200 44.77153 200 100Z"/>`,clip:`<path d="M200 100C200 155.22847 155.22847 200 100 200C44.77153 200 0 155.22847 0 100C0 44.77153 44.77153 0 100 0C155.22847 0 200 44.77153 200 100Z"/>`,anchor:{x:113.82,y:110.27,scale:.791}},squircle:{id:`squircle`,name:`Squircle`,fit:`translate(0 0) scale(1.142705)`,body:`<path fill="{{GRADIENT}}" d="M50 0C83.33333 0 116.66667 0 150 0C177.61424 0 200 22.38576 200 50C200 83.33333 200 116.66667 200 150C200 177.61424 177.61424 200 150 200C116.66667 200 83.33333 200 50 200C22.38576 200 0 177.61424 0 150C0 116.66667 0 83.33333 0 50C0 22.38576 22.38576 0 50 0Z"/>`,clip:`<path d="M50 0C83.33333 0 116.66667 0 150 0C177.61424 0 200 22.38576 200 50C200 83.33333 200 116.66667 200 150C200 177.61424 177.61424 200 150 200C116.66667 200 83.33333 200 50 200C22.38576 200 0 177.61424 0 150C0 116.66667 0 83.33333 0 50C0 22.38576 22.38576 0 50 0Z"/>`,anchor:{x:111.78,y:111.79,scale:.791}},capsule:{id:`capsule`,name:`Capsule`,fit:`translate(0 0) scale(1.142705)`,body:`<path fill="{{GRADIENT}}" d="M100 0C141.42136 0 175 33.57864 175 75C175 91.66667 175 108.33333 175 125C175 166.42136 141.42136 200 100 200C58.57864 200 25 166.42136 25 125C25 108.33333 25 91.66667 25 75C25 33.57864 58.57864 0 100 0Z"/>`,clip:`<path d="M100 0C141.42136 0 175 33.57864 175 75C175 91.66667 175 108.33333 175 125C175 166.42136 141.42136 200 100 200C58.57864 200 25 166.42136 25 125C25 108.33333 25 91.66667 25 75C25 33.57864 58.57864 0 100 0Z"/>`,anchor:{x:113.82,y:131.68,scale:.791}},drop:{id:`drop`,name:`Drop`,fit:`translate(-3.5341 -3.5341) scale(1.178046)`,body:`<path fill="{{GRADIENT}}" d="M100 3C160.84 78.2235 178 103.298 178 119C178 162.07821 143.07821 197 100 197C56.92179 197 22 162.07821 22 119C22 103.298 39.16 78.2235 100 3Z"/>`,clip:`<path d="M100 3C160.84 78.2235 178 103.298 178 119C178 162.07821 143.07821 197 100 197C56.92179 197 22 162.07821 22 119C22 103.298 39.16 78.2235 100 3Z"/>`,anchor:{x:112.47,y:138.8,scale:.791}},shield:{id:`shield`,name:`Shield`,fit:`translate(-12.1611 -24.3222) scale(1.264316)`,body:`<path fill="{{GRADIENT}}" d="M57.25 38.475C85.75 12.825 114.25 12.825 142.75 38.475C153.89667 76.64167 165.04333 114.80833 176.19 152.975C188.73 184.325 179.325 200 147.975 200C115.99167 200 84.00833 200 52.025 200C20.675 200 11.27 184.325 23.81 152.975C34.95667 114.80833 46.10333 76.64167 57.25 38.475Z"/>`,clip:`<path d="M57.25 38.475C85.75 12.825 114.25 12.825 142.75 38.475C153.89667 76.64167 165.04333 114.80833 176.19 152.975C188.73 184.325 179.325 200 147.975 200C115.99167 200 84.00833 200 52.025 200C20.675 200 11.27 184.325 23.81 152.975C34.95667 114.80833 46.10333 76.64167 57.25 38.475Z"/>`,anchor:{x:112.38,y:170.61,scale:.791}},hexagon:{id:`hexagon`,name:`Hexagon`,fit:`translate(-4.1077 -4.1077) scale(1.183782)`,body:`<path fill="{{GRADIENT}}" d="M94.90777 4.94C98.30259 2.98 101.69741 2.98 105.09223 4.94C129.98757 19.31333 154.88292 33.68667 179.77826 48.06C183.17308 50.02 184.87049 52.96 184.87049 56.88C184.87049 85.62667 184.87049 114.37333 184.87049 143.12C184.87049 147.04 183.17308 149.98 179.77826 151.94C154.88292 166.31333 129.98757 180.68667 105.09223 195.06C101.69741 197.02 98.30259 197.02 94.90777 195.06C70.01243 180.68667 45.11708 166.31333 20.22174 151.94C16.82692 149.98 15.12951 147.04 15.12951 143.12C15.12951 114.37333 15.12951 85.62667 15.12951 56.88C15.12951 52.96 16.82692 50.02 20.22174 48.06C45.11708 33.68667 70.01243 19.31333 94.90777 4.94Z"/>`,clip:`<path d="M94.90777 4.94C98.30259 2.98 101.69741 2.98 105.09223 4.94C129.98757 19.31333 154.88292 33.68667 179.77826 48.06C183.17308 50.02 184.87049 52.96 184.87049 56.88C184.87049 85.62667 184.87049 114.37333 184.87049 143.12C184.87049 147.04 183.17308 149.98 179.77826 151.94C154.88292 166.31333 129.98757 180.68667 105.09223 195.06C101.69741 197.02 98.30259 197.02 94.90777 195.06C70.01243 180.68667 45.11708 166.31333 20.22174 151.94C16.82692 149.98 15.12951 147.04 15.12951 143.12C15.12951 114.37333 15.12951 85.62667 15.12951 56.88C15.12951 52.96 16.82692 50.02 20.22174 48.06C45.11708 33.68667 70.01243 19.31333 94.90777 4.94Z"/>`,anchor:{x:112.26,y:110.7,scale:.791}},diamond:{id:`diamond`,name:`Diamond`,fit:`translate(-5.9383 -5.9383) scale(1.202088)`,body:`<path fill="{{GRADIENT}}" d="M94.12 7.88C98.04 3.96 101.96 3.96 105.88 7.88C134.62667 36.62667 163.37333 65.37333 192.12 94.12C196.04 98.04 196.04 101.96 192.12 105.88C163.37333 134.62667 134.62667 163.37333 105.88 192.12C101.96 196.04 98.04 196.04 94.12 192.12C65.37333 163.37333 36.62667 134.62667 7.88 105.88C3.96 101.96 3.96 98.04 7.88 94.12C36.62667 65.37333 65.37333 36.62667 94.12 7.88Z"/>`,clip:`<path d="M94.12 7.88C98.04 3.96 101.96 3.96 105.88 7.88C134.62667 36.62667 163.37333 65.37333 192.12 94.12C196.04 98.04 196.04 101.96 192.12 105.88C163.37333 134.62667 134.62667 163.37333 105.88 192.12C101.96 196.04 98.04 196.04 94.12 192.12C65.37333 163.37333 36.62667 134.62667 7.88 105.88C3.96 101.96 3.96 98.04 7.88 94.12C36.62667 65.37333 65.37333 36.62667 94.12 7.88Z"/>`,anchor:{x:112.53,y:109.95,scale:.791}},star:{id:`star`,name:`Star`,fit:`translate(-8.3327 3.1407) scale(1.226032)`,body:`<path fill="{{GRADIENT}}" d="M100 2C110.56054 20.13133 121.12108 38.26266 131.68163 56.39398C152.18893 60.83477 172.69623 65.27555 193.20354 69.71633C179.22301 85.3629 165.24248 101.00946 151.26195 116.65602C153.37562 137.5319 155.48929 158.40778 157.60295 179.28367C138.40197 170.82244 119.20098 162.36122 100 153.9C80.79902 162.36122 61.59803 170.82244 42.39705 179.28367C44.51071 158.40778 46.62438 137.5319 48.73805 116.65602C34.75752 101.00946 20.77699 85.3629 6.79646 69.71633C27.30377 65.27555 47.81107 60.83477 68.31837 56.39398C78.87892 38.26266 89.43946 20.13133 100 2Z"/>`,clip:`<path d="M100 2C110.56054 20.13133 121.12108 38.26266 131.68163 56.39398C152.18893 60.83477 172.69623 65.27555 193.20354 69.71633C179.22301 85.3629 165.24248 101.00946 151.26195 116.65602C153.37562 137.5319 155.48929 158.40778 157.60295 179.28367C138.40197 170.82244 119.20098 162.36122 100 153.9C80.79902 162.36122 61.59803 170.82244 42.39705 179.28367C44.51071 158.40778 46.62438 137.5319 48.73805 116.65602C34.75752 101.00946 20.77699 85.3629 6.79646 69.71633C27.30377 65.27555 47.81107 60.83477 68.31837 56.39398C78.87892 38.26266 89.43946 20.13133 100 2Z"/>`,anchor:{x:113.82,y:125.43,scale:.791}}},Q6=228.541,$6=[120,122.5],e8={x:13.2,y:8.4},t8=w0.expressions.map(e=>e.map(e=>e.map(e=>[e[0],e[1]]))),n8=t8.length,{id:r8,...i8}=Z6.cursor,a8=`-15 -15 ${Q6+30} ${Q6+30}`,o8=114.2705,s8=105,c8={sleeping:{pulse:[.028,4600],tilt:2},waking:{enter:[.92,700],pulse:[.03,2200]},idle:{pulse:[.014,3600]},listening:{bob:[2,2600],pulse:[.012,2600]},thinking:{sway:[1.6,3e3],pulse:[.01,3e3]},searching:{bob:[3,1400],sway:[2.2,1400]},working:{bob:[2.5,900],squash:.22},excited:{bob:[9,520],sway:[3,1040],squash:.35},surprised:{enter:[1.14,340],jitter:[.8,120]},suspicious:{sway:[2.4,2600],tilt:-3},angry:{jitter:[1.3,95],tilt:2},drowsy:{pulse:[.026,5e3],tilt:3},happy:{bob:[5,820],squash:.28},curious:{sway:[3.4,1900],tilt:-4},confused:{sway:[3,2200]},bored:{pulse:[.016,5200],tilt:2},proud:{bob:[1.6,2400],pulse:[.02,2400]},shy:{pulse:[.016,3e3],tilt:4},sad:{pulse:[.02,4600],tilt:3},laughing:{bob:[7,430],squash:.4},scared:{jitter:[2.2,75]},playful:{bob:[6,620],sway:[5,1240],squash:.3},celebrate:{bob:[10,480],sway:[4,960],squash:.35},orbit:{circle:[6,3200]},radar:{sway:[6,2400],pulse:[.012,2400]},progress:{pulse:[.022,1600]},spawning:{enter:[.02,820],pulse:[.014,3600]},humming:{pulse:[.016,2800]},loading:{sway:[2.2,1500],pulse:[.012,1500]},dictating:{bob:[2,2e3]},writing:{bob:[1.6,1100]},sending:{bob:[3,900]},receiving:{bob:[3,900]},uploading:{bob:[3,1e3]},notifying:{bob:[4,700],sway:[2.5,700]},alerting:{jitter:[2.6,85]},dragging:{tilt:-6,sway:[2,900]},bouncing:{bob:[12,560],squash:.45},"powering-down":{settle:.05,tilt:4}},l8=1400,u8=Math.PI*2,d8=e=>{let t=Math.sin(e*127.1+311.7)*43758.5453;return t-Math.floor(t)},f8=[`#F472B6`,`#C084FC`,`#818CF8`,`#38BDF8`,`#34D399`,`#FACC15`,`#FB7185`],p8=[`#4ADE80`,`#34D399`,`#22D3EE`,`#60A5FA`],m8=`<path fill="{{GRADIENT}}" d="M99 58 Q99 43 114.3 43 Q129.6 43 129.6 58 L123 150 Q122 161 114.3 161 Q106.6 161 105.6 150 Z"/><circle fill="{{GRADIENT}}" cx="114.3" cy="188" r="15"/>`,h8={celebrate:{confetti:{count:16,period:1500,life:1300,origin:74,spread:54}},excited:{confetti:{count:9,period:2e3,life:1100,origin:72,spread:44}},laughing:{confetti:{count:7,period:2400,life:1e3,origin:70,spread:38}},working:{trails:{count:3,period:2200,radius:126}},orbit:{trails:{count:3,period:2600,radius:128}},radar:{trails:{count:2,period:2e3,radius:132}},progress:{trails:{count:3,period:1800,radius:124}},loading:{trails:{count:2,period:2200,radius:126}},uploading:{trails:{count:2,period:1700,radius:122}},sending:{trails:{count:2,period:1500,radius:120}},receiving:{trails:{count:2,period:1500,radius:120}},alerting:{glyph:{markup:m8,period:2600,hold:1100}},notifying:{glyph:{markup:m8,period:4200,hold:900}},confused:{glyph:{markup:`<path fill="none" stroke="{{GRADIENT}}" stroke-width="19" stroke-linecap="round" d="M88 76 A27 27 0 1 1 114.3 112 L114.3 132"/><circle fill="{{GRADIENT}}" cx="114.3" cy="170" r="13"/>`,period:5200,hold:1200}}},g8=`http://www.w3.org/2000/svg`;function _8(e,t){for(;e.childNodes.length>t;)e.removeChild(e.lastChild);for(;e.childNodes.length<t;){let t=document.createElementNS(g8,`path`);t.setAttribute(`stroke-linecap`,`round`),t.setAttribute(`fill`,`none`),e.appendChild(t)}return Array.from(e.querySelectorAll(`:scope > path`))}function v8(e,t,n,r,i,a){let o=_8(e,t.count);for(let e=0;e<t.count;e++){let s=o[e],c=d8(e+1),l=d8(e+41),u=d8(e+91),d=(n+u*t.period)%t.period/t.life*1;if(d>1){s.setAttribute(`opacity`,`0`);continue}let f=c*u8,p=t.spread*(.45+l*.55)*(1-(1-d)*(1-d)),m=(t.origin+p)*r,h=34*r*d*d,g=i+Math.cos(f)*m,_=a+Math.sin(f)*m+h,v=11+l*12,y=f+(u-.5)*5*d,ee=g+Math.cos(y)*v,te=_+Math.sin(y)*v,b=(c-.5)*v*.7,x=(g+ee)/2-Math.sin(y)*b,S=(_+te)/2+Math.cos(y)*b;s.setAttribute(`d`,`M${g.toFixed(1)} ${_.toFixed(1)} Q${x.toFixed(1)} ${S.toFixed(1)} ${ee.toFixed(1)} ${te.toFixed(1)}`),s.setAttribute(`stroke`,f8[e%f8.length]),s.setAttribute(`stroke-width`,(4+l*2.4).toFixed(1)),s.setAttribute(`opacity`,(d<.12?d/.12:1-(d-.12)/.88).toFixed(3))}}function y8(e,t,n,r,i,a){let o=_8(e,t.count);for(let e=0;e<t.count;e++){let s=o[e],c=d8(e+3),l=d8(e+29),u=e%2==0?1:-1,d=t.period*(.8+c*.5),f=t.radius*r*(.78+l*.4),p=n/d*u*u8+c*u8,m=.85+l*.7,h=``;for(let e=0;e<=12;e++){let t=e/12,n=p+m*t,r=f*(1+Math.sin(t*Math.PI)*.14),o=i+Math.cos(n)*r,s=a+Math.sin(n)*r*.78;h+=(e===0?`M`:`L`)+o.toFixed(1)+` `+s.toFixed(1)}s.setAttribute(`d`,h),s.setAttribute(`stroke`,p8[e%p8.length]),s.setAttribute(`stroke-width`,(5+c*3).toFixed(1)),s.setAttribute(`opacity`,`0.85`)}}function b8(e,t){let n=t%e.period,r=e.period-e.hold;if(n<r)return 0;let i=n-r,a=e.hold-i;return Math.max(0,Math.min(1,Math.min(i,a)/200))}function x8(e){let t=h8[e.state],n=Q6/2,r=e.strength;if(e.trails&&(t?.trails&&e.showEffects&&e.showTrails!==!1&&r>0?y8(e.trails,t.trails,e.elapsed,r,n,n):e.trails.childNodes.length&&e.trails.replaceChildren()),e.confetti&&(t?.confetti&&e.showEffects&&r>0?v8(e.confetti,t.confetti,e.elapsed,r,n,n):e.confetti.childNodes.length&&e.confetti.replaceChildren()),e.glyph&&e.bodyContent){if(t?.glyph&&e.showGlyphs){let r=b8(t.glyph,e.elapsed),i=t.glyph.markup.replace(/\{\{GRADIENT\}\}/g,e.paint);e.glyph.getAttribute(`data-glyph`)!==i&&(e.glyph.setAttribute(`data-glyph`,i),e.glyph.innerHTML=i),e.glyph.style.opacity=String(r);let a=.72+.28*r;e.glyph.setAttribute(`transform`,`translate(${n} ${n}) scale(${a.toFixed(3)}) translate(${-n} ${-n})`),e.bodyContent.style.opacity=String(1-r)}else e.glyph.getAttribute(`data-glyph`)&&(e.glyph.removeAttribute(`data-glyph`),e.glyph.replaceChildren()),e.glyph.style.opacity=`0`,e.bodyContent.style.opacity=`1`}}var S8=Object.fromEntries(Object.entries(w0.pools).map(([e,t])=>[e,[...t]])),C8={sleeping:[6e3,1e4],waking:[800,800],idle:[9e3,16e3],listening:[2800,5e3],thinking:[2e3,3600],searching:[1e3,1800],working:[1800,3200],excited:[1100,2e3],surprised:[2500,4e3],suspicious:[2600,4500],angry:[2200,3800],drowsy:[4e3,8e3],happy:[2500,4500],curious:[1800,3200],confused:[2200,3800],bored:[3500,6e3],proud:[3500,6e3],shy:[3e3,5500],sad:[4e3,7e3],laughing:[1200,2400],scared:[900,1800],playful:[1500,3e3],celebrate:[1400,2600],orbit:[4e3,8e3],radar:[4e3,8e3],progress:[4e3,8e3],spawning:[1200,1200],humming:[5e3,9e3],loading:[6e3,1e4],dictating:[4e3,8e3],sending:[4e3,8e3],receiving:[4e3,8e3],uploading:[4e3,8e3],writing:[4e3,8e3],notifying:[1500,2600],alerting:[2e3,3600],bouncing:[3e3,6e3],dragging:[1600,3e3],"powering-down":[6e3,9e3]},w8={sleeping:null,waking:null,idle:[6e3,14e3],listening:[3e3,7e3],thinking:[3500,7e3],searching:[1600,4e3],working:[2800,5500],excited:[2e3,4e3],surprised:[1800,3500],suspicious:[4500,8e3],angry:[3500,7e3],drowsy:null,happy:[2500,5e3],curious:[2500,5500],confused:[2800,5500],bored:[4e3,8e3],proud:[3500,7e3],shy:[3e3,6e3],sad:[4e3,8e3],laughing:[2500,5e3],scared:[1200,3e3],playful:[2e3,4500],celebrate:[2200,4500],orbit:null,radar:null,progress:null,spawning:null,humming:[4e3,8e3],loading:null,dictating:null,sending:null,receiving:null,uploading:null,writing:null,notifying:[2e3,4e3],alerting:null,bouncing:null,dragging:[2200,4500],"powering-down":null};Object.keys(S8).filter(e=>e in S8);var T8=(e,t,n)=>Math.max(t,Math.min(n,e)),E8=()=>null,D8=e=>`M`+e.map(e=>e[0].toFixed(2)+` `+e[1].toFixed(2)).join(`L`)+`Z`,O8=e=>e.map(e=>e.map(e=>[e[0],e[1]])),k8=e=>{let t=0,n=0;for(let r of e)t+=r[0],n+=r[1];return[t/e.length,n/e.length]},A8=e=>`translate(${e.x} ${e.y}) scale(${e.scale}) translate(${-$6[0]} ${-$6[1]})`,j8=e=>{let t=e-1;return 1+2.7*t*t*t+1.7*t*t},M8=e=>e<.5?2*e*e:1-2*(1-e)*(1-e);function N8(e,t,n){if(n<=0)return``;let r=Q6/2,i=Q6,a=(e,n=0)=>Math.sin(t/e*Math.PI*2+n),o=0,s=0,c=e.tilt?e.tilt*n:0,l=1,u=1,d=1;if(e.bob){let[t,r]=e.bob,i=a(r);if(s-=t*n*i,e.squash){let t=e.squash*n*Math.max(0,-i);d=1-t*.5,u=1+t*.5}}if(e.circle){let[t,r]=e.circle;o+=t*n*a(r),s+=t*n*a(r,Math.PI/2)}if(e.sway){let[t,r]=e.sway;c+=t*n*a(r)}if(e.pulse){let[t,r]=e.pulse;l*=1+t*n*a(r)}if(e.jitter){let[t,r]=e.jitter;o+=t*n*a(r),s+=t*n*a(r*.63,1.1)}if(e.enter){let[n,r]=e.enter,i=t/r;l*=i>=1?1:n+(1-n)*j8(Math.max(i,0))}if(e.settle!==void 0){let r=Math.min(Math.max(t/l8,0),1);l*=1+(e.settle-1)*M8(r)*n}let f=[];return(o||s)&&f.push(`translate(${o.toFixed(2)} ${s.toFixed(2)})`),c&&f.push(`rotate(${c.toFixed(2)} ${r} ${r})`),l!==1&&f.push(`translate(${r} ${r}) scale(${l.toFixed(4)}) translate(${-r} ${-r})`),(u!==1||d!==1)&&f.push(`translate(${r} ${i}) scale(${u.toFixed(4)} ${d.toFixed(4)}) translate(${-r} ${-i})`),f.join(` `)}function P8(){return{current:O8(t8[0]),target:t8[0],expression:0,morph:1,velocity:0,blinkStart:E8(),spinStart:E8(),spinDuration:900,last:0,stateStart:0,lastState:`idle`,lastBodyTransform:``,props:{state:`idle`,expression:void 0,gaze:void 0,turn:0,spring:7,eyeScale:1,paused:!0,motionStrength:0,effects:!0,glyphs:!0,ribbons:!0}}}var F8=0;function I8(e,t){let n=`maus-${++F8}`,r={current:P8()},i={current:t.color},a=t=>({current:e.querySelector(`[data-part="${t}"]`)});e.setAttribute(`viewBox`,a8),e.innerHTML=`<defs><clipPath id="${n}-clip" data-part="clip" /></defs><g data-part="trails"/><g data-part="bodyGroup"><g data-part="bodyContent"><g data-part="outline"/><g clip-path="url(#${n}-clip)"><g data-part="face"><path data-part="eye0" fill="white"/><path data-part="eye1" fill="white"/></g></g></g><g data-part="glyph" opacity="0"/></g><g data-part="confetti"/>`;let o=a(`eye0`),s=a(`eye1`),c=a(`bodyGroup`),l=a(`bodyContent`),u=a(`trails`),d=a(`confetti`),f=a(`glyph`),p=(e,t=!1)=>{let n=r.current,i=(e%n8+n8)%n8;i===n.expression&&n.morph>=1&&!t||(n.current=L8(n),n.target=t8[i],n.expression=i,n.morph=+!!t,n.velocity=0)},m=(e,t,n)=>{let r=e.props,a=L8(e),p=T8(r.gaze?.x??0,-1,1)*e8.x,m=T8(r.gaze?.y??0,-1,1)*e8.y,h=((r.turn??0)+n)*Math.PI/180,g=r.eyeScale??1,_=R8(e,t);a.forEach((e,t)=>{let n=t===0?o.current:s.current;if(!n)return;let r=k8(e),i=Math.asin(T8((r[0]-o8)/s8,-1,1)),a=i+h,c=Math.cos(a),l=Math.max(c,.02)/Math.max(Math.cos(i),.02);n.setAttribute(`d`,D8(e)),n.setAttribute(`transform`,`translate(${(o8+s8*Math.sin(a)+p).toFixed(2)} ${(r[1]+m).toFixed(2)}) scale(${T8(l*g,.02,2.4).toFixed(4)} ${T8(_*g,.02,2.4).toFixed(4)}) translate(${(-r[0]).toFixed(2)} ${(-r[1]).toFixed(2)})`),n.style.opacity=c>.02?`1`:`0`});let v=c.current;if(v){r.state!==e.lastState&&(e.lastState=r.state,e.stateStart=t);let n=N8(c8[r.state]??{},t-e.stateStart,r.motionStrength??1);n!==e.lastBodyTransform&&(e.lastBodyTransform=n,n?v.setAttribute(`transform`,n):v.removeAttribute(`transform`))}x8({trails:u.current,confetti:d.current,glyph:f.current,bodyContent:l.current,state:r.state,elapsed:t-e.stateStart,strength:r.motionStrength??1,paint:i.current,showEffects:r.effects!==!1,showGlyphs:r.glyphs!==!1,showTrails:r.ribbons!==!1})},h=t,g=0,_,v,y=!1;function ee(){cancelAnimationFrame(g),g=0,clearTimeout(_),clearTimeout(v)}function te(){let e=w8[h.state];h.paused||h.fixedTime!==void 0||!e||(_=setTimeout(()=>{r.current.blinkStart=performance.now(),te()},e[0]+Math.random()*(e[1]-e[0])))}function b(){if(h.paused||h.fixedTime!==void 0||h.expression!==void 0)return;let[e,t]=C8[h.state];v=setTimeout(()=>{let e=S8[h.state].filter(e=>e!==r.current.expression);p(e.length?e[Math.floor(Math.random()*e.length)]:S8[h.state][0]),b()},e+Math.random()*(t-e))}function x(e){if(g=0,y||h.paused||h.fixedTime!==void 0)return;let t=r.current,n=Math.min((e-t.last)/1e3,.1);t.last=e,t.velocity+=(-14*t.velocity-49*(t.morph-1))*n,t.morph+=t.velocity*n,Number.isFinite(t.morph)||(t.morph=1,t.velocity=0),m(t,e,0),g=requestAnimationFrame(x)}let S=``,C=``;function w(t){let n=h.state!==t.state||h.expression!==t.expression,o=h.paused!==t.paused||h.fixedTime!==t.fixedTime;h=t,e.setAttribute(`viewBox`,t.silhouette.viewBox??a8);let s=r.current,d=performance.now();i.current=t.color,s.props={...s.props,state:t.state,expression:t.expression,gaze:t.gaze,paused:t.paused,motionStrength:+!t.paused,ribbons:t.ribbons!==!1};let[f,_,v,y]=(t.silhouette.viewBox??a8).split(/\s+/).map(Number),w=f+v/2,T=_+y/2;!t.paused&&t.ribbons!==!1&&h8[t.state]?.trails,c.current.style.visibility=t.effectsOnly?`hidden`:``,l.current.setAttribute(`transform`,``),u.current.setAttribute(`transform`,`translate(${w} ${T}) scale(${Math.min(v,y)/Q6}) translate(${-Q6/2} ${-Q6/2})`);let E=a(`outline`).current,ne=a(`clip`).current,D=a(`face`).current,re=t.silhouette.body.replace(/\{\{GRADIENT\}\}/g,t.color);S!==re&&(E.innerHTML=re,S=re),C!==t.silhouette.clip&&(ne.innerHTML=t.silhouette.clip,C=t.silhouette.clip),E.setAttribute(`transform`,t.silhouette.fit||``),ne.setAttribute(`transform`,t.silhouette.fit||``),D.setAttribute(`transform`,A8(t.silhouette.anchor)),(n||t.paused||s.last===0)&&p(t.expression??S8[t.state][0],t.paused||s.last===0),(n||s.last===0)&&(s.stateStart=d,s.lastState=t.state),s.last=d,(n||o||!g)&&(ee(),te(),b()),m(s,t.paused?s.stateStart+(t.fixedTime??0):t.fixedTime===void 0?d:s.stateStart+t.fixedTime,0),!t.paused&&t.fixedTime===void 0&&!g&&(g=requestAnimationFrame(x))}return w(t),{update:w,dispose(){y=!0,ee(),e.replaceChildren()}}}function L8(e){let t=T8(e.morph,0,1);return e.current.map((n,r)=>n.map((n,i)=>[n[0]+(e.target[r][i][0]-n[0])*t,n[1]+(e.target[r][i][1]-n[1])*t]))}function R8(e,t){if(e.blinkStart===null)return 1;let n=(t-e.blinkStart)/320;return n>=1?(e.blinkStart=null,1):Math.max(n<.42?1-n/.42:(n-.42)/.58,.04)}function z8(e,t){let[n,r,i]=t.anchor;return{name:e,fit:``,body:`<path d="${t.path}" fill="{{GRADIENT}}"/>`,clip:`<path d="${t.path}"/>`,anchor:{x:n,y:r,scale:i},viewBox:t.viewport.join(` `)}}var B8=Object.fromEntries(Object.entries(w0.shapes).map(([e,t])=>[e===`ellipse`?`oval`:e,z8(e,t)])),V8=Object.fromEntries(Object.entries(w0.bodies).map(([e,t])=>[e,z8(e,t)])),H8=`#34C759`;function U8(e){return e===`working`||e===`loading`}function W8(e){return e<20?0:Math.max(8,Math.round(e/4))}function G8(e,t){return t?`${e},正在工作`:e}function K8(e,t,r){let i=k(!1),a;u(t,e=>{clearTimeout(a),i.value=!1,e===`loading`&&(a=setTimeout(()=>{i.value=!0},300))},{immediate:!0}),n(()=>clearTimeout(a));let o=Te(()=>e()&&U8(t())&&(t()===`working`||i.value)),s=Te(()=>W8(r()));return{active:o,dotSize:s,visible:Te(()=>o.value&&s.value>0)}}var q8=`#FF9500`,J8=`#4D73FA`;function Y8(e){return e?J8:q8}function X8(e){return e>=64?24:e>=48?18:e>=40?16:10}var Z8=[`aria-label`,`data-animated`,`data-expression`],Q8={key:0,class:`agent-avatar__placeholder`,"aria-hidden":`true`},$8=[`src`],e5=Ce(D({__name:`AgentAvatar`,props:{name:{},avatar:{default:``},size:{default:32},mainBot:{type:Boolean},unread:{type:Boolean,default:!1},state:{default:`idle`},animated:{type:Boolean,default:void 0},fixedTime:{},expressionIndex:{},activityKey:{},ribbons:{type:Boolean,default:!1},workingDot:{type:Boolean,default:!1}},setup(e){let t=e,r=Te(()=>X8(t.size)),i=Te(()=>Y8(t.unread)),a=K8(()=>t.workingDot,()=>t.state,()=>t.size),l=Te(()=>t.mainBot&&!a.visible.value),d=k(),f=k(),p=k(!0),m=k(!0),g=k(!1),_=k(!1),v=k({x:0,y:0}),y=k(),ee=k(!1),te=k(!1),b,x,S,C,w=Te(()=>x0(t.avatar)),T=Te(()=>w.value?.avatarMode===`image`&&!!w.value.imageDataURL&&!te.value),E=Te(()=>w.value?.avatarMode===`mascot`),ne=Te(()=>T.value||E.value),D=Te(()=>w.value?.imageCrop===`circle`?`50%`:w.value?.imageCrop===`square`?`0`:`22%`),re={idle:`idle`,working:`working`,loading:`loading`,waiting:`alerting`,notifying:`notifying`,success:`happy`,failure:`sad`},ie=Te(()=>t.state!==`idle`&&!ee.value),ae=Te(()=>T.value&&t.ribbons!==!1&&ie.value&&[`working`,`loading`].includes(t.state)),O=Te(()=>ie.value?re[t.state]:y.value??w.value?.expression??`idle`),oe=Te(()=>ne.value&&p.value&&m.value&&!g.value&&t.animated!==!1&&(t.animated===!0||t.size>=56||ie.value||!!y.value||_.value)),se=Te(()=>w.value&&ne.value?{state:O.value,paused:!oe.value,color:w.value.color,gaze:v.value,silhouette:T.value?B8.circle:w.value.bodyId?V8[w.value.bodyId]:B8[w.value.shape===`ellipse`?`oval`:w.value.shape],fixedTime:t.fixedTime,expression:t.expressionIndex,effectsOnly:T.value,ribbons:t.ribbons!==!1&&(ie.value||O.value!==`working`)}:void 0);function ce(){if(!f.value||!se.value||T.value&&!ae.value){C?.dispose(),C=void 0;return}C?C.update(se.value):C=I8(f.value,se.value)}function le(e){if(g.value||t.animated===!1)return;let n=e.currentTarget.getBoundingClientRect();_.value=!0,v.value={x:Math.max(-1,Math.min(1,(e.clientX-n.left)/n.width*2-1)),y:Math.max(-1,Math.min(1,(e.clientY-n.top)/n.height*2-1))}}function ue(){_.value=!1,v.value={x:0,y:0}}function de(){m.value=document.visibilityState!==`hidden`}function fe(){g.value=S?.matches??!1}return u(()=>t.avatar,()=>{te.value=!1}),u(()=>[t.state,t.activityKey],([e])=>{clearTimeout(b),ee.value=!1,y.value=void 0,t.fixedTime===void 0&&[`success`,`failure`,`notifying`].includes(e)&&(b=setTimeout(()=>{ee.value=!0},1400))},{immediate:!0}),u([se,f,ae],ce,{flush:`post`}),h(()=>{de(),S=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),fe(),S?.addEventListener(`change`,fe),document.addEventListener(`visibilitychange`,de),typeof IntersectionObserver<`u`&&d.value&&(x=new IntersectionObserver(e=>{p.value=e[0]?.isIntersecting??!1}),x.observe(d.value)),ce()}),n(()=>{C?.dispose(),x?.disconnect(),clearTimeout(b),S?.removeEventListener(`change`,fe),document.removeEventListener(`visibilitychange`,de)}),(n,u)=>(c(),A(`span`,{ref_key:`host`,ref:d,class:s([`agent-avatar`,[`agent-avatar--${t.state}`,{"agent-avatar--image":T.value,"agent-avatar--image-active":ae.value&&oe.value}]]),style:o({width:`${e.size}px`,height:`${e.size}px`}),role:`img`,"aria-label":j(G8)(`${e.name} 的头像${e.mainBot?`,主 Bot`:``}${e.mainBot&&e.unread&&!j(a).visible.value?`,未读`:``}`,j(a).visible.value),onPointermove:le,onPointerleave:ue,"data-animated":oe.value&&(!T.value||ae.value),"data-expression":O.value},[ne.value?ve(``,!0):(c(),A(`span`,Q8)),T.value?(c(),A(`img`,{key:1,onError:u[0]||=e=>te.value=!0,src:w.value?.imageDataURL,alt:``,style:o({borderRadius:D.value})},null,44,$8)):ve(``,!0),E.value||ae.value?(c(),A(`svg`,{key:2,ref_key:`svg`,ref:f,"aria-hidden":`true`},null,512)):ve(``,!0),j(a).visible.value?(c(),A(`span`,{key:3,class:`working-dot`,"data-working-dot":``,style:o({width:`${j(a).dotSize.value}px`,height:`${j(a).dotSize.value}px`,background:j(H8)}),"aria-hidden":`true`},null,4)):ve(``,!0),l.value?(c(),A(`span`,{key:4,class:`main-bot-star`,style:o({width:`${r.value}px`,height:`${r.value}px`,background:i.value}),"aria-hidden":`true`},[De(sN,{name:`star-filled`,size:Math.round(r.value*.65)},null,8,[`size`])],4)):ve(``,!0)],46,Z8))}}),[[`__scopeId`,`data-v-458f3dde`]]),t5=[`aria-label`],n5=[`src`],r5={key:2,class:`team-avatar__cluster`,"aria-hidden":`true`},i5=Ce(D({__name:`TeamAvatar`,props:{name:{},avatar:{default:``},members:{default:()=>[]},fallbackKey:{default:``},size:{default:32},workingDot:{type:Boolean}},setup(e){let t=e,n=Te(()=>t.members.some(e=>e.state===`working`)?`working`:t.members.some(e=>e.state===`loading`)?`loading`:`idle`),r=K8(()=>t.workingDot,()=>n.value,()=>t.size),i=Te(()=>/^data:image\/(png|jpeg|webp);base64,/i.test(t.avatar)),a=Te(()=>t.members.slice(0,3).map(e=>({name:e.name,avatar:e.avatar||``,state:e.state||`idle`,activityKey:e.activityKey})));return(t,n)=>(c(),A(`span`,{class:`team-avatar`,style:o({width:`${e.size}px`,height:`${e.size}px`}),role:`img`,"aria-label":j(G8)(`${e.name}团队头像`,j(r).visible.value)},[i.value?(c(),A(`img`,{key:0,class:`team-avatar__image`,src:e.avatar,alt:``},null,8,n5)):a.value.length?(c(),A(`span`,r5,[(c(!0),A(E,null,m(a.value,(t,n)=>(c(),se(e5,{key:`${t.name}:${n}`,class:s([`team-avatar__member`,`team-avatar__member--${n+1}`]),name:t.name,avatar:t.avatar,state:t.state,"activity-key":t.activityKey,size:Math.round(e.size*.64)},null,8,[`class`,`name`,`avatar`,`state`,`activity-key`,`size`]))),128))])):(c(),se(sN,{key:1,name:`groups`,size:e.size},null,8,[`size`])),j(r).visible.value?(c(),A(`span`,{key:3,class:`working-dot`,"data-working-dot":``,style:o({width:`${j(r).dotSize.value}px`,height:`${j(r).dotSize.value}px`,background:j(H8)}),"aria-hidden":`true`},null,4)):ve(``,!0)],12,t5))}}),[[`__scopeId`,`data-v-5afded22`]]),a5={class:`identity-fixture`},o5={class:`shape-row`,"aria-label":`三种头像形状`},s5={class:`state-list`,"aria-label":`头像状态动画`},c5={class:`group-preview`,"aria-label":`群聊组合头像`},l5=Ce(D({__name:`AgentIdentityFixture`,setup(e){let t=e=>S0({...v0(`preview`),shape:e}),n=[{name:`圆圆`,avatar:t(`circle`)},{name:`方方`,avatar:t(`square`)},{name:`小三角`,avatar:t(`triangle`)}],r=[{name:`工作中`,detail:`状态驱动的眼睛和身体动作`,avatar:t(`triangle`),state:`working`},{name:`有新消息`,detail:`头像弹跳并提醒`,avatar:t(`triangle`),state:`notifying`},{name:`等待你操作`,detail:`状态驱动的眼睛和身体动作`,avatar:t(`square`),state:`waiting`}],i=n.map(e=>({name:e.name,avatar:e.avatar}));return(e,t)=>(c(),A(`main`,a5,[t[1]||=O(`header`,null,[O(`span`,null,`跨端角色系统`),O(`h1`,null,`自定义机器人角色`),O(`p`,null,`采用 OpenMausBot 的纯色轮廓、五官与状态动画。`)],-1),O(`section`,o5,[(c(),A(E,null,m(n,e=>O(`article`,{key:e.name},[De(e5,{name:e.name,avatar:e.avatar,size:88},null,8,[`name`,`avatar`]),O(`strong`,null,v(e.name),1)])),64))]),O(`section`,s5,[(c(),A(E,null,m(r,e=>O(`article`,{key:e.name},[De(e5,{name:e.name,avatar:e.avatar,size:58,state:e.state},null,8,[`name`,`avatar`,`state`]),O(`div`,null,[O(`strong`,null,v(e.name),1),O(`span`,null,v(e.detail),1)])])),64))]),O(`section`,c5,[De(i5,{name:`产品设计团队`,members:j(i),"fallback-key":`design-team`,size:92},null,8,[`members`]),t[0]||=O(`div`,null,[O(`strong`,null,`产品设计团队`),O(`span`,null,`群聊图标由成员角色自动组成`)],-1)])]))}}),[[`__scopeId`,`data-v-45178542`]]),u5=0;function d5(e=`web`){let t=globalThis.crypto?.randomUUID?.();return t?t.toLowerCase():(u5+=1,`${e}-${Date.now().toString(36)}-${u5.toString(36)}-${Math.random().toString(36).slice(2,10)}`)}function f5(){let e=globalThis.crypto?.randomUUID?.();if(e)return e.toLowerCase();let t=new Uint8Array(16);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let e=0;e<t.length;e+=1)t[e]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map(e=>e.toString(16).padStart(2,`0`)).join(``);return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}var p5=k(null);function m5(e,t){let r=window.yaoviDesktop;if(!r?.attentionState)return;let i=f5();async function a(){if(e())try{let e=await r.systemState?.()??{idleSeconds:0,locked:!1};await jN(`/api/app/presence`,{method:`POST`,body:{clientId:i,focused:document.hasFocus()&&document.visibilityState===`visible`,conversationId:p5.value,idleSeconds:e.idleSeconds,locked:e.locked}})}catch{}}u(()=>[e(),p5.value],([e,t])=>{r.attentionState(e?{account:e,conversationId:t}:null).catch(()=>{}),a()},{immediate:!0});let o=setInterval(()=>void a(),3e4),s=()=>void a();for(let e of[`focus`,`blur`])window.addEventListener(e,s);document.addEventListener(`visibilitychange`,s);let c=r.onOpenConversation?.(t),l=r.onSystemChanged?.(s);n(()=>{clearInterval(o),c?.(),l?.();for(let e of[`focus`,`blur`])window.removeEventListener(e,s);document.removeEventListener(`visibilitychange`,s)})}var h5=D({__name:`App`,setup(e){let t=t0(),n=v1();u(()=>n.isAuthenticated?`${n.serverIdentity?.serverId??location.origin}:${n.user?.id??``}`:``,()=>{n.isAuthenticated&&n.user?t.start(n.user.id):(t.reset(),window.yaoviDesktop?.unreadState?.(null).catch(()=>{}))},{immediate:!0});let r=y1(),i=ia(),a=ra();m5(()=>n.isAuthenticated?n.user?.id??null:null,e=>{a.push({path:`/conversations/${e.conversationId}`,query:{...e.conversationTaskId?{taskId:e.conversationTaskId}:{},...e.messageId?{unread:e.messageId}:{}}})});let o=Te(()=>`${i.name===`computer`?`电脑接管`:i.name===`bot-automations`?`自动化`:i.name===`bot-workstreams`?`工作流`:i.name===`token-usage`?`Token 用量`:`Bot`} · Yaovi`);return u(()=>r.resolvedTheme,e=>{document.documentElement.classList.toggle(`dark`,e===`dark`),document.documentElement.dataset.theme=e,document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,e===`dark`?`#181817`:`#f8f8f6`)},{immediate:!0}),u(o,e=>{document.title=e},{immediate:!0}),h(()=>{n.bootstrap()}),(e,t)=>{let r=Ne(`RouterView`);return j(!1)?(c(),se(l5,{key:0})):j(n).status===`checking`?(c(),se(Yj,{key:1})):j(n).isAuthenticated?(c(),A(E,{key:3},[De(Uj),De(r)],64)):(c(),se(Z1,{key:2}))}}}),g5=`modulepreload`,_5=function(e){return`/`+e},v5={},y5=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=_5(t,n),t=s(t),t in v5)return;v5[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`:g5,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)})},b5=na({history:[`file:`,`yaovi-app:`].includes(location.protocol)?xi():bi(`/`),routes:[{path:`/`,redirect:`/conversations`},{path:`/chat/:sessionId?`,name:`chat`,redirect:`/conversations`},{path:`/history/:sessionId?`,name:`history`,redirect:`/conversations`},{path:`/conversations/computer/:agentId`,name:`computer`,component:()=>y5(()=>import(`./ComputerViewerView-BoI_aqLr.js`),__vite__mapDeps([0,1,2,3,4]))},{path:`/conversations/usage`,name:`token-usage`,component:()=>y5(()=>import(`./UsageView-ZsSbQzIY.js`),__vite__mapDeps([5,1,6]))},{path:`/conversations/automations`,name:`bot-automations`,component:()=>y5(()=>import(`./BotAutomationsView-C4EwHtYy.js`),__vite__mapDeps([7,1,8,9,10]))},{path:`/conversations/workstreams`,name:`bot-workstreams`,component:()=>y5(()=>import(`./WorkstreamsView-CxZ8YUvP.js`),__vite__mapDeps([11,1,12,13]))},{path:`/conversations/:id?`,name:`conversations`,component:()=>y5(()=>import(`./ConversationsView-kztie5lF.js`).then(e=>e.t),__vite__mapDeps([14,15,1,16,17,18,19,20,21,8,9,2,3,12,22]))},{path:`/kanban/:boardSlug?`,name:`kanban`,redirect:`/conversations`},{path:`/files`,redirect:`/conversations`},{path:`/artifacts`,redirect:`/conversations`},{path:`/:pathMatch(.*)*`,redirect:`/conversations`}],scrollBehavior:()=>({top:0})}),x5=pn(h5);x5.config.errorHandler=(e,t,n)=>{console.error(`Vue render error (${n})`,e)},b5.onError(e=>{console.error(`Router navigation error`,e)}),x5.use(Pn()).use(b5).mount(`#app`);export{ui as $,gN as A,sN as B,v1 as C,_$ as D,y$ as E,dN as F,Oj as G,Kj as H,uN as I,Mj as J,Cj as K,cN as L,MN as M,CN as N,IN as O,NN as P,ra as Q,lN as R,y1 as S,p1 as T,Wj as U,CM as V,kj as W,sa as X,mj as Y,ia as Z,x0 as _,i5 as a,Xt as at,y0 as b,s0 as c,ln as ct,d0 as d,di as et,o0 as f,C0 as g,a0 as h,f5 as i,Yt as it,jN as j,zN as k,c0 as l,sn as lt,i0 as m,p5 as n,qt as nt,e5 as o,Kt as ot,l0 as p,Nj as q,d5 as r,tn as rt,f0 as s,dt as st,y5 as t,qe as tt,u0 as u,v0 as v,$ as w,t0 as x,S0 as y,fN as z};
139
+ //# sourceMappingURL=index-P_kZCZ2-.js.map