@mseep/obsidian-agent-client 0.10.6

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 (146) hide show
  1. package/.claude/hooks/gh-setup.sh +49 -0
  2. package/.claude/settings.json +15 -0
  3. package/.claude/skills/release-notes/SKILL.md +331 -0
  4. package/.editorconfig +10 -0
  5. package/.github/FUNDING.yml +2 -0
  6. package/.github/ISSUE_TEMPLATE/bug_report.yml +90 -0
  7. package/.github/ISSUE_TEMPLATE/config.yml +11 -0
  8. package/.github/ISSUE_TEMPLATE/feature_request.yml +59 -0
  9. package/.github/copilot-instructions.md +45 -0
  10. package/.github/pull_request_template.md +32 -0
  11. package/.github/workflows/ci.yaml +25 -0
  12. package/.github/workflows/docs.yml +58 -0
  13. package/.github/workflows/relay_to_openclaw.yml +59 -0
  14. package/.github/workflows/release.yaml +45 -0
  15. package/.prettierignore +10 -0
  16. package/.prettierrc +13 -0
  17. package/.vscode/extensions.json +7 -0
  18. package/.vscode/settings.json +37 -0
  19. package/.zed/settings.json +42 -0
  20. package/AGENTS.md +330 -0
  21. package/ARCHITECTURE.md +390 -0
  22. package/CONTRIBUTING.md +216 -0
  23. package/LICENSE +202 -0
  24. package/NOTICE +2 -0
  25. package/README.ja.md +121 -0
  26. package/README.md +125 -0
  27. package/docs/.vitepress/config.mts +124 -0
  28. package/docs/.vitepress/theme/custom.css +111 -0
  29. package/docs/.vitepress/theme/index.ts +4 -0
  30. package/docs/agent-setup/claude-code.md +84 -0
  31. package/docs/agent-setup/codex.md +76 -0
  32. package/docs/agent-setup/custom-agents.md +67 -0
  33. package/docs/agent-setup/gemini-cli.md +99 -0
  34. package/docs/agent-setup/index.md +34 -0
  35. package/docs/announcements/gemini-cli-deprecation.md +73 -0
  36. package/docs/getting-started/index.md +78 -0
  37. package/docs/getting-started/quick-start.md +38 -0
  38. package/docs/help/faq.md +181 -0
  39. package/docs/help/troubleshooting.md +221 -0
  40. package/docs/index.md +63 -0
  41. package/docs/public/apple-touch-icon.png +0 -0
  42. package/docs/public/demo.mp4 +0 -0
  43. package/docs/public/favicon-16x16.png +0 -0
  44. package/docs/public/favicon-32x32.png +0 -0
  45. package/docs/public/favicon.ico +0 -0
  46. package/docs/public/images/editing.webp +0 -0
  47. package/docs/public/images/export.webp +0 -0
  48. package/docs/public/images/floating-chat-button.webp +0 -0
  49. package/docs/public/images/floating-chat-instance-menu.webp +0 -0
  50. package/docs/public/images/floating-chat-view.webp +0 -0
  51. package/docs/public/images/mode-selection.webp +0 -0
  52. package/docs/public/images/model-selection.webp +0 -0
  53. package/docs/public/images/multi-session.webp +0 -0
  54. package/docs/public/images/remove-image.webp +0 -0
  55. package/docs/public/images/ribbon-icon.webp +0 -0
  56. package/docs/public/images/selection-context.gif +0 -0
  57. package/docs/public/images/sending-images.webp +0 -0
  58. package/docs/public/images/sending-messages.webp +0 -0
  59. package/docs/public/images/session-history-button.webp +0 -0
  60. package/docs/public/images/slash-commands-1.webp +0 -0
  61. package/docs/public/images/slash-commands-2.webp +0 -0
  62. package/docs/public/images/switch-agent.webp +0 -0
  63. package/docs/public/images/switch-default-agent.webp +0 -0
  64. package/docs/public/images/temporary-disable.gif +0 -0
  65. package/docs/reference/acp-support.md +110 -0
  66. package/docs/usage/chat-export.md +80 -0
  67. package/docs/usage/commands.md +51 -0
  68. package/docs/usage/context-files.md +57 -0
  69. package/docs/usage/editing.md +69 -0
  70. package/docs/usage/floating-chat.md +84 -0
  71. package/docs/usage/index.md +97 -0
  72. package/docs/usage/mcp-tools.md +33 -0
  73. package/docs/usage/mentions.md +70 -0
  74. package/docs/usage/mode-selection.md +28 -0
  75. package/docs/usage/model-selection.md +32 -0
  76. package/docs/usage/multi-session.md +68 -0
  77. package/docs/usage/sending-images.md +64 -0
  78. package/docs/usage/session-history.md +91 -0
  79. package/docs/usage/slash-commands.md +44 -0
  80. package/esbuild.config.mjs +49 -0
  81. package/eslint.config.mjs +25 -0
  82. package/main.js +228 -0
  83. package/manifest.json +11 -0
  84. package/package.json +52 -0
  85. package/src/acp/acp-client.ts +921 -0
  86. package/src/acp/acp-handler.ts +252 -0
  87. package/src/acp/permission-handler.ts +282 -0
  88. package/src/acp/terminal-handler.ts +264 -0
  89. package/src/acp/type-converter.ts +272 -0
  90. package/src/hooks/useAgent.ts +250 -0
  91. package/src/hooks/useAgentMessages.ts +470 -0
  92. package/src/hooks/useAgentSession.ts +544 -0
  93. package/src/hooks/useChatActions.ts +400 -0
  94. package/src/hooks/useHistoryModal.ts +219 -0
  95. package/src/hooks/useSessionHistory.ts +863 -0
  96. package/src/hooks/useSettings.ts +19 -0
  97. package/src/hooks/useSuggestions.ts +342 -0
  98. package/src/main.ts +9 -0
  99. package/src/plugin.ts +1126 -0
  100. package/src/services/chat-exporter.ts +552 -0
  101. package/src/services/message-sender.ts +755 -0
  102. package/src/services/message-state.ts +375 -0
  103. package/src/services/session-helpers.ts +211 -0
  104. package/src/services/session-state.ts +130 -0
  105. package/src/services/session-storage.ts +267 -0
  106. package/src/services/settings-normalizer.ts +255 -0
  107. package/src/services/settings-service.ts +285 -0
  108. package/src/services/update-checker.ts +128 -0
  109. package/src/services/vault-service.ts +558 -0
  110. package/src/services/view-registry.ts +345 -0
  111. package/src/types/agent.ts +92 -0
  112. package/src/types/chat.ts +351 -0
  113. package/src/types/errors.ts +136 -0
  114. package/src/types/obsidian-internals.d.ts +14 -0
  115. package/src/types/session.ts +731 -0
  116. package/src/ui/ChangeDirectoryModal.ts +137 -0
  117. package/src/ui/ChatContext.ts +25 -0
  118. package/src/ui/ChatHeader.tsx +295 -0
  119. package/src/ui/ChatPanel.tsx +1162 -0
  120. package/src/ui/ChatView.tsx +348 -0
  121. package/src/ui/ErrorBanner.tsx +104 -0
  122. package/src/ui/FloatingButton.tsx +351 -0
  123. package/src/ui/FloatingChatView.tsx +531 -0
  124. package/src/ui/InputArea.tsx +1107 -0
  125. package/src/ui/InputToolbar.tsx +371 -0
  126. package/src/ui/MessageBubble.tsx +442 -0
  127. package/src/ui/MessageList.tsx +265 -0
  128. package/src/ui/PermissionBanner.tsx +61 -0
  129. package/src/ui/SessionHistoryModal.tsx +821 -0
  130. package/src/ui/SettingsTab.ts +1337 -0
  131. package/src/ui/SuggestionPopup.tsx +138 -0
  132. package/src/ui/TerminalBlock.tsx +107 -0
  133. package/src/ui/ToolCallBlock.tsx +456 -0
  134. package/src/ui/shared/AttachmentStrip.tsx +57 -0
  135. package/src/ui/shared/IconButton.tsx +55 -0
  136. package/src/ui/shared/MarkdownRenderer.tsx +103 -0
  137. package/src/ui/view-host.ts +56 -0
  138. package/src/utils/error-utils.ts +274 -0
  139. package/src/utils/logger.ts +44 -0
  140. package/src/utils/mention-parser.ts +129 -0
  141. package/src/utils/paths.ts +246 -0
  142. package/src/utils/platform.ts +425 -0
  143. package/styles.css +2322 -0
  144. package/tsconfig.json +18 -0
  145. package/version-bump.mjs +18 -0
  146. package/versions.json +3 -0
package/main.js ADDED
@@ -0,0 +1,228 @@
1
+ /*
2
+ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
3
+ if you want to view the source, please visit the github repository of this plugin
4
+ */
5
+
6
+ var ZA=Object.create;var Ns=Object.defineProperty;var VA=Object.getOwnPropertyDescriptor;var WA=Object.getOwnPropertyNames;var qA=Object.getPrototypeOf,BA=Object.prototype.hasOwnProperty;var HA=(e,t,n)=>t in e?Ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vn=(e,t)=>{for(var n in t)Ns(e,n,{get:t[n],enumerable:!0})},H$=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of WA(t))!BA.call(e,r)&&r!==n&&Ns(e,r,{get:()=>t[r],enumerable:!(i=VA(t,r))||i.enumerable});return e};var H=(e,t,n)=>(n=e!=null?ZA(qA(e)):{},H$(t||!e||!e.__esModule?Ns(n,"default",{value:e,enumerable:!0}):n,e)),GA=e=>H$(Ns({},"__esModule",{value:!0}),e);var Ul=(e,t,n)=>(HA(e,typeof t!="symbol"?t+"":t,n),n),xf=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var ie=(e,t,n)=>(xf(e,t,"read from private field"),n?n.call(e):t.get(e)),nt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},En=(e,t,n,i)=>(xf(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),G$=(e,t,n,i)=>({set _(r){En(e,t,r,n)},get _(){return ie(e,t,i)}}),Wn=(e,t,n)=>(xf(e,t,"access private method"),n);var to=ne((IF,J$)=>{"use strict";var JA="2.0.0",KA=Number.MAX_SAFE_INTEGER||9007199254740991,XA=16,YA=256-6,QA=["major","premajor","minor","preminor","patch","prepatch","prerelease"];J$.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:XA,MAX_SAFE_BUILD_LENGTH:YA,MAX_SAFE_INTEGER:KA,RELEASE_TYPES:QA,SEMVER_SPEC_VERSION:JA,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Os=ne((CF,K$)=>{"use strict";var eN=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};K$.exports=eN});var no=ne((qn,X$)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:$f,MAX_SAFE_BUILD_LENGTH:tN,MAX_LENGTH:nN}=to(),rN=Os();qn=X$.exports={};var iN=qn.re=[],oN=qn.safeRe=[],J=qn.src=[],sN=qn.safeSrc=[],K=qn.t={},aN=0,_f="[a-zA-Z0-9-]",lN=[["\\s",1],["\\d",nN],[_f,tN]],uN=e=>{for(let[t,n]of lN)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},ae=(e,t,n)=>{let i=uN(t),r=aN++;rN(e,r,t),K[e]=r,J[r]=t,sN[r]=i,iN[r]=new RegExp(t,n?"g":void 0),oN[r]=new RegExp(i,n?"g":void 0)};ae("NUMERICIDENTIFIER","0|[1-9]\\d*");ae("NUMERICIDENTIFIERLOOSE","\\d+");ae("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${_f}*`);ae("MAINVERSION",`(${J[K.NUMERICIDENTIFIER]})\\.(${J[K.NUMERICIDENTIFIER]})\\.(${J[K.NUMERICIDENTIFIER]})`);ae("MAINVERSIONLOOSE",`(${J[K.NUMERICIDENTIFIERLOOSE]})\\.(${J[K.NUMERICIDENTIFIERLOOSE]})\\.(${J[K.NUMERICIDENTIFIERLOOSE]})`);ae("PRERELEASEIDENTIFIER",`(?:${J[K.NONNUMERICIDENTIFIER]}|${J[K.NUMERICIDENTIFIER]})`);ae("PRERELEASEIDENTIFIERLOOSE",`(?:${J[K.NONNUMERICIDENTIFIER]}|${J[K.NUMERICIDENTIFIERLOOSE]})`);ae("PRERELEASE",`(?:-(${J[K.PRERELEASEIDENTIFIER]}(?:\\.${J[K.PRERELEASEIDENTIFIER]})*))`);ae("PRERELEASELOOSE",`(?:-?(${J[K.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${J[K.PRERELEASEIDENTIFIERLOOSE]})*))`);ae("BUILDIDENTIFIER",`${_f}+`);ae("BUILD",`(?:\\+(${J[K.BUILDIDENTIFIER]}(?:\\.${J[K.BUILDIDENTIFIER]})*))`);ae("FULLPLAIN",`v?${J[K.MAINVERSION]}${J[K.PRERELEASE]}?${J[K.BUILD]}?`);ae("FULL",`^${J[K.FULLPLAIN]}$`);ae("LOOSEPLAIN",`[v=\\s]*${J[K.MAINVERSIONLOOSE]}${J[K.PRERELEASELOOSE]}?${J[K.BUILD]}?`);ae("LOOSE",`^${J[K.LOOSEPLAIN]}$`);ae("GTLT","((?:<|>)?=?)");ae("XRANGEIDENTIFIERLOOSE",`${J[K.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);ae("XRANGEIDENTIFIER",`${J[K.NUMERICIDENTIFIER]}|x|X|\\*`);ae("XRANGEPLAIN",`[v=\\s]*(${J[K.XRANGEIDENTIFIER]})(?:\\.(${J[K.XRANGEIDENTIFIER]})(?:\\.(${J[K.XRANGEIDENTIFIER]})(?:${J[K.PRERELEASE]})?${J[K.BUILD]}?)?)?`);ae("XRANGEPLAINLOOSE",`[v=\\s]*(${J[K.XRANGEIDENTIFIERLOOSE]})(?:\\.(${J[K.XRANGEIDENTIFIERLOOSE]})(?:\\.(${J[K.XRANGEIDENTIFIERLOOSE]})(?:${J[K.PRERELEASELOOSE]})?${J[K.BUILD]}?)?)?`);ae("XRANGE",`^${J[K.GTLT]}\\s*${J[K.XRANGEPLAIN]}$`);ae("XRANGELOOSE",`^${J[K.GTLT]}\\s*${J[K.XRANGEPLAINLOOSE]}$`);ae("COERCEPLAIN",`(^|[^\\d])(\\d{1,${$f}})(?:\\.(\\d{1,${$f}}))?(?:\\.(\\d{1,${$f}}))?`);ae("COERCE",`${J[K.COERCEPLAIN]}(?:$|[^\\d])`);ae("COERCEFULL",J[K.COERCEPLAIN]+`(?:${J[K.PRERELEASE]})?(?:${J[K.BUILD]})?(?:$|[^\\d])`);ae("COERCERTL",J[K.COERCE],!0);ae("COERCERTLFULL",J[K.COERCEFULL],!0);ae("LONETILDE","(?:~>?)");ae("TILDETRIM",`(\\s*)${J[K.LONETILDE]}\\s+`,!0);qn.tildeTrimReplace="$1~";ae("TILDE",`^${J[K.LONETILDE]}${J[K.XRANGEPLAIN]}$`);ae("TILDELOOSE",`^${J[K.LONETILDE]}${J[K.XRANGEPLAINLOOSE]}$`);ae("LONECARET","(?:\\^)");ae("CARETTRIM",`(\\s*)${J[K.LONECARET]}\\s+`,!0);qn.caretTrimReplace="$1^";ae("CARET",`^${J[K.LONECARET]}${J[K.XRANGEPLAIN]}$`);ae("CARETLOOSE",`^${J[K.LONECARET]}${J[K.XRANGEPLAINLOOSE]}$`);ae("COMPARATORLOOSE",`^${J[K.GTLT]}\\s*(${J[K.LOOSEPLAIN]})$|^$`);ae("COMPARATOR",`^${J[K.GTLT]}\\s*(${J[K.FULLPLAIN]})$|^$`);ae("COMPARATORTRIM",`(\\s*)${J[K.GTLT]}\\s*(${J[K.LOOSEPLAIN]}|${J[K.XRANGEPLAIN]})`,!0);qn.comparatorTrimReplace="$1$2$3";ae("HYPHENRANGE",`^\\s*(${J[K.XRANGEPLAIN]})\\s+-\\s+(${J[K.XRANGEPLAIN]})\\s*$`);ae("HYPHENRANGELOOSE",`^\\s*(${J[K.XRANGEPLAINLOOSE]})\\s+-\\s+(${J[K.XRANGEPLAINLOOSE]})\\s*$`);ae("STAR","(<|>)?=?\\s*\\*");ae("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");ae("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Fl=ne((EF,Y$)=>{"use strict";var cN=Object.freeze({loose:!0}),dN=Object.freeze({}),pN=e=>e?typeof e!="object"?cN:e:dN;Y$.exports=pN});var kf=ne((PF,t_)=>{"use strict";var Q$=/^[0-9]+$/,e_=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let n=Q$.test(e),i=Q$.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:e<t?-1:1},fN=(e,t)=>e_(t,e);t_.exports={compareIdentifiers:e_,rcompareIdentifiers:fN}});var ut=ne((TF,r_)=>{"use strict";var Zl=Os(),{MAX_LENGTH:n_,MAX_SAFE_INTEGER:Vl}=to(),{safeRe:Wl,t:ql}=no(),mN=Fl(),{compareIdentifiers:bf}=kf(),Xt=class{constructor(t,n){if(n=mN(n),t instanceof Xt){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>n_)throw new TypeError(`version is longer than ${n_} characters`);Zl("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=t.trim().match(n.loose?Wl[ql.LOOSE]:Wl[ql.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Vl||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Vl||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Vl||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let o=+r;if(o>=0&&o<Vl)return o}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Zl("SemVer.compare",this.version,this.options,t),!(t instanceof Xt)){if(typeof t=="string"&&t===this.version)return 0;t=new Xt(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof Xt||(t=new Xt(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof Xt||(t=new Xt(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],r=t.prerelease[n];if(Zl("prerelease compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return bf(i,r)}while(++n)}compareBuild(t){t instanceof Xt||(t=new Xt(t,this.options));let n=0;do{let i=this.build[n],r=t.build[n];if(Zl("build compare",n,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return bf(i,r)}while(++n)}inc(t,n,i){if(t.startsWith("pre")){if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(n){let r=`-${n}`.match(this.options.loose?Wl[ql.PRERELEASELOOSE]:Wl[ql.PRERELEASE]);if(!r||r[1]!==n)throw new Error(`invalid identifier: ${n}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(n){let o=[n,r];i===!1&&(o=[n]),bf(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};r_.exports=Xt});var Er=ne((zF,o_)=>{"use strict";var i_=ut(),gN=(e,t,n=!1)=>{if(e instanceof i_)return e;try{return new i_(e,t)}catch(i){if(!n)return null;throw i}};o_.exports=gN});var a_=ne((AF,s_)=>{"use strict";var hN=Er(),vN=(e,t)=>{let n=hN(e,t);return n?n.version:null};s_.exports=vN});var u_=ne((NF,l_)=>{"use strict";var yN=Er(),SN=(e,t)=>{let n=yN(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};l_.exports=SN});var p_=ne((OF,d_)=>{"use strict";var c_=ut(),wN=(e,t,n,i,r)=>{typeof n=="string"&&(r=i,i=n,n=void 0);try{return new c_(e instanceof c_?e.version:e,n).inc(t,i,r).version}catch(o){return null}};d_.exports=wN});var g_=ne((DF,m_)=>{"use strict";var f_=Er(),xN=(e,t)=>{let n=f_(e,null,!0),i=f_(t,null,!0),r=n.compare(i);if(r===0)return null;let o=r>0,s=o?n:i,a=o?i:n,u=!!s.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0)return a.minor&&!a.patch?"minor":"patch"}let p=u?"pre":"";return n.major!==i.major?p+"major":n.minor!==i.minor?p+"minor":n.patch!==i.patch?p+"patch":"prerelease"};m_.exports=xN});var v_=ne((RF,h_)=>{"use strict";var $N=ut(),_N=(e,t)=>new $N(e,t).major;h_.exports=_N});var S_=ne((MF,y_)=>{"use strict";var kN=ut(),bN=(e,t)=>new kN(e,t).minor;y_.exports=bN});var x_=ne((LF,w_)=>{"use strict";var IN=ut(),CN=(e,t)=>new IN(e,t).patch;w_.exports=CN});var __=ne((jF,$_)=>{"use strict";var EN=Er(),PN=(e,t)=>{let n=EN(e,t);return n&&n.prerelease.length?n.prerelease:null};$_.exports=PN});var pn=ne((UF,b_)=>{"use strict";var k_=ut(),TN=(e,t,n)=>new k_(e,n).compare(new k_(t,n));b_.exports=TN});var C_=ne((FF,I_)=>{"use strict";var zN=pn(),AN=(e,t,n)=>zN(t,e,n);I_.exports=AN});var P_=ne((ZF,E_)=>{"use strict";var NN=pn(),ON=(e,t)=>NN(e,t,!0);E_.exports=ON});var Bl=ne((VF,z_)=>{"use strict";var T_=ut(),DN=(e,t,n)=>{let i=new T_(e,n),r=new T_(t,n);return i.compare(r)||i.compareBuild(r)};z_.exports=DN});var N_=ne((WF,A_)=>{"use strict";var RN=Bl(),MN=(e,t)=>e.sort((n,i)=>RN(n,i,t));A_.exports=MN});var D_=ne((qF,O_)=>{"use strict";var LN=Bl(),jN=(e,t)=>e.sort((n,i)=>LN(i,n,t));O_.exports=jN});var Ds=ne((BF,R_)=>{"use strict";var UN=pn(),FN=(e,t,n)=>UN(e,t,n)>0;R_.exports=FN});var Hl=ne((HF,M_)=>{"use strict";var ZN=pn(),VN=(e,t,n)=>ZN(e,t,n)<0;M_.exports=VN});var If=ne((GF,L_)=>{"use strict";var WN=pn(),qN=(e,t,n)=>WN(e,t,n)===0;L_.exports=qN});var Cf=ne((JF,j_)=>{"use strict";var BN=pn(),HN=(e,t,n)=>BN(e,t,n)!==0;j_.exports=HN});var Gl=ne((KF,U_)=>{"use strict";var GN=pn(),JN=(e,t,n)=>GN(e,t,n)>=0;U_.exports=JN});var Jl=ne((XF,F_)=>{"use strict";var KN=pn(),XN=(e,t,n)=>KN(e,t,n)<=0;F_.exports=XN});var Ef=ne((YF,Z_)=>{"use strict";var YN=If(),QN=Cf(),e1=Ds(),t1=Gl(),n1=Hl(),r1=Jl(),i1=(e,t,n,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return YN(e,n,i);case"!=":return QN(e,n,i);case">":return e1(e,n,i);case">=":return t1(e,n,i);case"<":return n1(e,n,i);case"<=":return r1(e,n,i);default:throw new TypeError(`Invalid operator: ${t}`)}};Z_.exports=i1});var W_=ne((QF,V_)=>{"use strict";var o1=ut(),s1=Er(),{safeRe:Kl,t:Xl}=no(),a1=(e,t)=>{if(e instanceof o1)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?Kl[Xl.COERCEFULL]:Kl[Xl.COERCE]);else{let u=t.includePrerelease?Kl[Xl.COERCERTLFULL]:Kl[Xl.COERCERTL],d;for(;(d=u.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||d.index+d[0].length!==n.index+n[0].length)&&(n=d),u.lastIndex=d.index+d[1].length+d[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],r=n[3]||"0",o=n[4]||"0",s=t.includePrerelease&&n[5]?`-${n[5]}`:"",a=t.includePrerelease&&n[6]?`+${n[6]}`:"";return s1(`${i}.${r}.${o}${s}${a}`,t)};V_.exports=a1});var B_=ne((e2,q_)=>{"use strict";var l1=Er(),u1=to(),c1=ut(),d1=(e,t,n)=>{if(!u1.RELEASE_TYPES.includes(t))return null;let i=p1(e,n);return i&&f1(i,t)},p1=(e,t)=>{let n=e instanceof c1?e.version:e;return l1(n,t)},f1=(e,t)=>{if(m1(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},m1=e=>e.startsWith("pre");q_.exports=d1});var G_=ne((t2,H_)=>{"use strict";var Pf=class{constructor(){this.max=1e3,this.map=new Map}get(t){let n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(t,n)}return this}};H_.exports=Pf});var fn=ne((n2,Y_)=>{"use strict";var g1=/\s+/g,vi=class{constructor(t,n){if(n=v1(n),t instanceof vi)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new vi(t.raw,n);if(t instanceof Tf)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(g1," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!K_(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&I1(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let n=this.set[t];for(let i=0;i<n.length;i++)i>0&&(this.formatted+=" "),this.formatted+=n[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(b1,"");let i=((this.options.includePrerelease&&_1)|(this.options.loose&&k1))+":"+t,r=J_.get(i);if(r)return r;let o=this.options.loose,s=o?bt[ct.HYPHENRANGELOOSE]:bt[ct.HYPHENRANGE];t=t.replace(s,R1(this.options.includePrerelease)),ze("hyphen replace",t),t=t.replace(bt[ct.COMPARATORTRIM],w1),ze("comparator trim",t),t=t.replace(bt[ct.TILDETRIM],x1),ze("tilde trim",t),t=t.replace(bt[ct.CARETTRIM],$1),ze("caret trim",t);let a=t.split(" ").map(l=>C1(l,this.options)).join(" ").split(/\s+/).map(l=>D1(l,this.options));o&&(a=a.filter(l=>(ze("loose invalid filter",l,this.options),!!l.match(bt[ct.COMPARATORLOOSE])))),ze("range list",a);let u=new Map,d=a.map(l=>new Tf(l,this.options));for(let l of d){if(K_(l))return[l];u.set(l.value,l)}u.size>1&&u.has("")&&u.delete("");let p=[...u.values()];return J_.set(i,p),p}intersects(t,n){if(!(t instanceof vi))throw new TypeError("a Range is required");return this.set.some(i=>X_(i,n)&&t.set.some(r=>X_(r,n)&&i.every(o=>r.every(s=>o.intersects(s,n)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new y1(t,this.options)}catch(n){return!1}for(let n=0;n<this.set.length;n++)if(M1(this.set[n],t,this.options))return!0;return!1}};Y_.exports=vi;var h1=G_(),J_=new h1,v1=Fl(),Tf=Rs(),ze=Os(),y1=ut(),{safeRe:bt,src:S1,t:ct,comparatorTrimReplace:w1,tildeTrimReplace:x1,caretTrimReplace:$1}=no(),{FLAG_INCLUDE_PRERELEASE:_1,FLAG_LOOSE:k1}=to(),b1=new RegExp(S1[ct.BUILD],"g"),K_=e=>e.value==="<0.0.0-0",I1=e=>e.value==="",X_=(e,t)=>{let n=!0,i=e.slice(),r=i.pop();for(;n&&i.length;)n=i.every(o=>r.intersects(o,t)),r=i.pop();return n},C1=(e,t)=>(e=e.replace(bt[ct.BUILD],""),ze("comp",e,t),e=T1(e,t),ze("caret",e),e=E1(e,t),ze("tildes",e),e=A1(e,t),ze("xrange",e),e=O1(e,t),ze("stars",e),e),It=e=>!e||e.toLowerCase()==="x"||e==="*",E1=(e,t)=>e.trim().split(/\s+/).map(n=>P1(n,t)).join(" "),P1=(e,t)=>{let n=t.loose?bt[ct.TILDELOOSE]:bt[ct.TILDE];return e.replace(n,(i,r,o,s,a)=>{ze("tilde",e,i,r,o,s,a);let u;return It(r)?u="":It(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:It(s)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?(ze("replaceTilde pr",a),u=`>=${r}.${o}.${s}-${a} <${r}.${+o+1}.0-0`):u=`>=${r}.${o}.${s} <${r}.${+o+1}.0-0`,ze("tilde return",u),u})},T1=(e,t)=>e.trim().split(/\s+/).map(n=>z1(n,t)).join(" "),z1=(e,t)=>{ze("caret",e,t);let n=t.loose?bt[ct.CARETLOOSE]:bt[ct.CARET],i=t.includePrerelease?"-0":"";return e.replace(n,(r,o,s,a,u)=>{ze("caret",e,r,o,s,a,u);let d;return It(o)?d="":It(s)?d=`>=${o}.0.0${i} <${+o+1}.0.0-0`:It(a)?o==="0"?d=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:d=`>=${o}.${s}.0${i} <${+o+1}.0.0-0`:u?(ze("replaceCaret pr",u),o==="0"?s==="0"?d=`>=${o}.${s}.${a}-${u} <${o}.${s}.${+a+1}-0`:d=`>=${o}.${s}.${a}-${u} <${o}.${+s+1}.0-0`:d=`>=${o}.${s}.${a}-${u} <${+o+1}.0.0-0`):(ze("no pr"),o==="0"?s==="0"?d=`>=${o}.${s}.${a}${i} <${o}.${s}.${+a+1}-0`:d=`>=${o}.${s}.${a}${i} <${o}.${+s+1}.0-0`:d=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),ze("caret return",d),d})},A1=(e,t)=>(ze("replaceXRanges",e,t),e.split(/\s+/).map(n=>N1(n,t)).join(" ")),N1=(e,t)=>{e=e.trim();let n=t.loose?bt[ct.XRANGELOOSE]:bt[ct.XRANGE];return e.replace(n,(i,r,o,s,a,u)=>{ze("xRange",e,i,r,o,s,a,u);let d=It(o),p=d||It(s),l=p||It(a),f=l;return r==="="&&f&&(r=""),u=t.includePrerelease?"-0":"",d?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&f?(p&&(s=0),a=0,r===">"?(r=">=",p?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):r==="<="&&(r="<",p?o=+o+1:s=+s+1),r==="<"&&(u="-0"),i=`${r+o}.${s}.${a}${u}`):p?i=`>=${o}.0.0${u} <${+o+1}.0.0-0`:l&&(i=`>=${o}.${s}.0${u} <${o}.${+s+1}.0-0`),ze("xRange return",i),i})},O1=(e,t)=>(ze("replaceStars",e,t),e.trim().replace(bt[ct.STAR],"")),D1=(e,t)=>(ze("replaceGTE0",e,t),e.trim().replace(bt[t.includePrerelease?ct.GTE0PRE:ct.GTE0],"")),R1=e=>(t,n,i,r,o,s,a,u,d,p,l,f)=>(It(i)?n="":It(r)?n=`>=${i}.0.0${e?"-0":""}`:It(o)?n=`>=${i}.${r}.0${e?"-0":""}`:s?n=`>=${n}`:n=`>=${n}${e?"-0":""}`,It(d)?u="":It(p)?u=`<${+d+1}.0.0-0`:It(l)?u=`<${d}.${+p+1}.0-0`:f?u=`<=${d}.${p}.${l}-${f}`:e?u=`<${d}.${p}.${+l+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),M1=(e,t,n)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let i=0;i<e.length;i++)if(ze(e[i].semver),e[i].semver!==Tf.ANY&&e[i].semver.prerelease.length>0){let r=e[i].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}});var Rs=ne((r2,ik)=>{"use strict";var Ms=Symbol("SemVer ANY"),ro=class{static get ANY(){return Ms}constructor(t,n){if(n=Q_(n),t instanceof ro){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Af("comparator",t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===Ms?this.value="":this.value=this.operator+this.semver.version,Af("comp",this)}parse(t){let n=this.options.loose?ek[tk.COMPARATORLOOSE]:ek[tk.COMPARATOR],i=t.match(n);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new nk(i[2],this.options.loose):this.semver=Ms}toString(){return this.value}test(t){if(Af("Comparator.test",t,this.options.loose),this.semver===Ms||t===Ms)return!0;if(typeof t=="string")try{t=new nk(t,this.options)}catch(n){return!1}return zf(t,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof ro))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new rk(t.value,n).test(this.value):t.operator===""?t.value===""?!0:new rk(this.value,n).test(t.semver):(n=Q_(n),n.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||zf(this.semver,"<",t.semver,n)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||zf(this.semver,">",t.semver,n)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};ik.exports=ro;var Q_=Fl(),{safeRe:ek,t:tk}=no(),zf=Ef(),Af=Os(),nk=ut(),rk=fn()});var Ls=ne((i2,ok)=>{"use strict";var L1=fn(),j1=(e,t,n)=>{try{t=new L1(t,n)}catch(i){return!1}return t.test(e)};ok.exports=j1});var ak=ne((o2,sk)=>{"use strict";var U1=fn(),F1=(e,t)=>new U1(e,t).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));sk.exports=F1});var uk=ne((s2,lk)=>{"use strict";var Z1=ut(),V1=fn(),W1=(e,t,n)=>{let i=null,r=null,o=null;try{o=new V1(t,n)}catch(s){return null}return e.forEach(s=>{o.test(s)&&(!i||r.compare(s)===-1)&&(i=s,r=new Z1(i,n))}),i};lk.exports=W1});var dk=ne((a2,ck)=>{"use strict";var q1=ut(),B1=fn(),H1=(e,t,n)=>{let i=null,r=null,o=null;try{o=new B1(t,n)}catch(s){return null}return e.forEach(s=>{o.test(s)&&(!i||r.compare(s)===1)&&(i=s,r=new q1(i,n))}),i};ck.exports=H1});var mk=ne((l2,fk)=>{"use strict";var Nf=ut(),G1=fn(),pk=Ds(),J1=(e,t)=>{e=new G1(e,t);let n=new Nf("0.0.0");if(e.test(n)||(n=new Nf("0.0.0-0"),e.test(n)))return n;n=null;for(let i=0;i<e.set.length;++i){let r=e.set[i],o=null;r.forEach(s=>{let a=new Nf(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||pk(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!n||pk(n,o))&&(n=o)}return n&&e.test(n)?n:null};fk.exports=J1});var hk=ne((u2,gk)=>{"use strict";var K1=fn(),X1=(e,t)=>{try{return new K1(e,t).range||"*"}catch(n){return null}};gk.exports=X1});var Yl=ne((c2,wk)=>{"use strict";var Y1=ut(),Sk=Rs(),{ANY:Q1}=Sk,eO=fn(),tO=Ls(),vk=Ds(),yk=Hl(),nO=Jl(),rO=Gl(),iO=(e,t,n,i)=>{e=new Y1(e,i),t=new eO(t,i);let r,o,s,a,u;switch(n){case">":r=vk,o=nO,s=yk,a=">",u=">=";break;case"<":r=yk,o=rO,s=vk,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(tO(e,t,i))return!1;for(let d=0;d<t.set.length;++d){let p=t.set[d],l=null,f=null;if(p.forEach(m=>{m.semver===Q1&&(m=new Sk(">=0.0.0")),l=l||m,f=f||m,r(m.semver,l.semver,i)?l=m:s(m.semver,f.semver,i)&&(f=m)}),l.operator===a||l.operator===u||(!f.operator||f.operator===a)&&o(e,f.semver))return!1;if(f.operator===u&&s(e,f.semver))return!1}return!0};wk.exports=iO});var $k=ne((d2,xk)=>{"use strict";var oO=Yl(),sO=(e,t,n)=>oO(e,t,">",n);xk.exports=sO});var kk=ne((p2,_k)=>{"use strict";var aO=Yl(),lO=(e,t,n)=>aO(e,t,"<",n);_k.exports=lO});var Ck=ne((f2,Ik)=>{"use strict";var bk=fn(),uO=(e,t,n)=>(e=new bk(e,n),t=new bk(t,n),e.intersects(t,n));Ik.exports=uO});var Pk=ne((m2,Ek)=>{"use strict";var cO=Ls(),dO=pn();Ek.exports=(e,t,n)=>{let i=[],r=null,o=null,s=e.sort((p,l)=>dO(p,l,n));for(let p of s)cO(p,t,n)?(o=p,r||(r=p)):(o&&i.push([r,o]),o=null,r=null);r&&i.push([r,null]);let a=[];for(let[p,l]of i)p===l?a.push(p):!l&&p===s[0]?a.push("*"):l?p===s[0]?a.push(`<=${l}`):a.push(`${p} - ${l}`):a.push(`>=${p}`);let u=a.join(" || "),d=typeof t.raw=="string"?t.raw:String(t);return u.length<d.length?u:t}});var Dk=ne((g2,Ok)=>{"use strict";var Tk=fn(),Rf=Rs(),{ANY:Of}=Rf,Df=Ls(),Mf=pn(),pO=(e,t,n={})=>{if(e===t)return!0;e=new Tk(e,n),t=new Tk(t,n);let i=!1;e:for(let r of e.set){for(let o of t.set){let s=mO(r,o,n);if(i=i||s!==null,s)continue e}if(i)return!1}return!0},fO=[new Rf(">=0.0.0-0")],zk=[new Rf(">=0.0.0")],mO=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Of){if(t.length===1&&t[0].semver===Of)return!0;n.includePrerelease?e=fO:e=zk}if(t.length===1&&t[0].semver===Of){if(n.includePrerelease)return!0;t=zk}let i=new Set,r,o;for(let m of e)m.operator===">"||m.operator===">="?r=Ak(r,m,n):m.operator==="<"||m.operator==="<="?o=Nk(o,m,n):i.add(m.semver);if(i.size>1)return null;let s;if(r&&o){if(s=Mf(r.semver,o.semver,n),s>0)return null;if(s===0&&(r.operator!==">="||o.operator!=="<="))return null}for(let m of i){if(r&&!Df(m,String(r),n)||o&&!Df(m,String(o),n))return null;for(let g of t)if(!Df(m,String(g),n))return!1;return!0}let a,u,d,p,l=o&&!n.includePrerelease&&o.semver.prerelease.length?o.semver:!1,f=r&&!n.includePrerelease&&r.semver.prerelease.length?r.semver:!1;l&&l.prerelease.length===1&&o.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(let m of t){if(p=p||m.operator===">"||m.operator===">=",d=d||m.operator==="<"||m.operator==="<=",r){if(f&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===f.major&&m.semver.minor===f.minor&&m.semver.patch===f.patch&&(f=!1),m.operator===">"||m.operator===">="){if(a=Ak(r,m,n),a===m&&a!==r)return!1}else if(r.operator===">="&&!m.test(r.semver))return!1}if(o){if(l&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===l.major&&m.semver.minor===l.minor&&m.semver.patch===l.patch&&(l=!1),m.operator==="<"||m.operator==="<="){if(u=Nk(o,m,n),u===m&&u!==o)return!1}else if(o.operator==="<="&&!m.test(o.semver))return!1}if(!m.operator&&(o||r)&&s!==0)return!1}return!(r&&d&&!o&&s!==0||o&&p&&!r&&s!==0||f||l)},Ak=(e,t,n)=>{if(!e)return t;let i=Mf(e.semver,t.semver,n);return i>0?e:i<0||t.operator===">"&&e.operator===">="?t:e},Nk=(e,t,n)=>{if(!e)return t;let i=Mf(e.semver,t.semver,n);return i<0?e:i>0||t.operator==="<"&&e.operator==="<="?t:e};Ok.exports=pO});var jf=ne((h2,Lk)=>{"use strict";var Lf=no(),Rk=to(),gO=ut(),Mk=kf(),hO=Er(),vO=a_(),yO=u_(),SO=p_(),wO=g_(),xO=v_(),$O=S_(),_O=x_(),kO=__(),bO=pn(),IO=C_(),CO=P_(),EO=Bl(),PO=N_(),TO=D_(),zO=Ds(),AO=Hl(),NO=If(),OO=Cf(),DO=Gl(),RO=Jl(),MO=Ef(),LO=W_(),jO=B_(),UO=Rs(),FO=fn(),ZO=Ls(),VO=ak(),WO=uk(),qO=dk(),BO=mk(),HO=hk(),GO=Yl(),JO=$k(),KO=kk(),XO=Ck(),YO=Pk(),QO=Dk();Lk.exports={parse:hO,valid:vO,clean:yO,inc:SO,diff:wO,major:xO,minor:$O,patch:_O,prerelease:kO,compare:bO,rcompare:IO,compareLoose:CO,compareBuild:EO,sort:PO,rsort:TO,gt:zO,lt:AO,eq:NO,neq:OO,gte:DO,lte:RO,cmp:MO,coerce:LO,truncate:jO,Comparator:UO,Range:FO,satisfies:ZO,toComparators:VO,maxSatisfying:WO,minSatisfying:qO,minVersion:BO,validRange:HO,outside:GO,gtr:JO,ltr:KO,intersects:XO,simplifyRange:YO,subset:QO,SemVer:gO,re:Lf.re,src:Lf.src,tokens:Lf.t,SEMVER_SPEC_VERSION:Rk.SEMVER_SPEC_VERSION,RELEASE_TYPES:Rk.RELEASE_TYPES,compareIdentifiers:Mk.compareIdentifiers,rcompareIdentifiers:Mk.rcompareIdentifiers}});var Kk=ne(pe=>{"use strict";var js=Symbol.for("react.element"),eD=Symbol.for("react.portal"),tD=Symbol.for("react.fragment"),nD=Symbol.for("react.strict_mode"),rD=Symbol.for("react.profiler"),iD=Symbol.for("react.provider"),oD=Symbol.for("react.context"),sD=Symbol.for("react.forward_ref"),aD=Symbol.for("react.suspense"),lD=Symbol.for("react.memo"),uD=Symbol.for("react.lazy"),jk=Symbol.iterator;function cD(e){return e===null||typeof e!="object"?null:(e=jk&&e[jk]||e["@@iterator"],typeof e=="function"?e:null)}var Zk={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vk=Object.assign,Wk={};function io(e,t,n){this.props=e,this.context=t,this.refs=Wk,this.updater=n||Zk}io.prototype.isReactComponent={};io.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};io.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qk(){}qk.prototype=io.prototype;function Ff(e,t,n){this.props=e,this.context=t,this.refs=Wk,this.updater=n||Zk}var Zf=Ff.prototype=new qk;Zf.constructor=Ff;Vk(Zf,io.prototype);Zf.isPureReactComponent=!0;var Uk=Array.isArray,Bk=Object.prototype.hasOwnProperty,Vf={current:null},Hk={key:!0,ref:!0,__self:!0,__source:!0};function Gk(e,t,n){var i,r={},o=null,s=null;if(t!=null)for(i in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)Bk.call(t,i)&&!Hk.hasOwnProperty(i)&&(r[i]=t[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var u=Array(a),d=0;d<a;d++)u[d]=arguments[d+2];r.children=u}if(e&&e.defaultProps)for(i in a=e.defaultProps,a)r[i]===void 0&&(r[i]=a[i]);return{$$typeof:js,type:e,key:o,ref:s,props:r,_owner:Vf.current}}function dD(e,t){return{$$typeof:js,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wf(e){return typeof e=="object"&&e!==null&&e.$$typeof===js}function pD(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fk=/\/+/g;function Uf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pD(""+e.key):t.toString(36)}function eu(e,t,n,i,r){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case js:case eD:s=!0}}if(s)return s=e,r=r(s),e=i===""?"."+Uf(s,0):i,Uk(r)?(n="",e!=null&&(n=e.replace(Fk,"$&/")+"/"),eu(r,t,n,"",function(d){return d})):r!=null&&(Wf(r)&&(r=dD(r,n+(!r.key||s&&s.key===r.key?"":(""+r.key).replace(Fk,"$&/")+"/")+e)),t.push(r)),1;if(s=0,i=i===""?".":i+":",Uk(e))for(var a=0;a<e.length;a++){o=e[a];var u=i+Uf(o,a);s+=eu(o,t,n,u,r)}else if(u=cD(e),typeof u=="function")for(e=u.call(e),a=0;!(o=e.next()).done;)o=o.value,u=i+Uf(o,a++),s+=eu(o,t,n,u,r);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ql(e,t,n){if(e==null)return e;var i=[],r=0;return eu(e,i,"","",function(o){return t.call(n,o,r++)}),i}function fD(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ct={current:null},tu={transition:null},mD={ReactCurrentDispatcher:Ct,ReactCurrentBatchConfig:tu,ReactCurrentOwner:Vf};function Jk(){throw Error("act(...) is not supported in production builds of React.")}pe.Children={map:Ql,forEach:function(e,t,n){Ql(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ql(e,function(){t++}),t},toArray:function(e){return Ql(e,function(t){return t})||[]},only:function(e){if(!Wf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Component=io;pe.Fragment=tD;pe.Profiler=rD;pe.PureComponent=Ff;pe.StrictMode=nD;pe.Suspense=aD;pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mD;pe.act=Jk;pe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=Vk({},e.props),r=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=Vf.current),t.key!==void 0&&(r=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)Bk.call(t,u)&&!Hk.hasOwnProperty(u)&&(i[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){a=Array(u);for(var d=0;d<u;d++)a[d]=arguments[d+2];i.children=a}return{$$typeof:js,type:e.type,key:r,ref:o,props:i,_owner:s}};pe.createContext=function(e){return e={$$typeof:oD,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:iD,_context:e},e.Consumer=e};pe.createElement=Gk;pe.createFactory=function(e){var t=Gk.bind(null,e);return t.type=e,t};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:sD,render:e}};pe.isValidElement=Wf;pe.lazy=function(e){return{$$typeof:uD,_payload:{_status:-1,_result:e},_init:fD}};pe.memo=function(e,t){return{$$typeof:lD,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=tu.transition;tu.transition={};try{e()}finally{tu.transition=t}};pe.unstable_act=Jk;pe.useCallback=function(e,t){return Ct.current.useCallback(e,t)};pe.useContext=function(e){return Ct.current.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e){return Ct.current.useDeferredValue(e)};pe.useEffect=function(e,t){return Ct.current.useEffect(e,t)};pe.useId=function(){return Ct.current.useId()};pe.useImperativeHandle=function(e,t,n){return Ct.current.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Ct.current.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Ct.current.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Ct.current.useMemo(e,t)};pe.useReducer=function(e,t,n){return Ct.current.useReducer(e,t,n)};pe.useRef=function(e){return Ct.current.useRef(e)};pe.useState=function(e){return Ct.current.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Ct.current.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Ct.current.useTransition()};pe.version="18.3.1"});var Se=ne((y2,Xk)=>{"use strict";Xk.exports=Kk()});var ab=ne(Ee=>{"use strict";function Gf(e,t){var n=e.length;e.push(t);e:for(;0<n;){var i=n-1>>>1,r=e[i];if(0<nu(r,t))e[i]=t,e[n]=r,n=i;else break e}}function Pn(e){return e.length===0?null:e[0]}function iu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var i=0,r=e.length,o=r>>>1;i<o;){var s=2*(i+1)-1,a=e[s],u=s+1,d=e[u];if(0>nu(a,n))u<r&&0>nu(d,a)?(e[i]=d,e[u]=n,i=u):(e[i]=a,e[s]=n,i=s);else if(u<r&&0>nu(d,n))e[i]=d,e[u]=n,i=u;else break e}}return t}function nu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Yk=performance,Ee.unstable_now=function(){return Yk.now()}):(qf=Date,Qk=qf.now(),Ee.unstable_now=function(){return qf.now()-Qk});var Yk,qf,Qk,Bn=[],Pr=[],gD=1,mn=null,ht=3,ou=!1,yi=!1,Fs=!1,nb=typeof setTimeout=="function"?setTimeout:null,rb=typeof clearTimeout=="function"?clearTimeout:null,eb=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Jf(e){for(var t=Pn(Pr);t!==null;){if(t.callback===null)iu(Pr);else if(t.startTime<=e)iu(Pr),t.sortIndex=t.expirationTime,Gf(Bn,t);else break;t=Pn(Pr)}}function Kf(e){if(Fs=!1,Jf(e),!yi)if(Pn(Bn)!==null)yi=!0,Yf(Xf);else{var t=Pn(Pr);t!==null&&Qf(Kf,t.startTime-e)}}function Xf(e,t){yi=!1,Fs&&(Fs=!1,rb(Zs),Zs=-1),ou=!0;var n=ht;try{for(Jf(t),mn=Pn(Bn);mn!==null&&(!(mn.expirationTime>t)||e&&!sb());){var i=mn.callback;if(typeof i=="function"){mn.callback=null,ht=mn.priorityLevel;var r=i(mn.expirationTime<=t);t=Ee.unstable_now(),typeof r=="function"?mn.callback=r:mn===Pn(Bn)&&iu(Bn),Jf(t)}else iu(Bn);mn=Pn(Bn)}if(mn!==null)var o=!0;else{var s=Pn(Pr);s!==null&&Qf(Kf,s.startTime-t),o=!1}return o}finally{mn=null,ht=n,ou=!1}}var su=!1,ru=null,Zs=-1,ib=5,ob=-1;function sb(){return!(Ee.unstable_now()-ob<ib)}function Bf(){if(ru!==null){var e=Ee.unstable_now();ob=e;var t=!0;try{t=ru(!0,e)}finally{t?Us():(su=!1,ru=null)}}else su=!1}var Us;typeof eb=="function"?Us=function(){eb(Bf)}:typeof MessageChannel!="undefined"?(Hf=new MessageChannel,tb=Hf.port2,Hf.port1.onmessage=Bf,Us=function(){tb.postMessage(null)}):Us=function(){nb(Bf,0)};var Hf,tb;function Yf(e){ru=e,su||(su=!0,Us())}function Qf(e,t){Zs=nb(function(){e(Ee.unstable_now())},t)}Ee.unstable_IdlePriority=5;Ee.unstable_ImmediatePriority=1;Ee.unstable_LowPriority=4;Ee.unstable_NormalPriority=3;Ee.unstable_Profiling=null;Ee.unstable_UserBlockingPriority=2;Ee.unstable_cancelCallback=function(e){e.callback=null};Ee.unstable_continueExecution=function(){yi||ou||(yi=!0,Yf(Xf))};Ee.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ib=0<e?Math.floor(1e3/e):5};Ee.unstable_getCurrentPriorityLevel=function(){return ht};Ee.unstable_getFirstCallbackNode=function(){return Pn(Bn)};Ee.unstable_next=function(e){switch(ht){case 1:case 2:case 3:var t=3;break;default:t=ht}var n=ht;ht=t;try{return e()}finally{ht=n}};Ee.unstable_pauseExecution=function(){};Ee.unstable_requestPaint=function(){};Ee.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=ht;ht=e;try{return t()}finally{ht=n}};Ee.unstable_scheduleCallback=function(e,t,n){var i=Ee.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?i+n:i):n=i,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=n+r,e={id:gD++,callback:t,priorityLevel:e,startTime:n,expirationTime:r,sortIndex:-1},n>i?(e.sortIndex=n,Gf(Pr,e),Pn(Bn)===null&&e===Pn(Pr)&&(Fs?(rb(Zs),Zs=-1):Fs=!0,Qf(Kf,n-i))):(e.sortIndex=r,Gf(Bn,e),yi||ou||(yi=!0,Yf(Xf))),e};Ee.unstable_shouldYield=sb;Ee.unstable_wrapCallback=function(e){var t=ht;return function(){var n=ht;ht=t;try{return e.apply(this,arguments)}finally{ht=n}}}});var ub=ne((w2,lb)=>{"use strict";lb.exports=ab()});var fC=ne(rn=>{"use strict";var hD=Se(),tn=ub();function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var hI=new Set,ca={};function zi(e,t){Io(e,t),Io(e+"Capture",t)}function Io(e,t){for(ca[e]=t,e=0;e<t.length;e++)hI.add(t[e])}var fr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),$m=Object.prototype.hasOwnProperty,vD=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,cb={},db={};function yD(e){return $m.call(db,e)?!0:$m.call(cb,e)?!1:vD.test(e)?db[e]=!0:(cb[e]=!0,!1)}function SD(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wD(e,t,n,i){if(t===null||typeof t=="undefined"||SD(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Tt(e,t,n,i,r,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ft[e]=new Tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ft[t]=new Tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ft[e]=new Tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ft[e]=new Tt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ft[e]=new Tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ft[e]=new Tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ft[e]=new Tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ft[e]=new Tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ft[e]=new Tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var mg=/[\-:]([a-z])/g;function gg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(mg,gg);ft[t]=new Tt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(mg,gg);ft[t]=new Tt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(mg,gg);ft[t]=new Tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ft[e]=new Tt(e,1,!1,e.toLowerCase(),null,!1,!1)});ft.xlinkHref=new Tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ft[e]=new Tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function hg(e,t,n,i){var r=ft.hasOwnProperty(t)?ft[t]:null;(r!==null?r.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(wD(t,n,r,i)&&(n=null),i||r===null?yD(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=n===null?r.type===3?!1:"":n:(t=r.attributeName,i=r.attributeNamespace,n===null?e.removeAttribute(t):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,i?e.setAttributeNS(i,t,n):e.setAttribute(t,n))))}var vr=hD.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,au=Symbol.for("react.element"),ao=Symbol.for("react.portal"),lo=Symbol.for("react.fragment"),vg=Symbol.for("react.strict_mode"),_m=Symbol.for("react.profiler"),vI=Symbol.for("react.provider"),yI=Symbol.for("react.context"),yg=Symbol.for("react.forward_ref"),km=Symbol.for("react.suspense"),bm=Symbol.for("react.suspense_list"),Sg=Symbol.for("react.memo"),zr=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var SI=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var pb=Symbol.iterator;function Vs(e){return e===null||typeof e!="object"?null:(e=pb&&e[pb]||e["@@iterator"],typeof e=="function"?e:null)}var je=Object.assign,em;function Xs(e){if(em===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);em=t&&t[1]||""}return`
7
+ `+em+e}var tm=!1;function nm(e,t){if(!e||tm)return"";tm=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var i=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){i=d}e.call(t.prototype)}else{try{throw Error()}catch(d){i=d}e()}}catch(d){if(d&&i&&typeof d.stack=="string"){for(var r=d.stack.split(`
8
+ `),o=i.stack.split(`
9
+ `),s=r.length-1,a=o.length-1;1<=s&&0<=a&&r[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(r[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||r[s]!==o[a]){var u=`
10
+ `+r[s].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{tm=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xs(e):""}function xD(e){switch(e.tag){case 5:return Xs(e.type);case 16:return Xs("Lazy");case 13:return Xs("Suspense");case 19:return Xs("SuspenseList");case 0:case 2:case 15:return e=nm(e.type,!1),e;case 11:return e=nm(e.type.render,!1),e;case 1:return e=nm(e.type,!0),e;default:return""}}function Im(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case lo:return"Fragment";case ao:return"Portal";case _m:return"Profiler";case vg:return"StrictMode";case km:return"Suspense";case bm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yI:return(e.displayName||"Context")+".Consumer";case vI:return(e._context.displayName||"Context")+".Provider";case yg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Sg:return t=e.displayName||null,t!==null?t:Im(e.type)||"Memo";case zr:t=e._payload,e=e._init;try{return Im(e(t))}catch(n){}}return null}function $D(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Im(t);case 8:return t===vg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wI(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _D(e){var t=wI(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(s){i=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(s){i=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lu(e){e._valueTracker||(e._valueTracker=_D(e))}function xI(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=wI(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function Ru(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Cm(e,t){var n=t.checked;return je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function fb(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=qr(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function $I(e,t){t=t.checked,t!=null&&hg(e,"checked",t,!1)}function Em(e,t){$I(e,t);var n=qr(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Pm(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pm(e,t.type,qr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mb(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Pm(e,t,n){(t!=="number"||Ru(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ys=Array.isArray;function wo(e,t,n,i){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&i&&(e[n].defaultSelected=!0)}else{for(n=""+qr(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Tm(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return je({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gb(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(M(92));if(Ys(n)){if(1<n.length)throw Error(M(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:qr(n)}}function _I(e,t){var n=qr(t.value),i=qr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),i!=null&&(e.defaultValue=""+i)}function hb(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kI(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zm(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kI(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var uu,bI=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,i,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,i,r)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(uu=uu||document.createElement("div"),uu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=uu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function da(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ta={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kD=["Webkit","ms","Moz","O"];Object.keys(ta).forEach(function(e){kD.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ta[t]=ta[e]})});function II(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ta.hasOwnProperty(e)&&ta[e]?(""+t).trim():t+"px"}function CI(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=II(n,t[n],i);n==="float"&&(n="cssFloat"),i?e.setProperty(n,r):e[n]=r}}var bD=je({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Am(e,t){if(t){if(bD[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function Nm(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Om=null;function wg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dm=null,xo=null,$o=null;function vb(e){if(e=Pa(e)){if(typeof Dm!="function")throw Error(M(280));var t=e.stateNode;t&&(t=cc(t),Dm(e.stateNode,e.type,t))}}function EI(e){xo?$o?$o.push(e):$o=[e]:xo=e}function PI(){if(xo){var e=xo,t=$o;if($o=xo=null,vb(e),t)for(e=0;e<t.length;e++)vb(t[e])}}function TI(e,t){return e(t)}function zI(){}var rm=!1;function AI(e,t,n){if(rm)return e(t,n);rm=!0;try{return TI(e,t,n)}finally{rm=!1,(xo!==null||$o!==null)&&(zI(),PI())}}function pa(e,t){var n=e.stateNode;if(n===null)return null;var i=cc(n);if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(M(231,t,typeof n));return n}var Rm=!1;if(fr)try{oo={},Object.defineProperty(oo,"passive",{get:function(){Rm=!0}}),window.addEventListener("test",oo,oo),window.removeEventListener("test",oo,oo)}catch(e){Rm=!1}var oo;function ID(e,t,n,i,r,o,s,a,u){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(p){this.onError(p)}}var na=!1,Mu=null,Lu=!1,Mm=null,CD={onError:function(e){na=!0,Mu=e}};function ED(e,t,n,i,r,o,s,a,u){na=!1,Mu=null,ID.apply(CD,arguments)}function PD(e,t,n,i,r,o,s,a,u){if(ED.apply(this,arguments),na){if(na){var d=Mu;na=!1,Mu=null}else throw Error(M(198));Lu||(Lu=!0,Mm=d)}}function Ai(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function NI(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yb(e){if(Ai(e)!==e)throw Error(M(188))}function TD(e){var t=e.alternate;if(!t){if(t=Ai(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,i=t;;){var r=n.return;if(r===null)break;var o=r.alternate;if(o===null){if(i=r.return,i!==null){n=i;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===n)return yb(r),e;if(o===i)return yb(r),t;o=o.sibling}throw Error(M(188))}if(n.return!==i.return)n=r,i=o;else{for(var s=!1,a=r.child;a;){if(a===n){s=!0,n=r,i=o;break}if(a===i){s=!0,i=r,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,i=r;break}if(a===i){s=!0,i=o,n=r;break}a=a.sibling}if(!s)throw Error(M(189))}}if(n.alternate!==i)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function OI(e){return e=TD(e),e!==null?DI(e):null}function DI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=DI(e);if(t!==null)return t;e=e.sibling}return null}var RI=tn.unstable_scheduleCallback,Sb=tn.unstable_cancelCallback,zD=tn.unstable_shouldYield,AD=tn.unstable_requestPaint,Be=tn.unstable_now,ND=tn.unstable_getCurrentPriorityLevel,xg=tn.unstable_ImmediatePriority,MI=tn.unstable_UserBlockingPriority,ju=tn.unstable_NormalPriority,OD=tn.unstable_LowPriority,LI=tn.unstable_IdlePriority,sc=null,Kn=null;function DD(e){if(Kn&&typeof Kn.onCommitFiberRoot=="function")try{Kn.onCommitFiberRoot(sc,e,void 0,(e.current.flags&128)===128)}catch(t){}}var On=Math.clz32?Math.clz32:LD,RD=Math.log,MD=Math.LN2;function LD(e){return e>>>=0,e===0?32:31-(RD(e)/MD|0)|0}var cu=64,du=4194304;function Qs(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Uu(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,r=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~r;a!==0?i=Qs(a):(o&=s,o!==0&&(i=Qs(o)))}else s=n&~r,s!==0?i=Qs(s):o!==0&&(i=Qs(o));if(i===0)return 0;if(t!==0&&t!==i&&!(t&r)&&(r=i&-i,o=t&-t,r>=o||r===16&&(o&4194240)!==0))return t;if(i&4&&(i|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)n=31-On(t),r=1<<n,i|=e[n],t&=~r;return i}function jD(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function UD(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-On(o),a=1<<s,u=r[s];u===-1?(!(a&n)||a&i)&&(r[s]=jD(a,t)):u<=t&&(e.expiredLanes|=a),o&=~a}}function Lm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jI(){var e=cu;return cu<<=1,!(cu&4194240)&&(cu=64),e}function im(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ca(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-On(t),e[t]=n}function FD(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-On(n),o=1<<r;t[r]=0,i[r]=-1,e[r]=-1,n&=~o}}function $g(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-On(n),r=1<<i;r&t|e[i]&t&&(e[i]|=t),n&=~r}}var we=0;function UI(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var FI,_g,ZI,VI,WI,jm=!1,pu=[],Mr=null,Lr=null,jr=null,fa=new Map,ma=new Map,Nr=[],ZD="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function wb(e,t){switch(e){case"focusin":case"focusout":Mr=null;break;case"dragenter":case"dragleave":Lr=null;break;case"mouseover":case"mouseout":jr=null;break;case"pointerover":case"pointerout":fa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ma.delete(t.pointerId)}}function Ws(e,t,n,i,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Pa(t),t!==null&&_g(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function VD(e,t,n,i,r){switch(t){case"focusin":return Mr=Ws(Mr,e,t,n,i,r),!0;case"dragenter":return Lr=Ws(Lr,e,t,n,i,r),!0;case"mouseover":return jr=Ws(jr,e,t,n,i,r),!0;case"pointerover":var o=r.pointerId;return fa.set(o,Ws(fa.get(o)||null,e,t,n,i,r)),!0;case"gotpointercapture":return o=r.pointerId,ma.set(o,Ws(ma.get(o)||null,e,t,n,i,r)),!0}return!1}function qI(e){var t=xi(e.target);if(t!==null){var n=Ai(t);if(n!==null){if(t=n.tag,t===13){if(t=NI(n),t!==null){e.blockedOn=t,WI(e.priority,function(){ZI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Iu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Um(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);Om=i,n.target.dispatchEvent(i),Om=null}else return t=Pa(n),t!==null&&_g(t),e.blockedOn=n,!1;t.shift()}return!0}function xb(e,t,n){Iu(e)&&n.delete(t)}function WD(){jm=!1,Mr!==null&&Iu(Mr)&&(Mr=null),Lr!==null&&Iu(Lr)&&(Lr=null),jr!==null&&Iu(jr)&&(jr=null),fa.forEach(xb),ma.forEach(xb)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,jm||(jm=!0,tn.unstable_scheduleCallback(tn.unstable_NormalPriority,WD)))}function ga(e){function t(r){return qs(r,e)}if(0<pu.length){qs(pu[0],e);for(var n=1;n<pu.length;n++){var i=pu[n];i.blockedOn===e&&(i.blockedOn=null)}}for(Mr!==null&&qs(Mr,e),Lr!==null&&qs(Lr,e),jr!==null&&qs(jr,e),fa.forEach(t),ma.forEach(t),n=0;n<Nr.length;n++)i=Nr[n],i.blockedOn===e&&(i.blockedOn=null);for(;0<Nr.length&&(n=Nr[0],n.blockedOn===null);)qI(n),n.blockedOn===null&&Nr.shift()}var _o=vr.ReactCurrentBatchConfig,Fu=!0;function qD(e,t,n,i){var r=we,o=_o.transition;_o.transition=null;try{we=1,kg(e,t,n,i)}finally{we=r,_o.transition=o}}function BD(e,t,n,i){var r=we,o=_o.transition;_o.transition=null;try{we=4,kg(e,t,n,i)}finally{we=r,_o.transition=o}}function kg(e,t,n,i){if(Fu){var r=Um(e,t,n,i);if(r===null)dm(e,t,i,Zu,n),wb(e,i);else if(VD(r,e,t,n,i))i.stopPropagation();else if(wb(e,i),t&4&&-1<ZD.indexOf(e)){for(;r!==null;){var o=Pa(r);if(o!==null&&FI(o),o=Um(e,t,n,i),o===null&&dm(e,t,i,Zu,n),o===r)break;r=o}r!==null&&i.stopPropagation()}else dm(e,t,i,null,n)}}var Zu=null;function Um(e,t,n,i){if(Zu=null,e=wg(i),e=xi(e),e!==null)if(t=Ai(e),t===null)e=null;else if(n=t.tag,n===13){if(e=NI(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zu=e,null}function BI(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ND()){case xg:return 1;case MI:return 4;case ju:case OD:return 16;case LI:return 536870912;default:return 16}default:return 16}}var Dr=null,bg=null,Cu=null;function HI(){if(Cu)return Cu;var e,t=bg,n=t.length,i,r="value"in Dr?Dr.value:Dr.textContent,o=r.length;for(e=0;e<n&&t[e]===r[e];e++);var s=n-e;for(i=1;i<=s&&t[n-i]===r[o-i];i++);return Cu=r.slice(e,1<i?1-i:void 0)}function Eu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fu(){return!0}function $b(){return!1}function nn(e){function t(n,i,r,o,s){this._reactName=n,this._targetInst=r,this.type=i,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?fu:$b,this.isPropagationStopped=$b,this}return je(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=fu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=fu)},persist:function(){},isPersistent:fu}),t}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ig=nn(No),Ea=je({},No,{view:0,detail:0}),HD=nn(Ea),om,sm,Bs,ac=je({},Ea,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Bs&&(Bs&&e.type==="mousemove"?(om=e.screenX-Bs.screenX,sm=e.screenY-Bs.screenY):sm=om=0,Bs=e),om)},movementY:function(e){return"movementY"in e?e.movementY:sm}}),_b=nn(ac),GD=je({},ac,{dataTransfer:0}),JD=nn(GD),KD=je({},Ea,{relatedTarget:0}),am=nn(KD),XD=je({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),YD=nn(XD),QD=je({},No,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),eR=nn(QD),tR=je({},No,{data:0}),kb=nn(tR),nR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rR={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},iR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=iR[e])?!!t[e]:!1}function Cg(){return oR}var sR=je({},Ea,{key:function(e){if(e.key){var t=nR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Eu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cg,charCode:function(e){return e.type==="keypress"?Eu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Eu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),aR=nn(sR),lR=je({},ac,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bb=nn(lR),uR=je({},Ea,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cg}),cR=nn(uR),dR=je({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),pR=nn(dR),fR=je({},ac,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),mR=nn(fR),gR=[9,13,27,32],Eg=fr&&"CompositionEvent"in window,ra=null;fr&&"documentMode"in document&&(ra=document.documentMode);var hR=fr&&"TextEvent"in window&&!ra,GI=fr&&(!Eg||ra&&8<ra&&11>=ra),Ib=String.fromCharCode(32),Cb=!1;function JI(e,t){switch(e){case"keyup":return gR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function KI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var uo=!1;function vR(e,t){switch(e){case"compositionend":return KI(t);case"keypress":return t.which!==32?null:(Cb=!0,Ib);case"textInput":return e=t.data,e===Ib&&Cb?null:e;default:return null}}function yR(e,t){if(uo)return e==="compositionend"||!Eg&&JI(e,t)?(e=HI(),Cu=bg=Dr=null,uo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return GI&&t.locale!=="ko"?null:t.data;default:return null}}var SR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Eb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!SR[e.type]:t==="textarea"}function XI(e,t,n,i){EI(i),t=Vu(t,"onChange"),0<t.length&&(n=new Ig("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var ia=null,ha=null;function wR(e){l0(e,0)}function lc(e){var t=fo(e);if(xI(t))return e}function xR(e,t){if(e==="change")return t}var YI=!1;fr&&(fr?(gu="oninput"in document,gu||(lm=document.createElement("div"),lm.setAttribute("oninput","return;"),gu=typeof lm.oninput=="function"),mu=gu):mu=!1,YI=mu&&(!document.documentMode||9<document.documentMode));var mu,gu,lm;function Pb(){ia&&(ia.detachEvent("onpropertychange",QI),ha=ia=null)}function QI(e){if(e.propertyName==="value"&&lc(ha)){var t=[];XI(t,ha,e,wg(e)),AI(wR,t)}}function $R(e,t,n){e==="focusin"?(Pb(),ia=t,ha=n,ia.attachEvent("onpropertychange",QI)):e==="focusout"&&Pb()}function _R(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lc(ha)}function kR(e,t){if(e==="click")return lc(t)}function bR(e,t){if(e==="input"||e==="change")return lc(t)}function IR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rn=typeof Object.is=="function"?Object.is:IR;function va(e,t){if(Rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!$m.call(t,r)||!Rn(e[r],t[r]))return!1}return!0}function Tb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zb(e,t){var n=Tb(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Tb(n)}}function e0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?e0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function t0(){for(var e=window,t=Ru();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(i){n=!1}if(n)e=t.contentWindow;else break;t=Ru(e.document)}return t}function Pg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function CR(e){var t=t0(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&e0(n.ownerDocument.documentElement,n)){if(i!==null&&Pg(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,o=Math.min(i.start,r);i=i.end===void 0?o:Math.min(i.end,r),!e.extend&&o>i&&(r=i,i=o,o=r),r=zb(n,o);var s=zb(n,i);r&&s&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),o>i?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ER=fr&&"documentMode"in document&&11>=document.documentMode,co=null,Fm=null,oa=null,Zm=!1;function Ab(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zm||co==null||co!==Ru(i)||(i=co,"selectionStart"in i&&Pg(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),oa&&va(oa,i)||(oa=i,i=Vu(Fm,"onSelect"),0<i.length&&(t=new Ig("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=co)))}function hu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var po={animationend:hu("Animation","AnimationEnd"),animationiteration:hu("Animation","AnimationIteration"),animationstart:hu("Animation","AnimationStart"),transitionend:hu("Transition","TransitionEnd")},um={},n0={};fr&&(n0=document.createElement("div").style,"AnimationEvent"in window||(delete po.animationend.animation,delete po.animationiteration.animation,delete po.animationstart.animation),"TransitionEvent"in window||delete po.transitionend.transition);function uc(e){if(um[e])return um[e];if(!po[e])return e;var t=po[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in n0)return um[e]=t[n];return e}var r0=uc("animationend"),i0=uc("animationiteration"),o0=uc("animationstart"),s0=uc("transitionend"),a0=new Map,Nb="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Hr(e,t){a0.set(e,t),zi(t,[e])}for(vu=0;vu<Nb.length;vu++)yu=Nb[vu],Ob=yu.toLowerCase(),Db=yu[0].toUpperCase()+yu.slice(1),Hr(Ob,"on"+Db);var yu,Ob,Db,vu;Hr(r0,"onAnimationEnd");Hr(i0,"onAnimationIteration");Hr(o0,"onAnimationStart");Hr("dblclick","onDoubleClick");Hr("focusin","onFocus");Hr("focusout","onBlur");Hr(s0,"onTransitionEnd");Io("onMouseEnter",["mouseout","mouseover"]);Io("onMouseLeave",["mouseout","mouseover"]);Io("onPointerEnter",["pointerout","pointerover"]);Io("onPointerLeave",["pointerout","pointerover"]);zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zi("onBeforeInput",["compositionend","keypress","textInput","paste"]);zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ea="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),PR=new Set("cancel close invalid load scroll toggle".split(" ").concat(ea));function Rb(e,t,n){var i=e.type||"unknown-event";e.currentTarget=n,PD(i,t,void 0,e),e.currentTarget=null}function l0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],r=i.event;i=i.listeners;e:{var o=void 0;if(t)for(var s=i.length-1;0<=s;s--){var a=i[s],u=a.instance,d=a.currentTarget;if(a=a.listener,u!==o&&r.isPropagationStopped())break e;Rb(r,a,d),o=u}else for(s=0;s<i.length;s++){if(a=i[s],u=a.instance,d=a.currentTarget,a=a.listener,u!==o&&r.isPropagationStopped())break e;Rb(r,a,d),o=u}}}if(Lu)throw e=Mm,Lu=!1,Mm=null,e}function Ae(e,t){var n=t[Hm];n===void 0&&(n=t[Hm]=new Set);var i=e+"__bubble";n.has(i)||(u0(t,e,2,!1),n.add(i))}function cm(e,t,n){var i=0;t&&(i|=4),u0(n,e,i,t)}var Su="_reactListening"+Math.random().toString(36).slice(2);function ya(e){if(!e[Su]){e[Su]=!0,hI.forEach(function(n){n!=="selectionchange"&&(PR.has(n)||cm(n,!1,e),cm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Su]||(t[Su]=!0,cm("selectionchange",!1,t))}}function u0(e,t,n,i){switch(BI(t)){case 1:var r=qD;break;case 4:r=BD;break;default:r=kg}n=r.bind(null,t,n,e),r=void 0,!Rm||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function dm(e,t,n,i,r){var o=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var s=i.tag;if(s===3||s===4){var a=i.stateNode.containerInfo;if(a===r||a.nodeType===8&&a.parentNode===r)break;if(s===4)for(s=i.return;s!==null;){var u=s.tag;if((u===3||u===4)&&(u=s.stateNode.containerInfo,u===r||u.nodeType===8&&u.parentNode===r))return;s=s.return}for(;a!==null;){if(s=xi(a),s===null)return;if(u=s.tag,u===5||u===6){i=o=s;continue e}a=a.parentNode}}i=i.return}AI(function(){var d=o,p=wg(n),l=[];e:{var f=a0.get(e);if(f!==void 0){var m=Ig,g=e;switch(e){case"keypress":if(Eu(n)===0)break e;case"keydown":case"keyup":m=aR;break;case"focusin":g="focus",m=am;break;case"focusout":g="blur",m=am;break;case"beforeblur":case"afterblur":m=am;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=_b;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=JD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=cR;break;case r0:case i0:case o0:m=YD;break;case s0:m=pR;break;case"scroll":m=HD;break;case"wheel":m=mR;break;case"copy":case"cut":case"paste":m=eR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=bb}var h=(t&4)!==0,x=!h&&e==="scroll",y=h?f!==null?f+"Capture":null:f;h=[];for(var v=d,S;v!==null;){S=v;var w=S.stateNode;if(S.tag===5&&w!==null&&(S=w,y!==null&&(w=pa(v,y),w!=null&&h.push(Sa(v,w,S)))),x)break;v=v.return}0<h.length&&(f=new m(f,g,null,n,p),l.push({event:f,listeners:h}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==Om&&(g=n.relatedTarget||n.fromElement)&&(xi(g)||g[mr]))break e;if((m||f)&&(f=p.window===p?p:(f=p.ownerDocument)?f.defaultView||f.parentWindow:window,m?(g=n.relatedTarget||n.toElement,m=d,g=g?xi(g):null,g!==null&&(x=Ai(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=d),m!==g)){if(h=_b,w="onMouseLeave",y="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(h=bb,w="onPointerLeave",y="onPointerEnter",v="pointer"),x=m==null?f:fo(m),S=g==null?f:fo(g),f=new h(w,v+"leave",m,n,p),f.target=x,f.relatedTarget=S,w=null,xi(p)===d&&(h=new h(y,v+"enter",g,n,p),h.target=S,h.relatedTarget=x,w=h),x=w,m&&g)t:{for(h=m,y=g,v=0,S=h;S;S=so(S))v++;for(S=0,w=y;w;w=so(w))S++;for(;0<v-S;)h=so(h),v--;for(;0<S-v;)y=so(y),S--;for(;v--;){if(h===y||y!==null&&h===y.alternate)break t;h=so(h),y=so(y)}h=null}else h=null;m!==null&&Mb(l,f,m,h,!1),g!==null&&x!==null&&Mb(l,x,g,h,!0)}}e:{if(f=d?fo(d):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var $=xR;else if(Eb(f))if(YI)$=bR;else{$=_R;var _=$R}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&($=kR);if($&&($=$(e,d))){XI(l,$,n,p);break e}_&&_(e,f,d),e==="focusout"&&(_=f._wrapperState)&&_.controlled&&f.type==="number"&&Pm(f,"number",f.value)}switch(_=d?fo(d):window,e){case"focusin":(Eb(_)||_.contentEditable==="true")&&(co=_,Fm=d,oa=null);break;case"focusout":oa=Fm=co=null;break;case"mousedown":Zm=!0;break;case"contextmenu":case"mouseup":case"dragend":Zm=!1,Ab(l,n,p);break;case"selectionchange":if(ER)break;case"keydown":case"keyup":Ab(l,n,p)}var I;if(Eg)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else uo?JI(e,n)&&(b="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(b="onCompositionStart");b&&(GI&&n.locale!=="ko"&&(uo||b!=="onCompositionStart"?b==="onCompositionEnd"&&uo&&(I=HI()):(Dr=p,bg="value"in Dr?Dr.value:Dr.textContent,uo=!0)),_=Vu(d,b),0<_.length&&(b=new kb(b,e,null,n,p),l.push({event:b,listeners:_}),I?b.data=I:(I=KI(n),I!==null&&(b.data=I)))),(I=hR?vR(e,n):yR(e,n))&&(d=Vu(d,"onBeforeInput"),0<d.length&&(p=new kb("onBeforeInput","beforeinput",null,n,p),l.push({event:p,listeners:d}),p.data=I))}l0(l,t)})}function Sa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vu(e,t){for(var n=t+"Capture",i=[];e!==null;){var r=e,o=r.stateNode;r.tag===5&&o!==null&&(r=o,o=pa(e,n),o!=null&&i.unshift(Sa(e,o,r)),o=pa(e,t),o!=null&&i.push(Sa(e,o,r))),e=e.return}return i}function so(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mb(e,t,n,i,r){for(var o=t._reactName,s=[];n!==null&&n!==i;){var a=n,u=a.alternate,d=a.stateNode;if(u!==null&&u===i)break;a.tag===5&&d!==null&&(a=d,r?(u=pa(n,o),u!=null&&s.unshift(Sa(n,u,a))):r||(u=pa(n,o),u!=null&&s.push(Sa(n,u,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var TR=/\r\n?/g,zR=/\u0000|\uFFFD/g;function Lb(e){return(typeof e=="string"?e:""+e).replace(TR,`
11
+ `).replace(zR,"")}function wu(e,t,n){if(t=Lb(t),Lb(e)!==t&&n)throw Error(M(425))}function Wu(){}var Vm=null,Wm=null;function qm(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bm=typeof setTimeout=="function"?setTimeout:void 0,AR=typeof clearTimeout=="function"?clearTimeout:void 0,jb=typeof Promise=="function"?Promise:void 0,NR=typeof queueMicrotask=="function"?queueMicrotask:typeof jb!="undefined"?function(e){return jb.resolve(null).then(e).catch(OR)}:Bm;function OR(e){setTimeout(function(){throw e})}function pm(e,t){var n=t,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(i===0){e.removeChild(r),ga(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);ga(t)}function Ur(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ub(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Oo=Math.random().toString(36).slice(2),Jn="__reactFiber$"+Oo,wa="__reactProps$"+Oo,mr="__reactContainer$"+Oo,Hm="__reactEvents$"+Oo,DR="__reactListeners$"+Oo,RR="__reactHandles$"+Oo;function xi(e){var t=e[Jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mr]||n[Jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ub(e);e!==null;){if(n=e[Jn])return n;e=Ub(e)}return t}e=n,n=e.parentNode}return null}function Pa(e){return e=e[Jn]||e[mr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function cc(e){return e[wa]||null}var Gm=[],mo=-1;function Gr(e){return{current:e}}function Ne(e){0>mo||(e.current=Gm[mo],Gm[mo]=null,mo--)}function Pe(e,t){mo++,Gm[mo]=e.current,e.current=t}var Br={},wt=Gr(Br),Ut=Gr(!1),Ii=Br;function Co(e,t){var n=e.type.contextTypes;if(!n)return Br;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var r={},o;for(o in n)r[o]=t[o];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Ft(e){return e=e.childContextTypes,e!=null}function qu(){Ne(Ut),Ne(wt)}function Fb(e,t,n){if(wt.current!==Br)throw Error(M(168));Pe(wt,t),Pe(Ut,n)}function c0(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in t))throw Error(M(108,$D(e)||"Unknown",r));return je({},n,i)}function Bu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Br,Ii=wt.current,Pe(wt,e),Pe(Ut,Ut.current),!0}function Zb(e,t,n){var i=e.stateNode;if(!i)throw Error(M(169));n?(e=c0(e,t,Ii),i.__reactInternalMemoizedMergedChildContext=e,Ne(Ut),Ne(wt),Pe(wt,e)):Ne(Ut),Pe(Ut,n)}var ur=null,dc=!1,fm=!1;function d0(e){ur===null?ur=[e]:ur.push(e)}function MR(e){dc=!0,d0(e)}function Jr(){if(!fm&&ur!==null){fm=!0;var e=0,t=we;try{var n=ur;for(we=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}ur=null,dc=!1}catch(r){throw ur!==null&&(ur=ur.slice(e+1)),RI(xg,Jr),r}finally{we=t,fm=!1}}return null}var go=[],ho=0,Hu=null,Gu=0,gn=[],hn=0,Ci=null,cr=1,dr="";function Si(e,t){go[ho++]=Gu,go[ho++]=Hu,Hu=e,Gu=t}function p0(e,t,n){gn[hn++]=cr,gn[hn++]=dr,gn[hn++]=Ci,Ci=e;var i=cr;e=dr;var r=32-On(i)-1;i&=~(1<<r),n+=1;var o=32-On(t)+r;if(30<o){var s=r-r%5;o=(i&(1<<s)-1).toString(32),i>>=s,r-=s,cr=1<<32-On(t)+r|n<<r|i,dr=o+e}else cr=1<<o|n<<r|i,dr=e}function Tg(e){e.return!==null&&(Si(e,1),p0(e,1,0))}function zg(e){for(;e===Hu;)Hu=go[--ho],go[ho]=null,Gu=go[--ho],go[ho]=null;for(;e===Ci;)Ci=gn[--hn],gn[hn]=null,dr=gn[--hn],gn[hn]=null,cr=gn[--hn],gn[hn]=null}var en=null,Qt=null,De=!1,Nn=null;function f0(e,t){var n=vn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Vb(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,en=e,Qt=Ur(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,en=e,Qt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ci!==null?{id:cr,overflow:dr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=vn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,en=e,Qt=null,!0):!1;default:return!1}}function Jm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Km(e){if(De){var t=Qt;if(t){var n=t;if(!Vb(e,t)){if(Jm(e))throw Error(M(418));t=Ur(n.nextSibling);var i=en;t&&Vb(e,t)?f0(i,n):(e.flags=e.flags&-4097|2,De=!1,en=e)}}else{if(Jm(e))throw Error(M(418));e.flags=e.flags&-4097|2,De=!1,en=e}}}function Wb(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;en=e}function xu(e){if(e!==en)return!1;if(!De)return Wb(e),De=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!qm(e.type,e.memoizedProps)),t&&(t=Qt)){if(Jm(e))throw m0(),Error(M(418));for(;t;)f0(e,t),t=Ur(t.nextSibling)}if(Wb(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qt=Ur(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qt=null}}else Qt=en?Ur(e.stateNode.nextSibling):null;return!0}function m0(){for(var e=Qt;e;)e=Ur(e.nextSibling)}function Eo(){Qt=en=null,De=!1}function Ag(e){Nn===null?Nn=[e]:Nn.push(e)}var LR=vr.ReactCurrentBatchConfig;function Hs(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(M(309));var i=n.stateNode}if(!i)throw Error(M(147,e));var r=i,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=r.refs;s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error(M(284));if(!n._owner)throw Error(M(290,e))}return e}function $u(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function qb(e){var t=e._init;return t(e._payload)}function g0(e){function t(y,v){if(e){var S=y.deletions;S===null?(y.deletions=[v],y.flags|=16):S.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function i(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function r(y,v){return y=Wr(y,v),y.index=0,y.sibling=null,y}function o(y,v,S){return y.index=S,e?(S=y.alternate,S!==null?(S=S.index,S<v?(y.flags|=2,v):S):(y.flags|=2,v)):(y.flags|=1048576,v)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,S,w){return v===null||v.tag!==6?(v=wm(S,y.mode,w),v.return=y,v):(v=r(v,S),v.return=y,v)}function u(y,v,S,w){var $=S.type;return $===lo?p(y,v,S.props.children,w,S.key):v!==null&&(v.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===zr&&qb($)===v.type)?(w=r(v,S.props),w.ref=Hs(y,v,S),w.return=y,w):(w=Du(S.type,S.key,S.props,null,y.mode,w),w.ref=Hs(y,v,S),w.return=y,w)}function d(y,v,S,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==S.containerInfo||v.stateNode.implementation!==S.implementation?(v=xm(S,y.mode,w),v.return=y,v):(v=r(v,S.children||[]),v.return=y,v)}function p(y,v,S,w,$){return v===null||v.tag!==7?(v=bi(S,y.mode,w,$),v.return=y,v):(v=r(v,S),v.return=y,v)}function l(y,v,S){if(typeof v=="string"&&v!==""||typeof v=="number")return v=wm(""+v,y.mode,S),v.return=y,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case au:return S=Du(v.type,v.key,v.props,null,y.mode,S),S.ref=Hs(y,null,v),S.return=y,S;case ao:return v=xm(v,y.mode,S),v.return=y,v;case zr:var w=v._init;return l(y,w(v._payload),S)}if(Ys(v)||Vs(v))return v=bi(v,y.mode,S,null),v.return=y,v;$u(y,v)}return null}function f(y,v,S,w){var $=v!==null?v.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return $!==null?null:a(y,v,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case au:return S.key===$?u(y,v,S,w):null;case ao:return S.key===$?d(y,v,S,w):null;case zr:return $=S._init,f(y,v,$(S._payload),w)}if(Ys(S)||Vs(S))return $!==null?null:p(y,v,S,w,null);$u(y,S)}return null}function m(y,v,S,w,$){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(S)||null,a(v,y,""+w,$);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case au:return y=y.get(w.key===null?S:w.key)||null,u(v,y,w,$);case ao:return y=y.get(w.key===null?S:w.key)||null,d(v,y,w,$);case zr:var _=w._init;return m(y,v,S,_(w._payload),$)}if(Ys(w)||Vs(w))return y=y.get(S)||null,p(v,y,w,$,null);$u(v,w)}return null}function g(y,v,S,w){for(var $=null,_=null,I=v,b=v=0,T=null;I!==null&&b<S.length;b++){I.index>b?(T=I,I=null):T=I.sibling;var A=f(y,I,S[b],w);if(A===null){I===null&&(I=T);break}e&&I&&A.alternate===null&&t(y,I),v=o(A,v,b),_===null?$=A:_.sibling=A,_=A,I=T}if(b===S.length)return n(y,I),De&&Si(y,b),$;if(I===null){for(;b<S.length;b++)I=l(y,S[b],w),I!==null&&(v=o(I,v,b),_===null?$=I:_.sibling=I,_=I);return De&&Si(y,b),$}for(I=i(y,I);b<S.length;b++)T=m(I,y,b,S[b],w),T!==null&&(e&&T.alternate!==null&&I.delete(T.key===null?b:T.key),v=o(T,v,b),_===null?$=T:_.sibling=T,_=T);return e&&I.forEach(function(U){return t(y,U)}),De&&Si(y,b),$}function h(y,v,S,w){var $=Vs(S);if(typeof $!="function")throw Error(M(150));if(S=$.call(S),S==null)throw Error(M(151));for(var _=$=null,I=v,b=v=0,T=null,A=S.next();I!==null&&!A.done;b++,A=S.next()){I.index>b?(T=I,I=null):T=I.sibling;var U=f(y,I,A.value,w);if(U===null){I===null&&(I=T);break}e&&I&&U.alternate===null&&t(y,I),v=o(U,v,b),_===null?$=U:_.sibling=U,_=U,I=T}if(A.done)return n(y,I),De&&Si(y,b),$;if(I===null){for(;!A.done;b++,A=S.next())A=l(y,A.value,w),A!==null&&(v=o(A,v,b),_===null?$=A:_.sibling=A,_=A);return De&&Si(y,b),$}for(I=i(y,I);!A.done;b++,A=S.next())A=m(I,y,b,A.value,w),A!==null&&(e&&A.alternate!==null&&I.delete(A.key===null?b:A.key),v=o(A,v,b),_===null?$=A:_.sibling=A,_=A);return e&&I.forEach(function(Z){return t(y,Z)}),De&&Si(y,b),$}function x(y,v,S,w){if(typeof S=="object"&&S!==null&&S.type===lo&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case au:e:{for(var $=S.key,_=v;_!==null;){if(_.key===$){if($=S.type,$===lo){if(_.tag===7){n(y,_.sibling),v=r(_,S.props.children),v.return=y,y=v;break e}}else if(_.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===zr&&qb($)===_.type){n(y,_.sibling),v=r(_,S.props),v.ref=Hs(y,_,S),v.return=y,y=v;break e}n(y,_);break}else t(y,_);_=_.sibling}S.type===lo?(v=bi(S.props.children,y.mode,w,S.key),v.return=y,y=v):(w=Du(S.type,S.key,S.props,null,y.mode,w),w.ref=Hs(y,v,S),w.return=y,y=w)}return s(y);case ao:e:{for(_=S.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(y,v.sibling),v=r(v,S.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=xm(S,y.mode,w),v.return=y,y=v}return s(y);case zr:return _=S._init,x(y,v,_(S._payload),w)}if(Ys(S))return g(y,v,S,w);if(Vs(S))return h(y,v,S,w);$u(y,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,v!==null&&v.tag===6?(n(y,v.sibling),v=r(v,S),v.return=y,y=v):(n(y,v),v=wm(S,y.mode,w),v.return=y,y=v),s(y)):n(y,v)}return x}var Po=g0(!0),h0=g0(!1),Ju=Gr(null),Ku=null,vo=null,Ng=null;function Og(){Ng=vo=Ku=null}function Dg(e){var t=Ju.current;Ne(Ju),e._currentValue=t}function Xm(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function ko(e,t){Ku=e,Ng=vo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(jt=!0),e.firstContext=null)}function Sn(e){var t=e._currentValue;if(Ng!==e)if(e={context:e,memoizedValue:t,next:null},vo===null){if(Ku===null)throw Error(M(308));vo=e,Ku.dependencies={lanes:0,firstContext:e}}else vo=vo.next=e;return t}var $i=null;function Rg(e){$i===null?$i=[e]:$i.push(e)}function v0(e,t,n,i){var r=t.interleaved;return r===null?(n.next=n,Rg(t)):(n.next=r.next,r.next=n),t.interleaved=n,gr(e,i)}function gr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ar=!1;function Mg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function y0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fr(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,ge&2){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,gr(e,n)}return r=i.interleaved,r===null?(t.next=t,Rg(i)):(t.next=r.next,r.next=t),i.interleaved=t,gr(e,n)}function Pu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,$g(e,n)}}function Bb(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?r=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?r=o=t:o=o.next=t}else r=o=t;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:i.shared,effects:i.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Xu(e,t,n,i){var r=e.updateQueue;Ar=!1;var o=r.firstBaseUpdate,s=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var u=a,d=u.next;u.next=null,s===null?o=d:s.next=d,s=u;var p=e.alternate;p!==null&&(p=p.updateQueue,a=p.lastBaseUpdate,a!==s&&(a===null?p.firstBaseUpdate=d:a.next=d,p.lastBaseUpdate=u))}if(o!==null){var l=r.baseState;s=0,p=d=u=null,a=o;do{var f=a.lane,m=a.eventTime;if((i&f)===f){p!==null&&(p=p.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,h=a;switch(f=t,m=n,h.tag){case 1:if(g=h.payload,typeof g=="function"){l=g.call(m,l,f);break e}l=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=h.payload,f=typeof g=="function"?g.call(m,l,f):g,f==null)break e;l=je({},l,f);break e;case 2:Ar=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=r.effects,f===null?r.effects=[a]:f.push(a))}else m={eventTime:m,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},p===null?(d=p=m,u=l):p=p.next=m,s|=f;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;f=a,a=f.next,f.next=null,r.lastBaseUpdate=f,r.shared.pending=null}}while(1);if(p===null&&(u=l),r.baseState=u,r.firstBaseUpdate=d,r.lastBaseUpdate=p,t=r.shared.interleaved,t!==null){r=t;do s|=r.lane,r=r.next;while(r!==t)}else o===null&&(r.shared.lanes=0);Pi|=s,e.lanes=s,e.memoizedState=l}}function Hb(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],r=i.callback;if(r!==null){if(i.callback=null,i=n,typeof r!="function")throw Error(M(191,r));r.call(i)}}}var Ta={},Xn=Gr(Ta),xa=Gr(Ta),$a=Gr(Ta);function _i(e){if(e===Ta)throw Error(M(174));return e}function Lg(e,t){switch(Pe($a,t),Pe(xa,e),Pe(Xn,Ta),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zm(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zm(t,e)}Ne(Xn),Pe(Xn,t)}function To(){Ne(Xn),Ne(xa),Ne($a)}function S0(e){_i($a.current);var t=_i(Xn.current),n=zm(t,e.type);t!==n&&(Pe(xa,e),Pe(Xn,n))}function jg(e){xa.current===e&&(Ne(Xn),Ne(xa))}var Me=Gr(0);function Yu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mm=[];function Ug(){for(var e=0;e<mm.length;e++)mm[e]._workInProgressVersionPrimary=null;mm.length=0}var Tu=vr.ReactCurrentDispatcher,gm=vr.ReactCurrentBatchConfig,Ei=0,Le=null,rt=null,at=null,Qu=!1,sa=!1,_a=0,jR=0;function vt(){throw Error(M(321))}function Fg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rn(e[n],t[n]))return!1;return!0}function Zg(e,t,n,i,r,o){if(Ei=o,Le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Tu.current=e===null||e.memoizedState===null?VR:WR,e=n(i,r),sa){o=0;do{if(sa=!1,_a=0,25<=o)throw Error(M(301));o+=1,at=rt=null,t.updateQueue=null,Tu.current=qR,e=n(i,r)}while(sa)}if(Tu.current=ec,t=rt!==null&&rt.next!==null,Ei=0,at=rt=Le=null,Qu=!1,t)throw Error(M(300));return e}function Vg(){var e=_a!==0;return _a=0,e}function Gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?Le.memoizedState=at=e:at=at.next=e,at}function wn(){if(rt===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=at===null?Le.memoizedState:at.next;if(t!==null)at=t,rt=e;else{if(e===null)throw Error(M(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},at===null?Le.memoizedState=at=e:at=at.next=e}return at}function ka(e,t){return typeof t=="function"?t(e):t}function hm(e){var t=wn(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var i=rt,r=i.baseQueue,o=n.pending;if(o!==null){if(r!==null){var s=r.next;r.next=o.next,o.next=s}i.baseQueue=r=o,n.pending=null}if(r!==null){o=r.next,i=i.baseState;var a=s=null,u=null,d=o;do{var p=d.lane;if((Ei&p)===p)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),i=d.hasEagerState?d.eagerState:e(i,d.action);else{var l={lane:p,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(a=u=l,s=i):u=u.next=l,Le.lanes|=p,Pi|=p}d=d.next}while(d!==null&&d!==o);u===null?s=i:u.next=a,Rn(i,t.memoizedState)||(jt=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=u,n.lastRenderedState=i}if(e=n.interleaved,e!==null){r=e;do o=r.lane,Le.lanes|=o,Pi|=o,r=r.next;while(r!==e)}else r===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function vm(e){var t=wn(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var i=n.dispatch,r=n.pending,o=t.memoizedState;if(r!==null){n.pending=null;var s=r=r.next;do o=e(o,s.action),s=s.next;while(s!==r);Rn(o,t.memoizedState)||(jt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function w0(){}function x0(e,t){var n=Le,i=wn(),r=t(),o=!Rn(i.memoizedState,r);if(o&&(i.memoizedState=r,jt=!0),i=i.queue,Wg(k0.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||at!==null&&at.memoizedState.tag&1){if(n.flags|=2048,ba(9,_0.bind(null,n,i,r,t),void 0,null),lt===null)throw Error(M(349));Ei&30||$0(n,t,r)}return r}function $0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Le.updateQueue,t===null?(t={lastEffect:null,stores:null},Le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _0(e,t,n,i){t.value=n,t.getSnapshot=i,b0(t)&&I0(e)}function k0(e,t,n){return n(function(){b0(t)&&I0(e)})}function b0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rn(e,n)}catch(i){return!0}}function I0(e){var t=gr(e,1);t!==null&&Dn(t,e,1,-1)}function Gb(e){var t=Gn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:e},t.queue=e,e=e.dispatch=ZR.bind(null,Le,e),[t.memoizedState,e]}function ba(e,t,n,i){return e={tag:e,create:t,destroy:n,deps:i,next:null},t=Le.updateQueue,t===null?(t={lastEffect:null,stores:null},Le.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e)),e}function C0(){return wn().memoizedState}function zu(e,t,n,i){var r=Gn();Le.flags|=e,r.memoizedState=ba(1|t,n,void 0,i===void 0?null:i)}function pc(e,t,n,i){var r=wn();i=i===void 0?null:i;var o=void 0;if(rt!==null){var s=rt.memoizedState;if(o=s.destroy,i!==null&&Fg(i,s.deps)){r.memoizedState=ba(t,n,o,i);return}}Le.flags|=e,r.memoizedState=ba(1|t,n,o,i)}function Jb(e,t){return zu(8390656,8,e,t)}function Wg(e,t){return pc(2048,8,e,t)}function E0(e,t){return pc(4,2,e,t)}function P0(e,t){return pc(4,4,e,t)}function T0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function z0(e,t,n){return n=n!=null?n.concat([e]):null,pc(4,4,T0.bind(null,t,e),n)}function qg(){}function A0(e,t){var n=wn();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&Fg(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function N0(e,t){var n=wn();t=t===void 0?null:t;var i=n.memoizedState;return i!==null&&t!==null&&Fg(t,i[1])?i[0]:(e=e(),n.memoizedState=[e,t],e)}function O0(e,t,n){return Ei&21?(Rn(n,t)||(n=jI(),Le.lanes|=n,Pi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jt=!0),e.memoizedState=n)}function UR(e,t){var n=we;we=n!==0&&4>n?n:4,e(!0);var i=gm.transition;gm.transition={};try{e(!1),t()}finally{we=n,gm.transition=i}}function D0(){return wn().memoizedState}function FR(e,t,n){var i=Vr(e);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},R0(e))M0(t,n);else if(n=v0(e,t,n,i),n!==null){var r=Pt();Dn(n,e,i,r),L0(n,t,i)}}function ZR(e,t,n){var i=Vr(e),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(R0(e))M0(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(r.hasEagerState=!0,r.eagerState=a,Rn(a,s)){var u=t.interleaved;u===null?(r.next=r,Rg(t)):(r.next=u.next,u.next=r),t.interleaved=r;return}}catch(d){}finally{}n=v0(e,t,r,i),n!==null&&(r=Pt(),Dn(n,e,i,r),L0(n,t,i))}}function R0(e){var t=e.alternate;return e===Le||t!==null&&t===Le}function M0(e,t){sa=Qu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function L0(e,t,n){if(n&4194240){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,$g(e,n)}}var ec={readContext:Sn,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useInsertionEffect:vt,useLayoutEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useMutableSource:vt,useSyncExternalStore:vt,useId:vt,unstable_isNewReconciler:!1},VR={readContext:Sn,useCallback:function(e,t){return Gn().memoizedState=[e,t===void 0?null:t],e},useContext:Sn,useEffect:Jb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zu(4194308,4,T0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zu(4194308,4,e,t)},useInsertionEffect:function(e,t){return zu(4,2,e,t)},useMemo:function(e,t){var n=Gn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var i=Gn();return t=n!==void 0?n(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=FR.bind(null,Le,e),[i.memoizedState,e]},useRef:function(e){var t=Gn();return e={current:e},t.memoizedState=e},useState:Gb,useDebugValue:qg,useDeferredValue:function(e){return Gn().memoizedState=e},useTransition:function(){var e=Gb(!1),t=e[0];return e=UR.bind(null,e[1]),Gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Le,r=Gn();if(De){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),lt===null)throw Error(M(349));Ei&30||$0(i,t,n)}r.memoizedState=n;var o={value:n,getSnapshot:t};return r.queue=o,Jb(k0.bind(null,i,o,e),[e]),i.flags|=2048,ba(9,_0.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Gn(),t=lt.identifierPrefix;if(De){var n=dr,i=cr;n=(i&~(1<<32-On(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=_a++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=jR++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},WR={readContext:Sn,useCallback:A0,useContext:Sn,useEffect:Wg,useImperativeHandle:z0,useInsertionEffect:E0,useLayoutEffect:P0,useMemo:N0,useReducer:hm,useRef:C0,useState:function(){return hm(ka)},useDebugValue:qg,useDeferredValue:function(e){var t=wn();return O0(t,rt.memoizedState,e)},useTransition:function(){var e=hm(ka)[0],t=wn().memoizedState;return[e,t]},useMutableSource:w0,useSyncExternalStore:x0,useId:D0,unstable_isNewReconciler:!1},qR={readContext:Sn,useCallback:A0,useContext:Sn,useEffect:Wg,useImperativeHandle:z0,useInsertionEffect:E0,useLayoutEffect:P0,useMemo:N0,useReducer:vm,useRef:C0,useState:function(){return vm(ka)},useDebugValue:qg,useDeferredValue:function(e){var t=wn();return rt===null?t.memoizedState=e:O0(t,rt.memoizedState,e)},useTransition:function(){var e=vm(ka)[0],t=wn().memoizedState;return[e,t]},useMutableSource:w0,useSyncExternalStore:x0,useId:D0,unstable_isNewReconciler:!1};function zn(e,t){if(e&&e.defaultProps){t=je({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ym(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:je({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fc={isMounted:function(e){return(e=e._reactInternals)?Ai(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Pt(),r=Vr(e),o=pr(i,r);o.payload=t,n!=null&&(o.callback=n),t=Fr(e,o,r),t!==null&&(Dn(t,e,r,i),Pu(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Pt(),r=Vr(e),o=pr(i,r);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Fr(e,o,r),t!==null&&(Dn(t,e,r,i),Pu(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pt(),i=Vr(e),r=pr(n,i);r.tag=2,t!=null&&(r.callback=t),t=Fr(e,r,i),t!==null&&(Dn(t,e,i,n),Pu(t,e,i))}};function Kb(e,t,n,i,r,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,o,s):t.prototype&&t.prototype.isPureReactComponent?!va(n,i)||!va(r,o):!0}function j0(e,t,n){var i=!1,r=Br,o=t.contextType;return typeof o=="object"&&o!==null?o=Sn(o):(r=Ft(t)?Ii:wt.current,i=t.contextTypes,o=(i=i!=null)?Co(e,r):Br),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fc,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=o),t}function Xb(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function Qm(e,t,n,i){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},Mg(e);var o=t.contextType;typeof o=="object"&&o!==null?r.context=Sn(o):(o=Ft(t)?Ii:wt.current,r.context=Co(e,o)),r.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Ym(e,t,o,n),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&fc.enqueueReplaceState(r,r.state,null),Xu(e,n,r,i),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308)}function zo(e,t){try{var n="",i=t;do n+=xD(i),i=i.return;while(i);var r=n}catch(o){r=`
12
+ Error generating stack: `+o.message+`
13
+ `+o.stack}return{value:e,source:t,stack:r,digest:null}}function ym(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function eg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var BR=typeof WeakMap=="function"?WeakMap:Map;function U0(e,t,n){n=pr(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){nc||(nc=!0,cg=i),eg(e,t)},n}function F0(e,t,n){n=pr(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var r=t.value;n.payload=function(){return i(r)},n.callback=function(){eg(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){eg(e,t),typeof i!="function"&&(Zr===null?Zr=new Set([this]):Zr.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Yb(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new BR;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(n)||(r.add(n),e=sM.bind(null,e,t,n),t.then(e,e))}function Qb(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function eI(e,t,n,i,r){return e.mode&1?(e.flags|=65536,e.lanes=r,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=pr(-1,1),t.tag=2,Fr(n,t,1))),n.lanes|=1),e)}var HR=vr.ReactCurrentOwner,jt=!1;function Et(e,t,n,i){t.child=e===null?h0(t,null,n,i):Po(t,e.child,n,i)}function tI(e,t,n,i,r){n=n.render;var o=t.ref;return ko(t,r),i=Zg(e,t,n,i,o,r),n=Vg(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,hr(e,t,r)):(De&&n&&Tg(t),t.flags|=1,Et(e,t,i,r),t.child)}function nI(e,t,n,i,r){if(e===null){var o=n.type;return typeof o=="function"&&!Qg(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Z0(e,t,o,i,r)):(e=Du(n.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&r)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:va,n(s,i)&&e.ref===t.ref)return hr(e,t,r)}return t.flags|=1,e=Wr(o,i),e.ref=t.ref,e.return=t,t.child=e}function Z0(e,t,n,i,r){if(e!==null){var o=e.memoizedProps;if(va(o,i)&&e.ref===t.ref)if(jt=!1,t.pendingProps=i=o,(e.lanes&r)!==0)e.flags&131072&&(jt=!0);else return t.lanes=e.lanes,hr(e,t,r)}return tg(e,t,n,i,r)}function V0(e,t,n){var i=t.pendingProps,r=i.children,o=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pe(So,Yt),Yt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pe(So,Yt),Yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=o!==null?o.baseLanes:n,Pe(So,Yt),Yt|=i}else o!==null?(i=o.baseLanes|n,t.memoizedState=null):i=n,Pe(So,Yt),Yt|=i;return Et(e,t,r,n),t.child}function W0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function tg(e,t,n,i,r){var o=Ft(n)?Ii:wt.current;return o=Co(t,o),ko(t,r),n=Zg(e,t,n,i,o,r),i=Vg(),e!==null&&!jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,hr(e,t,r)):(De&&i&&Tg(t),t.flags|=1,Et(e,t,n,r),t.child)}function rI(e,t,n,i,r){if(Ft(n)){var o=!0;Bu(t)}else o=!1;if(ko(t,r),t.stateNode===null)Au(e,t),j0(t,n,i),Qm(t,n,i,r),i=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var u=s.context,d=n.contextType;typeof d=="object"&&d!==null?d=Sn(d):(d=Ft(n)?Ii:wt.current,d=Co(t,d));var p=n.getDerivedStateFromProps,l=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function";l||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==i||u!==d)&&Xb(t,s,i,d),Ar=!1;var f=t.memoizedState;s.state=f,Xu(t,i,s,r),u=t.memoizedState,a!==i||f!==u||Ut.current||Ar?(typeof p=="function"&&(Ym(t,n,p,i),u=t.memoizedState),(a=Ar||Kb(t,n,a,i,f,u,d))?(l||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=u),s.props=i,s.state=u,s.context=d,i=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{s=t.stateNode,y0(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:zn(t.type,a),s.props=d,l=t.pendingProps,f=s.context,u=n.contextType,typeof u=="object"&&u!==null?u=Sn(u):(u=Ft(n)?Ii:wt.current,u=Co(t,u));var m=n.getDerivedStateFromProps;(p=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==l||f!==u)&&Xb(t,s,i,u),Ar=!1,f=t.memoizedState,s.state=f,Xu(t,i,s,r);var g=t.memoizedState;a!==l||f!==g||Ut.current||Ar?(typeof m=="function"&&(Ym(t,n,m,i),g=t.memoizedState),(d=Ar||Kb(t,n,d,i,f,g,u)||!1)?(p||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(i,g,u),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(i,g,u)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=g),s.props=i,s.state=g,s.context=u,i=d):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),i=!1)}return ng(e,t,n,i,o,r)}function ng(e,t,n,i,r,o){W0(e,t);var s=(t.flags&128)!==0;if(!i&&!s)return r&&Zb(t,n,!1),hr(e,t,o);i=t.stateNode,HR.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&s?(t.child=Po(t,e.child,null,o),t.child=Po(t,null,a,o)):Et(e,t,a,o),t.memoizedState=i.state,r&&Zb(t,n,!0),t.child}function q0(e){var t=e.stateNode;t.pendingContext?Fb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Fb(e,t.context,!1),Lg(e,t.containerInfo)}function iI(e,t,n,i,r){return Eo(),Ag(r),t.flags|=256,Et(e,t,n,i),t.child}var rg={dehydrated:null,treeContext:null,retryLane:0};function ig(e){return{baseLanes:e,cachePool:null,transitions:null}}function B0(e,t,n){var i=t.pendingProps,r=Me.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(r&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),Pe(Me,r&1),e===null)return Km(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,o?(i=t.mode,o=t.child,s={mode:"hidden",children:s},!(i&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=hc(s,i,0,null),e=bi(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ig(n),t.memoizedState=rg,e):Bg(t,s));if(r=e.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return GR(e,t,s,i,a,r,n);if(o){o=i.fallback,s=t.mode,r=e.child,a=r.sibling;var u={mode:"hidden",children:i.children};return!(s&1)&&t.child!==r?(i=t.child,i.childLanes=0,i.pendingProps=u,t.deletions=null):(i=Wr(r,u),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?o=Wr(a,o):(o=bi(o,s,n,null),o.flags|=2),o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,s=e.child.memoizedState,s=s===null?ig(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=rg,i}return o=e.child,e=o.sibling,i=Wr(o,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=n),i.return=t,i.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Bg(e,t){return t=hc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function _u(e,t,n,i){return i!==null&&Ag(i),Po(t,e.child,null,n),e=Bg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GR(e,t,n,i,r,o,s){if(n)return t.flags&256?(t.flags&=-257,i=ym(Error(M(422))),_u(e,t,s,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=i.fallback,r=t.mode,i=hc({mode:"visible",children:i.children},r,0,null),o=bi(o,r,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Po(t,e.child,null,s),t.child.memoizedState=ig(s),t.memoizedState=rg,o);if(!(t.mode&1))return _u(e,t,s,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,o=Error(M(419)),i=ym(o,i,void 0),_u(e,t,s,i)}if(a=(s&e.childLanes)!==0,jt||a){if(i=lt,i!==null){switch(s&-s){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|s)?0:r,r!==0&&r!==o.retryLane&&(o.retryLane=r,gr(e,r),Dn(i,e,r,-1))}return Yg(),i=ym(Error(M(421))),_u(e,t,s,i)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=aM.bind(null,e),r._reactRetry=t,null):(e=o.treeContext,Qt=Ur(r.nextSibling),en=t,De=!0,Nn=null,e!==null&&(gn[hn++]=cr,gn[hn++]=dr,gn[hn++]=Ci,cr=e.id,dr=e.overflow,Ci=t),t=Bg(t,i.children),t.flags|=4096,t)}function oI(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Xm(e.return,t,n)}function Sm(e,t,n,i,r){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=i,o.tail=n,o.tailMode=r)}function H0(e,t,n){var i=t.pendingProps,r=i.revealOrder,o=i.tail;if(Et(e,t,i.children,n),i=Me.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oI(e,n,t);else if(e.tag===19)oI(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Pe(Me,i),!(t.mode&1))t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&Yu(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Sm(t,!1,r,n,o);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Yu(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Sm(t,!0,n,null,o);break;case"together":Sm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Au(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function hr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=Wr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Wr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function JR(e,t,n){switch(t.tag){case 3:q0(t),Eo();break;case 5:S0(t);break;case 1:Ft(t.type)&&Bu(t);break;case 4:Lg(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,r=t.memoizedProps.value;Pe(Ju,i._currentValue),i._currentValue=r;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(Pe(Me,Me.current&1),t.flags|=128,null):n&t.child.childLanes?B0(e,t,n):(Pe(Me,Me.current&1),e=hr(e,t,n),e!==null?e.sibling:null);Pe(Me,Me.current&1);break;case 19:if(i=(n&t.childLanes)!==0,e.flags&128){if(i)return H0(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Pe(Me,Me.current),i)break;return null;case 22:case 23:return t.lanes=0,V0(e,t,n)}return hr(e,t,n)}var G0,og,J0,K0;G0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};og=function(){};J0=function(e,t,n,i){var r=e.memoizedProps;if(r!==i){e=t.stateNode,_i(Xn.current);var o=null;switch(n){case"input":r=Cm(e,r),i=Cm(e,i),o=[];break;case"select":r=je({},r,{value:void 0}),i=je({},i,{value:void 0}),o=[];break;case"textarea":r=Tm(e,r),i=Tm(e,i),o=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Wu)}Am(n,i);var s;n=null;for(d in r)if(!i.hasOwnProperty(d)&&r.hasOwnProperty(d)&&r[d]!=null)if(d==="style"){var a=r[d];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ca.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in i){var u=i[d];if(a=r!=null?r[d]:void 0,i.hasOwnProperty(d)&&u!==a&&(u!=null||a!=null))if(d==="style")if(a){for(s in a)!a.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in u)u.hasOwnProperty(s)&&a[s]!==u[s]&&(n||(n={}),n[s]=u[s])}else n||(o||(o=[]),o.push(d,n)),n=u;else d==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(d,u)):d==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(d,""+u):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ca.hasOwnProperty(d)?(u!=null&&d==="onScroll"&&Ae("scroll",e),o||a===u||(o=[])):(o=o||[]).push(d,u))}n&&(o=o||[]).push("style",n);var d=o;(t.updateQueue=d)&&(t.flags|=4)}};K0=function(e,t,n,i){n!==i&&(t.flags|=4)};function Gs(e,t){if(!De)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function KR(e,t,n){var i=t.pendingProps;switch(zg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return Ft(t.type)&&qu(),yt(t),null;case 3:return i=t.stateNode,To(),Ne(Ut),Ne(wt),Ug(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(xu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Nn!==null&&(fg(Nn),Nn=null))),og(e,t),yt(t),null;case 5:jg(t);var r=_i($a.current);if(n=t.type,e!==null&&t.stateNode!=null)J0(e,t,n,i,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(M(166));return yt(t),null}if(e=_i(Xn.current),xu(t)){i=t.stateNode,n=t.type;var o=t.memoizedProps;switch(i[Jn]=t,i[wa]=o,e=(t.mode&1)!==0,n){case"dialog":Ae("cancel",i),Ae("close",i);break;case"iframe":case"object":case"embed":Ae("load",i);break;case"video":case"audio":for(r=0;r<ea.length;r++)Ae(ea[r],i);break;case"source":Ae("error",i);break;case"img":case"image":case"link":Ae("error",i),Ae("load",i);break;case"details":Ae("toggle",i);break;case"input":fb(i,o),Ae("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!o.multiple},Ae("invalid",i);break;case"textarea":gb(i,o),Ae("invalid",i)}Am(n,o),r=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?i.textContent!==a&&(o.suppressHydrationWarning!==!0&&wu(i.textContent,a,e),r=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&wu(i.textContent,a,e),r=["children",""+a]):ca.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Ae("scroll",i)}switch(n){case"input":lu(i),mb(i,o,!0);break;case"textarea":lu(i),hb(i);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(i.onclick=Wu)}i=r,t.updateQueue=i,i!==null&&(t.flags|=4)}else{s=r.nodeType===9?r:r.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kI(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=s.createElement(n,{is:i.is}):(e=s.createElement(n),n==="select"&&(s=e,i.multiple?s.multiple=!0:i.size&&(s.size=i.size))):e=s.createElementNS(e,n),e[Jn]=t,e[wa]=i,G0(e,t,!1,!1),t.stateNode=e;e:{switch(s=Nm(n,i),n){case"dialog":Ae("cancel",e),Ae("close",e),r=i;break;case"iframe":case"object":case"embed":Ae("load",e),r=i;break;case"video":case"audio":for(r=0;r<ea.length;r++)Ae(ea[r],e);r=i;break;case"source":Ae("error",e),r=i;break;case"img":case"image":case"link":Ae("error",e),Ae("load",e),r=i;break;case"details":Ae("toggle",e),r=i;break;case"input":fb(e,i),r=Cm(e,i),Ae("invalid",e);break;case"option":r=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},r=je({},i,{value:void 0}),Ae("invalid",e);break;case"textarea":gb(e,i),r=Tm(e,i),Ae("invalid",e);break;default:r=i}Am(n,r),a=r;for(o in a)if(a.hasOwnProperty(o)){var u=a[o];o==="style"?CI(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&bI(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&da(e,u):typeof u=="number"&&da(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ca.hasOwnProperty(o)?u!=null&&o==="onScroll"&&Ae("scroll",e):u!=null&&hg(e,o,u,s))}switch(n){case"input":lu(e),mb(e,i,!1);break;case"textarea":lu(e),hb(e);break;case"option":i.value!=null&&e.setAttribute("value",""+qr(i.value));break;case"select":e.multiple=!!i.multiple,o=i.value,o!=null?wo(e,!!i.multiple,o,!1):i.defaultValue!=null&&wo(e,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(e.onclick=Wu)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yt(t),null;case 6:if(e&&t.stateNode!=null)K0(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(M(166));if(n=_i($a.current),_i(Xn.current),xu(t)){if(i=t.stateNode,n=t.memoizedProps,i[Jn]=t,(o=i.nodeValue!==n)&&(e=en,e!==null))switch(e.tag){case 3:wu(i.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wu(i.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Jn]=t,t.stateNode=i}return yt(t),null;case 13:if(Ne(Me),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&Qt!==null&&t.mode&1&&!(t.flags&128))m0(),Eo(),t.flags|=98560,o=!1;else if(o=xu(t),i!==null&&i.dehydrated!==null){if(e===null){if(!o)throw Error(M(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(M(317));o[Jn]=t}else Eo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),o=!1}else Nn!==null&&(fg(Nn),Nn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Me.current&1?it===0&&(it=3):Yg())),t.updateQueue!==null&&(t.flags|=4),yt(t),null);case 4:return To(),og(e,t),e===null&&ya(t.stateNode.containerInfo),yt(t),null;case 10:return Dg(t.type._context),yt(t),null;case 17:return Ft(t.type)&&qu(),yt(t),null;case 19:if(Ne(Me),o=t.memoizedState,o===null)return yt(t),null;if(i=(t.flags&128)!==0,s=o.rendering,s===null)if(i)Gs(o,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Yu(e),s!==null){for(t.flags|=128,Gs(o,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)o=n,e=i,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Pe(Me,Me.current&1|2),t.child}e=e.sibling}o.tail!==null&&Be()>Ao&&(t.flags|=128,i=!0,Gs(o,!1),t.lanes=4194304)}else{if(!i)if(e=Yu(s),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!De)return yt(t),null}else 2*Be()-o.renderingStartTime>Ao&&n!==1073741824&&(t.flags|=128,i=!0,Gs(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Be(),t.sibling=null,n=Me.current,Pe(Me,i?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return Xg(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Yt&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function XR(e,t){switch(zg(t),t.tag){case 1:return Ft(t.type)&&qu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return To(),Ne(Ut),Ne(wt),Ug(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return jg(t),null;case 13:if(Ne(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));Eo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ne(Me),null;case 4:return To(),null;case 10:return Dg(t.type._context),null;case 22:case 23:return Xg(),null;case 24:return null;default:return null}}var ku=!1,St=!1,YR=typeof WeakSet=="function"?WeakSet:Set,Y=null;function yo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Ve(e,t,i)}else n.current=null}function sg(e,t,n){try{n()}catch(i){Ve(e,t,i)}}var sI=!1;function QR(e,t){if(Vm=Fu,e=t0(),Pg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch(w){n=null;break e}var s=0,a=-1,u=-1,d=0,p=0,l=e,f=null;t:for(;;){for(var m;l!==n||r!==0&&l.nodeType!==3||(a=s+r),l!==o||i!==0&&l.nodeType!==3||(u=s+i),l.nodeType===3&&(s+=l.nodeValue.length),(m=l.firstChild)!==null;)f=l,l=m;for(;;){if(l===e)break t;if(f===n&&++d===r&&(a=s),f===o&&++p===i&&(u=s),(m=l.nextSibling)!==null)break;l=f,f=l.parentNode}l=m}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wm={focusedElem:e,selectionRange:n},Fu=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var h=g.memoizedProps,x=g.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?h:zn(t.type,h),x);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(w){Ve(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return g=sI,sI=!1,g}function aa(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&e)===e){var o=r.destroy;r.destroy=void 0,o!==void 0&&sg(t,n,o)}r=r.next}while(r!==i)}}function mc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create;n.destroy=i()}n=n.next}while(n!==t)}}function ag(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function X0(e){var t=e.alternate;t!==null&&(e.alternate=null,X0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jn],delete t[wa],delete t[Hm],delete t[DR],delete t[RR])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Y0(e){return e.tag===5||e.tag===3||e.tag===4}function aI(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function lg(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wu));else if(i!==4&&(e=e.child,e!==null))for(lg(e,t,n),e=e.sibling;e!==null;)lg(e,t,n),e=e.sibling}function ug(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(ug(e,t,n),e=e.sibling;e!==null;)ug(e,t,n),e=e.sibling}var dt=null,An=!1;function Tr(e,t,n){for(n=n.child;n!==null;)Q0(e,t,n),n=n.sibling}function Q0(e,t,n){if(Kn&&typeof Kn.onCommitFiberUnmount=="function")try{Kn.onCommitFiberUnmount(sc,n)}catch(a){}switch(n.tag){case 5:St||yo(n,t);case 6:var i=dt,r=An;dt=null,Tr(e,t,n),dt=i,An=r,dt!==null&&(An?(e=dt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dt.removeChild(n.stateNode));break;case 18:dt!==null&&(An?(e=dt,n=n.stateNode,e.nodeType===8?pm(e.parentNode,n):e.nodeType===1&&pm(e,n),ga(e)):pm(dt,n.stateNode));break;case 4:i=dt,r=An,dt=n.stateNode.containerInfo,An=!0,Tr(e,t,n),dt=i,An=r;break;case 0:case 11:case 14:case 15:if(!St&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var o=r,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&sg(n,t,s),r=r.next}while(r!==i)}Tr(e,t,n);break;case 1:if(!St&&(yo(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){Ve(n,t,a)}Tr(e,t,n);break;case 21:Tr(e,t,n);break;case 22:n.mode&1?(St=(i=St)||n.memoizedState!==null,Tr(e,t,n),St=i):Tr(e,t,n);break;default:Tr(e,t,n)}}function lI(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YR),t.forEach(function(i){var r=lM.bind(null,e,i);n.has(i)||(n.add(i),i.then(r,r))})}}function Tn(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:dt=a.stateNode,An=!1;break e;case 3:dt=a.stateNode.containerInfo,An=!0;break e;case 4:dt=a.stateNode.containerInfo,An=!0;break e}a=a.return}if(dt===null)throw Error(M(160));Q0(o,s,r),dt=null,An=!1;var u=r.alternate;u!==null&&(u.return=null),r.return=null}catch(d){Ve(r,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)eC(t,e),t=t.sibling}function eC(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Tn(t,e),Hn(e),i&4){try{aa(3,e,e.return),mc(3,e)}catch(h){Ve(e,e.return,h)}try{aa(5,e,e.return)}catch(h){Ve(e,e.return,h)}}break;case 1:Tn(t,e),Hn(e),i&512&&n!==null&&yo(n,n.return);break;case 5:if(Tn(t,e),Hn(e),i&512&&n!==null&&yo(n,n.return),e.flags&32){var r=e.stateNode;try{da(r,"")}catch(h){Ve(e,e.return,h)}}if(i&4&&(r=e.stateNode,r!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&$I(r,o),Nm(a,s);var d=Nm(a,o);for(s=0;s<u.length;s+=2){var p=u[s],l=u[s+1];p==="style"?CI(r,l):p==="dangerouslySetInnerHTML"?bI(r,l):p==="children"?da(r,l):hg(r,p,l,d)}switch(a){case"input":Em(r,o);break;case"textarea":_I(r,o);break;case"select":var f=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m!=null?wo(r,!!o.multiple,m,!1):f!==!!o.multiple&&(o.defaultValue!=null?wo(r,!!o.multiple,o.defaultValue,!0):wo(r,!!o.multiple,o.multiple?[]:"",!1))}r[wa]=o}catch(h){Ve(e,e.return,h)}}break;case 6:if(Tn(t,e),Hn(e),i&4){if(e.stateNode===null)throw Error(M(162));r=e.stateNode,o=e.memoizedProps;try{r.nodeValue=o}catch(h){Ve(e,e.return,h)}}break;case 3:if(Tn(t,e),Hn(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{ga(t.containerInfo)}catch(h){Ve(e,e.return,h)}break;case 4:Tn(t,e),Hn(e);break;case 13:Tn(t,e),Hn(e),r=e.child,r.flags&8192&&(o=r.memoizedState!==null,r.stateNode.isHidden=o,!o||r.alternate!==null&&r.alternate.memoizedState!==null||(Jg=Be())),i&4&&lI(e);break;case 22:if(p=n!==null&&n.memoizedState!==null,e.mode&1?(St=(d=St)||p,Tn(t,e),St=d):Tn(t,e),Hn(e),i&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!p&&e.mode&1)for(Y=e,p=e.child;p!==null;){for(l=Y=p;Y!==null;){switch(f=Y,m=f.child,f.tag){case 0:case 11:case 14:case 15:aa(4,f,f.return);break;case 1:yo(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){i=f,n=f.return;try{t=i,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(h){Ve(i,n,h)}}break;case 5:yo(f,f.return);break;case 22:if(f.memoizedState!==null){cI(l);continue}}m!==null?(m.return=f,Y=m):cI(l)}p=p.sibling}e:for(p=null,l=e;;){if(l.tag===5){if(p===null){p=l;try{r=l.stateNode,d?(o=r.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=l.stateNode,u=l.memoizedProps.style,s=u!=null&&u.hasOwnProperty("display")?u.display:null,a.style.display=II("display",s))}catch(h){Ve(e,e.return,h)}}}else if(l.tag===6){if(p===null)try{l.stateNode.nodeValue=d?"":l.memoizedProps}catch(h){Ve(e,e.return,h)}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===e)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break e;for(;l.sibling===null;){if(l.return===null||l.return===e)break e;p===l&&(p=null),l=l.return}p===l&&(p=null),l.sibling.return=l.return,l=l.sibling}}break;case 19:Tn(t,e),Hn(e),i&4&&lI(e);break;case 21:break;default:Tn(t,e),Hn(e)}}function Hn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Y0(n)){var i=n;break e}n=n.return}throw Error(M(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(da(r,""),i.flags&=-33);var o=aI(e);ug(e,o,r);break;case 3:case 4:var s=i.stateNode.containerInfo,a=aI(e);lg(e,a,s);break;default:throw Error(M(161))}}catch(u){Ve(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function eM(e,t,n){Y=e,tC(e,t,n)}function tC(e,t,n){for(var i=(e.mode&1)!==0;Y!==null;){var r=Y,o=r.child;if(r.tag===22&&i){var s=r.memoizedState!==null||ku;if(!s){var a=r.alternate,u=a!==null&&a.memoizedState!==null||St;a=ku;var d=St;if(ku=s,(St=u)&&!d)for(Y=r;Y!==null;)s=Y,u=s.child,s.tag===22&&s.memoizedState!==null?dI(r):u!==null?(u.return=s,Y=u):dI(r);for(;o!==null;)Y=o,tC(o,t,n),o=o.sibling;Y=r,ku=a,St=d}uI(e,t,n)}else r.subtreeFlags&8772&&o!==null?(o.return=r,Y=o):uI(e,t,n)}}function uI(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:St||mc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!St)if(n===null)i.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:zn(t.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Hb(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Hb(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var p=d.memoizedState;if(p!==null){var l=p.dehydrated;l!==null&&ga(l)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}St||t.flags&512&&ag(t)}catch(f){Ve(t,t.return,f)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function cI(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function dI(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{mc(4,t)}catch(u){Ve(t,n,u)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var r=t.return;try{i.componentDidMount()}catch(u){Ve(t,r,u)}}var o=t.return;try{ag(t)}catch(u){Ve(t,o,u)}break;case 5:var s=t.return;try{ag(t)}catch(u){Ve(t,s,u)}}}catch(u){Ve(t,t.return,u)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var tM=Math.ceil,tc=vr.ReactCurrentDispatcher,Hg=vr.ReactCurrentOwner,yn=vr.ReactCurrentBatchConfig,ge=0,lt=null,Ke=null,pt=0,Yt=0,So=Gr(0),it=0,Ia=null,Pi=0,gc=0,Gg=0,la=null,Lt=null,Jg=0,Ao=1/0,lr=null,nc=!1,cg=null,Zr=null,bu=!1,Rr=null,rc=0,ua=0,dg=null,Nu=-1,Ou=0;function Pt(){return ge&6?Be():Nu!==-1?Nu:Nu=Be()}function Vr(e){return e.mode&1?ge&2&&pt!==0?pt&-pt:LR.transition!==null?(Ou===0&&(Ou=jI()),Ou):(e=we,e!==0||(e=window.event,e=e===void 0?16:BI(e.type)),e):1}function Dn(e,t,n,i){if(50<ua)throw ua=0,dg=null,Error(M(185));Ca(e,n,i),(!(ge&2)||e!==lt)&&(e===lt&&(!(ge&2)&&(gc|=n),it===4&&Or(e,pt)),Zt(e,i),n===1&&ge===0&&!(t.mode&1)&&(Ao=Be()+500,dc&&Jr()))}function Zt(e,t){var n=e.callbackNode;UD(e,t);var i=Uu(e,e===lt?pt:0);if(i===0)n!==null&&Sb(n),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(n!=null&&Sb(n),t===1)e.tag===0?MR(pI.bind(null,e)):d0(pI.bind(null,e)),NR(function(){!(ge&6)&&Jr()}),n=null;else{switch(UI(i)){case 1:n=xg;break;case 4:n=MI;break;case 16:n=ju;break;case 536870912:n=LI;break;default:n=ju}n=uC(n,nC.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function nC(e,t){if(Nu=-1,Ou=0,ge&6)throw Error(M(327));var n=e.callbackNode;if(bo()&&e.callbackNode!==n)return null;var i=Uu(e,e===lt?pt:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=ic(e,i);else{t=i;var r=ge;ge|=2;var o=iC();(lt!==e||pt!==t)&&(lr=null,Ao=Be()+500,ki(e,t));do try{iM();break}catch(a){rC(e,a)}while(1);Og(),tc.current=o,ge=r,Ke!==null?t=0:(lt=null,pt=0,t=it)}if(t!==0){if(t===2&&(r=Lm(e),r!==0&&(i=r,t=pg(e,r))),t===1)throw n=Ia,ki(e,0),Or(e,i),Zt(e,Be()),n;if(t===6)Or(e,i);else{if(r=e.current.alternate,!(i&30)&&!nM(r)&&(t=ic(e,i),t===2&&(o=Lm(e),o!==0&&(i=o,t=pg(e,o))),t===1))throw n=Ia,ki(e,0),Or(e,i),Zt(e,Be()),n;switch(e.finishedWork=r,e.finishedLanes=i,t){case 0:case 1:throw Error(M(345));case 2:wi(e,Lt,lr);break;case 3:if(Or(e,i),(i&130023424)===i&&(t=Jg+500-Be(),10<t)){if(Uu(e,0)!==0)break;if(r=e.suspendedLanes,(r&i)!==i){Pt(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=Bm(wi.bind(null,e,Lt,lr),t);break}wi(e,Lt,lr);break;case 4:if(Or(e,i),(i&4194240)===i)break;for(t=e.eventTimes,r=-1;0<i;){var s=31-On(i);o=1<<s,s=t[s],s>r&&(r=s),i&=~o}if(i=r,i=Be()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*tM(i/1960))-i,10<i){e.timeoutHandle=Bm(wi.bind(null,e,Lt,lr),i);break}wi(e,Lt,lr);break;case 5:wi(e,Lt,lr);break;default:throw Error(M(329))}}}return Zt(e,Be()),e.callbackNode===n?nC.bind(null,e):null}function pg(e,t){var n=la;return e.current.memoizedState.isDehydrated&&(ki(e,t).flags|=256),e=ic(e,t),e!==2&&(t=Lt,Lt=n,t!==null&&fg(t)),e}function fg(e){Lt===null?Lt=e:Lt.push.apply(Lt,e)}function nM(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var r=n[i],o=r.getSnapshot;r=r.value;try{if(!Rn(o(),r))return!1}catch(s){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Or(e,t){for(t&=~Gg,t&=~gc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-On(t),i=1<<n;e[n]=-1,t&=~i}}function pI(e){if(ge&6)throw Error(M(327));bo();var t=Uu(e,0);if(!(t&1))return Zt(e,Be()),null;var n=ic(e,t);if(e.tag!==0&&n===2){var i=Lm(e);i!==0&&(t=i,n=pg(e,i))}if(n===1)throw n=Ia,ki(e,0),Or(e,t),Zt(e,Be()),n;if(n===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wi(e,Lt,lr),Zt(e,Be()),null}function Kg(e,t){var n=ge;ge|=1;try{return e(t)}finally{ge=n,ge===0&&(Ao=Be()+500,dc&&Jr())}}function Ti(e){Rr!==null&&Rr.tag===0&&!(ge&6)&&bo();var t=ge;ge|=1;var n=yn.transition,i=we;try{if(yn.transition=null,we=1,e)return e()}finally{we=i,yn.transition=n,ge=t,!(ge&6)&&Jr()}}function Xg(){Yt=So.current,Ne(So)}function ki(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,AR(n)),Ke!==null)for(n=Ke.return;n!==null;){var i=n;switch(zg(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&qu();break;case 3:To(),Ne(Ut),Ne(wt),Ug();break;case 5:jg(i);break;case 4:To();break;case 13:Ne(Me);break;case 19:Ne(Me);break;case 10:Dg(i.type._context);break;case 22:case 23:Xg()}n=n.return}if(lt=e,Ke=e=Wr(e.current,null),pt=Yt=t,it=0,Ia=null,Gg=gc=Pi=0,Lt=la=null,$i!==null){for(t=0;t<$i.length;t++)if(n=$i[t],i=n.interleaved,i!==null){n.interleaved=null;var r=i.next,o=n.pending;if(o!==null){var s=o.next;o.next=r,i.next=s}n.pending=i}$i=null}return e}function rC(e,t){do{var n=Ke;try{if(Og(),Tu.current=ec,Qu){for(var i=Le.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}Qu=!1}if(Ei=0,at=rt=Le=null,sa=!1,_a=0,Hg.current=null,n===null||n.return===null){it=1,Ia=t,Ke=null;break}e:{var o=e,s=n.return,a=n,u=t;if(t=pt,a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,p=a,l=p.tag;if(!(p.mode&1)&&(l===0||l===11||l===15)){var f=p.alternate;f?(p.updateQueue=f.updateQueue,p.memoizedState=f.memoizedState,p.lanes=f.lanes):(p.updateQueue=null,p.memoizedState=null)}var m=Qb(s);if(m!==null){m.flags&=-257,eI(m,s,a,o,t),m.mode&1&&Yb(o,d,t),t=m,u=d;var g=t.updateQueue;if(g===null){var h=new Set;h.add(u),t.updateQueue=h}else g.add(u);break e}else{if(!(t&1)){Yb(o,d,t),Yg();break e}u=Error(M(426))}}else if(De&&a.mode&1){var x=Qb(s);if(x!==null){!(x.flags&65536)&&(x.flags|=256),eI(x,s,a,o,t),Ag(zo(u,a));break e}}o=u=zo(u,a),it!==4&&(it=2),la===null?la=[o]:la.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var y=U0(o,u,t);Bb(o,y);break e;case 1:a=u;var v=o.type,S=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Zr===null||!Zr.has(S)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=F0(o,a,t);Bb(o,w);break e}}o=o.return}while(o!==null)}sC(n)}catch($){t=$,Ke===n&&n!==null&&(Ke=n=n.return);continue}break}while(1)}function iC(){var e=tc.current;return tc.current=ec,e===null?ec:e}function Yg(){(it===0||it===3||it===2)&&(it=4),lt===null||!(Pi&268435455)&&!(gc&268435455)||Or(lt,pt)}function ic(e,t){var n=ge;ge|=2;var i=iC();(lt!==e||pt!==t)&&(lr=null,ki(e,t));do try{rM();break}catch(r){rC(e,r)}while(1);if(Og(),ge=n,tc.current=i,Ke!==null)throw Error(M(261));return lt=null,pt=0,it}function rM(){for(;Ke!==null;)oC(Ke)}function iM(){for(;Ke!==null&&!zD();)oC(Ke)}function oC(e){var t=lC(e.alternate,e,Yt);e.memoizedProps=e.pendingProps,t===null?sC(e):Ke=t,Hg.current=null}function sC(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=XR(n,t),n!==null){n.flags&=32767,Ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,Ke=null;return}}else if(n=KR(n,t,Yt),n!==null){Ke=n;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);it===0&&(it=5)}function wi(e,t,n){var i=we,r=yn.transition;try{yn.transition=null,we=1,oM(e,t,n,i)}finally{yn.transition=r,we=i}return null}function oM(e,t,n,i){do bo();while(Rr!==null);if(ge&6)throw Error(M(327));n=e.finishedWork;var r=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(FD(e,o),e===lt&&(Ke=lt=null,pt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bu||(bu=!0,uC(ju,function(){return bo(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=yn.transition,yn.transition=null;var s=we;we=1;var a=ge;ge|=4,Hg.current=null,QR(e,n),eC(n,e),CR(Wm),Fu=!!Vm,Wm=Vm=null,e.current=n,eM(n,e,r),AD(),ge=a,we=s,yn.transition=o}else e.current=n;if(bu&&(bu=!1,Rr=e,rc=r),o=e.pendingLanes,o===0&&(Zr=null),DD(n.stateNode,i),Zt(e,Be()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(nc)throw nc=!1,e=cg,cg=null,e;return rc&1&&e.tag!==0&&bo(),o=e.pendingLanes,o&1?e===dg?ua++:(ua=0,dg=e):ua=0,Jr(),null}function bo(){if(Rr!==null){var e=UI(rc),t=yn.transition,n=we;try{if(yn.transition=null,we=16>e?16:e,Rr===null)var i=!1;else{if(e=Rr,Rr=null,rc=0,ge&6)throw Error(M(331));var r=ge;for(ge|=4,Y=e.current;Y!==null;){var o=Y,s=o.child;if(Y.flags&16){var a=o.deletions;if(a!==null){for(var u=0;u<a.length;u++){var d=a[u];for(Y=d;Y!==null;){var p=Y;switch(p.tag){case 0:case 11:case 15:aa(8,p,o)}var l=p.child;if(l!==null)l.return=p,Y=l;else for(;Y!==null;){p=Y;var f=p.sibling,m=p.return;if(X0(p),p===d){Y=null;break}if(f!==null){f.return=m,Y=f;break}Y=m}}}var g=o.alternate;if(g!==null){var h=g.child;if(h!==null){g.child=null;do{var x=h.sibling;h.sibling=null,h=x}while(h!==null)}}Y=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Y=s;else e:for(;Y!==null;){if(o=Y,o.flags&2048)switch(o.tag){case 0:case 11:case 15:aa(9,o,o.return)}var y=o.sibling;if(y!==null){y.return=o.return,Y=y;break e}Y=o.return}}var v=e.current;for(Y=v;Y!==null;){s=Y;var S=s.child;if(s.subtreeFlags&2064&&S!==null)S.return=s,Y=S;else e:for(s=v;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:mc(9,a)}}catch($){Ve(a,a.return,$)}if(a===s){Y=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,Y=w;break e}Y=a.return}}if(ge=r,Jr(),Kn&&typeof Kn.onPostCommitFiberRoot=="function")try{Kn.onPostCommitFiberRoot(sc,e)}catch($){}i=!0}return i}finally{we=n,yn.transition=t}}return!1}function fI(e,t,n){t=zo(n,t),t=U0(e,t,1),e=Fr(e,t,1),t=Pt(),e!==null&&(Ca(e,1,t),Zt(e,t))}function Ve(e,t,n){if(e.tag===3)fI(e,e,n);else for(;t!==null;){if(t.tag===3){fI(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Zr===null||!Zr.has(i))){e=zo(n,e),e=F0(t,e,1),t=Fr(t,e,1),e=Pt(),t!==null&&(Ca(t,1,e),Zt(t,e));break}}t=t.return}}function sM(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),t=Pt(),e.pingedLanes|=e.suspendedLanes&n,lt===e&&(pt&n)===n&&(it===4||it===3&&(pt&130023424)===pt&&500>Be()-Jg?ki(e,0):Gg|=n),Zt(e,t)}function aC(e,t){t===0&&(e.mode&1?(t=du,du<<=1,!(du&130023424)&&(du=4194304)):t=1);var n=Pt();e=gr(e,t),e!==null&&(Ca(e,t,n),Zt(e,n))}function aM(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),aC(e,n)}function lM(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(M(314))}i!==null&&i.delete(t),aC(e,n)}var lC;lC=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ut.current)jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return jt=!1,JR(e,t,n);jt=!!(e.flags&131072)}else jt=!1,De&&t.flags&1048576&&p0(t,Gu,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Au(e,t),e=t.pendingProps;var r=Co(t,wt.current);ko(t,n),r=Zg(null,t,i,e,r,n);var o=Vg();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ft(i)?(o=!0,Bu(t)):o=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Mg(t),r.updater=fc,t.stateNode=r,r._reactInternals=t,Qm(t,i,e,n),t=ng(null,t,i,!0,o,n)):(t.tag=0,De&&o&&Tg(t),Et(null,t,r,n),t=t.child),t;case 16:i=t.elementType;e:{switch(Au(e,t),e=t.pendingProps,r=i._init,i=r(i._payload),t.type=i,r=t.tag=cM(i),e=zn(i,e),r){case 0:t=tg(null,t,i,e,n);break e;case 1:t=rI(null,t,i,e,n);break e;case 11:t=tI(null,t,i,e,n);break e;case 14:t=nI(null,t,i,zn(i.type,e),n);break e}throw Error(M(306,i,""))}return t;case 0:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:zn(i,r),tg(e,t,i,r,n);case 1:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:zn(i,r),rI(e,t,i,r,n);case 3:e:{if(q0(t),e===null)throw Error(M(387));i=t.pendingProps,o=t.memoizedState,r=o.element,y0(e,t),Xu(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){r=zo(Error(M(423)),t),t=iI(e,t,i,n,r);break e}else if(i!==r){r=zo(Error(M(424)),t),t=iI(e,t,i,n,r);break e}else for(Qt=Ur(t.stateNode.containerInfo.firstChild),en=t,De=!0,Nn=null,n=h0(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Eo(),i===r){t=hr(e,t,n);break e}Et(e,t,i,n)}t=t.child}return t;case 5:return S0(t),e===null&&Km(t),i=t.type,r=t.pendingProps,o=e!==null?e.memoizedProps:null,s=r.children,qm(i,r)?s=null:o!==null&&qm(i,o)&&(t.flags|=32),W0(e,t),Et(e,t,s,n),t.child;case 6:return e===null&&Km(t),null;case 13:return B0(e,t,n);case 4:return Lg(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Po(t,null,i,n):Et(e,t,i,n),t.child;case 11:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:zn(i,r),tI(e,t,i,r,n);case 7:return Et(e,t,t.pendingProps,n),t.child;case 8:return Et(e,t,t.pendingProps.children,n),t.child;case 12:return Et(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type._context,r=t.pendingProps,o=t.memoizedProps,s=r.value,Pe(Ju,i._currentValue),i._currentValue=s,o!==null)if(Rn(o.value,s)){if(o.children===r.children&&!Ut.current){t=hr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var u=a.firstContext;u!==null;){if(u.context===i){if(o.tag===1){u=pr(-1,n&-n),u.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var p=d.pending;p===null?u.next=u:(u.next=p.next,p.next=u),d.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Xm(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(M(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Xm(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Et(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,i=t.pendingProps.children,ko(t,n),r=Sn(r),i=i(r),t.flags|=1,Et(e,t,i,n),t.child;case 14:return i=t.type,r=zn(i,t.pendingProps),r=zn(i.type,r),nI(e,t,i,r,n);case 15:return Z0(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,r=t.pendingProps,r=t.elementType===i?r:zn(i,r),Au(e,t),t.tag=1,Ft(i)?(e=!0,Bu(t)):e=!1,ko(t,n),j0(t,i,r),Qm(t,i,r,n),ng(null,t,i,!0,e,n);case 19:return H0(e,t,n);case 22:return V0(e,t,n)}throw Error(M(156,t.tag))};function uC(e,t){return RI(e,t)}function uM(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(e,t,n,i){return new uM(e,t,n,i)}function Qg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cM(e){if(typeof e=="function")return Qg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yg)return 11;if(e===Sg)return 14}return 2}function Wr(e,t){var n=e.alternate;return n===null?(n=vn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Du(e,t,n,i,r,o){var s=2;if(i=e,typeof e=="function")Qg(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case lo:return bi(n.children,r,o,t);case vg:s=8,r|=8;break;case _m:return e=vn(12,n,t,r|2),e.elementType=_m,e.lanes=o,e;case km:return e=vn(13,n,t,r),e.elementType=km,e.lanes=o,e;case bm:return e=vn(19,n,t,r),e.elementType=bm,e.lanes=o,e;case SI:return hc(n,r,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vI:s=10;break e;case yI:s=9;break e;case yg:s=11;break e;case Sg:s=14;break e;case zr:s=16,i=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=vn(s,n,t,r),t.elementType=e,t.type=i,t.lanes=o,t}function bi(e,t,n,i){return e=vn(7,e,i,t),e.lanes=n,e}function hc(e,t,n,i){return e=vn(22,e,i,t),e.elementType=SI,e.lanes=n,e.stateNode={isHidden:!1},e}function wm(e,t,n){return e=vn(6,e,null,t),e.lanes=n,e}function xm(e,t,n){return t=vn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dM(e,t,n,i,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=im(0),this.expirationTimes=im(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=im(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function eh(e,t,n,i,r,o,s,a,u){return e=new dM(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=vn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Mg(o),e}function pM(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ao,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}function cC(e){if(!e)return Br;e=e._reactInternals;e:{if(Ai(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var n=e.type;if(Ft(n))return c0(e,n,t)}return t}function dC(e,t,n,i,r,o,s,a,u){return e=eh(n,i,!0,e,r,o,s,a,u),e.context=cC(null),n=e.current,i=Pt(),r=Vr(n),o=pr(i,r),o.callback=t!=null?t:null,Fr(n,o,r),e.current.lanes=r,Ca(e,r,i),Zt(e,i),e}function vc(e,t,n,i){var r=t.current,o=Pt(),s=Vr(r);return n=cC(n),t.context===null?t.context=n:t.pendingContext=n,t=pr(o,s),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Fr(r,t,s),e!==null&&(Dn(e,r,s,o),Pu(e,r,s)),s}function oc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function mI(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function th(e,t){mI(e,t),(e=e.alternate)&&mI(e,t)}function fM(){return null}var pC=typeof reportError=="function"?reportError:function(e){console.error(e)};function nh(e){this._internalRoot=e}yc.prototype.render=nh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));vc(e,t,null,null)};yc.prototype.unmount=nh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ti(function(){vc(null,e,null,null)}),t[mr]=null}};function yc(e){this._internalRoot=e}yc.prototype.unstable_scheduleHydration=function(e){if(e){var t=VI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nr.length&&t!==0&&t<Nr[n].priority;n++);Nr.splice(n,0,e),n===0&&qI(e)}};function rh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Sc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function gI(){}function mM(e,t,n,i,r){if(r){if(typeof i=="function"){var o=i;i=function(){var d=oc(s);o.call(d)}}var s=dC(t,i,e,0,null,!1,!1,"",gI);return e._reactRootContainer=s,e[mr]=s.current,ya(e.nodeType===8?e.parentNode:e),Ti(),s}for(;r=e.lastChild;)e.removeChild(r);if(typeof i=="function"){var a=i;i=function(){var d=oc(u);a.call(d)}}var u=eh(e,0,!1,null,null,!1,!1,"",gI);return e._reactRootContainer=u,e[mr]=u.current,ya(e.nodeType===8?e.parentNode:e),Ti(function(){vc(t,u,n,i)}),u}function wc(e,t,n,i,r){var o=n._reactRootContainer;if(o){var s=o;if(typeof r=="function"){var a=r;r=function(){var u=oc(s);a.call(u)}}vc(t,s,e,r)}else s=mM(n,t,e,r,i);return oc(s)}FI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qs(t.pendingLanes);n!==0&&($g(t,n|1),Zt(t,Be()),!(ge&6)&&(Ao=Be()+500,Jr()))}break;case 13:Ti(function(){var i=gr(e,1);if(i!==null){var r=Pt();Dn(i,e,1,r)}}),th(e,1)}};_g=function(e){if(e.tag===13){var t=gr(e,134217728);if(t!==null){var n=Pt();Dn(t,e,134217728,n)}th(e,134217728)}};ZI=function(e){if(e.tag===13){var t=Vr(e),n=gr(e,t);if(n!==null){var i=Pt();Dn(n,e,t,i)}th(e,t)}};VI=function(){return we};WI=function(e,t){var n=we;try{return we=e,t()}finally{we=n}};Dm=function(e,t,n){switch(t){case"input":if(Em(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var r=cc(i);if(!r)throw Error(M(90));xI(i),Em(i,r)}}}break;case"textarea":_I(e,n);break;case"select":t=n.value,t!=null&&wo(e,!!n.multiple,t,!1)}};TI=Kg;zI=Ti;var gM={usingClientEntryPoint:!1,Events:[Pa,fo,cc,EI,PI,Kg]},Js={findFiberByHostInstance:xi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hM={bundleType:Js.bundleType,version:Js.version,rendererPackageName:Js.rendererPackageName,rendererConfig:Js.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:vr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=OI(e),e===null?null:e.stateNode},findFiberByHostInstance:Js.findFiberByHostInstance||fM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(Ks=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ks.isDisabled&&Ks.supportsFiber))try{sc=Ks.inject(hM),Kn=Ks}catch(e){}var Ks;rn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gM;rn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!rh(t))throw Error(M(200));return pM(e,t,null,n)};rn.createRoot=function(e,t){if(!rh(e))throw Error(M(299));var n=!1,i="",r=pC;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=eh(e,1,!1,null,null,n,!1,i,r),e[mr]=t.current,ya(e.nodeType===8?e.parentNode:e),new nh(t)};rn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=OI(t),e=e===null?null:e.stateNode,e};rn.flushSync=function(e){return Ti(e)};rn.hydrate=function(e,t,n){if(!Sc(t))throw Error(M(200));return wc(null,e,t,!0,n)};rn.hydrateRoot=function(e,t,n){if(!rh(e))throw Error(M(405));var i=n!=null&&n.hydratedSources||null,r=!1,o="",s=pC;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=dC(t,null,e,1,n!=null?n:null,r,!1,o,s),e[mr]=t.current,ya(e),i)for(e=0;e<i.length;e++)n=i[e],r=n._getVersion,r=r(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new yc(t)};rn.render=function(e,t,n){if(!Sc(t))throw Error(M(200));return wc(null,e,t,!1,n)};rn.unmountComponentAtNode=function(e){if(!Sc(e))throw Error(M(40));return e._reactRootContainer?(Ti(function(){wc(null,null,e,!1,function(){e._reactRootContainer=null,e[mr]=null})}),!0):!1};rn.unstable_batchedUpdates=Kg;rn.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Sc(n))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return wc(e,t,n,!1,i)};rn.version="18.3.1-next-f1338f8080-20240426"});var ih=ne(($2,gC)=>{"use strict";function mC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mC)}catch(e){console.error(e)}}mC(),gC.exports=fC()});var za=ne(oh=>{"use strict";var hC=ih();oh.createRoot=hC.createRoot,oh.hydrateRoot=hC.hydrateRoot;var _2});var kC=ne(Cc=>{"use strict";var wM=Se(),xM=Symbol.for("react.element"),$M=Symbol.for("react.fragment"),_M=Object.prototype.hasOwnProperty,kM=wM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bM={key:!0,ref:!0,__self:!0,__source:!0};function _C(e,t,n){var i,r={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(i in t)_M.call(t,i)&&!bM.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)r[i]===void 0&&(r[i]=t[i]);return{$$typeof:xM,type:e,key:o,ref:s,props:r,_owner:kM.current}}Cc.Fragment=$M;Cc.jsx=_C;Cc.jsxs=_C});var fe=ne((P2,bC)=>{"use strict";bC.exports=kC()});var kF={};Vn(kF,{default:()=>Nl});module.exports=GA(kF);var Mt=require("obsidian"),sr=H(jf());var oP=require("obsidian"),QL=H(Se()),sP=H(za());var sh=null;function vC(e){sh=new xc(e)}function _e(){return sh||new xc({debugMode:!1})}var xc=class{constructor(t){this.config=t}log(...t){this.config.debugMode&&console.debug(...t)}error(...t){this.config.debugMode&&console.error(...t)}warn(...t){this.config.debugMode&&console.warn(...t)}info(...t){this.config.debugMode&&console.debug(...t)}};var $c=H(Se()),yC=(0,$c.createContext)(null),_c=yC.Provider;function SC(){let e=(0,$c.useContext)(yC);if(!e)throw new Error("useChatContext must be used within ChatContextProvider");return e}var XL=H(Se()),bn=require("obsidian");var ah=require("child_process"),Kr=require("obsidian");function wC(e){let t=e.replace(/%/g,"%%").replace(/"/g,'""');return/[\s&()<>|^]/.test(e)?`"${t}"`:t}function uh(){return process.env.SHELL?process.env.SHELL:Kr.Platform.isMacOS?"/bin/zsh":"/bin/sh"}function lh(e){return`'${e.replace(/'/g,"'\\''")}'`}var kc=null;function vM(){if(!Kr.Platform.isWin)return null;if(kc!==null)return kc;try{let e=(0,ah.execSync)('reg query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment" /v Path',{encoding:"utf8",windowsHide:!0}),t=(0,ah.execSync)('reg query "HKCU\\Environment" /v Path',{encoding:"utf8",windowsHide:!0}),n=xC(e),i=xC(t),r=[];return i&&r.push(i),n&&r.push(n),kc=r.join(";"),kc}catch(e){return null}}function xC(e){let t=e.split(`
14
+ `);for(let n of t){let i=n.trim();if(i.toLowerCase().startsWith("path")){let r=i.match(/Path\s+REG_(?:EXPAND_)?SZ\s+(.+)/i);if(r)return r[1].trim()}}return null}function bc(e){if(!Kr.Platform.isWin)return e;let t=vM();if(!t)return e;let i=(e.PATH||"").split(";").filter(s=>s.length>0),r=t.split(";").filter(s=>s.length>0),o=[...i];for(let s of r)o.some(a=>a.toLowerCase()===s.toLowerCase())||o.push(s);return{...e,PATH:o.join(";")}}function xn(e){let n=e.replace(/\\/g,"/").match(/^([A-Za-z]):(\/.*)/);if(n){let i=n[1].toLowerCase(),r=n[2];return`/mnt/${i}${r}`}return e}function Do(e){let t=e.match(/^\/mnt\/([a-zA-Z])\/(.*)/);if(t){let n=t[1].toUpperCase(),i=t[2].replace(/\//g,"\\");return`${n}:\\${i}`}return e}function $C(e,t){if(e===t)return!0;let n=o=>Do(o).replace(/\\/g,"/").replace(/\/+$/,""),i=n(e),r=n(t);return Kr.Platform.isWin?i.toLowerCase()===r.toLowerCase():i===r}function ch(e){let t=e.replace(/'/g,"'\\''");return`. ~/.profile 2>/dev/null; case \${SHELL:-/bin/sh} in */fish|*/elvish|*/nushell|*/xonsh) exec /bin/sh -l -c '${t}';; *) exec \${SHELL:-/bin/sh} -l -c '${t}';; esac`}function yM(e,t,n,i,r){if(/^\\\\/.test(n))throw new Error(`UNC paths are not supported in WSL mode: ${n}. Please use a local drive path.`);let o=xn(n);if(o===n&&/^[A-Za-z]:[\\/]/.test(n))throw new Error(`Failed to convert Windows path to WSL format: ${n}`);let s=[];if(i){if(!/^[a-zA-Z0-9._-]+$/.test(i))throw new Error(`Invalid WSL distribution name: ${i}`);s.push("-d",i)}let a=t.map(lh).join(" "),u=a.length>0?` ${a}`:"",d="";if(r){let l=xn(r);d=`export PATH="${SM(l)}:$PATH"; `}let p=`${d}cd ${lh(o)} && ${e}${u}`;return s.push("sh","-c",ch(p)),{command:"C:\\Windows\\System32\\wsl.exe",args:s}}function SM(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Ic(e,t,n,i){var o;let r=(o=i.alwaysEscape)!=null?o:!0;if(Kr.Platform.isWin&&i.wslMode){let s=yM(e,t,n,i.wslDistribution,i.nodeDir);return{command:s.command,args:s.args,needsShell:!1}}if(Kr.Platform.isMacOS||Kr.Platform.isLinux){let s=uh(),a;return t.length>0||r?a=[e,...t].map(lh).join(" "):a=e,i.nodeDir&&(a=`export PATH='${i.nodeDir.replace(/'/g,"'\\''")}':"$PATH"; ${a}`),{command:s,args:["-l","-c",a],needsShell:!1}}return t.length>0||r?{command:wC(e),args:t.map(wC),needsShell:!0}:{command:e,args:t,needsShell:!0}}var _n=H(Se()),$n=require("obsidian");var Ro=require("obsidian"),yr=H(Se()),IC=H(za()),ee=H(fe()),{useState:Pc,useCallback:Yn}=yr,dh=class extends Ro.Modal{constructor(n,i,r){super(n);this.sessionTitle=i,this.onConfirm=r}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"Delete session?"}),n.createEl("p",{text:`Are you sure you want to delete "${this.sessionTitle}"?`,cls:"agent-client-confirm-delete-message"}),n.createEl("p",{text:"This only removes the session from this plugin. The session data will remain on the agent side.",cls:"agent-client-confirm-delete-warning"});let i=n.createDiv({cls:"agent-client-confirm-delete-buttons"});i.createEl("button",{text:"Cancel",cls:"agent-client-confirm-delete-cancel"}).addEventListener("click",()=>{this.close()}),i.createEl("button",{text:"Delete",cls:"agent-client-confirm-delete-confirm mod-warning"}).addEventListener("click",()=>{this.close(),this.onConfirm()})}onClose(){let{contentEl:n}=this;n.empty()}},ph=class extends Ro.Modal{constructor(n,i,r){super(n);this.currentTitle=i,this.onSave=r}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"Edit session title"});let i=n.createEl("input",{type:"text",cls:"agent-client-edit-title-input",attr:{maxlength:"100"}});i.value=this.currentTitle,window.setTimeout(()=>{i.focus(),i.select()},10),i.addEventListener("keydown",o=>{o.key==="Enter"&&(o.preventDefault(),this.saveAndClose(i.value))});let r=n.createDiv({cls:"agent-client-edit-title-buttons"});r.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),r.createEl("button",{text:"Save",cls:"mod-cta"}).addEventListener("click",()=>{this.saveAndClose(i.value)})}saveAndClose(n){let i=n.trim();i&&(this.close(),this.onSave(i))}onClose(){let{contentEl:n}=this;n.empty()}};function Ec({iconName:e,label:t,className:n,onClick:i}){let r=yr.useRef(null);return yr.useEffect(()=>{r.current&&(0,Ro.setIcon)(r.current,e)},[e]),(0,ee.jsx)("div",{ref:r,className:n,"aria-label":t,onClick:i})}function IM(e){let t=Date.now(),n=e.getTime(),i=t-n,r=Math.floor(i/1e3),o=Math.floor(r/60),s=Math.floor(o/60),a=Math.floor(s/24);if(o<1)return"just now";if(o<60)return`${o} minute${o===1?"":"s"} ago`;if(s<24)return`${s} hour${s===1?"":"s"} ago`;if(a===1)return"yesterday";if(a<7)return`${a} days ago`;{let u=e.toLocaleString("default",{month:"short"}),d=e.getDate(),p=e.getFullYear();return`${u} ${d}, ${p}`}}function CM(e){return e.length<=50?e:e.slice(0,50)+"..."}function EM({currentCwd:e,onRestoreSession:t,onForkSession:n,onClose:i}){let[r,o]=Pc(""),[s,a]=Pc(e),u=Yn(()=>{r.trim()&&(i(),t(r.trim(),s.trim()||e))},[r,s,e,t,i]),d=Yn(()=>{r.trim()&&(i(),n(r.trim(),s.trim()||e))},[r,s,e,n,i]);return(0,ee.jsxs)("div",{className:"agent-client-session-history-debug",children:[(0,ee.jsx)("h3",{children:"Debug: Manual Session Input"}),(0,ee.jsxs)("div",{className:"agent-client-session-history-debug-group",children:[(0,ee.jsx)("label",{htmlFor:"debug-session-id",children:"Session ID:"}),(0,ee.jsx)("input",{id:"debug-session-id",type:"text",placeholder:"Enter session ID...",className:"agent-client-session-history-debug-input",value:r,onChange:p=>o(p.target.value)})]}),(0,ee.jsxs)("div",{className:"agent-client-session-history-debug-group",children:[(0,ee.jsx)("label",{htmlFor:"debug-cwd",children:"Working Directory (cwd):"}),(0,ee.jsx)("input",{id:"debug-cwd",type:"text",placeholder:"Enter working directory...",className:"agent-client-session-history-debug-input",value:s,onChange:p=>a(p.target.value)})]}),(0,ee.jsxs)("div",{className:"agent-client-session-history-debug-actions",children:[(0,ee.jsx)("button",{className:"agent-client-session-history-debug-button",onClick:u,children:"Restore"}),(0,ee.jsx)("button",{className:"agent-client-session-history-debug-button",onClick:d,children:"Fork"})]}),(0,ee.jsx)("hr",{className:"agent-client-session-history-debug-separator"})]})}function PM({session:e,canRestore:t,canFork:n,currentCwd:i,onRestoreSession:r,onForkSession:o,onDeleteSession:s,onEditTitle:a,onClose:u}){var m;let d=Yn(()=>{u(),r(e.sessionId,e.cwd)},[e,r,u]),p=Yn(()=>{u(),o(e.sessionId,e.cwd)},[e,o,u]),l=Yn(()=>{s(e.sessionId)},[e.sessionId,s]),f=Yn(()=>{a(e.sessionId)},[e.sessionId,a]);return(0,ee.jsxs)("div",{className:"agent-client-session-history-item",children:[(0,ee.jsxs)("div",{className:"agent-client-session-history-item-content",children:[(0,ee.jsx)("div",{className:"agent-client-session-history-item-title",children:(0,ee.jsx)("span",{children:CM((m=e.title)!=null?m:"Untitled Session")})}),(0,ee.jsxs)("div",{className:"agent-client-session-history-item-metadata",children:[e.updatedAt&&(0,ee.jsx)("span",{className:"agent-client-session-history-item-timestamp",children:IM(new Date(e.updatedAt))}),e.cwd!==i&&(0,ee.jsx)("span",{className:"agent-client-session-history-item-cwd",title:e.cwd,children:e.cwd})]})]}),(0,ee.jsxs)("div",{className:"agent-client-session-history-item-actions",children:[(0,ee.jsx)(Ec,{iconName:"pencil",label:"Edit session title",className:"agent-client-session-history-action-icon agent-client-session-history-edit-icon",onClick:f}),t&&(0,ee.jsx)(Ec,{iconName:"play",label:"Restore session",className:"agent-client-session-history-action-icon agent-client-session-history-restore-icon",onClick:d}),n&&(0,ee.jsx)(Ec,{iconName:"git-branch",label:"Fork session (create new branch)",className:"agent-client-session-history-action-icon agent-client-session-history-fork-icon",onClick:p}),(0,ee.jsx)(Ec,{iconName:"trash-2",label:"Delete session",className:"agent-client-session-history-action-icon agent-client-session-history-delete-icon",onClick:l})]})]})}function TM({app:e,sessions:t,loading:n,error:i,hasMore:r,currentCwd:o,canList:s,canRestore:a,canFork:u,isUsingLocalSessions:d,localSessionIds:p,isAgentReady:l,debugMode:f,onRestoreSession:m,onForkSession:g,onDeleteSession:h,onEditTitle:x,onLoadMore:y,onFetchSessions:v,onClose:S}){let[w,$]=Pc(!0),[_,I]=Pc(!1),b=Yn(C=>{let L=C.target.checked;$(L),v(L?o:void 0)},[o,v]),T=Yn(()=>{v(w?o:void 0)},[w,o,v]),A=Yn(C=>{var F;let L=t.find(G=>G.sessionId===C),E=(F=L==null?void 0:L.title)!=null?F:"Untitled Session";new dh(e,E,()=>{h(C)}).open()},[e,t,h]),U=Yn(C=>{var G,re;let L=t.find(Ce=>Ce.sessionId===C),E=(G=L==null?void 0:L.title)!=null?G:"Untitled Session",z=(re=L==null?void 0:L.cwd)!=null?re:o;new ph(e,E,Ce=>{x(C,Ce,z)}).open()},[e,t,o,x]),Z=yr.useMemo(()=>d||!_?t:t.filter(C=>p.has(C.sessionId)),[t,d,_,p]);if(!l)return(0,ee.jsx)("div",{className:"agent-client-session-history-loading",children:(0,ee.jsx)("p",{children:"Preparing agent..."})});let R=a||u,V=s||d||!R;return(0,ee.jsxs)(ee.Fragment,{children:[f&&(0,ee.jsx)(EM,{currentCwd:o,onRestoreSession:m,onForkSession:g,onClose:S}),!R&&(0,ee.jsx)("div",{className:"agent-client-session-history-warning-banner",children:(0,ee.jsx)("p",{children:"This agent does not support session restoration."})}),(d||!R)&&(0,ee.jsx)("div",{className:"agent-client-session-history-local-banner",children:(0,ee.jsx)("span",{children:"These sessions are saved in the plugin."})}),!V&&!f&&(0,ee.jsxs)("div",{className:"agent-client-session-history-empty",children:[(0,ee.jsx)("p",{className:"agent-client-session-history-empty-text",children:"Session list is not available for this agent."}),(0,ee.jsx)("p",{className:"agent-client-session-history-empty-text",children:"Enable Debug Mode in settings to manually enter session IDs."})]}),V&&(0,ee.jsxs)(ee.Fragment,{children:[s&&!d&&(0,ee.jsxs)("div",{className:"agent-client-session-history-filter",children:[(0,ee.jsxs)("label",{className:"agent-client-session-history-filter-label",children:[(0,ee.jsx)("input",{type:"checkbox",checked:w,onChange:b}),(0,ee.jsx)("span",{children:"Show current vault only"})]}),(0,ee.jsxs)("label",{className:"agent-client-session-history-filter-label",children:[(0,ee.jsx)("input",{type:"checkbox",checked:_,onChange:C=>I(C.target.checked)}),(0,ee.jsx)("span",{children:"Hide sessions without local data"})]})]}),i&&(0,ee.jsxs)("div",{className:"agent-client-session-history-error",children:[(0,ee.jsx)("p",{className:"agent-client-session-history-error-text",children:i}),(0,ee.jsx)("button",{className:"agent-client-session-history-retry-button",onClick:T,children:"Retry"})]}),!i&&n&&Z.length===0&&(0,ee.jsx)("div",{className:"agent-client-session-history-loading",children:(0,ee.jsx)("p",{children:"Loading sessions..."})}),!i&&!n&&Z.length===0&&(0,ee.jsx)("div",{className:"agent-client-session-history-empty",children:(0,ee.jsx)("p",{className:"agent-client-session-history-empty-text",children:"No previous sessions"})}),!i&&Z.length>0&&(0,ee.jsx)("div",{className:"agent-client-session-history-list",children:Z.map(C=>(0,ee.jsx)(PM,{session:C,canRestore:a,canFork:u,currentCwd:o,onRestoreSession:m,onForkSession:g,onDeleteSession:A,onEditTitle:U,onClose:S},C.sessionId))}),!i&&r&&(0,ee.jsx)("div",{className:"agent-client-session-history-load-more",children:(0,ee.jsx)("button",{className:"agent-client-session-history-load-more-button",disabled:n,onClick:y,children:n?"Loading...":"Load more"})})]})]})}var Tc=class extends Ro.Modal{constructor(n,i){super(n);this.root=null;this.props=i}updateProps(n){this.props=n,this.renderContent()}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"Session history"});let i=n.createDiv();this.root=(0,IC.createRoot)(i),this.renderContent()}renderContent(){this.root&&this.root.render(yr.createElement(TM,{...this.props,app:this.app,onClose:()=>this.close()}))}onClose(){this.root&&(this.root.unmount(),this.root=null);let{contentEl:n}=this;n.empty()}};function CC(e,t,n,i,r,o,s){let a=_e(),u=(0,_n.useRef)(null),d=(0,_n.useCallback)(async(x,y)=>{try{a.log(`[ChatPanel] Restoring session: ${x}`),t.clearMessages(),await n.restoreSession(x,y),s==null||s($n.Platform.isWin?Do(y):y),new $n.Notice("[Agent Client] Session restored")}catch(v){new $n.Notice("[Agent Client] Failed to restore session"),a.error("Session restore error:",v)}},[a,t.clearMessages,n.restoreSession,s]),p=(0,_n.useCallback)(async(x,y)=>{try{a.log(`[ChatPanel] Forking session: ${x}`),t.clearMessages(),await n.forkSession(x,y),s==null||s($n.Platform.isWin?Do(y):y),new $n.Notice("[Agent Client] Session forked")}catch(v){new $n.Notice("[Agent Client] Failed to fork session"),a.error("Session fork error:",v)}},[a,t.clearMessages,n.forkSession,s]),l=(0,_n.useCallback)(async x=>{try{a.log(`[ChatPanel] Deleting session: ${x}`),await n.deleteSession(x),new $n.Notice("[Agent Client] Session deleted")}catch(y){new $n.Notice("[Agent Client] Failed to delete session"),a.error("Session delete error:",y)}},[n.deleteSession,a]),f=(0,_n.useCallback)(async(x,y,v)=>{try{await n.updateSessionTitle(x,y,v),new $n.Notice("[Agent Client] Title updated")}catch(S){new $n.Notice("[Agent Client] Failed to update title"),a.error("Title update error:",S)}},[n.updateSessionTitle,a]),m=(0,_n.useCallback)(()=>{n.loadMoreSessions()},[n.loadMoreSessions]),g=(0,_n.useCallback)(x=>{n.fetchSessions(x)},[n.fetchSessions]),h=(0,_n.useCallback)(()=>{u.current||(u.current=new Tc(e.app,{sessions:n.sessions,loading:n.loading,error:n.error,hasMore:n.hasMore,currentCwd:i,canList:n.canList,canRestore:n.canRestore,canFork:n.canFork,isUsingLocalSessions:n.isUsingLocalSessions,localSessionIds:n.localSessionIds,isAgentReady:r,debugMode:o,onRestoreSession:d,onForkSession:p,onDeleteSession:l,onEditTitle:f,onLoadMore:m,onFetchSessions:g})),u.current.open(),n.fetchSessions(i)},[e.app,n.sessions,n.loading,n.error,n.hasMore,n.canList,n.canRestore,n.canFork,n.isUsingLocalSessions,n.localSessionIds,n.fetchSessions,i,r,o,d,p,l,f,m,g]);return(0,_n.useEffect)(()=>{u.current&&u.current.updateProps({sessions:n.sessions,loading:n.loading,error:n.error,hasMore:n.hasMore,currentCwd:i,canList:n.canList,canRestore:n.canRestore,canFork:n.canFork,isUsingLocalSessions:n.isUsingLocalSessions,localSessionIds:n.localSessionIds,isAgentReady:r,debugMode:o,onRestoreSession:d,onForkSession:p,onDeleteSession:l,onEditTitle:f,onLoadMore:m,onFetchSessions:g})},[n.sessions,n.loading,n.error,n.hasMore,n.canList,n.canRestore,n.canFork,n.isUsingLocalSessions,i,r,o,d,p,l,f,m,g]),{handleOpenHistory:h}}var mt=H(Se()),Mn=require("obsidian");var Aa=require("obsidian"),Na=class{constructor(t){this.plugin=t;this.logger=_e()}async exportToMarkdown(t,n,i,r,o,s=!0){let a=this.plugin.settings.exportSettings,u=t.length>0?t[0].timestamp:o,d=this.generateFileName(u),p=a.defaultFolder||"Agent Client";await this.ensureFolderExists(p);let l=this.resolveExportFilePath(p,d,r);try{let f=this.generateFrontmatter(n,i,r,u),m=await this.convertMessagesToMarkdown(t,n,l),g=`${f}
15
+
16
+ ${m}`,h=this.plugin.app.vault.getAbstractFileByPath(l),x;return h instanceof Aa.TFile?(await this.plugin.app.vault.modify(h,g),x=h):x=await this.plugin.app.vault.create(l,g),s&&await this.plugin.app.workspace.getLeaf(!1).openFile(x),this.logger.log(`Chat exported to: ${l}`),l}catch(f){throw this.logger.error("Export error:",f),f}}async ensureFolderExists(t){this.plugin.app.vault.getAbstractFileByPath(t)||await this.plugin.app.vault.createFolder(t)}getSessionIdFromFile(t){var r;let n=this.plugin.app.metadataCache.getFileCache(t),i=(r=n==null?void 0:n.frontmatter)==null?void 0:r.session_id;return i!=null?i:null}resolveExportFilePath(t,n,i){let r=`${t}/${n}.md`,o=this.plugin.app.vault.getAbstractFileByPath(r);if(!(o instanceof Aa.TFile)||this.getSessionIdFromFile(o)===i)return r;for(let a=2;a<=100;a++){let u=`${t}/${n}_${a}.md`,d=this.plugin.app.vault.getAbstractFileByPath(u);if(!(d instanceof Aa.TFile)||this.getSessionIdFromFile(d)===i)return u}return this.logger.warn(`Too many export files with same base name: ${n}`),`${t}/${n}_101.md`}generateFileName(t){let i=this.plugin.settings.exportSettings.filenameTemplate||"agent_client_{date}_{time}",r=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0"),a=`${r}${o}${s}`,u=String(t.getHours()).padStart(2,"0"),d=String(t.getMinutes()).padStart(2,"0"),p=String(t.getSeconds()).padStart(2,"0"),l=`${u}${d}${p}`;return i.replace("{date}",a).replace("{time}",l)}generateFrontmatter(t,n,i,r){let o=this.plugin.settings.exportSettings,s=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,"0"),u=String(r.getDate()).padStart(2,"0"),d=String(r.getHours()).padStart(2,"0"),p=String(r.getMinutes()).padStart(2,"0"),l=String(r.getSeconds()).padStart(2,"0"),f=`${s}-${a}-${u}T${d}:${p}:${l}`,m=o.frontmatterTag.trim()?`
17
+ tags: [${o.frontmatterTag.trim()}]`:"";return`---
18
+ created: ${f}
19
+ agentDisplayName: ${t}
20
+ agentId: ${n}
21
+ session_id: ${i}${m}
22
+ ---`}async convertMessagesToMarkdown(t,n,i){let r=this.plugin.settings.exportSettings,o={exportFilePath:i,imageIndex:0,includeImages:r.includeImages,imageLocation:r.imageLocation,imageCustomFolder:r.imageCustomFolder},s=`# ${n}
23
+
24
+ `;for(let a of t){let u=a.timestamp.toLocaleTimeString(),d=a.role==="user"?"User":"Assistant";s+=`## ${u} - ${d}
25
+
26
+ `;for(let p of a.content)s+=await this.convertContentToMarkdown(p,o);s+=`
27
+ ---
28
+
29
+ `}return s}async convertContentToMarkdown(t,n){switch(t.type){case"text":return t.text+`
30
+
31
+ `;case"text_with_context":{let i="";if(t.autoMentionContext){let{noteName:r,selection:o}=t.autoMentionContext;o?i+=`@[[${r}]]:${o.fromLine}-${o.toLine}
32
+ `:i+=`@[[${r}]]
33
+ `}return i+=t.text+`
34
+
35
+ `,i}case"agent_thought":return`> [!info]- Thinking
36
+ > ${t.text.split(`
37
+ `).join(`
38
+ > `)}
39
+
40
+ `;case"tool_call":return this.convertToolCallToMarkdown(t);case"terminal":return`### \u{1F5A5}\uFE0F Terminal: ${t.terminalId.slice(0,8)}
41
+
42
+ `;case"plan":return this.convertPlanToMarkdown(t);case"permission_request":return this.convertPermissionRequestToMarkdown(t);case"resource_link":return`[${t.name}](${t.uri})
43
+
44
+ `;case"image":if(!n.includeImages)return"";if(t.uri)return`![Image](${t.uri})
45
+
46
+ `;if(n.imageLocation==="base64")return`![Image](data:${t.mimeType};base64,${t.data})
47
+
48
+ `;try{return n.imageIndex++,`![[${(await this.saveImageAsAttachment(t.data,t.mimeType,n.exportFilePath,n.imageIndex,n.imageLocation,n.imageCustomFolder)).split("/").pop()}]]
49
+
50
+ `}catch(i){return this.logger.error(`Failed to save image as attachment: ${i}`),`![Image](data:${t.mimeType};base64,${t.data})
51
+
52
+ `}default:return""}}convertToolCallToMarkdown(t){let n=`### \u{1F527} ${t.title||"Tool"}
53
+
54
+ `;if(t.locations&&t.locations.length>0){let i=t.locations.map(r=>r.line!=null?`\`${r.path}:${r.line}\``:`\`${r.path}\``);n+=`**Locations**: ${i.join(", ")}
55
+
56
+ `}if(n+=`**Status**: ${t.status}
57
+
58
+ `,t.content&&t.content.length>0)for(let i of t.content)i.type==="diff"&&(n+=this.convertDiffToMarkdown(i));return n}convertDiffToMarkdown(t){let n=`**File**: \`${t.path}\`
59
+
60
+ `;if(t.oldText===null||t.oldText===void 0||t.oldText==="")return n+="```diff\n",t.newText.split(`
61
+ `).forEach(o=>{n+=`+ ${o}
62
+ `}),n+="```\n\n",n;let i=t.oldText.split(`
63
+ `),r=t.newText.split(`
64
+ `);return n+="```diff\n",i.forEach(o=>{n+=`- ${o}
65
+ `}),r.forEach(o=>{n+=`+ ${o}
66
+ `}),n+="```\n\n",n}convertPlanToMarkdown(t){let n=`> [!plan] Plan
67
+ `;for(let i of t.entries){let r=i.status==="completed"?"\u2705":i.status==="in_progress"?"\u{1F504}":"\u23F3";n+=`> ${r} ${i.content}
68
+ `}return n+=`
69
+ `,n}convertPermissionRequestToMarkdown(t){let n=t.isCancelled?"Cancelled":"Requested";return`### \u26A0\uFE0F Permission: ${t.toolCall.title||"Unknown"} (${n})
70
+
71
+ `}async saveImageAsAttachment(t,n,i,r,o,s){let a=this.getExtensionFromMimeType(n),p=`${i.replace(/\.md$/,"").split("/").pop()||"image"}_${String(r).padStart(3,"0")}.${a}`,l;if(o==="custom"){let m=s||"Agent Client";if(await this.ensureFolderExists(m),l=`${m}/${p}`,this.plugin.app.vault.getAbstractFileByPath(l)instanceof Aa.TFile)return this.logger.log(`Image already exists, skipping: ${l}`),l}else if(l=await this.plugin.app.fileManager.getAvailablePathForAttachment(p,i),!l.endsWith(p)){let m=l.replace(/ \d+(\.[^.]+)$/,"$1");return this.logger.log(`Image already exists, skipping: ${m}`),m}let f=this.base64ToArrayBuffer(t);return await this.plugin.app.vault.createBinary(l,f),this.logger.log(`Image saved as attachment: ${l}`),l}getExtensionFromMimeType(t){return{"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp"}[t]||"png"}base64ToArrayBuffer(t){let n=atob(t),i=new Uint8Array(n.length);for(let r=0;r<n.length;r++)i[r]=n.charCodeAt(r);return i.buffer}};var zc=require("child_process"),fh=require("obsidian"),Ac=require("fs/promises"),EC=require("fs"),PC=require("path");function Oa(e){return e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e)}async function zM(e){if(e.includes("/")||e.includes("\\"))return null;let t=fh.Platform.isMacOS?["/opt/homebrew/bin","/usr/local/bin","/usr/bin","/bin"]:["/usr/local/bin","/usr/bin","/bin"];for(let n of t){let i=(0,PC.join)(n,e);try{if(!(await(0,Ac.stat)(i)).isFile())continue;return await(0,Ac.access)(i,EC.constants.X_OK),i}catch(r){}}return null}function TC(e){if(!e||e.trim().length===0)return Promise.resolve(null);let t=e.trim();return Oa(t)?Promise.resolve(t):new Promise(n=>{if(fh.Platform.isWin)(0,zc.execFile)("where",[t],{timeout:5e3,windowsHide:!0},(i,r)=>{if(i){n(null);return}let o=r.split(`
72
+ `)[0].trim();n(o.length>0?o:null)});else{let i=uh(),r=t.replace(/'/g,"'\\''");(0,zc.execFile)(i,["-l","-c",`which '${r}'`],{timeout:5e3},(o,s)=>{let a=()=>{zM(t).then(n,()=>n(null))};if(o){a();return}let u=s.split(`
73
+ `)[0].trim();u.length>0?n(u):a()})}})}function zC(e,t){if(!e||e.trim().length===0)return Promise.resolve(null);let n=e.trim();return Oa(n)?Promise.resolve(n):new Promise(i=>{let r=n.replace(/'/g,"'\\''"),o=[];t&&o.push("-d",t);let s=`which '${r}'`;o.push("sh","-c",ch(s)),(0,zc.execFile)("C:\\Windows\\System32\\wsl.exe",o,{timeout:5e3},(a,u)=>{if(a){i(null);return}let d=u.split(`
74
+ `)[0].trim();i(d.length>0?d:null)})})}function AM(e){if(!e)return null;let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return t<=0?null:e.slice(0,t)}function Nc(e){if(!e)return;let t=e.trim();if(Oa(t))return AM(t)||void 0}function AC(e,t){let n=t.replace(/\/+$/,""),i=e.replace(/\/+$/,"");return i.startsWith(n+"/")?i.slice(n.length+1):e}function Da(e){let t=e.replace(/\\/g,"/");return/^[A-Za-z]:/.test(t)?`file:///${t}`:`file://${t}`}function NC(e,t,n,i,r,o,s,a){let u=_e(),[d,p]=(0,mt.useState)(null),[l,f]=(0,mt.useState)(null),m=(0,mt.useCallback)(async(U,Z,R)=>{if((U==="newChat"?e.settings.exportSettings.autoExportOnNewChat:e.settings.exportSettings.autoExportOnCloseChat)&&Z.length!==0&&R.sessionId)try{let C=new Na(e),L=e.settings.exportSettings.openFileAfterExport,E=await C.exportToMarkdown(Z,R.agentDisplayName,R.agentId,R.sessionId,R.createdAt,L);if(E){let z=U==="newChat"?"new session":"closing chat";new Mn.Notice(`[Agent Client] Chat exported to ${E}`),u.log(`Chat auto-exported before ${z}`)}}catch(C){new Mn.Notice("[Agent Client] Failed to export chat")}},[e,u]),g=Mn.Platform.isWin&&s.windowsWslMode,h=(0,mt.useCallback)(async(U,Z)=>{var L,E;t.clearError(),f(null);let R=o.length===0,V=[],C=[];if(Z){for(let z of Z)if(z.kind==="image"&&z.data)V.push({type:"image",data:z.data,mimeType:z.mimeType});else if(z.kind==="file"&&z.path){let F=z.path;g&&(F=xn(F)),C.push({type:"resource_link",uri:Da(F),name:(E=(L=z.name)!=null?L:z.path.split("/").pop())!=null?E:"file",mimeType:z.mimeType||void 0,size:z.size})}}await t.sendMessage(U,{activeNote:s.autoMentionActiveNote?i.mentions.activeNote:null,vaultBasePath:a,isAutoMentionDisabled:i.mentions.isAutoMentionDisabled,images:V.length>0?V:void 0,resourceLinks:C.length>0?C:void 0}),R&&r.sessionId&&(await n.saveSessionLocally(r.sessionId,U),u.log(`[ChatPanel] Session saved locally: ${r.sessionId}`))},[t.clearError,t.sendMessage,o.length,r.sessionId,n.saveSessionLocally,u,s.autoMentionActiveNote,i.mentions.activeNote,i.mentions.isAutoMentionDisabled,g,a]),x=(0,mt.useCallback)(async()=>{u.log("Cancelling current operation...");let U=t.lastUserMessage;await t.cancelOperation(),U&&p(U)},[u,t.cancelOperation,t.lastUserMessage]),y=(0,mt.useCallback)(async U=>{let Z=U&&U!==r.agentId;if(o.length===0&&!Z){new Mn.Notice("[Agent Client] Already a new session");return}t.isSending&&await t.cancelOperation(),u.log(`[Debug] Creating new session${Z?` with agent: ${U}`:""}...`),o.length>0&&await m("newChat",o,r),i.mentions.toggleAutoMention(!1),t.clearMessages();let R=Z?U:r.agentId;await t.restartSession(R),n.invalidateCache()},[o,r,u,m,t.isSending,t.cancelOperation,t.clearMessages,t.restartSession,i.mentions.toggleAutoMention,n.invalidateCache]),v=(0,mt.useCallback)(async()=>{if(o.length===0){new Mn.Notice("[Agent Client] No messages to export");return}try{let U=new Na(e),Z=e.settings.exportSettings.openFileAfterExport,R=await U.exportToMarkdown(o,r.agentDisplayName,r.agentId,r.sessionId||"unknown",r.createdAt,Z);new Mn.Notice(`[Agent Client] Chat exported to ${R}`)}catch(U){new Mn.Notice("[Agent Client] Failed to export chat"),u.error("Export error:",U)}},[o,r,e,u]),S=(0,mt.useCallback)(async U=>{U!==r.agentId&&await y(U)},[r.agentId,y]),w=(0,mt.useCallback)(async()=>{u.log("[ChatPanel] Restarting agent process..."),o.length>0&&await m("newChat",o,r),t.clearMessages();try{await t.forceRestartAgent(),new Mn.Notice("[Agent Client] Agent restarted")}catch(U){new Mn.Notice("[Agent Client] Failed to restart agent"),u.error("Restart error:",U)}},[u,o,r,m,t.clearMessages,t.forceRestartAgent]),$=(0,mt.useCallback)(async U=>{await t.setMode(U)},[t.setMode]),_=(0,mt.useCallback)(async U=>{await t.setModel(U)},[t.setModel]),I=(0,mt.useCallback)(async(U,Z)=>{await t.setConfigOption(U,Z)},[t.setConfigOption]),b=(0,mt.useCallback)(()=>{t.clearError()},[t.clearError]),T=(0,mt.useCallback)(()=>{f(null)},[]),A=(0,mt.useCallback)(()=>{p(null)},[]);return{handleSendMessage:h,handleStopGeneration:x,handleNewChat:y,handleExportChat:v,handleSwitchAgent:S,handleRestartAgent:w,handleSetMode:$,handleSetModel:_,handleSetConfigOption:I,handleClearError:b,handleClearAgentUpdate:T,handleRestoredMessageConsumed:A,restoredMessage:d,agentUpdateNotification:l,setAgentUpdateNotification:f,autoExportIfEnabled:m}}var OC=require("obsidian"),Ra=class extends OC.Modal{constructor(n,i,r){super(n);this.currentPath=i,this.onSelect=r}onOpen(){let{contentEl:n}=this;n.empty(),n.createEl("h2",{text:"New chat in directory"}),n.createEl("p",{text:"Start a new chat session with the agent working in the specified directory.",cls:"agent-client-change-dir-description"});let i=n.createDiv({cls:"agent-client-change-dir-input-row"}),r=i.createEl("input",{type:"text",cls:"agent-client-change-dir-input",placeholder:"/path/to/directory"});r.value=this.currentPath,i.createEl("button",{text:"Browse..."}).addEventListener("click",()=>{this.openFolderPicker().then(a=>{a&&(r.value=a)})}),window.setTimeout(()=>{r.focus(),r.select()},10),r.addEventListener("keydown",a=>{a.key==="Enter"&&(a.preventDefault(),this.selectAndClose(r.value))});let s=n.createDiv({cls:"agent-client-change-dir-buttons"});s.createEl("button",{text:"Cancel"}).addEventListener("click",()=>{this.close()}),s.createEl("button",{text:"Start",cls:"mod-cta"}).addEventListener("click",()=>{this.selectAndClose(r.value)})}async openFolderPicker(){try{let{remote:n}=require("electron"),i=await n.dialog.showOpenDialog({properties:["openDirectory"],title:"Select working directory",defaultPath:this.currentPath});if(!i.canceled&&i.filePaths.length>0)return i.filePaths[0]}catch(n){}return null}selectAndClose(n){let i=n.trim();i&&(this.close(),this.onSelect(i))}onClose(){let{contentEl:n}=this;n.empty()}};var DC=H(Se());function Xr(e){return(0,DC.useSyncExternalStore)(e.settingsService.subscribe,e.settingsService.getSnapshot,e.settingsService.getSnapshot)}var Ue=H(Se());function RC(e,t){let n=_e();if(t<0||t>e.length)return n.log("[detectMention] Invalid cursor position:",t),null;let i=e.slice(0,t),r=i.lastIndexOf("@");if(r===-1)return null;let o=i.slice(r+1),s="",a=t;if(o.startsWith("[[")){let d=o.indexOf("]]");if(d===-1)s=o.slice(2),a=t;else{let p=r+1+d+1;if(t>p)return null;s=o.slice(2,d),a=p+1}}else{if(o.includes(" ")||o.includes(" ")||o.includes(`
75
+ `))return null;s=o,a=t}let u={start:r,end:a,query:s};return n.log("[detectMention] Mention context:",u),u}function MC(e,t,n){let i=e.slice(0,t.start),r=e.slice(t.end),o=` @[[${n}]] `,s=i+o+r,a=t.start+o.length;return{newText:s,newCursorPos:a}}function LC(e,t){let n=/@\[\[([^\]]+)\]\]/g,i=Array.from(e.matchAll(n)),r=[],o=new Set;for(let s of i){let a=s[1];if(o.has(a))continue;o.add(a);let u=t.getAllFiles().find(d=>d.basename===a);r.push({noteTitle:a,file:u})}return r}function jC(e,t,n){let[i,r]=(0,Ue.useState)([]),[o,s]=(0,Ue.useState)(0),[a,u]=(0,Ue.useState)(null),[d,p]=(0,Ue.useState)(null),[l,f]=(0,Ue.useState)(!1),m=i.length>0&&a!==null,[g,h]=(0,Ue.useState)([]),[x,y]=(0,Ue.useState)(0),v=g.length>0,S=(0,Ue.useCallback)(C=>{f(C===void 0?L=>!L:C)},[]),w=(0,Ue.useCallback)(async(C,L)=>{let E=RC(C,L);if(!E){r([]),s(0),u(null);return}let z=await e.searchNotes(E.query);r(z),s(0),u(E)},[e,t]),$=(0,Ue.useCallback)((C,L)=>{if(!a)return C;let{newText:E}=MC(C,a,L.name);return r([]),s(0),u(null),E},[a]),_=(0,Ue.useCallback)(C=>{if(!m)return;let L=i.length-1;s(E=>C==="down"?Math.min(E+1,L):Math.max(E-1,0))},[m,i.length]),I=(0,Ue.useCallback)(()=>{r([]),s(0),u(null)},[]),b=(0,Ue.useCallback)(async()=>{let C=await e.getActiveNote();p(C)},[e]),T=(0,Ue.useCallback)((C,L)=>{let E=g.length>0;if(!C.startsWith("/")){E&&S(!1),h([]),y(0);return}let F=C.slice(0,L).slice(1);if(F.includes(" ")){h([]),y(0),S(!0);return}let G=F.toLowerCase(),re=n.filter(Ce=>Ce.name.toLowerCase().includes(G));h(re),y(0),S(!0)},[n,S,g.length]),A=(0,Ue.useCallback)((C,L)=>{let E=`/${L.name} `;return h([]),y(0),E},[]),U=(0,Ue.useCallback)(C=>{if(g.length===0)return;let L=g.length-1;y(E=>C==="down"?Math.min(E+1,L):Math.max(E-1,0))},[g.length]),Z=(0,Ue.useCallback)(()=>{h([]),y(0)},[]),R=(0,Ue.useMemo)(()=>({suggestions:i,selectedIndex:o,isOpen:m,context:a,updateSuggestions:w,selectSuggestion:$,navigate:_,close:I,activeNote:d,isAutoMentionDisabled:l,toggleAutoMention:S,updateActiveNote:b}),[i,o,m,a,w,$,_,I,d,l,S,b]),V=(0,Ue.useMemo)(()=>({suggestions:g,selectedIndex:x,isOpen:v,updateSuggestions:T,selectSuggestion:A,navigate:U,close:Z}),[g,x,v,T,A,U,Z]);return(0,Ue.useMemo)(()=>({mentions:R,commands:V}),[R,V])}var KM=H(Se());var MM=H(Se());var mh=require("obsidian");var Xe={PARSE_ERROR:-32700,INVALID_REQUEST:-32600,METHOD_NOT_FOUND:-32601,INVALID_PARAMS:-32602,INTERNAL_ERROR:-32603,AUTHENTICATION_REQUIRED:-32e3,RESOURCE_NOT_FOUND:-32002};function Ma(e){if(e&&typeof e=="object"&&"code"in e){let t=e.code;if(typeof t=="number")return t}}function zt(e){if(!e||typeof e!="object")return"An unexpected error occurred.";if("data"in e){let t=e.data;if(t&&typeof t=="object"&&"details"in t){let n=t.details;if(typeof n=="string")return n}}if("message"in e){let t=e.message;if(typeof t=="string")return t}return"An unexpected error occurred."}function NM(e){if(e&&typeof e=="object"&&"data"in e)return e.data}function OM(e){switch(e){case Xe.PARSE_ERROR:return"Protocol Error";case Xe.INVALID_REQUEST:return"Invalid Request";case Xe.METHOD_NOT_FOUND:return"Method Not Supported";case Xe.INVALID_PARAMS:return"Invalid Parameters";case Xe.INTERNAL_ERROR:return"Internal Error";case Xe.AUTHENTICATION_REQUIRED:return"Authentication Required";case Xe.RESOURCE_NOT_FOUND:return"Resource Not Found";default:return"Agent Error"}}function DM(e,t){if(e===Xe.INTERNAL_ERROR){let n=t.toLowerCase();if(n.includes("context")||n.includes("token")||n.includes("max_tokens")||n.includes("too long"))return"The conversation is too long. Try using a compact command if available, or start a new chat.";if(n.includes("overloaded")||n.includes("capacity"))return"The service is busy. Please wait a moment and try again."}switch(e){case Xe.PARSE_ERROR:case Xe.INVALID_REQUEST:case Xe.METHOD_NOT_FOUND:return"Try restarting the agent session.";case Xe.INVALID_PARAMS:return"Check your agent configuration in settings.";case Xe.INTERNAL_ERROR:return"Try again or restart the agent session.";case Xe.AUTHENTICATION_REQUIRED:return"Check if you are logged in or if your API key is set correctly.";case Xe.RESOURCE_NOT_FOUND:return"Check if the file or resource exists.";default:return"Try again or restart the agent session."}}function Oc(e,t){var o;let n=(o=Ma(e))!=null?o:-1,i=zt(e),r=NM(e);return{code:n,message:i,data:r,sessionId:t,originalError:e,title:OM(n),suggestion:DM(n,i)}}function Dc(e){return Ma(e)!==Xe.INTERNAL_ERROR?!1:zt(e).includes("empty response text")}function UC(e){return e?e.includes("API key is missing")||e.includes("LoadAPIKeyError")?"The agent's API key may be missing. For custom agents, add the required API key (e.g., ANTHROPIC_API_KEY) in the agent's Environment Variables setting.":e.includes("authentication")||e.includes("unauthorized")||e.includes("401")?"The agent reported an authentication error. Check that your API key or credentials are valid.":null:null}function FC(e){return Ma(e)!==Xe.INTERNAL_ERROR?!1:zt(e).includes("user aborted")}function ZC(e,t,n,i){return e.code==="ENOENT"?{title:"Command Not Found",message:`The command "${t}" could not be found. Please check the path configuration for ${n}.`,suggestion:gh(t,i)}:{title:"Agent Startup Error",message:`Failed to start ${n}: ${e.message}`,suggestion:"Please check the agent configuration in settings."}}function gh(e,t){var i;let n=((i=e.split("/").pop())==null?void 0:i.split("\\").pop())||"command";return mh.Platform.isWin&&t?`1. Verify the agent path: Use "which ${n}" in your WSL terminal to find the correct path. 2. If the agent requires Node.js, also check that Node.js path is correctly set in General Settings (use "which node" to find it).`:mh.Platform.isWin?`1. Verify the agent path: Use "where ${n}" in Command Prompt to find the correct path. 2. If the agent requires Node.js, also check that Node.js path is correctly set in General Settings (use "where node" to find it).`:`1. Verify the agent path: Use "which ${n}" in Terminal to find the correct path. 2. If the agent requires Node.js, also check that Node.js path is correctly set in General Settings (use "which node" to find it).`}var La=e=>{if(e==null)return null;let t=(()=>{if(typeof e=="number")return e;if(typeof e=="string"){let n=e.trim();return n.length===0||!/^-?\d+$/.test(n)?Number.NaN:Number.parseInt(n,10)}return Number.NaN})();return Number.isFinite(t)?Math.min(30,Math.max(10,Math.round(t))):null},Mo=e=>Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(t=>t.length>0):typeof e=="string"?e.split(/\r?\n/).map(t=>t.trim()).filter(t=>t.length>0):[],Ni=e=>{let t=[];if(!e)return t;if(Array.isArray(e)){for(let i of e)if(i&&typeof i=="object"){let r=i,o="key"in r?r.key:void 0,s="value"in r?r.value:void 0;typeof o=="string"&&o.trim().length>0&&t.push({key:o.trim(),value:typeof s=="string"?s:""})}}else if(typeof e=="object")for(let[i,r]of Object.entries(e))typeof i=="string"&&i.trim().length>0&&t.push({key:i.trim(),value:typeof r=="string"?r:""});let n=new Set;return t.filter(i=>n.has(i.key)?!1:(n.add(i.key),!0))},VC=e=>{let t=e&&typeof e.id=="string"&&e.id.trim().length>0?e.id.trim():"custom-agent",n=e&&typeof e.displayName=="string"&&e.displayName.trim().length>0?e.displayName.trim():t;return{id:t,displayName:n,command:e&&typeof e.command=="string"&&e.command.trim().length>0?e.command.trim():"",args:Mo(e==null?void 0:e.args),env:Ni(e==null?void 0:e.env)}},WC=e=>{let t=new Set;return e.map(n=>{let i=n.id&&n.id.trim().length>0?n.id.trim():"custom-agent",r=i,o=2;for(;t.has(r);)r=`${i}-${o}`,o+=1;return t.add(r),{...n,id:r}})},qC=(e,t)=>{let n=e.env.reduce((i,{key:r,value:o})=>(i[r]=o,i),{});return{id:e.id,displayName:e.displayName,command:e.command,args:e.args,env:n,workingDirectory:t}};function He(e,t){return typeof e=="string"?e:t}function Vt(e,t){return typeof e=="boolean"?e:t}function Rc(e,t,n){return typeof e!="number"||n!==void 0&&e<n?t:e}function Mc(e,t,n){return t.includes(e)?e:n}function Qn(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function hh(e){let t={},n=Qn(e);if(!n)return t;for(let[i,r]of Object.entries(n))typeof i=="string"&&i.length>0&&typeof r=="string"&&r.length>0&&(t[i]=r);return t}function vh(e){let t=Qn(e);return!t||typeof t.x!="number"||typeof t.y!="number"?null:{x:t.x,y:t.y}}function Lc(e){return e.defaultAgentId||e.claude.id}function yh(e){return[{id:e.claude.id,displayName:e.claude.displayName||e.claude.id},{id:e.codex.id,displayName:e.codex.displayName||e.codex.id},{id:e.gemini.id,displayName:e.gemini.displayName||e.gemini.id},...e.customAgents.map(t=>({id:t.id,displayName:t.displayName||t.id}))]}function Sh(e,t){let n=t||Lc(e);return yh(e).find(r=>r.id===n)||{id:n,displayName:n}}function BC(e,t){return t===e.claude.id?e.claude:t===e.codex.id?e.codex:t===e.gemini.id?e.gemini:e.customAgents.find(i=>i.id===t)||null}function HC(e,t,n,i){let r=qC(t,i);if(n===e.claude.id){let o=t;return{...r,env:{...r.env,ANTHROPIC_API_KEY:o.apiKey}}}if(n===e.codex.id){let o=t;return{...r,env:{...r.env,OPENAI_API_KEY:o.apiKey}}}if(n===e.gemini.id){let o=t;return{...r,env:{...r.env,GEMINI_API_KEY:o.apiKey}}}return r}function GC(e,t,n){return{sessionId:null,state:"disconnected",agentId:e,agentDisplayName:t,authMethods:[],availableCommands:void 0,modes:void 0,models:void 0,createdAt:new Date,lastActivityAt:new Date,workingDirectory:n}}var RM="https://rait-09.github.io/obsidian-agent-client/announcements/gemini-cli-deprecation.html";function JC(){return{variant:"info",title:"Gemini CLI is being discontinued",message:"Google is retiring account login for Gemini CLI (Pro/Ultra/free tiers) on June 18, 2026. Google states Gemini CLI stays accessible via a paid Gemini API key \u2014 see the guide for setup and privacy notes.",link:{text:"Learn more",url:RM}}}function Lo(e){return e.length===0?[]:"value"in e[0]?e:e.flatMap(t=>t.options)}function ja(e,t,n){return t==="mode"?e.modes?{...e,modes:{...e.modes,currentModeId:n}}:e:e.models?{...e,models:{...e.models,currentModelId:n}}:e}async function Ua(e,t,n,i,r){if(!r)return n;let o=n.find(s=>s.category===i);if(!o||r===o.currentValue||!Lo(o.options).some(s=>s.value===r))return n;try{return await e.setSessionConfigOption(t,o.id,r)}catch(s){return n}}async function wh(e,t,n,i,r){if(t.sessionId){if(t.models&&n&&n!==t.models.currentModelId&&t.models.availableModels.some(o=>o.modelId===n))try{await e.setSessionModel(t.sessionId,n),r(o=>ja(o,"model",n))}catch(o){}if(t.modes&&i&&i!==t.modes.currentModeId&&t.modes.availableModes.some(o=>o.id===i))try{await e.setSessionMode(t.sessionId,i),r(o=>ja(o,"mode",i))}catch(o){}}}var{useState:LM,useCallback:kn,useRef:jM}=MM;function KC(e,t,n,i,r){let o=t.getSnapshot(),s=r||Lc(o),a=Sh(o,s),[u,d]=LM(()=>GC(s,a.displayName,n)),p=u.state==="ready",l=jM(u);l.current=u;let f=kn(b=>{switch(b.type){case"available_commands_update":d(T=>({...T,availableCommands:b.commands}));break;case"current_mode_update":d(T=>T.modes?{...T,modes:{...T.modes,currentModeId:b.currentModeId}}:T);break;case"config_option_update":d(T=>({...T,configOptions:b.configOptions}));break;case"usage_update":d(T=>{var A;return{...T,usage:{used:b.used,size:b.size,cost:(A=b.cost)!=null?A:void 0}}});break;case"process_error":d(T=>({...T,state:"error"})),i({title:b.error.title||"Agent Error",message:b.error.message||"An error occurred",suggestion:b.error.suggestion});break}},[i]),m=kn(async(b,T)=>{let A=T||n,U=t.getSnapshot(),Z=b||Lc(U),R=Sh(U,Z);d(V=>({...V,sessionId:null,state:"initializing",agentId:Z,agentDisplayName:R.displayName,authMethods:[],availableCommands:void 0,modes:void 0,models:void 0,configOptions:void 0,usage:void 0,promptCapabilities:V.promptCapabilities,agentCapabilities:V.agentCapabilities,agentInfo:V.agentInfo,createdAt:new Date,lastActivityAt:new Date})),i(null);try{let V=BC(U,Z);if(!V){d(z=>({...z,state:"error"})),i({title:"Agent Not Found",message:`Agent with ID "${Z}" not found in settings`,suggestion:"Please check your agent configuration in settings."});return}let C=HC(U,V,Z,A),L=!e.isInitialized()||e.getCurrentAgentId()!==Z?await e.initialize(C):null,E=await e.newSession(A);if(d(z=>{var F;return{...z,sessionId:E.sessionId,state:"ready",authMethods:(F=L==null?void 0:L.authMethods)!=null?F:[],modes:E.modes,models:E.models,configOptions:E.configOptions,promptCapabilities:L?L.promptCapabilities:z.promptCapabilities,agentCapabilities:L?L.agentCapabilities:z.agentCapabilities,agentInfo:L?L.agentInfo:z.agentInfo,lastActivityAt:new Date}}),E.configOptions&&E.sessionId){let z=E.configOptions;z=await Ua(e,E.sessionId,z,"model",U.lastUsedModels[Z]),z=await Ua(e,E.sessionId,z,"mode",U.lastUsedModes[Z]),z!==E.configOptions&&d(F=>({...F,configOptions:z}))}else E.sessionId&&await wh(e,E,U.lastUsedModels[Z],U.lastUsedModes[Z],d)}catch(V){d(C=>({...C,state:"error"})),i({title:"Session Creation Failed",message:`Failed to create new session: ${zt(V)}`,suggestion:"Please check the agent configuration and try again."})}},[e,t,n,i]),g=kn(async(b,T)=>{await m(b,T)},[m]),h=kn(async()=>{let b=l.current;if(b.sessionId)try{await e.cancel(b.sessionId)}catch(T){console.warn("Failed to cancel session:",T)}try{await e.disconnect()}catch(T){console.warn("Failed to disconnect:",T)}d(T=>({...T,sessionId:null,state:"disconnected"}))},[e]),x=kn(async()=>{let b=l.current.agentId;await e.disconnect(),await m(b)},[e,m]),y=kn(async()=>{let b=l.current;if(b.sessionId)try{await e.cancel(b.sessionId),d(T=>({...T,state:"ready"}))}catch(T){console.warn("Failed to cancel operation:",T),d(A=>({...A,state:"ready"}))}},[e]),v=kn(()=>{let b=t.getSnapshot();return yh(b)},[t]),S=kn(async(b,T,A,U)=>{d(C=>({...C,sessionId:b,state:"ready",modes:T!=null?T:C.modes,models:A!=null?A:C.models,configOptions:U!=null?U:C.configOptions,lastActivityAt:new Date}));let Z=l.current,R=t.getSnapshot(),V=Z.agentId;if(U&&b){let C=U;C=await Ua(e,b,C,"model",R.lastUsedModels[V]),C=await Ua(e,b,C,"mode",R.lastUsedModes[V]),C!==U&&d(L=>({...L,configOptions:C}))}else b&&T&&await wh(e,{sessionId:b,modes:T,models:A,configOptions:void 0},R.lastUsedModels[V],R.lastUsedModes[V],d)},[e,t]),w=kn(async(b,T)=>{var Z,R;let A=l.current;if(!A.sessionId){console.warn(`Cannot set ${b}: no active session`);return}let U=b==="mode"?(Z=A.modes)==null?void 0:Z.currentModeId:(R=A.models)==null?void 0:R.currentModelId;d(V=>ja(V,b,T));try{if(b==="mode"?await e.setSessionMode(A.sessionId,T):await e.setSessionModel(A.sessionId,T),A.agentId){let V=b==="mode"?"lastUsedModes":"lastUsedModels",C=t.getSnapshot();t.updateSettings({[V]:{...C[V],[A.agentId]:T}})}}catch(V){console.error(`Failed to set ${b}:`,V),U&&d(C=>ja(C,b,U))}},[e,t]),$=kn(b=>w("mode",b),[w]),_=kn(b=>w("model",b),[w]),I=kn(async(b,T)=>{let A=l.current;if(!A.sessionId){console.warn("Cannot set config option: no active session");return}let U=A.configOptions;d(Z=>Z.configOptions?{...Z,configOptions:Z.configOptions.map(R=>R.id===b?{...R,currentValue:T}:R)}:Z);try{let Z=await e.setSessionConfigOption(A.sessionId,b,T);d(V=>({...V,configOptions:Z}));let R=Z.find(V=>V.id===b);if((R==null?void 0:R.category)==="model"&&A.agentId){let V=t.getSnapshot();t.updateSettings({lastUsedModels:{...V.lastUsedModels,[A.agentId]:T}})}if((R==null?void 0:R.category)==="mode"&&A.agentId){let V=t.getSnapshot();t.updateSettings({lastUsedModes:{...V.lastUsedModes,[A.agentId]:T}})}}catch(Z){console.error("Failed to set config option:",Z),U&&d(R=>({...R,configOptions:U}))}},[e,t]);return{session:u,isReady:p,createSession:m,restartSession:g,closeSession:h,forceRestartAgent:x,cancelOperation:y,getAvailableAgents:v,updateSessionFromLoad:S,setMode:$,setModel:_,setConfigOption:I,handleSessionUpdate:f}}var GM=H(Se());var XC=1e4,YC=1e4;async function QC(e,t,n,i,r){try{let o=await n.readNote(e.path),s=t?`${t}/${e.path}`:e.path;i&&(s=xn(s));let a=o.length>r;return{content:a?o.substring(0,r):o,absolutePath:s,uri:Da(s),lastModified:new Date(e.stat.mtime).toISOString(),wasTruncated:a,originalLength:o.length}}catch(o){return console.error(`Failed to read note ${e.path}:`,o),null}}async function eE(e,t,n,i){try{let a=(await n.readNote(e)).split(`
76
+ `).slice(t.from.line,t.to.line+1).join(`
77
+ `),u=a.length>i;return{text:u?a.substring(0,i):a,wasTruncated:u,originalLength:a.length}}catch(r){return console.error(`Failed to read selection from ${e}:`,r),null}}function tE(e,t){return!e||t?"":e.selection?`@[[${e.name}]]:${e.selection.from.line+1}-${e.selection.to.line+1}
78
+ `:`@[[${e.name}]]
79
+ `}function nE(e){return[...e.message?[{type:"text",text:e.message}]:[],...e.images||[],...e.resourceLinks||[]]}function rE(e,t){if(!(!e||t))return{noteName:e.name,notePath:e.path,selection:e.selection?{fromLine:e.selection.from.line+1,toLine:e.selection.to.line+1}:void 0}}function iE(e,t,n){let i=t?`${t}/${e}`:e;return n&&(i=xn(i)),i}async function oE(e,t,n){let i=LC(e.message,n);return e.supportsEmbeddedContext?UM(e,t,i):FM(e,t,i)}async function UM(e,t,n){var u,d,p,l;let i=(u=e.maxNoteLength)!=null?u:XC,r=[];for(let{file:f}of n){if(!f)continue;let m=await QC(f,e.vaultBasePath,t,(d=e.convertToWsl)!=null?d:!1,i);if(!m)continue;let g=m.wasTruncated?m.content+`
80
+
81
+ [Note: Truncated from ${m.originalLength} to ${i} characters]`:m.content;r.push({type:"resource",resource:{uri:m.uri,mimeType:"text/markdown",text:g},annotations:{audience:["assistant"],priority:1,lastModified:m.lastModified}})}let o=[];if(e.activeNote&&!e.isAutoMentionDisabled){let f=await ZM(e.activeNote,e.vaultBasePath,t,(p=e.convertToWsl)!=null?p:!1,(l=e.maxSelectionLength)!=null?l:YC);o.push(...f)}let s=tE(e.activeNote,e.isAutoMentionDisabled),a=[...r,...o,...e.message||s?[{type:"text",text:s+e.message}]:[],...e.images||[],...e.resourceLinks||[]];return{displayContent:nE(e),agentContent:a,autoMentionContext:rE(e.activeNote,e.isAutoMentionDisabled)}}async function FM(e,t,n){var u,d,p,l;let i=(u=e.maxNoteLength)!=null?u:XC,r=[];for(let{file:f}of n){if(!f)continue;let m=await QC(f,e.vaultBasePath,t,(d=e.convertToWsl)!=null?d:!1,i);if(!m)continue;let g=m.wasTruncated?`
82
+
83
+ [Note: This note was truncated. Original length: ${m.originalLength} characters, showing first ${i} characters]`:"";r.push(`<obsidian_mentioned_note ref="${m.absolutePath}">
84
+ ${m.content}${g}
85
+ </obsidian_mentioned_note>`)}if(e.activeNote&&!e.isAutoMentionDisabled){let f=await VM(e.activeNote.path,e.vaultBasePath,t,(p=e.convertToWsl)!=null?p:!1,e.activeNote.selection,(l=e.maxSelectionLength)!=null?l:YC);r.push(f)}let o=tE(e.activeNote,e.isAutoMentionDisabled),s=r.length>0?r.join(`
86
+ `)+`
87
+
88
+ `+o+e.message:o+e.message,a=[...s?[{type:"text",text:s}]:[],...e.images||[],...e.resourceLinks||[]];return{displayContent:nE(e),agentContent:a,autoMentionContext:rE(e.activeNote,e.isAutoMentionDisabled)}}async function ZM(e,t,n,i,r){let o=iE(e.path,t,i),s=Da(o);if(e.selection){let a=e.selection.from.line+1,u=e.selection.to.line+1,d=await eE(e.path,e.selection,n,r);if(!d)return[{type:"text",text:`The user has selected lines ${a}-${u} in ${s}. If relevant, use the Read tool to examine the specific lines.`}];let p=d.wasTruncated?d.text+`
89
+
90
+ [Note: Truncated from ${d.originalLength} to ${r} characters]`:d.text;return[{type:"resource",resource:{uri:s,mimeType:"text/markdown",text:p},annotations:{audience:["assistant"],priority:.8,lastModified:new Date(e.modified).toISOString()}},{type:"text",text:`The user has selected lines ${a}-${u} in the above note. This is what they are currently focusing on.`}]}return[{type:"text",text:`The user has opened the note ${s} in Obsidian. This may or may not be related to the current conversation. If it seems relevant, consider using the Read tool to examine its content.`}]}async function VM(e,t,n,i,r,o){let s=iE(e,t,i);if(r){let a=r.from.line+1,u=r.to.line+1,d=await eE(e,r,n,o);if(!d)return`<obsidian_opened_note selection="lines ${a}-${u}">The user opened the note ${s} in Obsidian and is focusing on lines ${a}-${u}. This may or may not be related to the current conversation. If it seems relevant, consider using the Read tool to examine the specific lines.</obsidian_opened_note>`;let p=d.wasTruncated?`
91
+
92
+ [Note: The selection was truncated. Original length: ${d.originalLength} characters, showing first ${o} characters]`:"";return`<obsidian_opened_note selection="lines ${a}-${u}">
93
+ The user opened the note ${s} in Obsidian and selected the following text (lines ${a}-${u}):
94
+
95
+ ${d.text}${p}
96
+
97
+ This is what the user is currently focusing on.
98
+ </obsidian_opened_note>`}return`<obsidian_opened_note>The user opened the note ${s} in Obsidian. This may or may not be related to the current conversation. If it seems relevant, consider using the Read tool to examine the content.</obsidian_opened_note>`}async function sE(e,t){try{return await t.sendPrompt(e.sessionId,e.agentContent),{success:!0,displayContent:e.displayContent,agentContent:e.agentContent}}catch(n){return await WM(n,e.sessionId,e.agentContent,e.displayContent,e.authMethods,t)}}async function WM(e,t,n,i,r,o){if(Dc(e))return{success:!0,displayContent:i,agentContent:n};if(Ma(e)===Xe.AUTHENTICATION_REQUIRED&&r&&r.length>0){if(r.length===1){let a=await qM(t,n,i,r[0].id,o);if(a)return a}return{success:!1,displayContent:i,agentContent:n,requiresAuth:!0,error:Oc(e,t)}}return{success:!1,displayContent:i,agentContent:n,error:Oc(e,t)}}async function qM(e,t,n,i,r){try{return await r.authenticate(i)?(await r.sendPrompt(e,t),{success:!0,displayContent:n,agentContent:t,retriedSuccessfully:!0}):null}catch(o){return{success:!1,displayContent:n,agentContent:t,error:Oc(o,e)}}}var dE=require("obsidian");function aE(e,t){let n=e.content||[];if(t.content!==void 0){let i=t.content||[];i.some(o=>o.type==="diff")&&(n=n.filter(o=>o.type!=="diff")),n=[...n,...i]}return{...e,toolCallId:t.toolCallId,title:t.title!==void 0?t.title:e.title,kind:t.kind!==void 0?t.kind:e.kind,status:t.status!==void 0?t.status:e.status,content:n,locations:t.locations!==void 0?t.locations:e.locations,rawInput:t.rawInput!==void 0&&Object.keys(t.rawInput).length>0?t.rawInput:e.rawInput,permissionRequest:t.permissionRequest!==void 0?t.permissionRequest:e.permissionRequest}}function xh(e,t){if(e.length===0||e[e.length-1].role!=="assistant"){let r={id:crypto.randomUUID(),role:"assistant",content:[t],timestamp:new Date};return[...e,r]}let i={...e[e.length-1]};if(t.type==="text"||t.type==="agent_thought"){let r=i.content.findIndex(o=>o.type===t.type);if(r>=0){let o=i.content[r];(o.type==="text"||o.type==="agent_thought")&&(i.content[r]={type:t.type,text:o.text+t.text})}else i.content.push(t)}else{let r=i.content.findIndex(o=>o.type===t.type);r>=0?i.content[r]=t:i.content.push(t)}return[...e.slice(0,-1),i]}function BM(e,t){if(e.length===0||e[e.length-1].role!=="user"){let r={id:crypto.randomUUID(),role:"user",content:[t],timestamp:new Date};return[...e,r]}let i={...e[e.length-1]};if(t.type==="text"){let r=i.content.findIndex(o=>o.type==="text");if(r>=0){let o=i.content[r];o.type==="text"&&(i.content[r]={type:"text",text:o.text+t.text})}else i.content.push(t)}else{let r=i.content.findIndex(o=>o.type===t.type);r>=0?i.content[r]=t:i.content.push(t)}return[...e.slice(0,-1),i]}function HM(e,t,n){let i=n.get(t.toolCallId);if(i!==void 0&&i<e.length){let s=e[i];if(s.content.some(u=>u.type==="tool_call"&&u.toolCallId===t.toolCallId)){let u={...s,content:s.content.map(p=>p.type==="tool_call"&&p.toolCallId===t.toolCallId?aE(p,t):p)},d=[...e];return d[i]=u,d}}let r=!1,o=e.map((s,a)=>s.content.some(d=>d.type==="tool_call"&&d.toolCallId===t.toolCallId)?(r=!0,n.set(t.toolCallId,a),{...s,content:s.content.map(d=>d.type==="tool_call"&&d.toolCallId===t.toolCallId?aE(d,t):d)}):s);return r?o:(n.set(t.toolCallId,e.length),[...e,{id:crypto.randomUUID(),role:"assistant",content:[t],timestamp:new Date}])}function $h(e,t){t.clear(),e.forEach((n,i)=>{for(let r of n.content)r.type==="tool_call"&&t.set(r.toolCallId,i)})}function lE(e,t,n){switch(t.type){case"agent_message_chunk":return xh(e,{type:"text",text:t.text});case"agent_thought_chunk":return xh(e,{type:"agent_thought",text:t.text});case"user_message_chunk":return BM(e,{type:"text",text:t.text});case"tool_call":case"tool_call_update":return HM(e,{type:"tool_call",toolCallId:t.toolCallId,title:t.title,status:t.status||"pending",kind:t.kind,content:t.content,locations:t.locations,rawInput:t.rawInput,permissionRequest:t.permissionRequest},n);case"plan":return xh(e,{type:"plan",entries:t.entries});default:return e}}function uE(e){for(let t of e)for(let n of t.content)if(n.type==="tool_call"){let i=n.permissionRequest;if(i!=null&&i.isActive)return{requestId:i.requestId,toolCallId:n.toolCallId,options:i.options}}return null}function _h(e,t,n){for(let i of t){let r=e.find(o=>o.kind===i);if(r)return r}if(n){let i=e.find(n);if(i)return i}return e[0]}var{useState:kh,useCallback:on,useMemo:cE,useRef:jo,useEffect:JM}=GM;function pE(e,t,n,i,r){let[o,s]=kh([]),[a,u]=kh(!1),[d,p]=kh(null),l=jo(new Map),f=jo(!1),m=jo(0),g=jo(null),h=jo([]),x=jo(!1),y=on(()=>{x.current=!1;let E=h.current;E.length!==0&&(h.current=[],s(z=>{let F=z;for(let G of E)F=lE(F,G,l.current);return F}))},[]),v=on(E=>{f.current||(h.current.push(E),x.current||(x.current=!0,window.requestAnimationFrame(y)))},[y]);JM(()=>()=>{h.current=[],x.current=!1,l.current.clear()},[]);let S=on(E=>{s(z=>[...z,E])},[]),w=on(E=>{f.current=E},[]),$=on(()=>{h.current=[],x.current=!1,u(!1)},[]),_=on(()=>{s([]),l.current.clear(),p(null),u(!1),r(null)},[r]),I=on(E=>{let z=E.map(F=>({id:crypto.randomUUID(),role:F.role,content:F.content.map(G=>({type:G.type,text:G.text})),timestamp:F.timestamp?new Date(F.timestamp):new Date}));s(z),$h(z,l.current),u(!1),r(null)},[r]),b=on(E=>{s(E),$h(E,l.current),u(!1),r(null)},[r]),T=on(()=>{r(null)},[r]),A=cE(()=>{let E=t.getSnapshot();return dE.Platform.isWin&&E.windowsWslMode},[t]),U=on(async(E,z)=>{var qe,ln;if(!i.sessionId){r({title:"Cannot Send Message",message:"No active session. Please wait for connection."});return}if(g.current)try{await g.current}catch(Te){}let F=i.sessionId,G=++m.current,re=t.getSnapshot(),Ce=await oE({message:E,images:z.images,resourceLinks:z.resourceLinks,activeNote:z.activeNote,vaultBasePath:z.vaultBasePath,isAutoMentionDisabled:z.isAutoMentionDisabled,convertToWsl:A,supportsEmbeddedContext:(ln=(qe=i.promptCapabilities)==null?void 0:qe.embeddedContext)!=null?ln:!1,maxNoteLength:re.displaySettings.maxNoteLength,maxSelectionLength:re.displaySettings.maxSelectionLength},n,n),he=[];if(Ce.autoMentionContext?he.push({type:"text_with_context",text:E,autoMentionContext:Ce.autoMentionContext}):he.push({type:"text",text:E}),z.images&&z.images.length>0)for(let Te of z.images)he.push({type:"image",data:Te.data,mimeType:Te.mimeType});if(z.resourceLinks&&z.resourceLinks.length>0)for(let Te of z.resourceLinks)he.push({type:"resource_link",uri:Te.uri,name:Te.name,mimeType:Te.mimeType,size:Te.size});let Ze={id:crypto.randomUUID(),role:"user",content:he,timestamp:new Date};S(Ze),u(!0),p(E);let kt=(async()=>{try{let Te=await sE({sessionId:F,agentContent:Ce.agentContent,displayContent:Ce.displayContent,authMethods:i.authMethods},e);if(m.current!==G)return;Te.success?(u(!1),p(null)):(u(!1),r(Te.error?{title:Te.error.title,message:Te.error.message,suggestion:Te.error.suggestion}:{title:"Send Message Failed",message:"Failed to send message"}))}catch(Te){if(m.current!==G)return;u(!1),r({title:"Send Message Failed",message:`Failed to send message: ${zt(Te)}`})}})();g.current=kt;try{await kt}catch(Te){}finally{g.current=null}},[e,n,t,i.sessionId,i.authMethods,i.promptCapabilities,A,S,r]),Z=cE(()=>uE(o),[o]),R=Z!==null,V=on(async(E,z)=>{try{await e.respondToPermission(E,z)}catch(F){r({title:"Permission Error",message:`Failed to respond to permission request: ${zt(F)}`})}},[e,r]),C=on(async()=>{if(!Z||Z.options.length===0)return!1;let E=_h(Z.options,["allow_once","allow_always"]);return E?(await V(Z.requestId,E.optionId),!0):!1},[Z,V]),L=on(async()=>{if(!Z||Z.options.length===0)return!1;let E=_h(Z.options,["reject_once","reject_always"],z=>z.name.toLowerCase().includes("reject")||z.name.toLowerCase().includes("deny"));return E?(await V(Z.requestId,E.optionId),!0):!1},[Z,V]);return{messages:o,isSending:a,lastUserMessage:d,sendMessage:U,clearMessages:_,setInitialMessages:I,setMessagesFromLocal:b,clearError:T,setIgnoreUpdates:w,clearPendingUpdates:$,activePermission:Z,hasActivePermission:R,approvePermission:V,approveActivePermission:C,rejectActivePermission:L,enqueueUpdate:v}}var{useState:XM,useCallback:fE,useEffect:YM,useMemo:QM}=KM;function mE(e,t,n,i,r){let[o,s]=XM(null),a=KC(e,t,i,s,r),u=pE(e,t,n,a.session,s),d=fE(l=>{a.handleSessionUpdate(l),u.enqueueUpdate(l)},[a.handleSessionUpdate,u.enqueueUpdate]),p=fE(async()=>{await a.cancelOperation(),u.clearPendingUpdates()},[a.cancelOperation,u.clearPendingUpdates]);return YM(()=>e.onSessionUpdate(d),[e,d]),QM(()=>({session:a.session,isReady:a.isReady,messages:u.messages,isSending:u.isSending,lastUserMessage:u.lastUserMessage,errorInfo:o,createSession:a.createSession,restartSession:a.restartSession,closeSession:a.closeSession,forceRestartAgent:a.forceRestartAgent,cancelOperation:p,getAvailableAgents:a.getAvailableAgents,updateSessionFromLoad:a.updateSessionFromLoad,setMode:a.setMode,setModel:a.setModel,setConfigOption:a.setConfigOption,sendMessage:u.sendMessage,clearMessages:u.clearMessages,setInitialMessages:u.setInitialMessages,setMessagesFromLocal:u.setMessagesFromLocal,clearError:u.clearError,setIgnoreUpdates:u.setIgnoreUpdates,activePermission:u.activePermission,hasActivePermission:u.hasActivePermission,approvePermission:u.approvePermission,approveActivePermission:u.approveActivePermission,rejectActivePermission:u.rejectActivePermission}),[a.session,a.isReady,u.messages,u.isSending,u.lastUserMessage,o,a.createSession,a.restartSession,a.closeSession,a.forceRestartAgent,p,a.getAvailableAgents,a.updateSessionFromLoad,a.setMode,a.setModel,a.setConfigOption,u.sendMessage,u.clearMessages,u.setInitialMessages,u.setMessagesFromLocal,u.clearError,u.setIgnoreUpdates,u.activePermission,u.hasActivePermission,u.approvePermission,u.approveActivePermission,u.rejectActivePermission])}var Fe=H(Se());function eL(e){let t=e==null?void 0:e.sessionCapabilities;return{canLoad:(e==null?void 0:e.loadSession)===!0,canResume:(t==null?void 0:t.resume)!==void 0,canFork:(t==null?void 0:t.fork)!==void 0,canList:(t==null?void 0:t.list)!==void 0}}var tL=5*60*1e3;function bh(e,t){let n=new Map(t.map(i=>[i.sessionId,i]));return e.map(i=>{var o;let r=n.get(i.sessionId);return{...i,title:(o=r==null?void 0:r.title)!=null?o:i.title}})}function gE(e){let{agentClient:t,session:n,settingsAccess:i,agentCwd:r,onSessionLoad:o,onMessagesRestore:s,onIgnoreUpdates:a,onClearMessages:u}=e,d=(0,Fe.useMemo)(()=>eL(n.agentCapabilities),[n.agentCapabilities]),[p,l]=(0,Fe.useState)([]),[f,m]=(0,Fe.useState)(!1),[g,h]=(0,Fe.useState)(null),[x,y]=(0,Fe.useState)(void 0),[v,S]=(0,Fe.useState)(new Set),w=(0,Fe.useRef)(null),$=(0,Fe.useRef)(void 0),_=(0,Fe.useCallback)(E=>!w.current||w.current.cwd!==E?!1:Date.now()-w.current.timestamp<tL,[]),I=(0,Fe.useCallback)(()=>{w.current=null},[]),b=d.canLoad||d.canResume||d.canFork,T=(0,Fe.useCallback)(async E=>{if(!d.canList||!b){let F=i.getSavedSessions(n.agentId,E),G=F.map(re=>({sessionId:re.sessionId,cwd:re.cwd,title:re.title,updatedAt:re.updatedAt}));l(G),S(new Set(F.map(re=>re.sessionId))),y(void 0),h(null);return}if(_(E)){let F=i.getSavedSessions(n.agentId,E);S(new Set(F.map(re=>re.sessionId)));let G=bh(w.current.sessions,F);l(G),y(w.current.nextCursor),h(null);return}m(!0),h(null),$.current=E;try{let F=await t.listSessions(E),G=i.getSavedSessions(n.agentId,E),re=bh(F.sessions,G);l(re),S(new Set(G.map(Ce=>Ce.sessionId))),y(F.nextCursor),w.current={sessions:re,nextCursor:F.nextCursor,cwd:E,timestamp:Date.now()}}catch(F){let G=zt(F);h(`Failed to fetch sessions: ${G}`),l([]),y(void 0)}finally{m(!1)}},[t,d.canList,b,_,i,n.agentId]),A=(0,Fe.useCallback)(async()=>{if(!(!x||!d.canList)){m(!0),h(null);try{let E=await t.listSessions($.current,x),z=i.getSavedSessions(n.agentId,$.current),F=bh(E.sessions,z);l(G=>[...G,...F]),S(new Set(z.map(G=>G.sessionId))),y(E.nextCursor),w.current&&(w.current={...w.current,sessions:[...w.current.sessions,...F],nextCursor:E.nextCursor,timestamp:Date.now()})}catch(E){let z=zt(E);h(`Failed to load more sessions: ${z}`)}finally{m(!1)}}},[t,d.canList,x,i,n.agentId]),U=(0,Fe.useCallback)(async(E,z)=>{m(!0),h(null);try{if(o(E,void 0,void 0,void 0),d.canLoad){let F=await i.loadSessionMessages(E);if(F&&s){a==null||a(!0),u==null||u();try{let G=await t.loadSession(E,z);o(G.sessionId,G.modes,G.models,G.configOptions),s(F)}finally{a==null||a(!1)}}else{let G=await t.loadSession(E,z);o(G.sessionId,G.modes,G.models,G.configOptions)}}else if(d.canResume){let F=await t.resumeSession(E,z);o(F.sessionId,F.modes,F.models,F.configOptions);let G=await i.loadSessionMessages(E);G&&s&&s(G)}else throw new Error("Session restoration is not supported")}catch(F){let G=zt(F);throw h(`Failed to restore session: ${G}`),F}finally{m(!1)}},[t,d.canLoad,d.canResume,o,i,s,a,u]),Z=(0,Fe.useCallback)(async(E,z)=>{var F;m(!0),h(null);try{let G=await t.forkSession(E,z);o(G.sessionId,G.modes,G.models,G.configOptions);let re=await i.loadSessionMessages(E);if(re&&s&&s(re),n.agentId){let Ce=p.find(Ki=>Ki.sessionId===E),he=(F=Ce==null?void 0:Ce.title)!=null?F:"Session",Ze=50,kt="Fork: ",qe=Ze-kt.length,ln=he.length>qe?he.substring(0,qe)+"...":he,Te=`${kt}${ln}`,Zn=new Date().toISOString();await i.saveSession({sessionId:G.sessionId,agentId:n.agentId,cwd:z,title:Te,createdAt:Zn,updatedAt:Zn}),re&&i.saveSessionMessages(G.sessionId,n.agentId,re)}I()}catch(G){let re=zt(G);throw h(`Failed to fork session: ${re}`),G}finally{m(!1)}},[t,o,i,s,I,n.agentId,p]),R=(0,Fe.useCallback)(async E=>{try{await i.deleteSession(E),l(z=>z.filter(F=>F.sessionId!==E)),I()}catch(z){let F=zt(z);throw h(`Failed to delete session: ${F}`),z}},[i,I]),V=(0,Fe.useCallback)(async(E,z,F)=>{let re=i.getSavedSessions().find(he=>he.sessionId===E),Ce=re==null?void 0:re.title;l(he=>he.map(Ze=>Ze.sessionId===E?{...Ze,title:z}:Ze));try{re?await i.saveSession({...re,title:z,updatedAt:new Date().toISOString()}):await i.saveSession({sessionId:E,agentId:n.agentId,cwd:F,title:z,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),I()}catch(he){l(kt=>kt.map(qe=>qe.sessionId===E?{...qe,title:Ce}:qe));let Ze=zt(he);throw h(`Failed to update title: ${Ze}`),he}},[i,n.agentId,I]),C=(0,Fe.useCallback)(async(E,z)=>{if(!n.agentId)return;let F=z.length>50?z.substring(0,50)+"...":z;await i.saveSession({sessionId:E,agentId:n.agentId,cwd:r,title:F,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()})},[n.agentId,r,i]),L=(0,Fe.useCallback)((E,z)=>{!n.agentId||z.length===0||i.saveSessionMessages(E,n.agentId,z)},[n.agentId,i]);return(0,Fe.useMemo)(()=>({sessions:p,loading:f,error:g,hasMore:x!==void 0,canShowSessionHistory:d.canList||d.canLoad||d.canResume||d.canFork,canRestore:d.canLoad||d.canResume,canFork:d.canFork,canList:d.canList,isUsingLocalSessions:!d.canList,localSessionIds:v,fetchSessions:T,loadMoreSessions:A,restoreSession:U,forkSession:Z,deleteSession:R,updateSessionTitle:V,saveSessionLocally:C,saveSessionMessages:L,invalidateCache:I}),[p,f,g,x,d.canList,d.canLoad,d.canResume,d.canFork,v,T,A,U,Z,R,V,C,L,I])}var hE=require("obsidian"),Uo=H(jf()),nL={"@agentclientprotocol/claude-agent-acp":"@agentclientprotocol/claude-agent-acp","codex-acp":"@zed-industries/codex-acp"},rL={"@zed-industries/claude-code-acp":"@agentclientprotocol/claude-agent-acp","@zed-industries/claude-agent-acp":"@agentclientprotocol/claude-agent-acp"};async function vE(e){let t=rL[e.name];if(t)return{variant:"info",title:"Package Migration Required",message:`"${e.name}" has been renamed to "${t}".
99
+ Run the following in your terminal:`,suggestion:`npm uninstall -g ${e.name} && npm install -g ${t}`};let n=nL[e.name];if(!n||!e.version)return null;try{let i=await iL(n);if(i&&Uo.valid(e.version)&&Uo.gt(i,e.version))return{variant:"info",title:"Agent Update Available",message:`${n}: ${e.version} \u2192 ${i}.
100
+ Run the following in your terminal:`,suggestion:`npm install -g ${n}@latest`}}catch(i){}return null}async function iL(e){var i;let n=(await(0,hE.requestUrl)({url:`https://registry.npmjs.org/${e}/latest`})).json;return n.version&&(i=Uo.clean(n.version))!=null?i:null}var lL=H(Se()),Fa=require("obsidian");var oL=H(Se()),Ih=require("obsidian"),Ch=H(fe()),{useRef:yE,useEffect:SE,useImperativeHandle:sL,forwardRef:aL}=oL;function Ln({name:e,className:t}){let n=yE(null);return SE(()=>{n.current&&(0,Ih.setIcon)(n.current,e)},[e]),(0,Ch.jsx)("span",{ref:n,className:t})}var jc=aL(function({iconName:t,tooltip:n,onClick:i},r){let o=yE(null);return sL(r,()=>o.current,[]),SE(()=>{o.current&&(0,Ih.setIcon)(o.current,t)},[t]),(0,Ch.jsx)("button",{ref:o,title:n,onClick:i,className:"clickable-icon agent-client-header-button"})});var Re=H(fe()),{useRef:Fc,useEffect:Eh}=lL;function Uc({icon:e,label:t,onClick:n}){let i=Fc(null);return Eh(()=>{i.current&&(0,Fa.setIcon)(i.current,e)},[e]),(0,Re.jsx)("div",{ref:i,className:"clickable-icon nav-action-button","aria-label":t,onClick:n})}function uL({agentLabel:e,isUpdateAvailable:t,onNewChat:n,onExportChat:i,onShowMenu:r,onOpenHistory:o}){return(0,Re.jsx)("div",{className:"nav-header agent-client-chat-view-header",children:(0,Re.jsxs)("div",{className:"nav-buttons-container",children:[(0,Re.jsx)("span",{className:"agent-client-chat-view-header-title",children:e}),t&&(0,Re.jsx)("span",{className:"agent-client-chat-view-header-update",children:"Plugin update available!"}),(0,Re.jsx)(Uc,{icon:"plus",label:"New chat",onClick:n}),o&&(0,Re.jsx)(Uc,{icon:"history",label:"Session history",onClick:o}),(0,Re.jsx)(Uc,{icon:"save",label:"Export chat to Markdown",onClick:i}),(0,Re.jsx)(Uc,{icon:"more-vertical",label:"More",onClick:r})]})})}function cL({agentLabel:e,availableAgents:t,currentAgentId:n,isUpdateAvailable:i,onAgentChange:r,onShowMenu:o,onMinimize:s,onClose:a}){let u=Fc(null),d=Fc(null),p=Fc(r);return p.current=r,Eh(()=>{let l=u.current;if(l){if(t.length<=1){d.current&&(l.empty(),d.current=null);return}if(!d.current){let f=new Fa.DropdownComponent(l);d.current=f;for(let m of t)f.addOption(m.id,m.displayName);n&&f.setValue(n),f.onChange(m=>{var g;(g=p.current)==null||g.call(p,m)})}return()=>{d.current&&(l.empty(),d.current=null)}}},[t]),Eh(()=>{d.current&&n&&d.current.setValue(n)},[n]),(0,Re.jsxs)("div",{className:"agent-client-inline-header agent-client-inline-header-floating",children:[(0,Re.jsx)("div",{className:"agent-client-inline-header-main",children:t.length>1?(0,Re.jsxs)("div",{className:"agent-client-agent-selector",children:[(0,Re.jsx)("div",{ref:u}),(0,Re.jsx)("span",{className:"agent-client-agent-selector-icon",ref:l=>{l&&(0,Fa.setIcon)(l,"chevron-down")}})]}):(0,Re.jsx)("span",{className:"agent-client-agent-label",children:e})}),i&&(0,Re.jsx)("p",{className:"agent-client-chat-view-header-update",children:"Plugin update available!"}),(0,Re.jsxs)("div",{className:"agent-client-inline-header-actions",children:[(0,Re.jsx)(jc,{iconName:"more-vertical",tooltip:"More",onClick:o}),s&&(0,Re.jsx)(jc,{iconName:"minimize-2",tooltip:"Minimize",onClick:s}),a&&(0,Re.jsx)(jc,{iconName:"x",tooltip:"Close",onClick:a})]})]})}function Ph(e){return e.variant==="floating"?(0,Re.jsx)(cL,{...e}):(0,Re.jsx)(uL,{...e})}var ML=H(Se()),GE=require("obsidian");var qh=H(Se()),Bh=require("obsidian");var dL=H(Se()),Yr=require("obsidian");var wE=H(fe()),{useRef:pL,useEffect:fL}=dL;function Th({text:e,plugin:t}){let n=pL(null);return fL(()=>{var d;let i=n.current;if(!i)return;(d=i.empty)==null||d.call(i),i.classList.add("markdown-rendered");let r=new Yr.Component;r.load(),Yr.MarkdownRenderer.render(t.app,e,i,"",r);let o=t.app.vault.adapter instanceof Yr.FileSystemAdapter?t.app.vault.adapter.getBasePath():null,s=Yr.Platform.isWin&&t.settings.windowsWslMode,a=o?o.replace(/\\/g,"/").replace(/\/+$/,""):null,u=p=>{let f=p.target.closest("a.internal-link");if(f){p.preventDefault();let m=f.getAttribute("data-href");if(m){let g=decodeURIComponent(m);s&&g.startsWith("/mnt/")&&(g=Do(g));let h=g.replace(/\\/g,"/");if(a&&h.startsWith(a+"/")){let x=h.slice(a.length+1);t.app.workspace.openLinkText(x,"")}else Oa(g)||t.app.workspace.openLinkText(g,"")}}};return i.addEventListener("click",u),()=>{i.removeEventListener("click",u),r.unload()}},[e,t]),(0,wE.jsx)("div",{ref:n,className:"agent-client-markdown-text-renderer"})}var Nh=H(Se());var Ah=H(fe()),{useState:zh,useRef:mL,useEffect:xE}=Nh,Zc=Nh.memo(function({terminalId:t,terminalClient:n}){let i=_e(),[r,o]=zh(""),[s,a]=zh(null),[u,d]=zh(!0),p=mL(null);return i.log(`[TerminalBlock] Component rendered for terminal ${t}, terminalClient: ${!!n}`),xE(()=>{if(i.log(`[TerminalBlock] useEffect triggered for ${t}, terminalClient: ${!!n}`),!t||!n)return;let l=async()=>{var f,m;try{let g=await n.getTerminalOutput(t);i.log(`[TerminalBlock] Poll result for ${t}:`,g),o(g.output),g.exitStatus&&(a({exitCode:(f=g.exitStatus.exitCode)!=null?f:null,signal:(m=g.exitStatus.signal)!=null?m:null}),d(!1),p.current&&(window.clearInterval(p.current),p.current=null))}catch(g){let h=g instanceof Error?g.message:String(g);i.log(`[TerminalBlock] Polling error for terminal ${t}: ${h}`),d(!1),p.current&&(window.clearInterval(p.current),p.current=null)}};return l(),p.current=window.setInterval(()=>{l()},100),()=>{p.current&&(window.clearInterval(p.current),p.current=null)}},[t,n,i]),xE(()=>{!u&&p.current&&(window.clearInterval(p.current),p.current=null)},[u]),(0,Ah.jsxs)("div",{className:"agent-client-terminal-renderer",children:[r||(u?"Waiting for output...":"No output"),s&&(0,Ah.jsxs)("div",{className:`agent-client-terminal-renderer-exit ${s.exitCode===0?"agent-client-success":"agent-client-error"}`,children:["Exit Code: ",s.exitCode,s.signal&&` | Signal: ${s.signal}`]})]})});var Va=H(Se()),TE=require("obsidian");var Oh=H(fe());function $E({permissionRequest:e,onApprovePermission:t,onOptionSelected:n}){let i=_e(),r=e.selectedOptionId!==void 0,o=e.isCancelled===!0;return!(e.isActive!==!1)||r||o?null:(0,Oh.jsx)("div",{className:"agent-client-message-permission-request",children:e.options.map(a=>(0,Oh.jsx)("button",{className:`agent-client-permission-option ${a.kind?`agent-client-permission-kind-${a.kind}`:""}`,onClick:()=>{n&&n(a.optionId),t?t(e.requestId,a.optionId):i.warn("Cannot handle permission response: missing onApprovePermission callback")},children:a.name},a.optionId))})}var Qr=class{diff(t,n,i={}){let r;typeof i=="function"?(r=i,i={}):"callback"in i&&(r=i.callback);let o=this.castInput(t,i),s=this.castInput(n,i),a=this.removeEmpty(this.tokenize(o,i)),u=this.removeEmpty(this.tokenize(s,i));return this.diffWithOptionsObj(a,u,i,r)}diffWithOptionsObj(t,n,i,r){var o;let s=v=>{if(v=this.postProcess(v,i),r){setTimeout(function(){r(v)},0);return}else return v},a=n.length,u=t.length,d=1,p=a+u;i.maxEditLength!=null&&(p=Math.min(p,i.maxEditLength));let l=(o=i.timeout)!==null&&o!==void 0?o:1/0,f=Date.now()+l,m=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(m[0],n,t,0,i);if(m[0].oldPos+1>=u&&g+1>=a)return s(this.buildValues(m[0].lastComponent,n,t));let h=-1/0,x=1/0,y=()=>{for(let v=Math.max(h,-d);v<=Math.min(x,d);v+=2){let S,w=m[v-1],$=m[v+1];w&&(m[v-1]=void 0);let _=!1;if($){let b=$.oldPos-v;_=$&&0<=b&&b<a}let I=w&&w.oldPos+1<u;if(!_&&!I){m[v]=void 0;continue}if(!I||_&&w.oldPos<$.oldPos?S=this.addToPath($,!0,!1,0,i):S=this.addToPath(w,!1,!0,1,i),g=this.extractCommon(S,n,t,v,i),S.oldPos+1>=u&&g+1>=a)return s(this.buildValues(S.lastComponent,n,t))||!0;m[v]=S,S.oldPos+1>=u&&(x=Math.min(x,v-1)),g+1>=a&&(h=Math.max(h,v+1))}d++};if(r)(function v(){setTimeout(function(){if(d>p||Date.now()>f)return r(void 0);y()||v()},0)})();else for(;d<=p&&Date.now()<=f;){let v=y();if(v)return v}}addToPath(t,n,i,r,o){let s=t.lastComponent;return s&&!o.oneChangePerToken&&s.added===n&&s.removed===i?{oldPos:t.oldPos+r,lastComponent:{count:s.count+1,added:n,removed:i,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+r,lastComponent:{count:1,added:n,removed:i,previousComponent:s}}}extractCommon(t,n,i,r,o){let s=n.length,a=i.length,u=t.oldPos,d=u-r,p=0;for(;d+1<s&&u+1<a&&this.equals(i[u+1],n[d+1],o);)d++,u++,p++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return p&&!o.oneChangePerToken&&(t.lastComponent={count:p,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=u,d}equals(t,n,i){return i.comparator?i.comparator(t,n):t===n||!!i.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){let n=[];for(let i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,i){let r=[],o;for(;t;)r.push(t),o=t.previousComponent,delete t.previousComponent,t=o;r.reverse();let s=r.length,a=0,u=0,d=0;for(;a<s;a++){let p=r[a];if(p.removed)p.value=this.join(i.slice(d,d+p.count)),d+=p.count;else{if(!p.added&&this.useLongestToken){let l=n.slice(u,u+p.count);l=l.map(function(f,m){let g=i[d+m];return g.length>f.length?g:f}),p.value=this.join(l)}else p.value=this.join(n.slice(u,u+p.count));u+=p.count,p.added||(d+=p.count)}}return r}};function Dh(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function Rh(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Vc(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function Wc(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Fo(e,t){return Vc(e,t,"")}function Za(e,t){return Wc(e,t,"")}function Mh(e,t){return t.slice(0,gL(e,t))}function gL(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let i=t.length;e.length<t.length&&(i=e.length);let r=Array(i),o=0;r[0]=0;for(let s=1;s<i;s++){for(t[s]==t[o]?r[s]=r[o]:r[s]=o;o>0&&t[s]!=t[o];)o=r[o];t[s]==t[o]&&o++}o=0;for(let s=n;s<e.length;s++){for(;o>0&&e[s]!=t[o];)o=r[o];e[s]==t[o]&&o++}return o}function Lh(e,t){let n=[];for(let i of Array.from(t.segment(e))){let r=i.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(r)?n[n.length-1]+=r:n.push(r)}return n}function qc(e,t){if(t)return Zo(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function Oi(e,t){if(t)return Zo(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:""}function Zo(e,t){if(!t)return[Oi(e),qc(e)];if(t.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');let n=Lh(e,t),i=n[0],r=n[n.length-1],o=/\s/.test(i)?i:"",s=/\s/.test(r)?r:"";return[o,s]}var Bc="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",hL=new RegExp(`[${Bc}]+|\\s+|[^${Bc}]`,"ug"),jh=class extends Qr{equals(t,n,i){return i.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),t.trim()===n.trim()}tokenize(t,n={}){let i;if(n.intlSegmenter){let s=n.intlSegmenter;if(s.resolvedOptions().granularity!="word")throw new Error('The segmenter passed must have a granularity of "word"');i=Lh(t,s)}else i=t.match(hL)||[];let r=[],o=null;return i.forEach(s=>{/\s/.test(s)?o==null?r.push(s):r.push(r.pop()+s):o!=null&&/\s/.test(o)?r[r.length-1]==o?r.push(r.pop()+s):r.push(o+s):r.push(s),o=s}),r}join(t){return t.map((n,i)=>i==0?n:n.replace(/^\s+/,"")).join("")}postProcess(t,n){if(!t||n.oneChangePerToken)return t;let i=null,r=null,o=null;return t.forEach(s=>{s.added?r=s:s.removed?o=s:((r||o)&&_E(i,o,r,s,n.intlSegmenter),i=s,r=null,o=null)}),(r||o)&&_E(i,o,r,null,n.intlSegmenter),t}},kE=new jh;function Fh(e,t,n){return(n==null?void 0:n.ignoreWhitespace)!=null&&!n.ignoreWhitespace?IE(e,t,n):kE.diff(e,t,n)}function _E(e,t,n,i,r){if(t&&n){let[o,s]=Zo(t.value,r),[a,u]=Zo(n.value,r);if(e){let d=Dh(o,a);e.value=Wc(e.value,a,d),t.value=Fo(t.value,d),n.value=Fo(n.value,d)}if(i){let d=Rh(s,u);i.value=Vc(i.value,u,d),t.value=Za(t.value,d),n.value=Za(n.value,d)}}else if(n){if(e){let o=Oi(n.value,r);n.value=n.value.substring(o.length)}if(i){let o=Oi(i.value,r);i.value=i.value.substring(o.length)}}else if(e&&i){let o=Oi(i.value,r),[s,a]=Zo(t.value,r),u=Dh(o,s);t.value=Fo(t.value,u);let d=Rh(Fo(o,u),a);t.value=Za(t.value,d),i.value=Vc(i.value,o,d),e.value=Wc(e.value,o,o.slice(0,o.length-d.length))}else if(i){let o=Oi(i.value,r),s=qc(t.value,r),a=Mh(s,o);t.value=Za(t.value,a)}else if(e){let o=qc(e.value,r),s=Oi(t.value,r),a=Mh(o,s);t.value=Fo(t.value,a)}}var Uh=class extends Qr{tokenize(t){let n=new RegExp(`(\\r?\\n)|[${Bc}]+|[^\\S\\n\\r]+|[^${Bc}]`,"ug");return t.match(n)||[]}},bE=new Uh;function IE(e,t,n){return bE.diff(e,t,n)}var Zh=class extends Qr{constructor(){super(...arguments),this.tokenize=yL}equals(t,n,i){return i.ignoreWhitespace?((!i.newlineIsToken||!t.includes(`
101
+ `))&&(t=t.trim()),(!i.newlineIsToken||!n.includes(`
102
+ `))&&(n=n.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(t.endsWith(`
103
+ `)&&(t=t.slice(0,-1)),n.endsWith(`
104
+ `)&&(n=n.slice(0,-1))),super.equals(t,n,i)}},vL=new Zh;function Vh(e,t,n){return vL.diff(e,t,n)}function yL(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
105
+ `));let n=[],i=e.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let r=0;r<i.length;r++){let o=i[r];r%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}function Wh(e,t,n,i,r,o,s){let a;s?typeof s=="function"?a={callback:s}:a=s:a={},typeof a.context=="undefined"&&(a.context=4);let u=a.context;if(a.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(a.callback){let{callback:p}=a;Vh(n,i,Object.assign(Object.assign({},a),{callback:l=>{let f=d(l);p(f)}}))}else return d(Vh(n,i,a));function d(p){if(!p)return;p.push({value:"",lines:[]});function l(v){return v.map(function(S){return" "+S})}let f=[],m=0,g=0,h=[],x=1,y=1;for(let v=0;v<p.length;v++){let S=p[v],w=S.lines||SL(S.value);if(S.lines=w,S.added||S.removed){if(!m){let $=p[v-1];m=x,g=y,$&&(h=u>0?l($.lines.slice(-u)):[],m-=h.length,g-=h.length)}for(let $ of w)h.push((S.added?"+":"-")+$);S.added?y+=w.length:x+=w.length}else{if(m)if(w.length<=u*2&&v<p.length-2)for(let $ of l(w))h.push($);else{let $=Math.min(w.length,u);for(let I of l(w.slice(0,$)))h.push(I);let _={oldStart:m,oldLines:x-m+$,newStart:g,newLines:y-g+$,lines:h};f.push(_),m=0,g=0,h=[]}x+=w.length,y+=w.length}}for(let v of f)for(let S=0;S<v.lines.length;S++)v.lines[S].endsWith(`
106
+ `)?v.lines[S]=v.lines[S].slice(0,-1):(v.lines.splice(S+1,0,"\"),S++);return{oldFileName:e,newFileName:t,oldHeader:r,newHeader:o,hunks:f}}}function SL(e){let t=e.endsWith(`
107
+ `),n=e.split(`
108
+ `).map(i=>i+`
109
+ `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var ve=H(fe()),{useState:EE,useMemo:PE}=Va,zE=Va.memo(function({content:t,plugin:n,terminalClient:i,onApprovePermission:r}){let{kind:o,title:s,status:a,permissionRequest:u,locations:d,rawInput:p,content:l}=t,[f,m]=EE(u==null?void 0:u.selectedOptionId);Va.useEffect(()=>{(u==null?void 0:u.selectedOptionId)!==f&&m(u==null?void 0:u.selectedOptionId)},[u==null?void 0:u.selectedOptionId]);let g=PE(()=>{let y=n.app.vault.adapter;return y instanceof TE.FileSystemAdapter?y.getBasePath():""},[n]),h=n.settings.displaySettings.showEmojis;return(0,ve.jsxs)("div",{className:"agent-client-message-tool-call",children:[(0,ve.jsxs)("div",{className:"agent-client-message-tool-call-header",children:[(0,ve.jsxs)("div",{className:"agent-client-message-tool-call-title",children:[h&&(0,ve.jsx)(Ln,{name:(y=>{switch(y){case"read":return"book-open";case"edit":return"pencil";case"delete":return"trash";case"move":return"folder-open";case"search":return"search";case"execute":return"square-terminal";case"think":return"message-circle-more";case"fetch":return"globe";case"switch_mode":return"arrow-left-right";default:return"hammer"}})(o),className:"agent-client-message-tool-call-icon"}),(0,ve.jsx)("span",{className:"agent-client-message-tool-call-title-text",children:s}),a!=="completed"&&(0,ve.jsx)(Ln,{name:a==="failed"?"x":"ellipsis",className:`agent-client-message-tool-call-status-icon agent-client-status-${a}`})]}),o==="execute"&&p&&typeof p.command=="string"&&(0,ve.jsx)("div",{className:"agent-client-message-tool-call-command",children:(0,ve.jsxs)("code",{children:[p.command,Array.isArray(p.args)&&p.args.length>0&&` ${p.args.join(" ")}`]})}),d&&d.length>0&&(0,ve.jsx)("div",{className:"agent-client-message-tool-call-locations",children:d.map((y,v)=>(0,ve.jsxs)("span",{className:"agent-client-message-tool-call-location",children:[AC(y.path,g),y.line!=null&&`:${y.line}`]},v))})]}),l&&l.map((y,v)=>y.type==="terminal"?(0,ve.jsx)(Zc,{terminalId:y.terminalId,terminalClient:i||null},v):y.type==="diff"?(0,ve.jsx)(kL,{diff:y,plugin:n,autoCollapse:n.settings.displaySettings.autoCollapseDiffs,collapseThreshold:n.settings.displaySettings.diffCollapseThreshold},v):null),u&&(0,ve.jsx)($E,{permissionRequest:{...u,selectedOptionId:f},onApprovePermission:r,onOptionSelected:m})]})});function CE(e){return e.oldText===null||e.oldText===void 0||e.oldText===""}function xL(e){return e.map(t=>({type:t.added?"added":t.removed?"removed":"context",value:t.value}))}function $L(e,t){let n=e.filter(i=>!(t==="removed"&&i.type==="added"||t==="added"&&i.type==="removed"));return(0,ve.jsx)(ve.Fragment,{children:n.map((i,r)=>i.type==="added"?(0,ve.jsx)("span",{className:"agent-client-diff-word-added",children:i.value},r):i.type==="removed"?(0,ve.jsx)("span",{className:"agent-client-diff-word-removed",children:i.value},r):(0,ve.jsx)("span",{children:i.value},r))})}var _L=3;function kL({diff:e,autoCollapse:t=!1,collapseThreshold:n=10}){let i=PE(()=>{if(CE(e))return e.newText.split(`
110
+ `).map((x,y)=>({type:"added",newLineNumber:y+1,content:x}));let p=e.oldText||"",l=Wh("old","new",p,e.newText,"","",{context:_L}),f=[],m=0,g=0;for(let h of l.hunks){l.hunks.length>1&&f.push({type:"context",content:`@@ -${h.oldStart},${h.oldLines} +${h.newStart},${h.newLines} @@`}),m=h.oldStart,g=h.newStart;for(let x of h.lines){let y=x[0],v=x.substring(1);y==="+"?f.push({type:"added",newLineNumber:g++,content:v}):y==="-"?f.push({type:"removed",oldLineNumber:m++,content:v}):f.push({type:"context",oldLineNumber:m++,newLineNumber:g++,content:v})}}for(let h=0;h<f.length-1;h++){let x=f[h],y=f[h+1];if(x.type==="removed"&&y.type==="added"){let v=Fh(x.content,y.content),S=xL(v);x.wordDiff=S,y.wordDiff=S}}return f},[e.oldText,e.newText]),r=(p,l)=>{if(p.type==="context"&&p.content.startsWith("@@"))return(0,ve.jsx)("div",{className:"agent-client-diff-hunk-header",children:p.content},l);let m="agent-client-diff-line";return p.type==="added"?m+=" agent-client-diff-line-added":p.type==="removed"?m+=" agent-client-diff-line-removed":m+=" agent-client-diff-line-context",(0,ve.jsx)("div",{className:m,children:(0,ve.jsx)("span",{className:"agent-client-diff-line-content",children:p.wordDiff&&(p.type==="added"||p.type==="removed")?$L(p.wordDiff,p.type):p.content})},l)},o=t&&i.length>n,[s,a]=EE(o),u=s?i.slice(0,n):i,d=i.length-n;return(0,ve.jsxs)("div",{className:"agent-client-tool-call-diff",children:[CE(e)?(0,ve.jsx)("div",{className:"agent-client-diff-line-info",children:"New file"}):null,(0,ve.jsx)("div",{className:"agent-client-tool-call-diff-content",children:u.map((p,l)=>r(p,l))}),o&&(0,ve.jsxs)("div",{className:"agent-client-diff-expand-bar",onClick:()=>a(!s),children:[(0,ve.jsx)("span",{className:"agent-client-diff-expand-text",children:s?`${d} more lines`:"Collapse"}),(0,ve.jsx)(Ln,{name:s?"chevron-right":"chevron-up",className:"agent-client-diff-expand-icon"})]})]})}var me=H(fe()),{useState:DE,useCallback:AE}=qh;function NE({text:e,plugin:t,autoMentionContext:n}){let i=/@\[\[([^\]]+)\]\]/g,r=[];if(n){let a=n.selection?`@${n.noteName}:${n.selection.fromLine}-${n.selection.toLine}`:`@${n.noteName}`;r.push((0,me.jsx)("span",{className:"agent-client-text-mention",onClick:()=>{t.app.workspace.openLinkText(n.notePath,"")},children:a},"auto-mention")),r.push(`
111
+ `)}let o=0,s;for(;(s=i.exec(e))!==null;){s.index>o&&r.push(e.slice(o,s.index));let a=s[1],u=t.app.vault.getMarkdownFiles().find(d=>d.basename===a);u?r.push((0,me.jsxs)("span",{className:"agent-client-text-mention",onClick:()=>{t.app.workspace.openLinkText(u.path,"")},children:["@",a]},s.index)):r.push(`@${a}`),o=s.index+s[0].length}return o<e.length&&r.push(e.slice(o)),(0,me.jsx)("div",{className:"agent-client-text-with-mentions",children:r})}function bL({text:e,plugin:t}){let[n,i]=DE(!1),r=t.settings.displaySettings.showEmojis;return(0,me.jsxs)("div",{className:"agent-client-collapsible-thought",onClick:()=>i(!n),children:[(0,me.jsxs)("div",{className:"agent-client-collapsible-thought-header",children:[r&&(0,me.jsx)(Ln,{name:"lightbulb",className:"agent-client-collapsible-thought-label-icon"}),"Thinking",(0,me.jsx)(Ln,{name:n?"chevron-down":"chevron-right",className:"agent-client-collapsible-thought-icon"})]}),n&&(0,me.jsx)("div",{className:"agent-client-collapsible-thought-content",children:(0,me.jsx)(Th,{text:e,plugin:t})})]})}function OE({content:e,plugin:t,messageRole:n,terminalClient:i,onApprovePermission:r}){switch(e.type){case"text":return n==="user"?(0,me.jsx)(NE,{text:e.text,plugin:t}):(0,me.jsx)(Th,{text:e.text,plugin:t});case"text_with_context":return(0,me.jsx)(NE,{text:e.text,autoMentionContext:e.autoMentionContext,plugin:t});case"agent_thought":return(0,me.jsx)(bL,{text:e.text,plugin:t});case"tool_call":return(0,me.jsx)(zE,{content:e,plugin:t,terminalClient:i,onApprovePermission:r});case"plan":{let o=t.settings.displaySettings.showEmojis;return(0,me.jsxs)("div",{className:"agent-client-message-plan",children:[(0,me.jsxs)("div",{className:"agent-client-message-plan-title",children:[o&&(0,me.jsx)(Ln,{name:"list-checks",className:"agent-client-message-plan-label-icon"}),"Plan"]}),e.entries.map((s,a)=>(0,me.jsxs)("div",{className:`agent-client-message-plan-entry agent-client-plan-status-${s.status}`,children:[o&&(0,me.jsx)("span",{className:`agent-client-message-plan-entry-icon agent-client-status-${s.status}`,children:(0,me.jsx)(Ln,{name:s.status==="completed"?"check":s.status==="in_progress"?"loader":"circle"})})," ",s.content]},a))]})}case"terminal":return(0,me.jsx)(Zc,{terminalId:e.terminalId,terminalClient:i||null});case"image":return(0,me.jsx)("div",{className:"agent-client-message-image",children:(0,me.jsx)("img",{src:`data:${e.mimeType};base64,${e.data}`,alt:"Attached image",className:"agent-client-message-image-thumbnail"})});case"resource_link":return(0,me.jsxs)("div",{className:"agent-client-message-resource-link",children:[(0,me.jsx)("span",{className:"agent-client-message-resource-link-icon",ref:o=>{o&&(0,Bh.setIcon)(o,"file")}}),(0,me.jsx)("span",{className:"agent-client-message-resource-link-name",children:e.name})]});default:return(0,me.jsx)("span",{children:"Unsupported content type"})}}function IL(e){return e.filter(t=>t.type==="text"||t.type==="text_with_context").map(t=>"text"in t?t.text:"").join(`
112
+ `)}function CL({contents:e}){let[t,n]=DE(!1),i=AE(()=>{let o=IL(e);o&&navigator.clipboard.writeText(o).then(()=>{n(!0),window.setTimeout(()=>n(!1),2e3)}).catch(()=>{})},[e]),r=AE(o=>{o&&(0,Bh.setIcon)(o,t?"check":"copy")},[t]);return(0,me.jsx)("button",{className:"clickable-icon agent-client-message-action-button",onClick:i,"aria-label":"Copy message",ref:r})}function EL(e){let t=[],n=[];for(let i of e)i.type==="image"||i.type==="resource_link"?n.push(i):(n.length>0&&(t.push({type:"attachments",items:n}),n=[]),t.push({type:"single",item:i}));return n.length>0&&t.push({type:"attachments",items:n}),t}var RE=qh.memo(function({message:t,plugin:n,terminalClient:i,onApprovePermission:r}){let o=EL(t.content);return(0,me.jsxs)("div",{className:`agent-client-message-renderer ${t.role==="user"?"agent-client-message-user":"agent-client-message-assistant"}`,children:[o.map((s,a)=>s.type==="attachments"?(0,me.jsx)("div",{className:"agent-client-message-images-strip",children:s.items.map((u,d)=>(0,me.jsx)(OE,{content:u,plugin:n,messageRole:t.role,terminalClient:i,onApprovePermission:r},d))},a):(0,me.jsx)("div",{children:(0,me.jsx)(OE,{content:s.item,plugin:n,messageRole:t.role,terminalClient:i,onApprovePermission:r})},a)),t.content.some(s=>(s.type==="text"||s.type==="text_with_context")&&s.text)&&(0,me.jsx)("div",{className:"agent-client-message-actions",children:(0,me.jsx)(CL,{contents:t.content})})]})});var ei=H(Se(),1),BE=H(ih(),1);function ME(e,t,n){let i=new Array(e);return new Proxy(i,{get(r,o,s){if(typeof o=="string"){let a=o.charCodeAt(0);if(a>=48&&a<=57){let u=+o;if(Number.isInteger(u)&&u>=0&&u<e){let d=r[u];if(!d){let p=t[u*2];d=r[u]={index:u,key:n(u),start:p,size:t[u*2+1],end:p+t[u*2+1],lane:0}}return d}}if(o==="length")return e}return Reflect.get(r,o,s)}})}function Di(e,t,n){var a;let i=(a=n.initialDeps)!=null?a:[],r,o=!0;function s(){var u;let p=0,l=e();if(!(l.length!==i.length||l.some((g,h)=>i[h]!==g)))return r;i=l;let m=0;return r=t(...l),n!=null&&n.onChange&&!(o&&n.skipInitialOnChange)&&n.onChange(r),o=!1,r}return s.updateDeps=u=>{i=u},s}function Hh(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}var Gh=(e,t)=>Math.abs(e-t)<1.01,LE=(e,t,n)=>{let i;return function(...r){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,r),n)}};var Wa,jE=()=>{if(Wa!==void 0)return Wa;if(typeof navigator=="undefined")return Wa=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Wa=!0;let e=navigator.maxTouchPoints;return Wa=navigator.platform==="MacIntel"&&e!==void 0&&e>0};var UE=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},PL=e=>e,TL=e=>{let t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=new Array(i);for(let o=0;o<i;o++)r[o]=t+o;return r},FE=(e,t)=>{let n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let r=s=>{let{width:a,height:u}=s;t({width:Math.round(a),height:Math.round(u)})};if(r(UE(n)),!i.ResizeObserver)return()=>{};let o=new i.ResizeObserver(s=>{let a=()=>{let u=s[0];if(u!=null&&u.borderBoxSize){let d=u.borderBoxSize[0];if(d){r({width:d.inlineSize,height:d.blockSize});return}}r(UE(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},Hc={passive:!0};var zL=typeof window=="undefined"?!0:"onscrollend"in window,AL=(e,t,n)=>{let i=e.scrollElement;if(!i)return;let r=e.targetWindow;if(!r)return;let o=e.options.useScrollendEvent&&zL,s=0,a=o?null:LE(r,()=>t(s,!1),e.options.isScrollingResetDelay),u=l=>()=>{s=n(i),a==null||a(),t(s,l)},d=u(!0),p=u(!1);return i.addEventListener("scroll",d,Hc),o&&i.addEventListener("scrollend",p,Hc),()=>{i.removeEventListener("scroll",d),o&&i.removeEventListener("scrollend",p)}},ZE=(e,t)=>AL(e,t,n=>{let{horizontal:i,isRtl:r}=e.options;return i?n.scrollLeft*(r&&-1||1):n.scrollTop});var NL=(e,t,n)=>{if(t!=null&&t.borderBoxSize){let i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},OL=(e,{adjustments:t=0,behavior:n},i)=>{var r,o;(o=(r=i.scrollElement)==null?void 0:r.scrollTo)==null||o.call(r,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})};var VE=OL,Gc=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var o;var n,i,r;return(o=(r=(i=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:i.now)==null?void 0:r.call(i))!=null?o:Date.now()},this.observer=(()=>{let n=null,i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(o=>{let s=()=>{let a=o.target,u=this.indexFromElement(a);if(!a.isConnected){this.observer.unobserve(a);for(let[d,p]of this.elementsCache)if(p===a){this.elementsCache.delete(d);break}return}this.shouldMeasureDuringScroll(u)&&this.resizeItem(u,this.options.measureElement(a,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s):s()})}));return{disconnect:()=>{var r;(r=i())==null||r.disconnect(),n=null},observe:r=>{var o;return(o=i())==null?void 0:o.observe(r,{box:"border-box"})},unobserve:r=>{var o;return(o=i())==null?void 0:o.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{var d,p,l,f,m;var i,r;let o={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:PL,rangeExtractor:TL,onChange:()=>{},measureElement:NL,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate"};for(let g in n){let h=n[g];h!==void 0&&(o[g]=h)}let s=this.options,a=null,u=null;if(s!==void 0&&s.enabled&&o.enabled&&o.anchorTo==="end"&&this.scrollElement!==null){let g=s.count,h=o.count,x=this.getMeasurements(),y=g>0?(d=(i=x[0])==null?void 0:i.key)!=null?d:s.getItemKey(0):null,v=g>0?(p=(r=x[g-1])==null?void 0:r.key)!=null?p:s.getItemKey(g-1):null;if(h!==g||g>0&&h>0&&(o.getItemKey(0)!==y||o.getItemKey(h-1)!==v)){let $=g>0?(l=this.getVirtualItemForOffset(this.getScrollOffset()))!=null?l:x[0]:null;$&&(a=[$.key,this.getScrollOffset()-$.start]);let _=o.followOnAppend===!0?"auto":o.followOnAppend||null;_&&h>g&&this.isAtEnd(s.scrollEndThreshold)&&(g===0||o.getItemKey(h-1)!==v)&&(u=_)}}this.options=o,(a||u)&&(this.pendingScrollAnchor=[(f=a==null?void 0:a[0])!=null?f:null,(m=a==null?void 0:a[1])!=null?m:0,u])},this.notify=n=>{var i,r;(r=(i=this.options).onChange)==null||r.call(i,this,n)},this.maybeNotify=Di(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;var n;let i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}if(this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(o=(n=this.scrollElement)==null?void 0:n.window)!=null?o:null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this._intendedScrollOffset!==null&&Math.abs(s-this._intendedScrollOffset)<1.5&&(s=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let s=this.scrollElement,a=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},u=()=>{this._iosTouching=!1,!(!jE()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};s.addEventListener("touchstart",a,Hc),s.addEventListener("touchend",u,Hc),this.unsubs.push(()=>{s.removeEventListener("touchstart",a),s.removeEventListener("touchend",u),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let r=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,r&&this.scrollElement&&this.options.enabled){let[s,a,u]=r;if(s!==null){let{count:d,getItemKey:p}=this.options,l=0;for(;l<d&&p(l)!==s;)l++;let f=l<d?this.getMeasurements()[l]:void 0;if(f){let m=f.start+a-this.getScrollOffset();Gh(m,0)||this.applyScrollAdjustment(m)}}u&&this.scrollToEnd({behavior:u})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let n=this.getScrollOffset(),i=this.getMaxScrollOffset();if(n<0||n>i)return;let r=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=r,behavior:void 0})},this.rafId=null,this.getSize=()=>{var n;return this.options.enabled?(this.scrollRect=(n=this.scrollRect)!=null?n:this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0)},this.getScrollOffset=()=>{var n;return this.options.enabled?(this.scrollOffset=(n=this.scrollOffset)!=null?n:typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.scrollOffset):(this.scrollOffset=null,0)},this.getFurthestMeasurement=(n,i)=>{let r=new Map,o=new Map;for(let s=i-1;s>=0;s--){let a=n[s];if(r.has(a.lane))continue;let u=o.get(a.lane);if(u==null||a.end>u.end?o.set(a.lane,a):a.end<u.end&&r.set(a.lane,!0),r.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((s,a)=>s.end===a.end?s.index-a.index:s.end-a.end)[0]:void 0},this.getMeasurementOptions=Di(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(n,i,r,o,s,a,u)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:n,paddingStart:i,scrollMargin:r,getItemKey:o,enabled:s,lanes:a,laneAssignmentMode:u}),{key:!1}),this.getMeasurements=Di(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:i,scrollMargin:r,getItemKey:o,enabled:s,lanes:a,laneAssignmentMode:u},d)=>{var g;let p=this.itemSizeCache;if(!s)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(let h of this.laneAssignments.keys())h>=n&&this.laneAssignments.delete(h);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));let l=this.lanesSettling?0:(g=this.pendingMin)!=null?g:0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),a===1){let h=this.options.gap,x=n*2,y=this._flatMeasurements;if(!y||y.length<x){let w=new Float64Array(x);y&&l>0&&w.set(y.subarray(0,l*2)),y=w,this._flatMeasurements=y}let v;if(l===0)v=i+r;else{let w=l-1;v=y[w*2]+y[w*2+1]+h}for(let w=l;w<n;w++){let $=o(w),_=p.get($),I=typeof _=="number"?_:this.options.estimateSize(w);y[w*2]=v,y[w*2+1]=I,v+=I+h}let S=ME(n,y,o);return this.measurementsCache=S,S}let f=this.measurementsCache.slice(0,l),m=new Array(a).fill(void 0);for(let h=0;h<l;h++){let x=f[h];x&&(m[x.lane]=h)}for(let h=l;h<n;h++){let x=o(h),y=this.laneAssignments.get(h),v,S,w=u==="estimate"||p.has(x);if(y!==void 0&&this.options.lanes>1){v=y;let b=m[v],T=b!==void 0?f[b]:void 0;S=T?T.end+this.options.gap:i+r}else{let b=this.options.lanes===1?f[h-1]:this.getFurthestMeasurement(f,h);S=b?b.end+this.options.gap:i+r,v=b?b.lane:h%this.options.lanes,this.options.lanes>1&&w&&this.laneAssignments.set(h,v)}let $=p.get(x),_=typeof $=="number"?$:this.options.estimateSize(h),I=S+_;f[h]={index:h,start:S,size:_,end:I,key:x,lane:v},m[v]=h}return this.measurementsCache=f,f},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Di(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,r,o)=>this.range=n.length>0&&i>0?DL({measurements:n,outerSize:i,scrollOffset:r,lanes:o,flat:o===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Di(()=>{let n=null,i=null,r=this.calculateRange();return r&&(n=r.startIndex,i=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,r,o,s)=>o===null||s===null?[]:n({startIndex:o,endIndex:s,overscan:i,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{let i=this.options.indexAttribute,r=n.getAttribute(i);return r?parseInt(r,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var o;var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;let r=(o=this.scrollState.index)!=null?o:(i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index;if(r!==void 0&&this.range){let s=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,r-s),u=Math.min(this.options.count-1,r+s);return n>=a&&n<=u}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((s,a)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(a))});return}let i=this.indexFromElement(n),r=this.options.getItemKey(i),o=this.elementsCache.get(r);o!==n&&(o&&this.observer.unobserve(o),this.observer.observe(n),this.elementsCache.set(r,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,i)=>{var f,m;var r,o;if(n<0||n>=this.options.count)return;let s,a,u,d=this._flatMeasurements;if(this.options.lanes===1&&d!==null)u=this.options.getItemKey(n),a=d[n*2],s=d[n*2+1];else{let g=this.measurementsCache[n];if(!g)return;u=g.key,a=g.start,s=g.size}let p=(f=this.itemSizeCache.get(u))!=null?f:s,l=i-p;if(l!==0){let g=this.options.anchorTo==="end"&&((r=this.scrollState)==null?void 0:r.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,h=g?this.getTotalSize():0,x=((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange((m=this.measurementsCache[n])!=null?m:{index:n,key:u,start:a,size:s,end:a+s,lane:0},l,this):a<this.getScrollOffset()+this.scrollAdjustments&&this.scrollDirection!=="backward");(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(u,i),this.itemSizeCacheVersion++,g?this.applyScrollAdjustment(this.getTotalSize()-h):x&&this.applyScrollAdjustment(l),this.notify(!1)}},this.getVirtualItems=Di(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{let r=[];for(let o=0,s=n.length;o<s;o++){let a=n[o],u=i[a];r.push(u)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{let i=this.getMeasurements();if(i.length===0)return;let r=this._flatMeasurements,o=this.options.lanes===1&&r!=null,s=WE(0,i.length-1,o?a=>r[a*2]:a=>Hh(i[a]).start,n);return Hh(i[s])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,i,r=0)=>{if(!this.scrollElement)return 0;let o=this.getSize(),s=this.getScrollOffset();i==="auto"&&(i=n>=s+o?"end":"start"),i==="center"?n+=(r-o)/2:i==="end"&&(n-=o);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));let r=this.getSize(),o=this.getScrollOffset(),s=this.measurementsCache[n];if(!s)return;if(i==="auto")if(s.end>=o+r-this.options.scrollPaddingEnd)i="end";else if(s.start<=o+this.options.scrollPaddingStart)i="start";else return[o,i];if(i==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),i];let a=i==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,i,s.size),i]},this.scrollToOffset=(n,{align:i="start",behavior:r="auto"}={})=>{let o=this.getOffsetForAlignment(n,i),s=this.now();this.scrollState={index:null,align:i,behavior:r,startedAt:s,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:i="auto",behavior:r="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));let o=this.getOffsetForIndex(n,i);if(!o)return;let[s,a]=o,u=this.now();this.scrollState={index:n,align:a,behavior:r,startedAt:u,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:i="auto"}={})=>{let r=this.getScrollOffset()+n,o=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:o,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var o;var n;let i=this.getMeasurements(),r;if(i.length===0)r=this.options.paddingStart;else if(this.options.lanes===1){let s=i.length-1,a=this._flatMeasurements;a!=null?r=a[s*2]+a[s*2+1]:r=(o=(n=i[s])==null?void 0:n.end)!=null?o:0}else{let s=Array(this.options.lanes).fill(null),a=i.length-1;for(;a>=0&&s.some(u=>u===null);){let u=i[a];s[u.lane]===null&&(s[u.lane]=u.end),a--}r=Math.max(...s.filter(u=>u!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let n=[];if(this.itemSizeCache.size===0)return n;let i=this.getMeasurements();for(let r of i)r&&this.itemSizeCache.has(r.key)&&n.push({index:r.index,key:r.key,start:r.start,size:r.size,end:r.end,lane:r.lane});return n},this._scrollToOffset=(n,{adjustments:i,behavior:r})=>{this._intendedScrollOffset=n+(i!=null?i:0),this.options.scrollToFn(n,{behavior:r,adjustments:i},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){t!==0&&(jE()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=t:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;let n=5e3;if(this.now()-this.scrollState.startedAt>n){this.scrollState=null;return}let i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,r=i?i[0]:this.scrollState.lastTargetOffset,o=1,s=r!==this.scrollState.lastTargetOffset;if(!s&&Gh(r,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.getScrollOffset()!==r&&this._scrollToOffset(r,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){let a=this.getSize()||600,u=Math.abs(r-this.getScrollOffset()),d=this.scrollState.behavior==="smooth"&&u>a;this.scrollState.lastTargetOffset=r,d||(this.scrollState.behavior="auto"),this._scrollToOffset(r,{adjustments:void 0,behavior:d?"smooth":"auto"})}this.scheduleScrollReconcile()}},WE=(e,t,n,i)=>{for(;e<=t;){let r=(e+t)/2|0,o=n(r);if(o<i)e=r+1;else if(o>i)t=r-1;else return r}return e>0?e-1:0};function DL({measurements:e,outerSize:t,scrollOffset:n,lanes:i,flat:r}){let o=e.length-1,s=r?p=>r[p*2]:p=>e[p].start,a=r?p=>r[p*2]+r[p*2+1]:p=>e[p].end;if(e.length<=i)return{startIndex:0,endIndex:o};let u=WE(0,o,s,n),d=u;if(i===1)for(;d<o&&a(d)<n+t;)d++;else if(i>1){let p=Array(i).fill(0);for(;d<o&&p.some(f=>f<n+t);){let f=e[d];p[f.lane]=f.end,d++}let l=Array(i).fill(n+t);for(;u>=0&&l.some(f=>f>=n);){let f=e[u];l[f.lane]=f.start,u--}u=Math.max(0,u-u%i),d=Math.min(o,d+(i-1-d%i))}return{startIndex:u,endIndex:d}}var qE=typeof document!="undefined"?ei.useLayoutEffect:ei.useEffect;function RL({useFlushSync:e=!0,...t}){let n=ei.useReducer(o=>o+1,0)[1],i={...t,onChange:(o,s)=>{var a;e&&s?(0,BE.flushSync)(n):n(),(a=t.onChange)==null||a.call(t,o,s)}},[r]=ei.useState(()=>new Gc(i));return r.setOptions(i),qE(()=>r._didMount(),[]),qE(()=>r._willUpdate()),r}function HE(e){return RL({observeElementRect:FE,observeElementOffset:ZE,scrollToFn:VE,...e})}var Ge=H(fe()),{useRef:Jc,useState:LL,useEffect:Kc,useCallback:jL}=ML;function JE({messages:e,isSending:t,isSessionReady:n,isRestoringSession:i,agentLabel:r,plugin:o,view:s,terminalClient:a,onApprovePermission:u,hasActivePermission:d}){let p=Jc(null),[l,f]=LL(!0),m=Jc(!0),g=Jc(!1),h=HE({count:e.length,getScrollElement:()=>p.current,estimateSize:()=>80,overscan:5});h.shouldAdjustScrollPositionOnItemSizeChange=()=>m.current;let x=jL(()=>{let S=p.current;if(!S)return!0;let w=35,$=S.scrollTop+S.clientHeight>=S.scrollHeight-w;return m.current=$,f($),$},[]);Kc(()=>{e.length===0&&(f(!0),m.current=!0)},[e.length]);let y=Jc(!1);if(Kc(()=>{t&&!g.current&&(y.current=!0),g.current=t},[t]),Kc(()=>{if(e.length!==0){if(y.current){y.current=!1,window.requestAnimationFrame(()=>{h.scrollToIndex(e.length-1,{align:"end",behavior:"smooth"})});return}m.current&&window.requestAnimationFrame(()=>{h.scrollToIndex(e.length-1,{align:"end"})})}},[e,h]),Kc(()=>{let S=p.current;if(!S)return;let w=()=>{x()};s.registerDomEvent(S,"scroll",w),x()},[s,x]),e.length===0)return(0,Ge.jsx)("div",{ref:p,className:"agent-client-chat-view-messages",children:(0,Ge.jsx)("div",{className:"agent-client-chat-empty-state",children:i?"Restoring session...":n?`Start a conversation with ${r}...`:`Connecting to ${r}...`})});let v=h.getVirtualItems();return(0,Ge.jsxs)("div",{ref:p,className:"agent-client-chat-view-messages",children:[(0,Ge.jsx)("div",{className:"agent-client-virtual-list-inner",style:{height:h.getTotalSize(),position:"relative"},children:v.map(S=>{let w=e[S.index];return(0,Ge.jsx)("div",{ref:h.measureElement,"data-index":S.index,className:"agent-client-virtual-item",style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${S.start}px)`},children:(0,Ge.jsx)(RE,{message:w,plugin:o,terminalClient:a,onApprovePermission:u})},w.id)})}),(0,Ge.jsxs)("div",{className:`agent-client-loading-indicator ${t?"":"agent-client-hidden"}`,children:[(0,Ge.jsxs)("div",{className:"agent-client-loading-dots",children:[(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"}),(0,Ge.jsx)("div",{className:"agent-client-loading-dot"})]}),d&&(0,Ge.jsx)("span",{className:"agent-client-loading-status",children:"Waiting for permission..."})]}),!l&&(0,Ge.jsx)("button",{className:"agent-client-scroll-to-bottom",onClick:()=>{h.scrollToIndex(e.length-1,{align:"end",behavior:"smooth"})},ref:S=>{S&&(0,GE.setIcon)(S,"chevron-down")}})]})}var HL=H(Se()),$r=require("obsidian");var UL=H(Se()),Sr=H(fe()),{useRef:FL,useEffect:KE}=UL;function Jh({type:e,items:t,selectedIndex:n,onSelect:i,onClose:r}){let o=FL(null);if(KE(()=>{let a=d=>{o.current&&!o.current.contains(d.target)&&r()},u=activeDocument;return u.addEventListener("mousedown",a),()=>{u.removeEventListener("mousedown",a)}},[r]),KE(()=>{if(!o.current)return;let a=o.current.children[n];a==null||a.scrollIntoView({block:"nearest"})},[n]),t.length===0)return null;let s=(a,u)=>{let d=u===n,p=u<t.length-1;if(e==="mention"){let l=a;return(0,Sr.jsxs)("div",{className:`agent-client-mention-dropdown-item ${d?"agent-client-selected":""} ${p?"agent-client-has-border":""}`,onClick:()=>i(l),onMouseEnter:()=>{},children:[(0,Sr.jsx)("div",{className:"agent-client-mention-dropdown-item-name",children:l.name}),(0,Sr.jsx)("div",{className:"agent-client-mention-dropdown-item-path",children:l.path})]},`mention-${u}`)}else{let l=a;return(0,Sr.jsxs)("div",{className:`agent-client-mention-dropdown-item ${d?"agent-client-selected":""} ${p?"agent-client-has-border":""}`,onClick:()=>i(l),onMouseEnter:()=>{},children:[(0,Sr.jsxs)("div",{className:"agent-client-mention-dropdown-item-name",children:["/",l.name]}),(0,Sr.jsxs)("div",{className:"agent-client-mention-dropdown-item-path",children:[l.description,l.hint&&` (${l.hint})`]})]},`command-${u}`)}};return(0,Sr.jsx)("div",{ref:o,className:"agent-client-mention-dropdown",children:t.map((a,u)=>s(a,u))})}var ZL=H(Se()),XE=require("obsidian");var jn=H(fe()),{useEffect:VL}=ZL;function Xc({errorInfo:e,onClose:t,showEmojis:n,view:i,variant:r="error"}){return VL(()=>{let o=s=>{s.key==="Escape"&&(t(),s.preventDefault())};i.registerDomEvent(activeDocument,"keydown",o)},[t,i]),(0,jn.jsxs)("div",{className:`agent-client-error-overlay agent-client-error-overlay--${r}`,children:[(0,jn.jsxs)("div",{className:"agent-client-error-overlay-header",children:[(0,jn.jsx)("h4",{className:"agent-client-error-overlay-title",children:e.title}),(0,jn.jsx)("button",{className:"agent-client-error-overlay-close",onClick:t,"aria-label":"Close",type:"button",ref:o=>{o&&(0,XE.setIcon)(o,"x")}})]}),(0,jn.jsx)("p",{className:"agent-client-error-overlay-message",children:e.message}),e.suggestion&&(0,jn.jsxs)("div",{className:"agent-client-error-overlay-suggestion",children:[n&&r==="error"&&(0,jn.jsx)(Ln,{name:"circle-alert",className:"agent-client-error-overlay-suggestion-icon"}),r!=="error"?(0,jn.jsx)("code",{className:"agent-client-error-overlay-code",children:e.suggestion}):e.suggestion]}),e.link&&(0,jn.jsx)("a",{className:"agent-client-error-overlay-link",href:e.link.url,target:"_blank",rel:"noopener noreferrer",children:e.link.text})]})}var Kh=require("obsidian"),wr=H(fe());function YE({files:e,onRemove:t}){return e.length===0?null:(0,wr.jsx)("div",{className:"agent-client-attachment-preview-strip",children:e.map(n=>{var i;return(0,wr.jsxs)("div",{className:"agent-client-attachment-preview-item",children:[n.kind==="image"&&n.data?(0,wr.jsx)("img",{src:`data:${n.mimeType};base64,${n.data}`,alt:"Attached image",className:"agent-client-attachment-preview-thumbnail"}):(0,wr.jsxs)("div",{className:"agent-client-attachment-preview-file",children:[(0,wr.jsx)("span",{className:"agent-client-attachment-preview-file-icon",ref:r=>{r&&(0,Kh.setIcon)(r,"file")}}),(0,wr.jsx)("span",{className:"agent-client-attachment-preview-file-name",children:(i=n.name)!=null?i:"file"})]}),(0,wr.jsx)("button",{className:"agent-client-attachment-preview-remove",onClick:()=>t(n.id),title:"Remove attachment",type:"button",ref:r=>{r&&(0,Kh.setIcon)(r,"x")}})]},n.id)})})}var WL=H(Se()),ti=require("obsidian");var At=H(fe()),{useRef:xr,useEffect:qa,useCallback:qL}=WL;function QE(e,t,n,i){let r=xr(null);qa(()=>{let o=e.current;if(o){if(!t||t.length<=1){r.current&&(o.empty(),r.current=null);return}if(!r.current){let s=new ti.DropdownComponent(o);r.current=s;for(let a of t)s.addOption(a.value,a.label);n&&s.setValue(n),s.onChange(a=>{var u;(u=i.current)==null||u.call(i,a)})}return()=>{r.current&&(o.empty(),r.current=null)}}},[t,e,i,n]),qa(()=>{r.current&&n&&r.current.setValue(n)},[n])}function Yc(e){if(e<1e3)return String(e);let t=e/1e3;return t>=100?`${Math.round(t)}K`:`${t.toFixed(1)}K`}function BL(e){return e>=90?"agent-client-usage-danger":e>=80?"agent-client-usage-warning":e>=70?"agent-client-usage-caution":"agent-client-usage-normal"}function eP({isSending:e,isButtonDisabled:t,hasContent:n,onSendOrStop:i,modes:r,onModeChange:o,models:s,onModelChange:a,configOptions:u,onConfigOptionChange:d,usage:p,isSessionReady:l}){var I,b,T,A,U,Z;let f=xr(null),m=xr(null),g=xr(null),h=xr(null),x=xr(new Map),y=xr(o);y.current=o;let v=xr(a);v.current=a;let S=xr(d);S.current=d;let w=qL(R=>{R.classList.remove("agent-client-icon-sending","agent-client-icon-active","agent-client-icon-inactive"),e?R.classList.add("agent-client-icon-sending"):R.classList.add(n?"agent-client-icon-active":"agent-client-icon-inactive")},[e,n]);qa(()=>{if(f.current){let R=e?"square":"send-horizontal";(0,ti.setIcon)(f.current,R);let V=f.current.querySelector("svg");V&&w(V)}},[e,w]),qa(()=>{if(f.current){let R=f.current.querySelector("svg");R&&w(R)}},[w]);let $=(I=r==null?void 0:r.availableModes)==null?void 0:I.map(R=>({value:R.id,label:R.name}));QE(m,$,r==null?void 0:r.currentModeId,y);let _=(b=s==null?void 0:s.availableModels)==null?void 0:b.map(R=>({value:R.modelId,label:R.name}));return QE(g,_,s==null?void 0:s.currentModelId,v),qa(()=>{var V;let R=h.current;if(R&&(R.empty(),x.current.clear(),!(!u||u.length===0))){for(let C of u){let L=Lo(C.options);if(L.length<=1)continue;let E=C.category?`agent-client-config-selector-${C.category}`:"agent-client-config-selector",z=R.createDiv({cls:`agent-client-config-selector ${E}`,attr:{title:(V=C.description)!=null?V:C.name}}),F=z.createDiv(),G=new ti.DropdownComponent(F);if(C.options.length>0&&"group"in C.options[0])for(let he of C.options)for(let Ze of he.options)G.addOption(Ze.value,`${he.name} / ${Ze.name}`);else for(let he of L)G.addOption(he.value,he.name);G.setValue(C.currentValue);let re=C.id;G.onChange(he=>{S.current&&S.current(re,he)});let Ce=z.createSpan({cls:"agent-client-config-selector-icon"});(0,ti.setIcon)(Ce,"chevron-down"),x.current.set(C.id,G)}return()=>{R.empty(),x.current.clear()}}},[u]),(0,At.jsxs)("div",{className:"agent-client-chat-input-actions",children:[p&&(0,At.jsxs)("span",{className:`agent-client-usage-indicator ${BL(Math.round(p.used/p.size*100))}`,"aria-label":p.cost?`${Yc(p.used)} / ${Yc(p.size)} tokens
113
+ $${p.cost.amount.toFixed(2)}`:`${Yc(p.used)} / ${Yc(p.size)} tokens`,children:[Math.round(p.used/p.size*100),"%"]}),u&&u.length>0?(0,At.jsx)("div",{ref:h,className:"agent-client-config-options-container"}):(0,At.jsxs)(At.Fragment,{children:[r&&r.availableModes.length>1&&(0,At.jsxs)("div",{className:"agent-client-mode-selector",title:(A=(T=r.availableModes.find(R=>R.id===r.currentModeId))==null?void 0:T.description)!=null?A:"Select mode",children:[(0,At.jsx)("div",{ref:m}),(0,At.jsx)("span",{className:"agent-client-mode-selector-icon",ref:R=>{R&&(0,ti.setIcon)(R,"chevron-down")}})]}),s&&s.availableModels.length>1&&(0,At.jsxs)("div",{className:"agent-client-model-selector",title:(Z=(U=s.availableModels.find(R=>R.modelId===s.currentModelId))==null?void 0:U.description)!=null?Z:"Select model",children:[(0,At.jsx)("div",{ref:g}),(0,At.jsx)("span",{className:"agent-client-model-selector-icon",ref:R=>{R&&(0,ti.setIcon)(R,"chevron-down")}})]})]}),(0,At.jsx)("button",{ref:f,onClick:i,disabled:t,className:`agent-client-chat-send-button ${e?"sending":""} ${t?"agent-client-disabled":""}`,title:l?e?"Stop generation":"Send message":"Connecting..."})]})}var Qe=H(fe()),{useRef:ed,useState:Xh,useEffect:Qc,useCallback:Ye,useMemo:GL}=HL,nP=5,JL=nP*1024*1024,Yh=10,tP=["image/png","image/jpeg","image/gif","image/webp"];function KL(e,t){let n=ed(-1),i=ed(null),r=GL(()=>e.filter(a=>a.role==="user").map(a=>{let u=a.content.find(d=>d.type==="text"||d.type==="text_with_context");return u&&"text"in u?u.text:""}).filter(a=>a.trim()!==""),[e]),o=Ye((a,u)=>{if(!u||a.nativeEvent.isComposing||r.length===0)return!1;if(n.current!==-1&&(a.key==="ArrowLeft"||a.key==="ArrowRight"||i.current!==null&&u.value!==i.current))return n.current=-1,i.current=null,!1;if(a.key==="ArrowUp"){if(u.value.trim()!==""&&n.current===-1)return!1;a.preventDefault();let d=n.current+1;if(d>=r.length)return!0;n.current=d;let p=r[r.length-1-d];return i.current=p,t(p),window.setTimeout(()=>{u.selectionStart=p.length,u.selectionEnd=p.length},0),!0}if(a.key==="ArrowDown"){let d=n.current;if(d===-1)return!1;a.preventDefault();let p=d-1;if(n.current=p,p===-1)i.current=null,t("");else{let l=r[r.length-1-p];i.current=l,t(l),window.setTimeout(()=>{u.selectionStart=l.length,u.selectionEnd=l.length},0)}return!0}return!1},[r,t]),s=Ye(()=>{n.current=-1,i.current=null},[]);return{handleHistoryKeyDown:o,resetHistory:s}}function rP({isSending:e,isSessionReady:t,isRestoringSession:n,agentLabel:i,availableCommands:r,autoMentionEnabled:o,restoredMessage:s,suggestions:a,plugin:u,view:d,onSendMessage:p,onStopGeneration:l,onRestoredMessageConsumed:f,modes:m,onModeChange:g,models:h,onModelChange:x,configOptions:y,onConfigOptionChange:v,usage:S,supportsImages:w=!1,agentId:$,inputValue:_,onInputChange:I,attachedFiles:b,onAttachedFilesChange:T,errorInfo:A,onClearError:U,agentUpdateNotification:Z,onClearAgentUpdate:R,geminiNotice:V,onClearGeminiNotice:C,messages:L}){var As;let{mentions:E,commands:z}=a,F=_e(),G=Xr(u),re=u.settings.displaySettings.showEmojis,Ce=(As=u.app.vault.getConfig("spellcheck"))!=null?As:!0,[he,Ze]=Xh(null),[kt,qe]=Xh(""),[ln,Te]=Xh(!1),{handleHistoryKeyDown:Zn,resetHistory:Ki}=KL(L,I),Kt=ed(null),gi=ed(0);Qc(()=>{T([])},[$,T]);let Xi=Ye(W=>{if(W.length===0)return;let te=Yh-b.length;if(te<=0){new $r.Notice(`[Agent Client] Maximum ${Yh} attachments allowed`);return}let ue=W.slice(0,te);ue.length<W.length&&new $r.Notice(`[Agent Client] Maximum ${Yh} attachments allowed`),T([...b,...ue])},[b,T]),ff=Ye(W=>{T(b.filter(te=>te.id!==W))},[b,T]),Ol=Ye(async W=>new Promise((te,ue)=>{let de=new FileReader;de.onload=()=>{let un=de.result.split(",")[1];te(un)},de.onerror=ue,de.readAsDataURL(W)}),[]),Yi=Ye(async W=>{let te=[];for(let ue of W){if(ue.size>JL){new $r.Notice(`[Agent Client] Image too large (max ${nP}MB)`);continue}try{let de=await Ol(ue);te.push({id:crypto.randomUUID(),kind:"image",data:de,mimeType:ue.type})}catch(de){console.error("Failed to convert image:",de),new $r.Notice("[Agent Client] Failed to attach image")}}return te},[Ol]),br=Ye(W=>{let{webUtils:te}=require("electron"),ue=[];for(let de of W){let st=te.getPathForFile(de);if(!st){new $r.Notice("[Agent Client] Could not determine file path");continue}ue.push({id:crypto.randomUUID(),kind:"file",mimeType:de.type||"application/octet-stream",name:de.name,path:st,size:de.size})}return ue},[]),mf=Ye(async W=>{var un;let te=(un=W.clipboardData)==null?void 0:un.items;if(!te)return;let ue=[],de=[];for(let cn of Array.from(te)){if(cn.kind!=="file")continue;let dn=cn.getAsFile();dn&&(tP.includes(cn.type)?ue.push(dn):de.push(dn))}if(ue.length===0&&de.length===0)return;W.preventDefault();let st=[];if(ue.length>0)if(w)st.push(...await Yi(ue));else{let cn=br(ue);cn.length>0?st.push(...cn):new $r.Notice("[Agent Client] This agent does not support image paste. Try drag & drop instead.")}de.length>0&&st.push(...br(de)),Xi(st)},[w,Yi,br,Xi]),Qi=Ye(W=>{var te;(te=W.dataTransfer)!=null&&te.types.includes("Files")&&(W.preventDefault(),W.dataTransfer.dropEffect="copy")},[]),Dl=Ye(W=>{var te;(te=W.dataTransfer)!=null&&te.types.includes("Files")&&(W.preventDefault(),gi.current++,gi.current===1&&Te(!0))},[]),gf=Ye(W=>{gi.current--,gi.current===0&&Te(!1)},[]),Es=Ye(async W=>{var cn;gi.current=0,Te(!1);let te=(cn=W.dataTransfer)==null?void 0:cn.files;if(!te||te.length===0)return;W.preventDefault();let ue=Array.from(te),de=[],st=[];for(let dn of ue)tP.includes(dn.type)?de.push(dn):(dn.type||dn.name)&&st.push(dn);let un=[];de.length>0&&(w?un.push(...await Yi(de)):un.push(...br(de))),st.length>0&&un.push(...br(st)),Xi(un)},[w,Yi,br,Xi]),Rl=Ye(W=>{I(W),window.setTimeout(()=>{let te=Kt.current;if(te){let ue=W.length;te.selectionStart=ue,te.selectionEnd=ue,te.focus()}},0)},[I]),Ps=Ye(W=>{let te=E.selectSuggestion(_,W);Rl(te)},[E,_,Rl]),Ts=Ye(W=>{let te=z.selectSuggestion(_,W);if(I(te),W.hint){let ue=`/${W.name} `;qe(ue),Ze(W.hint)}else Ze(null),qe("");window.setTimeout(()=>{let ue=Kt.current;if(ue){let de=W.hint?`/${W.name} `.length:te.length;ue.selectionStart=de,ue.selectionEnd=de,ue.focus()}},0)},[z,_,I]),eo=Ye(()=>{let W=Kt.current;if(W){W.classList.remove("agent-client-textarea-auto-height","agent-client-textarea-expanded"),W.classList.add("agent-client-textarea-auto-height");let te=W.scrollHeight,ue=80,st=Math.max(ue,Math.min(te,300));st>ue?(W.classList.add("agent-client-textarea-expanded"),W.style.setProperty("--textarea-height",`${st}px`)):W.style.removeProperty("--textarea-height"),W.classList.remove("agent-client-textarea-auto-height")}},[]),ar=Ye(async()=>{if(e){await l();return}if(!_.trim()&&b.length===0)return;let W=_.trim(),te=b.length>0?[...b]:void 0;I(""),T([]),Ze(null),qe(""),Ki(),await p(W,te)},[e,_,b,p,l,I,T,Ki]),hi=Ye(W=>{let te=z.isOpen,ue=E.isOpen;if(!te&&!ue)return!1;if(W.key==="ArrowDown")return W.preventDefault(),te?z.navigate("down"):E.navigate("down"),!0;if(W.key==="ArrowUp")return W.preventDefault(),te?z.navigate("up"):E.navigate("up"),!0;if(W.key==="Enter"||W.key==="Tab"){if(W.key==="Enter"&&W.nativeEvent.isComposing)return!1;if(W.preventDefault(),te){let de=z.suggestions[z.selectedIndex];de&&Ts(de)}else{let de=E.suggestions[E.selectedIndex];de&&Ps(de)}return!0}return W.key==="Escape"?(W.preventDefault(),te?z.close():E.close(),!0):!1},[z,E,Ts,Ps]),Ir=!e&&(_.trim()===""&&b.length===0||!t||n),hf=Ye(W=>{if(hi(W)||Zn(W,Kt.current))return;let te=W.metaKey||W.ctrlKey;W.key==="Enter"&&(!W.nativeEvent.isComposing||te)&&(G.sendMessageShortcut==="enter"?!W.shiftKey:te)&&(W.preventDefault(),!Ir&&!e&&ar())},[hi,Zn,e,Ir,ar,G.sendMessageShortcut]),vf=Ye(W=>{let te=W.target.value,ue=W.target.selectionStart||0;if(I(te),he){let de=kt+he;te!==de&&(Ze(null),qe(""))}E.updateSuggestions(te,ue),z.updateSuggestions(te,ue)},[F,he,kt,E,z,I]);Qc(()=>{eo()},[_,eo]),Qc(()=>{window.setTimeout(()=>{Kt.current&&Kt.current.focus()},0)},[]),Qc(()=>{s&&(_.trim()||(I(s),window.setTimeout(()=>{Kt.current&&(Kt.current.focus(),Kt.current.selectionStart=s.length,Kt.current.selectionEnd=s.length)},0)),f())},[s,f,_,I]);let zs=`Message ${i} - @ to mention notes${r.length>0?", / for commands":""}`;return(0,Qe.jsxs)("div",{className:"agent-client-chat-input-container",children:[A&&(0,Qe.jsx)(Xc,{errorInfo:A,onClose:U,showEmojis:re,view:d}),!A&&Z&&(0,Qe.jsx)(Xc,{errorInfo:Z,onClose:R,showEmojis:re,view:d,variant:Z.variant}),!A&&!Z&&V&&(0,Qe.jsx)(Xc,{errorInfo:V,onClose:C,showEmojis:re,view:d,variant:V.variant}),E.isOpen&&(0,Qe.jsx)(Jh,{type:"mention",items:E.suggestions,selectedIndex:E.selectedIndex,onSelect:Ps,onClose:E.close}),z.isOpen&&(0,Qe.jsx)(Jh,{type:"slash-command",items:z.suggestions,selectedIndex:z.selectedIndex,onSelect:Ts,onClose:z.close}),(0,Qe.jsxs)("div",{className:`agent-client-chat-input-box ${ln?"agent-client-dragging-over":""}`,onDragOver:Qi,onDragEnter:Dl,onDragLeave:gf,onDrop:W=>void Es(W),children:[o&&E.activeNote&&(0,Qe.jsxs)("button",{className:"agent-client-auto-mention-inline",onClick:()=>E.toggleAutoMention(!E.isAutoMentionDisabled),title:E.isAutoMentionDisabled?"Enable auto-mention":"Temporarily disable auto-mention",children:[(0,Qe.jsxs)("span",{className:`agent-client-mention-badge ${E.isAutoMentionDisabled?"agent-client-disabled":""}`,children:["@",E.activeNote.name,E.activeNote.selection&&(0,Qe.jsxs)("span",{className:"agent-client-selection-indicator",children:[":",E.activeNote.selection.from.line+1,"-",E.activeNote.selection.to.line+1]})]}),(0,Qe.jsx)("span",{className:"agent-client-auto-mention-toggle-icon",ref:W=>{if(W){let te=E.isAutoMentionDisabled?"plus":"x";(0,$r.setIcon)(W,te)}}})]}),(0,Qe.jsxs)("div",{className:"agent-client-textarea-wrapper",children:[(0,Qe.jsx)("textarea",{ref:Kt,value:_,onChange:vf,onKeyDown:hf,onPaste:W=>void mf(W),placeholder:zs,className:`agent-client-chat-input-textarea ${o&&E.activeNote?"has-auto-mention":""}`,rows:1,spellCheck:Ce}),he&&(0,Qe.jsxs)("div",{className:"agent-client-hint-overlay","aria-hidden":"true",children:[(0,Qe.jsx)("span",{className:"agent-client-invisible",children:kt}),(0,Qe.jsx)("span",{className:"agent-client-hint-text",children:he})]})]}),(0,Qe.jsx)(YE,{files:b,onRemove:ff}),(0,Qe.jsx)(eP,{isSending:e,isButtonDisabled:Ir,hasContent:_.trim()!==""||b.length>0,onSendOrStop:()=>void ar(),modes:m,onModeChange:g,models:h,onModelChange:x,configOptions:y,onConfigOptionChange:v,usage:S,isSessionReady:t})]})]})}var xt=H(fe()),{useState:Ba,useRef:Je,useEffect:sn,useMemo:Ha,useCallback:ni}=XL,YL=[];function td({variant:e,viewId:t,workingDirectory:n,initialAgentId:i,config:r,onRegisterCallbacks:o,onAgentIdChanged:s,onMinimize:a,onClose:u,onOpenNewWindow:d,onFloatingHeaderMouseDown:p,viewHost:l,containerEl:f}){var q$,B$;if(!bn.Platform.isDesktopApp)throw new Error("Agent Client is only available on desktop");let{plugin:m,acpClient:g,vaultService:h}=SC(),x=_e(),y=Ha(()=>{if(n)return n;let q=m.app.vault.adapter;return q instanceof bn.FileSystemAdapter?q.getBasePath():process.cwd()},[m,n]),[v,S]=Ba(y),w=Xr(m),$=mE(g,m.settingsService,h,v,i),{session:_,isReady:I,messages:b,isSending:T,errorInfo:A}=$,U=jC(h,m,_.availableCommands||YL),Z=ni((q,X,se,$e)=>{x.log(`[ChatPanel] Session loaded/resumed/forked: ${q}`,{modes:X,models:se,configOptions:$e}),$.updateSessionFromLoad(q,X,se,$e)},[x,$.updateSessionFromLoad]),R=gE({agentClient:g,session:_,settingsAccess:m.settingsService,cwd:y,agentCwd:v,onSessionLoad:Z,onMessagesRestore:$.setMessagesFromLocal,onIgnoreUpdates:$.setIgnoreUpdates,onClearMessages:$.clearMessages}),[V,C]=Ba(!1),[L,E]=Ba(""),[z,F]=Ba([]),G=Je(g),re=Ha(()=>{let q=_.agentId;if(q===m.settings.claude.id)return m.settings.claude.displayName||m.settings.claude.id;if(q===m.settings.codex.id)return m.settings.codex.displayName||m.settings.codex.id;if(q===m.settings.gemini.id)return m.settings.gemini.displayName||m.settings.gemini.id;let X=m.settings.customAgents.find(se=>se.id===q);return(X==null?void 0:X.displayName)||(X==null?void 0:X.id)||q},[_.agentId,m.settings]),Ce=Ha(()=>m.getAvailableAgents(),[m]),he=NC(m,$,R,U,_,b,w,y),{handleSendMessage:Ze,handleStopGeneration:kt,handleNewChat:qe,handleExportChat:ln,handleSwitchAgent:Te,handleRestartAgent:Zn,handleSetMode:Ki,handleSetModel:Kt,handleSetConfigOption:gi,handleClearError:Xi,handleClearAgentUpdate:ff,handleRestoredMessageConsumed:Ol,restoredMessage:Yi,agentUpdateNotification:br,setAgentUpdateNotification:mf,autoExportIfEnabled:Qi}=he,Dl=Ha(()=>_.agentId===m.settings.gemini.id?JC():null,[_.agentId,m.settings.gemini.id]),[gf,Es]=Ba(!1);sn(()=>{Es(!1)},[_.agentId]);let Rl=Dl&&!gf?Dl:null,Ps=ni(()=>Es(!0),[]),Ts=ni((q,X)=>(Es(!0),Ze(q,X)),[Ze]),{handleOpenHistory:eo}=CC(m,$,R,y,I,w.debugMode,S),ar=ni(async q=>{await qe(q),q&&(s==null||s(q))},[qe,s]),hi=ni(()=>{let q=m.app;q.setting.open(),q.setting.openTabById(m.manifest.id)},[m]),Ir=ni(async q=>{b.length>0&&await Qi("newChat",b,_),$.clearMessages(),S(q),await $.restartSession(void 0,q),R.invalidateCache()},[b,_,Qi,$.clearMessages,$.restartSession,R.invalidateCache]),hf=ni(q=>{let X=new bn.Menu;X.addItem(se=>{se.setTitle("Switch agent").setIsLabel(!0)});for(let se of Ce)X.addItem($e=>{$e.setTitle(se.displayName).setChecked(se.id===(_.agentId||"")).onClick(()=>{ar(se.id)})});X.addSeparator(),X.addItem(se=>{se.setTitle("Open new view").setIcon("copy-plus").onClick(()=>{m.openNewChatViewWithAgent(m.settings.defaultAgentId)})}),X.addItem(se=>{se.setTitle("Restart agent").setIcon("refresh-cw").onClick(()=>{Zn()})}),X.addItem(se=>{se.setTitle("New chat in directory...").setIcon("folder-open").onClick(()=>{new Ra(m.app,v,Cr=>{Ir(Cr)}).open()})}),X.addSeparator(),X.addItem(se=>{se.setTitle("Plugin settings").setIcon("settings").onClick(()=>{hi()})}),X.showAtMouseEvent(q.nativeEvent)},[Ce,_.agentId,ar,m,Zn,v,Ir,hi]),vf=ni(q=>{let X=new bn.Menu;X.addItem(se=>{se.setTitle("New chat").setIcon("plus").onClick(()=>{qe()})}),X.addItem(se=>{se.setTitle("Session history").setIcon("history").onClick(()=>{eo()})}),X.addItem(se=>{se.setTitle("Export chat to Markdown").setIcon("save").onClick(()=>{ln()})}),X.addSeparator(),d&&X.addItem(se=>{se.setTitle("Open new floating chat").setIcon("copy-plus").onClick(()=>{d()})}),X.addItem(se=>{se.setTitle("Restart agent").setIcon("refresh-cw").onClick(()=>{Zn()})}),X.addItem(se=>{se.setTitle("New chat in directory...").setIcon("folder-open").onClick(()=>{new Ra(m.app,v,Cr=>{Ir(Cr)}).open()})}),X.addSeparator(),X.addItem(se=>{se.setTitle("Plugin settings").setIcon("settings").onClick(()=>{hi()})}),X.showAtMouseEvent(q.nativeEvent)},[qe,eo,ln,d,Zn,v,Ir,hi]),zs=Je([]),As=Ha(()=>l||{app:m.app,registerDomEvent:(q,X,se)=>{q.addEventListener(X,se),zs.current.push({target:q,type:X,callback:se})}},[l,m.app]);sn(()=>()=>{for(let{target:q,type:X,callback:se}of zs.current)q.removeEventListener(X,se);zs.current=[]},[]),sn(()=>{x.log("[Debug] Starting connection setup via useSession..."),$.createSession((r==null?void 0:r.agent)||i)},[$.createSession,r==null?void 0:r.agent,i]),sn(()=>{if(!(!(r!=null&&r.model)||!I)){if(_.configOptions){let q=_.configOptions.find(X=>X.category==="model");q&&q.currentValue!==r.model&&Lo(q.options).some(se=>se.value===r.model)&&(x.log("[ChatPanel] Applying configured model via configOptions:",r.model),$.setConfigOption(q.id,r.model));return}_.models&&_.models.availableModels.some(X=>X.modelId===r.model)&&_.models.currentModelId!==r.model&&(x.log("[ChatPanel] Applying configured model:",r.model),$.setModel(r.model))}},[r==null?void 0:r.model,I,_.configOptions,_.models,$.setConfigOption,$.setModel,x]);let W=Je(b),te=Je(_),ue=Je(Qi),de=Je($.closeSession);W.current=b,te.current=_,ue.current=Qi,de.current=$.closeSession,sn(()=>()=>{x.log("[ChatPanel] Cleanup: auto-export and close session"),(async()=>(await ue.current("closeChat",W.current,te.current),await de.current()))()},[x]),sn(()=>{m.checkForUpdates().then(C).catch(q=>{x.error("Failed to check for updates:",q)})},[m,x]),sn(()=>{var q;!I||!((q=_.agentInfo)!=null&&q.name)||vE(_.agentInfo).then(mf).catch(X=>{x.error("Failed to check agent update:",X)})},[I,_.agentInfo,x]);let st=Je(!1);sn(()=>{let q=st.current;st.current=T,q&&!T&&_.sessionId&&b.length>0&&(R.saveSessionMessages(_.sessionId,b),x.log(`[ChatPanel] Session messages saved: ${_.sessionId}`),w.enableSystemNotifications&&!activeDocument.hasFocus()&&new Notification("Agent Client",{body:`${re} has completed the response.`}))},[T,_.sessionId,b,R.saveSessionMessages,w.enableSystemNotifications,re,x]);let un=Je(!1);sn(()=>{let q=un.current;un.current=$.hasActivePermission,!q&&$.hasActivePermission&&w.enableSystemNotifications&&!activeDocument.hasFocus()&&new Notification("Agent Client",{body:`${re} is requesting permission.`})},[$.hasActivePermission,w.enableSystemNotifications,re]),sn(()=>{let q=!0,X=async()=>{q&&await U.mentions.updateActiveNote()},se=h.subscribeSelectionChanges(()=>{X()});return X(),()=>{q=!1,se()}},[U.mentions.updateActiveNote,h]);let cn=Je(ar),dn=Je(qe),R$=Je($.approveActivePermission),M$=Je($.rejectActivePermission),yf=Je(kt),L$=Je(ln);cn.current=ar,dn.current=qe,R$.current=$.approveActivePermission,M$.current=$.rejectActivePermission,yf.current=kt,L$.current=ln,sn(()=>{let q=m.app.workspace,X=q,se=[X.on("agent-client:toggle-auto-mention",$e=>{$e&&$e!==t||U.mentions.toggleAutoMention()}),X.on("agent-client:new-chat-requested",($e,Cr)=>{$e&&$e!==t||(e==="sidebar"?cn.current(Cr):dn.current(Cr))}),X.on("agent-client:approve-active-permission",$e=>{$e&&$e!==t||(async()=>await R$.current()||new bn.Notice("[Agent Client] No active permission request"))()}),X.on("agent-client:reject-active-permission",$e=>{$e&&$e!==t||(async()=>await M$.current()||new bn.Notice("[Agent Client] No active permission request"))()}),X.on("agent-client:cancel-message",$e=>{$e&&$e!==t||yf.current()}),X.on("agent-client:export-chat",$e=>{$e&&$e!==t||L$.current()})];return()=>{for(let $e of se)q.offref($e)}},[m.app.workspace,m.lastActiveChatViewId,t,e,U.mentions.toggleAutoMention]);let j$=Je(null);sn(()=>{let q=()=>{m.setLastActiveChatViewId(t)},X=f!=null?f:j$.current;if(X)return X.addEventListener("focus",q,!0),X.addEventListener("click",q),m.setLastActiveChatViewId(t),()=>{X.removeEventListener("focus",q,!0),X.removeEventListener("click",q)}},[m,t,f]);let Ml=Je(L),Ll=Je(z),Sf=Je(I),jl=Je(T),wf=Je(R.loading),U$=Je(Ze);Ml.current=L,Ll.current=z,Sf.current=I,jl.current=T,wf.current=R.loading,U$.current=Ze,sn(()=>{o==null||o({getDisplayName:()=>re,getInputState:()=>({text:Ml.current,files:Ll.current}),setInputState:q=>{E(q.text),F(q.files)},canSend:()=>(Ml.current.trim()!==""||Ll.current.length>0)&&Sf.current&&!wf.current&&!jl.current,sendMessage:async()=>{let q=Ml.current,X=Ll.current;if(!q.trim()&&X.length===0||!Sf.current||wf.current||jl.current)return!1;let se=q.trim(),$e=X.length>0?[...X]:void 0;return E(""),F([]),await U$.current(se,$e),!0},cancelOperation:async()=>{jl.current&&await yf.current()}})},[o,re]);let FA=w.displaySettings.fontSize!==null?{"--ac-chat-font-size":`${w.displaySettings.fontSize}px`}:void 0,F$=e==="sidebar"?(0,xt.jsx)(Ph,{variant:"sidebar",agentLabel:re,isUpdateAvailable:V,onNewChat:()=>void ar(),onExportChat:()=>void ln(),onShowMenu:hf,onOpenHistory:eo}):(0,xt.jsx)(Ph,{variant:"floating",agentLabel:re,availableAgents:Ce,currentAgentId:_.agentId,isUpdateAvailable:V,onAgentChange:q=>void Te(q),onShowMenu:vf,onMinimize:a,onClose:u}),Z$=v!==y&&!$C(v,y)?(0,xt.jsxs)("div",{className:"agent-client-cwd-banner",title:v,children:[(0,xt.jsx)("span",{className:"agent-client-cwd-banner-icon",ref:q=>{q&&(0,bn.setIcon)(q,"folder-open")}}),(0,xt.jsx)("span",{className:"agent-client-cwd-banner-path",children:v})]}):null,V$=(0,xt.jsx)(JE,{messages:b,isSending:T,isSessionReady:I,isRestoringSession:R.loading,agentLabel:re,plugin:m,view:As,terminalClient:G.current,onApprovePermission:$.approvePermission,hasActivePermission:$.hasActivePermission}),W$=(0,xt.jsx)(rP,{isSending:T,isSessionReady:I,isRestoringSession:R.loading,agentLabel:re,availableCommands:_.availableCommands||[],autoMentionEnabled:w.autoMentionActiveNote,restoredMessage:Yi,suggestions:U,plugin:m,view:As,onSendMessage:Ts,onStopGeneration:kt,onRestoredMessageConsumed:Ol,modes:_.modes,onModeChange:q=>void Ki(q),models:_.models,onModelChange:q=>void Kt(q),configOptions:_.configOptions,onConfigOptionChange:(q,X)=>void gi(q,X),usage:_.usage,supportsImages:(B$=(q$=_.promptCapabilities)==null?void 0:q$.image)!=null?B$:!1,agentId:_.agentId,inputValue:L,onInputChange:E,attachedFiles:z,onAttachedFilesChange:F,errorInfo:A,onClearError:Xi,agentUpdateNotification:br,onClearAgentUpdate:ff,geminiNotice:Rl,onClearGeminiNotice:Ps,messages:b});return e==="floating"?(0,xt.jsxs)(xt.Fragment,{children:[(0,xt.jsx)("div",{className:"agent-client-floating-header",onMouseDown:p,children:F$}),Z$,(0,xt.jsxs)("div",{className:"agent-client-floating-content",children:[(0,xt.jsx)("div",{className:"agent-client-floating-messages-container",children:V$}),W$]})]}):(0,xt.jsxs)("div",{ref:j$,className:"agent-client-chat-view-container",style:FA,children:[F$,Z$,V$,W$]})}var er=require("obsidian"),iP=require("@codemirror/view"),nd=require("@codemirror/state");var Vo=class{constructor(t){this.plugin=t;this.files=[];this.lastBuild=0;this.vaultEventRefs=[];this.currentSelection=null;this.selectionListeners=new Set;this.activeLeafRef=null;this.detachEditorListenerFn=null;this.selectionCompartment=null;this.lastSelectionKey="";this.logger=_e(),this.rebuildIndex(),this.registerVaultEvents(),this.currentSelection=null,this.selectionListeners=new Set}rebuildIndex(){this.files=this.plugin.app.vault.getMarkdownFiles(),this.lastBuild=Date.now(),this.logger.log(`[VaultService] Rebuilt index with ${this.files.length} files`)}registerVaultEvents(){this.vaultEventRefs.push(this.plugin.app.vault.on("create",t=>{t instanceof er.TFile&&t.extension==="md"&&this.rebuildIndex()})),this.vaultEventRefs.push(this.plugin.app.vault.on("delete",()=>this.rebuildIndex())),this.vaultEventRefs.push(this.plugin.app.vault.on("rename",t=>{t instanceof er.TFile&&t.extension==="md"&&this.rebuildIndex()}))}getAllFiles(){return this.files}getFileByPath(t){return this.files.find(n=>n.path===t)||null}async readNote(t){let n=this.plugin.app.vault.getAbstractFileByPath(t);if(!(n instanceof er.TFile))throw new Error(`File not found: ${t}`);return await this.plugin.app.vault.read(n)}searchNotes(t){if(!t.trim()){let o=this.files.slice().sort((s,a)=>{var u,d;return(((u=a.stat)==null?void 0:u.mtime)||0)-(((d=s.stat)==null?void 0:d.mtime)||0)}).slice(0,20);return Promise.resolve(o.map(s=>this.convertToMetadata(s)))}let n=(0,er.prepareFuzzySearch)(t.trim()),r=this.files.map(o=>{var m;let s=o.basename,a=o.path,u=this.plugin.app.metadataCache.getFileCache(o),d=(m=u==null?void 0:u.frontmatter)==null?void 0:m.aliases,p=Array.isArray(d)?d:d?[d]:[],l=[s,a,...p],f=-1/0;for(let g of l){let h=n(g);h&&h.score>f&&(f=h.score)}return{file:o,score:f}}).filter(o=>o.score>-1/0).sort((o,s)=>s.score-o.score).slice(0,20).map(o=>this.convertToMetadata(o.file));return Promise.resolve(r)}getActiveNote(){let t=this.plugin.app.workspace.getActiveFile();if(!t)return Promise.resolve(null);let n=this.convertToMetadata(t);return this.currentSelection&&this.currentSelection.filePath===t.path&&(n.selection=this.currentSelection.selection),Promise.resolve(n)}listNotes(){return Promise.resolve(this.files.map(t=>this.convertToMetadata(t)))}subscribeSelectionChanges(t){return this.selectionListeners.add(t),this.ensureSelectionTracking(),()=>{this.selectionListeners.delete(t),this.selectionListeners.size===0&&this.teardownSelectionTracking()}}ensureSelectionTracking(){if(this.activeLeafRef)return;let t=this.plugin.app.workspace.getActiveViewOfType(er.MarkdownView);this.attachToView(t!=null?t:null),this.activeLeafRef=this.plugin.app.workspace.on("active-leaf-change",n=>{let i=(n==null?void 0:n.view)instanceof er.MarkdownView?n.view:this.plugin.app.workspace.getActiveViewOfType(er.MarkdownView);this.attachToView(i!=null?i:null)})}teardownSelectionTracking(){this.detachEditorListener(),this.activeLeafRef&&(this.plugin.app.workspace.offref(this.activeLeafRef),this.activeLeafRef=null),this.lastSelectionKey=""}detachEditorListener(){this.detachEditorListenerFn&&(this.detachEditorListenerFn(),this.detachEditorListenerFn=null),this.selectionCompartment=null}attachToView(t){if(this.detachEditorListener(),!(t!=null&&t.file))return;let{editor:n,file:i}=t,r=i.path;this.lastSelectionKey&&!this.lastSelectionKey.startsWith(`${r}:`)&&this.handleSelectionChange(r,null);let o=()=>{if(n.somethingSelected()){let u=n.listSelections();if(u.length>0){let d=this.normalizeSelection(u[0]);this.handleSelectionChange(r,{from:{line:d.anchor.line,ch:d.anchor.ch},to:{line:d.head.line,ch:d.head.ch}});return}}n.hasFocus()&&this.handleSelectionChange(r,null)},s=n.cm;if(o(),!s){console.warn("[VaultService] CodeMirror 6 API not available. Selection change tracking will not work. This may be due to an Obsidian version change.");return}{let a=new nd.Compartment;this.selectionCompartment=a,s.dispatch({effects:nd.StateEffect.appendConfig.of(a.of(iP.EditorView.updateListener.of(u=>{u.selectionSet&&o()})))}),this.detachEditorListenerFn=()=>{this.selectionCompartment&&s.dispatch({effects:this.selectionCompartment.reconfigure([])}),this.selectionCompartment=null}}}normalizeSelection(t){var o;let n=t.anchor,i=(o=t.head)!=null?o:t.anchor;return n.line<i.line||n.line===i.line&&n.ch<=i.ch?{anchor:n,head:i}:{anchor:i,head:n}}handleSelectionChange(t,n){let i=t?n?`${t}:${n.from.line}:${n.from.ch}-${n.to.line}:${n.to.ch}`:`${t}:none`:"none";i!==this.lastSelectionKey&&(this.lastSelectionKey=i,t&&n?this.currentSelection={filePath:t,selection:n}:this.currentSelection&&(t===null||this.currentSelection.filePath===t)&&(this.currentSelection=null),this.notifySelectionListeners())}notifySelectionListeners(){for(let t of this.selectionListeners)try{t()}catch(n){console.error("[VaultService] Selection listener error",n)}}destroy(){for(let t of this.vaultEventRefs)this.plugin.app.vault.offref(t);this.vaultEventRefs=[],this.teardownSelectionTracking()}convertToMetadata(t){var r;let n=this.plugin.app.metadataCache.getFileCache(t),i=(r=n==null?void 0:n.frontmatter)==null?void 0:r.aliases;return{path:t.path,name:t.basename,extension:t.extension,created:t.stat.ctime,modified:t.stat.mtime,aliases:Array.isArray(i)?i:i?[i]:void 0}}};var id=H(fe()),{useState:e4,useEffect:t4,useMemo:n4}=QL,Ri="agent-client-chat-view";function r4({plugin:e,view:t,viewId:n}){var s;let[i,r]=e4((s=t.getInitialAgentId())!=null?s:void 0),o=n4(()=>({plugin:e,acpClient:t.acpClient,vaultService:t.vaultService,settingsService:e.settingsService}),[e,t.acpClient,t.vaultService]);return t4(()=>t.onAgentIdRestored(u=>{r(u)}),[t]),(0,id.jsx)(_c,{value:o,children:(0,id.jsx)(td,{variant:"sidebar",viewId:n,initialAgentId:i,viewHost:t,onRegisterCallbacks:a=>t.setCallbacks(a),onAgentIdChanged:a=>t.setAgentId(a)})})}var rd=class extends oP.ItemView{constructor(n,i){var r;super(n);this.root=null;this.viewType="sidebar";this.initialAgentId=null;this.agentIdRestoredCallbacks=new Set;this.callbacks=null;this.plugin=i,this.logger=_e(),this.navigation=!1,this.viewId=(r=n.id)!=null?r:crypto.randomUUID()}getViewType(){return Ri}getDisplayText(){return"Agent client"}getIcon(){return"bot-message-square"}getState(){var n;return{initialAgentId:(n=this.initialAgentId)!=null?n:void 0}}async setState(n,i){var o;let r=this.initialAgentId;this.initialAgentId=(o=n.initialAgentId)!=null?o:null,await super.setState(n,i),this.initialAgentId&&this.initialAgentId!==r&&this.agentIdRestoredCallbacks.forEach(s=>s(this.initialAgentId))}getInitialAgentId(){return this.initialAgentId}setAgentId(n){this.initialAgentId=n,this.app.workspace.requestSaveLayout()}onAgentIdRestored(n){return this.agentIdRestoredCallbacks.add(n),()=>{this.agentIdRestoredCallbacks.delete(n)}}setCallbacks(n){this.callbacks=n}getDisplayName(){var n,i;return(i=(n=this.callbacks)==null?void 0:n.getDisplayName())!=null?i:"Chat"}getInputState(){var n,i;return(i=(n=this.callbacks)==null?void 0:n.getInputState())!=null?i:null}setInputState(n){var i;(i=this.callbacks)==null||i.setInputState(n)}async sendMessage(){var n,i;return(i=await((n=this.callbacks)==null?void 0:n.sendMessage()))!=null?i:!1}canSend(){var n,i;return(i=(n=this.callbacks)==null?void 0:n.canSend())!=null?i:!1}async cancelOperation(){var n;await((n=this.callbacks)==null?void 0:n.cancelOperation())}onActivate(){this.logger.log(`[ChatView] Activated: ${this.viewId}`)}onDeactivate(){this.logger.log(`[ChatView] Deactivated: ${this.viewId}`)}focus(){this.app.workspace.revealLeaf(this.leaf).then(()=>{let n=this.containerEl.querySelector("textarea.agent-client-chat-input-textarea");n instanceof HTMLTextAreaElement&&n.focus()})}hasFocus(){return this.containerEl.contains(activeDocument.activeElement)}expand(){}collapse(){}getContainerEl(){return this.containerEl}onOpen(){let n=this.containerEl.children[1];return n.empty(),this.acpClient=this.plugin.getOrCreateAcpClient(this.viewId),this.vaultService=new Vo(this.plugin),this.root=(0,sP.createRoot)(n),this.root.render((0,id.jsx)(r4,{plugin:this.plugin,view:this,viewId:this.viewId})),this.plugin.viewRegistry.register(this),Promise.resolve()}async onClose(){var n;this.logger.log("[ChatView] onClose() called"),this.plugin.viewRegistry.unregister(this.viewId),this.root&&(this.root.unmount(),this.root=null),(n=this.vaultService)==null||n.destroy(),await this.plugin.removeAcpClient(this.viewId)}};var i4=H(Se()),aP=H(za());var Ja=H(fe()),{useState:Ga,useRef:od,useEffect:In,useCallback:sd,useMemo:Qh}=i4;function o4(e,t){return{width:Math.min(e,window.innerWidth),height:Math.min(t,window.innerHeight)}}function Wo(e,t,n,i){return{x:Math.max(0,Math.min(e,window.innerWidth-n)),y:Math.max(0,Math.min(t,window.innerHeight-i))}}function s4(e,t,n,i){let r=o4(n,i);return{position:Wo(e,t,r.width,r.height),size:r}}var qo=class{constructor(t,n){this.viewType="floating";this.root=null;this.callbacks=null;this.setExpanded=null;this.isExpandedState=!1;this.containerRefEl=null;this.plugin=t,this.viewId=`floating-chat-${n}`,this.containerEl=activeDocument.body.createDiv({cls:"agent-client-floating-view-root"})}mount(t,n){this.root=(0,aP.createRoot)(this.containerEl),this.root.render((0,Ja.jsx)(a4,{plugin:this.plugin,viewId:this.viewId,initialExpanded:t,initialPosition:n,onRegisterCallbacks:i=>{this.callbacks=i},onRegisterExpanded:i=>{this.setExpanded=i},onExpandedChange:i=>{this.isExpandedState=i},onContainerRef:i=>{this.containerRefEl=i}})),this.plugin.viewRegistry.register(this)}unmount(){this.plugin.viewRegistry.unregister(this.viewId),this.root&&(this.root.unmount(),this.root=null),this.containerEl.remove()}getDisplayName(){var t,n;return(n=(t=this.callbacks)==null?void 0:t.getDisplayName())!=null?n:"Chat"}onActivate(){this.containerEl.classList.add("is-focused")}onDeactivate(){this.containerEl.classList.remove("is-focused")}focus(){var t;this.isExpandedState||(this.isExpandedState=!0,(t=this.setExpanded)==null||t.call(this,!0)),window.requestAnimationFrame(()=>{var i;let n=(i=this.containerRefEl)==null?void 0:i.querySelector("textarea.agent-client-chat-input-textarea");n instanceof HTMLTextAreaElement&&n.focus()})}hasFocus(){var t,n;return this.isExpandedState&&((n=(t=this.containerRefEl)==null?void 0:t.contains(activeDocument.activeElement))!=null?n:!1)}expand(){var t;this.isExpandedState||(this.isExpandedState=!0,(t=this.setExpanded)==null||t.call(this,!0))}collapse(){var t;this.isExpandedState&&(this.isExpandedState=!1,(t=this.setExpanded)==null||t.call(this,!1))}getInputState(){var t,n;return(n=(t=this.callbacks)==null?void 0:t.getInputState())!=null?n:null}setInputState(t){var n;(n=this.callbacks)==null||n.setInputState(t)}canSend(){var t,n;return(n=(t=this.callbacks)==null?void 0:t.canSend())!=null?n:!1}async sendMessage(){var t,n;return(n=await((t=this.callbacks)==null?void 0:t.sendMessage()))!=null?n:!1}async cancelOperation(){var t;await((t=this.callbacks)==null?void 0:t.cancelOperation())}getContainerEl(){return this.containerEl}};function a4({plugin:e,viewId:t,initialExpanded:n=!1,initialPosition:i,onRegisterCallbacks:r,onRegisterExpanded:o,onExpandedChange:s,onContainerRef:a}){let u=Qh(()=>e.getOrCreateAcpClient(t),[e,t]),d=Qh(()=>new Vo(e),[e]);In(()=>()=>{d.destroy()},[d]);let p=Qh(()=>({plugin:e,acpClient:u,vaultService:d,settingsService:e.settingsService}),[e,u,d]),l=Xr(e),[f,m]=Ga(n);In(()=>{o==null||o(m)},[o]);let[g,h]=Ga(null),[x,y]=Ga(l.floatingWindowSize),[v,S]=Ga(()=>i?Wo(i.x,i.y,l.floatingWindowSize.width,l.floatingWindowSize.height):l.floatingWindowPosition?Wo(l.floatingWindowPosition.x,l.floatingWindowPosition.y,l.floatingWindowSize.width,l.floatingWindowSize.height):Wo(window.innerWidth-l.floatingWindowSize.width-50,window.innerHeight-l.floatingWindowSize.height-50,l.floatingWindowSize.width,l.floatingWindowSize.height)),[w,$]=Ga(!1),_=od({x:0,y:0}),I=od(null);In(()=>{h(I.current)},[]),In(()=>{s==null||s(f)},[f,s]);let b=od(v),T=od(x);In(()=>{b.current=v},[v]),In(()=>{T.current=x},[x]),In(()=>{if(!f)return;let V=()=>{let{position:C,size:L}=s4(b.current.x,b.current.y,T.current.width,T.current.height);(L.width!==T.current.width||L.height!==T.current.height)&&y(L),(C.x!==b.current.x||C.y!==b.current.y)&&S(C)};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[f]),In(()=>{a==null||a(I.current)},[a,f]);let A=sd(()=>{e.openNewFloatingChat(!0,Wo(v.x-30,v.y-30,x.width,x.height))},[e,v,x.width,x.height]),U=sd(()=>{m(!1)},[]),Z=sd(()=>{e.closeFloatingChat(t)},[e,t]);In(()=>{if(!f||!I.current)return;let V=new ResizeObserver(C=>{for(let L of C){let{width:E,height:z}=L.contentRect;(Math.abs(E-x.width)>5||Math.abs(z-x.height)>5)&&y({width:E,height:z})}});return V.observe(I.current),()=>V.disconnect()},[f,x.width,x.height]),In(()=>{let V=async()=>{(x.width!==l.floatingWindowSize.width||x.height!==l.floatingWindowSize.height)&&await e.saveSettingsAndNotify({...e.settings,floatingWindowSize:x})},C=window.setTimeout(()=>{V()},500);return()=>window.clearTimeout(C)},[x,e,l.floatingWindowSize]),In(()=>{let V=async()=>{(!l.floatingWindowPosition||v.x!==l.floatingWindowPosition.x||v.y!==l.floatingWindowPosition.y)&&await e.saveSettingsAndNotify({...e.settings,floatingWindowPosition:v})},C=window.setTimeout(()=>{V()},500);return()=>window.clearTimeout(C)},[v,e,l.floatingWindowPosition]);let R=sd(V=>{I.current&&($(!0),_.current={x:V.clientX-v.x,y:V.clientY-v.y})},[v]);return In(()=>{let V=L=>{w&&S(Wo(L.clientX-_.current.x,L.clientY-_.current.y,x.width,x.height))},C=()=>{$(!1)};return w&&(window.addEventListener("mousemove",V),window.addEventListener("mouseup",C)),()=>{window.removeEventListener("mousemove",V),window.removeEventListener("mouseup",C)}},[w,x.width,x.height]),(0,Ja.jsx)("div",{ref:I,className:"agent-client-floating-window",style:{left:v.x,top:v.y,width:x.width,height:x.height,display:f?void 0:"none"},children:(0,Ja.jsx)(_c,{value:p,children:(0,Ja.jsx)(td,{variant:"floating",viewId:t,onRegisterCallbacks:r,onMinimize:U,onClose:Z,onOpenNewWindow:A,onFloatingHeaderMouseDown:R,containerEl:g})})})}function lP(e,t,n=!1,i){let r=new qo(e,t);return r.mount(n,i),r}var l4=H(Se()),pP=H(za()),fP=require("obsidian");var Wt=H(fe()),{useState:ev,useRef:ad,useEffect:tv,useCallback:uP,useMemo:cP}=l4;function dP(e,t,n,i){return{x:Math.max(0,Math.min(e,window.innerWidth-n)),y:Math.max(0,Math.min(t,window.innerHeight-i))}}var ld=class{constructor(t){this.plugin=t;this.root=null;this.containerEl=activeDocument.body.createDiv({cls:"agent-client-floating-button-root"})}mount(){this.root=(0,pP.createRoot)(this.containerEl),this.root.render((0,Wt.jsx)(u4,{plugin:this.plugin}))}unmount(){this.root&&(this.root.unmount(),this.root=null),this.containerEl.remove()}};function u4({plugin:e}){let t=Xr(e),[n,i]=ev(!1),r=ad(null),o=48,s=220,[a,u]=ev(()=>t.floatingButtonPosition?dP(t.floatingButtonPosition.x,t.floatingButtonPosition.y,o,o):null),[d,p]=ev(!1),l=ad({x:0,y:0}),f=ad({x:0,y:0}),m=ad(!1),g=cP(()=>{var _,I;let $=t.floatingButtonImage;return $?$.startsWith("http://")||$.startsWith("https://")||$.startsWith("data:")?$:(I=(_=e.app.vault.adapter).getResourcePath)==null?void 0:I.call(_,$):null},[t.floatingButtonImage,e.app.vault.adapter]),h=e.getFloatingChatInstances(),x=cP(()=>{var T;let _=e.viewRegistry.getByType("floating").map(A=>({viewId:A.viewId,label:A.getDisplayName()})),I=new Map;for(let A of _)I.set(A.label,((T=I.get(A.label))!=null?T:0)+1);let b=new Map;return _.map(A=>{var U,Z;if(((U=I.get(A.label))!=null?U:0)>1){let R=((Z=b.get(A.label))!=null?Z:0)+1;return b.set(A.label,R),{viewId:A.viewId,label:R===1?A.label:`${A.label} ${R}`}}return A})},[e.viewRegistry,h]),y=5,v=uP($=>{var b,T;let _=(b=a==null?void 0:a.x)!=null?b:window.innerWidth-40-o,I=(T=a==null?void 0:a.y)!=null?T:window.innerHeight-30-o;p(!0),m.current=!1,f.current={x:$.clientX,y:$.clientY},l.current={x:$.clientX-_,y:$.clientY-I},$.preventDefault()},[a]);tv(()=>{if(!d)return;let $=I=>{let b=I.clientX-f.current.x,T=I.clientY-f.current.y;!m.current&&Math.abs(b)<y&&Math.abs(T)<y||(m.current=!0,u(dP(I.clientX-l.current.x,I.clientY-l.current.y,o,o)))},_=()=>{p(!1)};return window.addEventListener("mousemove",$),window.addEventListener("mouseup",_),()=>{window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",_)}},[d]),tv(()=>{if(!a)return;let $=window.setTimeout(()=>{(!t.floatingButtonPosition||a.x!==t.floatingButtonPosition.x||a.y!==t.floatingButtonPosition.y)&&e.saveSettingsAndNotify({...e.settings,floatingButtonPosition:a})},500);return()=>window.clearTimeout($)},[a,e,t.floatingButtonPosition]);let S=uP(()=>{if(m.current)return;let $=e.getFloatingChatInstances();$.length===0?e.openNewFloatingChat(!0):$.length===1?e.expandFloatingChat($[0]):i(!0)},[e]);if(tv(()=>{if(!n)return;let $=I=>{r.current&&!r.current.contains(I.target)&&i(!1)},_=activeDocument;return _.addEventListener("mousedown",$),()=>{_.removeEventListener("mousedown",$)}},[n]),!t.enableFloatingChat)return null;let w=["agent-client-floating-button",g?"has-custom-image":"",d?"is-dragging":""].filter(Boolean).join(" ");return(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)("div",{className:w,onMouseDown:v,onMouseUp:S,style:a?{left:a.x,top:a.y,right:"auto",bottom:"auto"}:void 0,children:g?(0,Wt.jsx)("img",{src:g,alt:"Open chat"}):(0,Wt.jsx)("div",{className:"agent-client-floating-button-fallback",ref:$=>{$&&(0,fP.setIcon)($,"bot-message-square")}})}),n&&(0,Wt.jsxs)("div",{ref:r,className:"agent-client-floating-instance-menu",style:a?{bottom:window.innerHeight-a.y+10,...a.x+s>window.innerWidth?{right:window.innerWidth-(a.x+o),left:"auto",top:"auto"}:{left:a.x,right:"auto",top:"auto"}}:void 0,children:[(0,Wt.jsx)("div",{className:"agent-client-floating-instance-menu-header",children:"Select session to open"}),x.map(({viewId:$,label:_})=>(0,Wt.jsxs)("div",{className:"agent-client-floating-instance-menu-item",onClick:()=>{e.expandFloatingChat($),e.viewRegistry.setFocused($),i(!1)},children:[(0,Wt.jsx)("span",{className:"agent-client-floating-instance-menu-label",children:_}),x.length>1&&(0,Wt.jsx)("button",{className:"agent-client-floating-instance-menu-close",onClick:I=>{I.stopPropagation(),e.closeFloatingChat($),x.length<=2&&i(!1)},title:"Close session",children:"\xD7"})]},$))]})]})}var ud=class{constructor(){this.views=new Map;this.focusedViewId=null;this.logger=_e()}register(t){this.logger.log(`[ChatViewRegistry] Registering view: ${t.viewId} (${t.viewType})`),this.views.set(t.viewId,t),this.views.size===1&&this.setFocused(t.viewId)}unregister(t){var i;this.logger.log(`[ChatViewRegistry] Unregistering view: ${t}`);let n=this.views.get(t);if(n&&n.onDeactivate(),this.views.delete(t),this.focusedViewId===t){let r=Array.from(this.views.keys());this.focusedViewId=r.length>0?r[0]:null,this.focusedViewId&&((i=this.views.get(this.focusedViewId))==null||i.onActivate())}}clear(){this.logger.log("[ChatViewRegistry] Clearing all views");for(let t of this.views.values())t.onDeactivate();this.views.clear(),this.focusedViewId=null}getFocused(){var t;return this.focusedViewId&&(t=this.views.get(this.focusedViewId))!=null?t:null}getFocusedId(){return this.focusedViewId}setFocused(t){var n,i;this.focusedViewId!==t&&this.views.has(t)&&(this.focusedViewId&&((n=this.views.get(this.focusedViewId))==null||n.onDeactivate()),this.focusedViewId=t,(i=this.views.get(t))==null||i.onActivate(),this.logger.log(`[ChatViewRegistry] Focus changed to: ${t}`))}focusNext(){var r;let t=Array.from(this.views.keys());if(t.length===0)return;let i=((this.focusedViewId?t.indexOf(this.focusedViewId):-1)+1)%t.length;this.setFocused(t[i]),(r=this.views.get(t[i]))==null||r.focus()}focusPrevious(){var r;let t=Array.from(this.views.keys());if(t.length===0)return;let i=((this.focusedViewId?t.indexOf(this.focusedViewId):0)-1+t.length)%t.length;this.setFocused(t[i]),(r=this.views.get(t[i]))==null||r.focus()}toFocused(t){let n=this.getFocused();return n?t(n):null}toAll(t){this.views.forEach(t)}toType(t,n){this.views.forEach(i=>{i.viewType===t&&n(i)})}getAll(){return Array.from(this.views.values())}getByType(t){return Array.from(this.views.values()).filter(n=>n.viewType===t)}get(t){var n;return(n=this.views.get(t))!=null?n:null}get size(){return this.views.size}};var nv=require("obsidian");var c4=50,cd=class{constructor(t,n){this.sessionLock=Promise.resolve();this.plugin=t,this.settingsAccess=n}async saveSession(t){this.sessionLock=this.sessionLock.then(async()=>{let n=t,i=this.settingsAccess.getSnapshot();nv.Platform.isWin&&i.windowsWslMode&&t.cwd&&(n={...t,cwd:xn(t.cwd)});let r=[...i.savedSessions||[]],o=r.findIndex(s=>s.sessionId===n.sessionId);o>=0?r[o]=n:(r.unshift(n),r.length>c4&&r.pop()),await this.settingsAccess.updateSettings({savedSessions:r})}),await this.sessionLock}getSavedSessions(t,n){let i=this.settingsAccess.getSnapshot(),r=i.savedSessions||[];if(t&&(r=r.filter(o=>o.agentId===t)),n){let o=n;nv.Platform.isWin&&i.windowsWslMode&&(o=xn(n)),r=r.filter(s=>s.cwd===o)}return[...r].sort((o,s)=>new Date(s.updatedAt).getTime()-new Date(o.updatedAt).getTime())}async deleteSession(t){this.sessionLock=this.sessionLock.then(async()=>{let i=(this.settingsAccess.getSnapshot().savedSessions||[]).filter(r=>r.sessionId!==t);await this.settingsAccess.updateSettings({savedSessions:i}),await this.deleteSessionMessages(t)}),await this.sessionLock}getSessionsDir(){return`${this.plugin.app.vault.configDir}/plugins/agent-client/sessions`}async ensureSessionsDir(){let t=this.plugin.app.vault.adapter,n=this.getSessionsDir();await t.exists(n)||await t.mkdir(n)}getSessionFilePath(t){let n=t.replace(/[^a-zA-Z0-9_-]/g,"_");return`${this.getSessionsDir()}/${n}.json`}async saveSessionMessages(t,n,i){await this.ensureSessionsDir();let r=i.map(a=>({...a,timestamp:a.timestamp.toISOString()})),o={version:1,sessionId:t,agentId:n,messages:r,savedAt:new Date().toISOString()},s=this.getSessionFilePath(t);await this.plugin.app.vault.adapter.write(s,JSON.stringify(o,null,2))}async loadSessionMessages(t){let n=this.getSessionFilePath(t),i=this.plugin.app.vault.adapter;if(!await i.exists(n))return null;try{let r=await i.read(n),o=JSON.parse(r);return typeof o.version!="number"||!Array.isArray(o.messages)?(console.warn(`[SessionStorage] Invalid session file structure: ${n}`),null):o.version!==1?(console.warn(`[SessionStorage] Unknown session file version: ${o.version}`),null):o.messages.map(s=>({...s,timestamp:new Date(s.timestamp)}))}catch(r){return console.error(`[SessionStorage] Failed to load session messages: ${r}`),null}}async deleteSessionMessages(t){let n=this.getSessionFilePath(t),i=this.plugin.app.vault.adapter;await i.exists(n)&&await i.remove(n)}};var rv=class{constructor(t,n){this.listeners=new Set;this.getSnapshot=()=>this.state;this.subscribe=t=>(this.listeners.add(t),()=>this.listeners.delete(t));this.state=t,this.plugin=n,this.sessionStorage=new cd(n,this)}async updateSettings(t){let n={...this.state,...t};this.state=n,this.plugin.settings=n;for(let i of this.listeners)i();await this.plugin.saveSettings()}set(t){this.updateSettings(t)}async saveSession(t){return this.sessionStorage.saveSession(t)}getSavedSessions(t,n){return this.sessionStorage.getSavedSessions(t,n)}async deleteSession(t){return this.sessionStorage.deleteSession(t)}async saveSessionMessages(t,n,i){return this.sessionStorage.saveSessionMessages(t,n,i)}async loadSessionMessages(t){return this.sessionStorage.loadSessionMessages(t)}async deleteSessionMessages(t){return this.sessionStorage.deleteSessionMessages(t)}},mP=(e,t)=>new rv(e,t);var Q=require("obsidian");var dd=class extends Q.PluginSettingTab{constructor(n,i){super(n,i);this.agentSelector=null;this.unsubscribe=null;this.plugin=i}display(){let{containerEl:n}=this;n.empty(),this.agentSelector=null,this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null);let i=n.createDiv({cls:"agent-client-doc-link"});i.createSpan({text:"Need help? Check out the "}),i.createEl("a",{text:"documentation",href:"https://rait-09.github.io/obsidian-agent-client/",attr:{target:"_blank"}}),i.createSpan({text:"."}),this.renderAgentSelector(n),this.unsubscribe=this.plugin.settingsService.subscribe(()=>{this.updateAgentDropdown()}),this.updateAgentDropdown();let r=new Q.Setting(n).setName("Node.js path").setDesc("Path to Node.js. Usually leave blank. Only needed if node is in a non-standard location (enter absolute path, e.g. /usr/local/bin/node).").addText(o=>{o.setPlaceholder("Leave blank (login shell auto-resolves)").setValue(this.plugin.settings.nodePath).onChange(async s=>{this.plugin.settings.nodePath=s.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(r,"node",async o=>{this.plugin.settings.nodePath=o,await this.plugin.saveSettings()}),new Q.Setting(n).setName("Send message shortcut").setDesc("Choose the keyboard shortcut to send messages. Note: If using Cmd/Ctrl+Enter, you may need to remove any hotkeys assigned to Cmd/Ctrl+Enter (Settings \u2192 Hotkeys).").addDropdown(o=>o.addOption("enter","Enter to send, Shift+Enter for newline").addOption("cmd-enter","Cmd/Ctrl+Enter to send, Enter for newline").setValue(this.plugin.settings.sendMessageShortcut).onChange(async s=>{this.plugin.settings.sendMessageShortcut=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Mentions").setHeading(),new Q.Setting(n).setName("Auto-mention active note").setDesc("Include the current note in your messages automatically. The agent will have access to its content without typing @notename.").addToggle(o=>o.setValue(this.plugin.settings.autoMentionActiveNote).onChange(async s=>{this.plugin.settings.autoMentionActiveNote=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Max note length").setDesc("Maximum characters per mentioned note. Notes longer than this will be truncated.").addText(o=>o.setPlaceholder("10000").setValue(String(this.plugin.settings.displaySettings.maxNoteLength)).onChange(async s=>{let a=parseInt(s,10);!isNaN(a)&&a>=1&&(this.plugin.settings.displaySettings.maxNoteLength=a,await this.plugin.saveSettings())})),new Q.Setting(n).setName("Max selection length").setDesc("Maximum characters for text selection in auto-mention. Selections longer than this will be truncated.").addText(o=>o.setPlaceholder("10000").setValue(String(this.plugin.settings.displaySettings.maxSelectionLength)).onChange(async s=>{let a=parseInt(s,10);!isNaN(a)&&a>=1&&(this.plugin.settings.displaySettings.maxSelectionLength=a,await this.plugin.saveSettings())})),new Q.Setting(n).setName("Display").setHeading(),new Q.Setting(n).setName("Chat view location").setDesc("Where to open new chat views").addDropdown(o=>o.addOption("right-tab","Right pane (tabs)").addOption("right-split","Right pane (split)").addOption("editor-tab","Editor area (tabs)").addOption("editor-split","Editor area (split)").setValue(this.plugin.settings.chatViewLocation).onChange(async s=>{this.plugin.settings.chatViewLocation=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Chat font size").setDesc(`Adjust the font size of the chat message area (${10}-${30}px).`).addText(o=>{let s=()=>{let u=this.plugin.settings.displaySettings.fontSize;return u===null?"":String(u)},a=async u=>{if(this.plugin.settings.displaySettings.fontSize===u)return;let d={...this.plugin.settings,displaySettings:{...this.plugin.settings.displaySettings,fontSize:u}};await this.plugin.saveSettingsAndNotify(d)};o.setPlaceholder(`${10}-${30}`).setValue(s()).onChange(async u=>{if(u.trim().length===0){await a(null);return}let d=u.trim();if(!/^-?\d+$/.test(d))return;let p=Number.parseInt(d,10);if(p<10||p>30)return;let l=La(p);if(l===null)return;this.plugin.settings.displaySettings.fontSize!==l&&await a(l)}),o.inputEl.addEventListener("blur",()=>{let u=o.getValue(),d=La(u);if(u.trim().length>0&&d===null){o.setValue(s());return}if(d!==null){o.setValue(String(d)),this.plugin.settings.displaySettings.fontSize!==d&&a(d);return}o.setValue("")})}),new Q.Setting(n).setName("Show emojis").setDesc("Display emoji icons in tool calls, thoughts, plans, and terminal blocks.").addToggle(o=>o.setValue(this.plugin.settings.displaySettings.showEmojis).onChange(async s=>{this.plugin.settings.displaySettings.showEmojis=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Auto-collapse long diffs").setDesc("Automatically collapse diffs that exceed the line threshold.").addToggle(o=>o.setValue(this.plugin.settings.displaySettings.autoCollapseDiffs).onChange(async s=>{this.plugin.settings.displaySettings.autoCollapseDiffs=s,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.displaySettings.autoCollapseDiffs&&new Q.Setting(n).setName("Collapse threshold").setDesc("Diffs with more lines than this will be collapsed by default.").addText(o=>o.setPlaceholder("10").setValue(String(this.plugin.settings.displaySettings.diffCollapseThreshold)).onChange(async s=>{let a=parseInt(s,10);!isNaN(a)&&a>0&&(this.plugin.settings.displaySettings.diffCollapseThreshold=a,await this.plugin.saveSettings())})),new Q.Setting(n).setName("Floating chat").setHeading(),new Q.Setting(n).setName("Enable floating chat").setDesc("Enable the floating chat button and draggable chat windows.").addToggle(o=>o.setValue(this.plugin.settings.enableFloatingChat).onChange(async s=>{let a=this.plugin.settings.enableFloatingChat;if(await this.plugin.settingsService.updateSettings({enableFloatingChat:s}),s&&!a)this.plugin.openNewFloatingChat();else if(!s&&a){let u=this.plugin.getFloatingChatInstances();for(let d of u)this.plugin.closeFloatingChat(d)}})),new Q.Setting(n).setName("Floating button image").setDesc("URL or path to an image for the floating button. Leave empty for default icon.").addText(o=>o.setPlaceholder("https://example.com/avatar.png").setValue(this.plugin.settings.floatingButtonImage).onChange(async s=>{this.plugin.settings.floatingButtonImage=s.trim(),await this.plugin.saveSettings()})),new Q.Setting(n).setName("Permissions").setHeading(),new Q.Setting(n).setName("Auto-allow permissions").setDesc("Automatically allow all permission requests from agents. \u26A0\uFE0F Use with caution - this gives agents full access to your system.").addToggle(o=>o.setValue(this.plugin.settings.autoAllowPermissions).onChange(async s=>{this.plugin.settings.autoAllowPermissions=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Notifications").setHeading(),new Q.Setting(n).setName("System notifications").setDesc("Show OS notifications when the agent completes a response or requests permission. Notifications are suppressed while Obsidian is focused.").addToggle(o=>o.setValue(this.plugin.settings.enableSystemNotifications).onChange(async s=>{this.plugin.settings.enableSystemNotifications=s,await this.plugin.saveSettings()})),Q.Platform.isWin&&(new Q.Setting(n).setName("Windows Subsystem for Linux").setHeading(),new Q.Setting(n).setName("Enable WSL mode").setDesc("Run agents inside Windows Subsystem for Linux. Recommended for agents like Codex that don't work well in native Windows environments.").addToggle(o=>o.setValue(this.plugin.settings.windowsWslMode).onChange(async s=>{this.plugin.settings.windowsWslMode=s,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.windowsWslMode&&new Q.Setting(n).setName("WSL distribution").setDesc("Specify WSL distribution name (leave empty for default). Example: Ubuntu, Debian").addText(o=>o.setPlaceholder("Leave empty for default").setValue(this.plugin.settings.windowsWslDistribution||"").onChange(async s=>{this.plugin.settings.windowsWslDistribution=s.trim()||void 0,await this.plugin.saveSettings()}))),new Q.Setting(n).setName("Built-in agents").setHeading(),this.renderClaudeSettings(n),this.renderCodexSettings(n),this.renderGeminiSettings(n),new Q.Setting(n).setName("Custom agents").setHeading(),this.renderCustomAgents(n),new Q.Setting(n).setName("Export").setHeading(),new Q.Setting(n).setName("Export folder").setDesc("Folder where chat exports will be saved").addText(o=>o.setPlaceholder("Agent Client").setValue(this.plugin.settings.exportSettings.defaultFolder).onChange(async s=>{this.plugin.settings.exportSettings.defaultFolder=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Filename").setDesc("Template for exported filenames. Use {date} for date and {time} for time").addText(o=>o.setPlaceholder("agent_client_{date}_{time}").setValue(this.plugin.settings.exportSettings.filenameTemplate).onChange(async s=>{this.plugin.settings.exportSettings.filenameTemplate=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Frontmatter tag").setDesc("Tag to add to exported notes. Supports nested tags (e.g., projects/agent-client). Leave empty to disable.").addText(o=>o.setPlaceholder("agent-client").setValue(this.plugin.settings.exportSettings.frontmatterTag).onChange(async s=>{this.plugin.settings.exportSettings.frontmatterTag=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Include images").setDesc("Include images in exported markdown files").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.includeImages).onChange(async s=>{this.plugin.settings.exportSettings.includeImages=s,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.exportSettings.includeImages&&(new Q.Setting(n).setName("Image location").setDesc("Where to save exported images").addDropdown(o=>o.addOption("obsidian","Use Obsidian's attachment setting").addOption("custom","Save to custom folder").addOption("base64","Embed as Base64 (not recommended)").setValue(this.plugin.settings.exportSettings.imageLocation).onChange(async s=>{this.plugin.settings.exportSettings.imageLocation=s,await this.plugin.saveSettings(),this.display()})),this.plugin.settings.exportSettings.imageLocation==="custom"&&new Q.Setting(n).setName("Custom image folder").setDesc("Folder path for exported images (relative to vault root)").addText(o=>o.setPlaceholder("Agent Client").setValue(this.plugin.settings.exportSettings.imageCustomFolder).onChange(async s=>{this.plugin.settings.exportSettings.imageCustomFolder=s,await this.plugin.saveSettings()}))),new Q.Setting(n).setName("Auto-export on new chat").setDesc("Automatically export the current chat when starting a new chat").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.autoExportOnNewChat).onChange(async s=>{this.plugin.settings.exportSettings.autoExportOnNewChat=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Auto-export on close chat").setDesc("Automatically export the current chat when closing the chat view").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.autoExportOnCloseChat).onChange(async s=>{this.plugin.settings.exportSettings.autoExportOnCloseChat=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Open note after export").setDesc("Automatically open the exported note after exporting").addToggle(o=>o.setValue(this.plugin.settings.exportSettings.openFileAfterExport).onChange(async s=>{this.plugin.settings.exportSettings.openFileAfterExport=s,await this.plugin.saveSettings()})),new Q.Setting(n).setName("Developer").setHeading(),new Q.Setting(n).setName("Debug mode").setDesc("Enable debug logging to console. Useful for development and troubleshooting.").addToggle(o=>o.setValue(this.plugin.settings.debugMode).onChange(async s=>{this.plugin.settings.debugMode=s,await this.plugin.saveSettings()}))}updateAgentDropdown(){if(!this.agentSelector)return;let n=this.plugin.settingsService.getSnapshot(),i=this.agentSelector.getValue();n.defaultAgentId!==i&&this.agentSelector.setValue(n.defaultAgentId)}hide(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)}renderAgentSelector(n){this.plugin.ensureDefaultAgentId(),new Q.Setting(n).setName("Default agent").setDesc("Choose which agent is used when opening a new chat view.").addDropdown(i=>{this.agentSelector=i,this.populateAgentDropdown(i),i.setValue(this.plugin.settings.defaultAgentId),i.onChange(async r=>{let o={...this.plugin.settings,defaultAgentId:r};this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettingsAndNotify(o)})})}populateAgentDropdown(n){n.selectEl.empty();for(let i of this.getAgentOptions())n.addOption(i.id,i.label)}refreshAgentDropdown(){this.agentSelector&&(this.populateAgentDropdown(this.agentSelector),this.agentSelector.setValue(this.plugin.settings.defaultAgentId))}getAgentOptions(){let n=(o,s)=>({id:o,label:`${s} (${o})`}),i=[n(this.plugin.settings.claude.id,this.plugin.settings.claude.displayName||this.plugin.settings.claude.id),n(this.plugin.settings.codex.id,this.plugin.settings.codex.displayName||this.plugin.settings.codex.id),n(this.plugin.settings.gemini.id,this.plugin.settings.gemini.displayName||this.plugin.settings.gemini.id)];for(let o of this.plugin.settings.customAgents)if(o.id&&o.id.length>0){let s=o.displayName&&o.displayName.length>0?o.displayName:o.id;i.push(n(o.id,s))}let r=new Set;return i.filter(({id:o})=>r.has(o)?!1:(r.add(o),!0))}renderGeminiSettings(n){let i=this.plugin.settings.gemini;new Q.Setting(n).setName(i.displayName||"Gemini CLI").setHeading(),new Q.Setting(n).setName("API key").setDesc("Gemini API key. Required if not logging in with a Google account. (Stored as plain text)").addText(o=>{o.setPlaceholder("Enter your Gemini API key").setValue(i.apiKey).onChange(async s=>{this.plugin.settings.gemini.apiKey=s.trim(),await this.plugin.saveSettings()}),o.inputEl.type="password"});let r=new Q.Setting(n).setName("Path").setDesc('Command name or path to the Gemini CLI. Use just "gemini" to let the login shell resolve it, or enter an absolute path for a specific version.').addText(o=>{o.setPlaceholder("gemini").setValue(i.command).onChange(async s=>{this.plugin.settings.gemini.command=s.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(r,"gemini",async o=>{this.plugin.settings.gemini.command=o,await this.plugin.saveSettings()}),this.addInstallHint(n,"@google/gemini-cli"),new Q.Setting(n).setName("Arguments").setDesc('Enter one argument per line. Leave empty to run without arguments.(Currently, the Gemini CLI requires the "--experimental-acp" option.)').addTextArea(o=>{o.setPlaceholder("").setValue(this.formatArgs(i.args)).onChange(async s=>{this.plugin.settings.gemini.args=this.parseArgs(s),await this.plugin.saveSettings()}),o.inputEl.rows=3}),new Q.Setting(n).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. Required to authenticate with Vertex AI. GEMINI_API_KEY is derived from the field above.(Stored as plain text)").addTextArea(o=>{o.setPlaceholder("GOOGLE_CLOUD_PROJECT=...").setValue(this.formatEnv(i.env)).onChange(async s=>{this.plugin.settings.gemini.env=this.parseEnv(s),await this.plugin.saveSettings()}),o.inputEl.rows=3})}renderClaudeSettings(n){let i=this.plugin.settings.claude;new Q.Setting(n).setName(i.displayName||"Claude Code (ACP)").setHeading(),new Q.Setting(n).setName("API key").setDesc("Anthropic API key. Required if not logging in with an Anthropic account. (Stored as plain text)").addText(o=>{o.setPlaceholder("Enter your Anthropic API key").setValue(i.apiKey).onChange(async s=>{this.plugin.settings.claude.apiKey=s.trim(),await this.plugin.saveSettings()}),o.inputEl.type="password"});let r=new Q.Setting(n).setName("Path").setDesc('Command name or path to claude-agent-acp. Use just "claude-agent-acp" to let the login shell resolve it, or enter an absolute path.').addText(o=>{o.setPlaceholder("claude-agent-acp").setValue(i.command).onChange(async s=>{this.plugin.settings.claude.command=s.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(r,"claude-agent-acp",async o=>{this.plugin.settings.claude.command=o,await this.plugin.saveSettings()}),this.addInstallHint(n,"@agentclientprotocol/claude-agent-acp"),new Q.Setting(n).setName("Arguments").setDesc("Enter one argument per line. Leave empty to run without arguments.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatArgs(i.args)).onChange(async s=>{this.plugin.settings.claude.args=this.parseArgs(s),await this.plugin.saveSettings()}),o.inputEl.rows=3}),new Q.Setting(n).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. ANTHROPIC_API_KEY is derived from the field above.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatEnv(i.env)).onChange(async s=>{this.plugin.settings.claude.env=this.parseEnv(s),await this.plugin.saveSettings()}),o.inputEl.rows=3})}renderCodexSettings(n){let i=this.plugin.settings.codex;new Q.Setting(n).setName(i.displayName||"Codex").setHeading(),new Q.Setting(n).setName("API key").setDesc("OpenAI API key. Required if not logging in with an OpenAI account. (Stored as plain text)").addText(o=>{o.setPlaceholder("Enter your OpenAI API key").setValue(i.apiKey).onChange(async s=>{this.plugin.settings.codex.apiKey=s.trim(),await this.plugin.saveSettings()}),o.inputEl.type="password"});let r=new Q.Setting(n).setName("Path").setDesc('Command name or path to codex-acp. Use just "codex-acp" to let the login shell resolve it, or enter an absolute path.').addText(o=>{o.setPlaceholder("codex-acp").setValue(i.command).onChange(async s=>{this.plugin.settings.codex.command=s.trim(),await this.plugin.saveSettings()})});this.addAutoDetectButton(r,"codex-acp",async o=>{this.plugin.settings.codex.command=o,await this.plugin.saveSettings()}),this.addInstallHint(n,"@zed-industries/codex-acp"),new Q.Setting(n).setName("Arguments").setDesc("Enter one argument per line. Leave empty to run without arguments.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatArgs(i.args)).onChange(async s=>{this.plugin.settings.codex.args=this.parseArgs(s),await this.plugin.saveSettings()}),o.inputEl.rows=3}),new Q.Setting(n).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. OPENAI_API_KEY is derived from the field above.").addTextArea(o=>{o.setPlaceholder("").setValue(this.formatEnv(i.env)).onChange(async s=>{this.plugin.settings.codex.env=this.parseEnv(s),await this.plugin.saveSettings()}),o.inputEl.rows=3})}renderCustomAgents(n){this.plugin.settings.customAgents.length===0?n.createEl("p",{text:"No custom agents configured yet."}):this.plugin.settings.customAgents.forEach((i,r)=>{this.renderCustomAgent(n,i,r)}),new Q.Setting(n).addButton(i=>{i.setButtonText("Add custom agent").setCta().onClick(async()=>{let r=this.generateCustomAgentId(),o=this.generateCustomAgentDisplayName();this.plugin.settings.customAgents.push({id:r,displayName:o,command:"",args:[],env:[]}),this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettings(),this.display()})})}renderCustomAgent(n,i,r){let o=n.createDiv({cls:"agent-client-custom-agent"});new Q.Setting(o).setName("Agent ID").setDesc("Unique identifier used to reference this agent.").addText(a=>{a.setPlaceholder("custom-agent").setValue(i.id).onChange(async u=>{let d=this.plugin.settings.customAgents[r].id,l=u.trim();l.length===0&&(l=this.generateCustomAgentId(),a.setValue(l)),this.plugin.settings.customAgents[r].id=l,this.plugin.settings.defaultAgentId===d&&(this.plugin.settings.defaultAgentId=l),this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettings(),this.refreshAgentDropdown()})}).addExtraButton(a=>{a.setIcon("trash").setTooltip("Delete this agent").onClick(async()=>{this.plugin.settings.customAgents.splice(r,1),this.plugin.ensureDefaultAgentId(),await this.plugin.saveSettings(),this.display()})}),new Q.Setting(o).setName("Display name").setDesc("Shown in menus and headers.").addText(a=>{a.setPlaceholder("Custom agent").setValue(i.displayName||i.id).onChange(async u=>{let d=u.trim();this.plugin.settings.customAgents[r].displayName=d.length>0?d:this.plugin.settings.customAgents[r].id,await this.plugin.saveSettings(),this.refreshAgentDropdown()})}),new Q.Setting(o).setName("Path").setDesc("Command name or path to the custom agent. Use just the command name to let the login shell resolve it, or enter an absolute path.").addText(a=>{a.setPlaceholder("Command name or path").setValue(i.command).onChange(async u=>{this.plugin.settings.customAgents[r].command=u.trim(),await this.plugin.saveSettings()})}),new Q.Setting(o).setName("Arguments").setDesc("Enter one argument per line. Leave empty to run without arguments.").addTextArea(a=>{a.setPlaceholder(`--flag
114
+ --another=value`).setValue(this.formatArgs(i.args)).onChange(async u=>{this.plugin.settings.customAgents[r].args=this.parseArgs(u),await this.plugin.saveSettings()}),a.inputEl.rows=3}),new Q.Setting(o).setName("Environment variables").setDesc("Enter KEY=VALUE pairs, one per line. (Stored as plain text)").addTextArea(a=>{a.setPlaceholder("TOKEN=...").setValue(this.formatEnv(i.env)).onChange(async u=>{this.plugin.settings.customAgents[r].env=this.parseEnv(u),await this.plugin.saveSettings()}),a.inputEl.rows=3})}generateCustomAgentDisplayName(){let n="Custom agent",i=new Set;i.add(this.plugin.settings.claude.displayName||this.plugin.settings.claude.id),i.add(this.plugin.settings.codex.displayName||this.plugin.settings.codex.id),i.add(this.plugin.settings.gemini.displayName||this.plugin.settings.gemini.id);for(let s of this.plugin.settings.customAgents)i.add(s.displayName||s.id);if(!i.has(n))return n;let r=2,o=`${n} ${r}`;for(;i.has(o);)r+=1,o=`${n} ${r}`;return o}generateCustomAgentId(){let n="custom-agent",i=new Set(this.plugin.settings.customAgents.map(s=>s.id));if(!i.has(n))return n;let r=2,o=`${n}-${r}`;for(;i.has(o);)r+=1,o=`${n}-${r}`;return o}addInstallHint(n,i){let r=`npm install -g ${i}@latest`,o=createFragment();o.appendText("Not installed? Run in terminal: "),o.createEl("code",{text:r}),new Q.Setting(n).setDesc(o).addButton(s=>{s.setButtonText("Copy").onClick(()=>{navigator.clipboard.writeText(r).then(()=>{s.setButtonText("Copied!"),window.setTimeout(()=>{s.setButtonText("Copy")},1500)},()=>{})})})}addAutoDetectButton(n,i,r){n.addButton(o=>{let s=Q.Platform.isWin&&this.plugin.settings.windowsWslMode,a=Q.Platform.isWin&&!s?"where":"which";o.setButtonText("Auto-detect").setTooltip(`Run \`${a} ${i}\` to find the path`).onClick(async()=>{o.setButtonText("Detecting\u2026"),o.setDisabled(!0);try{let u=s?await zC(i,this.plugin.settings.windowsWslDistribution||void 0):await TC(i);u?(await r(u),this.display()):(o.setButtonText("Not found"),window.setTimeout(()=>{o.setButtonText("Auto-detect"),o.setDisabled(!1)},2e3))}catch(u){o.setButtonText("Error"),window.setTimeout(()=>{o.setButtonText("Auto-detect"),o.setDisabled(!1)},2e3)}})})}formatArgs(n){return n.join(`
115
+ `)}parseArgs(n){return n.split(/\r?\n/).map(i=>i.trim()).filter(i=>i.length>0)}formatEnv(n){return n.map(i=>{var r;return`${i.key}=${(r=i.value)!=null?r:""}`}).join(`
116
+ `)}parseEnv(n){let i=[];for(let r of n.split(/\r?\n/)){let o=r.trim();if(!o)continue;let s=o.indexOf("=");if(s===-1)continue;let a=o.slice(0,s).trim(),u=o.slice(s+1).trim();a&&i.push({key:a,value:u})}return Ni(i)}};var D$=require("child_process");var c={};Vn(c,{$brand:()=>av,$input:()=>ES,$output:()=>CS,NEVER:()=>sv,TimePrecision:()=>AS,ZodAny:()=>$x,ZodArray:()=>Ix,ZodBase64:()=>Lp,ZodBase64URL:()=>jp,ZodBigInt:()=>xs,ZodBigIntFormat:()=>Zp,ZodBoolean:()=>ws,ZodCIDRv4:()=>Rp,ZodCIDRv6:()=>Mp,ZodCUID:()=>Pp,ZodCUID2:()=>Tp,ZodCatch:()=>Gx,ZodCodec:()=>Il,ZodCustom:()=>Cl,ZodCustomStringFormat:()=>ys,ZodDate:()=>xl,ZodDefault:()=>Zx,ZodDiscriminatedUnion:()=>Ex,ZodE164:()=>Up,ZodEmail:()=>Ip,ZodEmoji:()=>Cp,ZodEnum:()=>hs,ZodError:()=>FU,ZodExactOptional:()=>jx,ZodFile:()=>Mx,ZodFirstPartyTypeKind:()=>a$,ZodFunction:()=>i$,ZodGUID:()=>hl,ZodIPv4:()=>Op,ZodIPv6:()=>Dp,ZodISODate:()=>wp,ZodISODateTime:()=>Sp,ZodISODuration:()=>$p,ZodISOTime:()=>xp,ZodIntersection:()=>Px,ZodIssueCode:()=>VU,ZodJWT:()=>Fp,ZodKSUID:()=>Np,ZodLazy:()=>t$,ZodLiteral:()=>Rx,ZodMAC:()=>gx,ZodMap:()=>Ox,ZodNaN:()=>Kx,ZodNanoID:()=>Ep,ZodNever:()=>kx,ZodNonOptional:()=>Gp,ZodNull:()=>wx,ZodNullable:()=>Fx,ZodNumber:()=>Ss,ZodNumberFormat:()=>Hi,ZodObject:()=>_l,ZodOptional:()=>Hp,ZodPipe:()=>bl,ZodPrefault:()=>Wx,ZodPreprocess:()=>Xx,ZodPromise:()=>r$,ZodReadonly:()=>Yx,ZodRealError:()=>Gt,ZodRecord:()=>gs,ZodSet:()=>Dx,ZodString:()=>vs,ZodStringFormat:()=>be,ZodSuccess:()=>Hx,ZodSymbol:()=>yx,ZodTemplateLiteral:()=>e$,ZodTransform:()=>Lx,ZodTuple:()=>zx,ZodType:()=>le,ZodULID:()=>zp,ZodURL:()=>wl,ZodUUID:()=>or,ZodUndefined:()=>Sx,ZodUnion:()=>kl,ZodUnknown:()=>_x,ZodVoid:()=>bx,ZodXID:()=>Ap,ZodXor:()=>Cx,_ZodString:()=>bp,_default:()=>Vx,_function:()=>rA,any:()=>Oz,array:()=>$l,base64:()=>vz,base64url:()=>yz,bigint:()=>Pz,boolean:()=>vx,catch:()=>Jx,check:()=>iA,cidrv4:()=>gz,cidrv6:()=>hz,clone:()=>Nt,codec:()=>Qz,coerce:()=>Jp,config:()=>We,core:()=>ir,cuid:()=>az,cuid2:()=>lz,custom:()=>oA,date:()=>Rz,decode:()=>lx,decodeAsync:()=>cx,describe:()=>sA,discriminatedUnion:()=>Zz,e164:()=>Sz,email:()=>XT,emoji:()=>oz,encode:()=>ax,encodeAsync:()=>ux,endsWith:()=>ss,enum:()=>qp,exactOptional:()=>Ux,file:()=>Jz,flattenError:()=>rl,float32:()=>bz,float64:()=>Iz,formatError:()=>il,fromJSONSchema:()=>fA,function:()=>rA,getErrorMap:()=>qU,globalRegistry:()=>gt,gt:()=>nr,gte:()=>Dt,guid:()=>YT,hash:()=>kz,hex:()=>_z,hostname:()=>$z,httpUrl:()=>iz,includes:()=>is,instanceof:()=>lA,int:()=>_p,int32:()=>Cz,int64:()=>Tz,intersection:()=>Tx,invertCodec:()=>eA,ipv4:()=>pz,ipv6:()=>mz,iso:()=>qi,json:()=>cA,jwt:()=>wz,keyof:()=>Mz,ksuid:()=>dz,lazy:()=>n$,length:()=>Wi,literal:()=>Gz,locales:()=>Fi,looseObject:()=>Uz,looseRecord:()=>Wz,lowercase:()=>ns,lt:()=>tr,lte:()=>an,mac:()=>fz,map:()=>qz,maxLength:()=>Vi,maxSize:()=>ui,meta:()=>aA,mime:()=>as,minLength:()=>kr,minSize:()=>rr,multipleOf:()=>li,nan:()=>Yz,nanoid:()=>sz,nativeEnum:()=>Hz,negative:()=>up,never:()=>Vp,nonnegative:()=>dp,nonoptional:()=>Bx,nonpositive:()=>cp,normalize:()=>ls,null:()=>xx,nullable:()=>yl,nullish:()=>Kz,number:()=>hx,object:()=>Lz,optional:()=>vl,overwrite:()=>Fn,parse:()=>rx,parseAsync:()=>ix,partialRecord:()=>Vz,pipe:()=>kp,positive:()=>lp,prefault:()=>qx,preprocess:()=>dA,prettifyError:()=>wv,promise:()=>nA,property:()=>pp,readonly:()=>Qx,record:()=>Nx,refine:()=>o$,regex:()=>ts,regexes:()=>Ht,registry:()=>Fd,safeDecode:()=>px,safeDecodeAsync:()=>mx,safeEncode:()=>dx,safeEncodeAsync:()=>fx,safeParse:()=>ox,safeParseAsync:()=>sx,set:()=>Bz,setErrorMap:()=>WU,size:()=>Zi,slugify:()=>ps,startsWith:()=>os,strictObject:()=>jz,string:()=>gl,stringFormat:()=>xz,stringbool:()=>uA,success:()=>Xz,superRefine:()=>s$,symbol:()=>Az,templateLiteral:()=>tA,toJSONSchema:()=>hp,toLowerCase:()=>cs,toUpperCase:()=>ds,transform:()=>Bp,treeifyError:()=>Sv,trim:()=>us,tuple:()=>Ax,uint32:()=>Ez,uint64:()=>zz,ulid:()=>uz,undefined:()=>Nz,union:()=>Wp,unknown:()=>Bi,uppercase:()=>rs,url:()=>rz,util:()=>D,uuid:()=>QT,uuidv4:()=>ez,uuidv6:()=>tz,uuidv7:()=>nz,void:()=>Dz,xid:()=>cz,xor:()=>Fz});var ir={};Vn(ir,{$ZodAny:()=>Jy,$ZodArray:()=>eS,$ZodAsyncError:()=>Un,$ZodBase64:()=>jy,$ZodBase64URL:()=>Uy,$ZodBigInt:()=>Nd,$ZodBigIntFormat:()=>qy,$ZodBoolean:()=>ll,$ZodCIDRv4:()=>Ry,$ZodCIDRv6:()=>My,$ZodCUID:()=>ky,$ZodCUID2:()=>by,$ZodCatch:()=>yS,$ZodCheck:()=>Ie,$ZodCheckBigIntFormat:()=>ey,$ZodCheckEndsWith:()=>py,$ZodCheckGreaterThan:()=>Cd,$ZodCheckIncludes:()=>cy,$ZodCheckLengthEquals:()=>sy,$ZodCheckLessThan:()=>Id,$ZodCheckLowerCase:()=>ly,$ZodCheckMaxLength:()=>iy,$ZodCheckMaxSize:()=>ty,$ZodCheckMimeType:()=>my,$ZodCheckMinLength:()=>oy,$ZodCheckMinSize:()=>ny,$ZodCheckMultipleOf:()=>Yv,$ZodCheckNumberFormat:()=>Qv,$ZodCheckOverwrite:()=>gy,$ZodCheckProperty:()=>fy,$ZodCheckRegex:()=>ay,$ZodCheckSizeEquals:()=>ry,$ZodCheckStartsWith:()=>dy,$ZodCheckStringFormat:()=>Qo,$ZodCheckUpperCase:()=>uy,$ZodCodec:()=>cl,$ZodCustom:()=>IS,$ZodCustomStringFormat:()=>Vy,$ZodDate:()=>Qy,$ZodDefault:()=>mS,$ZodDiscriminatedUnion:()=>rS,$ZodE164:()=>Fy,$ZodEmail:()=>wy,$ZodEmoji:()=>$y,$ZodEncodeError:()=>ri,$ZodEnum:()=>lS,$ZodError:()=>nl,$ZodExactOptional:()=>pS,$ZodFile:()=>cS,$ZodFunction:()=>_S,$ZodGUID:()=>yy,$ZodIPv4:()=>Ny,$ZodIPv6:()=>Oy,$ZodISODate:()=>Ty,$ZodISODateTime:()=>Py,$ZodISODuration:()=>Ay,$ZodISOTime:()=>zy,$ZodIntersection:()=>iS,$ZodJWT:()=>Zy,$ZodKSUID:()=>Ey,$ZodLazy:()=>bS,$ZodLiteral:()=>uS,$ZodMAC:()=>Dy,$ZodMap:()=>sS,$ZodNaN:()=>SS,$ZodNanoID:()=>_y,$ZodNever:()=>Xy,$ZodNonOptional:()=>hS,$ZodNull:()=>Gy,$ZodNullable:()=>fS,$ZodNumber:()=>Ad,$ZodNumberFormat:()=>Wy,$ZodObject:()=>BP,$ZodObjectJIT:()=>tS,$ZodOptional:()=>Dd,$ZodPipe:()=>Rd,$ZodPrefault:()=>gS,$ZodPreprocess:()=>wS,$ZodPromise:()=>kS,$ZodReadonly:()=>xS,$ZodRealError:()=>Bt,$ZodRecord:()=>oS,$ZodRegistry:()=>Ud,$ZodSet:()=>aS,$ZodString:()=>Ui,$ZodStringFormat:()=>ke,$ZodSuccess:()=>vS,$ZodSymbol:()=>By,$ZodTemplateLiteral:()=>$S,$ZodTransform:()=>dS,$ZodTuple:()=>Od,$ZodType:()=>oe,$ZodULID:()=>Iy,$ZodURL:()=>xy,$ZodUUID:()=>Sy,$ZodUndefined:()=>Hy,$ZodUnion:()=>ul,$ZodUnknown:()=>Ky,$ZodVoid:()=>Yy,$ZodXID:()=>Cy,$ZodXor:()=>nS,$brand:()=>av,$constructor:()=>k,$input:()=>ES,$output:()=>CS,Doc:()=>al,JSONSchema:()=>Yw,JSONSchemaGenerator:()=>vp,NEVER:()=>sv,TimePrecision:()=>AS,_any:()=>QS,_array:()=>sw,_base64:()=>ip,_base64url:()=>op,_bigint:()=>BS,_boolean:()=>WS,_catch:()=>NU,_check:()=>GT,_cidrv4:()=>np,_cidrv6:()=>rp,_coercedBigint:()=>HS,_coercedBoolean:()=>qS,_coercedDate:()=>iw,_coercedNumber:()=>LS,_coercedString:()=>TS,_cuid:()=>Jd,_cuid2:()=>Kd,_custom:()=>lw,_date:()=>rw,_decode:()=>vd,_decodeAsync:()=>Sd,_default:()=>TU,_discriminatedUnion:()=>yU,_e164:()=>sp,_email:()=>Zd,_emoji:()=>Hd,_encode:()=>hd,_encodeAsync:()=>yd,_endsWith:()=>ss,_enum:()=>kU,_file:()=>aw,_float32:()=>US,_float64:()=>FS,_gt:()=>nr,_gte:()=>Dt,_guid:()=>pl,_includes:()=>is,_int:()=>jS,_int32:()=>ZS,_int64:()=>GS,_intersection:()=>SU,_ipv4:()=>ep,_ipv6:()=>tp,_isoDate:()=>OS,_isoDateTime:()=>NS,_isoDuration:()=>RS,_isoTime:()=>DS,_jwt:()=>ap,_ksuid:()=>Qd,_lazy:()=>MU,_length:()=>Wi,_literal:()=>IU,_lowercase:()=>ns,_lt:()=>tr,_lte:()=>an,_mac:()=>zS,_map:()=>$U,_max:()=>an,_maxLength:()=>Vi,_maxSize:()=>ui,_mime:()=>as,_min:()=>Dt,_minLength:()=>kr,_minSize:()=>rr,_multipleOf:()=>li,_nan:()=>ow,_nanoid:()=>Gd,_nativeEnum:()=>bU,_negative:()=>up,_never:()=>tw,_nonnegative:()=>dp,_nonoptional:()=>zU,_nonpositive:()=>cp,_normalize:()=>ls,_null:()=>YS,_nullable:()=>PU,_number:()=>MS,_optional:()=>EU,_overwrite:()=>Fn,_parse:()=>Jo,_parseAsync:()=>Ko,_pipe:()=>OU,_positive:()=>lp,_promise:()=>LU,_property:()=>pp,_readonly:()=>DU,_record:()=>xU,_refine:()=>uw,_regex:()=>ts,_safeDecode:()=>xd,_safeDecodeAsync:()=>_d,_safeEncode:()=>wd,_safeEncodeAsync:()=>$d,_safeParse:()=>Xo,_safeParseAsync:()=>Yo,_set:()=>_U,_size:()=>Zi,_slugify:()=>ps,_startsWith:()=>os,_string:()=>PS,_stringFormat:()=>fs,_stringbool:()=>fw,_success:()=>AU,_superRefine:()=>cw,_symbol:()=>KS,_templateLiteral:()=>RU,_toLowerCase:()=>cs,_toUpperCase:()=>ds,_transform:()=>CU,_trim:()=>us,_tuple:()=>wU,_uint32:()=>VS,_uint64:()=>JS,_ulid:()=>Xd,_undefined:()=>XS,_union:()=>hU,_unknown:()=>ew,_uppercase:()=>rs,_url:()=>fl,_uuid:()=>Vd,_uuidv4:()=>Wd,_uuidv6:()=>qd,_uuidv7:()=>Bd,_void:()=>nw,_xid:()=>Yd,_xor:()=>vU,clone:()=>Nt,config:()=>We,createStandardJSONSchemaMethod:()=>ms,createToJSONSchemaMethod:()=>mw,decode:()=>L4,decodeAsync:()=>U4,describe:()=>dw,encode:()=>M4,encodeAsync:()=>j4,extractDefs:()=>di,finalize:()=>pi,flattenError:()=>rl,formatError:()=>il,globalConfig:()=>Mi,globalRegistry:()=>gt,initializeContext:()=>ci,isValidBase64:()=>Ly,isValidBase64URL:()=>ZP,isValidJWT:()=>VP,locales:()=>Fi,meta:()=>pw,parse:()=>md,parseAsync:()=>gd,prettifyError:()=>wv,process:()=>ye,regexes:()=>Ht,registry:()=>Fd,safeDecode:()=>Z4,safeDecodeAsync:()=>W4,safeEncode:()=>F4,safeEncodeAsync:()=>V4,safeParse:()=>xv,safeParseAsync:()=>$v,toDotPath:()=>xP,toJSONSchema:()=>hp,treeifyError:()=>Sv,util:()=>D,version:()=>hy});var gP,sv=Object.freeze({status:"aborted"});function k(e,t,n){var a;function i(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);let p=s.prototype,l=Object.keys(p);for(let f=0;f<l.length;f++){let m=l[f];m in u||(u[m]=p[m].bind(u))}}let r=(a=n==null?void 0:n.Parent)!=null?a:Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function s(u){var l;var d;let p=n!=null&&n.Parent?new o:this;i(p,u),(l=(d=p._zod).deferred)!=null||(d.deferred=[]);for(let f of p._zod.deferred)f();return p}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>{var d,p;return n!=null&&n.Parent&&u instanceof n.Parent?!0:(p=(d=u==null?void 0:u._zod)==null?void 0:d.traits)==null?void 0:p.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}var av=Symbol("zod_brand"),Un=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ri=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},hP;(hP=(gP=globalThis).__zod_globalConfig)!=null||(gP.__zod_globalConfig={});var Mi=globalThis.__zod_globalConfig;function We(e){return e&&Object.assign(Mi,e),Mi}var D={};Vn(D,{BIGINT_FORMAT_RANGES:()=>vv,Class:()=>uv,NUMBER_FORMAT_RANGES:()=>hv,aborted:()=>ai,allowsEval:()=>pv,assert:()=>g4,assertEqual:()=>d4,assertIs:()=>f4,assertNever:()=>m4,assertNotEqual:()=>p4,assignProp:()=>oi,base64ToUint8Array:()=>yP,base64urlToUint8Array:()=>A4,cached:()=>Ho,captureStackTrace:()=>fd,cleanEnum:()=>z4,cleanRegex:()=>Ya,clone:()=>Nt,cloneDef:()=>v4,createTransparentProxy:()=>_4,defineLazy:()=>ce,esc:()=>pd,escapeRegex:()=>Cn,explicitlyAborted:()=>yv,extend:()=>I4,finalizeIssue:()=>Ot,floatSafeRemainder:()=>cv,getElementAtPath:()=>y4,getEnumValues:()=>Xa,getLengthableOrigin:()=>tl,getParsedType:()=>$4,getSizableOrigin:()=>el,hexToUint8Array:()=>O4,isObject:()=>Li,isPlainObject:()=>si,issue:()=>Go,joinValues:()=>P,jsonStringifyReplacer:()=>Bo,merge:()=>E4,mergeDefs:()=>_r,normalizeParams:()=>j,nullish:()=>ii,numKeys:()=>x4,objectClone:()=>h4,omit:()=>b4,optionalKeys:()=>gv,parsedType:()=>O,partial:()=>P4,pick:()=>k4,prefixIssues:()=>qt,primitiveTypes:()=>mv,promiseAllObject:()=>S4,propertyKeyTypes:()=>Qa,randomString:()=>w4,required:()=>T4,safeExtend:()=>C4,shallowClone:()=>fv,slugify:()=>dv,stringifyPrimitive:()=>N,uint8ArrayToBase64:()=>SP,uint8ArrayToBase64url:()=>N4,uint8ArrayToHex:()=>D4,unwrapMessage:()=>Ka});function d4(e){return e}function p4(e){return e}function f4(e){}function m4(e){throw new Error("Unexpected value in exhaustive check")}function g4(e){}function Xa(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function P(e,t="|"){return e.map(n=>N(n)).join(t)}function Bo(e,t){return typeof t=="bigint"?t.toString():t}function Ho(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function ii(e){return e==null}function Ya(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function cv(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var vP=Symbol("evaluating");function ce(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==vP)return i===void 0&&(i=vP,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function h4(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function oi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function _r(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function v4(e){return _r(e._zod.def)}function y4(e,t){return t?t.reduce((n,i)=>n==null?void 0:n[i],e):e}function S4(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function w4(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function pd(e){return JSON.stringify(e)}function dv(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var fd="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Li(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var pv=Ho(()=>{var e;if(Mi.jitless||typeof navigator!="undefined"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{let t=Function;return new t(""),!0}catch(t){return!1}});function si(e){if(Li(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Li(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function fv(e){return si(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function x4(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var $4=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!="undefined"&&e instanceof Map?"map":typeof Set!="undefined"&&e instanceof Set?"set":typeof Date!="undefined"&&e instanceof Date?"date":typeof File!="undefined"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Qa=new Set(["string","number","symbol"]),mv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Cn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Nt(e,t,n){let i=new e._zod.constr(t!=null?t:e._zod.def);return(!t||n!=null&&n.parent)&&(i._zod.parent=e),i}function j(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new 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 _4(e){let t;return new Proxy({},{get(n,i,r){return t!=null||(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t!=null||(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t!=null||(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t!=null||(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t!=null||(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t!=null||(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t!=null||(t=e()),Reflect.defineProperty(t,i,r)}})}function N(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function gv(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var hv={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},vv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function k4(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=_r(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a])}return oi(this,"shape",s),s},checks:[]});return Nt(e,o)}function b4(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=_r(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a]}return oi(this,"shape",s),s},checks:[]});return Nt(e,o)}function I4(e,t){if(!si(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=_r(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return oi(this,"shape",o),o}});return Nt(e,r)}function C4(e,t){if(!si(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=_r(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return oi(this,"shape",i),i}});return Nt(e,n)}function E4(e,t){var i,r;if((i=e._zod.def.checks)!=null&&i.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=_r(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return oi(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:(r=t._zod.def.checks)!=null?r:[]});return Nt(e,n)}function P4(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=_r(t._zod.def,{get shape(){let a=t._zod.def.shape,u={...a};if(n)for(let d in n){if(!(d in a))throw new Error(`Unrecognized key: "${d}"`);n[d]&&(u[d]=e?new e({type:"optional",innerType:a[d]}):a[d])}else for(let d in a)u[d]=e?new e({type:"optional",innerType:a[d]}):a[d];return oi(this,"shape",u),u},checks:[]});return Nt(t,s)}function T4(e,t,n){let i=_r(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let s in n){if(!(s in o))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(o[s]=new e({type:"nonoptional",innerType:r[s]}))}else for(let s in r)o[s]=new e({type:"nonoptional",innerType:r[s]});return oi(this,"shape",o),o}});return Nt(t,i)}function ai(e,t=0){var n;if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)!==!0)return!0;return!1}function yv(e,t=0){var n;if(e.aborted===!0)return!0;for(let i=t;i<e.issues.length;i++)if(((n=e.issues[i])==null?void 0:n.continue)===!1)return!0;return!1}function qt(e,t){return t.map(n=>{var r;var i;return(r=(i=n).path)!=null||(i.path=[]),n.path.unshift(e),n})}function Ka(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ot(e,t,n){var u,d,p,l,f,m,g,h,x,y,v;let i=e.message?e.message:(y=(x=(g=(f=Ka((p=(d=(u=e.inst)==null?void 0:u._zod.def)==null?void 0:d.error)==null?void 0:p.call(d,e)))!=null?f:Ka((l=t==null?void 0:t.error)==null?void 0:l.call(t,e)))!=null?g:Ka((m=n.customError)==null?void 0:m.call(n,e)))!=null?x:Ka((h=n.localeError)==null?void 0:h.call(n,e)))!=null?y:"Invalid input",{inst:r,continue:o,input:s,...a}=e;return(v=a.path)!=null||(a.path=[]),a.message=i,t!=null&&t.reportInput&&(a.input=s),a}function el(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function tl(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function O(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 n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Go(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function z4(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function yP(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function SP(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function A4(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return yP(t+n)}function N4(e){return SP(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function O4(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function D4(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var uv=class{constructor(...t){}};var wP=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Bo,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},nl=k("$ZodError",wP),Bt=k("$ZodError",wP,{Parent:Error});function rl(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function il(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>i({issues:a},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let a=[...o,...s.path];if(a.length===0)n._errors.push(t(s));else{let u=n,d=0;for(;d<a.length;){let p=a[d];d===a.length-1?(u[p]=u[p]||{_errors:[]},u[p]._errors.push(t(s))):u[p]=u[p]||{_errors:[]},u=u[p],d++}}}};return i(e),n}function Sv(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var u,d,p,l;var s,a;for(let f of r.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(m=>i({issues:m},[...o,...f.path]));else if(f.code==="invalid_key")i({issues:f.issues},[...o,...f.path]);else if(f.code==="invalid_element")i({issues:f.issues},[...o,...f.path]);else{let m=[...o,...f.path];if(m.length===0){n.errors.push(t(f));continue}let g=n,h=0;for(;h<m.length;){let x=m[h],y=h===m.length-1;typeof x=="string"?((u=g.properties)!=null||(g.properties={}),(d=(s=g.properties)[x])!=null||(s[x]={errors:[]}),g=g.properties[x]):((p=g.items)!=null||(g.items=[]),(l=(a=g.items)[x])!=null||(a[x]={errors:[]}),g=g.items[x]),y&&g.errors.push(t(f)),h++}}};return i(e),n}function xP(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function wv(e){var i;let t=[],n=[...e.issues].sort((r,o)=>{var s,a;return((s=r.path)!=null?s:[]).length-((a=o.path)!=null?a:[]).length});for(let r of n)t.push(`\u2716 ${r.message}`),(i=r.path)!=null&&i.length&&t.push(` \u2192 at ${xP(r.path)}`);return t.join(`
117
+ `)}var Jo=e=>(t,n,i,r)=>{var a;let o=i?{...i,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Un;if(s.issues.length){let u=new((a=r==null?void 0:r.Err)!=null?a:e)(s.issues.map(d=>Ot(d,o,We())));throw fd(u,r==null?void 0:r.callee),u}return s.value},md=Jo(Bt),Ko=e=>async(t,n,i,r)=>{var a;let o=i?{...i,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new((a=r==null?void 0:r.Err)!=null?a:e)(s.issues.map(d=>Ot(d,o,We())));throw fd(u,r==null?void 0:r.callee),u}return s.value},gd=Ko(Bt),Xo=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Un;return o.issues.length?{success:!1,error:new(e!=null?e:nl)(o.issues.map(s=>Ot(s,r,We())))}:{success:!0,data:o.value}},xv=Xo(Bt),Yo=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(s=>Ot(s,r,We())))}:{success:!0,data:o.value}},$v=Yo(Bt),hd=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Jo(e)(t,n,r)},M4=hd(Bt),vd=e=>(t,n,i)=>Jo(e)(t,n,i),L4=vd(Bt),yd=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Ko(e)(t,n,r)},j4=yd(Bt),Sd=e=>async(t,n,i)=>Ko(e)(t,n,i),U4=Sd(Bt),wd=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Xo(e)(t,n,r)},F4=wd(Bt),xd=e=>(t,n,i)=>Xo(e)(t,n,i),Z4=xd(Bt),$d=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Yo(e)(t,n,r)},V4=$d(Bt),_d=e=>async(t,n,i)=>Yo(e)(t,n,i),W4=_d(Bt);var Ht={};Vn(Ht,{base64:()=>Lv,base64url:()=>kd,bigint:()=>qv,boolean:()=>Hv,browserEmail:()=>Y4,cidrv4:()=>Rv,cidrv6:()=>Mv,cuid:()=>_v,cuid2:()=>kv,date:()=>Fv,datetime:()=>Vv,domain:()=>tj,duration:()=>Pv,e164:()=>Uv,email:()=>zv,emoji:()=>Av,extendedDuration:()=>q4,guid:()=>Tv,hex:()=>nj,hostname:()=>ej,html5Email:()=>J4,httpProtocol:()=>jv,idnEmail:()=>X4,integer:()=>Bv,ipv4:()=>Nv,ipv6:()=>Ov,ksuid:()=>Cv,lowercase:()=>Kv,mac:()=>Dv,md5_base64:()=>ij,md5_base64url:()=>oj,md5_hex:()=>rj,nanoid:()=>Ev,null:()=>Gv,number:()=>bd,rfc5322Email:()=>K4,sha1_base64:()=>aj,sha1_base64url:()=>lj,sha1_hex:()=>sj,sha256_base64:()=>cj,sha256_base64url:()=>dj,sha256_hex:()=>uj,sha384_base64:()=>fj,sha384_base64url:()=>mj,sha384_hex:()=>pj,sha512_base64:()=>hj,sha512_base64url:()=>vj,sha512_hex:()=>gj,string:()=>Wv,time:()=>Zv,ulid:()=>bv,undefined:()=>Jv,unicodeEmail:()=>$P,uppercase:()=>Xv,uuid:()=>ji,uuid4:()=>B4,uuid6:()=>H4,uuid7:()=>G4,xid:()=>Iv});var _v=/^[cC][0-9a-z]{6,}$/,kv=/^[0-9a-z]+$/,bv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Iv=/^[0-9a-vA-V]{20}$/,Cv=/^[A-Za-z0-9]{27}$/,Ev=/^[a-zA-Z0-9_-]{21}$/,Pv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,q4=/^[-+]?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)?)??$/,Tv=/^([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})$/,ji=e=>e?new 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)$/,B4=ji(4),H4=ji(6),G4=ji(7),zv=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,J4=/^[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])?)*$/,K4=/^(([^<>()\[\]\\.,;:\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,}))$/,$P=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,X4=$P,Y4=/^[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])?)*$/,Q4="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Av(){return new RegExp(Q4,"u")}var Nv=/^(?:(?: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])$/,Ov=/^(([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}|:))$/,Dv=e=>{let t=Cn(e!=null?e:":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Rv=/^((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])$/,Mv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Lv=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,kd=/^[A-Za-z0-9_-]*$/,ej=/^(?=.{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])?)*\.?$/,tj=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,jv=/^https?$/,Uv=/^\+[1-9]\d{6,14}$/,_P="(?:(?:\\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])))",Fv=new RegExp(`^${_P}$`);function kP(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}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Zv(e){return new RegExp(`^${kP(e)}$`)}function Vv(e){let t=kP({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${_P}T(?:${i})$`)}var Wv=e=>{var n,i;let t=e?`[\\s\\S]{${(n=e==null?void 0:e.minimum)!=null?n:0},${(i=e==null?void 0:e.maximum)!=null?i:""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},qv=/^-?\d+n?$/,Bv=/^-?\d+$/,bd=/^-?\d+(?:\.\d+)?$/,Hv=/^(?:true|false)$/i,Gv=/^null$/i;var Jv=/^undefined$/i;var Kv=/^[^A-Z]*$/,Xv=/^[^a-z]*$/,nj=/^[0-9a-fA-F]*$/;function ol(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function sl(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var rj=/^[0-9a-fA-F]{32}$/,ij=ol(22,"=="),oj=sl(22),sj=/^[0-9a-fA-F]{40}$/,aj=ol(27,"="),lj=sl(27),uj=/^[0-9a-fA-F]{64}$/,cj=ol(43,"="),dj=sl(43),pj=/^[0-9a-fA-F]{96}$/,fj=ol(64,""),mj=sl(64),gj=/^[0-9a-fA-F]{128}$/,hj=ol(86,"=="),vj=sl(86);var Ie=k("$ZodCheck",(e,t)=>{var i,r;var n;(i=e._zod)!=null||(e._zod={}),e._zod.def=t,(r=(n=e._zod).onattach)!=null||(n.onattach=[])}),IP={number:"number",bigint:"bigint",object:"date"},Id=k("$ZodCheckLessThan",(e,t)=>{Ie.init(e,t);let n=IP[typeof t.value];e._zod.onattach.push(i=>{var s;let r=i._zod.bag,o=(s=t.inclusive?r.maximum:r.exclusiveMaximum)!=null?s:Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cd=k("$ZodCheckGreaterThan",(e,t)=>{Ie.init(e,t);let n=IP[typeof t.value];e._zod.onattach.push(i=>{var s;let r=i._zod.bag,o=(s=t.inclusive?r.minimum:r.exclusiveMinimum)!=null?s:Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Yv=k("$ZodCheckMultipleOf",(e,t)=>{Ie.init(e,t),e._zod.onattach.push(n=>{var r;var i;(r=(i=n._zod.bag).multipleOf)!=null||(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):cv(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})}}),Qv=k("$ZodCheckNumberFormat",(e,t)=>{var s;Ie.init(e,t),t.format=t.format||"float64";let n=(s=t.format)==null?void 0:s.includes("int"),i=n?"int":"number",[r,o]=hv[t.format];e._zod.onattach.push(a=>{let u=a._zod.bag;u.format=t.format,u.minimum=r,u.maximum=o,n&&(u.pattern=Bv)}),e._zod.check=a=>{let u=a.value;if(n){if(!Number.isInteger(u)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?a.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}u<r&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),u>o&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),ey=k("$ZodCheckBigIntFormat",(e,t)=>{Ie.init(e,t);let[n,i]=vv[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),ty=k("$ZodCheckMaxSize",(e,t)=>{var i;var n;Ie.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let o=r.value;return!ii(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{var s;let o=(s=r._zod.bag.maximum)!=null?s:Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;o.size<=t.maximum||r.issues.push({origin:el(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ny=k("$ZodCheckMinSize",(e,t)=>{var i;var n;Ie.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let o=r.value;return!ii(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{var s;let o=(s=r._zod.bag.minimum)!=null?s:Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;o.size>=t.minimum||r.issues.push({origin:el(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ry=k("$ZodCheckSizeEquals",(e,t)=>{var i;var n;Ie.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let o=r.value;return!ii(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,s=o.size;if(s===t.size)return;let a=s>t.size;r.issues.push({origin:el(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),iy=k("$ZodCheckMaxLength",(e,t)=>{var i;var n;Ie.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let o=r.value;return!ii(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{var s;let o=(s=r._zod.bag.maximum)!=null?s:Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let a=tl(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oy=k("$ZodCheckMinLength",(e,t)=>{var i;var n;Ie.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let o=r.value;return!ii(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{var s;let o=(s=r._zod.bag.minimum)!=null?s:Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let a=tl(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),sy=k("$ZodCheckLengthEquals",(e,t)=>{var i;var n;Ie.init(e,t),(i=(n=e._zod.def).when)!=null||(n.when=r=>{let o=r.value;return!ii(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,s=o.length;if(s===t.length)return;let a=tl(o),u=s>t.length;r.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Qo=k("$ZodCheckStringFormat",(e,t)=>{var r,o;var n,i;Ie.init(e,t),e._zod.onattach.push(s=>{var u;let a=s._zod.bag;a.format=t.format,t.pattern&&((u=a.patterns)!=null||(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=(n=e._zod).check)!=null||(n.check=s=>{t.pattern.lastIndex=0,!t.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:t.format,input:s.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=(i=e._zod).check)!=null||(i.check=()=>{})}),ay=k("$ZodCheckRegex",(e,t)=>{Qo.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})}}),ly=k("$ZodCheckLowerCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Kv),Qo.init(e,t)}),uy=k("$ZodCheckUpperCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Xv),Qo.init(e,t)}),cy=k("$ZodCheckIncludes",(e,t)=>{Ie.init(e,t);let n=Cn(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{var s;let o=r._zod.bag;(s=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),dy=k("$ZodCheckStartsWith",(e,t)=>{var i;Ie.init(e,t);let n=new RegExp(`^${Cn(t.prefix)}.*`);(i=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(r=>{var s;let o=r._zod.bag;(s=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),py=k("$ZodCheckEndsWith",(e,t)=>{var i;Ie.init(e,t);let n=new RegExp(`.*${Cn(t.suffix)}$`);(i=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(r=>{var s;let o=r._zod.bag;(s=o.patterns)!=null||(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function bP(e,t,n){e.issues.length&&t.issues.push(...qt(n,e.issues))}var fy=k("$ZodCheckProperty",(e,t)=>{Ie.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>bP(r,n,t.property));bP(i,n,t.property)}}),my=k("$ZodCheckMimeType",(e,t)=>{Ie.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),gy=k("$ZodCheckOverwrite",(e,t)=>{Ie.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var al=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
118
+ `).filter(s=>s),r=Math.min(...i.map(s=>s.length-s.trimStart().length)),o=i.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of o)this.content.push(s)}compile(){var o;let t=Function,n=this==null?void 0:this.args,r=[...((o=this==null?void 0:this.content)!=null?o:[""]).map(s=>` ${s}`)];return new t(...n,r.join(`
119
+ `))}};var hy={major:4,minor:4,patch:3};var oe=k("$ZodType",(e,t)=>{var r,o,s;var n;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=hy;let i=[...(r=e._zod.def.checks)!=null?r:[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let a of i)for(let u of a._zod.onattach)u(e);if(i.length===0)(o=(n=e._zod).deferred)!=null||(n.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{let a=(d,p,l)=>{let f=ai(d),m;for(let g of p){if(g._zod.def.when){if(yv(d)||!g._zod.def.when(d))continue}else if(f)continue;let h=d.issues.length,x=g._zod.check(d);if(x instanceof Promise&&(l==null?void 0:l.async)===!1)throw new Un;if(m||x instanceof Promise)m=(m!=null?m:Promise.resolve()).then(async()=>{await x,d.issues.length!==h&&(f||(f=ai(d,h)))});else{if(d.issues.length===h)continue;f||(f=ai(d,h))}}return m?m.then(()=>d):d},u=(d,p,l)=>{if(ai(d))return d.aborted=!0,d;let f=a(p,i,l);if(f instanceof Promise){if(l.async===!1)throw new Un;return f.then(m=>e._zod.parse(m,l))}return e._zod.parse(f,l)};e._zod.run=(d,p)=>{if(p.skipChecks)return e._zod.parse(d,p);if(p.direction==="backward"){let f=e._zod.parse({value:d.value,issues:[]},{...p,skipChecks:!0});return f instanceof Promise?f.then(m=>u(m,d,p)):u(f,d,p)}let l=e._zod.parse(d,p);if(l instanceof Promise){if(p.async===!1)throw new Un;return l.then(f=>a(f,i,p))}return a(l,i,p)}}ce(e,"~standard",()=>({validate:a=>{var u;try{let d=xv(e,a);return d.success?{value:d.data}:{issues:(u=d.error)==null?void 0:u.issues}}catch(d){return $v(e,a).then(p=>{var l;return p.success?{value:p.data}:{issues:(l=p.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}))}),Ui=k("$ZodString",(e,t)=>{var n,i,r;oe.init(e,t),e._zod.pattern=(r=[...(i=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?i:[]].pop())!=null?r:Wv(e._zod.bag),e._zod.parse=(o,s)=>{if(t.coerce)try{o.value=String(o.value)}catch(a){}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),ke=k("$ZodStringFormat",(e,t)=>{Qo.init(e,t),Ui.init(e,t)}),yy=k("$ZodGUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Tv),ke.init(e,t)}),Sy=k("$ZodUUID",(e,t)=>{var n,i;if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);(n=t.pattern)!=null||(t.pattern=ji(o))}else(i=t.pattern)!=null||(t.pattern=ji());ke.init(e,t)}),wy=k("$ZodEmail",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=zv),ke.init(e,t)}),xy=k("$ZodURL",(e,t)=>{ke.init(e,t),e._zod.check=n=>{var i;try{let r=n.value.trim();if(!t.normalize&&((i=t.protocol)==null?void 0:i.source)===jv.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),$y=k("$ZodEmoji",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Av()),ke.init(e,t)}),_y=k("$ZodNanoID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Ev),ke.init(e,t)}),ky=k("$ZodCUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=_v),ke.init(e,t)}),by=k("$ZodCUID2",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=kv),ke.init(e,t)}),Iy=k("$ZodULID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=bv),ke.init(e,t)}),Cy=k("$ZodXID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Iv),ke.init(e,t)}),Ey=k("$ZodKSUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Cv),ke.init(e,t)}),Py=k("$ZodISODateTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Vv(t)),ke.init(e,t)}),Ty=k("$ZodISODate",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Fv),ke.init(e,t)}),zy=k("$ZodISOTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Zv(t)),ke.init(e,t)}),Ay=k("$ZodISODuration",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Pv),ke.init(e,t)}),Ny=k("$ZodIPv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Nv),ke.init(e,t),e._zod.bag.format="ipv4"}),Oy=k("$ZodIPv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Ov),ke.init(e,t),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch(r){i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!t.abort})}}}),Dy=k("$ZodMAC",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Dv(t.delimiter)),ke.init(e,t),e._zod.bag.format="mac"}),Ry=k("$ZodCIDRv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Rv),ke.init(e,t)}),My=k("$ZodCIDRv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Mv),ke.init(e,t),e._zod.check=i=>{let r=i.value.split("/");try{if(r.length!==2)throw new Error;let[o,s]=r;if(!s)throw new Error;let a=Number(s);if(`${a}`!==s)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${o}]`)}catch(o){i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!t.abort})}}});function Ly(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch(t){return!1}}var jy=k("$ZodBase64",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Lv),ke.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Ly(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!t.abort})}});function ZP(e){if(!kd.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ly(n)}var Uy=k("$ZodBase64URL",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=kd),ke.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{ZP(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!t.abort})}}),Fy=k("$ZodE164",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Uv),ke.init(e,t)});function VP(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch(n){return!1}}var Zy=k("$ZodJWT",(e,t)=>{ke.init(e,t),e._zod.check=n=>{VP(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Vy=k("$ZodCustomStringFormat",(e,t)=>{ke.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Ad=k("$ZodNumber",(e,t)=>{var n;oe.init(e,t),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:bd,e._zod.parse=(i,r)=>{if(t.coerce)try{i.value=Number(i.value)}catch(a){}let o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;let s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),i}}),Wy=k("$ZodNumberFormat",(e,t)=>{Qv.init(e,t),Ad.init(e,t)}),ll=k("$ZodBoolean",(e,t)=>{oe.init(e,t),e._zod.pattern=Hv,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(o){}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Nd=k("$ZodBigInt",(e,t)=>{oe.init(e,t),e._zod.pattern=qv,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch(r){}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),qy=k("$ZodBigIntFormat",(e,t)=>{ey.init(e,t),Nd.init(e,t)}),By=k("$ZodSymbol",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Hy=k("$ZodUndefined",(e,t)=>{oe.init(e,t),e._zod.pattern=Jv,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="undefined"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Gy=k("$ZodNull",(e,t)=>{oe.init(e,t),e._zod.pattern=Gv,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Jy=k("$ZodAny",(e,t)=>{oe.init(e,t),e._zod.parse=n=>n}),Ky=k("$ZodUnknown",(e,t)=>{oe.init(e,t),e._zod.parse=n=>n}),Xy=k("$ZodNever",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Yy=k("$ZodVoid",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="undefined"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Qy=k("$ZodDate",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(a){}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function EP(e,t,n){e.issues.length&&t.issues.push(...qt(n,e.issues)),t.value[n]=e.value}var eS=k("$ZodArray",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let s=0;s<r.length;s++){let a=r[s],u=t.element._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(d=>EP(d,n,s))):EP(u,n,s)}return o.length?Promise.all(o).then(()=>n):n}});function zd(e,t,n,i,r,o){let s=n in i;if(e.issues.length){if(r&&o&&!s)return;t.issues.push(...qt(n,e.issues))}if(!s&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?s&&(t.value[n]=void 0):t.value[n]=e.value}function WP(e){var i,r,o,s;let t=Object.keys(e.shape);for(let a of t)if(!((s=(o=(r=(i=e.shape)==null?void 0:i[a])==null?void 0:r._zod)==null?void 0:o.traits)!=null&&s.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);let n=gv(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function qP(e,t,n,i,r,o){let s=[],a=r.keySet,u=r.catchall._zod,d=u.def.type,p=u.optin==="optional",l=u.optout==="optional";for(let f in t){if(f==="__proto__"||a.has(f))continue;if(d==="never"){s.push(f);continue}let m=u.run({value:t[f],issues:[]},i);m instanceof Promise?e.push(m.then(g=>zd(g,n,f,t,p,l))):zd(m,n,f,t,p,l)}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var BP=k("$ZodObject",(e,t)=>{oe.init(e,t);let n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...a};return Object.defineProperty(t,"shape",{value:u}),u}})}let i=Ho(()=>WP(t));ce(e._zod,"propValues",()=>{var d;let a=t.shape,u={};for(let p in a){let l=a[p]._zod;if(l.values){(d=u[p])!=null||(u[p]=new Set);for(let f of l.values)u[p].add(f)}}return u});let r=Li,o=t.catchall,s;e._zod.parse=(a,u)=>{s!=null||(s=i.value);let d=a.value;if(!r(d))return a.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),a;a.value={};let p=[],l=s.shape;for(let f of s.keys){let m=l[f],g=m._zod.optin==="optional",h=m._zod.optout==="optional",x=m._zod.run({value:d[f],issues:[]},u);x instanceof Promise?p.push(x.then(y=>zd(y,a,f,d,g,h))):zd(x,a,f,d,g,h)}return o?qP(p,d,a,u,i.value,e):p.length?Promise.all(p).then(()=>a):a}}),tS=k("$ZodObjectJIT",(e,t)=>{BP.init(e,t);let n=e._zod.parse,i=Ho(()=>WP(t)),r=f=>{var S,w;let m=new al(["shape","payload","ctx"]),g=i.value,h=$=>{let _=pd($);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};m.write("const input = payload.value;");let x=Object.create(null),y=0;for(let $ of g.keys)x[$]=`key_${y++}`;m.write("const newResult = {};");for(let $ of g.keys){let _=x[$],I=pd($),b=f[$],T=((S=b==null?void 0:b._zod)==null?void 0:S.optin)==="optional",A=((w=b==null?void 0:b._zod)==null?void 0:w.optout)==="optional";m.write(`const ${_} = ${h($)};`),T&&A?m.write(`
120
+ if (${_}.issues.length) {
121
+ if (${I} in input) {
122
+ payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
123
+ ...iss,
124
+ path: iss.path ? [${I}, ...iss.path] : [${I}]
125
+ })));
126
+ }
127
+ }
128
+
129
+ if (${_}.value === undefined) {
130
+ if (${I} in input) {
131
+ newResult[${I}] = undefined;
132
+ }
133
+ } else {
134
+ newResult[${I}] = ${_}.value;
135
+ }
136
+
137
+ `):T?m.write(`
138
+ if (${_}.issues.length) {
139
+ payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
140
+ ...iss,
141
+ path: iss.path ? [${I}, ...iss.path] : [${I}]
142
+ })));
143
+ }
144
+
145
+ if (${_}.value === undefined) {
146
+ if (${I} in input) {
147
+ newResult[${I}] = undefined;
148
+ }
149
+ } else {
150
+ newResult[${I}] = ${_}.value;
151
+ }
152
+
153
+ `):m.write(`
154
+ const ${_}_present = ${I} in input;
155
+ if (${_}.issues.length) {
156
+ payload.issues = payload.issues.concat(${_}.issues.map(iss => ({
157
+ ...iss,
158
+ path: iss.path ? [${I}, ...iss.path] : [${I}]
159
+ })));
160
+ }
161
+ if (!${_}_present && !${_}.issues.length) {
162
+ payload.issues.push({
163
+ code: "invalid_type",
164
+ expected: "nonoptional",
165
+ input: undefined,
166
+ path: [${I}]
167
+ });
168
+ }
169
+
170
+ if (${_}_present) {
171
+ if (${_}.value === undefined) {
172
+ newResult[${I}] = undefined;
173
+ } else {
174
+ newResult[${I}] = ${_}.value;
175
+ }
176
+ }
177
+
178
+ `)}m.write("payload.value = newResult;"),m.write("return payload;");let v=m.compile();return($,_)=>v(f,$,_)},o,s=Li,a=!Mi.jitless,d=a&&pv.value,p=t.catchall,l;e._zod.parse=(f,m)=>{l!=null||(l=i.value);let g=f.value;return s(g)?a&&d&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(o||(o=r(t.shape)),f=o(f,m),p?qP([],g,f,m,l,e):f):n(f,m):(f.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),f)}});function PP(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!ai(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>Ot(s,i,We())))}),t)}var ul=k("$ZodUnion",(e,t)=>{oe.init(e,t),ce(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),ce(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ce(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),ce(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Ya(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,s=[];for(let a of t.options){let u=a._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(a=>PP(a,i,e,r)):PP(s,i,e,r)}});function TP(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(s=>Ot(s,i,We())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var nS=k("$ZodXor",(e,t)=>{ul.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,s=[];for(let a of t.options){let u=a._zod.run({value:i.value,issues:[]},r);u instanceof Promise?(s.push(u),o=!0):s.push(u)}return o?Promise.all(s).then(a=>TP(a,i,e,r)):TP(s,i,e,r)}}),rS=k("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ul.init(e,t);let n=e._zod.parse;ce(e._zod,"propValues",()=>{let r={};for(let o of t.options){let s=o._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[a,u]of Object.entries(s)){r[a]||(r[a]=new Set);for(let d of u)r[a].add(d)}}return r});let i=Ho(()=>{var s;let r=t.options,o=new Map;for(let a of r){let u=(s=a._zod.propValues)==null?void 0:s[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let d of u){if(o.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);o.set(d,a)}}return o});e._zod.parse=(r,o)=>{let s=r.value;if(!Li(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=i.value.get(s==null?void 0:s[t.discriminator]);return a?a._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:s,path:[t.discriminator],inst:e}),r)}}),iS=k("$ZodIntersection",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),s=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||s instanceof Promise?Promise.all([o,s]).then(([u,d])=>zP(n,u,d)):zP(n,o,s)}});function vy(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(si(e)&&si(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let s=vy(e[o],t[o]);if(!s.valid)return{valid:!1,mergeErrorPath:[o,...s.mergeErrorPath]};r[o]=s.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],s=vy(r,o);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function zP(e,t,n){let i=new Map,r;for(let a of t.issues)if(a.code==="unrecognized_keys"){r!=null||(r=a);for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let u of a.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(a);let o=[...i].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(o.length&&r&&e.issues.push({...r,keys:o}),ai(e))return e;let s=vy(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var Od=k("$ZodTuple",(e,t)=>{oe.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],a=AP(n,"optin"),u=AP(n,"optout");if(!t.rest){if(o.length<a)return i.issues.push({code:"too_small",minimum:a,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let d=new Array(n.length);for(let p=0;p<n.length;p++){let l=n[p]._zod.run({value:o[p],issues:[]},r);l instanceof Promise?s.push(l.then(f=>{d[p]=f})):d[p]=l}if(t.rest){let p=n.length-1,l=o.slice(n.length);for(let f of l){p++;let m=t.rest._zod.run({value:f,issues:[]},r);m instanceof Promise?s.push(m.then(g=>NP(g,i,p))):NP(m,i,p)}}return s.length?Promise.all(s).then(()=>OP(d,i,n,o,u)):OP(d,i,n,o,u)}});function AP(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function NP(e,t,n){e.issues.length&&t.issues.push(...qt(n,e.issues)),t.value[n]=e.value}function OP(e,t,n,i,r){for(let o=0;o<n.length;o++){let s=e[o],a=o<i.length;if(s.issues.length){if(!a&&o>=r){t.value.length=o;break}t.issues.push(...qt(o,s.issues))}t.value[o]=s.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var oS=k("$ZodRecord",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!si(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){a.add(typeof d=="number"?d.toString():d);let p=t.keyType._zod.run({value:d,issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(m=>Ot(m,i,We())),input:d,path:[d],inst:e});continue}let l=p.value,f=t.valueType._zod.run({value:r[d],issues:[]},i);f instanceof Promise?o.push(f.then(m=>{m.issues.length&&n.issues.push(...qt(d,m.issues)),n.value[l]=m.value})):(f.issues.length&&n.issues.push(...qt(d,f.issues)),n.value[l]=f.value)}let u;for(let d in r)a.has(d)||(u=u!=null?u:[],u.push(d));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let u=t.keyType._zod.run({value:a,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&bd.test(a)&&u.issues.length){let l=t.keyType._zod.run({value:Number(a),issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");l.issues.length===0&&(u=l)}if(u.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(l=>Ot(l,i,We())),input:a,path:[a],inst:e});continue}let p=t.valueType._zod.run({value:r[a],issues:[]},i);p instanceof Promise?o.push(p.then(l=>{l.issues.length&&n.issues.push(...qt(a,l.issues)),n.value[u.value]=l.value})):(p.issues.length&&n.issues.push(...qt(a,p.issues)),n.value[u.value]=p.value)}}return o.length?Promise.all(o).then(()=>n):n}}),sS=k("$ZodMap",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[s,a]of r){let u=t.keyType._zod.run({value:s,issues:[]},i),d=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise||d instanceof Promise?o.push(Promise.all([u,d]).then(([p,l])=>{DP(p,l,n,s,r,e,i)})):DP(u,d,n,s,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function DP(e,t,n,i,r,o,s){e.issues.length&&(Qa.has(typeof i)?n.issues.push(...qt(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(a=>Ot(a,s,We()))})),t.issues.length&&(Qa.has(typeof i)?n.issues.push(...qt(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(a=>Ot(a,s,We()))})),n.value.set(e.value,t.value)}var aS=k("$ZodSet",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let s of r){let a=t.valueType._zod.run({value:s,issues:[]},i);a instanceof Promise?o.push(a.then(u=>RP(u,n))):RP(a,n)}return o.length?Promise.all(o).then(()=>n):n}});function RP(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var lS=k("$ZodEnum",(e,t)=>{oe.init(e,t);let n=Xa(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>Qa.has(typeof r)).map(r=>typeof r=="string"?Cn(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let s=r.value;return i.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r}}),uS=k("$ZodLiteral",(e,t)=>{if(oe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?Cn(i):i?Cn(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),cS=k("$ZodFile",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),dS=k("$ZodTransform",(e,t)=>{oe.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ri(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n.fallback=!0,n));if(r instanceof Promise)throw new Un;return n.value=r,n.fallback=!0,n}});function MP(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Dd=k("$ZodOptional",(e,t)=>{oe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ce(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ce(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ya(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(s=>MP(s,r)):MP(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),pS=k("$ZodExactOptional",(e,t)=>{Dd.init(e,t),ce(e._zod,"values",()=>t.innerType._zod.values),ce(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),fS=k("$ZodNullable",(e,t)=>{oe.init(e,t),ce(e._zod,"optin",()=>t.innerType._zod.optin),ce(e._zod,"optout",()=>t.innerType._zod.optout),ce(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Ya(n.source)}|null)$`):void 0}),ce(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),mS=k("$ZodDefault",(e,t)=>{oe.init(e,t),e._zod.optin="optional",ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>LP(o,t)):LP(r,t)}});function LP(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var gS=k("$ZodPrefault",(e,t)=>{oe.init(e,t),e._zod.optin="optional",ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),hS=k("$ZodNonOptional",(e,t)=>{oe.init(e,t),ce(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>jP(o,e)):jP(r,e)}});function jP(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var vS=k("$ZodSuccess",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ri("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),yS=k("$ZodCatch",(e,t)=>{oe.init(e,t),e._zod.optin="optional",ce(e._zod,"optout",()=>t.innerType._zod.optout),ce(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(s=>Ot(s,i,We()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>Ot(o,i,We()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),SS=k("$ZodNaN",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Rd=k("$ZodPipe",(e,t)=>{oe.init(e,t),ce(e._zod,"values",()=>t.in._zod.values),ce(e._zod,"optin",()=>t.in._zod.optin),ce(e._zod,"optout",()=>t.out._zod.optout),ce(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Ed(s,t.in,i)):Ed(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Ed(o,t.out,i)):Ed(r,t.out,i)}});function Ed(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var cl=k("$ZodCodec",(e,t)=>{oe.init(e,t),ce(e._zod,"values",()=>t.in._zod.values),ce(e._zod,"optin",()=>t.in._zod.optin),ce(e._zod,"optout",()=>t.out._zod.optout),ce(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(s=>Pd(s,t,i)):Pd(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(s=>Pd(s,t,i)):Pd(o,t,i)}}});function Pd(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>Td(e,o,t.out,n)):Td(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Td(e,o,t.in,n)):Td(e,r,t.in,n)}}function Td(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var wS=k("$ZodPreprocess",(e,t)=>{Rd.init(e,t)}),xS=k("$ZodReadonly",(e,t)=>{oe.init(e,t),ce(e._zod,"propValues",()=>t.innerType._zod.propValues),ce(e._zod,"values",()=>t.innerType._zod.values),ce(e._zod,"optin",()=>{var n,i;return(i=(n=t.innerType)==null?void 0:n._zod)==null?void 0:i.optin}),ce(e._zod,"optout",()=>{var n,i;return(i=(n=t.innerType)==null?void 0:n._zod)==null?void 0:i.optout}),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(UP):UP(r)}});function UP(e){return e.value=Object.freeze(e.value),e}var $S=k("$ZodTemplateLiteral",(e,t)=>{oe.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,s))}else if(i===null||mv.has(typeof i))n.push(Cn(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>{var o;return typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:(o=t.format)!=null?o:"template_literal",pattern:e._zod.pattern.source}),i)}}),_S=k("$ZodFunction",(e,t)=>(oe.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?md(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?md(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await gd(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await gd(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Od({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),kS=k("$ZodPromise",(e,t)=>{oe.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),bS=k("$ZodLazy",(e,t)=>{oe.init(e,t),ce(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),ce(e._zod,"pattern",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.pattern}),ce(e._zod,"propValues",()=>{var n,i;return(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.propValues}),ce(e._zod,"optin",()=>{var n,i,r;return(r=(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optin)!=null?r:void 0}),ce(e._zod,"optout",()=>{var n,i,r;return(r=(i=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:i.optout)!=null?r:void 0}),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),IS=k("$ZodCustom",(e,t)=>{Ie.init(e,t),oe.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>FP(o,n,i,e));FP(r,n,i,e)}});function FP(e,t,n,i){var r;if(!e){let o={code:"custom",input:n,inst:i,path:[...(r=i._zod.def.path)!=null?r:[]],continue:!i._zod.def.abort};i._zod.def.params&&(o.params=i._zod.def.params),t.issues.push(Go(o))}}var Fi={};Vn(Fi,{ar:()=>HP,az:()=>GP,be:()=>KP,bg:()=>XP,ca:()=>YP,cs:()=>QP,da:()=>eT,de:()=>tT,el:()=>nT,en:()=>Md,eo:()=>rT,es:()=>iT,fa:()=>oT,fi:()=>sT,fr:()=>aT,frCA:()=>lT,he:()=>uT,hr:()=>cT,hu:()=>dT,hy:()=>fT,id:()=>mT,is:()=>gT,it:()=>hT,ja:()=>vT,ka:()=>yT,kh:()=>ST,km:()=>Ld,ko:()=>wT,lt:()=>$T,mk:()=>_T,ms:()=>kT,nl:()=>bT,no:()=>IT,ota:()=>CT,pl:()=>PT,ps:()=>ET,pt:()=>TT,ro:()=>zT,ru:()=>NT,sl:()=>OT,sv:()=>DT,ta:()=>RT,th:()=>MT,tr:()=>LT,ua:()=>jT,uk:()=>jd,ur:()=>UT,uz:()=>FT,vi:()=>ZT,yo:()=>qT,zhCN:()=>VT,zhTW:()=>WT});var Sj=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${m}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${l}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${m}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${N(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${(a=r.origin)!=null?a:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${l} ${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${(d=r.origin)!=null?d:"\u0627\u0644\u0642\u064A\u0645\u0629"} ${l} ${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${l} ${r.minimum.toString()} ${f.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${l} ${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:l.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${l.suffix}"`:l.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${l.includes}"`:l.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${l.pattern}`:`${(p=n[l.format])!=null?p:r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${P(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function HP(){return{localeError:Sj()}}var wj=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){var o;return(o=e[r])!=null?o: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",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${m}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${l}, daxil olan ${m}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${N(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(a=r.origin)!=null?a:"d\u0259y\u0259r"} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${(d=r.origin)!=null?d:"d\u0259y\u0259r"} ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${l}${r.minimum.toString()} ${f.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${l.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:l.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${l.suffix}" il\u0259 bitm\u0259lidir`:l.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${l.includes}" daxil olmal\u0131d\u0131r`:l.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${l.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${P(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function GP(){return{localeError:wj()}}function JP(e,t,n,i){let r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?n:i}var xj=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{var o,s,a,u,d;switch(r.code){case"invalid_type":{let p=(o=i[r.expected])!=null?o:r.expected,l=O(r.input),f=(s=i[l])!=null?s:l;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${f}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${p}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${f}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${N(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${P(r.values,"|")}`;case"too_big":{let p=r.inclusive?"<=":"<",l=t(r.origin);if(l){let f=Number(r.maximum),m=JP(f,l.unit.one,l.unit.few,l.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${(a=r.origin)!=null?a:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${l.verb} ${p}${r.maximum.toString()} ${m}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${(u=r.origin)!=null?u:"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${p}${r.maximum.toString()}`}case"too_small":{let p=r.inclusive?">=":">",l=t(r.origin);if(l){let f=Number(r.minimum),m=JP(f,l.unit.one,l.unit.few,l.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${l.verb} ${p}${r.minimum.toString()} ${m}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${p}${r.minimum.toString()}`}case"invalid_format":{let p=r;return p.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${p.prefix}"`:p.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${p.suffix}"`:p.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${p.includes}"`:p.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${p.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${(d=n[p.format])!=null?d:r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${P(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function KP(){return{localeError:xj()}}var $j=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${m}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${l}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${m}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${N(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${(a=r.origin)!=null?a:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${(d=r.origin)!=null?d:"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${l}${r.minimum.toString()} ${f.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;if(l.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${l.prefix}"`;if(l.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${l.suffix}"`;if(l.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${l.includes}"`;if(l.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${l.pattern}`;let f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return l.format==="emoji"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="datetime"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="date"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),l.format==="time"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),l.format==="duration"&&(f="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${f} ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${P(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function XP(){return{localeError:$j()}}var _j=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${m}`:`Tipus inv\xE0lid: s'esperava ${l}, s'ha rebut ${m}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${N(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${P(r.values," o ")}`;case"too_big":{let l=r.inclusive?"com a m\xE0xim":"menys de",f=t(r.origin);return f?`Massa gran: s'esperava que ${(a=r.origin)!=null?a:"el valor"} contingu\xE9s ${l} ${r.maximum.toString()} ${(u=f.unit)!=null?u:"elements"}`:`Massa gran: s'esperava que ${(d=r.origin)!=null?d:"el valor"} fos ${l} ${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?"com a m\xEDnim":"m\xE9s de",f=t(r.origin);return f?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${l} ${r.minimum.toString()} ${f.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${l} ${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${l.prefix}"`:l.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${l.suffix}"`:l.format==="includes"?`Format inv\xE0lid: ha d'incloure "${l.includes}"`:l.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${l.pattern}`:`Format inv\xE0lid per a ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function YP(){return{localeError:_j()}}var kj=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{var o,s,a,u,d,p,l,f,m;switch(r.code){case"invalid_type":{let g=(o=i[r.expected])!=null?o:r.expected,h=O(r.input),x=(s=i[h])!=null?s:h;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${x}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${g}, obdr\u017Eeno ${x}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${N(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${P(r.values,"|")}`;case"too_big":{let g=r.inclusive?"<=":"<",h=t(r.origin);return h?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(a=r.origin)!=null?a:"hodnota"} mus\xED m\xEDt ${g}${r.maximum.toString()} ${(u=h.unit)!=null?u:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${(d=r.origin)!=null?d:"hodnota"} mus\xED b\xFDt ${g}${r.maximum.toString()}`}case"too_small":{let g=r.inclusive?">=":">",h=t(r.origin);return h?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(p=r.origin)!=null?p:"hodnota"} mus\xED m\xEDt ${g}${r.minimum.toString()} ${(l=h.unit)!=null?l:"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${(f=r.origin)!=null?f:"hodnota"} mus\xED b\xFDt ${g}${r.minimum.toString()}`}case"invalid_format":{let g=r;return g.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${g.prefix}"`:g.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${g.suffix}"`:g.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${g.includes}"`:g.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${g.pattern}`:`Neplatn\xFD form\xE1t ${(m=n[g.format])!=null?m:r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${P(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function QP(){return{localeError:kj()}}var bj=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"input",email:"e-mailadresse",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 dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${m}`:`Ugyldigt input: forventede ${l}, fik ${m}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${N(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin),m=(a=i[r.origin])!=null?a:r.origin;return f?`For stor: forventede ${m!=null?m:"value"} ${f.verb} ${l} ${r.maximum.toString()} ${(u=f.unit)!=null?u:"elementer"}`:`For stor: forventede ${m!=null?m:"value"} havde ${l} ${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin),m=(d=i[r.origin])!=null?d:r.origin;return f?`For lille: forventede ${m} ${f.verb} ${l} ${r.minimum.toString()} ${f.unit}`:`For lille: forventede ${m} havde ${l} ${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Ugyldig streng: skal starte med "${l.prefix}"`:l.format==="ends_with"?`Ugyldig streng: skal ende med "${l.suffix}"`:l.format==="includes"?`Ugyldig streng: skal indeholde "${l.includes}"`:l.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${l.pattern}`:`Ugyldig ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${P(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function eT(){return{localeError:bj()}}var Ij=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${m}`:`Ung\xFCltige Eingabe: erwartet ${l}, erhalten ${m}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${N(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Zu gro\xDF: erwartet, dass ${(a=r.origin)!=null?a:"Wert"} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${(d=r.origin)!=null?d:"Wert"} ${l}${r.maximum.toString()} ist`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Zu klein: erwartet, dass ${r.origin} ${l}${r.minimum.toString()} ${f.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${l}${r.minimum.toString()} ist`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Ung\xFCltiger String: muss mit "${l.prefix}" beginnen`:l.format==="ends_with"?`Ung\xFCltiger String: muss mit "${l.suffix}" enden`:l.format==="includes"?`Ung\xFCltiger String: muss "${l.includes}" enthalten`:l.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${l.pattern} entsprechen`:`Ung\xFCltig: ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${P(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function tT(){return{localeError:Ij()}}var Cj=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${m}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${l}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${m}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${N(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${(a=r.origin)!=null?a:"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${(d=r.origin)!=null?d:"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${l}${r.minimum.toString()} ${f.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${l.prefix}"`:l.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${l.suffix}"`:l.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${l.includes}"`:l.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${l.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${P(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function nT(){return{localeError:Cj()}}var Ej=()=>{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(r){var o;return(o=e[r])!=null?o: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",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return`Invalid input: expected ${l}, received ${m}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${N(r.values[0])}`:`Invalid option: expected one of ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Too big: expected ${(a=r.origin)!=null?a:"value"} to have ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elements"}`:`Too big: expected ${(d=r.origin)!=null?d:"value"} to be ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Too small: expected ${r.origin} to have ${l}${r.minimum.toString()} ${f.unit}`:`Too small: expected ${r.origin} to be ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Invalid string: must start with "${l.prefix}"`:l.format==="ends_with"?`Invalid string: must end with "${l.suffix}"`:l.format==="includes"?`Invalid string: must include "${l.includes}"`:l.format==="regex"?`Invalid string: must match pattern ${l.pattern}`:`Invalid ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(f=>`'${f}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Md(){return{localeError:Ej()}}var Pj=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${m}`:`Nevalida enigo: atendi\u011Dis ${l}, ricevi\u011Dis ${m}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${N(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Tro granda: atendi\u011Dis ke ${(a=r.origin)!=null?a:"valoro"} havu ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elementojn"}`:`Tro granda: atendi\u011Dis ke ${(d=r.origin)!=null?d:"valoro"} havu ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${l}${r.minimum.toString()} ${f.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${l.prefix}"`:l.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${l.suffix}"`:l.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${l.includes}"`:l.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${l.pattern}`:`Nevalida ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function rT(){return{localeError:Pj()}}var Tj=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{var o,s,a,u,d,p,l,f;switch(r.code){case"invalid_type":{let m=(o=i[r.expected])!=null?o:r.expected,g=O(r.input),h=(s=i[g])!=null?s:g;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${h}`:`Entrada inv\xE1lida: se esperaba ${m}, recibido ${h}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${N(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${P(r.values,"|")}`;case"too_big":{let m=r.inclusive?"<=":"<",g=t(r.origin),h=(a=i[r.origin])!=null?a:r.origin;return g?`Demasiado grande: se esperaba que ${h!=null?h:"valor"} tuviera ${m}${r.maximum.toString()} ${(u=g.unit)!=null?u:"elementos"}`:`Demasiado grande: se esperaba que ${h!=null?h:"valor"} fuera ${m}${r.maximum.toString()}`}case"too_small":{let m=r.inclusive?">=":">",g=t(r.origin),h=(d=i[r.origin])!=null?d:r.origin;return g?`Demasiado peque\xF1o: se esperaba que ${h} tuviera ${m}${r.minimum.toString()} ${g.unit}`:`Demasiado peque\xF1o: se esperaba que ${h} fuera ${m}${r.minimum.toString()}`}case"invalid_format":{let m=r;return m.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${m.prefix}"`:m.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${m.suffix}"`:m.format==="includes"?`Cadena inv\xE1lida: debe incluir "${m.includes}"`:m.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${m.pattern}`:`Inv\xE1lido ${(p=n[m.format])!=null?p:r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${(l=i[r.origin])!=null?l:r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${(f=i[r.origin])!=null?f:r.origin}`;default:return"Entrada inv\xE1lida"}}};function iT(){return{localeError:Tj()}}var zj=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${m} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${l} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${m} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${N(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${P(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(a=r.origin)!=null?a:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${(d=r.origin)!=null?d:"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${l}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${l}${r.minimum.toString()} ${f.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${l}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${l.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:l.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${l.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:l.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${l.includes}" \u0628\u0627\u0634\u062F`:l.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${l.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${(p=n[l.format])!=null?p:r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${P(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function oT(){return{localeError:zj()}}var Aj=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{var o,s,a;switch(r.code){case"invalid_type":{let u=(o=i[r.expected])!=null?o:r.expected,d=O(r.input),p=(s=i[d])!=null?s:d;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${p}`:`Virheellinen tyyppi: odotettiin ${u}, oli ${p}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${N(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${P(r.values,"|")}`;case"too_big":{let u=r.inclusive?"<=":"<",d=t(r.origin);return d?`Liian suuri: ${d.subject} t\xE4ytyy olla ${u}${r.maximum.toString()} ${d.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${u}${r.maximum.toString()}`}case"too_small":{let u=r.inclusive?">=":">",d=t(r.origin);return d?`Liian pieni: ${d.subject} t\xE4ytyy olla ${u}${r.minimum.toString()} ${d.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${u}${r.minimum.toString()}`}case"invalid_format":{let u=r;return u.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${u.prefix}"`:u.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${u.suffix}"`:u.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${u.includes}"`:u.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${u.pattern}`:`Virheellinen ${(a=n[u.format])!=null?a:r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${P(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function sT(){return{localeError:Aj()}}var Nj=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{var o,s,a,u,d,p,l,f;switch(r.code){case"invalid_type":{let m=(o=i[r.expected])!=null?o:r.expected,g=O(r.input),h=(s=i[g])!=null?s:g;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${h} re\xE7u`:`Entr\xE9e invalide : ${m} attendu, ${h} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${N(r.values[0])} attendu`:`Option invalide : une valeur parmi ${P(r.values,"|")} attendue`;case"too_big":{let m=r.inclusive?"<=":"<",g=t(r.origin);return g?`Trop grand : ${(a=i[r.origin])!=null?a:"valeur"} doit ${g.verb} ${m}${r.maximum.toString()} ${(u=g.unit)!=null?u:"\xE9l\xE9ment(s)"}`:`Trop grand : ${(d=i[r.origin])!=null?d:"valeur"} doit \xEAtre ${m}${r.maximum.toString()}`}case"too_small":{let m=r.inclusive?">=":">",g=t(r.origin);return g?`Trop petit : ${(p=i[r.origin])!=null?p:"valeur"} doit ${g.verb} ${m}${r.minimum.toString()} ${g.unit}`:`Trop petit : ${(l=i[r.origin])!=null?l:"valeur"} doit \xEAtre ${m}${r.minimum.toString()}`}case"invalid_format":{let m=r;return m.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${m.prefix}"`:m.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${m.suffix}"`:m.format==="includes"?`Cha\xEEne invalide : doit inclure "${m.includes}"`:m.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${m.pattern}`:`${(f=n[m.format])!=null?f:r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${P(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function aT(){return{localeError:Nj()}}var Oj=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{var o,s,a,u,d;switch(r.code){case"invalid_type":{let p=(o=i[r.expected])!=null?o:r.expected,l=O(r.input),f=(s=i[l])!=null?s:l;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${f}`:`Entr\xE9e invalide : attendu ${p}, re\xE7u ${f}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${N(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${P(r.values,"|")}`;case"too_big":{let p=r.inclusive?"\u2264":"<",l=t(r.origin);return l?`Trop grand : attendu que ${(a=r.origin)!=null?a:"la valeur"} ait ${p}${r.maximum.toString()} ${l.unit}`:`Trop grand : attendu que ${(u=r.origin)!=null?u:"la valeur"} soit ${p}${r.maximum.toString()}`}case"too_small":{let p=r.inclusive?"\u2265":">",l=t(r.origin);return l?`Trop petit : attendu que ${r.origin} ait ${p}${r.minimum.toString()} ${l.unit}`:`Trop petit : attendu que ${r.origin} soit ${p}${r.minimum.toString()}`}case"invalid_format":{let p=r;return p.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${p.prefix}"`:p.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${p.suffix}"`:p.format==="includes"?`Cha\xEEne invalide : doit inclure "${p.includes}"`:p.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${p.pattern}`:`${(d=n[p.format])!=null?d:r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${P(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function lT(){return{localeError:Oj()}}var Dj=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=d=>d?e[d]:void 0,i=d=>{let p=n(d);return p?p.label:d!=null?d:e.unknown.label},r=d=>`\u05D4${i(d)}`,o=d=>{var f;let p=n(d);return((f=p==null?void 0:p.gender)!=null?f:"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA"},s=d=>{var p;return d&&(p=t[d])!=null?p:null},a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return d=>{var p,l,f,m,g,h,x,y,v,S,w,$,_,I,b,T,A,U,Z,R,V;switch(d.code){case"invalid_type":{let C=d.expected,L=(p=u[C!=null?C:""])!=null?p:i(C),E=O(d.input),z=(m=(f=u[E])!=null?f:(l=e[E])==null?void 0:l.label)!=null?m:E;return/^[A-Z]/.test(d.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${d.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${z}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${L}, \u05D4\u05EA\u05E7\u05D1\u05DC ${z}`}case"invalid_value":{if(d.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${N(d.values[0])}`;let C=d.values.map(z=>N(z));if(d.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${C[0]} \u05D0\u05D5 ${C[1]}`;let L=C[C.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${C.slice(0,-1).join(", ")} \u05D0\u05D5 ${L}`}case"too_big":{let C=s(d.origin),L=r((g=d.origin)!=null?g:"value");if(d.origin==="string")return`${(h=C==null?void 0:C.longLabel)!=null?h:"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${L} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.maximum.toString()} ${(x=C==null?void 0:C.unit)!=null?x:""} ${d.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(d.origin==="number"){let F=d.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${d.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${L} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${F}`}if(d.origin==="array"||d.origin==="set"){let F=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",G=d.inclusive?`${d.maximum} ${(y=C==null?void 0:C.unit)!=null?y:""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${d.maximum} ${(v=C==null?void 0:C.unit)!=null?v:""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${L} ${F} \u05DC\u05D4\u05DB\u05D9\u05DC ${G}`.trim()}let E=d.inclusive?"<=":"<",z=o((S=d.origin)!=null?S:"value");return C!=null&&C.unit?`${C.longLabel} \u05DE\u05D3\u05D9: ${L} ${z} ${E}${d.maximum.toString()} ${C.unit}`:`${(w=C==null?void 0:C.longLabel)!=null?w:"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${L} ${z} ${E}${d.maximum.toString()}`}case"too_small":{let C=s(d.origin),L=r(($=d.origin)!=null?$:"value");if(d.origin==="string")return`${(_=C==null?void 0:C.shortLabel)!=null?_:"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${L} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${d.minimum.toString()} ${(I=C==null?void 0:C.unit)!=null?I:""} ${d.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(d.origin==="number"){let F=d.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${d.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${d.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${L} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${F}`}if(d.origin==="array"||d.origin==="set"){let F=d.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(d.minimum===1&&d.inclusive){let re=(d.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${L} ${F} \u05DC\u05D4\u05DB\u05D9\u05DC ${re}`}let G=d.inclusive?`${d.minimum} ${(b=C==null?void 0:C.unit)!=null?b:""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${d.minimum} ${(T=C==null?void 0:C.unit)!=null?T:""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${L} ${F} \u05DC\u05D4\u05DB\u05D9\u05DC ${G}`.trim()}let E=d.inclusive?">=":">",z=o((A=d.origin)!=null?A:"value");return C!=null&&C.unit?`${C.shortLabel} \u05DE\u05D3\u05D9: ${L} ${z} ${E}${d.minimum.toString()} ${C.unit}`:`${(U=C==null?void 0:C.shortLabel)!=null?U:"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${L} ${z} ${E}${d.minimum.toString()}`}case"invalid_format":{let C=d;if(C.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${C.prefix}"`;if(C.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${C.suffix}"`;if(C.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${C.includes}"`;if(C.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${C.pattern}`;let L=a[C.format],E=(Z=L==null?void 0:L.label)!=null?Z:C.format,F=((R=L==null?void 0:L.gender)!=null?R:"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${E} \u05DC\u05D0 ${F}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${d.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${d.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${d.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${P(d.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r((V=d.origin)!=null?V:"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function uT(){return{localeError:Dj()}}var Rj=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{var o,s,a,u,d,p,l,f;switch(r.code){case"invalid_type":{let m=(o=i[r.expected])!=null?o:r.expected,g=O(r.input),h=(s=i[g])!=null?s:g;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${h}`:`Neispravan unos: o\u010Dekuje se ${m}, a primljeno je ${h}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${N(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${P(r.values,"|")}`;case"too_big":{let m=r.inclusive?"<=":"<",g=t(r.origin),h=(a=i[r.origin])!=null?a:r.origin;return g?`Preveliko: o\u010Dekivano da ${h!=null?h:"vrijednost"} ima ${m}${r.maximum.toString()} ${(u=g.unit)!=null?u:"elemenata"}`:`Preveliko: o\u010Dekivano da ${h!=null?h:"vrijednost"} bude ${m}${r.maximum.toString()}`}case"too_small":{let m=r.inclusive?">=":">",g=t(r.origin),h=(d=i[r.origin])!=null?d:r.origin;return g?`Premalo: o\u010Dekivano da ${h} ima ${m}${r.minimum.toString()} ${g.unit}`:`Premalo: o\u010Dekivano da ${h} bude ${m}${r.minimum.toString()}`}case"invalid_format":{let m=r;return m.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${m.prefix}"`:m.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${m.suffix}"`:m.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${m.includes}"`:m.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${m.pattern}`:`Neispravna ${(p=n[m.format])!=null?p:r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${P(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${(l=i[r.origin])!=null?l:r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${(f=i[r.origin])!=null?f:r.origin}`;default:return"Neispravan unos"}}};function cT(){return{localeError:Rj()}}var Mj=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${m}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${l}, a kapott \xE9rt\xE9k ${m}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${N(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`T\xFAl nagy: ${(a=r.origin)!=null?a:"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${(d=r.origin)!=null?d:"\xE9rt\xE9k"} t\xFAl nagy: ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${l}${r.minimum.toString()} ${f.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\xC9rv\xE9nytelen string: "${l.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:l.format==="ends_with"?`\xC9rv\xE9nytelen string: "${l.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:l.format==="includes"?`\xC9rv\xE9nytelen string: "${l.includes}" \xE9rt\xE9ket kell tartalmaznia`:l.format==="regex"?`\xC9rv\xE9nytelen string: ${l.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function dT(){return{localeError:Mj()}}function pT(e,t,n){return Math.abs(e)===1?t:n}function es(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var Lj=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{var o,s,a,u,d;switch(r.code){case"invalid_type":{let p=(o=i[r.expected])!=null?o:r.expected,l=O(r.input),f=(s=i[l])!=null?s:l;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${f}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${p}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${f}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${N(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${P(r.values,"|")}`;case"too_big":{let p=r.inclusive?"<=":"<",l=t(r.origin);if(l){let f=Number(r.maximum),m=pT(f,l.unit.one,l.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es((a=r.origin)!=null?a:"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${p}${r.maximum.toString()} ${m}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es((u=r.origin)!=null?u:"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${p}${r.maximum.toString()}`}case"too_small":{let p=r.inclusive?">=":">",l=t(r.origin);if(l){let f=Number(r.minimum),m=pT(f,l.unit.one,l.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${p}${r.minimum.toString()} ${m}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${es(r.origin)} \u056C\u056B\u0576\u056B ${p}${r.minimum.toString()}`}case"invalid_format":{let p=r;return p.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${p.prefix}"-\u0578\u057E`:p.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${p.suffix}"-\u0578\u057E`:p.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${p.includes}"`:p.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${p.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${(d=n[p.format])!=null?d:r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${P(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${es(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${es(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function fT(){return{localeError:Lj()}}var jj=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${m}`:`Input tidak valid: diharapkan ${l}, diterima ${m}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${N(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Terlalu besar: diharapkan ${(a=r.origin)!=null?a:"value"} memiliki ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elemen"}`:`Terlalu besar: diharapkan ${(d=r.origin)!=null?d:"value"} menjadi ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Terlalu kecil: diharapkan ${r.origin} memiliki ${l}${r.minimum.toString()} ${f.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`String tidak valid: harus dimulai dengan "${l.prefix}"`:l.format==="ends_with"?`String tidak valid: harus berakhir dengan "${l.suffix}"`:l.format==="includes"?`String tidak valid: harus menyertakan "${l.includes}"`:l.format==="regex"?`String tidak valid: harus sesuai pola ${l.pattern}`:`${(p=n[l.format])!=null?p:r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function mT(){return{localeError:jj()}}var Uj=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${m} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${m} \xFEar sem \xE1 a\xF0 vera ${l}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${N(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${(a=r.origin)!=null?a:"gildi"} hafi ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${(d=r.origin)!=null?d:"gildi"} s\xE9 ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${l}${r.minimum.toString()} ${f.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${l.prefix}"`:l.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${l.suffix}"`:l.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${l.includes}"`:l.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${l.pattern}`:`Rangt ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${P(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function gT(){return{localeError:Uj()}}var Fj=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${m}`:`Input non valido: atteso ${l}, ricevuto ${m}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${N(r.values[0])}`:`Opzione non valida: atteso uno tra ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Troppo grande: ${(a=r.origin)!=null?a:"valore"} deve avere ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elementi"}`:`Troppo grande: ${(d=r.origin)!=null?d:"valore"} deve essere ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Troppo piccolo: ${r.origin} deve avere ${l}${r.minimum.toString()} ${f.unit}`:`Troppo piccolo: ${r.origin} deve essere ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Stringa non valida: deve iniziare con "${l.prefix}"`:l.format==="ends_with"?`Stringa non valida: deve terminare con "${l.suffix}"`:l.format==="includes"?`Stringa non valida: deve includere "${l.includes}"`:l.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${l.pattern}`:`Input non valido: ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${P(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function hT(){return{localeError:Fj()}}var Zj=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${m}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${l}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${m}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${N(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${P(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let l=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",f=t(r.origin);return f?`\u5927\u304D\u3059\u304E\u308B\u5024: ${(a=r.origin)!=null?a:"\u5024"}\u306F${r.maximum.toString()}${(u=f.unit)!=null?u:"\u8981\u7D20"}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${(d=r.origin)!=null?d:"\u5024"}\u306F${r.maximum.toString()}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let l=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",f=t(r.origin);return f?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${f.unit}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${l}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${l.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:l.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${l.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:l.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${l.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:l.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${l.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${P(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function vT(){return{localeError:Zj()}}var Vj=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{var o,s,a,u,d;switch(r.code){case"invalid_type":{let p=(o=i[r.expected])!=null?o:r.expected,l=O(r.input),f=(s=i[l])!=null?s:l;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${f}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${p}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${f}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${N(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${P(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let p=r.inclusive?"<=":"<",l=t(r.origin);return l?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${(a=r.origin)!=null?a:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${l.verb} ${p}${r.maximum.toString()} ${l.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${(u=r.origin)!=null?u:"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${p}${r.maximum.toString()}`}case"too_small":{let p=r.inclusive?">=":">",l=t(r.origin);return l?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${l.verb} ${p}${r.minimum.toString()} ${l.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${p}${r.minimum.toString()}`}case"invalid_format":{let p=r;return p.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${p.prefix}"-\u10D8\u10D7`:p.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${p.suffix}"-\u10D8\u10D7`:p.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${p.includes}"-\u10E1`:p.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${p.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${(d=n[p.format])!=null?d:r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${P(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function yT(){return{localeError:Vj()}}var Wj=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${m}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${l} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${m}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${N(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(a=r.origin)!=null?a:"\u178F\u1798\u17D2\u179B\u17C3"} ${l} ${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${(d=r.origin)!=null?d:"\u178F\u1798\u17D2\u179B\u17C3"} ${l} ${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${l} ${r.minimum.toString()} ${f.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${l} ${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${l.prefix}"`:l.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${l.suffix}"`:l.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${l.includes}"`:l.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${l.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${P(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Ld(){return{localeError:Wj()}}function ST(){return Ld()}var qj=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p,l,f,m;switch(r.code){case"invalid_type":{let g=(o=i[r.expected])!=null?o:r.expected,h=O(r.input),x=(s=i[h])!=null?s:h;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${x}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${g}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${x}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${N(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${P(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let g=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",h=g==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",x=t(r.origin),y=(a=x==null?void 0:x.unit)!=null?a:"\uC694\uC18C";return x?`${(u=r.origin)!=null?u:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${y} ${g}${h}`:`${(d=r.origin)!=null?d:"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${g}${h}`}case"too_small":{let g=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",h=g==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",x=t(r.origin),y=(p=x==null?void 0:x.unit)!=null?p:"\uC694\uC18C";return x?`${(l=r.origin)!=null?l:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${y} ${g}${h}`:`${(f=r.origin)!=null?f:"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${g}${h}`}case"invalid_format":{let g=r;return g.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${g.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:g.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${g.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:g.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${g.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:g.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${g.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${(m=n[g.format])!=null?m:r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${P(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function wT(){return{localeError:qj()}}var dl=e=>e.charAt(0).toUpperCase()+e.slice(1);function xT(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var Bj=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,s,a){var d;let u=(d=e[r])!=null?d:null;return u===null?u:{unit:u.unit[o],verb:u.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{var o,s,a,u,d,p,l,f,m,g,h,x,y,v,S;switch(r.code){case"invalid_type":{let w=(o=i[r.expected])!=null?o:r.expected,$=O(r.input),_=(s=i[$])!=null?s:$;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${_}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${_}, o tik\u0117tasi - ${w}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${N(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${P(r.values,"|")} pasirinkim\u0173`;case"too_big":{let w=(a=i[r.origin])!=null?a:r.origin,$=t(r.origin,xT(Number(r.maximum)),(u=r.inclusive)!=null?u:!1,"smaller");if($!=null&&$.verb)return`${dl((d=w!=null?w:r.origin)!=null?d:"reik\u0161m\u0117")} ${$.verb} ${r.maximum.toString()} ${(p=$.unit)!=null?p:"element\u0173"}`;let _=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${dl((l=w!=null?w:r.origin)!=null?l:"reik\u0161m\u0117")} turi b\u016Bti ${_} ${r.maximum.toString()} ${$==null?void 0:$.unit}`}case"too_small":{let w=(f=i[r.origin])!=null?f:r.origin,$=t(r.origin,xT(Number(r.minimum)),(m=r.inclusive)!=null?m:!1,"bigger");if($!=null&&$.verb)return`${dl((g=w!=null?w:r.origin)!=null?g:"reik\u0161m\u0117")} ${$.verb} ${r.minimum.toString()} ${(h=$.unit)!=null?h:"element\u0173"}`;let _=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${dl((x=w!=null?w:r.origin)!=null?x:"reik\u0161m\u0117")} turi b\u016Bti ${_} ${r.minimum.toString()} ${$==null?void 0:$.unit}`}case"invalid_format":{let w=r;return w.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${w.prefix}"`:w.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${w.suffix}"`:w.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${w.includes}"`:w.format==="regex"?`Eilut\u0117 privalo atitikti ${w.pattern}`:`Neteisingas ${(y=n[w.format])!=null?y:r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${P(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let w=(v=i[r.origin])!=null?v:r.origin;return`${dl((S=w!=null?w:r.origin)!=null?S:"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function $T(){return{localeError:Bj()}}var Hj=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${m}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${l}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${m}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${N(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${(a=r.origin)!=null?a:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${(d=r.origin)!=null?d:"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${l}${r.minimum.toString()} ${f.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${l.prefix}"`:l.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${l.suffix}"`:l.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${l.includes}"`:l.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${l.pattern}`:`Invalid ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${P(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function _T(){return{localeError:Hj()}}var Gj=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${m}`:`Input tidak sah: dijangka ${l}, diterima ${m}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${N(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Terlalu besar: dijangka ${(a=r.origin)!=null?a:"nilai"} ${f.verb} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elemen"}`:`Terlalu besar: dijangka ${(d=r.origin)!=null?d:"nilai"} adalah ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Terlalu kecil: dijangka ${r.origin} ${f.verb} ${l}${r.minimum.toString()} ${f.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`String tidak sah: mesti bermula dengan "${l.prefix}"`:l.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${l.suffix}"`:l.format==="includes"?`String tidak sah: mesti mengandungi "${l.includes}"`:l.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${l.pattern}`:`${(p=n[l.format])!=null?p:r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${P(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function kT(){return{localeError:Gj()}}var Jj=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${m}`:`Ongeldige invoer: verwacht ${l}, ontving ${m}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${N(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin),m=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return f?`Te ${m}: verwacht dat ${(a=r.origin)!=null?a:"waarde"} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elementen"} ${f.verb}`:`Te ${m}: verwacht dat ${(d=r.origin)!=null?d:"waarde"} ${l}${r.maximum.toString()} is`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin),m=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return f?`Te ${m}: verwacht dat ${r.origin} ${l}${r.minimum.toString()} ${f.unit} ${f.verb}`:`Te ${m}: verwacht dat ${r.origin} ${l}${r.minimum.toString()} is`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Ongeldige tekst: moet met "${l.prefix}" beginnen`:l.format==="ends_with"?`Ongeldige tekst: moet op "${l.suffix}" eindigen`:l.format==="includes"?`Ongeldige tekst: moet "${l.includes}" bevatten`:l.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${l.pattern}`:`Ongeldig: ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function bT(){return{localeError:Jj()}}var Kj=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${m}`:`Ugyldig input: forventet ${l}, fikk ${m}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${N(r.values[0])}`:`Ugyldig valg: forventet en av ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`For stor(t): forventet ${(a=r.origin)!=null?a:"value"} til \xE5 ha ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elementer"}`:`For stor(t): forventet ${(d=r.origin)!=null?d:"value"} til \xE5 ha ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`For lite(n): forventet ${r.origin} til \xE5 ha ${l}${r.minimum.toString()} ${f.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${l.prefix}"`:l.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${l.suffix}"`:l.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${l.includes}"`:l.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${l.pattern}`:`Ugyldig ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${P(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function IT(){return{localeError:Kj()}}var Xj=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${m}`:`F\xE2sit giren: umulan ${l}, al\u0131nan ${m}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${N(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Fazla b\xFCy\xFCk: ${(a=r.origin)!=null?a:"value"}, ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${(d=r.origin)!=null?d:"value"}, ${l}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${l}${r.minimum.toString()} ${f.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${l}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let l=r;return l.format==="starts_with"?`F\xE2sit metin: "${l.prefix}" ile ba\u015Flamal\u0131.`:l.format==="ends_with"?`F\xE2sit metin: "${l.suffix}" ile bitmeli.`:l.format==="includes"?`F\xE2sit metin: "${l.includes}" ihtiv\xE2 etmeli.`:l.format==="regex"?`F\xE2sit metin: ${l.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function CT(){return{localeError:Xj()}}var Yj=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${m} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${l} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${m} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${N(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${P(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(a=r.origin)!=null?a:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${(d=r.origin)!=null?d:"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${l}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${l}${r.minimum.toString()} ${f.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${l}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${l.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:l.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${l.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:l.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${l.includes}" \u0648\u0644\u0631\u064A`:l.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${l.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${(p=n[l.format])!=null?p:r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${P(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function ET(){return{localeError:Yj()}}var Qj=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{var o,s,a,u,d,p,l,f,m;switch(r.code){case"invalid_type":{let g=(o=i[r.expected])!=null?o:r.expected,h=O(r.input),x=(s=i[h])!=null?s:h;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${x}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${g}, otrzymano ${x}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${N(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${P(r.values,"|")}`;case"too_big":{let g=r.inclusive?"<=":"<",h=t(r.origin);return h?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${(a=r.origin)!=null?a:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${g}${r.maximum.toString()} ${(u=h.unit)!=null?u:"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${(d=r.origin)!=null?d:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${g}${r.maximum.toString()}`}case"too_small":{let g=r.inclusive?">=":">",h=t(r.origin);return h?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${(p=r.origin)!=null?p:"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${g}${r.minimum.toString()} ${(l=h.unit)!=null?l:"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${(f=r.origin)!=null?f:"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${g}${r.minimum.toString()}`}case"invalid_format":{let g=r;return g.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${g.prefix}"`:g.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${g.suffix}"`:g.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${g.includes}"`:g.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${g.pattern}`:`Nieprawid\u0142ow(y/a/e) ${(m=n[g.format])!=null?m:r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function PT(){return{localeError:Qj()}}var eU=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${m}`:`Tipo inv\xE1lido: esperado ${l}, recebido ${m}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${N(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Muito grande: esperado que ${(a=r.origin)!=null?a:"valor"} tivesse ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elementos"}`:`Muito grande: esperado que ${(d=r.origin)!=null?d:"valor"} fosse ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Muito pequeno: esperado que ${r.origin} tivesse ${l}${r.minimum.toString()} ${f.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${l.prefix}"`:l.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${l.suffix}"`:l.format==="includes"?`Texto inv\xE1lido: deve incluir "${l.includes}"`:l.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${l.pattern}`:`${(p=n[l.format])!=null?p:r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${P(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function TT(){return{localeError:eU()}}var tU=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"intrare",email:"adres\u0103 de email",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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return`Intrare invalid\u0103: a\u0219teptat ${l}, primit ${m}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${N(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Prea mare: a\u0219teptat ca ${(a=r.origin)!=null?a:"valoarea"} ${f.verb} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elemente"}`:`Prea mare: a\u0219teptat ca ${(d=r.origin)!=null?d:"valoarea"} s\u0103 fie ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Prea mic: a\u0219teptat ca ${r.origin} ${f.verb} ${l}${r.minimum.toString()} ${f.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${l.prefix}"`:l.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${l.suffix}"`:l.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${l.includes}"`:l.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${l.pattern}`:`Format invalid: ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${P(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function zT(){return{localeError:tU()}}function AT(e,t,n,i){let r=Math.abs(e),o=r%10,s=r%100;return s>=11&&s<=19?i:o===1?t:o>=2&&o<=4?n:i}var nU=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{var o,s,a,u,d;switch(r.code){case"invalid_type":{let p=(o=i[r.expected])!=null?o:r.expected,l=O(r.input),f=(s=i[l])!=null?s:l;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${f}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${p}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${f}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${N(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${P(r.values,"|")}`;case"too_big":{let p=r.inclusive?"<=":"<",l=t(r.origin);if(l){let f=Number(r.maximum),m=AT(f,l.unit.one,l.unit.few,l.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${(a=r.origin)!=null?a:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${p}${r.maximum.toString()} ${m}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${(u=r.origin)!=null?u:"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${p}${r.maximum.toString()}`}case"too_small":{let p=r.inclusive?">=":">",l=t(r.origin);if(l){let f=Number(r.minimum),m=AT(f,l.unit.one,l.unit.few,l.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${p}${r.minimum.toString()} ${m}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${p}${r.minimum.toString()}`}case"invalid_format":{let p=r;return p.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${p.prefix}"`:p.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${p.suffix}"`:p.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${p.includes}"`:p.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${p.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${(d=n[p.format])!=null?d:r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${P(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function NT(){return{localeError:nU()}}var rU=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${m}`:`Neveljaven vnos: pri\u010Dakovano ${l}, prejeto ${m}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${N(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Preveliko: pri\u010Dakovano, da bo ${(a=r.origin)!=null?a:"vrednost"} imelo ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${(d=r.origin)!=null?d:"vrednost"} ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${l}${r.minimum.toString()} ${f.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${l.prefix}"`:l.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${l.suffix}"`:l.format==="includes"?`Neveljaven niz: mora vsebovati "${l.includes}"`:l.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${l.pattern}`:`Neveljaven ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${P(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function OT(){return{localeError:rU()}}var iU=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{var o,s,a,u,d,p,l,f,m,g;switch(r.code){case"invalid_type":{let h=(o=i[r.expected])!=null?o:r.expected,x=O(r.input),y=(s=i[x])!=null?s:x;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${y}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${h}, fick ${y}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${N(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${P(r.values,"|")}`;case"too_big":{let h=r.inclusive?"<=":"<",x=t(r.origin);return x?`F\xF6r stor(t): f\xF6rv\xE4ntade ${(a=r.origin)!=null?a:"v\xE4rdet"} att ha ${h}${r.maximum.toString()} ${(u=x.unit)!=null?u:"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${(d=r.origin)!=null?d:"v\xE4rdet"} att ha ${h}${r.maximum.toString()}`}case"too_small":{let h=r.inclusive?">=":">",x=t(r.origin);return x?`F\xF6r lite(t): f\xF6rv\xE4ntade ${(p=r.origin)!=null?p:"v\xE4rdet"} att ha ${h}${r.minimum.toString()} ${x.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${(l=r.origin)!=null?l:"v\xE4rdet"} att ha ${h}${r.minimum.toString()}`}case"invalid_format":{let h=r;return h.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${h.prefix}"`:h.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${h.suffix}"`:h.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${h.includes}"`:h.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${h.pattern}"`:`Ogiltig(t) ${(f=n[h.format])!=null?f:r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${P(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${(m=r.origin)!=null?m:"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${(g=r.origin)!=null?g:"v\xE4rdet"}`;default:return"Ogiltig input"}}};function DT(){return{localeError:iU()}}var oU=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${m}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${m}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${N(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${P(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${(a=r.origin)!=null?a:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${(d=r.origin)!=null?d:"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${l}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${l}${r.minimum.toString()} ${f.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${l}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${l.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:l.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${l.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:l.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${l.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:l.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${l.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${P(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function RT(){return{localeError:oU()}}var sU=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${m}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${l} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${m}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${N(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",f=t(r.origin);return f?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(a=r.origin)!=null?a:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${(d=r.origin)!=null?d:"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",f=t(r.origin);return f?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${r.minimum.toString()} ${f.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${l} ${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${l.prefix}"`:l.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${l.suffix}"`:l.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${l.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:l.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${l.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${P(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function MT(){return{localeError:sU()}}var aU=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${m}`:`Ge\xE7ersiz de\u011Fer: beklenen ${l}, al\u0131nan ${m}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${N(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\xC7ok b\xFCy\xFCk: beklenen ${(a=r.origin)!=null?a:"de\u011Fer"} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${(d=r.origin)!=null?d:"de\u011Fer"} ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${l}${r.minimum.toString()} ${f.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Ge\xE7ersiz metin: "${l.prefix}" ile ba\u015Flamal\u0131`:l.format==="ends_with"?`Ge\xE7ersiz metin: "${l.suffix}" ile bitmeli`:l.format==="includes"?`Ge\xE7ersiz metin: "${l.includes}" i\xE7ermeli`:l.format==="regex"?`Ge\xE7ersiz metin: ${l.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${P(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function LT(){return{localeError:aU()}}var lU=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${m}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${l}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${m}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${N(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${(a=r.origin)!=null?a:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${f.verb} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${(d=r.origin)!=null?d:"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${f.verb} ${l}${r.minimum.toString()} ${f.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${l.prefix}"`:l.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${l.suffix}"`:l.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${l.includes}"`:l.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${l.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${P(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function jd(){return{localeError:lU()}}function jT(){return jd()}var uU=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${m} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${l} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${m} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${N(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${P(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(a=r.origin)!=null?a:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${(d=r.origin)!=null?d:"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${l}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${l}${r.minimum.toString()} ${f.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${l}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${l.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:l.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${l.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:l.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${l.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:l.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${l.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${P(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function UT(){return{localeError:uU()}}var cU=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{var o,s,a,u,d;switch(r.code){case"invalid_type":{let p=(o=i[r.expected])!=null?o:r.expected,l=O(r.input),f=(s=i[l])!=null?s:l;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${f}`:`Noto\u2018g\u2018ri kirish: kutilgan ${p}, qabul qilingan ${f}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${N(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${P(r.values,"|")}`;case"too_big":{let p=r.inclusive?"<=":"<",l=t(r.origin);return l?`Juda katta: kutilgan ${(a=r.origin)!=null?a:"qiymat"} ${p}${r.maximum.toString()} ${l.unit} ${l.verb}`:`Juda katta: kutilgan ${(u=r.origin)!=null?u:"qiymat"} ${p}${r.maximum.toString()}`}case"too_small":{let p=r.inclusive?">=":">",l=t(r.origin);return l?`Juda kichik: kutilgan ${r.origin} ${p}${r.minimum.toString()} ${l.unit} ${l.verb}`:`Juda kichik: kutilgan ${r.origin} ${p}${r.minimum.toString()}`}case"invalid_format":{let p=r;return p.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${p.prefix}" bilan boshlanishi kerak`:p.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${p.suffix}" bilan tugashi kerak`:p.format==="includes"?`Noto\u2018g\u2018ri satr: "${p.includes}" ni o\u2018z ichiga olishi kerak`:p.format==="regex"?`Noto\u2018g\u2018ri satr: ${p.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${(d=n[p.format])!=null?d:r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${P(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function FT(){return{localeError:cU()}}var dU=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${m}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${l}, nh\u1EADn \u0111\u01B0\u1EE3c ${m}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${N(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(a=r.origin)!=null?a:"gi\xE1 tr\u1ECB"} ${f.verb} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${(d=r.origin)!=null?d:"gi\xE1 tr\u1ECB"} ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${f.verb} ${l}${r.minimum.toString()} ${f.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${l.prefix}"`:l.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${l.suffix}"`:l.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${l.includes}"`:l.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${l.pattern}`:`${(p=n[l.format])!=null?p:r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${P(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function ZT(){return{localeError:dU()}}var pU=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${m}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${l}\uFF0C\u5B9E\u9645\u63A5\u6536 ${m}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${N(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(a=r.origin)!=null?a:"\u503C"} ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${(d=r.origin)!=null?d:"\u503C"} ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${l}${r.minimum.toString()} ${f.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${l.prefix}" \u5F00\u5934`:l.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${l.suffix}" \u7ED3\u5C3E`:l.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${l.includes}"`:l.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${l.pattern}`:`\u65E0\u6548${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${P(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function VT(){return{localeError:pU()}}var fU=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{var o,s,a,u,d,p;switch(r.code){case"invalid_type":{let l=(o=i[r.expected])!=null?o:r.expected,f=O(r.input),m=(s=i[f])!=null?s:f;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${m}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${l}\uFF0C\u4F46\u6536\u5230 ${m}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${N(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${P(r.values,"|")}`;case"too_big":{let l=r.inclusive?"<=":"<",f=t(r.origin);return f?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(a=r.origin)!=null?a:"\u503C"} \u61C9\u70BA ${l}${r.maximum.toString()} ${(u=f.unit)!=null?u:"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${(d=r.origin)!=null?d:"\u503C"} \u61C9\u70BA ${l}${r.maximum.toString()}`}case"too_small":{let l=r.inclusive?">=":">",f=t(r.origin);return f?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${l}${r.minimum.toString()} ${f.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${l}${r.minimum.toString()}`}case"invalid_format":{let l=r;return l.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${l.prefix}" \u958B\u982D`:l.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${l.suffix}" \u7D50\u5C3E`:l.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${l.includes}"`:l.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${l.pattern}`:`\u7121\u6548\u7684 ${(p=n[l.format])!=null?p:r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${P(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function WT(){return{localeError:fU()}}var mU=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){var o;return(o=e[r])!=null?o:null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{var o,s,a,u;switch(r.code){case"invalid_type":{let d=(o=i[r.expected])!=null?o:r.expected,p=O(r.input),l=(s=i[p])!=null?s:p;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${d}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${N(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${P(r.values,"|")}`;case"too_big":{let d=r.inclusive?"<=":"<",p=t(r.origin);return p?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${(a=r.origin)!=null?a:"iye"} ${p.verb} ${d}${r.maximum} ${p.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${d}${r.maximum}`}case"too_small":{let d=r.inclusive?">=":">",p=t(r.origin);return p?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${p.verb} ${d}${r.minimum} ${p.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${d}${r.minimum}`}case"invalid_format":{let d=r;return d.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${d.prefix}"`:d.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${d.suffix}"`:d.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${d.includes}"`:d.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${d.pattern}`:`A\u1E63\xEC\u1E63e: ${(u=n[d.format])!=null?u:r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${P(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function qT(){return{localeError:mU()}}var BT,CS=Symbol("ZodOutput"),ES=Symbol("ZodInput"),Ud=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){var i;let n=t._zod.parent;if(n){let r={...(i=this.get(n))!=null?i:{}};delete r.id;let o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Fd(){return new Ud}var HT;(HT=(BT=globalThis).__zod_globalRegistry)!=null||(BT.__zod_globalRegistry=Fd());var gt=globalThis.__zod_globalRegistry;function PS(e,t){return new e({type:"string",...j(t)})}function TS(e,t){return new e({type:"string",coerce:!0,...j(t)})}function Zd(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...j(t)})}function pl(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...j(t)})}function Vd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...j(t)})}function Wd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...j(t)})}function qd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...j(t)})}function Bd(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...j(t)})}function fl(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...j(t)})}function Hd(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...j(t)})}function Gd(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...j(t)})}function Jd(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...j(t)})}function Kd(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...j(t)})}function Xd(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...j(t)})}function Yd(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...j(t)})}function Qd(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...j(t)})}function ep(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...j(t)})}function tp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...j(t)})}function zS(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...j(t)})}function np(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...j(t)})}function rp(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...j(t)})}function ip(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...j(t)})}function op(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...j(t)})}function sp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...j(t)})}function ap(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...j(t)})}var AS={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function NS(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...j(t)})}function OS(e,t){return new e({type:"string",format:"date",check:"string_format",...j(t)})}function DS(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...j(t)})}function RS(e,t){return new e({type:"string",format:"duration",check:"string_format",...j(t)})}function MS(e,t){return new e({type:"number",checks:[],...j(t)})}function LS(e,t){return new e({type:"number",coerce:!0,checks:[],...j(t)})}function jS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...j(t)})}function US(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...j(t)})}function FS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...j(t)})}function ZS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...j(t)})}function VS(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...j(t)})}function WS(e,t){return new e({type:"boolean",...j(t)})}function qS(e,t){return new e({type:"boolean",coerce:!0,...j(t)})}function BS(e,t){return new e({type:"bigint",...j(t)})}function HS(e,t){return new e({type:"bigint",coerce:!0,...j(t)})}function GS(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...j(t)})}function JS(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...j(t)})}function KS(e,t){return new e({type:"symbol",...j(t)})}function XS(e,t){return new e({type:"undefined",...j(t)})}function YS(e,t){return new e({type:"null",...j(t)})}function QS(e){return new e({type:"any"})}function ew(e){return new e({type:"unknown"})}function tw(e,t){return new e({type:"never",...j(t)})}function nw(e,t){return new e({type:"void",...j(t)})}function rw(e,t){return new e({type:"date",...j(t)})}function iw(e,t){return new e({type:"date",coerce:!0,...j(t)})}function ow(e,t){return new e({type:"nan",...j(t)})}function tr(e,t){return new Id({check:"less_than",...j(t),value:e,inclusive:!1})}function an(e,t){return new Id({check:"less_than",...j(t),value:e,inclusive:!0})}function nr(e,t){return new Cd({check:"greater_than",...j(t),value:e,inclusive:!1})}function Dt(e,t){return new Cd({check:"greater_than",...j(t),value:e,inclusive:!0})}function lp(e){return nr(0,e)}function up(e){return tr(0,e)}function cp(e){return an(0,e)}function dp(e){return Dt(0,e)}function li(e,t){return new Yv({check:"multiple_of",...j(t),value:e})}function ui(e,t){return new ty({check:"max_size",...j(t),maximum:e})}function rr(e,t){return new ny({check:"min_size",...j(t),minimum:e})}function Zi(e,t){return new ry({check:"size_equals",...j(t),size:e})}function Vi(e,t){return new iy({check:"max_length",...j(t),maximum:e})}function kr(e,t){return new oy({check:"min_length",...j(t),minimum:e})}function Wi(e,t){return new sy({check:"length_equals",...j(t),length:e})}function ts(e,t){return new ay({check:"string_format",format:"regex",...j(t),pattern:e})}function ns(e){return new ly({check:"string_format",format:"lowercase",...j(e)})}function rs(e){return new uy({check:"string_format",format:"uppercase",...j(e)})}function is(e,t){return new cy({check:"string_format",format:"includes",...j(t),includes:e})}function os(e,t){return new dy({check:"string_format",format:"starts_with",...j(t),prefix:e})}function ss(e,t){return new py({check:"string_format",format:"ends_with",...j(t),suffix:e})}function pp(e,t,n){return new fy({check:"property",property:e,schema:t,...j(n)})}function as(e,t){return new my({check:"mime_type",mime:e,...j(t)})}function Fn(e){return new gy({check:"overwrite",tx:e})}function ls(e){return Fn(t=>t.normalize(e))}function us(){return Fn(e=>e.trim())}function cs(){return Fn(e=>e.toLowerCase())}function ds(){return Fn(e=>e.toUpperCase())}function ps(){return Fn(e=>dv(e))}function sw(e,t,n){return new e({type:"array",element:t,...j(n)})}function hU(e,t,n){return new e({type:"union",options:t,...j(n)})}function vU(e,t,n){return new e({type:"union",options:t,inclusive:!1,...j(n)})}function yU(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...j(i)})}function SU(e,t,n){return new e({type:"intersection",left:t,right:n})}function wU(e,t,n,i){let r=n instanceof oe,o=r?i:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...j(o)})}function xU(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...j(i)})}function $U(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...j(i)})}function _U(e,t,n){return new e({type:"set",valueType:t,...j(n)})}function kU(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...j(n)})}function bU(e,t,n){return new e({type:"enum",entries:t,...j(n)})}function IU(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...j(n)})}function aw(e,t){return new e({type:"file",...j(t)})}function CU(e,t){return new e({type:"transform",transform:t})}function EU(e,t){return new e({type:"optional",innerType:t})}function PU(e,t){return new e({type:"nullable",innerType:t})}function TU(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():fv(n)}})}function zU(e,t,n){return new e({type:"nonoptional",innerType:t,...j(n)})}function AU(e,t){return new e({type:"success",innerType:t})}function NU(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function OU(e,t,n){return new e({type:"pipe",in:t,out:n})}function DU(e,t){return new e({type:"readonly",innerType:t})}function RU(e,t,n){return new e({type:"template_literal",parts:t,...j(n)})}function MU(e,t){return new e({type:"lazy",getter:t})}function LU(e,t){return new e({type:"promise",innerType:t})}function lw(e,t,n){var o;let i=j(n);return(o=i.abort)!=null||(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function uw(e,t,n){return new e({type:"custom",check:"custom",fn:t,...j(n)})}function cw(e,t){let n=GT(i=>(i.addIssue=r=>{var o,s,a,u;if(typeof r=="string")i.issues.push(Go(r,i.value,n._zod.def));else{let d=r;d.fatal&&(d.continue=!1),(o=d.code)!=null||(d.code="custom"),(s=d.input)!=null||(d.input=i.value),(a=d.inst)!=null||(d.inst=n),(u=d.continue)!=null||(d.continue=!n._zod.def.abort),i.issues.push(Go(d))}},e(i.value,i)),t);return n}function GT(e,t){let n=new Ie({check:"custom",...j(t)});return n._zod.check=e,n}function dw(e){let t=new Ie({check:"describe"});return t._zod.onattach=[n=>{var r;let i=(r=gt.get(n))!=null?r:{};gt.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function pw(e){let t=new Ie({check:"meta"});return t._zod.onattach=[n=>{var r;let i=(r=gt.get(n))!=null?r:{};gt.add(n,{...i,...e})}],t._zod.check=()=>{},t}function fw(e,t){var m,g,h,x,y;let n=j(t),i=(m=n.truthy)!=null?m:["true","1","yes","on","y","enabled"],r=(g=n.falsy)!=null?g:["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(v=>typeof v=="string"?v.toLowerCase():v),r=r.map(v=>typeof v=="string"?v.toLowerCase():v));let o=new Set(i),s=new Set(r),a=(h=e.Codec)!=null?h:cl,u=(x=e.Boolean)!=null?x:ll,d=(y=e.String)!=null?y:Ui,p=new d({type:"string",error:n.error}),l=new u({type:"boolean",error:n.error}),f=new a({type:"pipe",in:p,out:l,transform:(v,S)=>{let w=v;return n.case!=="sensitive"&&(w=w.toLowerCase()),o.has(w)?!0:s.has(w)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...s],input:S.value,inst:f,continue:!1}),{})},reverseTransform:(v,S)=>v===!0?i[0]||"true":r[0]||"false",error:n.error});return f}function fs(e,t,n,i={}){let r=j(i),o={...j(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:a=>n.test(a),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function ci(e){var n,i,r,o,s,a,u,d,p;let t=(n=e==null?void 0:e.target)!=null?n:"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:(i=e.processors)!=null?i:{},metadataRegistry:(r=e==null?void 0:e.metadata)!=null?r:gt,target:t,unrepresentable:(o=e==null?void 0:e.unrepresentable)!=null?o:"throw",override:(s=e==null?void 0:e.override)!=null?s:()=>{},io:(a=e==null?void 0:e.io)!=null?a:"output",counter:0,seen:new Map,cycles:(u=e==null?void 0:e.cycles)!=null?u:"ref",reused:(d=e==null?void 0:e.reused)!=null?d:"inline",external:(p=e==null?void 0:e.external)!=null?p:void 0}}function ye(e,t,n={path:[],schemaPath:[]}){var p,l,f;var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=(l=(p=e._zod).toJSONSchema)==null?void 0:l.call(p);if(a)s.schema=a;else{let m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,m);else{let h=s.schema,x=t.processors[r.type];if(!x)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);x(e,t,h,m)}let g=e._zod.parent;g&&(s.ref||(s.ref=g),ye(g,t,m),t.seen.get(g).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(s.schema,u),t.io==="input"&&Rt(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((f=(i=s.schema).default)!=null||(i.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function di(e,t){var s,a,u,d;let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let p of e.seen.entries()){let l=(s=e.metadataRegistry.get(p[0]))==null?void 0:s.id;if(l){let f=i.get(l);if(f&&f!==p[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(l,p[0])}}let r=p=>{var h,x,y,v,S;let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let w=(h=e.external.registry.get(p[0]))==null?void 0:h.id,$=(x=e.external.uri)!=null?x:I=>I;if(w)return{ref:$(w)};let _=(v=(y=p[1].defId)!=null?y:p[1].schema.id)!=null?v:`schema${e.counter++}`;return p[1].defId=_,{defId:_,ref:`${$("__shared")}#/${l}/${_}`}}if(p[1]===n)return{ref:"#"};let m=`#/${l}/`,g=(S=p[1].schema.id)!=null?S:`__schema${e.counter++}`;return{defId:g,ref:m+g}},o=p=>{if(p[1].schema.$ref)return;let l=p[1],{ref:f,defId:m}=r(p);l.def={...l.schema},m&&(l.defId=m);let g=l.schema;for(let h in g)delete g[h];g.$ref=f};if(e.cycles==="throw")for(let p of e.seen.entries()){let l=p[1];if(l.cycle)throw new Error(`Cycle detected: #/${(a=l.cycle)==null?void 0:a.join("/")}/<root>
179
+
180
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of e.seen.entries()){let l=p[1];if(t===p[0]){o(p);continue}if(e.external){let m=(u=e.external.registry.get(p[0]))==null?void 0:u.id;if(t!==p[0]&&m){o(p);continue}}if((d=e.metadataRegistry.get(p[0]))==null?void 0:d.id){o(p);continue}if(l.cycle){o(p);continue}if(l.count>1&&e.reused==="ref"){o(p);continue}}}function pi(e,t){var a,u,d,p,l,f;let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=m=>{var S,w,$;let g=e.seen.get(m);if(g.ref===null)return;let h=(S=g.def)!=null?S:g.schema,x={...h},y=g.ref;if(g.ref=null,y){i(y);let _=e.seen.get(y),I=_.schema;if(I.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(h.allOf=(w=h.allOf)!=null?w:[],h.allOf.push(I)):Object.assign(h,I),Object.assign(h,x),m._zod.parent===y)for(let T in h)T==="$ref"||T==="allOf"||T in x||delete h[T];if(I.$ref&&_.def)for(let T in h)T==="$ref"||T==="allOf"||T in _.def&&JSON.stringify(h[T])===JSON.stringify(_.def[T])&&delete h[T]}let v=m._zod.parent;if(v&&v!==y){i(v);let _=e.seen.get(v);if(_!=null&&_.schema.$ref&&(h.$ref=_.schema.$ref,_.def))for(let I in h)I==="$ref"||I==="allOf"||I in _.def&&JSON.stringify(h[I])===JSON.stringify(_.def[I])&&delete h[I]}e.override({zodSchema:m,jsonSchema:h,path:($=g.path)!=null?$:[]})};for(let m of[...e.seen.entries()].reverse())i(m[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){let m=(u=e.external.registry.get(t))==null?void 0:u.id;if(!m)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(m)}Object.assign(r,(d=n.def)!=null?d:n.schema);let o=(p=e.metadataRegistry.get(t))==null?void 0:p.id;o!==void 0&&r.id===o&&delete r.id;let s=(f=(l=e.external)==null?void 0:l.defs)!=null?f:{};for(let m of e.seen.entries()){let g=m[1];g.def&&g.defId&&(g.def.id===g.defId&&delete g.def.id,s[g.defId]=g.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{let m=JSON.parse(JSON.stringify(r));return Object.defineProperty(m,"~standard",{value:{...t["~standard"],jsonSchema:{input:ms(t,"input",e.processors),output:ms(t,"output",e.processors)}},enumerable:!1,writable:!1}),m}catch(m){throw new Error("Error converting schema to JSON.")}}function Rt(e,t){let n=t!=null?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Rt(i.element,n);if(i.type==="set")return Rt(i.valueType,n);if(i.type==="lazy")return Rt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Rt(i.innerType,n);if(i.type==="intersection")return Rt(i.left,n)||Rt(i.right,n);if(i.type==="record"||i.type==="map")return Rt(i.keyType,n)||Rt(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Rt(i.in,n)||Rt(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Rt(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Rt(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Rt(r,n))return!0;return!!(i.rest&&Rt(i.rest,n))}return!1}var mw=(e,t={})=>n=>{let i=ci({...n,processors:t});return ye(e,i),di(i,e),pi(i,e)},ms=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i!=null?i:{},s=ci({...r!=null?r:{},target:o,io:t,processors:n});return ye(e,s),di(s,e),pi(s,e)};var jU={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gw=(e,t,n,i)=>{var p;let r=n;r.type="string";let{minimum:o,maximum:s,format:a,patterns:u,contentEncoding:d}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof s=="number"&&(r.maxLength=s),a&&(r.format=(p=jU[a])!=null?p:a,r.format===""&&delete r.format,a==="time"&&delete r.format),d&&(r.contentEncoding=d),u&&u.size>0){let l=[...u];l.length===1?r.pattern=l[0].source:l.length>1&&(r.allOf=[...l.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},hw=(e,t,n,i)=>{let r=n,{minimum:o,maximum:s,format:a,multipleOf:u,exclusiveMaximum:d,exclusiveMinimum:p}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number";let l=typeof p=="number"&&p>=(o!=null?o:Number.NEGATIVE_INFINITY),f=typeof d=="number"&&d<=(s!=null?s:Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";l?m?(r.minimum=p,r.exclusiveMinimum=!0):r.exclusiveMinimum=p:typeof o=="number"&&(r.minimum=o),f?m?(r.maximum=d,r.exclusiveMaximum=!0):r.exclusiveMaximum=d:typeof s=="number"&&(r.maximum=s),typeof u=="number"&&(r.multipleOf=u)},vw=(e,t,n,i)=>{n.type="boolean"},yw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Sw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},ww=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},xw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$w=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},_w=(e,t,n,i)=>{n.not={}},kw=(e,t,n,i)=>{},bw=(e,t,n,i)=>{},Iw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Cw=(e,t,n,i)=>{let r=e._zod.def,o=Xa(r.entries);o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),n.enum=o},Ew=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(s))}else o.push(s);if(o.length!==0)if(o.length===1){let s=o[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else o.every(s=>typeof s=="number")&&(n.type="number"),o.every(s=>typeof s=="string")&&(n.type="string"),o.every(s=>typeof s=="boolean")&&(n.type="boolean"),o.every(s=>s===null)&&(n.type="null"),n.enum=o},Pw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Tw=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},zw=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=e._zod.bag;s!==void 0&&(o.minLength=s),a!==void 0&&(o.maxLength=a),u?u.length===1?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(d=>({contentMediaType:d}))):Object.assign(r,o)},Aw=(e,t,n,i)=>{n.type="boolean"},Nw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Ow=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Dw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Rw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Mw=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Lw=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=ye(o.element,t,{...i,path:[...i.path,"items"]})},jw=(e,t,n,i)=>{var d;let r=n,o=e._zod.def;r.type="object",r.properties={};let s=o.shape;for(let p in s)r.properties[p]=ye(s[p],t,{...i,path:[...i.path,"properties",p]});let a=new Set(Object.keys(s)),u=new Set([...a].filter(p=>{let l=o.shape[p]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));u.size>0&&(r.required=Array.from(u)),((d=o.catchall)==null?void 0:d._zod.def.type)==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=ye(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},mp=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,s=r.options.map((a,u)=>ye(a,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=s:n.anyOf=s},Uw=(e,t,n,i)=>{let r=e._zod.def,o=ye(r.left,t,{...i,path:[...i.path,"allOf",0]}),s=ye(r.right,t,{...i,path:[...i.path,"allOf",1]}),a=d=>"allOf"in d&&Object.keys(d).length===1,u=[...a(o)?o.allOf:[o],...a(s)?s.allOf:[s]];n.allOf=u},Fw=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((f,m)=>ye(f,t,{...i,path:[...i.path,s,m]})),d=o.rest?ye(o.rest,t,{...i,path:[...i.path,a,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=u,d&&(r.items=d)):t.target==="openapi-3.0"?(r.items={anyOf:u},d&&r.items.anyOf.push(d),r.minItems=u.length,d||(r.maxItems=u.length)):(r.items=u,d&&(r.additionalItems=d));let{minimum:p,maximum:l}=e._zod.bag;typeof p=="number"&&(r.minItems=p),typeof l=="number"&&(r.maxItems=l)},Zw=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let s=o.keyType,a=s._zod.bag,u=a==null?void 0:a.patterns;if(o.mode==="loose"&&u&&u.size>0){let p=ye(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let l of u)r.patternProperties[l.source]=p}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=ye(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=ye(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let d=s._zod.values;if(d){let p=[...d].filter(l=>typeof l=="string"||typeof l=="number");p.length>0&&(r.required=p)}},Vw=(e,t,n,i)=>{let r=e._zod.def,o=ye(r.innerType,t,i),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Ww=(e,t,n,i)=>{let r=e._zod.def;ye(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},qw=(e,t,n,i)=>{let r=e._zod.def;ye(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Bw=(e,t,n,i)=>{let r=e._zod.def;ye(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Hw=(e,t,n,i)=>{let r=e._zod.def;ye(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let s;try{s=r.catchValue(void 0)}catch(a){throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Gw=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?o?r.out:r.in:r.out;ye(s,t,i);let a=t.seen.get(e);a.ref=s},Jw=(e,t,n,i)=>{let r=e._zod.def;ye(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},Kw=(e,t,n,i)=>{let r=e._zod.def;ye(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},gp=(e,t,n,i)=>{let r=e._zod.def;ye(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Xw=(e,t,n,i)=>{let r=e._zod.innerType;ye(r,t,i);let o=t.seen.get(e);o.ref=r},fp={string:gw,number:hw,boolean:vw,bigint:yw,symbol:Sw,null:ww,undefined:xw,void:$w,never:_w,any:kw,unknown:bw,date:Iw,enum:Cw,literal:Ew,nan:Pw,template_literal:Tw,file:zw,success:Aw,custom:Nw,function:Ow,transform:Dw,map:Rw,set:Mw,array:Lw,object:jw,union:mp,intersection:Uw,tuple:Fw,record:Zw,nullable:Vw,nonoptional:Ww,default:qw,prefault:Bw,catch:Hw,pipe:Gw,readonly:Jw,promise:Kw,optional:gp,lazy:Xw};function hp(e,t){if("_idmap"in e){let i=e,r=ci({...t,processors:fp}),o={};for(let u of i._idmap.entries()){let[d,p]=u;ye(p,r)}let s={},a={registry:i,uri:t==null?void 0:t.uri,defs:o};r.external=a;for(let u of i._idmap.entries()){let[d,p]=u;di(r,p),s[d]=pi(r,p)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:o}}return{schemas:s}}let n=ci({...t,processors:fp});return ye(e,n),di(n,e),pi(n,e)}var vp=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(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){var i;let n=(i=t==null?void 0:t.target)!=null?i:"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=ci({processors:fp,target:n,...(t==null?void 0:t.metadata)&&{metadata:t.metadata},...(t==null?void 0:t.unrepresentable)&&{unrepresentable:t.unrepresentable},...(t==null?void 0:t.override)&&{override:t.override},...(t==null?void 0:t.io)&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return ye(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),di(this.ctx,t);let i=pi(this.ctx,t),{"~standard":r,...o}=i;return o}};var Yw={};var ml={};Vn(ml,{ZodAny:()=>$x,ZodArray:()=>Ix,ZodBase64:()=>Lp,ZodBase64URL:()=>jp,ZodBigInt:()=>xs,ZodBigIntFormat:()=>Zp,ZodBoolean:()=>ws,ZodCIDRv4:()=>Rp,ZodCIDRv6:()=>Mp,ZodCUID:()=>Pp,ZodCUID2:()=>Tp,ZodCatch:()=>Gx,ZodCodec:()=>Il,ZodCustom:()=>Cl,ZodCustomStringFormat:()=>ys,ZodDate:()=>xl,ZodDefault:()=>Zx,ZodDiscriminatedUnion:()=>Ex,ZodE164:()=>Up,ZodEmail:()=>Ip,ZodEmoji:()=>Cp,ZodEnum:()=>hs,ZodExactOptional:()=>jx,ZodFile:()=>Mx,ZodFunction:()=>i$,ZodGUID:()=>hl,ZodIPv4:()=>Op,ZodIPv6:()=>Dp,ZodIntersection:()=>Px,ZodJWT:()=>Fp,ZodKSUID:()=>Np,ZodLazy:()=>t$,ZodLiteral:()=>Rx,ZodMAC:()=>gx,ZodMap:()=>Ox,ZodNaN:()=>Kx,ZodNanoID:()=>Ep,ZodNever:()=>kx,ZodNonOptional:()=>Gp,ZodNull:()=>wx,ZodNullable:()=>Fx,ZodNumber:()=>Ss,ZodNumberFormat:()=>Hi,ZodObject:()=>_l,ZodOptional:()=>Hp,ZodPipe:()=>bl,ZodPrefault:()=>Wx,ZodPreprocess:()=>Xx,ZodPromise:()=>r$,ZodReadonly:()=>Yx,ZodRecord:()=>gs,ZodSet:()=>Dx,ZodString:()=>vs,ZodStringFormat:()=>be,ZodSuccess:()=>Hx,ZodSymbol:()=>yx,ZodTemplateLiteral:()=>e$,ZodTransform:()=>Lx,ZodTuple:()=>zx,ZodType:()=>le,ZodULID:()=>zp,ZodURL:()=>wl,ZodUUID:()=>or,ZodUndefined:()=>Sx,ZodUnion:()=>kl,ZodUnknown:()=>_x,ZodVoid:()=>bx,ZodXID:()=>Ap,ZodXor:()=>Cx,_ZodString:()=>bp,_default:()=>Vx,_function:()=>rA,any:()=>Oz,array:()=>$l,base64:()=>vz,base64url:()=>yz,bigint:()=>Pz,boolean:()=>vx,catch:()=>Jx,check:()=>iA,cidrv4:()=>gz,cidrv6:()=>hz,codec:()=>Qz,cuid:()=>az,cuid2:()=>lz,custom:()=>oA,date:()=>Rz,describe:()=>sA,discriminatedUnion:()=>Zz,e164:()=>Sz,email:()=>XT,emoji:()=>oz,enum:()=>qp,exactOptional:()=>Ux,file:()=>Jz,float32:()=>bz,float64:()=>Iz,function:()=>rA,guid:()=>YT,hash:()=>kz,hex:()=>_z,hostname:()=>$z,httpUrl:()=>iz,instanceof:()=>lA,int:()=>_p,int32:()=>Cz,int64:()=>Tz,intersection:()=>Tx,invertCodec:()=>eA,ipv4:()=>pz,ipv6:()=>mz,json:()=>cA,jwt:()=>wz,keyof:()=>Mz,ksuid:()=>dz,lazy:()=>n$,literal:()=>Gz,looseObject:()=>Uz,looseRecord:()=>Wz,mac:()=>fz,map:()=>qz,meta:()=>aA,nan:()=>Yz,nanoid:()=>sz,nativeEnum:()=>Hz,never:()=>Vp,nonoptional:()=>Bx,null:()=>xx,nullable:()=>yl,nullish:()=>Kz,number:()=>hx,object:()=>Lz,optional:()=>vl,partialRecord:()=>Vz,pipe:()=>kp,prefault:()=>qx,preprocess:()=>dA,promise:()=>nA,readonly:()=>Qx,record:()=>Nx,refine:()=>o$,set:()=>Bz,strictObject:()=>jz,string:()=>gl,stringFormat:()=>xz,stringbool:()=>uA,success:()=>Xz,superRefine:()=>s$,symbol:()=>Az,templateLiteral:()=>tA,transform:()=>Bp,tuple:()=>Ax,uint32:()=>Ez,uint64:()=>zz,ulid:()=>uz,undefined:()=>Nz,union:()=>Wp,unknown:()=>Bi,url:()=>rz,uuid:()=>QT,uuidv4:()=>ez,uuidv6:()=>tz,uuidv7:()=>nz,void:()=>Dz,xid:()=>cz,xor:()=>Fz});var yp={};Vn(yp,{endsWith:()=>ss,gt:()=>nr,gte:()=>Dt,includes:()=>is,length:()=>Wi,lowercase:()=>ns,lt:()=>tr,lte:()=>an,maxLength:()=>Vi,maxSize:()=>ui,mime:()=>as,minLength:()=>kr,minSize:()=>rr,multipleOf:()=>li,negative:()=>up,nonnegative:()=>dp,nonpositive:()=>cp,normalize:()=>ls,overwrite:()=>Fn,positive:()=>lp,property:()=>pp,regex:()=>ts,size:()=>Zi,slugify:()=>ps,startsWith:()=>os,toLowerCase:()=>cs,toUpperCase:()=>ds,trim:()=>us,uppercase:()=>rs});var qi={};Vn(qi,{ZodISODate:()=>wp,ZodISODateTime:()=>Sp,ZodISODuration:()=>$p,ZodISOTime:()=>xp,date:()=>ex,datetime:()=>Qw,duration:()=>nx,time:()=>tx});var Sp=k("ZodISODateTime",(e,t)=>{Py.init(e,t),be.init(e,t)});function Qw(e){return NS(Sp,e)}var wp=k("ZodISODate",(e,t)=>{Ty.init(e,t),be.init(e,t)});function ex(e){return OS(wp,e)}var xp=k("ZodISOTime",(e,t)=>{zy.init(e,t),be.init(e,t)});function tx(e){return DS(xp,e)}var $p=k("ZodISODuration",(e,t)=>{Ay.init(e,t),be.init(e,t)});function nx(e){return RS($p,e)}var JT=(e,t)=>{nl.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>il(e,n)},flatten:{value:n=>rl(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Bo,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Bo,2)}},isEmpty:{get(){return e.issues.length===0}}})},FU=k("ZodError",JT),Gt=k("ZodError",JT,{Parent:Error});var rx=Jo(Gt),ix=Ko(Gt),ox=Xo(Gt),sx=Yo(Gt),ax=hd(Gt),lx=vd(Gt),ux=yd(Gt),cx=Sd(Gt),dx=wd(Gt),px=xd(Gt),fx=$d(Gt),mx=_d(Gt);var KT=new WeakMap;function Sl(e,t,n){let i=Object.getPrototypeOf(e),r=KT.get(i);if(r||(r=new Set,KT.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let s=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}}var le=k("ZodType",(e,t)=>(oe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ms(e,"input"),output:ms(e,"output")}}),e.toJSONSchema=mw(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>rx(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>ox(e,n,i),e.parseAsync=async(n,i)=>ix(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>sx(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>ax(e,n,i),e.decode=(n,i)=>lx(e,n,i),e.encodeAsync=async(n,i)=>ux(e,n,i),e.decodeAsync=async(n,i)=>cx(e,n,i),e.safeEncode=(n,i)=>dx(e,n,i),e.safeDecode=(n,i)=>px(e,n,i),e.safeEncodeAsync=async(n,i)=>fx(e,n,i),e.safeDecodeAsync=async(n,i)=>mx(e,n,i),Sl(e,"ZodType",{check(...n){var r;let i=this.def;return this.clone(D.mergeDefs(i,{checks:[...(r=i.checks)!=null?r:[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return Nt(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(o$(n,i))},superRefine(n,i){return this.check(s$(n,i))},overwrite(n){return this.check(Fn(n))},optional(){return vl(this)},exactOptional(){return Ux(this)},nullable(){return yl(this)},nullish(){return vl(yl(this))},nonoptional(n){return Bx(this,n)},array(){return $l(this)},or(n){return Wp([this,n])},and(n){return Tx(this,n)},transform(n){return kp(this,Bp(n))},default(n){return Vx(this,n)},prefault(n){return qx(this,n)},catch(n){return Jx(this,n)},pipe(n){return kp(this,n)},readonly(){return Qx(this)},describe(n){let i=this.clone();return gt.add(i,{description:n}),i},meta(...n){if(n.length===0)return gt.get(this);let i=this.clone();return gt.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){var n;return(n=gt.get(e))==null?void 0:n.description},configurable:!0}),e)),bp=k("_ZodString",(e,t)=>{var i,r,o;Ui.init(e,t),le.init(e,t),e._zod.processJSONSchema=(s,a,u)=>gw(e,s,a,u);let n=e._zod.bag;e.format=(i=n.format)!=null?i:null,e.minLength=(r=n.minimum)!=null?r:null,e.maxLength=(o=n.maximum)!=null?o:null,Sl(e,"_ZodString",{regex(...s){return this.check(ts(...s))},includes(...s){return this.check(is(...s))},startsWith(...s){return this.check(os(...s))},endsWith(...s){return this.check(ss(...s))},min(...s){return this.check(kr(...s))},max(...s){return this.check(Vi(...s))},length(...s){return this.check(Wi(...s))},nonempty(...s){return this.check(kr(1,...s))},lowercase(s){return this.check(ns(s))},uppercase(s){return this.check(rs(s))},trim(){return this.check(us())},normalize(...s){return this.check(ls(...s))},toLowerCase(){return this.check(cs())},toUpperCase(){return this.check(ds())},slugify(){return this.check(ps())}})}),vs=k("ZodString",(e,t)=>{Ui.init(e,t),bp.init(e,t),e.email=n=>e.check(Zd(Ip,n)),e.url=n=>e.check(fl(wl,n)),e.jwt=n=>e.check(ap(Fp,n)),e.emoji=n=>e.check(Hd(Cp,n)),e.guid=n=>e.check(pl(hl,n)),e.uuid=n=>e.check(Vd(or,n)),e.uuidv4=n=>e.check(Wd(or,n)),e.uuidv6=n=>e.check(qd(or,n)),e.uuidv7=n=>e.check(Bd(or,n)),e.nanoid=n=>e.check(Gd(Ep,n)),e.guid=n=>e.check(pl(hl,n)),e.cuid=n=>e.check(Jd(Pp,n)),e.cuid2=n=>e.check(Kd(Tp,n)),e.ulid=n=>e.check(Xd(zp,n)),e.base64=n=>e.check(ip(Lp,n)),e.base64url=n=>e.check(op(jp,n)),e.xid=n=>e.check(Yd(Ap,n)),e.ksuid=n=>e.check(Qd(Np,n)),e.ipv4=n=>e.check(ep(Op,n)),e.ipv6=n=>e.check(tp(Dp,n)),e.cidrv4=n=>e.check(np(Rp,n)),e.cidrv6=n=>e.check(rp(Mp,n)),e.e164=n=>e.check(sp(Up,n)),e.datetime=n=>e.check(Qw(n)),e.date=n=>e.check(ex(n)),e.time=n=>e.check(tx(n)),e.duration=n=>e.check(nx(n))});function gl(e){return PS(vs,e)}var be=k("ZodStringFormat",(e,t)=>{ke.init(e,t),bp.init(e,t)}),Ip=k("ZodEmail",(e,t)=>{wy.init(e,t),be.init(e,t)});function XT(e){return Zd(Ip,e)}var hl=k("ZodGUID",(e,t)=>{yy.init(e,t),be.init(e,t)});function YT(e){return pl(hl,e)}var or=k("ZodUUID",(e,t)=>{Sy.init(e,t),be.init(e,t)});function QT(e){return Vd(or,e)}function ez(e){return Wd(or,e)}function tz(e){return qd(or,e)}function nz(e){return Bd(or,e)}var wl=k("ZodURL",(e,t)=>{xy.init(e,t),be.init(e,t)});function rz(e){return fl(wl,e)}function iz(e){return fl(wl,{protocol:Ht.httpProtocol,hostname:Ht.domain,...D.normalizeParams(e)})}var Cp=k("ZodEmoji",(e,t)=>{$y.init(e,t),be.init(e,t)});function oz(e){return Hd(Cp,e)}var Ep=k("ZodNanoID",(e,t)=>{_y.init(e,t),be.init(e,t)});function sz(e){return Gd(Ep,e)}var Pp=k("ZodCUID",(e,t)=>{ky.init(e,t),be.init(e,t)});function az(e){return Jd(Pp,e)}var Tp=k("ZodCUID2",(e,t)=>{by.init(e,t),be.init(e,t)});function lz(e){return Kd(Tp,e)}var zp=k("ZodULID",(e,t)=>{Iy.init(e,t),be.init(e,t)});function uz(e){return Xd(zp,e)}var Ap=k("ZodXID",(e,t)=>{Cy.init(e,t),be.init(e,t)});function cz(e){return Yd(Ap,e)}var Np=k("ZodKSUID",(e,t)=>{Ey.init(e,t),be.init(e,t)});function dz(e){return Qd(Np,e)}var Op=k("ZodIPv4",(e,t)=>{Ny.init(e,t),be.init(e,t)});function pz(e){return ep(Op,e)}var gx=k("ZodMAC",(e,t)=>{Dy.init(e,t),be.init(e,t)});function fz(e){return zS(gx,e)}var Dp=k("ZodIPv6",(e,t)=>{Oy.init(e,t),be.init(e,t)});function mz(e){return tp(Dp,e)}var Rp=k("ZodCIDRv4",(e,t)=>{Ry.init(e,t),be.init(e,t)});function gz(e){return np(Rp,e)}var Mp=k("ZodCIDRv6",(e,t)=>{My.init(e,t),be.init(e,t)});function hz(e){return rp(Mp,e)}var Lp=k("ZodBase64",(e,t)=>{jy.init(e,t),be.init(e,t)});function vz(e){return ip(Lp,e)}var jp=k("ZodBase64URL",(e,t)=>{Uy.init(e,t),be.init(e,t)});function yz(e){return op(jp,e)}var Up=k("ZodE164",(e,t)=>{Fy.init(e,t),be.init(e,t)});function Sz(e){return sp(Up,e)}var Fp=k("ZodJWT",(e,t)=>{Zy.init(e,t),be.init(e,t)});function wz(e){return ap(Fp,e)}var ys=k("ZodCustomStringFormat",(e,t)=>{Vy.init(e,t),be.init(e,t)});function xz(e,t,n={}){return fs(ys,e,t,n)}function $z(e){return fs(ys,"hostname",Ht.hostname,e)}function _z(e){return fs(ys,"hex",Ht.hex,e)}function kz(e,t){var o;let n=(o=t==null?void 0:t.enc)!=null?o:"hex",i=`${e}_${n}`,r=Ht[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return fs(ys,i,r,t)}var Ss=k("ZodNumber",(e,t)=>{var i,r,o,s,a,u,d,p,l;Ad.init(e,t),le.init(e,t),e._zod.processJSONSchema=(f,m,g)=>hw(e,f,m,g),Sl(e,"ZodNumber",{gt(f,m){return this.check(nr(f,m))},gte(f,m){return this.check(Dt(f,m))},min(f,m){return this.check(Dt(f,m))},lt(f,m){return this.check(tr(f,m))},lte(f,m){return this.check(an(f,m))},max(f,m){return this.check(an(f,m))},int(f){return this.check(_p(f))},safe(f){return this.check(_p(f))},positive(f){return this.check(nr(0,f))},nonnegative(f){return this.check(Dt(0,f))},negative(f){return this.check(tr(0,f))},nonpositive(f){return this.check(an(0,f))},multipleOf(f,m){return this.check(li(f,m))},step(f,m){return this.check(li(f,m))},finite(){return this}});let n=e._zod.bag;e.minValue=(o=Math.max((i=n.minimum)!=null?i:Number.NEGATIVE_INFINITY,(r=n.exclusiveMinimum)!=null?r:Number.NEGATIVE_INFINITY))!=null?o:null,e.maxValue=(u=Math.min((s=n.maximum)!=null?s:Number.POSITIVE_INFINITY,(a=n.exclusiveMaximum)!=null?a:Number.POSITIVE_INFINITY))!=null?u:null,e.isInt=((d=n.format)!=null?d:"").includes("int")||Number.isSafeInteger((p=n.multipleOf)!=null?p:.5),e.isFinite=!0,e.format=(l=n.format)!=null?l:null});function hx(e){return MS(Ss,e)}var Hi=k("ZodNumberFormat",(e,t)=>{Wy.init(e,t),Ss.init(e,t)});function _p(e){return jS(Hi,e)}function bz(e){return US(Hi,e)}function Iz(e){return FS(Hi,e)}function Cz(e){return ZS(Hi,e)}function Ez(e){return VS(Hi,e)}var ws=k("ZodBoolean",(e,t)=>{ll.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vw(e,n,i,r)});function vx(e){return WS(ws,e)}var xs=k("ZodBigInt",(e,t)=>{var i,r,o;Nd.init(e,t),le.init(e,t),e._zod.processJSONSchema=(s,a,u)=>yw(e,s,a,u),e.gte=(s,a)=>e.check(Dt(s,a)),e.min=(s,a)=>e.check(Dt(s,a)),e.gt=(s,a)=>e.check(nr(s,a)),e.gte=(s,a)=>e.check(Dt(s,a)),e.min=(s,a)=>e.check(Dt(s,a)),e.lt=(s,a)=>e.check(tr(s,a)),e.lte=(s,a)=>e.check(an(s,a)),e.max=(s,a)=>e.check(an(s,a)),e.positive=s=>e.check(nr(BigInt(0),s)),e.negative=s=>e.check(tr(BigInt(0),s)),e.nonpositive=s=>e.check(an(BigInt(0),s)),e.nonnegative=s=>e.check(Dt(BigInt(0),s)),e.multipleOf=(s,a)=>e.check(li(s,a));let n=e._zod.bag;e.minValue=(i=n.minimum)!=null?i:null,e.maxValue=(r=n.maximum)!=null?r:null,e.format=(o=n.format)!=null?o:null});function Pz(e){return BS(xs,e)}var Zp=k("ZodBigIntFormat",(e,t)=>{qy.init(e,t),xs.init(e,t)});function Tz(e){return GS(Zp,e)}function zz(e){return JS(Zp,e)}var yx=k("ZodSymbol",(e,t)=>{By.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Sw(e,n,i,r)});function Az(e){return KS(yx,e)}var Sx=k("ZodUndefined",(e,t)=>{Hy.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xw(e,n,i,r)});function Nz(e){return XS(Sx,e)}var wx=k("ZodNull",(e,t)=>{Gy.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ww(e,n,i,r)});function xx(e){return YS(wx,e)}var $x=k("ZodAny",(e,t)=>{Jy.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>kw(e,n,i,r)});function Oz(){return QS($x)}var _x=k("ZodUnknown",(e,t)=>{Ky.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bw(e,n,i,r)});function Bi(){return ew(_x)}var kx=k("ZodNever",(e,t)=>{Xy.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_w(e,n,i,r)});function Vp(e){return tw(kx,e)}var bx=k("ZodVoid",(e,t)=>{Yy.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$w(e,n,i,r)});function Dz(e){return nw(bx,e)}var xl=k("ZodDate",(e,t)=>{Qy.init(e,t),le.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Iw(e,i,r,o),e.min=(i,r)=>e.check(Dt(i,r)),e.max=(i,r)=>e.check(an(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Rz(e){return rw(xl,e)}var Ix=k("ZodArray",(e,t)=>{eS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lw(e,n,i,r),e.element=t.element,Sl(e,"ZodArray",{min(n,i){return this.check(kr(n,i))},nonempty(n){return this.check(kr(1,n))},max(n,i){return this.check(Vi(n,i))},length(n,i){return this.check(Wi(n,i))},unwrap(){return this.element}})});function $l(e,t){return sw(Ix,e,t)}function Mz(e){let t=e._zod.def.shape;return qp(Object.keys(t))}var _l=k("ZodObject",(e,t)=>{tS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jw(e,n,i,r),D.defineLazy(e,"shape",()=>t.shape),Sl(e,"ZodObject",{keyof(){return qp(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Bi()})},loose(){return this.clone({...this._zod.def,catchall:Bi()})},strict(){return this.clone({...this._zod.def,catchall:Vp()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return D.extend(this,n)},safeExtend(n){return D.safeExtend(this,n)},merge(n){return D.merge(this,n)},pick(n){return D.pick(this,n)},omit(n){return D.omit(this,n)},partial(...n){return D.partial(Hp,this,n[0])},required(...n){return D.required(Gp,this,n[0])}})});function Lz(e,t){let n={type:"object",shape:e!=null?e:{},...D.normalizeParams(t)};return new _l(n)}function jz(e,t){return new _l({type:"object",shape:e,catchall:Vp(),...D.normalizeParams(t)})}function Uz(e,t){return new _l({type:"object",shape:e,catchall:Bi(),...D.normalizeParams(t)})}var kl=k("ZodUnion",(e,t)=>{ul.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mp(e,n,i,r),e.options=t.options});function Wp(e,t){return new kl({type:"union",options:e,...D.normalizeParams(t)})}var Cx=k("ZodXor",(e,t)=>{kl.init(e,t),nS.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mp(e,n,i,r),e.options=t.options});function Fz(e,t){return new Cx({type:"union",options:e,inclusive:!1,...D.normalizeParams(t)})}var Ex=k("ZodDiscriminatedUnion",(e,t)=>{kl.init(e,t),rS.init(e,t)});function Zz(e,t,n){return new Ex({type:"union",options:t,discriminator:e,...D.normalizeParams(n)})}var Px=k("ZodIntersection",(e,t)=>{iS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uw(e,n,i,r)});function Tx(e,t){return new Px({type:"intersection",left:e,right:t})}var zx=k("ZodTuple",(e,t)=>{Od.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Fw(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Ax(e,t,n){let i=t instanceof oe,r=i?n:t,o=i?t:null;return new zx({type:"tuple",items:e,rest:o,...D.normalizeParams(r)})}var gs=k("ZodRecord",(e,t)=>{oS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zw(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Nx(e,t,n){return!t||!t._zod?new gs({type:"record",keyType:gl(),valueType:e,...D.normalizeParams(t)}):new gs({type:"record",keyType:e,valueType:t,...D.normalizeParams(n)})}function Vz(e,t,n){let i=Nt(e);return i._zod.values=void 0,new gs({type:"record",keyType:i,valueType:t,...D.normalizeParams(n)})}function Wz(e,t,n){return new gs({type:"record",keyType:e,valueType:t,mode:"loose",...D.normalizeParams(n)})}var Ox=k("ZodMap",(e,t)=>{sS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rw(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(rr(...n)),e.nonempty=n=>e.check(rr(1,n)),e.max=(...n)=>e.check(ui(...n)),e.size=(...n)=>e.check(Zi(...n))});function qz(e,t,n){return new Ox({type:"map",keyType:e,valueType:t,...D.normalizeParams(n)})}var Dx=k("ZodSet",(e,t)=>{aS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mw(e,n,i,r),e.min=(...n)=>e.check(rr(...n)),e.nonempty=n=>e.check(rr(1,n)),e.max=(...n)=>e.check(ui(...n)),e.size=(...n)=>e.check(Zi(...n))});function Bz(e,t){return new Dx({type:"set",valueType:e,...D.normalizeParams(t)})}var hs=k("ZodEnum",(e,t)=>{lS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Cw(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let s of i)if(n.has(s))o[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new hs({...t,checks:[],...D.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let s of i)if(n.has(s))delete o[s];else throw new Error(`Key ${s} not found in enum`);return new hs({...t,checks:[],...D.normalizeParams(r),entries:o})}});function qp(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new hs({type:"enum",entries:n,...D.normalizeParams(t)})}function Hz(e,t){return new hs({type:"enum",entries:e,...D.normalizeParams(t)})}var Rx=k("ZodLiteral",(e,t)=>{uS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ew(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Gz(e,t){return new Rx({type:"literal",values:Array.isArray(e)?e:[e],...D.normalizeParams(t)})}var Mx=k("ZodFile",(e,t)=>{cS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zw(e,n,i,r),e.min=(n,i)=>e.check(rr(n,i)),e.max=(n,i)=>e.check(ui(n,i)),e.mime=(n,i)=>e.check(as(Array.isArray(n)?n:[n],i))});function Jz(e){return aw(Mx,e)}var Lx=k("ZodTransform",(e,t)=>{dS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Dw(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ri(e.constructor.name);n.addIssue=o=>{var s,a,u;if(typeof o=="string")n.issues.push(D.issue(o,n.value,t));else{let d=o;d.fatal&&(d.continue=!1),(s=d.code)!=null||(d.code="custom"),(a=d.input)!=null||(d.input=n.value),(u=d.inst)!=null||(d.inst=e),n.issues.push(D.issue(d))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function Bp(e){return new Lx({type:"transform",transform:e})}var Hp=k("ZodOptional",(e,t)=>{Dd.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gp(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function vl(e){return new Hp({type:"optional",innerType:e})}var jx=k("ZodExactOptional",(e,t)=>{pS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gp(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ux(e){return new jx({type:"optional",innerType:e})}var Fx=k("ZodNullable",(e,t)=>{fS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vw(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function yl(e){return new Fx({type:"nullable",innerType:e})}function Kz(e){return vl(yl(e))}var Zx=k("ZodDefault",(e,t)=>{mS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qw(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Vx(e,t){return new Zx({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():D.shallowClone(t)}})}var Wx=k("ZodPrefault",(e,t)=>{gS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Bw(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function qx(e,t){return new Wx({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():D.shallowClone(t)}})}var Gp=k("ZodNonOptional",(e,t)=>{hS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ww(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Bx(e,t){return new Gp({type:"nonoptional",innerType:e,...D.normalizeParams(t)})}var Hx=k("ZodSuccess",(e,t)=>{vS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Aw(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Xz(e){return new Hx({type:"success",innerType:e})}var Gx=k("ZodCatch",(e,t)=>{yS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hw(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Jx(e,t){return new Gx({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Kx=k("ZodNaN",(e,t)=>{SS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Pw(e,n,i,r)});function Yz(e){return ow(Kx,e)}var bl=k("ZodPipe",(e,t)=>{Rd.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Gw(e,n,i,r),e.in=t.in,e.out=t.out});function kp(e,t){return new bl({type:"pipe",in:e,out:t})}var Il=k("ZodCodec",(e,t)=>{bl.init(e,t),cl.init(e,t)});function Qz(e,t,n){return new Il({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function eA(e){let t=e._zod.def;return new Il({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Xx=k("ZodPreprocess",(e,t)=>{bl.init(e,t),wS.init(e,t)}),Yx=k("ZodReadonly",(e,t)=>{xS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jw(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Qx(e){return new Yx({type:"readonly",innerType:e})}var e$=k("ZodTemplateLiteral",(e,t)=>{$S.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Tw(e,n,i,r)});function tA(e,t){return new e$({type:"template_literal",parts:e,...D.normalizeParams(t)})}var t$=k("ZodLazy",(e,t)=>{bS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xw(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function n$(e){return new t$({type:"lazy",getter:e})}var r$=k("ZodPromise",(e,t)=>{kS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kw(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function nA(e){return new r$({type:"promise",innerType:e})}var i$=k("ZodFunction",(e,t)=>{_S.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ow(e,n,i,r)});function rA(e){var t,n;return new i$({type:"function",input:Array.isArray(e==null?void 0:e.input)?Ax(e==null?void 0:e.input):(t=e==null?void 0:e.input)!=null?t:$l(Bi()),output:(n=e==null?void 0:e.output)!=null?n:Bi()})}var Cl=k("ZodCustom",(e,t)=>{IS.init(e,t),le.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nw(e,n,i,r)});function iA(e){let t=new Ie({check:"custom"});return t._zod.check=e,t}function oA(e,t){return lw(Cl,e!=null?e:()=>!0,t)}function o$(e,t={}){return uw(Cl,e,t)}function s$(e,t){return cw(e,t)}var sA=dw,aA=pw;function lA(e,t={}){let n=new Cl({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...D.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{var r;i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...(r=n._zod.def.path)!=null?r:[]]})},n}var uA=(...e)=>fw({Codec:Il,Boolean:ws,String:vs},...e);function cA(e){let t=n$(()=>Wp([gl(e),hx(),vx(),xx(),$l(t),Nx(gl(),t)]));return t}function dA(e,t){return new Xx({type:"pipe",in:Bp(e),out:t})}var VU={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 WU(e){We({customError:e})}function qU(){return We().customError}var a$;(function(e){})(a$||(a$={}));var B={...ml,...yp,iso:qi},BU=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"]);function HU(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!=null?t:"draft-2020-12"}function GU(e,t){if(!e.startsWith("#"))throw new 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 i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function pA(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return B.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return B.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=GU(r,t),s=$t(o,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return B.null();if(r.length===0)return B.never();if(r.length===1)return B.literal(r[0]);if(r.every(s=>typeof s=="string"))return B.enum(r);let o=r.map(s=>B.literal(s));return o.length<2?o[0]:B.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return B.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let s={...e,type:o};return pA(s,t)});return r.length===0?B.never():r.length===1?r[0]:B.union(r)}if(!n)return B.any();let i;switch(n){case"string":{let r=B.string();if(e.format){let o=e.format;o==="email"?r=r.check(B.email()):o==="uri"||o==="uri-reference"?r=r.check(B.url()):o==="uuid"||o==="guid"?r=r.check(B.uuid()):o==="date-time"?r=r.check(B.iso.datetime()):o==="date"?r=r.check(B.iso.date()):o==="time"?r=r.check(B.iso.time()):o==="duration"?r=r.check(B.iso.duration()):o==="ipv4"?r=r.check(B.ipv4()):o==="ipv6"?r=r.check(B.ipv6()):o==="mac"?r=r.check(B.mac()):o==="cidr"?r=r.check(B.cidrv4()):o==="cidr-v6"?r=r.check(B.cidrv6()):o==="base64"?r=r.check(B.base64()):o==="base64url"?r=r.check(B.base64url()):o==="e164"?r=r.check(B.e164()):o==="jwt"?r=r.check(B.jwt()):o==="emoji"?r=r.check(B.emoji()):o==="nanoid"?r=r.check(B.nanoid()):o==="cuid"?r=r.check(B.cuid()):o==="cuid2"?r=r.check(B.cuid2()):o==="ulid"?r=r.check(B.ulid()):o==="xid"?r=r.check(B.xid()):o==="ksuid"&&(r=r.check(B.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?B.number().int():B.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=B.boolean();break}case"null":{i=B.null();break}case"object":{let r={},o=e.properties||{},s=new Set(e.required||[]);for(let[u,d]of Object.entries(o)){let p=$t(d,t);r[u]=s.has(u)?p:p.optional()}if(e.propertyNames){let u=$t(e.propertyNames,t),d=e.additionalProperties&&typeof e.additionalProperties=="object"?$t(e.additionalProperties,t):B.any();if(Object.keys(r).length===0){i=B.record(u,d);break}let p=B.object(r).passthrough(),l=B.looseRecord(u,d);i=B.intersection(p,l);break}if(e.patternProperties){let u=e.patternProperties,d=Object.keys(u),p=[];for(let f of d){let m=$t(u[f],t),g=B.string().regex(new RegExp(f));p.push(B.looseRecord(g,m))}let l=[];if(Object.keys(r).length>0&&l.push(B.object(r).passthrough()),l.push(...p),l.length===0)i=B.object({}).passthrough();else if(l.length===1)i=l[0];else{let f=B.intersection(l[0],l[1]);for(let m=2;m<l.length;m++)f=B.intersection(f,l[m]);i=f}break}let a=B.object(r);e.additionalProperties===!1?i=a.strict():typeof e.additionalProperties=="object"?i=a.catchall($t(e.additionalProperties,t)):i=a.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let s=r.map(u=>$t(u,t)),a=o&&typeof o=="object"&&!Array.isArray(o)?$t(o,t):void 0;a?i=B.tuple(s).rest(a):i=B.tuple(s),typeof e.minItems=="number"&&(i=i.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(B.maxLength(e.maxItems)))}else if(Array.isArray(o)){let s=o.map(u=>$t(u,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?$t(e.additionalItems,t):void 0;a?i=B.tuple(s).rest(a):i=B.tuple(s),typeof e.minItems=="number"&&(i=i.check(B.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(B.maxLength(e.maxItems)))}else if(o!==void 0){let s=$t(o,t),a=B.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),i=a}else i=B.array(B.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function $t(e,t){if(typeof e=="boolean")return e?B.any():B.never();let n=pA(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(d=>$t(d,t)),u=B.union(a);n=i?B.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(d=>$t(d,t)),u=B.xor(a);n=i?B.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:B.any();else{let a=i?n:$t(e.allOf[0],t),u=i?0:1;for(let d=u;d<e.allOf.length;d++)a=B.intersection(a,$t(e.allOf[d],t));n=a}e.nullable===!0&&t.version==="openapi-3.0"&&(n=B.nullable(n)),e.readOnly===!0&&(n=B.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of o)a in e&&(r[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(r[a]=e[a]);for(let a of Object.keys(e))BU.has(a)||(r[a]=e[a]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function fA(e,t){var s;if(typeof e=="boolean")return e?B.any():B.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch(a){throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=HU(n,t==null?void 0:t.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:(s=t==null?void 0:t.registry)!=null?s:gt};return $t(n,o)}var Jp={};Vn(Jp,{bigint:()=>YU,boolean:()=>XU,date:()=>QU,number:()=>KU,string:()=>JU});function JU(e){return TS(vs,e)}function KU(e){return LS(Ss,e)}function XU(e){return qS(ws,e)}function YU(e){return HS(xs,e)}function QU(e){return iw(xl,e)}We(Md());var Oe={authenticate:"authenticate",initialize:"initialize",session_cancel:"session/cancel",session_fork:"session/fork",session_list:"session/list",session_load:"session/load",session_new:"session/new",session_prompt:"session/prompt",session_resume:"session/resume",session_set_config_option:"session/set_config_option",session_set_mode:"session/set_mode",session_set_model:"session/set_model"},ot={fs_read_text_file:"fs/read_text_file",fs_write_text_file:"fs/write_text_file",session_request_permission:"session/request_permission",session_update:"session/update",terminal_create:"terminal/create",terminal_kill:"terminal/kill",terminal_output:"terminal/output",terminal_release:"terminal/release",terminal_wait_for_exit:"terminal/wait_for_exit"},mA=1;var t6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),description:c.union([c.string(),c.null()]).optional(),id:c.string(),name:c.string()}),u$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),methodId:c.string()}),n6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),r6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),blob:c.string(),mimeType:c.union([c.string(),c.null()]).optional(),uri:c.string()}),i6=c.object({amount:c.number(),currency:c.string()}),o6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),terminalId:c.string()}),s6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),newText:c.string(),oldText:c.union([c.string(),c.null()]).optional(),path:c.string()}),gA=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),name:c.string(),value:c.string()}),a6=c.union([c.literal(-32700),c.literal(-32600),c.literal(-32601),c.literal(-32602),c.literal(-32603),c.literal(-32800),c.literal(-32e3),c.literal(-32002),c.number().int().min(-2147483648,{message:"Invalid value: Expected int32 to be >= -2147483648"}).max(2147483647,{message:"Invalid value: Expected int32 to be <= 2147483647"})]),hA=c.object({code:a6,data:c.unknown().optional(),message:c.string()}),vA=c.unknown(),yA=c.unknown(),SA=c.unknown(),l6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),readTextFile:c.boolean().optional().default(!1),writeTextFile:c.boolean().optional().default(!1)}),u6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),fs:l6.optional().default({readTextFile:!1,writeTextFile:!1}),terminal:c.boolean().optional().default(!1)}),wA=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),name:c.string(),value:c.string()}),xA=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),name:c.string(),title:c.union([c.string(),c.null()]).optional(),version:c.string()}),c6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),c$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),cursor:c.union([c.string(),c.null()]).optional(),cwd:c.union([c.string(),c.null()]).optional()}),d6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),http:c.boolean().optional().default(!1),sse:c.boolean().optional().default(!1)}),p6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),headers:c.array(wA),name:c.string(),url:c.string()}),f6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),headers:c.array(wA),name:c.string(),url:c.string()}),m6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),args:c.array(c.string()),command:c.string(),env:c.array(gA),name:c.string()}),Kp=c.union([p6.and(c.object({type:c.literal("http")})),f6.and(c.object({type:c.literal("sse")})),m6]),d$=c.string(),g6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),description:c.union([c.string(),c.null()]).optional(),modelId:d$,name:c.string()}),p$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),cwd:c.string(),mcpServers:c.array(Kp)}),$A=c.string(),h6=c.union([c.literal("allow_once"),c.literal("allow_always"),c.literal("reject_once"),c.literal("reject_always")]),v6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),kind:h6,name:c.string(),optionId:$A}),y6=c.union([c.literal("high"),c.literal("medium"),c.literal("low")]),S6=c.union([c.literal("pending"),c.literal("in_progress"),c.literal("completed")]),w6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),content:c.string(),priority:y6,status:S6}),x6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),entries:c.array(w6)}),$6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),audio:c.boolean().optional().default(!1),embeddedContext:c.boolean().optional().default(!1),image:c.boolean().optional().default(!1)}),_A=c.number().int().gte(0).lte(65535),f$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),clientCapabilities:u6.optional().default({fs:{readTextFile:!1,writeTextFile:!1},terminal:!1}),clientInfo:c.union([xA,c.null()]).optional(),protocolVersion:_A}),_6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),content:c.string()}),k6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),Gi=c.union([c.null(),c.number(),c.string()]),TB=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),requestId:Gi}),b6=c.enum(["assistant","user"]),El=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),audience:c.union([c.array(b6),c.null()]).optional(),lastModified:c.union([c.string(),c.null()]).optional(),priority:c.union([c.number(),c.null()]).optional()}),I6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),annotations:c.union([El,c.null()]).optional(),data:c.string(),mimeType:c.string()}),C6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),annotations:c.union([El,c.null()]).optional(),data:c.string(),mimeType:c.string(),uri:c.union([c.string(),c.null()]).optional()}),E6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),annotations:c.union([El,c.null()]).optional(),description:c.union([c.string(),c.null()]).optional(),mimeType:c.union([c.string(),c.null()]).optional(),name:c.string(),size:c.union([c.number(),c.null()]).optional(),title:c.union([c.string(),c.null()]).optional(),uri:c.string()}),P6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),optionId:$A}),T6=c.union([c.object({outcome:c.literal("cancelled")}),P6.and(c.object({outcome:c.literal("selected")}))]),z6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),outcome:T6}),A6=c.string(),kA=c.string(),N6=c.union([c.literal("mode"),c.literal("model"),c.literal("thought_level"),c.string()]),m$=c.string(),bA=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),description:c.union([c.string(),c.null()]).optional(),name:c.string(),value:m$}),O6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),group:A6,name:c.string(),options:c.array(bA)}),D6=c.union([c.array(bA),c.array(O6)]),R6=c.object({currentValue:m$,options:D6}),$s=R6.and(c.object({type:c.literal("select")})).and(c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),category:c.union([N6,c.null()]).optional(),description:c.union([c.string(),c.null()]).optional(),id:kA,name:c.string()})),M6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),configOptions:c.array($s)}),L6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),et=c.string(),g$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),sessionId:et}),zB=c.object({method:c.string(),params:c.union([c.union([g$,vA]),c.null()]).optional()}),h$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),args:c.array(c.string()).optional(),command:c.string(),cwd:c.union([c.string(),c.null()]).optional(),env:c.array(gA).optional(),outputByteLimit:c.union([c.number(),c.null()]).optional(),sessionId:et}),v$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),cwd:c.string(),mcpServers:c.array(Kp).optional(),sessionId:et}),y$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),sessionId:et,terminalId:c.string()}),S$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),cwd:c.string(),mcpServers:c.array(Kp),sessionId:et}),w$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),limit:c.union([c.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),c.null()]).optional(),line:c.union([c.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),c.null()]).optional(),path:c.string(),sessionId:et}),x$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),sessionId:et,terminalId:c.string()}),$$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),cwd:c.string(),mcpServers:c.array(Kp).optional(),sessionId:et}),j6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),cwd:c.string(),sessionId:et,title:c.union([c.string(),c.null()]).optional(),updatedAt:c.union([c.string(),c.null()]).optional()}),U6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),nextCursor:c.union([c.string(),c.null()]).optional(),sessions:c.array(j6)}),F6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),title:c.union([c.string(),c.null()]).optional(),updatedAt:c.union([c.string(),c.null()]).optional()}),Z6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),Xp=c.string(),V6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),currentModeId:Xp}),W6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),description:c.union([c.string(),c.null()]).optional(),id:Xp,name:c.string()}),Yp=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),availableModes:c.array(W6),currentModeId:Xp}),Qp=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),availableModels:c.array(g6),currentModelId:d$}),q6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),configOptions:c.union([c.array($s),c.null()]).optional(),models:c.union([Qp,c.null()]).optional(),modes:c.union([Yp,c.null()]).optional(),sessionId:et}),B6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),configOptions:c.union([c.array($s),c.null()]).optional(),models:c.union([Qp,c.null()]).optional(),modes:c.union([Yp,c.null()]).optional()}),H6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),configOptions:c.union([c.array($s),c.null()]).optional(),models:c.union([Qp,c.null()]).optional(),modes:c.union([Yp,c.null()]).optional(),sessionId:et}),G6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),configOptions:c.union([c.array($s),c.null()]).optional(),models:c.union([Qp,c.null()]).optional(),modes:c.union([Yp,c.null()]).optional()}),J6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),K6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),fork:c.union([L6,c.null()]).optional(),list:c.union([Z6,c.null()]).optional(),resume:c.union([J6,c.null()]).optional()}),X6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),loadSession:c.boolean().optional().default(!1),mcpCapabilities:d6.optional().default({http:!1,sse:!1}),promptCapabilities:$6.optional().default({audio:!1,embeddedContext:!1,image:!1}),sessionCapabilities:K6.optional().default({})}),Y6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),agentCapabilities:X6.optional().default({loadSession:!1,mcpCapabilities:{http:!1,sse:!1},promptCapabilities:{audio:!1,embeddedContext:!1,image:!1},sessionCapabilities:{}}),agentInfo:c.union([xA,c.null()]).optional(),authMethods:c.array(t6).optional().default([]),protocolVersion:_A}),_$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),configId:kA,sessionId:et,value:m$}),Q6=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),configOptions:c.array($s)}),k$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),modeId:Xp,sessionId:et}),eF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),b$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),modelId:d$,sessionId:et}),tF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),nF=c.union([c.literal("end_turn"),c.literal("max_tokens"),c.literal("max_turn_requests"),c.literal("refusal"),c.literal("cancelled")]),rF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),terminalId:c.string()}),iF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),exitCode:c.union([c.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),c.null()]).optional(),signal:c.union([c.string(),c.null()]).optional()}),I$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),sessionId:et,terminalId:c.string()}),oF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),exitStatus:c.union([iF,c.null()]).optional(),output:c.string(),truncated:c.boolean()}),sF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),annotations:c.union([El,c.null()]).optional(),text:c.string()}),aF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),mimeType:c.union([c.string(),c.null()]).optional(),text:c.string(),uri:c.string()}),lF=c.union([aF,r6]),uF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),annotations:c.union([El,c.null()]).optional(),resource:lF}),C$=c.union([sF.and(c.object({type:c.literal("text")})),C6.and(c.object({type:c.literal("image")})),I6.and(c.object({type:c.literal("audio")})),E6.and(c.object({type:c.literal("resource_link")})),uF.and(c.object({type:c.literal("resource")}))]),cF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),content:C$}),l$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),content:C$}),E$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),prompt:c.array(C$),sessionId:et}),AB=c.object({id:Gi,method:c.string(),params:c.union([c.union([f$,u$,p$,S$,c$,v$,$$,k$,_$,E$,b$,yA]),c.null()]).optional()}),IA=c.union([cF.and(c.object({type:c.literal("content")})),s6.and(c.object({type:c.literal("diff")})),rF.and(c.object({type:c.literal("terminal")}))]),CA=c.string(),EA=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),line:c.union([c.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),c.null()]).optional(),path:c.string()}),PA=c.union([c.literal("pending"),c.literal("in_progress"),c.literal("completed"),c.literal("failed")]),TA=c.union([c.literal("read"),c.literal("edit"),c.literal("delete"),c.literal("move"),c.literal("search"),c.literal("execute"),c.literal("think"),c.literal("fetch"),c.literal("switch_mode"),c.literal("other")]),dF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),content:c.array(IA).optional(),kind:TA.optional(),locations:c.array(EA).optional(),rawInput:c.unknown().optional(),rawOutput:c.unknown().optional(),status:PA.optional(),title:c.string(),toolCallId:CA}),zA=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),content:c.union([c.array(IA),c.null()]).optional(),kind:c.union([TA,c.null()]).optional(),locations:c.union([c.array(EA),c.null()]).optional(),rawInput:c.unknown().optional(),rawOutput:c.unknown().optional(),status:c.union([PA,c.null()]).optional(),title:c.union([c.string(),c.null()]).optional(),toolCallId:CA}),P$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),options:c.array(v6),sessionId:et,toolCall:zA}),pF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),hint:c.string()}),fF=pF,mF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),description:c.string(),input:c.union([fF,c.null()]).optional(),name:c.string()}),gF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),availableCommands:c.array(mF)}),hF=c.object({cachedReadTokens:c.union([c.number(),c.null()]).optional(),cachedWriteTokens:c.union([c.number(),c.null()]).optional(),inputTokens:c.number(),outputTokens:c.number(),thoughtTokens:c.union([c.number(),c.null()]).optional(),totalTokens:c.number()}),vF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),stopReason:nF,usage:c.union([hF,c.null()]).optional()}),NB=c.union([c.object({id:Gi,result:c.union([Y6,n6,H6,B6,U6,q6,G6,eF,Q6,vF,tF,SA])}),c.object({error:hA,id:Gi})]),yF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),cost:c.union([i6,c.null()]).optional(),size:c.number(),used:c.number()}),SF=c.union([l$.and(c.object({sessionUpdate:c.literal("user_message_chunk")})),l$.and(c.object({sessionUpdate:c.literal("agent_message_chunk")})),l$.and(c.object({sessionUpdate:c.literal("agent_thought_chunk")})),dF.and(c.object({sessionUpdate:c.literal("tool_call")})),zA.and(c.object({sessionUpdate:c.literal("tool_call_update")})),x6.and(c.object({sessionUpdate:c.literal("plan")})),gF.and(c.object({sessionUpdate:c.literal("available_commands_update")})),V6.and(c.object({sessionUpdate:c.literal("current_mode_update")})),M6.and(c.object({sessionUpdate:c.literal("config_option_update")})),F6.and(c.object({sessionUpdate:c.literal("session_info_update")})),yF.and(c.object({sessionUpdate:c.literal("usage_update")}))]),T$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),sessionId:et,update:SF}),OB=c.object({method:c.string(),params:c.union([c.union([T$,vA]),c.null()]).optional()}),z$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),sessionId:et,terminalId:c.string()}),wF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),exitCode:c.union([c.number().int().gte(0).max(4294967295,{message:"Invalid value: Expected uint32 to be <= 4294967295"}),c.null()]).optional(),signal:c.union([c.string(),c.null()]).optional()}),A$=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional(),content:c.string(),path:c.string(),sessionId:et}),DB=c.object({id:Gi,method:c.string(),params:c.union([c.union([A$,w$,P$,h$,I$,x$,z$,y$,yA]),c.null()]).optional()}),xF=c.object({_meta:c.union([c.record(c.string(),c.unknown()),c.null()]).optional()}),RB=c.union([c.object({id:Gi,result:c.union([xF,_6,z6,o6,oF,k6,wF,c6,SA])}),c.object({error:hA,id:Gi})]);function AA(e,t){let n=new TextEncoder,i=new TextDecoder,r=new ReadableStream({async start(s){let a="",u=t.getReader();try{for(;;){let{value:d,done:p}=await u.read();if(p)break;if(!d)continue;a+=i.decode(d,{stream:!0});let l=a.split(`
181
+ `);a=l.pop()||"";for(let f of l){let m=f.trim();if(m)try{let g=JSON.parse(m);s.enqueue(g)}catch(g){console.error("Failed to parse JSON message:",m,g)}}}}finally{u.releaseLock(),s.close()}}}),o=new WritableStream({async write(s){let a=JSON.stringify(s)+`
182
+ `,u=e.getWriter();try{await u.write(n.encode(a))}finally{u.releaseLock()}}});return{readable:r,writable:o}}var Jt,NA=class{constructor(t,n){nt(this,Jt,void 0);let i=t(this),r=async(s,a)=>{switch(s){case Oe.initialize:{let u=f$.parse(a);return i.initialize(u)}case Oe.session_new:{let u=p$.parse(a);return i.newSession(u)}case Oe.session_load:{if(!i.loadSession)throw xe.methodNotFound(s);let u=S$.parse(a);return i.loadSession(u)}case Oe.session_list:{if(!i.unstable_listSessions)throw xe.methodNotFound(s);let u=c$.parse(a);return i.unstable_listSessions(u)}case Oe.session_fork:{if(!i.unstable_forkSession)throw xe.methodNotFound(s);let u=v$.parse(a);return i.unstable_forkSession(u)}case Oe.session_resume:{if(!i.unstable_resumeSession)throw xe.methodNotFound(s);let u=$$.parse(a);return i.unstable_resumeSession(u)}case Oe.session_set_mode:{if(!i.setSessionMode)throw xe.methodNotFound(s);let u=k$.parse(a),d=await i.setSessionMode(u);return d!=null?d:{}}case Oe.authenticate:{let u=u$.parse(a),d=await i.authenticate(u);return d!=null?d:{}}case Oe.session_prompt:{let u=E$.parse(a);return i.prompt(u)}case Oe.session_set_model:{if(!i.unstable_setSessionModel)throw xe.methodNotFound(s);let u=b$.parse(a),d=await i.unstable_setSessionModel(u);return d!=null?d:{}}case Oe.session_set_config_option:{if(!i.setSessionConfigOption)throw xe.methodNotFound(s);let u=_$.parse(a);return i.setSessionConfigOption(u)}default:if(i.extMethod)return i.extMethod(s,a);throw xe.methodNotFound(s)}},o=async(s,a)=>{switch(s){case Oe.session_cancel:{let u=g$.parse(a);return i.cancel(u)}default:if(i.extNotification)return i.extNotification(s,a);throw xe.methodNotFound(s)}};En(this,Jt,new tf(r,o,n))}async sessionUpdate(t){return await ie(this,Jt).sendNotification(ot.session_update,t)}async requestPermission(t){return await ie(this,Jt).sendRequest(ot.session_request_permission,t)}async readTextFile(t){return await ie(this,Jt).sendRequest(ot.fs_read_text_file,t)}async writeTextFile(t){var n;return(n=await ie(this,Jt).sendRequest(ot.fs_write_text_file,t))!=null?n:{}}async createTerminal(t){let n=await ie(this,Jt).sendRequest(ot.terminal_create,t);return new N$(n.terminalId,t.sessionId,ie(this,Jt))}async extMethod(t,n){return await ie(this,Jt).sendRequest(t,n)}async extNotification(t,n){return await ie(this,Jt).sendNotification(t,n)}get signal(){return ie(this,Jt).signal}get closed(){return ie(this,Jt).closed}};Jt=new WeakMap;var fi,mi,N$=class{constructor(t,n,i){Ul(this,"id");nt(this,fi,void 0);nt(this,mi,void 0);this.id=t,En(this,fi,n),En(this,mi,i)}async currentOutput(){return await ie(this,mi).sendRequest(ot.terminal_output,{sessionId:ie(this,fi),terminalId:this.id})}async waitForExit(){return await ie(this,mi).sendRequest(ot.terminal_wait_for_exit,{sessionId:ie(this,fi),terminalId:this.id})}async kill(){var t;return(t=await ie(this,mi).sendRequest(ot.terminal_kill,{sessionId:ie(this,fi),terminalId:this.id}))!=null?t:{}}async release(){var t;return(t=await ie(this,mi).sendRequest(ot.terminal_release,{sessionId:ie(this,fi),terminalId:this.id}))!=null?t:{}}async[Symbol.asyncDispose](){await this.release()}};fi=new WeakMap,mi=new WeakMap;var tt,ef=class{constructor(t,n){nt(this,tt,void 0);let i=t(this),r=async(s,a)=>{var u,d,p,l,f,m,g;switch(s){case ot.fs_write_text_file:{let h=A$.parse(a);return(u=i.writeTextFile)==null?void 0:u.call(i,h)}case ot.fs_read_text_file:{let h=w$.parse(a);return(d=i.readTextFile)==null?void 0:d.call(i,h)}case ot.session_request_permission:{let h=P$.parse(a);return i.requestPermission(h)}case ot.terminal_create:{let h=h$.parse(a);return(p=i.createTerminal)==null?void 0:p.call(i,h)}case ot.terminal_output:{let h=I$.parse(a);return(l=i.terminalOutput)==null?void 0:l.call(i,h)}case ot.terminal_release:{let h=x$.parse(a),x=await((f=i.releaseTerminal)==null?void 0:f.call(i,h));return x!=null?x:{}}case ot.terminal_wait_for_exit:{let h=z$.parse(a);return(m=i.waitForTerminalExit)==null?void 0:m.call(i,h)}case ot.terminal_kill:{let h=y$.parse(a),x=await((g=i.killTerminal)==null?void 0:g.call(i,h));return x!=null?x:{}}default:if(i.extMethod)return i.extMethod(s,a);throw xe.methodNotFound(s)}},o=async(s,a)=>{switch(s){case ot.session_update:{let u=T$.parse(a);return i.sessionUpdate(u)}default:if(i.extNotification)return i.extNotification(s,a);throw xe.methodNotFound(s)}};En(this,tt,new tf(r,o,n))}async initialize(t){return await ie(this,tt).sendRequest(Oe.initialize,t)}async newSession(t){return await ie(this,tt).sendRequest(Oe.session_new,t)}async loadSession(t){var n;return(n=await ie(this,tt).sendRequest(Oe.session_load,t))!=null?n:{}}async unstable_forkSession(t){return await ie(this,tt).sendRequest(Oe.session_fork,t)}async unstable_listSessions(t){return await ie(this,tt).sendRequest(Oe.session_list,t)}async unstable_resumeSession(t){return await ie(this,tt).sendRequest(Oe.session_resume,t)}async setSessionMode(t){var n;return(n=await ie(this,tt).sendRequest(Oe.session_set_mode,t))!=null?n:{}}async unstable_setSessionModel(t){var n;return(n=await ie(this,tt).sendRequest(Oe.session_set_model,t))!=null?n:{}}async setSessionConfigOption(t){return await ie(this,tt).sendRequest(Oe.session_set_config_option,t)}async authenticate(t){var n;return(n=await ie(this,tt).sendRequest(Oe.authenticate,t))!=null?n:{}}async prompt(t){return await ie(this,tt).sendRequest(Oe.session_prompt,t)}async cancel(t){return await ie(this,tt).sendNotification(Oe.session_cancel,t)}async extMethod(t,n){return await ie(this,tt).sendRequest(t,n)}async extNotification(t,n){return await ie(this,tt).sendNotification(t,n)}get signal(){return ie(this,tt).signal}get closed(){return ie(this,tt).closed}};tt=new WeakMap;var _s,nf,Tl,zl,ks,bs,Is,Al,rf,OA,of,DA,sf,RA,af,MA,lf,LA,Ji,Pl,tf=class{constructor(t,n,i){nt(this,rf);nt(this,of);nt(this,sf);nt(this,af);nt(this,lf);nt(this,Ji);nt(this,_s,new Map);nt(this,nf,0);nt(this,Tl,void 0);nt(this,zl,void 0);nt(this,ks,void 0);nt(this,bs,Promise.resolve());nt(this,Is,new AbortController);nt(this,Al,void 0);En(this,Tl,t),En(this,zl,n),En(this,ks,i),En(this,Al,new Promise(r=>{ie(this,Is).signal.addEventListener("abort",()=>r())})),Wn(this,rf,OA).call(this)}get signal(){return ie(this,Is).signal}get closed(){return ie(this,Al)}async sendRequest(t,n){let i=G$(this,nf)._++,r=new Promise((o,s)=>{ie(this,_s).set(i,{resolve:o,reject:s})});return await Wn(this,Ji,Pl).call(this,{jsonrpc:"2.0",id:i,method:t,params:n}),r}async sendNotification(t,n){await Wn(this,Ji,Pl).call(this,{jsonrpc:"2.0",method:t,params:n})}};_s=new WeakMap,nf=new WeakMap,Tl=new WeakMap,zl=new WeakMap,ks=new WeakMap,bs=new WeakMap,Is=new WeakMap,Al=new WeakMap,rf=new WeakSet,OA=async function(){let t=ie(this,ks).readable.getReader();try{for(;;){let{value:n,done:i}=await t.read();if(i)break;if(n)try{Wn(this,of,DA).call(this,n)}catch(r){console.error("Unexpected error during message processing:",n,r),"id"in n&&n.id!==void 0&&Wn(this,Ji,Pl).call(this,{jsonrpc:"2.0",id:n.id,error:{code:-32700,message:"Parse error"}})}}}finally{t.releaseLock(),ie(this,Is).abort()}},of=new WeakSet,DA=async function(t){if("method"in t&&"id"in t){let n=await Wn(this,sf,RA).call(this,t.method,t.params);"error"in n&&console.error("Error handling request",t,n.error),await Wn(this,Ji,Pl).call(this,{jsonrpc:"2.0",id:t.id,...n})}else if("method"in t){let n=await Wn(this,af,MA).call(this,t.method,t.params);"error"in n&&console.error("Error handling notification",t,n.error)}else"id"in t?Wn(this,lf,LA).call(this,t):console.error("Invalid message",{message:t})},sf=new WeakSet,RA=async function(t,n){try{let i=await ie(this,Tl).call(this,t,n);return{result:i!=null?i:null}}catch(i){if(i instanceof xe)return i.toResult();if(i instanceof c.ZodError)return xe.invalidParams(i.format()).toResult();let r;(i instanceof Error||typeof i=="object"&&i!=null&&"message"in i&&typeof i.message=="string")&&(r=i.message);try{return xe.internalError(r?JSON.parse(r):{}).toResult()}catch(o){return xe.internalError({details:r}).toResult()}}},af=new WeakSet,MA=async function(t,n){try{return await ie(this,zl).call(this,t,n),{result:null}}catch(i){if(i instanceof xe)return i.toResult();if(i instanceof c.ZodError)return xe.invalidParams(i.format()).toResult();let r;(i instanceof Error||typeof i=="object"&&i!=null&&"message"in i&&typeof i.message=="string")&&(r=i.message);try{return xe.internalError(r?JSON.parse(r):{}).toResult()}catch(o){return xe.internalError({details:r}).toResult()}}},lf=new WeakSet,LA=function(t){let n=ie(this,_s).get(t.id);n?("result"in t?n.resolve(t.result):"error"in t&&n.reject(t.error),ie(this,_s).delete(t.id)):console.error("Got response to unknown request",t.id)},Ji=new WeakSet,Pl=async function(t){return En(this,bs,ie(this,bs).then(async()=>{let n=ie(this,ks).writable.getWriter();try{await n.write(t)}finally{n.releaseLock()}}).catch(n=>{console.error("ACP write error:",n)})),ie(this,bs)};var xe=class extends Error{constructor(n,i,r){super(i);Ul(this,"code");Ul(this,"data");this.code=n,this.name="RequestError",this.data=r}static parseError(n,i){return new xe(-32700,`Parse error${i?`: ${i}`:""}`,n)}static invalidRequest(n,i){return new xe(-32600,`Invalid request${i?`: ${i}`:""}`,n)}static methodNotFound(n){return new xe(-32601,`"Method not found": ${n}`,{method:n})}static invalidParams(n,i){return new xe(-32602,`Invalid params${i?`: ${i}`:""}`,n)}static internalError(n,i){return new xe(-32603,`Internal error${i?`: ${i}`:""}`,n)}static authRequired(n,i){return new xe(-32e3,`Authentication required${i?`: ${i}`:""}`,n)}static resourceNotFound(n){return new xe(-32002,`Resource not found${n?`: ${n}`:""}`,n&&{uri:n})}toResult(){return{error:{code:this.code,message:this.message,data:this.data}}}toErrorResponse(){return{code:this.code,message:this.message,data:this.data}}};var Cs=require("obsidian");var _t=class{static toSlashCommands(t){return(t||[]).map(n=>{var i,r;return{name:n.name,description:n.description,hint:(r=(i=n.input)==null?void 0:i.hint)!=null?r:null}})}static toToolCallContent(t){if(!t)return;let n=[];for(let i of t)i.type==="diff"?n.push({type:"diff",path:i.path,newText:i.newText,oldText:i.oldText}):i.type==="terminal"&&n.push({type:"terminal",terminalId:i.terminalId});return n.length>0?n:void 0}static toSessionConfigOptions(t){return t.map(n=>{var i,r;return{id:n.id,name:n.name,description:(i=n.description)!=null?i:void 0,category:(r=n.category)!=null?r:void 0,type:n.type,currentValue:n.currentValue,options:this.toSessionConfigSelectOptions(n.options)}})}static toSessionConfigSelectOptions(t){return t.length===0?[]:"group"in t[0]?t.map(i=>({group:i.group,name:i.name,options:i.options.map(r=>{var o;return{value:r.value,name:r.name,description:(o=r.description)!=null?o:void 0}})})):t.map(i=>{var r;return{value:i.value,name:i.name,description:(r=i.description)!=null?r:void 0}})}static toSessionResult(t,n){let i;n.modes&&(i={availableModes:n.modes.availableModes.map(s=>{var a;return{id:s.id,name:s.name,description:(a=s.description)!=null?a:void 0}}),currentModeId:n.modes.currentModeId});let r;n.models&&(r={availableModels:n.models.availableModels.map(s=>{var a;return{modelId:s.modelId,name:s.name,description:(a=s.description)!=null?a:void 0}}),currentModelId:n.models.currentModelId});let o=n.configOptions?this.toSessionConfigOptions(n.configOptions):void 0;return{sessionId:t,modes:i,models:r,configOptions:o}}static toAcpContentBlock(t){switch(t.type){case"text":return{type:"text",text:t.text};case"image":return{type:"image",data:t.data,mimeType:t.mimeType};case"resource":return{type:"resource",resource:{uri:t.resource.uri,mimeType:t.resource.mimeType,text:t.resource.text},annotations:t.annotations};case"resource_link":return{type:"resource_link",uri:t.uri,name:t.name,mimeType:t.mimeType,size:t.size}}}static toInitializeResult(t){var o,s,a,u,d,p,l,f,m,g,h,x,y,v,S,w,$,_;let n=(o=t.agentCapabilities)==null?void 0:o.promptCapabilities,i=(s=t.agentCapabilities)==null?void 0:s.mcpCapabilities,r=(a=t.agentCapabilities)==null?void 0:a.sessionCapabilities;return{protocolVersion:t.protocolVersion,authMethods:t.authMethods||[],promptCapabilities:{image:(u=n==null?void 0:n.image)!=null?u:!1,audio:(d=n==null?void 0:n.audio)!=null?d:!1,embeddedContext:(p=n==null?void 0:n.embeddedContext)!=null?p:!1},agentCapabilities:{loadSession:(f=(l=t.agentCapabilities)==null?void 0:l.loadSession)!=null?f:!1,sessionCapabilities:r?{resume:(m=r.resume)!=null?m:void 0,fork:(g=r.fork)!=null?g:void 0,list:(h=r.list)!=null?h:void 0}:void 0,mcpCapabilities:i?{http:(x=i.http)!=null?x:!1,sse:(y=i.sse)!=null?y:!1}:void 0,promptCapabilities:{image:(v=n==null?void 0:n.image)!=null?v:!1,audio:(S=n==null?void 0:n.audio)!=null?S:!1,embeddedContext:(w=n==null?void 0:n.embeddedContext)!=null?w:!1}},agentInfo:t.agentInfo?{name:t.agentInfo.name,title:($=t.agentInfo.title)!=null?$:void 0,version:(_=t.agentInfo.version)!=null?_:void 0}:void 0}}};var jA=require("child_process");var O$=require("obsidian");var uf=class{constructor(t){this.terminals=new Map;this.logger=_e(),this.plugin=t}createTerminal(t){var f,m;let n=crypto.randomUUID();if(!O$.Platform.isDesktopApp)throw new Error("Agent Client is only available on desktop");let i={...process.env};if(O$.Platform.isWin&&!this.plugin.settings.windowsWslMode&&(i=bc(i)),t.env)for(let g of t.env)i[g.name]=g.value;let r=t.command,o=t.args||[],s=Nc(this.plugin.settings.nodePath),a=Ic(r,o,t.cwd||process.cwd(),{wslMode:this.plugin.settings.windowsWslMode,wslDistribution:this.plugin.settings.windowsWslDistribution,nodeDir:s,alwaysEscape:!1});r=a.command,o=a.args;let u=a.needsShell;this.logger.log(`[Terminal ${n}] Creating terminal:`,{command:r,args:o,cwd:t.cwd});let d={cwd:t.cwd||void 0,env:i,stdio:["pipe","pipe","pipe"],shell:u},p=(0,jA.spawn)(r,o,d),l={id:n,process:p,output:"",exitStatus:null,outputByteLimit:t.outputByteLimit!==void 0?Number(t.outputByteLimit):void 0,waitPromises:[]};return p.on("error",g=>{this.logger.log(`[Terminal ${n}] Process error:`,g.message);let h={exitCode:127,signal:null};l.exitStatus=h,l.waitPromises.forEach(x=>x(h)),l.waitPromises=[]}),(f=p.stdout)==null||f.on("data",g=>{let h=g.toString();this.logger.log(`[Terminal ${n}] stdout:`,h),this.appendOutput(l,h)}),(m=p.stderr)==null||m.on("data",g=>{let h=g.toString();this.logger.log(`[Terminal ${n}] stderr:`,h),this.appendOutput(l,h)}),p.on("exit",(g,h)=>{this.logger.log(`[Terminal ${n}] Process exited with code: ${g}, signal: ${h}`);let x={exitCode:g,signal:h};l.exitStatus=x,l.waitPromises.forEach(y=>y(x)),l.waitPromises=[]}),this.terminals.set(n,l),n}appendOutput(t,n){if(t.output+=n,t.outputByteLimit&&Buffer.byteLength(t.output,"utf8")>t.outputByteLimit){let i=Buffer.from(t.output,"utf8"),r=i.subarray(i.length-t.outputByteLimit);t.output=r.toString("utf8")}}getOutput(t){let n=this.terminals.get(t);return n?{output:n.output,truncated:n.outputByteLimit?Buffer.byteLength(n.output,"utf8")>=n.outputByteLimit:!1,exitStatus:n.exitStatus}:null}waitForExit(t){let n=this.terminals.get(t);return n?n.exitStatus?Promise.resolve(n.exitStatus):new Promise(i=>{n.waitPromises.push(i)}):Promise.reject(new Error(`Terminal ${t} not found`))}killTerminal(t){let n=this.terminals.get(t);return n?(n.exitStatus||n.process.kill("SIGTERM"),!0):!1}releaseTerminal(t){let n=this.terminals.get(t);return n?(this.logger.log(`[Terminal ${t}] Releasing terminal`),n.exitStatus||n.process.kill("SIGTERM"),n.cleanupTimeout=window.setTimeout(()=>{this.logger.log(`[Terminal ${t}] Cleaning up terminal after grace period`),this.terminals.delete(t)},3e4),!0):!1}killAllTerminals(){this.logger.log(`Killing ${this.terminals.size} running terminals...`),this.terminals.forEach((t,n)=>{t.cleanupTimeout&&window.clearTimeout(t.cleanupTimeout),t.exitStatus||(this.logger.log(`Killing terminal ${n}`),this.killTerminal(n))}),this.terminals.clear()}};var cf=class{constructor(t,n){this.pendingRequests=new Map;this.requestQueue=[];this.logger=_e(),this.callbacks=t,this.autoAllow=n}setAutoAllow(t){this.autoAllow=t}async request(t){var d,p,l;if(this.logger.log("[PermissionManager] Permission request received:",t),this.autoAllow){let f=t.options.find(m=>m.kind==="allow_once"||m.kind==="allow_always"||!m.kind&&m.name.toLowerCase().includes("allow"))||t.options[0];return this.logger.log("[PermissionManager] Auto-allowing permission request:",f),Promise.resolve({outcome:{outcome:"selected",optionId:f.optionId}})}let n=crypto.randomUUID(),i=((d=t.toolCall)==null?void 0:d.toolCallId)||crypto.randomUUID(),r=t.sessionId,o=t.options.map(f=>{let m=f.kind==="reject_always"?"reject_once":f.kind,g=m||(f.name.toLowerCase().includes("allow")?"allow_once":"reject_once");return{optionId:f.optionId,name:f.name,kind:g}}),s=this.requestQueue.length===0,a={requestId:n,options:o,isActive:s};this.requestQueue.push({requestId:n,toolCallId:i,options:o,sessionId:r});let u=t.toolCall;return this.callbacks.onSessionUpdate({type:"tool_call",sessionId:r,toolCallId:i,title:(p=u==null?void 0:u.title)!=null?p:void 0,status:(u==null?void 0:u.status)||"pending",kind:(l=u==null?void 0:u.kind)!=null?l:void 0,content:_t.toToolCallContent(u==null?void 0:u.content),rawInput:u==null?void 0:u.rawInput,permissionRequest:a}),new Promise(f=>{this.pendingRequests.set(n,{resolve:f,toolCallId:i,options:o,sessionId:r})})}respond(t,n){let i=this.pendingRequests.get(t);if(!i)return;let{resolve:r,toolCallId:o,options:s,sessionId:a}=i;this.callbacks.onSessionUpdate({type:"tool_call_update",sessionId:a,toolCallId:o,permissionRequest:{requestId:t,options:s,selectedOptionId:n,isActive:!1}}),r({outcome:{outcome:"selected",optionId:n}}),this.pendingRequests.delete(t),this.requestQueue=this.requestQueue.filter(u=>u.requestId!==t),this.activateNext()}cancelAll(){this.logger.log(`[PermissionManager] Cancelling ${this.pendingRequests.size} pending permission requests`),this.pendingRequests.forEach(({resolve:t,toolCallId:n,options:i,sessionId:r},o)=>{this.callbacks.onSessionUpdate({type:"tool_call_update",sessionId:r,toolCallId:n,status:"completed",permissionRequest:{requestId:o,options:i,isCancelled:!0,isActive:!1}}),t({outcome:{outcome:"cancelled"}})}),this.pendingRequests.clear(),this.requestQueue=[]}activateNext(){if(this.requestQueue.length===0)return;let t=this.requestQueue[0],n=this.pendingRequests.get(t.requestId);n&&this.callbacks.onSessionUpdate({type:"tool_call_update",sessionId:t.sessionId,toolCallId:t.toolCallId,permissionRequest:{requestId:t.requestId,options:n.options,isActive:!0}})}};var df=class{constructor(t,n,i,r,o){this.permissionManager=t;this.terminalManager=n;this.getWorkingDirectory=i;this.getCurrentSessionId=r;this.logger=o;this.sessionUpdateListeners=new Set;this.promptSessionUpdateCount=0}resetUpdateCount(){this.promptSessionUpdateCount=0}hasReceivedUpdates(){return this.promptSessionUpdateCount>0}onSessionUpdate(t){return this.sessionUpdateListeners.add(t),()=>this.sessionUpdateListeners.delete(t)}emitSessionUpdate(t){let n=this.getCurrentSessionId();if(!(n&&t.sessionId!==n))for(let i of this.sessionUpdateListeners)i(t)}sessionUpdate(t){var r,o,s,a;let n=t.update,i=t.sessionId;switch(this.promptSessionUpdateCount++,this.logger.log("[AcpHandler] sessionUpdate:",{sessionId:i,update:n}),n.sessionUpdate){case"agent_message_chunk":case"agent_thought_chunk":case"user_message_chunk":n.content.type==="text"&&this.emitSessionUpdate({type:n.sessionUpdate,sessionId:i,text:n.content.text});break;case"tool_call":case"tool_call_update":this.emitSessionUpdate({type:n.sessionUpdate,sessionId:i,toolCallId:n.toolCallId,title:(r=n.title)!=null?r:void 0,status:n.status||"pending",kind:(o=n.kind)!=null?o:void 0,content:_t.toToolCallContent(n.content),locations:(s=n.locations)!=null?s:void 0,rawInput:n.rawInput});break;case"plan":this.emitSessionUpdate({type:"plan",sessionId:i,entries:n.entries});break;case"available_commands_update":this.emitSessionUpdate({type:"available_commands_update",sessionId:i,commands:_t.toSlashCommands(n.availableCommands)});break;case"current_mode_update":this.emitSessionUpdate({type:"current_mode_update",sessionId:i,currentModeId:n.currentModeId});break;case"session_info_update":this.emitSessionUpdate({type:"session_info_update",sessionId:i,title:n.title,updatedAt:n.updatedAt});break;case"usage_update":this.emitSessionUpdate({type:"usage_update",sessionId:i,size:n.size,used:n.used,cost:(a=n.cost)!=null?a:void 0});break;case"config_option_update":this.emitSessionUpdate({type:"config_option_update",sessionId:i,configOptions:_t.toSessionConfigOptions(n.configOptions)});break}return Promise.resolve()}requestPermission(t){return this.permissionManager.request(t)}async extNotification(t,n){this.logger.log(`[AcpHandler] Extension notification received: ${t}`,n)}readTextFile(t){return Promise.resolve({content:""})}writeTextFile(t){return Promise.resolve({})}createTerminal(t){var i,r;this.logger.log("[AcpHandler] createTerminal called with params:",t);let n=this.terminalManager.createTerminal({command:t.command,args:t.args,cwd:t.cwd||this.getWorkingDirectory(),env:(i=t.env)!=null?i:void 0,outputByteLimit:(r=t.outputByteLimit)!=null?r:void 0});return Promise.resolve({terminalId:n})}terminalOutput(t){let n=this.terminalManager.getOutput(t.terminalId);if(!n)throw new Error(`Terminal ${t.terminalId} not found`);return Promise.resolve(n)}async waitForTerminalExit(t){return await this.terminalManager.waitForExit(t.terminalId)}killTerminal(t){if(!this.terminalManager.killTerminal(t.terminalId))throw new Error(`Terminal ${t.terminalId} not found`);return Promise.resolve({})}releaseTerminal(t){return this.terminalManager.releaseTerminal(t.terminalId)||this.logger.log(`[AcpHandler] releaseTerminal: Terminal ${t.terminalId} not found (may have been already cleaned up)`),Promise.resolve({})}};var pf=class{constructor(t){this.plugin=t;this.connection=null;this.agentProcess=null;this.currentConfig=null;this.isInitializedFlag=!1;this.currentAgentId=null;this.currentSessionId=null;this.recentStderr="";this.logger=_e(),this.terminalManager=new uf(t),this.permissionManager=new cf({onSessionUpdate:n=>this.handler.emitSessionUpdate(n)},!1),this.handler=new df(this.permissionManager,this.terminalManager,()=>{var n,i;return(i=(n=this.currentConfig)==null?void 0:n.workingDirectory)!=null?i:""},()=>this.currentSessionId,this.logger)}async initialize(t){var y,v,S;if(this.logger.log("[AcpClient] Starting initialization with config:",t),this.logger.log(`[AcpClient] Current state - process: ${!!this.agentProcess}, PID: ${(y=this.agentProcess)==null?void 0:y.pid}`),this.agentProcess&&this.killProcessTree(),this.connection&&(this.logger.log("[AcpClient] Cleaning up existing connection"),this.connection=null),this.currentConfig=t,this.permissionManager.setAutoAllow(this.plugin.settings.autoAllowPermissions),!t.command||t.command.trim().length===0)throw new Error(`Command not configured for agent "${t.displayName}" (${t.id}). Please configure the agent command in settings.`);let n=t.command.trim(),i=t.args.length>0?[...t.args]:[];this.logger.log(`[AcpClient] Active agent: ${t.displayName} (${t.id})`),this.logger.log("[AcpClient] Command:",n),this.logger.log("[AcpClient] Args:",i.length>0?i.join(" "):"(none)");let r={...process.env,...t.env||{}};Cs.Platform.isWin&&!this.plugin.settings.windowsWslMode&&(r=bc(r));let o=Nc(this.plugin.settings.nodePath);if(o){let w=Cs.Platform.isWin?";":":";r.PATH=r.PATH?`${o}${w}${r.PATH}`:o,this.logger.log("[AcpClient] Node.js directory added to PATH:",o)}this.logger.log("[AcpClient] Starting agent process in directory:",t.workingDirectory);let s=Ic(n,i,t.workingDirectory,{wslMode:this.plugin.settings.windowsWslMode,wslDistribution:this.plugin.settings.windowsWslDistribution,nodeDir:o,alwaysEscape:!0}),a=s.command,u=s.args,d=s.needsShell;this.logger.log("[AcpClient] Prepared spawn command:",a,u);let p=(0,D$.spawn)(a,u,{stdio:["pipe","pipe","pipe"],env:r,cwd:t.workingDirectory,shell:d,detached:!Cs.Platform.isWin});this.agentProcess=p;let l=`${t.displayName} (${t.id})`;if(p.on("spawn",()=>{this.logger.log(`[AcpClient] ${l} process spawned successfully, PID:`,p.pid)}),p.on("error",w=>{var _;this.logger.error(`[AcpClient] ${l} process error:`,w);let $={type:"spawn_failed",agentId:t.id,errorCode:w.code,originalError:w,...ZC(w,n,l,this.plugin.settings.windowsWslMode)};this.handler.emitSessionUpdate({type:"process_error",sessionId:(_=this.currentSessionId)!=null?_:"",error:$})}),p.on("exit",(w,$)=>{var _;if(this.logger.log(`[AcpClient] ${l} process exited with code:`,w,"signal:",$),w===127){this.logger.error(`[AcpClient] Command not found: ${n}`);let I={type:"command_not_found",agentId:t.id,exitCode:w,title:"Command Not Found",message:`The command "${n}" could not be found. Please check the path configuration for ${l}.`,suggestion:gh(n,this.plugin.settings.windowsWslMode)};this.handler.emitSessionUpdate({type:"process_error",sessionId:(_=this.currentSessionId)!=null?_:"",error:I})}}),p.on("close",(w,$)=>{this.logger.log(`[AcpClient] ${l} process closed with code:`,w,"signal:",$)}),(v=p.stderr)==null||v.setEncoding("utf8"),(S=p.stderr)==null||S.on("data",w=>{this.logger.log(`[AcpClient] ${l} stderr:`,w),this.recentStderr+=w,this.recentStderr.length>8192&&(this.recentStderr=this.recentStderr.slice(-4096))}),!p.stdin||!p.stdout)throw new Error("Agent process stdin/stdout not available");let f=p.stdin,m=p.stdout,g=new WritableStream({write(w){f.write(w)},close(){f.end()}}),h=new ReadableStream({start(w){m.on("data",$=>{w.enqueue($)}),m.on("end",()=>{w.close()})}});this.logger.log("[AcpClient] Using working directory:",t.workingDirectory);let x=AA(g,h);this.connection=new ef(()=>this.handler,x);try{this.logger.log("[AcpClient] Starting ACP initialization...");let w=await this.connection.initialize({protocolVersion:mA,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!0},clientInfo:{name:"obsidian-agent-client",title:"Agent Client for Obsidian",version:this.plugin.manifest.version}});return this.logger.log(`[AcpClient] \u2705 Connected to agent (protocol v${w.protocolVersion})`),this.isInitializedFlag=!0,this.currentAgentId=t.id,_t.toInitializeResult(w)}catch(w){throw this.logger.error("[AcpClient] Initialization Error:",w),this.isInitializedFlag=!1,this.currentAgentId=null,w}}async newSession(t){let n=this.requireConnection();try{this.logger.log("[AcpClient] Creating new session...");let i=await n.newSession({cwd:this.toSessionCwd(t),mcpServers:[]});this.logger.log(`[AcpClient] Created session: ${i.sessionId}`);let r=_t.toSessionResult(i.sessionId,i);return this.currentSessionId=r.sessionId,r}catch(i){throw this.logger.error("[AcpClient] New Session Error:",i),i}}async authenticate(t){let n=this.requireConnection();try{return await n.authenticate({methodId:t}),this.logger.log("[AcpClient] \u2705 authenticate ok:",t),!0}catch(i){return this.logger.error("[AcpClient] Authentication Error:",i),!1}}async sendPrompt(t,n){let i=this.requireConnection();this.handler.resetUpdateCount(),this.recentStderr="";try{let r=n.map(s=>_t.toAcpContentBlock(s));this.logger.log(`[AcpClient] Sending prompt with ${n.length} content blocks`);let o=await i.prompt({sessionId:t,prompt:r});if(this.logger.log(`[AcpClient] Agent completed with: ${o.stopReason}`),!this.handler.hasReceivedUpdates()&&o.stopReason==="end_turn"){await new Promise(a=>window.setTimeout(a,100));let s=UC(this.recentStderr);if(s)throw this.logger.warn("[AcpClient] Agent returned end_turn with no session updates \u2014 detected error in stderr"),new Error(`The agent returned an empty response. ${s}`);this.logger.log("[AcpClient] Agent returned end_turn with no session updates (may be expected for some commands)")}}catch(r){if(Dc(r)||FC(r))return;throw this.logger.error("[AcpClient] Prompt Error:",r),r}}async cancel(t){if(!this.connection){this.cancelAllOperations();return}try{this.logger.log("[AcpClient] Sending session/cancel notification..."),await this.connection.cancel({sessionId:t}),this.logger.log("[AcpClient] Cancellation request sent successfully")}catch(n){this.logger.warn("[AcpClient] Failed to send cancellation:",n)}finally{this.cancelAllOperations()}}killProcessTree(){if(!this.agentProcess)return;let t=this.agentProcess.pid;this.logger.log(`[AcpClient] Killing process tree (PID: ${t})`);try{Cs.Platform.isWin&&t?(0,D$.spawn)("taskkill",["/PID",String(t),"/T","/F"],{stdio:"ignore"}):t?process.kill(-t,"SIGTERM"):this.agentProcess.kill()}catch(n){try{this.agentProcess.kill()}catch(i){}}this.agentProcess=null}disconnect(){return this.logger.log("[AcpClient] Disconnecting..."),this.cancelAllOperations(),this.killProcessTree(),this.connection=null,this.currentConfig=null,this.isInitializedFlag=!1,this.currentAgentId=null,this.currentSessionId=null,this.logger.log("[AcpClient] Disconnected"),Promise.resolve()}isInitialized(){return this.isInitializedFlag&&this.connection!==null&&this.agentProcess!==null}getCurrentAgentId(){return this.currentAgentId}async setSessionMode(t,n){let i=this.requireConnection();this.logger.log(`[AcpClient] Setting session mode to: ${n} for session: ${t}`);try{await i.setSessionMode({sessionId:t,modeId:n}),this.logger.log(`[AcpClient] Session mode set to: ${n}`)}catch(r){throw this.logger.error("[AcpClient] Failed to set session mode:",r),r}}async setSessionModel(t,n){let i=this.requireConnection();this.logger.log(`[AcpClient] Setting session model to: ${n} for session: ${t}`);try{await i.unstable_setSessionModel({sessionId:t,modelId:n}),this.logger.log(`[AcpClient] Session model set to: ${n}`)}catch(r){throw this.logger.error("[AcpClient] Failed to set session model:",r),r}}async setSessionConfigOption(t,n,i){let r=this.requireConnection();this.logger.log(`[AcpClient] Setting config option: ${n}=${i} for session: ${t}`);try{let o=await r.setSessionConfigOption({sessionId:t,configId:n,value:i});return this.logger.log("[AcpClient] Config option set. Updated options:",o.configOptions),_t.toSessionConfigOptions(o.configOptions)}catch(o){throw this.logger.error("[AcpClient] Failed to set config option:",o),o}}onSessionUpdate(t){return this.handler.onSessionUpdate(t)}respondToPermission(t,n){return this.requireConnection(),this.logger.log("[AcpClient] Responding to permission request:",t,"with option:",n),this.permissionManager.respond(t,n),Promise.resolve()}requireConnection(){if(!this.connection)throw new Error("Connection not initialized. Call initialize() first.");return this.connection}toSessionCwd(t){return Cs.Platform.isWin&&this.plugin.settings.windowsWslMode?xn(t):t}cancelAllOperations(){this.permissionManager.cancelAll(),this.terminalManager.killAllTerminals()}getTerminalOutput(t){let n=this.terminalManager.getOutput(t);if(!n)throw new Error(`Terminal ${t} not found`);return Promise.resolve(n)}async listSessions(t,n){var r;let i=this.requireConnection();try{this.logger.log("[AcpClient] Listing sessions...");let o=t?this.toSessionCwd(t):void 0,s=await i.unstable_listSessions({cwd:o!=null?o:null,cursor:n!=null?n:null});return this.logger.log(`[AcpClient] Found ${s.sessions.length} sessions`),{sessions:s.sessions.map(a=>{var u,d;return{sessionId:a.sessionId,cwd:a.cwd,title:(u=a.title)!=null?u:void 0,updatedAt:(d=a.updatedAt)!=null?d:void 0}}),nextCursor:(r=s.nextCursor)!=null?r:void 0}}catch(o){throw this.logger.error("[AcpClient] List Sessions Error:",o),o}}async loadSession(t,n){let i=this.requireConnection();this.currentSessionId=t;try{this.logger.log(`[AcpClient] Loading session: ${t}...`);let r=await i.loadSession({sessionId:t,cwd:this.toSessionCwd(n),mcpServers:[]});this.logger.log(`[AcpClient] Session loaded: ${t}`);let o=_t.toSessionResult(t,r);return this.currentSessionId=o.sessionId,o}catch(r){throw this.logger.error("[AcpClient] Load Session Error:",r),r}}async resumeSession(t,n){let i=this.requireConnection();this.currentSessionId=t;try{this.logger.log(`[AcpClient] Resuming session: ${t}...`);let r=await i.unstable_resumeSession({sessionId:t,cwd:this.toSessionCwd(n),mcpServers:[]});this.logger.log(`[AcpClient] Session resumed: ${t}`);let o=_t.toSessionResult(t,r);return this.currentSessionId=o.sessionId,o}catch(r){throw this.logger.error("[AcpClient] Resume Session Error:",r),r}}async forkSession(t,n){let i=this.requireConnection();try{this.logger.log(`[AcpClient] Forking session: ${t}...`);let r=await i.unstable_forkSession({sessionId:t,cwd:this.toSessionCwd(n),mcpServers:[]});this.logger.log(`[AcpClient] Session forked: ${t} -> ${r.sessionId}`);let o=_t.toSessionResult(r.sessionId,r);return this.currentSessionId=o.sessionId,o}catch(r){throw this.logger.error("[AcpClient] Fork Session Error:",r),r}}};var UA={claude:{id:"claude-code-acp",displayName:"Claude Code",apiKey:"",command:"claude-agent-acp",args:[],env:[]},codex:{id:"codex-acp",displayName:"Codex",apiKey:"",command:"codex-acp",args:[],env:[]},gemini:{id:"gemini-cli",displayName:"Gemini CLI",apiKey:"",command:"gemini",args:["--experimental-acp"],env:[]},customAgents:[],defaultAgentId:"claude-code-acp",autoAllowPermissions:!1,autoMentionActiveNote:!0,enableSystemNotifications:!0,debugMode:!1,nodePath:"",exportSettings:{defaultFolder:"Agent Client",filenameTemplate:"agent_client_{date}_{time}",autoExportOnNewChat:!1,autoExportOnCloseChat:!1,openFileAfterExport:!0,includeImages:!0,imageLocation:"obsidian",imageCustomFolder:"Agent Client",frontmatterTag:"agent-client"},windowsWslMode:!1,windowsWslDistribution:void 0,sendMessageShortcut:"enter",chatViewLocation:"right-tab",displaySettings:{autoCollapseDiffs:!1,diffCollapseThreshold:10,maxNoteLength:1e4,maxSelectionLength:1e4,showEmojis:!0,fontSize:null},savedSessions:[],lastUsedModels:{},lastUsedModes:{},enableFloatingChat:!1,floatingButtonImage:"",floatingWindowSize:{width:400,height:500},floatingWindowPosition:null,floatingButtonPosition:null},Nl=class extends Mt.Plugin{constructor(){super(...arguments);this.viewRegistry=new ud;this._acpClients=new Map;this.floatingButton=null;this.floatingChatCounter=0}async onload(){await this.loadSettings(),vC(this.settings),this.settingsService=mP(this.settings,this),this.registerView(Ri,i=>new rd(i,this)),this.addRibbonIcon("bot-message-square","Open agent client",i=>{this.activateView()}).addClass("agent-client-ribbon-icon"),this.addCommand({id:"open-chat-view",name:"Open chat view",callback:()=>{this.activateView()}}),this.addCommand({id:"focus-next-chat-view",name:"Focus next chat view",callback:()=>{this.focusChatView("next")}}),this.addCommand({id:"focus-previous-chat-view",name:"Focus previous chat view",callback:()=>{this.focusChatView("previous")}}),this.addCommand({id:"open-new-chat-view",name:"Open new chat view",callback:()=>{this.openNewChatViewWithAgent(this.settings.defaultAgentId)}}),this.registerAgentCommands(),this.registerPermissionCommands(),this.registerBroadcastCommands(),this.addCommand({id:"open-floating-chat-view",name:"Open floating chat view",checkCallback:i=>{if(!this.settings.enableFloatingChat)return!1;if(i)return!0;let r=this.getFloatingChatInstances();if(r.length===0)this.openNewFloatingChat(!0);else if(r.length===1)this.expandFloatingChat(r[0]);else{let o=this.viewRegistry.getFocused();o&&o.viewType==="floating"?o.expand():this.expandFloatingChat(r[r.length-1])}}}),this.addCommand({id:"open-new-floating-chat-view",name:"Open new floating chat view",checkCallback:i=>{if(!this.settings.enableFloatingChat)return!1;if(i)return!0;this.openNewFloatingChat(!0)}}),this.addCommand({id:"minimize-floating-chat-view",name:"Minimize floating chat view",checkCallback:i=>{if(!this.settings.enableFloatingChat)return!1;let r=this.viewRegistry.getFocused();if(!(r&&r.viewType==="floating"))return!1;if(i)return!0;r.collapse()}}),this.addCommand({id:"close-floating-chat-view",name:"Close floating chat view",checkCallback:i=>{if(!this.settings.enableFloatingChat)return!1;let r=this.viewRegistry.getFocused();if(!(r&&r.viewType==="floating"))return!1;if(i)return!0;this.closeFloatingChat(r.viewId)}}),this.addSettingTab(new dd(this.app,this)),this.floatingButton=new ld(this),this.floatingButton.mount(),this.settings.enableFloatingChat&&this.openNewFloatingChat(),this.registerEvent(this.app.workspace.on("quit",()=>{for(let[i,r]of this._acpClients)r.disconnect().catch(o=>{console.warn(`[AgentClient] Quit cleanup error for view ${i}:`,o)});this._acpClients.clear()}))}onunload(){var n;(n=this.floatingButton)==null||n.unmount(),this.floatingButton=null;for(let i of this.viewRegistry.getByType("floating"))i instanceof qo&&i.unmount();this.viewRegistry.clear();for(let[,i]of this._acpClients)i.disconnect().catch(()=>{});this._acpClients.clear()}getOrCreateAcpClient(n){let i=this._acpClients.get(n);return i||(i=new pf(this),this._acpClients.set(n,i)),i}async removeAcpClient(n){let i=this._acpClients.get(n);if(i){try{await i.disconnect()}catch(r){console.warn(`[AgentClient] Failed to disconnect client for view ${n}:`,r)}this._acpClients.delete(n)}}get lastActiveChatViewId(){return this.viewRegistry.getFocusedId()}setLastActiveChatViewId(n){n&&this.viewRegistry.setFocused(n)}async activateView(){let{workspace:n}=this.app,i=null,r=n.getLeavesOfType(Ri);if(r.length>0){let o=this.lastActiveChatViewId;o?i=r.find(s=>{var a;return((a=s.view)==null?void 0:a.viewId)===o})||r[0]:i=r[0]}else i=this.createNewChatLeaf(!1),i&&await i.setViewState({type:Ri,active:!0});i&&(await n.revealLeaf(i),this.focusTextarea(i))}focusTextarea(n){var r;let i=(r=n.view)==null?void 0:r.containerEl;i&&window.setTimeout(()=>{let o=i.querySelector("textarea.agent-client-chat-input-textarea");o instanceof HTMLTextAreaElement&&o.focus()},50)}focusChatView(n){n==="next"?this.viewRegistry.focusNext():this.viewRegistry.focusPrevious()}createNewChatLeaf(n){let{workspace:i}=this.app;switch(this.settings.chatViewLocation){case"right-tab":return n?this.createSidebarTab("right"):i.getRightLeaf(!1);case"right-split":return i.getRightLeaf(n);case"editor-tab":return i.getLeaf("tab");case"editor-split":return i.getLeaf("split");default:return i.getRightLeaf(!1)}}createSidebarTab(n){let{workspace:i}=this.app,r=n==="right"?i.rightSplit:i.leftSplit,s=i.getLeavesOfType(Ri).find(a=>a.getRoot()===r);if(s){let a=s.parent;return i.createLeafInParent(a,Number.MAX_SAFE_INTEGER)}return n==="right"?i.getRightLeaf(!1):i.getLeftLeaf(!1)}async openNewChatViewWithAgent(n){var o;let i=this.createNewChatLeaf(!0);if(!i){console.warn("[AgentClient] Failed to create new leaf");return}await i.setViewState({type:Ri,active:!0,state:{initialAgentId:n}}),await this.app.workspace.revealLeaf(i);let r=(o=i.view)==null?void 0:o.containerEl;r&&window.setTimeout(()=>{let s=r.querySelector("textarea.agent-client-chat-input-textarea");s instanceof HTMLTextAreaElement&&s.focus()},0)}openNewFloatingChat(n=!1,i){let r=String(this.floatingChatCounter++);lP(this,r,n,i)}closeFloatingChat(n){let i=this.viewRegistry.get(n);i&&i instanceof qo&&i.unmount()}getFloatingChatInstances(){return this.viewRegistry.getByType("floating").map(n=>n.viewId)}expandFloatingChat(n){let i=this.viewRegistry.get(n);i&&i.expand()}getAvailableAgents(){return[{id:this.settings.claude.id,displayName:this.settings.claude.displayName||this.settings.claude.id},{id:this.settings.codex.id,displayName:this.settings.codex.displayName||this.settings.codex.id},{id:this.settings.gemini.id,displayName:this.settings.gemini.displayName||this.settings.gemini.id},...this.settings.customAgents.map(n=>({id:n.id,displayName:n.displayName||n.id}))]}registerAgentCommands(){let n=this.getAvailableAgents();for(let i of n)this.addCommand({id:`switch-agent-to-${i.id}`,name:`Switch agent to ${i.displayName}`,callback:()=>{this.app.workspace.trigger("agent-client:new-chat-requested",this.lastActiveChatViewId,i.id)}})}registerPermissionCommands(){this.addCommand({id:"approve-active-permission",name:"Approve active permission",callback:()=>{this.app.workspace.trigger("agent-client:approve-active-permission",this.lastActiveChatViewId)}}),this.addCommand({id:"reject-active-permission",name:"Reject active permission",callback:()=>{this.app.workspace.trigger("agent-client:reject-active-permission",this.lastActiveChatViewId)}}),this.addCommand({id:"toggle-auto-mention",name:"Toggle auto-mention",callback:()=>{this.app.workspace.trigger("agent-client:toggle-auto-mention",this.lastActiveChatViewId)}}),this.addCommand({id:"new-chat",name:"New chat",callback:()=>{this.app.workspace.trigger("agent-client:new-chat-requested",this.lastActiveChatViewId)}}),this.addCommand({id:"cancel-current-message",name:"Cancel current message",callback:()=>{this.app.workspace.trigger("agent-client:cancel-message",this.lastActiveChatViewId)}}),this.addCommand({id:"export-chat",name:"Export chat",callback:()=>{this.app.workspace.trigger("agent-client:export-chat",this.lastActiveChatViewId)}})}registerBroadcastCommands(){this.addCommand({id:"broadcast-prompt",name:"Broadcast prompt",callback:()=>{this.broadcastPrompt()}}),this.addCommand({id:"broadcast-send",name:"Broadcast send",callback:()=>{this.broadcastSend()}}),this.addCommand({id:"broadcast-cancel",name:"Broadcast cancel",callback:()=>{this.broadcastCancel()}})}broadcastPrompt(){let n=this.viewRegistry.getAll();if(n.length===0){new Mt.Notice("[Agent Client] No chat views open");return}let i=this.viewRegistry.toFocused(s=>s.getInputState());if(!i||i.text.trim()===""&&i.files.length===0){new Mt.Notice("[Agent Client] No prompt to broadcast");return}let r=this.viewRegistry.getFocusedId(),o=n.filter(s=>s.viewId!==r);if(o.length===0){new Mt.Notice("[Agent Client] No other chat views to broadcast to");return}for(let s of o)s.setInputState(i)}async broadcastSend(){let n=this.viewRegistry.getAll();if(n.length===0){new Mt.Notice("[Agent Client] No chat views open");return}let i=n.filter(r=>r.canSend());if(i.length===0){new Mt.Notice("[Agent Client] No views ready to send");return}await Promise.allSettled(i.map(r=>r.sendMessage()))}async broadcastCancel(){let n=this.viewRegistry.getAll();if(n.length===0){new Mt.Notice("[Agent Client] No chat views open");return}await Promise.allSettled(n.map(i=>i.cancelOperation())),new Mt.Notice("[Agent Client] Cancel broadcast to all views")}async loadSettings(){var m,g,h,x,y,v;let n=(m=await this.loadData())!=null?m:{},i=UA,r=(g=Qn(n.claude))!=null?g:{},o=(h=Qn(n.codex))!=null?h:{},s=(x=Qn(n.gemini))!=null?x:{},a=(y=Qn(n.exportSettings))!=null?y:{},u=(v=Qn(n.displaySettings))!=null?v:{},d=Array.isArray(n.customAgents)?WC(n.customAgents.map(S=>{var w;return VC((w=Qn(S))!=null?w:{})})):[],p=[i.claude.id,i.codex.id,i.gemini.id,...d.map(S=>S.id)],l=He(n.defaultAgentId,"")||He(n.activeAgentId,""),f=l&&p.includes(l)?l:p[0]||i.claude.id;this.settings={claude:{id:i.claude.id,displayName:He(r.displayName,i.claude.displayName),apiKey:He(r.apiKey,i.claude.apiKey),command:He(r.command,"")||He(n.claudeCodeAcpCommandPath,"")||i.claude.command,args:Mo(r.args),env:Ni(r.env)},codex:{id:i.codex.id,displayName:He(o.displayName,i.codex.displayName),apiKey:He(o.apiKey,i.codex.apiKey),command:He(o.command,"")||i.codex.command,args:Mo(o.args),env:Ni(o.env)},gemini:{id:i.gemini.id,displayName:He(s.displayName,i.gemini.displayName),apiKey:He(s.apiKey,i.gemini.apiKey),command:He(s.command,"")||He(n.geminiCommandPath,"")||i.gemini.command,args:Mo(s.args).length>0?Mo(s.args):i.gemini.args,env:Ni(s.env)},customAgents:d,defaultAgentId:f,autoAllowPermissions:Vt(n.autoAllowPermissions,i.autoAllowPermissions),autoMentionActiveNote:Vt(n.autoMentionActiveNote,i.autoMentionActiveNote),enableSystemNotifications:Vt(n.enableSystemNotifications,i.enableSystemNotifications),debugMode:Vt(n.debugMode,i.debugMode),nodePath:He(n.nodePath,i.nodePath),exportSettings:{defaultFolder:He(a.defaultFolder,i.exportSettings.defaultFolder),filenameTemplate:He(a.filenameTemplate,i.exportSettings.filenameTemplate),autoExportOnNewChat:Vt(a.autoExportOnNewChat,i.exportSettings.autoExportOnNewChat),autoExportOnCloseChat:Vt(a.autoExportOnCloseChat,i.exportSettings.autoExportOnCloseChat),openFileAfterExport:Vt(a.openFileAfterExport,i.exportSettings.openFileAfterExport),includeImages:Vt(a.includeImages,i.exportSettings.includeImages),imageLocation:Mc(a.imageLocation,["obsidian","custom","base64"],i.exportSettings.imageLocation),imageCustomFolder:He(a.imageCustomFolder,i.exportSettings.imageCustomFolder),frontmatterTag:He(a.frontmatterTag,i.exportSettings.frontmatterTag)},windowsWslMode:Vt(n.windowsWslMode,i.windowsWslMode),windowsWslDistribution:He(n.windowsWslDistribution,i.windowsWslDistribution),sendMessageShortcut:Mc(n.sendMessageShortcut,["enter","cmd-enter"],i.sendMessageShortcut),chatViewLocation:Mc(n.chatViewLocation,["right-tab","right-split","editor-tab","editor-split"],i.chatViewLocation),displaySettings:{autoCollapseDiffs:Vt(u.autoCollapseDiffs,i.displaySettings.autoCollapseDiffs),diffCollapseThreshold:Rc(u.diffCollapseThreshold,i.displaySettings.diffCollapseThreshold,1),maxNoteLength:Rc(u.maxNoteLength,i.displaySettings.maxNoteLength,1),maxSelectionLength:Rc(u.maxSelectionLength,i.displaySettings.maxSelectionLength,1),showEmojis:Vt(u.showEmojis,i.displaySettings.showEmojis),fontSize:La(u.fontSize)},savedSessions:Array.isArray(n.savedSessions)?n.savedSessions:i.savedSessions,lastUsedModels:hh(n.lastUsedModels),lastUsedModes:hh(n.lastUsedModes),enableFloatingChat:Vt(n.enableFloatingChat,Vt(n.showFloatingButton,i.enableFloatingChat)),floatingButtonImage:He(n.floatingButtonImage,i.floatingButtonImage),floatingWindowSize:(()=>{let S=Qn(n.floatingWindowSize);return S&&typeof S.width=="number"&&typeof S.height=="number"?{width:S.width,height:S.height}:i.floatingWindowSize})(),floatingWindowPosition:vh(n.floatingWindowPosition),floatingButtonPosition:vh(n.floatingButtonPosition)},this.ensureDefaultAgentId()}async saveSettings(){await this.saveData(this.settings)}async saveSettingsAndNotify(n){await this.settingsService.updateSettings(n)}async fetchLatestStable(){let i=(await(0,Mt.requestUrl)({url:"https://api.github.com/repos/RAIT-09/obsidian-agent-client/releases/latest"})).json;return i.tag_name?sr.clean(i.tag_name):null}async fetchLatestPrerelease(){let r=(await(0,Mt.requestUrl)({url:"https://api.github.com/repos/RAIT-09/obsidian-agent-client/releases"})).json.find(o=>o.prerelease);return r?sr.clean(r.tag_name):null}async checkForUpdates(){let n=sr.clean(this.manifest.version)||this.manifest.version;if(sr.prerelease(n)!==null){let[r,o]=await Promise.all([this.fetchLatestStable(),this.fetchLatestPrerelease()]),s=r&&sr.gt(r,n),a=o&&sr.gt(o,n);if(s||a){let u=s?r:o;return new Mt.Notice(`[Agent Client] Update available: v${u}`),!0}}else{let r=await this.fetchLatestStable();if(r&&sr.gt(r,n))return new Mt.Notice(`[Agent Client] Update available: v${r}`),!0}return!1}ensureDefaultAgentId(){let n=this.collectAvailableAgentIds();if(n.length===0){this.settings.defaultAgentId=UA.claude.id;return}n.includes(this.settings.defaultAgentId)||(this.settings.defaultAgentId=n[0])}collectAvailableAgentIds(){let n=new Set;n.add(this.settings.claude.id),n.add(this.settings.codex.id),n.add(this.settings.gemini.id);for(let i of this.settings.customAgents)i.id&&i.id.length>0&&n.add(i.id);return Array.from(n)}};
183
+ /*! Bundled license information:
184
+
185
+ react/cjs/react.production.min.js:
186
+ (**
187
+ * @license React
188
+ * react.production.min.js
189
+ *
190
+ * Copyright (c) Facebook, Inc. and its affiliates.
191
+ *
192
+ * This source code is licensed under the MIT license found in the
193
+ * LICENSE file in the root directory of this source tree.
194
+ *)
195
+
196
+ scheduler/cjs/scheduler.production.min.js:
197
+ (**
198
+ * @license React
199
+ * scheduler.production.min.js
200
+ *
201
+ * Copyright (c) Facebook, Inc. and its affiliates.
202
+ *
203
+ * This source code is licensed under the MIT license found in the
204
+ * LICENSE file in the root directory of this source tree.
205
+ *)
206
+
207
+ react-dom/cjs/react-dom.production.min.js:
208
+ (**
209
+ * @license React
210
+ * react-dom.production.min.js
211
+ *
212
+ * Copyright (c) Facebook, Inc. and its affiliates.
213
+ *
214
+ * This source code is licensed under the MIT license found in the
215
+ * LICENSE file in the root directory of this source tree.
216
+ *)
217
+
218
+ react/cjs/react-jsx-runtime.production.min.js:
219
+ (**
220
+ * @license React
221
+ * react-jsx-runtime.production.min.js
222
+ *
223
+ * Copyright (c) Facebook, Inc. and its affiliates.
224
+ *
225
+ * This source code is licensed under the MIT license found in the
226
+ * LICENSE file in the root directory of this source tree.
227
+ *)
228
+ */