@zktx.io/sui-mcp 0.7.0 → 0.8.1
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.
- package/README.md +89 -42
- package/dist/core/activity/localDataService.js +8 -21
- package/dist/core/activity/localDataValidation.js +22 -46
- package/dist/core/activity/sqliteAccountStore.js +46 -0
- package/dist/core/activity/sqliteActivityStore.js +65 -147
- package/dist/core/activity/sqliteActivityStoreSchema.js +44 -28
- package/dist/core/activity/sqliteActivityStoreTypes.js +9 -0
- package/dist/core/activity/transactionActivityService.js +2 -2
- package/dist/core/preferences/preferencesStore.js +2 -2
- package/dist/core/preferences/sqlitePreferencesRepository.js +10 -0
- package/dist/core/session/cardResult.js +41 -0
- package/dist/core/session/cardSession.js +1 -1
- package/dist/core/session/cardSessionStore.js +51 -19
- package/dist/core/session/chainAccounts.js +120 -0
- package/dist/core/session/sessionStore.js +4 -8
- package/dist/core/session/settingsFileStore.js +3 -30
- package/dist/core/session/settingsOperation.js +27 -19
- package/dist/core/session/settingsWorkflow.js +161 -87
- package/dist/core/session/sqliteCardStore.js +34 -14
- package/dist/core/session/sqliteSessionStore.js +5 -5
- package/dist/core/session/sqliteSettingsWorkflowStore.js +135 -41
- package/dist/core/session/sqliteTransactionRequest.js +18 -0
- package/dist/core/session/sqliteWalletConnectionOperation.js +13 -0
- package/dist/core/session/sqliteWalletWorkflowStore.js +569 -333
- package/dist/core/session/status.js +2 -2
- package/dist/core/session/wait.js +6 -11
- package/dist/core/session/walletConnection.js +71 -46
- package/dist/core/session/walletConnectionOperations.js +24 -0
- package/dist/core/session/walletRuntime.js +7 -13
- package/dist/core/session/walletWorkflow.js +248 -99
- package/dist/core/session/workflowState.js +104 -38
- package/dist/core/session/workflowView.js +92 -101
- package/dist/mcp/activeAccountResponse.js +3 -0
- package/dist/mcp/responseGuidance.js +7 -9
- package/dist/mcp/serverInfo.js +11 -10
- package/dist/mcp/toolErrors.js +5 -3
- package/dist/mcp/toolNames.js +1 -0
- package/dist/mcp/tools/action/prepareSuiActionReview.js +9 -16
- package/dist/mcp/tools/read/readToolHelpers.js +9 -7
- package/dist/mcp/tools/session/executionResultTools.js +2 -2
- package/dist/mcp/tools/session/shared.js +2 -2
- package/dist/mcp/tools/session/statusTools.js +12 -10
- package/dist/mcp/tools/session/walletConnectionTools.js +26 -14
- package/dist/mcp/tools/settings/index.js +7 -4
- package/dist/mcp-app/account.html +7 -7
- package/dist/mcp-app/chart.html +3 -3
- package/dist/mcp-app/connect.html +13 -13
- package/dist/mcp-app/disconnect.html +3637 -0
- package/dist/mcp-app/disconnect.notices.txt +1480 -0
- package/dist/mcp-app/receipt.html +393 -393
- package/dist/mcp-app/review.html +459 -459
- package/dist/mcp-app/settings.html +7 -7
- package/dist/mcp-ui/contracts.js +3 -1
- package/dist/mcp-ui/tools.js +4 -4
- package/dist/runtime/application.js +1 -1
- package/dist/runtime/localSettingsService.js +7 -4
- package/dist/runtime/runtimeTermination.js +3 -0
- package/dist/runtime/smokeMainnetRead.js +5 -4
- package/dist/runtime/walletConnectTransport.js +16 -16
- package/dist/runtime/walletSdkChildRuntime.js +29 -12
- package/dist/runtime/walletSdkIpc.js +5 -4
- package/dist/runtime/walletSdkProcess.js +24 -8
- package/docs/AGENT_BEHAVIOR.md +82 -54
- package/docs/LOCAL_DB_ARCHITECTURE.md +100 -70
- package/docs/MCP_SETUP.md +384 -347
- package/docs/MCP_TOOLS.md +292 -177
- package/docs/SDK_API.md +15 -6
- package/docs/TRANSACTION_ACTIVITY_LOG.md +4 -0
- package/docs/UTILITY_INDEX.md +9 -7
- package/docs/WALLET_CONNECTION.md +162 -167
- package/package.json +1 -1
|
@@ -0,0 +1,3637 @@
|
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Sui MCP</title><style>:root[data-theme=light]{--ui-bg:#f6f8fa;--ui-surface:#fff;--ui-surface-2:#eef1f5;--ui-border:#e3e8ef;--ui-border-strong:#cdd5e0;--ui-text:#18202b;--ui-text-muted:#5b6675;--ui-accent:#1565c0;--ui-accent-hover:#0d47a1;--ui-on-accent:#fff;--ui-focus:#1565c040;--ui-ok-bg:#e2f3e9;--ui-ok-text:#1b6b43;--ui-warn-bg:#fbeeda;--ui-warn-text:#8a5a08;--ui-danger:#b3261e;--ui-danger-bg:#fbe9e7;--ui-up:#1b7f43;--ui-down:#b3261e}:root[data-theme=dark]{--ui-bg:#0e141b;--ui-surface:#161d26;--ui-surface-2:#1e2733;--ui-border:#28323f;--ui-border-strong:#3a4859;--ui-text:#e7edf4;--ui-text-muted:#9aa7b6;--ui-accent:#4da2ff;--ui-accent-hover:#6fb8ff;--ui-on-accent:#06243f;--ui-focus:#4da2ff52;--ui-ok-bg:#10362a;--ui-ok-text:#7fe0b0;--ui-warn-bg:#3a2e16;--ui-warn-text:#f0c97a;--ui-danger:#ff8a80;--ui-danger-bg:#3a1f1d;--ui-up:#46c79e;--ui-down:#ff8a80}:root{--ui-r:10px;--ui-font-sans:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--ui-font-mono:ui-monospace, SFMono-Regular, Menlo, monospace}*,:before,:after{box-sizing:border-box}[hidden]{display:none!important}body{background:var(--ui-bg);color:var(--ui-text);font-family:var(--ui-font-sans);-webkit-font-smoothing:antialiased;margin:0;font-weight:400}.ui-mono{font-family:var(--ui-font-mono);overflow-wrap:anywhere;font-size:12.5px}.ui-btn{border:.5px solid var(--ui-border-strong);border-radius:var(--ui-r);background:var(--ui-surface);min-height:38px;color:var(--ui-text);font:inherit;cursor:pointer;justify-content:center;align-items:center;gap:7px;padding:0 16px;font-size:14px;font-weight:500;transition:background .12s,border-color .12s,transform 60ms;display:inline-flex}.ui-btn:hover{background:var(--ui-surface-2);border-color:var(--ui-accent)}.ui-btn:active{transform:scale(.975)}.ui-btn:focus-visible{box-shadow:0 0 0 3px var(--ui-focus);outline:none}.ui-btn--primary{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-on-accent)}.ui-btn--primary:hover{background:var(--ui-accent-hover);border-color:var(--ui-accent-hover)}.ui-btn--danger{border-color:var(--ui-danger);color:var(--ui-danger)}.ui-btn--danger:hover{background:var(--ui-danger-bg)}.ui-btn:disabled{cursor:not-allowed;color:var(--ui-text-muted);background:var(--ui-surface-2);border-color:var(--ui-border)}.ui-btn-row{flex-wrap:wrap;gap:10px;margin-top:12px;display:flex}.ui-btn-row>.ui-btn{flex:1 1 0;min-width:12rem}.ui-btn-row--end{justify-content:flex-end}.ui-btn-row--end>.ui-btn{flex:none;min-width:0}.ui-icon-btn{border:.5px solid var(--ui-border-strong);background:var(--ui-surface);width:34px;height:34px;color:var(--ui-text);cursor:pointer;border-radius:9px;flex:none;justify-content:center;align-items:center;padding:0;transition:background .12s,border-color .12s,transform 60ms;display:inline-flex}.ui-icon-btn:hover{background:var(--ui-surface-2);border-color:var(--ui-accent)}.ui-icon-btn:active{transform:scale(.94)}.ui-icon-btn:focus-visible{box-shadow:0 0 0 3px var(--ui-focus);outline:none}.ui-icon-btn svg{width:18px;height:18px}.ui-link{color:var(--ui-accent);cursor:pointer;text-decoration:none}.ui-link:hover{color:var(--ui-accent-hover);text-decoration:underline}.ui-field{color:var(--ui-text-muted);flex-direction:column;gap:5px;font-size:12px;display:flex}.ui-field--check{min-height:38px;color:var(--ui-text);cursor:pointer;flex-direction:row;align-items:center;gap:8px;font-size:14px}.ui-checkbox{font:inherit;width:1em;height:1em;accent-color:var(--ui-accent);cursor:inherit;flex:none;margin:0;padding:0}.ui-input,input.ui-input{border:.5px solid var(--ui-border-strong);border-radius:var(--ui-r);background:var(--ui-surface);height:38px;color:var(--ui-text);font:inherit;outline:none;padding:0 12px;font-size:14px;transition:border-color .12s,box-shadow .12s}.ui-input{width:100%}.ui-input::placeholder{color:var(--ui-text-muted)}.ui-select{border:.5px solid var(--ui-border-strong);border-radius:var(--ui-r);background:var(--ui-surface);width:100%;height:38px;color:var(--ui-text);font:inherit;cursor:pointer;outline:none;padding:0 12px;font-size:14px;transition:border-color .12s,box-shadow .12s}.ui-select:focus,.ui-input:focus{border-color:var(--ui-accent);box-shadow:0 0 0 3px var(--ui-focus)}.ui-card{background:var(--ui-surface);border:.5px solid var(--ui-border);padding:var(--ui-card-padding-block,16px) var(--ui-card-padding-inline,18px);border-radius:12px;margin:0 0 14px}.ui-section{min-width:0;margin-block:0 16px}.ui-section-title{justify-content:space-between;align-items:center;gap:10px;margin:0 0 10px;font-size:14px;font-weight:500;display:flex}.ui-card-title{margin:0 0 10px;font-size:14px;font-weight:500}.ui-card-head{margin:calc(-1 * var(--ui-card-padding-block,16px)) calc(-1 * var(--ui-card-padding-inline,18px)) 14px;padding:9px var(--ui-card-padding-inline,18px);background:var(--ui-surface-2);border-bottom:.5px solid var(--ui-border);border-radius:12px 12px 0 0;justify-content:space-between;align-items:center;gap:10px;font-size:14px;font-weight:500;display:flex}.ui-card-head+.ui-detail-item,.ui-card-head+.ui-row{border-top:0}.ui-row{border-top:.5px solid var(--ui-border);grid-template-columns:minmax(140px,.34fr) minmax(0,1fr);gap:12px;padding:9px 0;font-size:14px;display:grid}.ui-row:first-child{border-top:0}.ui-row-label{color:var(--ui-text-muted)}.ui-row-value{color:var(--ui-text);overflow-wrap:anywhere;font-variant-numeric:tabular-nums;text-align:right}.ui-status-banner{border-radius:var(--ui-r);border:.5px solid var(--ui-border-strong);background:var(--ui-surface-2);color:var(--ui-text);align-items:center;gap:9px;padding:11px 0;font-size:14px;font-weight:500;display:flex}.ui-status-icon{flex:none;display:inline-flex}.ui-status-icon svg{width:18px;height:18px}.ui-status-banner--success{background:var(--ui-ok-bg);color:var(--ui-ok-text);border-color:#0000}.ui-status-banner--failure{background:var(--ui-danger-bg);color:var(--ui-danger);border-color:#0000}.ui-status-banner--pending{color:var(--ui-text-muted)}.ui-detail-item{border-top:.5px solid var(--ui-border);padding:9px 0}.ui-detail-head{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:12px;display:flex}.ui-detail-title{color:var(--ui-text);overflow-wrap:anywhere;font-weight:500}.ui-detail-trailing{color:var(--ui-text);overflow-wrap:anywhere}.ui-detail-trailing--up{color:var(--ui-up)}.ui-detail-trailing--down{color:var(--ui-down)}.ui-detail-meta{color:var(--ui-text-muted);overflow-wrap:anywhere;gap:8px;margin-top:3px;font-size:12.5px;display:flex}.ui-detail-metalabel{color:var(--ui-text-muted);flex:none}.ui-feedback{border:.5px solid var(--ui-border);background:var(--ui-surface);color:var(--ui-text);border-left-width:3px;border-radius:8px;margin:0 0 14px;padding:11px 13px;font-size:13.5px}.ui-feedback--ok{border-left-color:var(--ui-ok-text)}.ui-feedback--error{border-left-color:var(--ui-danger)}.ui-card>.ui-feedback{margin:14px 0}.ui-card>.ui-feedback:last-child{margin-bottom:0}.ui-feedback-detail{color:var(--ui-text-muted);overflow-wrap:anywhere;margin-top:4px;font-size:12.5px;display:block}.ui-placeholder{border:.5px dashed var(--ui-border-strong);color:var(--ui-text-muted);text-align:center;border-radius:12px;margin:0 0 14px;padding:18px;font-size:13.5px}.ui-note{color:var(--ui-text-muted);margin:12px 0 0;font-size:12.5px;line-height:1.6}.ui-info{border:.5px solid var(--ui-border-strong);width:1.3em;height:1.3em;color:var(--ui-text-muted);cursor:help;vertical-align:middle;border-radius:50%;justify-content:center;align-items:center;margin-left:.3em;font-size:.72em;font-style:normal;font-weight:500;line-height:1;display:inline-flex}.ui-info:hover,.ui-info:focus-visible{border-color:var(--ui-accent);color:var(--ui-accent);outline:none}.ui-ptb-graph{min-height:60px;color:var(--ui-text-muted);font-size:13px;overflow-x:auto}.ui-ptb-graph svg{max-width:100%;height:auto}.ui-ptb-graph--error{color:var(--ui-danger)}.ui-chain-receipt-gas{margin-bottom:6px}.ui-chain-receipt-ptb{background:var(--ui-surface);min-width:0;overflow:hidden}.ui-ptb-actions{align-items:center;gap:4px;display:flex}.ui-ptb-graph-controls .ui-icon-btn{background:var(--ui-surface-2);box-shadow:0 1px 3px #0003}.ui-ptb-graph--interactive{cursor:grab;-webkit-user-select:none;user-select:none;touch-action:none;height:420px;position:relative;overflow:hidden}.ui-ptb-graph--grabbing{cursor:grabbing}.ui-ptb-graph-content{transform-origin:0 0;width:100%}.ui-ptb-graph-controls{z-index:2;flex-direction:column;gap:5px;display:flex;position:absolute;top:8px;right:8px}.ui-ptb-graph-controls .ui-icon-btn{width:28px;height:28px}.ui-ptb-graph-controls .ui-icon-btn svg{width:15px;height:15px}.ui-accordion{border-block-start:1px solid var(--ui-border);margin-block:12px}.ui-accordion-summary{cursor:pointer;color:var(--ui-text);justify-content:space-between;align-items:center;gap:10px;padding:11px 0;font-size:13px;font-weight:500;list-style:none;display:flex}.ui-accordion-summary::-webkit-details-marker{display:none}.ui-accordion-summary:hover{color:var(--ui-accent)}.ui-accordion-summary:focus-visible{box-shadow:0 0 0 3px var(--ui-focus);border-radius:var(--ui-r);outline:none}.ui-accordion-summary:after{content:"";border-right:1.5px solid var(--ui-text-muted);border-bottom:1.5px solid var(--ui-text-muted);flex:none;width:7px;height:7px;transition:transform .15s;transform:rotate(45deg)}.ui-accordion[open] .ui-accordion-summary:after{transform:rotate(-135deg)}.ui-accordion[open] .ui-accordion-summary{color:var(--ui-accent)}.ui-accordion-body{padding:4px 0 12px}.ui-accordion[open]>.ui-accordion-body{animation:.18s ease-out ui-reveal}@keyframes ui-reveal{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.ui-accordion[open]>.ui-accordion-body{animation:none}}@container mcp-card (width<=28rem){.ui-card{--ui-card-padding-block:12px;--ui-card-padding-inline:12px}.ui-row{grid-template-columns:minmax(0,1fr);gap:4px}.ui-row-value{text-align:left}.ui-detail-meta{flex-wrap:wrap}}@container mcp-card (width>=0){.ui-card,.ui-card-head>:first-child,.ui-detail-head>*,.ui-detail-meta>*{min-width:0}.ui-ptb-actions{flex:none}.ui-ptb-graph--interactive{height:clamp(280px,75cqi,420px)}}.ui-error:not(:empty){color:var(--ui-danger)}.ui-note:empty,.ui-error:empty{display:none}.ui-form{flex-wrap:wrap;align-items:end;gap:12px;display:flex}.ui-form>*{min-width:0;max-width:100%}.ui-form>input,.ui-form>select,.ui-form>label{flex:14rem}.ui-form label{flex-direction:column;gap:6px;display:flex}.ui-form label>input,.ui-form label>select{width:100%}.ui-form>details,.ui-form>p,.ui-form>.card-actions{flex-basis:100%}@container mcp-card (width<=28rem){.ui-form>button{width:100%}}.settings-card{overflow-x:clip}.settings-card .settings-page--forward{animation:.18s ease-out settings-forward}.settings-card .settings-page--back{animation:.18s ease-out settings-back}@keyframes settings-forward{0%{opacity:0;transform:translate(16px)}to{opacity:1;transform:translate(0)}}@keyframes settings-back{0%{opacity:0;transform:translate(-16px)}to{opacity:1;transform:translate(0)}}@media (prefers-reduced-motion:reduce){.settings-card .settings-page--forward,.settings-card .settings-page--back{animation:none}}.settings-card .settings-toolbar{border-bottom:1px solid var(--ui-border);flex-wrap:wrap;align-items:center;gap:12px;margin-block-end:20px;padding-block:0 14px;display:flex}.settings-card .settings-location{color:var(--ui-text-muted);font-size:13px}.settings-card .settings-back{background:0 0;border-color:#0000;padding-inline:0 10px}.settings-card .settings-back:before{content:"←";margin-inline-end:8px}.settings-card .settings-menu{margin-block:16px;display:grid}.settings-card .settings-menu-item{text-align:start;white-space:normal;border:0;border-bottom:1px solid var(--ui-border);width:100%;color:var(--ui-text);background:0 0;border-radius:0;grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:start;gap:5px;padding:18px 32px 18px 12px;display:grid;position:relative}.settings-card .settings-menu-item:hover{background:var(--ui-surface-2)}.settings-card .settings-menu-item:after{content:"";inset-inline-end:14px;border-top:1.5px solid var(--ui-text-muted);border-right:1.5px solid var(--ui-text-muted);width:7px;height:7px;position:absolute;top:50%;transform:translateY(-50%)rotate(45deg)}.settings-card .settings-menu-title{font-weight:600}.settings-card .settings-menu-description{color:var(--ui-text-muted);font-size:13px;font-weight:400}.settings-card .settings-pending{margin-block:20px}.settings-card .settings-action-row{align-items:stretch;gap:var(--ui-space-2,8px);grid-template-columns:minmax(0,1fr);margin-block-start:12px;display:grid}.settings-card .settings-action-row>.ui-btn{white-space:normal;overflow-wrap:anywhere;width:100%;min-width:0}.settings-card .settings-path{white-space:normal;overflow-wrap:anywhere}.settings-card .settings-backup-location .ui-row{grid-template-columns:minmax(0,1fr);gap:6px}.settings-card .settings-backup-location .ui-row-value{text-align:start}.settings-card .settings-choice{border-bottom:1px solid var(--ui-border);flex-wrap:wrap;align-items:center;gap:12px 20px;padding-block:18px;display:flex}.settings-card .settings-choice-copy{flex:16rem;min-width:0}.settings-card .settings-choice h3{margin-block:0 6px}.settings-card .settings-choice p{margin:0}.settings-card .settings-endpoint{border-bottom:1px solid var(--ui-border);padding-block:16px}.settings-card .settings-endpoint label{flex-direction:column;gap:8px;display:flex}html,body{min-height:0;margin:0}body{color:var(--ui-text);background:var(--ui-bg)}#app{padding:var(--ui-space-4,16px);overflow-wrap:anywhere;min-width:0;max-width:100%;container:mcp-card/inline-size}#app h1{margin:0 0 12px;font-size:20px;font-weight:500}.card-actions{margin-top:12px}.card-actions,.card-actions>div{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.card-chart{width:100%;min-width:0;height:clamp(280px,75cqi,400px)}.card-progress-hint{color:var(--ui-text-muted);align-items:center;gap:10px;margin-block:12px;font-size:12px;display:flex}.workflow-card{gap:var(--space-4,1rem);grid-template-columns:minmax(0,1fr);min-width:0;display:grid}.workflow-card form{margin-block:var(--space-3,.75rem)}.workflow-qr{max-width:100%;height:auto;margin:var(--ui-space-4,16px) auto;display:block}.workflow-decision{border-block-start:1px solid var(--ui-border);margin-block-start:var(--space-4,1rem);padding-block-start:var(--space-3,.75rem)}.review-primary-action,.review-recovery-action{width:100%}.review-status--reserved{visibility:hidden}.review-action-row{align-items:stretch;gap:var(--ui-space-2,8px);grid-template-columns:minmax(0,1fr) auto;width:100%;display:grid}.review-primary-slot{min-width:0;display:flex}.review-lifetime{justify-content:space-between;align-items:center;gap:var(--ui-space-2,8px);margin-block:var(--ui-space-2,8px);display:flex}.review-lifetime .card-progress-hint{margin:0}.review-time-remaining{color:var(--ui-text-muted);font-variant-numeric:tabular-nums;font-size:12px}
|
|
2
|
+
/*$vite$:1*/</style></head><body><main id="app" aria-live="polite"></main><template id="dependency-notices">@modelcontextprotocol/client 2.3.1
|
|
3
|
+
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
|
|
4
|
+
|
|
5
|
+
Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License.
|
|
6
|
+
|
|
7
|
+
No rights beyond those granted by the applicable original license are conveyed for such contributions.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Apache License
|
|
12
|
+
Version 2.0, January 2004
|
|
13
|
+
http://www.apache.org/licenses/
|
|
14
|
+
|
|
15
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
16
|
+
|
|
17
|
+
1. Definitions.
|
|
18
|
+
|
|
19
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
20
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
21
|
+
|
|
22
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
23
|
+
the copyright owner that is granting the License.
|
|
24
|
+
|
|
25
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
26
|
+
other entities that control, are controlled by, or are under common
|
|
27
|
+
control with that entity. For the purposes of this definition,
|
|
28
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
29
|
+
direction or management of such entity, whether by contract or
|
|
30
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
31
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
32
|
+
|
|
33
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
34
|
+
exercising permissions granted by this License.
|
|
35
|
+
|
|
36
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
37
|
+
including but not limited to software source code, documentation
|
|
38
|
+
source, and configuration files.
|
|
39
|
+
|
|
40
|
+
"Object" form shall mean any form resulting from mechanical
|
|
41
|
+
transformation or translation of a Source form, including but
|
|
42
|
+
not limited to compiled object code, generated documentation,
|
|
43
|
+
and conversions to other media types.
|
|
44
|
+
|
|
45
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
46
|
+
Object form, made available under the License, as indicated by a
|
|
47
|
+
copyright notice that is included in or attached to the work
|
|
48
|
+
(an example is provided in the Appendix below).
|
|
49
|
+
|
|
50
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
51
|
+
form, that is based on (or derived from) the Work and for which the
|
|
52
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
53
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
54
|
+
of this License, Derivative Works shall not include works that remain
|
|
55
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
56
|
+
the Work and Derivative Works thereof.
|
|
57
|
+
|
|
58
|
+
"Contribution" shall mean any work of authorship, including
|
|
59
|
+
the original version of the Work and any modifications or additions
|
|
60
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
61
|
+
submitted to the Licensor for inclusion in the Work by the copyright
|
|
62
|
+
owner or by an individual or Legal Entity authorized to submit on behalf
|
|
63
|
+
of the copyright owner. For the purposes of this definition, "submitted"
|
|
64
|
+
means any form of electronic, verbal, or written communication sent
|
|
65
|
+
to the Licensor or its representatives, including but not limited to
|
|
66
|
+
communication on electronic mailing lists, source code control systems,
|
|
67
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
68
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
69
|
+
excluding communication that is conspicuously marked or otherwise
|
|
70
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
71
|
+
|
|
72
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
73
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
74
|
+
subsequently incorporated within the Work.
|
|
75
|
+
|
|
76
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
80
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
81
|
+
Work and such Derivative Works in Source or Object form.
|
|
82
|
+
|
|
83
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
84
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
85
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
86
|
+
(except as stated in this section) patent license to make, have made,
|
|
87
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
88
|
+
where such license applies only to those patent claims licensable
|
|
89
|
+
by such Contributor that are necessarily infringed by their
|
|
90
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
91
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
92
|
+
institute patent litigation against any entity (including a
|
|
93
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
94
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
95
|
+
or contributory patent infringement, then any patent licenses
|
|
96
|
+
granted to You under this License for that Work shall terminate
|
|
97
|
+
as of the date such litigation is filed.
|
|
98
|
+
|
|
99
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
100
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
101
|
+
modifications, and in Source or Object form, provided that You
|
|
102
|
+
meet the following conditions:
|
|
103
|
+
|
|
104
|
+
(a) You must give any other recipients of the Work or
|
|
105
|
+
Derivative Works a copy of this License; and
|
|
106
|
+
|
|
107
|
+
(b) You must cause any modified files to carry prominent notices
|
|
108
|
+
stating that You changed the files; and
|
|
109
|
+
|
|
110
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
111
|
+
that You distribute, all copyright, patent, trademark, and
|
|
112
|
+
attribution notices from the Source form of the Work,
|
|
113
|
+
excluding those notices that do not pertain to any part of
|
|
114
|
+
the Derivative Works; and
|
|
115
|
+
|
|
116
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
117
|
+
distribution, then any Derivative Works that You distribute must
|
|
118
|
+
include a readable copy of the attribution notices contained
|
|
119
|
+
within such NOTICE file, excluding those notices that do not
|
|
120
|
+
pertain to any part of the Derivative Works, in at least one
|
|
121
|
+
of the following places: within a NOTICE text file distributed
|
|
122
|
+
as part of the Derivative Works; within the Source form or
|
|
123
|
+
documentation, if provided along with the Derivative Works; or,
|
|
124
|
+
within a display generated by the Derivative Works, if and
|
|
125
|
+
wherever such third-party notices normally appear. The contents
|
|
126
|
+
of the NOTICE file are for informational purposes only and
|
|
127
|
+
do not modify the License. You may add Your own attribution
|
|
128
|
+
notices within Derivative Works that You distribute, alongside
|
|
129
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
130
|
+
that such additional attribution notices cannot be construed
|
|
131
|
+
as modifying the License.
|
|
132
|
+
|
|
133
|
+
You may add Your own copyright statement to Your modifications and
|
|
134
|
+
may provide additional or different license terms and conditions
|
|
135
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
136
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
137
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
138
|
+
the conditions stated in this License.
|
|
139
|
+
|
|
140
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
141
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
142
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
143
|
+
this License, without any additional terms or conditions.
|
|
144
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
145
|
+
the terms of any separate license agreement you may have executed
|
|
146
|
+
with Licensor regarding such Contributions.
|
|
147
|
+
|
|
148
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
149
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
150
|
+
except as required for reasonable and customary use in describing the
|
|
151
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
152
|
+
|
|
153
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
154
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
155
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
156
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
157
|
+
implied, including, without limitation, any warranties or conditions
|
|
158
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
159
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
160
|
+
appropriateness of using or redistributing the Work and assume any
|
|
161
|
+
risks associated with Your exercise of permissions under this License.
|
|
162
|
+
|
|
163
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
164
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
165
|
+
unless required by applicable law (such as deliberate and grossly
|
|
166
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
167
|
+
liable to You for damages, including any direct, indirect, special,
|
|
168
|
+
incidental, or consequential damages of any character arising as a
|
|
169
|
+
result of this License or out of the use or inability to use the
|
|
170
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
171
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
172
|
+
other commercial damages or losses), even if such Contributor
|
|
173
|
+
has been advised of the possibility of such damages.
|
|
174
|
+
|
|
175
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
176
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
177
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
178
|
+
or other liability obligations and/or rights consistent with this
|
|
179
|
+
License. However, in accepting such obligations, You may act only
|
|
180
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
181
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
182
|
+
defend, and hold each Contributor harmless for any liability
|
|
183
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
184
|
+
of your accepting any such warranty or additional liability.
|
|
185
|
+
|
|
186
|
+
END OF TERMS AND CONDITIONS
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
MIT License
|
|
191
|
+
|
|
192
|
+
Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC.
|
|
193
|
+
|
|
194
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
195
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
196
|
+
in the Software without restriction, including without limitation the rights
|
|
197
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
198
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
199
|
+
furnished to do so, subject to the following conditions:
|
|
200
|
+
|
|
201
|
+
The above copyright notice and this permission notice shall be included in all
|
|
202
|
+
copies or substantial portions of the Software.
|
|
203
|
+
|
|
204
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
205
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
206
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
207
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
208
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
209
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
210
|
+
SOFTWARE.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
Creative Commons Attribution 4.0 International (CC-BY-4.0)
|
|
215
|
+
|
|
216
|
+
Documentation in this project (excluding specifications) is licensed under
|
|
217
|
+
CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
|
|
218
|
+
the full license text.
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
@modelcontextprotocol/core 2.3.1
|
|
224
|
+
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
|
|
225
|
+
|
|
226
|
+
Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License.
|
|
227
|
+
|
|
228
|
+
No rights beyond those granted by the applicable original license are conveyed for such contributions.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
Apache License
|
|
233
|
+
Version 2.0, January 2004
|
|
234
|
+
http://www.apache.org/licenses/
|
|
235
|
+
|
|
236
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
237
|
+
|
|
238
|
+
1. Definitions.
|
|
239
|
+
|
|
240
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
241
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
242
|
+
|
|
243
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
244
|
+
the copyright owner that is granting the License.
|
|
245
|
+
|
|
246
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
247
|
+
other entities that control, are controlled by, or are under common
|
|
248
|
+
control with that entity. For the purposes of this definition,
|
|
249
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
250
|
+
direction or management of such entity, whether by contract or
|
|
251
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
252
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
253
|
+
|
|
254
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
255
|
+
exercising permissions granted by this License.
|
|
256
|
+
|
|
257
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
258
|
+
including but not limited to software source code, documentation
|
|
259
|
+
source, and configuration files.
|
|
260
|
+
|
|
261
|
+
"Object" form shall mean any form resulting from mechanical
|
|
262
|
+
transformation or translation of a Source form, including but
|
|
263
|
+
not limited to compiled object code, generated documentation,
|
|
264
|
+
and conversions to other media types.
|
|
265
|
+
|
|
266
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
267
|
+
Object form, made available under the License, as indicated by a
|
|
268
|
+
copyright notice that is included in or attached to the work
|
|
269
|
+
(an example is provided in the Appendix below).
|
|
270
|
+
|
|
271
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
272
|
+
form, that is based on (or derived from) the Work and for which the
|
|
273
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
274
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
275
|
+
of this License, Derivative Works shall not include works that remain
|
|
276
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
277
|
+
the Work and Derivative Works thereof.
|
|
278
|
+
|
|
279
|
+
"Contribution" shall mean any work of authorship, including
|
|
280
|
+
the original version of the Work and any modifications or additions
|
|
281
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
282
|
+
submitted to the Licensor for inclusion in the Work by the copyright
|
|
283
|
+
owner or by an individual or Legal Entity authorized to submit on behalf
|
|
284
|
+
of the copyright owner. For the purposes of this definition, "submitted"
|
|
285
|
+
means any form of electronic, verbal, or written communication sent
|
|
286
|
+
to the Licensor or its representatives, including but not limited to
|
|
287
|
+
communication on electronic mailing lists, source code control systems,
|
|
288
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
289
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
290
|
+
excluding communication that is conspicuously marked or otherwise
|
|
291
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
292
|
+
|
|
293
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
294
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
295
|
+
subsequently incorporated within the Work.
|
|
296
|
+
|
|
297
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
298
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
299
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
300
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
301
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
302
|
+
Work and such Derivative Works in Source or Object form.
|
|
303
|
+
|
|
304
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
305
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
306
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
307
|
+
(except as stated in this section) patent license to make, have made,
|
|
308
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
309
|
+
where such license applies only to those patent claims licensable
|
|
310
|
+
by such Contributor that are necessarily infringed by their
|
|
311
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
312
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
313
|
+
institute patent litigation against any entity (including a
|
|
314
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
315
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
316
|
+
or contributory patent infringement, then any patent licenses
|
|
317
|
+
granted to You under this License for that Work shall terminate
|
|
318
|
+
as of the date such litigation is filed.
|
|
319
|
+
|
|
320
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
321
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
322
|
+
modifications, and in Source or Object form, provided that You
|
|
323
|
+
meet the following conditions:
|
|
324
|
+
|
|
325
|
+
(a) You must give any other recipients of the Work or
|
|
326
|
+
Derivative Works a copy of this License; and
|
|
327
|
+
|
|
328
|
+
(b) You must cause any modified files to carry prominent notices
|
|
329
|
+
stating that You changed the files; and
|
|
330
|
+
|
|
331
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
332
|
+
that You distribute, all copyright, patent, trademark, and
|
|
333
|
+
attribution notices from the Source form of the Work,
|
|
334
|
+
excluding those notices that do not pertain to any part of
|
|
335
|
+
the Derivative Works; and
|
|
336
|
+
|
|
337
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
338
|
+
distribution, then any Derivative Works that You distribute must
|
|
339
|
+
include a readable copy of the attribution notices contained
|
|
340
|
+
within such NOTICE file, excluding those notices that do not
|
|
341
|
+
pertain to any part of the Derivative Works, in at least one
|
|
342
|
+
of the following places: within a NOTICE text file distributed
|
|
343
|
+
as part of the Derivative Works; within the Source form or
|
|
344
|
+
documentation, if provided along with the Derivative Works; or,
|
|
345
|
+
within a display generated by the Derivative Works, if and
|
|
346
|
+
wherever such third-party notices normally appear. The contents
|
|
347
|
+
of the NOTICE file are for informational purposes only and
|
|
348
|
+
do not modify the License. You may add Your own attribution
|
|
349
|
+
notices within Derivative Works that You distribute, alongside
|
|
350
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
351
|
+
that such additional attribution notices cannot be construed
|
|
352
|
+
as modifying the License.
|
|
353
|
+
|
|
354
|
+
You may add Your own copyright statement to Your modifications and
|
|
355
|
+
may provide additional or different license terms and conditions
|
|
356
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
357
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
358
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
359
|
+
the conditions stated in this License.
|
|
360
|
+
|
|
361
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
362
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
363
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
364
|
+
this License, without any additional terms or conditions.
|
|
365
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
366
|
+
the terms of any separate license agreement you may have executed
|
|
367
|
+
with Licensor regarding such Contributions.
|
|
368
|
+
|
|
369
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
370
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
371
|
+
except as required for reasonable and customary use in describing the
|
|
372
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
373
|
+
|
|
374
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
375
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
376
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
377
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
378
|
+
implied, including, without limitation, any warranties or conditions
|
|
379
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
380
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
381
|
+
appropriateness of using or redistributing the Work and assume any
|
|
382
|
+
risks associated with Your exercise of permissions under this License.
|
|
383
|
+
|
|
384
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
385
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
386
|
+
unless required by applicable law (such as deliberate and grossly
|
|
387
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
388
|
+
liable to You for damages, including any direct, indirect, special,
|
|
389
|
+
incidental, or consequential damages of any character arising as a
|
|
390
|
+
result of this License or out of the use or inability to use the
|
|
391
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
392
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
393
|
+
other commercial damages or losses), even if such Contributor
|
|
394
|
+
has been advised of the possibility of such damages.
|
|
395
|
+
|
|
396
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
397
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
398
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
399
|
+
or other liability obligations and/or rights consistent with this
|
|
400
|
+
License. However, in accepting such obligations, You may act only
|
|
401
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
402
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
403
|
+
defend, and hold each Contributor harmless for any liability
|
|
404
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
405
|
+
of your accepting any such warranty or additional liability.
|
|
406
|
+
|
|
407
|
+
END OF TERMS AND CONDITIONS
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
MIT License
|
|
412
|
+
|
|
413
|
+
Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC.
|
|
414
|
+
|
|
415
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
416
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
417
|
+
in the Software without restriction, including without limitation the rights
|
|
418
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
419
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
420
|
+
furnished to do so, subject to the following conditions:
|
|
421
|
+
|
|
422
|
+
The above copyright notice and this permission notice shall be included in all
|
|
423
|
+
copies or substantial portions of the Software.
|
|
424
|
+
|
|
425
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
426
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
427
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
428
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
429
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
430
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
431
|
+
SOFTWARE.
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
Creative Commons Attribution 4.0 International (CC-BY-4.0)
|
|
436
|
+
|
|
437
|
+
Documentation in this project (excluding specifications) is licensed under
|
|
438
|
+
CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
|
|
439
|
+
the full license text.
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
---
|
|
443
|
+
|
|
444
|
+
@modelcontextprotocol/ext-apps 2.0.3
|
|
445
|
+
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
|
|
446
|
+
|
|
447
|
+
Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License.
|
|
448
|
+
|
|
449
|
+
No rights beyond those granted by the applicable original license are conveyed for such contributions.
|
|
450
|
+
|
|
451
|
+
---
|
|
452
|
+
|
|
453
|
+
Apache License
|
|
454
|
+
Version 2.0, January 2004
|
|
455
|
+
http://www.apache.org/licenses/
|
|
456
|
+
|
|
457
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
458
|
+
|
|
459
|
+
1. Definitions.
|
|
460
|
+
|
|
461
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
462
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
463
|
+
|
|
464
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
465
|
+
the copyright owner that is granting the License.
|
|
466
|
+
|
|
467
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
468
|
+
other entities that control, are controlled by, or are under common
|
|
469
|
+
control with that entity. For the purposes of this definition,
|
|
470
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
471
|
+
direction or management of such entity, whether by contract or
|
|
472
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
473
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
474
|
+
|
|
475
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
476
|
+
exercising permissions granted by this License.
|
|
477
|
+
|
|
478
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
479
|
+
including but not limited to software source code, documentation
|
|
480
|
+
source, and configuration files.
|
|
481
|
+
|
|
482
|
+
"Object" form shall mean any form resulting from mechanical
|
|
483
|
+
transformation or translation of a Source form, including but
|
|
484
|
+
not limited to compiled object code, generated documentation,
|
|
485
|
+
and conversions to other media types.
|
|
486
|
+
|
|
487
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
488
|
+
Object form, made available under the License, as indicated by a
|
|
489
|
+
copyright notice that is included in or attached to the work
|
|
490
|
+
(an example is provided in the Appendix below).
|
|
491
|
+
|
|
492
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
493
|
+
form, that is based on (or derived from) the Work and for which the
|
|
494
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
495
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
496
|
+
of this License, Derivative Works shall not include works that remain
|
|
497
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
498
|
+
the Work and Derivative Works thereof.
|
|
499
|
+
|
|
500
|
+
"Contribution" shall mean any work of authorship, including
|
|
501
|
+
the original version of the Work and any modifications or additions
|
|
502
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
503
|
+
submitted to the Licensor for inclusion in the Work by the copyright
|
|
504
|
+
owner or by an individual or Legal Entity authorized to submit on behalf
|
|
505
|
+
of the copyright owner. For the purposes of this definition, "submitted"
|
|
506
|
+
means any form of electronic, verbal, or written communication sent
|
|
507
|
+
to the Licensor or its representatives, including but not limited to
|
|
508
|
+
communication on electronic mailing lists, source code control systems,
|
|
509
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
510
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
511
|
+
excluding communication that is conspicuously marked or otherwise
|
|
512
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
513
|
+
|
|
514
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
515
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
516
|
+
subsequently incorporated within the Work.
|
|
517
|
+
|
|
518
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
519
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
520
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
521
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
522
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
523
|
+
Work and such Derivative Works in Source or Object form.
|
|
524
|
+
|
|
525
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
526
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
527
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
528
|
+
(except as stated in this section) patent license to make, have made,
|
|
529
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
530
|
+
where such license applies only to those patent claims licensable
|
|
531
|
+
by such Contributor that are necessarily infringed by their
|
|
532
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
533
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
534
|
+
institute patent litigation against any entity (including a
|
|
535
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
536
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
537
|
+
or contributory patent infringement, then any patent licenses
|
|
538
|
+
granted to You under this License for that Work shall terminate
|
|
539
|
+
as of the date such litigation is filed.
|
|
540
|
+
|
|
541
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
542
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
543
|
+
modifications, and in Source or Object form, provided that You
|
|
544
|
+
meet the following conditions:
|
|
545
|
+
|
|
546
|
+
(a) You must give any other recipients of the Work or
|
|
547
|
+
Derivative Works a copy of this License; and
|
|
548
|
+
|
|
549
|
+
(b) You must cause any modified files to carry prominent notices
|
|
550
|
+
stating that You changed the files; and
|
|
551
|
+
|
|
552
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
553
|
+
that You distribute, all copyright, patent, trademark, and
|
|
554
|
+
attribution notices from the Source form of the Work,
|
|
555
|
+
excluding those notices that do not pertain to any part of
|
|
556
|
+
the Derivative Works; and
|
|
557
|
+
|
|
558
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
559
|
+
distribution, then any Derivative Works that You distribute must
|
|
560
|
+
include a readable copy of the attribution notices contained
|
|
561
|
+
within such NOTICE file, excluding those notices that do not
|
|
562
|
+
pertain to any part of the Derivative Works, in at least one
|
|
563
|
+
of the following places: within a NOTICE text file distributed
|
|
564
|
+
as part of the Derivative Works; within the Source form or
|
|
565
|
+
documentation, if provided along with the Derivative Works; or,
|
|
566
|
+
within a display generated by the Derivative Works, if and
|
|
567
|
+
wherever such third-party notices normally appear. The contents
|
|
568
|
+
of the NOTICE file are for informational purposes only and
|
|
569
|
+
do not modify the License. You may add Your own attribution
|
|
570
|
+
notices within Derivative Works that You distribute, alongside
|
|
571
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
572
|
+
that such additional attribution notices cannot be construed
|
|
573
|
+
as modifying the License.
|
|
574
|
+
|
|
575
|
+
You may add Your own copyright statement to Your modifications and
|
|
576
|
+
may provide additional or different license terms and conditions
|
|
577
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
578
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
579
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
580
|
+
the conditions stated in this License.
|
|
581
|
+
|
|
582
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
583
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
584
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
585
|
+
this License, without any additional terms or conditions.
|
|
586
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
587
|
+
the terms of any separate license agreement you may have executed
|
|
588
|
+
with Licensor regarding such Contributions.
|
|
589
|
+
|
|
590
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
591
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
592
|
+
except as required for reasonable and customary use in describing the
|
|
593
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
594
|
+
|
|
595
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
596
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
597
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
598
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
599
|
+
implied, including, without limitation, any warranties or conditions
|
|
600
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
601
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
602
|
+
appropriateness of using or redistributing the Work and assume any
|
|
603
|
+
risks associated with Your exercise of permissions under this License.
|
|
604
|
+
|
|
605
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
606
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
607
|
+
unless required by applicable law (such as deliberate and grossly
|
|
608
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
609
|
+
liable to You for damages, including any direct, indirect, special,
|
|
610
|
+
incidental, or consequential damages of any character arising as a
|
|
611
|
+
result of this License or out of the use or inability to use the
|
|
612
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
613
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
614
|
+
other commercial damages or losses), even if such Contributor
|
|
615
|
+
has been advised of the possibility of such damages.
|
|
616
|
+
|
|
617
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
618
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
619
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
620
|
+
or other liability obligations and/or rights consistent with this
|
|
621
|
+
License. However, in accepting such obligations, You may act only
|
|
622
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
623
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
624
|
+
defend, and hold each Contributor harmless for any liability
|
|
625
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
626
|
+
of your accepting any such warranty or additional liability.
|
|
627
|
+
|
|
628
|
+
END OF TERMS AND CONDITIONS
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
MIT License
|
|
633
|
+
|
|
634
|
+
Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC.
|
|
635
|
+
|
|
636
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
637
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
638
|
+
in the Software without restriction, including without limitation the rights
|
|
639
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
640
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
641
|
+
furnished to do so, subject to the following conditions:
|
|
642
|
+
|
|
643
|
+
The above copyright notice and this permission notice shall be included in all
|
|
644
|
+
copies or substantial portions of the Software.
|
|
645
|
+
|
|
646
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
647
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
648
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
649
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
650
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
651
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
652
|
+
SOFTWARE.
|
|
653
|
+
|
|
654
|
+
---
|
|
655
|
+
|
|
656
|
+
Creative Commons Attribution 4.0 International (CC-BY-4.0)
|
|
657
|
+
|
|
658
|
+
Documentation in this project (excluding specifications) is licensed under
|
|
659
|
+
CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
|
|
660
|
+
the full license text.
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
---
|
|
664
|
+
|
|
665
|
+
@mysten/bcs 2.1.2
|
|
666
|
+
@mysten/bcs 2.1.2
|
|
667
|
+
Copyright (c) Mysten Labs, Inc.
|
|
668
|
+
SPDX-License-Identifier: Apache-2.0
|
|
669
|
+
|
|
670
|
+
Apache License
|
|
671
|
+
Version 2.0, January 2004
|
|
672
|
+
http://www.apache.org/licenses/
|
|
673
|
+
|
|
674
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
675
|
+
|
|
676
|
+
1. Definitions.
|
|
677
|
+
|
|
678
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
679
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
680
|
+
|
|
681
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
682
|
+
the copyright owner that is granting the License.
|
|
683
|
+
|
|
684
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
685
|
+
other entities that control, are controlled by, or are under common
|
|
686
|
+
control with that entity. For the purposes of this definition,
|
|
687
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
688
|
+
direction or management of such entity, whether by contract or
|
|
689
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
690
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
691
|
+
|
|
692
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
693
|
+
exercising permissions granted by this License.
|
|
694
|
+
|
|
695
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
696
|
+
including but not limited to software source code, documentation
|
|
697
|
+
source, and configuration files.
|
|
698
|
+
|
|
699
|
+
"Object" form shall mean any form resulting from mechanical
|
|
700
|
+
transformation or translation of a Source form, including but
|
|
701
|
+
not limited to compiled object code, generated documentation,
|
|
702
|
+
and conversions to other media types.
|
|
703
|
+
|
|
704
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
705
|
+
Object form, made available under the License, as indicated by a
|
|
706
|
+
copyright notice that is included in or attached to the work
|
|
707
|
+
(an example is provided in the Appendix below).
|
|
708
|
+
|
|
709
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
710
|
+
form, that is based on (or derived from) the Work and for which the
|
|
711
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
712
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
713
|
+
of this License, Derivative Works shall not include works that remain
|
|
714
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
715
|
+
the Work and Derivative Works thereof.
|
|
716
|
+
|
|
717
|
+
"Contribution" shall mean any work of authorship, including
|
|
718
|
+
the original version of the Work and any modifications or additions
|
|
719
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
720
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
721
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
722
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
723
|
+
means any form of electronic, verbal, or written communication sent
|
|
724
|
+
to the Licensor or its representatives, including but not limited to
|
|
725
|
+
communication on electronic mailing lists, source code control systems,
|
|
726
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
727
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
728
|
+
excluding communication that is conspicuously marked or otherwise
|
|
729
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
730
|
+
|
|
731
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
732
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
733
|
+
subsequently incorporated within the Work.
|
|
734
|
+
|
|
735
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
736
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
737
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
738
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
739
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
740
|
+
Work and such Derivative Works in Source or Object form.
|
|
741
|
+
|
|
742
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
743
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
744
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
745
|
+
(except as stated in this section) patent license to make, have made,
|
|
746
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
747
|
+
where such license applies only to those patent claims licensable
|
|
748
|
+
by such Contributor that are necessarily infringed by their
|
|
749
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
750
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
751
|
+
institute patent litigation against any entity (including a
|
|
752
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
753
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
754
|
+
or contributory patent infringement, then any patent licenses
|
|
755
|
+
granted to You under this License for that Work shall terminate
|
|
756
|
+
as of the date such litigation is filed.
|
|
757
|
+
|
|
758
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
759
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
760
|
+
modifications, and in Source or Object form, provided that You
|
|
761
|
+
meet the following conditions:
|
|
762
|
+
|
|
763
|
+
(a) You must give any other recipients of the Work or
|
|
764
|
+
Derivative Works a copy of this License; and
|
|
765
|
+
|
|
766
|
+
(b) You must cause any modified files to carry prominent notices
|
|
767
|
+
stating that You changed the files; and
|
|
768
|
+
|
|
769
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
770
|
+
that You distribute, all copyright, patent, trademark, and
|
|
771
|
+
attribution notices from the Source form of the Work,
|
|
772
|
+
excluding those notices that do not pertain to any part of
|
|
773
|
+
the Derivative Works; and
|
|
774
|
+
|
|
775
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
776
|
+
distribution, then any Derivative Works that You distribute must
|
|
777
|
+
include a readable copy of the attribution notices contained
|
|
778
|
+
within such NOTICE file, excluding those notices that do not
|
|
779
|
+
pertain to any part of the Derivative Works, in at least one
|
|
780
|
+
of the following places: within a NOTICE text file distributed
|
|
781
|
+
as part of the Derivative Works; within the Source form or
|
|
782
|
+
documentation, if provided along with the Derivative Works; or,
|
|
783
|
+
within a display generated by the Derivative Works, if and
|
|
784
|
+
wherever such third-party notices normally appear. The contents
|
|
785
|
+
of the NOTICE file are for informational purposes only and
|
|
786
|
+
do not modify the License. You may add Your own attribution
|
|
787
|
+
notices within Derivative Works that You distribute, alongside
|
|
788
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
789
|
+
that such additional attribution notices cannot be construed
|
|
790
|
+
as modifying the License.
|
|
791
|
+
|
|
792
|
+
You may add Your own copyright statement to Your modifications and
|
|
793
|
+
may provide additional or different license terms and conditions
|
|
794
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
795
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
796
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
797
|
+
the conditions stated in this License.
|
|
798
|
+
|
|
799
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
800
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
801
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
802
|
+
this License, without any additional terms or conditions.
|
|
803
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
804
|
+
the terms of any separate license agreement you may have executed
|
|
805
|
+
with Licensor regarding such Contributions.
|
|
806
|
+
|
|
807
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
808
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
809
|
+
except as required for reasonable and customary use in describing the
|
|
810
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
811
|
+
|
|
812
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
813
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
814
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
815
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
816
|
+
implied, including, without limitation, any warranties or conditions
|
|
817
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
818
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
819
|
+
appropriateness of using or redistributing the Work and assume any
|
|
820
|
+
risks associated with Your exercise of permissions under this License.
|
|
821
|
+
|
|
822
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
823
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
824
|
+
unless required by applicable law (such as deliberate and grossly
|
|
825
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
826
|
+
liable to You for damages, including any direct, indirect, special,
|
|
827
|
+
incidental, or consequential damages of any character arising as a
|
|
828
|
+
result of this License or out of the use or inability to use the
|
|
829
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
830
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
831
|
+
other commercial damages or losses), even if such Contributor
|
|
832
|
+
has been advised of the possibility of such damages.
|
|
833
|
+
|
|
834
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
835
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
836
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
837
|
+
or other liability obligations and/or rights consistent with this
|
|
838
|
+
License. However, in accepting such obligations, You may act only
|
|
839
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
840
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
841
|
+
defend, and hold each Contributor harmless for any liability
|
|
842
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
843
|
+
of your accepting any such warranty or additional liability.
|
|
844
|
+
|
|
845
|
+
END OF TERMS AND CONDITIONS
|
|
846
|
+
|
|
847
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
848
|
+
|
|
849
|
+
To apply the Apache License to your work, attach the following
|
|
850
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
851
|
+
replaced with your own identifying information. (Don't include
|
|
852
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
853
|
+
comment syntax for the file format. We also recommend that a
|
|
854
|
+
file or class name and description of purpose be included on the
|
|
855
|
+
same "printed page" as the copyright notice for easier
|
|
856
|
+
identification within third-party archives.
|
|
857
|
+
|
|
858
|
+
Copyright [yyyy] [name of copyright owner]
|
|
859
|
+
|
|
860
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
861
|
+
you may not use this file except in compliance with the License.
|
|
862
|
+
You may obtain a copy of the License at
|
|
863
|
+
|
|
864
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
865
|
+
|
|
866
|
+
Unless required by applicable law or agreed to in writing, software
|
|
867
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
868
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
869
|
+
See the License for the specific language governing permissions and
|
|
870
|
+
limitations under the License.
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
---
|
|
874
|
+
|
|
875
|
+
@mysten/utils 0.4.1
|
|
876
|
+
@mysten/utils 0.4.1
|
|
877
|
+
Copyright (c) Mysten Labs, Inc.
|
|
878
|
+
SPDX-License-Identifier: Apache-2.0
|
|
879
|
+
|
|
880
|
+
Apache License
|
|
881
|
+
Version 2.0, January 2004
|
|
882
|
+
http://www.apache.org/licenses/
|
|
883
|
+
|
|
884
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
885
|
+
|
|
886
|
+
1. Definitions.
|
|
887
|
+
|
|
888
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
889
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
890
|
+
|
|
891
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
892
|
+
the copyright owner that is granting the License.
|
|
893
|
+
|
|
894
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
895
|
+
other entities that control, are controlled by, or are under common
|
|
896
|
+
control with that entity. For the purposes of this definition,
|
|
897
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
898
|
+
direction or management of such entity, whether by contract or
|
|
899
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
900
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
901
|
+
|
|
902
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
903
|
+
exercising permissions granted by this License.
|
|
904
|
+
|
|
905
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
906
|
+
including but not limited to software source code, documentation
|
|
907
|
+
source, and configuration files.
|
|
908
|
+
|
|
909
|
+
"Object" form shall mean any form resulting from mechanical
|
|
910
|
+
transformation or translation of a Source form, including but
|
|
911
|
+
not limited to compiled object code, generated documentation,
|
|
912
|
+
and conversions to other media types.
|
|
913
|
+
|
|
914
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
915
|
+
Object form, made available under the License, as indicated by a
|
|
916
|
+
copyright notice that is included in or attached to the work
|
|
917
|
+
(an example is provided in the Appendix below).
|
|
918
|
+
|
|
919
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
920
|
+
form, that is based on (or derived from) the Work and for which the
|
|
921
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
922
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
923
|
+
of this License, Derivative Works shall not include works that remain
|
|
924
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
925
|
+
the Work and Derivative Works thereof.
|
|
926
|
+
|
|
927
|
+
"Contribution" shall mean any work of authorship, including
|
|
928
|
+
the original version of the Work and any modifications or additions
|
|
929
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
930
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
931
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
932
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
933
|
+
means any form of electronic, verbal, or written communication sent
|
|
934
|
+
to the Licensor or its representatives, including but not limited to
|
|
935
|
+
communication on electronic mailing lists, source code control systems,
|
|
936
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
937
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
938
|
+
excluding communication that is conspicuously marked or otherwise
|
|
939
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
940
|
+
|
|
941
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
942
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
943
|
+
subsequently incorporated within the Work.
|
|
944
|
+
|
|
945
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
946
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
947
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
948
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
949
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
950
|
+
Work and such Derivative Works in Source or Object form.
|
|
951
|
+
|
|
952
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
953
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
954
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
955
|
+
(except as stated in this section) patent license to make, have made,
|
|
956
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
957
|
+
where such license applies only to those patent claims licensable
|
|
958
|
+
by such Contributor that are necessarily infringed by their
|
|
959
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
960
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
961
|
+
institute patent litigation against any entity (including a
|
|
962
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
963
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
964
|
+
or contributory patent infringement, then any patent licenses
|
|
965
|
+
granted to You under this License for that Work shall terminate
|
|
966
|
+
as of the date such litigation is filed.
|
|
967
|
+
|
|
968
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
969
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
970
|
+
modifications, and in Source or Object form, provided that You
|
|
971
|
+
meet the following conditions:
|
|
972
|
+
|
|
973
|
+
(a) You must give any other recipients of the Work or
|
|
974
|
+
Derivative Works a copy of this License; and
|
|
975
|
+
|
|
976
|
+
(b) You must cause any modified files to carry prominent notices
|
|
977
|
+
stating that You changed the files; and
|
|
978
|
+
|
|
979
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
980
|
+
that You distribute, all copyright, patent, trademark, and
|
|
981
|
+
attribution notices from the Source form of the Work,
|
|
982
|
+
excluding those notices that do not pertain to any part of
|
|
983
|
+
the Derivative Works; and
|
|
984
|
+
|
|
985
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
986
|
+
distribution, then any Derivative Works that You distribute must
|
|
987
|
+
include a readable copy of the attribution notices contained
|
|
988
|
+
within such NOTICE file, excluding those notices that do not
|
|
989
|
+
pertain to any part of the Derivative Works, in at least one
|
|
990
|
+
of the following places: within a NOTICE text file distributed
|
|
991
|
+
as part of the Derivative Works; within the Source form or
|
|
992
|
+
documentation, if provided along with the Derivative Works; or,
|
|
993
|
+
within a display generated by the Derivative Works, if and
|
|
994
|
+
wherever such third-party notices normally appear. The contents
|
|
995
|
+
of the NOTICE file are for informational purposes only and
|
|
996
|
+
do not modify the License. You may add Your own attribution
|
|
997
|
+
notices within Derivative Works that You distribute, alongside
|
|
998
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
999
|
+
that such additional attribution notices cannot be construed
|
|
1000
|
+
as modifying the License.
|
|
1001
|
+
|
|
1002
|
+
You may add Your own copyright statement to Your modifications and
|
|
1003
|
+
may provide additional or different license terms and conditions
|
|
1004
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
1005
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
1006
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
1007
|
+
the conditions stated in this License.
|
|
1008
|
+
|
|
1009
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
1010
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
1011
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
1012
|
+
this License, without any additional terms or conditions.
|
|
1013
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
1014
|
+
the terms of any separate license agreement you may have executed
|
|
1015
|
+
with Licensor regarding such Contributions.
|
|
1016
|
+
|
|
1017
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
1018
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
1019
|
+
except as required for reasonable and customary use in describing the
|
|
1020
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
1021
|
+
|
|
1022
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
1023
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
1024
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
1025
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
1026
|
+
implied, including, without limitation, any warranties or conditions
|
|
1027
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
1028
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
1029
|
+
appropriateness of using or redistributing the Work and assume any
|
|
1030
|
+
risks associated with Your exercise of permissions under this License.
|
|
1031
|
+
|
|
1032
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
1033
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
1034
|
+
unless required by applicable law (such as deliberate and grossly
|
|
1035
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
1036
|
+
liable to You for damages, including any direct, indirect, special,
|
|
1037
|
+
incidental, or consequential damages of any character arising as a
|
|
1038
|
+
result of this License or out of the use or inability to use the
|
|
1039
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
1040
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
1041
|
+
other commercial damages or losses), even if such Contributor
|
|
1042
|
+
has been advised of the possibility of such damages.
|
|
1043
|
+
|
|
1044
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
1045
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
1046
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
1047
|
+
or other liability obligations and/or rights consistent with this
|
|
1048
|
+
License. However, in accepting such obligations, You may act only
|
|
1049
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
1050
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
1051
|
+
defend, and hold each Contributor harmless for any liability
|
|
1052
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
1053
|
+
of your accepting any such warranty or additional liability.
|
|
1054
|
+
|
|
1055
|
+
END OF TERMS AND CONDITIONS
|
|
1056
|
+
|
|
1057
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
1058
|
+
|
|
1059
|
+
To apply the Apache License to your work, attach the following
|
|
1060
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
1061
|
+
replaced with your own identifying information. (Don't include
|
|
1062
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
1063
|
+
comment syntax for the file format. We also recommend that a
|
|
1064
|
+
file or class name and description of purpose be included on the
|
|
1065
|
+
same "printed page" as the copyright notice for easier
|
|
1066
|
+
identification within third-party archives.
|
|
1067
|
+
|
|
1068
|
+
Copyright [yyyy] [name of copyright owner]
|
|
1069
|
+
|
|
1070
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
1071
|
+
you may not use this file except in compliance with the License.
|
|
1072
|
+
You may obtain a copy of the License at
|
|
1073
|
+
|
|
1074
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
1075
|
+
|
|
1076
|
+
Unless required by applicable law or agreed to in writing, software
|
|
1077
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1078
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1079
|
+
See the License for the specific language governing permissions and
|
|
1080
|
+
limitations under the License.
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
---
|
|
1084
|
+
|
|
1085
|
+
@scure/base 2.4.0
|
|
1086
|
+
The MIT License (MIT)
|
|
1087
|
+
|
|
1088
|
+
Copyright (c) 2022 Paul Miller (https://paulmillr.com)
|
|
1089
|
+
|
|
1090
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1091
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
1092
|
+
in the Software without restriction, including without limitation the rights
|
|
1093
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1094
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1095
|
+
furnished to do so, subject to the following conditions:
|
|
1096
|
+
|
|
1097
|
+
The above copyright notice and this permission notice shall be included in
|
|
1098
|
+
all copies or substantial portions of the Software.
|
|
1099
|
+
|
|
1100
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1101
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1102
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1103
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1104
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1105
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1106
|
+
THE SOFTWARE.
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
---
|
|
1110
|
+
|
|
1111
|
+
@mysten/sui 2.35.0
|
|
1112
|
+
Apache License
|
|
1113
|
+
Version 2.0, January 2004
|
|
1114
|
+
http://www.apache.org/licenses/
|
|
1115
|
+
|
|
1116
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
1117
|
+
|
|
1118
|
+
1. Definitions.
|
|
1119
|
+
|
|
1120
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
1121
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
1122
|
+
|
|
1123
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
1124
|
+
the copyright owner that is granting the License.
|
|
1125
|
+
|
|
1126
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
1127
|
+
other entities that control, are controlled by, or are under common
|
|
1128
|
+
control with that entity. For the purposes of this definition,
|
|
1129
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
1130
|
+
direction or management of such entity, whether by contract or
|
|
1131
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
1132
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
1133
|
+
|
|
1134
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
1135
|
+
exercising permissions granted by this License.
|
|
1136
|
+
|
|
1137
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
1138
|
+
including but not limited to software source code, documentation
|
|
1139
|
+
source, and configuration files.
|
|
1140
|
+
|
|
1141
|
+
"Object" form shall mean any form resulting from mechanical
|
|
1142
|
+
transformation or translation of a Source form, including but
|
|
1143
|
+
not limited to compiled object code, generated documentation,
|
|
1144
|
+
and conversions to other media types.
|
|
1145
|
+
|
|
1146
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
1147
|
+
Object form, made available under the License, as indicated by a
|
|
1148
|
+
copyright notice that is included in or attached to the work
|
|
1149
|
+
(an example is provided in the Appendix below).
|
|
1150
|
+
|
|
1151
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
1152
|
+
form, that is based on (or derived from) the Work and for which the
|
|
1153
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
1154
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
1155
|
+
of this License, Derivative Works shall not include works that remain
|
|
1156
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
1157
|
+
the Work and Derivative Works thereof.
|
|
1158
|
+
|
|
1159
|
+
"Contribution" shall mean any work of authorship, including
|
|
1160
|
+
the original version of the Work and any modifications or additions
|
|
1161
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
1162
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
1163
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
1164
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
1165
|
+
means any form of electronic, verbal, or written communication sent
|
|
1166
|
+
to the Licensor or its representatives, including but not limited to
|
|
1167
|
+
communication on electronic mailing lists, source code control systems,
|
|
1168
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
1169
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
1170
|
+
excluding communication that is conspicuously marked or otherwise
|
|
1171
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
1172
|
+
|
|
1173
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
1174
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
1175
|
+
subsequently incorporated within the Work.
|
|
1176
|
+
|
|
1177
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
1178
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
1179
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
1180
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
1181
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
1182
|
+
Work and such Derivative Works in Source or Object form.
|
|
1183
|
+
|
|
1184
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
1185
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
1186
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
1187
|
+
(except as stated in this section) patent license to make, have made,
|
|
1188
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
1189
|
+
where such license applies only to those patent claims licensable
|
|
1190
|
+
by such Contributor that are necessarily infringed by their
|
|
1191
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
1192
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
1193
|
+
institute patent litigation against any entity (including a
|
|
1194
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
1195
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
1196
|
+
or contributory patent infringement, then any patent licenses
|
|
1197
|
+
granted to You under this License for that Work shall terminate
|
|
1198
|
+
as of the date such litigation is filed.
|
|
1199
|
+
|
|
1200
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
1201
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
1202
|
+
modifications, and in Source or Object form, provided that You
|
|
1203
|
+
meet the following conditions:
|
|
1204
|
+
|
|
1205
|
+
(a) You must give any other recipients of the Work or
|
|
1206
|
+
Derivative Works a copy of this License; and
|
|
1207
|
+
|
|
1208
|
+
(b) You must cause any modified files to carry prominent notices
|
|
1209
|
+
stating that You changed the files; and
|
|
1210
|
+
|
|
1211
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
1212
|
+
that You distribute, all copyright, patent, trademark, and
|
|
1213
|
+
attribution notices from the Source form of the Work,
|
|
1214
|
+
excluding those notices that do not pertain to any part of
|
|
1215
|
+
the Derivative Works; and
|
|
1216
|
+
|
|
1217
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
1218
|
+
distribution, then any Derivative Works that You distribute must
|
|
1219
|
+
include a readable copy of the attribution notices contained
|
|
1220
|
+
within such NOTICE file, excluding those notices that do not
|
|
1221
|
+
pertain to any part of the Derivative Works, in at least one
|
|
1222
|
+
of the following places: within a NOTICE text file distributed
|
|
1223
|
+
as part of the Derivative Works; within the Source form or
|
|
1224
|
+
documentation, if provided along with the Derivative Works; or,
|
|
1225
|
+
within a display generated by the Derivative Works, if and
|
|
1226
|
+
wherever such third-party notices normally appear. The contents
|
|
1227
|
+
of the NOTICE file are for informational purposes only and
|
|
1228
|
+
do not modify the License. You may add Your own attribution
|
|
1229
|
+
notices within Derivative Works that You distribute, alongside
|
|
1230
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
1231
|
+
that such additional attribution notices cannot be construed
|
|
1232
|
+
as modifying the License.
|
|
1233
|
+
|
|
1234
|
+
You may add Your own copyright statement to Your modifications and
|
|
1235
|
+
may provide additional or different license terms and conditions
|
|
1236
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
1237
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
1238
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
1239
|
+
the conditions stated in this License.
|
|
1240
|
+
|
|
1241
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
1242
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
1243
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
1244
|
+
this License, without any additional terms or conditions.
|
|
1245
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
1246
|
+
the terms of any separate license agreement you may have executed
|
|
1247
|
+
with Licensor regarding such Contributions.
|
|
1248
|
+
|
|
1249
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
1250
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
1251
|
+
except as required for reasonable and customary use in describing the
|
|
1252
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
1253
|
+
|
|
1254
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
1255
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
1256
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
1257
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
1258
|
+
implied, including, without limitation, any warranties or conditions
|
|
1259
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
1260
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
1261
|
+
appropriateness of using or redistributing the Work and assume any
|
|
1262
|
+
risks associated with Your exercise of permissions under this License.
|
|
1263
|
+
|
|
1264
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
1265
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
1266
|
+
unless required by applicable law (such as deliberate and grossly
|
|
1267
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
1268
|
+
liable to You for damages, including any direct, indirect, special,
|
|
1269
|
+
incidental, or consequential damages of any character arising as a
|
|
1270
|
+
result of this License or out of the use or inability to use the
|
|
1271
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
1272
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
1273
|
+
other commercial damages or losses), even if such Contributor
|
|
1274
|
+
has been advised of the possibility of such damages.
|
|
1275
|
+
|
|
1276
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
1277
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
1278
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
1279
|
+
or other liability obligations and/or rights consistent with this
|
|
1280
|
+
License. However, in accepting such obligations, You may act only
|
|
1281
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
1282
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
1283
|
+
defend, and hold each Contributor harmless for any liability
|
|
1284
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
1285
|
+
of your accepting any such warranty or additional liability.
|
|
1286
|
+
|
|
1287
|
+
END OF TERMS AND CONDITIONS
|
|
1288
|
+
|
|
1289
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
1290
|
+
|
|
1291
|
+
To apply the Apache License to your work, attach the following
|
|
1292
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
1293
|
+
replaced with your own identifying information. (Don't include
|
|
1294
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
1295
|
+
comment syntax for the file format. We also recommend that a
|
|
1296
|
+
file or class name and description of purpose be included on the
|
|
1297
|
+
same "printed page" as the copyright notice for easier
|
|
1298
|
+
identification within third-party archives.
|
|
1299
|
+
|
|
1300
|
+
Copyright [yyyy] [name of copyright owner]
|
|
1301
|
+
|
|
1302
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
1303
|
+
you may not use this file except in compliance with the License.
|
|
1304
|
+
You may obtain a copy of the License at
|
|
1305
|
+
|
|
1306
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
1307
|
+
|
|
1308
|
+
Unless required by applicable law or agreed to in writing, software
|
|
1309
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1310
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1311
|
+
See the License for the specific language governing permissions and
|
|
1312
|
+
limitations under the License.
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
---
|
|
1316
|
+
|
|
1317
|
+
@scure/base 2.4.0
|
|
1318
|
+
The MIT License (MIT)
|
|
1319
|
+
|
|
1320
|
+
Copyright (c) 2022 Paul Miller (https://paulmillr.com)
|
|
1321
|
+
|
|
1322
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1323
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
1324
|
+
in the Software without restriction, including without limitation the rights
|
|
1325
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1326
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1327
|
+
furnished to do so, subject to the following conditions:
|
|
1328
|
+
|
|
1329
|
+
The above copyright notice and this permission notice shall be included in
|
|
1330
|
+
all copies or substantial portions of the Software.
|
|
1331
|
+
|
|
1332
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1333
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1334
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1335
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1336
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1337
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1338
|
+
THE SOFTWARE.
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
---
|
|
1342
|
+
|
|
1343
|
+
@noble/hashes 2.4.0
|
|
1344
|
+
The MIT License (MIT)
|
|
1345
|
+
|
|
1346
|
+
Copyright (c) 2022 Paul Miller (https://paulmillr.com)
|
|
1347
|
+
|
|
1348
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1349
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
1350
|
+
in the Software without restriction, including without limitation the rights
|
|
1351
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1352
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1353
|
+
furnished to do so, subject to the following conditions:
|
|
1354
|
+
|
|
1355
|
+
The above copyright notice and this permission notice shall be included in
|
|
1356
|
+
all copies or substantial portions of the Software.
|
|
1357
|
+
|
|
1358
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1359
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1360
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1361
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1362
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1363
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1364
|
+
THE SOFTWARE.
|
|
1365
|
+
|
|
1366
|
+
---
|
|
1367
|
+
|
|
1368
|
+
@scure/bip39 2.4.0
|
|
1369
|
+
The MIT License (MIT)
|
|
1370
|
+
|
|
1371
|
+
Copyright (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com)
|
|
1372
|
+
|
|
1373
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1374
|
+
of this software and associated documentation files (the “Software”), to deal
|
|
1375
|
+
in the Software without restriction, including without limitation the rights
|
|
1376
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1377
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1378
|
+
furnished to do so, subject to the following conditions:
|
|
1379
|
+
|
|
1380
|
+
The above copyright notice and this permission notice shall be included in
|
|
1381
|
+
all copies or substantial portions of the Software.
|
|
1382
|
+
|
|
1383
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1384
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1385
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1386
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1387
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1388
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1389
|
+
THE SOFTWARE.
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
---
|
|
1393
|
+
|
|
1394
|
+
dijkstrajs 1.0.3
|
|
1395
|
+
```
|
|
1396
|
+
Dijkstra path-finding functions. Adapted from the Dijkstar Python project.
|
|
1397
|
+
|
|
1398
|
+
Copyright (C) 2008
|
|
1399
|
+
Wyatt Baldwin <self@wyattbaldwin.com>
|
|
1400
|
+
All rights reserved
|
|
1401
|
+
|
|
1402
|
+
Licensed under the MIT license.
|
|
1403
|
+
|
|
1404
|
+
http://www.opensource.org/licenses/mit-license.php
|
|
1405
|
+
|
|
1406
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1407
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1408
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1409
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1410
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1411
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1412
|
+
THE SOFTWARE.
|
|
1413
|
+
```
|
|
1414
|
+
|
|
1415
|
+
|
|
1416
|
+
---
|
|
1417
|
+
|
|
1418
|
+
pkce-challenge 5.0.1
|
|
1419
|
+
MIT License
|
|
1420
|
+
|
|
1421
|
+
Copyright (c) 2019
|
|
1422
|
+
|
|
1423
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1424
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1425
|
+
in the Software without restriction, including without limitation the rights
|
|
1426
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1427
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1428
|
+
furnished to do so, subject to the following conditions:
|
|
1429
|
+
|
|
1430
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1431
|
+
copies or substantial portions of the Software.
|
|
1432
|
+
|
|
1433
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1434
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1435
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1436
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1437
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1438
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1439
|
+
SOFTWARE.
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
---
|
|
1443
|
+
|
|
1444
|
+
qrcode 1.5.4
|
|
1445
|
+
The MIT License (MIT)
|
|
1446
|
+
|
|
1447
|
+
Copyright (c) 2012 Ryan Day
|
|
1448
|
+
|
|
1449
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
1450
|
+
|
|
1451
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
1452
|
+
|
|
1453
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
---
|
|
1458
|
+
|
|
1459
|
+
zod 4.6.5
|
|
1460
|
+
MIT License
|
|
1461
|
+
|
|
1462
|
+
Copyright (c) 2025 Colin McDonnell
|
|
1463
|
+
|
|
1464
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1465
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
1466
|
+
in the Software without restriction, including without limitation the rights
|
|
1467
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1468
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
1469
|
+
furnished to do so, subject to the following conditions:
|
|
1470
|
+
|
|
1471
|
+
The above copyright notice and this permission notice shall be included in all
|
|
1472
|
+
copies or substantial portions of the Software.
|
|
1473
|
+
|
|
1474
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1475
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1476
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1477
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1478
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1479
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1480
|
+
SOFTWARE.
|
|
1481
|
+
|
|
1482
|
+
</template><script type="module">var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),l=Object.defineProperty,u=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),d=(e,t)=>{let n={};for(var r in e)l(n,r,{get:e[r],enumerable:!0});return t&&l(n,Symbol.toStringTag,{value:`Module`}),n},f=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]);function p(e){return typeof e==`string`&&f.has(e.replace(/#$/,``))}function m(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function h(e,t=`|`){return e.map(e=>k(e)).join(t)}function g(e,t){return typeof t==`bigint`?t.toString():t}var _=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function v(e){return new _(e)}function y(e){return e==null}function b(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ee(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var x=Symbol(`evaluating`);function te(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==x)return r===void 0&&(r=x,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function S(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ne(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function re(e){return ne(e._zod.def)??e._zod.def.shape}function C(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return S(this,t,e),e},enumerable:!0,configurable:!0})}function ie(e,t,n){t in e?S(e,t,n):e[t]=n}function w(e,t,n,r){let i=re(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?C(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ie(e,a,r?r(n.value,a):n.value))}}function ae(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?C(e,n,()=>t[n]):ie(e,n,r.value))}}function T(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function E(e){return JSON.stringify(e)}function oe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var se=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ce(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var le=v(()=>{if(tt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function ue(e){if(ce(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ce(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function de(e){return ue(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var fe=new Set([`string`,`number`,`symbol`]);function pe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function D(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function O(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function k(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function me(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var he={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ge={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function _e(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return w(i,e,ve(e,t)),D(e,T(n,{shape:i,checks:[]}))}function ve(e,t){let n=re(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function ye(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(ve(e,t)),a={};return w(a,e,Reflect.ownKeys(re(e)).filter(e=>!i.has(e))),D(e,T(n,{shape:a,checks:[]}))}function be(e,t){if(!ue(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=re(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return D(e,T(e._zod.def,{shape:xe(e,t)}))}function xe(e,t){let n={};return w(n,e,Reflect.ownKeys(re(e))),ae(n,t),n}function Se(e,t){if(!ue(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return D(e,T(e._zod.def,{shape:xe(e,t)}))}function Ce(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return w(n,e,Reflect.ownKeys(re(e))),w(n,t,Reflect.ownKeys(re(t))),D(e,T(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function we(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(ve(t,n)):void 0,o={};return w(o,t,Reflect.ownKeys(re(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),D(t,T(t._zod.def,{shape:o,checks:[]}))}function Te(e,t,n){let r=n?new Set(ve(t,n)):void 0,i={};return w(i,t,Reflect.ownKeys(re(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),D(t,T(t._zod.def,{shape:i}))}function Ee(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function De(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Oe(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function ke(e){return typeof e==`string`?e:e?.message}function Ae(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function je(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:ke(e.inst?._zod.def?.error?.(e))??ke(a?.(e))??ke(t?.error?.(e))??ke(n.customError?.(e))??ke(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Me=/[\uD800-\uDBFF]/;function Ne(e){let t=e.length;if(!Me.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Pe(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Fe(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ie(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Le(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Be(e,n,r.value)}}function A(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Re(e,t,n){return A(e,t,n,!1)}function ze(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return A(this,n,r(this))},set(e){A(this,n,e)}})}return t}function Be(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:A(this,t,n.bind(this))},set(e){A(this,t,e)}})}function Ve(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var He,Ue=!1,We={configurable:!0,get(){Ue=!0}};function j(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&He!==e._zod?He=void 0:(He=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,We);let e=Ue;Ue=!1;try{let r=n(this);return Ue?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ue||=e,r}catch(n){throw delete this[t],Ue||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function Ge(e,t,n,r){let i=Ve(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Ke=`~constantCatch`;function qe(e){let t=()=>e;return t[Ke]=!0,t}var Je,Ye=Object.freeze({status:`aborted`}),Xe={value:void 0,enumerable:!1},Ze=`captureStackTrace`in Error?Error:null;function Qe(e){let t=Ze;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Ze=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function M(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Xe.value=new a(r);try{Object.defineProperty(n,"_zod",Xe)}finally{Xe.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Le(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Qe(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var $e=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},et=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Je=globalThis).__zod_globalConfig??(Je.__zod_globalConfig={});var tt=globalThis.__zod_globalConfig;function nt(e){return e&&Object.assign(tt,e),tt}function rt(){let e=this._zod;return e.message??=JSON.stringify(e.def,g,2),e.message}function it(e){this._zod.message=e}var at={get:rt,set:it,enumerable:!0,configurable:!0},ot={value:void 0,enumerable:!1},st=new WeakSet([Object.prototype,Error.prototype]),ct=(e,t)=>{e.name=`$ZodError`,ot.value=t,Object.defineProperty(e,"issues",ot),ot.value=void 0,Object.defineProperty(e,"message",at);let n=Object.getPrototypeOf(e);st.has(n)||(st.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},lt=M(`$ZodError`,ct);M(`$ZodError`,ct,void 0,{Parent:Error});function ut(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function dt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?ut(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function ft(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function pt(e,t){return{callee:t?.callee??e,Err:t?.Err}}var mt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new $e;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>je(e,o,nt())));throw se(n,a?.callee??t),n}return s.value};return t},ht=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>je(e,o,nt())));throw se(n,a?.callee??t),n}return s.value};return t},gt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new $e;return a.issues.length?_t(e,a.issues,i):{success:!0,data:a.value}};function _t(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>je(e,n,nt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var vt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?_t(e,a.issues,i):{success:!0,data:a.value}},yt=Symbol.for(`zod.compile.invalid`),bt=Symbol.for(`zod.compile.fallback`),xt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==yt)return!0;if(r.definite===!0&&n===void 0)return!1}return St(e,t,n)});function St(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[bt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new $e;return a.issues.length===0}var Ct=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},wt=e=>{let t=mt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,pt(n,a))};return n},Tt=e=>{let t=mt(e),n=(e,r,i,a)=>t(e,r,i,pt(n,a));return n},Et=e=>{let t=ht(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,pt(n,a))};return n},Dt=e=>{let t=ht(e),n=async(e,r,i,a)=>await t(e,r,i,pt(n,a));return n},Ot=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gt(e)(t,n,i)},kt=e=>(t,n,r)=>gt(e)(t,n,r),At=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vt(e)(t,n,i)},jt=e=>async(t,n,r)=>vt(e)(t,n,r),Mt=/^[cC][0-9a-z]{6,}$/,Nt=/^[0-9a-z]+$/,Pt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ft=/^[0-9a-vA-V]{20}$/,It=/^[A-Za-z0-9]{27}$/,Lt=/^[a-zA-Z0-9_-]{21}$/;function Rt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var zt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bt=/^([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})$/,Vt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ht=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ut=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Wt(){return new RegExp(Ut,`u`)}var Gt=/^(?:(?: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])$/,Kt=/^(([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}|:))$/,qt=/^((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])$/,Jt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xt=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Zt=/^https?$/,Qt=/^\+[1-9]\d{6,14}$/,$t=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function en(e){return RegExp(`^${e}$`)}var tn=en($t);function nn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function rn(e){return RegExp(`^${nn(e)}$`)}function an(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${nn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${nn({precision:e.precision})}`:n;return RegExp(`^${$t}T(?:${r})$`)}var on=/^[\s\S]{0,}$/,sn=/^-?\d+$/,cn=/^-?\d+(?:\.\d+)?$/,ln=/^(?:true|false)$/i,un=/^null$/i,dn=/^undefined$/i,fn=/^[^A-Z]*$/,pn=/^[^a-z]*$/,mn=M(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),hn=e=>{let t=e.value;return!y(t)&&t.length!==void 0},gn={number:`number`,bigint:`bigint`,object:`date`},_n=M(`$ZodCheckLessThan`,(e,t)=>{mn.init(e,t);let n=gn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:gn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vn=M(`$ZodCheckGreaterThan`,(e,t)=>{mn.init(e,t);let n=gn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:gn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yn=M(`$ZodCheckMultipleOf`,(e,t)=>{mn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ee(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})}}),bn=M(`$ZodCheckNumberFormat`,(e,t)=>{mn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=he[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),xn=M(`$ZodCheckMaxLength`,(e,t)=>{var n;mn.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ne(r):i)<=t.maximum)return;let a=Pe(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sn=M(`$ZodCheckMinLength`,(e,t)=>{var n;mn.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ne(r):i)>=t.minimum)return;let a=Pe(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cn=M(`$ZodCheckLengthEquals`,(e,t)=>{var n;mn.init(e,t),(n=e._zod.def).when??(n.when=hn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ne(r):i;if(a===t.length)return;let o=Pe(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),wn=M(`$ZodCheckStringFormat`,(e,t)=>{var n,r;mn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tn=M(`$ZodCheckRegex`,(e,t)=>{wn.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})}}),En=M(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=fn,wn.init(e,t)}),Dn=M(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=pn,wn.init(e,t)}),On=M(`$ZodCheckIncludes`,(e,t)=>{mn.init(e,t);let n=pe(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),kn=M(`$ZodCheckStartsWith`,(e,t)=>{mn.init(e,t);let n=RegExp(`^${pe(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),An=M(`$ZodCheckEndsWith`,(e,t)=>{mn.init(e,t);let n=RegExp(`.*${pe(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),jn=M(`$ZodCheckOverwrite`,(e,t)=>{mn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Mn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
1483
|
+
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
1484
|
+
`)}\n};`)(...Object.values(this.closed))}},Nn={major:4,minor:6,patch:5},N=M(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Nn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Ee(t),a;for(let o of n){if(o._zod.def.when){if(De(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new $e;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ae(t.issues,n,e),i||=Ee(t,n))});else{if(t.issues.length===n)continue;Ae(t.issues,n,e),i||=Ee(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Ee(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new $e;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new $e;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Re(this,`~standard`,In(this))},set"~standard"(e){A(this,`~standard`,e)}}),Pn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>je(e,t,nt()))}:{value:e.value};async function Fn(e,t){let n={async:!0};return Pn(await e._zod.run({value:t,issues:[]},n),n)}function In(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Pn(r,n)}catch{}return Fn(e,t)},vendor:`zod`,version:1}}var Ln=M(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=t.pattern??on,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=M(`$ZodStringFormat`,(e,t)=>{wn.init(e,t),Ln.init(e,t)}),Rn=M(`$ZodGUID`,(e,t)=>{t.pattern??=Bt,P.init(e,t)}),zn=M(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Vt(e)}else t.pattern??=Vt();P.init(e,t)}),Bn=M(`$ZodEmail`,(e,t)=>{t.pattern??=Ht,P.init(e,t)});function Vn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Hn(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Vn(e)||2:Un(e,t)}function Un(e,t){if(!t.normalize&&t.protocol?.source===Zt.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Wn=/[\t\n\r]/g;function Gn(e){return e.replace(Wn,``)}function Kn(e,t){return t.lastIndex=0,t.test(e.hostname)}function qn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Jn=M(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Hn(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Gn(r);return}t.hostname&&!Kn(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!qn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Gn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Yn=M(`$ZodEmoji`,(e,t)=>{t.pattern??=Wt(),P.init(e,t)}),Xn=M(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Lt:Rt(t.length),P.init(e,t)}),Zn=M(`$ZodCUID`,(e,t)=>{t.pattern??=Mt,P.init(e,t)}),Qn=M(`$ZodCUID2`,(e,t)=>{t.pattern??=Nt,P.init(e,t)}),$n=M(`$ZodULID`,(e,t)=>{t.pattern??=Pt,P.init(e,t)}),er=M(`$ZodXID`,(e,t)=>{t.pattern??=Ft,P.init(e,t)}),tr=M(`$ZodKSUID`,(e,t)=>{t.pattern??=It,P.init(e,t)}),nr=M(`$ZodISODateTime`,(e,t)=>{t.pattern??=an(t),P.init(e,t)}),rr=M(`$ZodISODate`,(e,t)=>{t.pattern??=tn,P.init(e,t)}),ir=M(`$ZodISOTime`,(e,t)=>{t.pattern??=rn(t),P.init(e,t)}),ar=M(`$ZodISODuration`,(e,t)=>{t.pattern??=zt,P.init(e,t)}),or=M(`$ZodIPv4`,(e,t)=>{t.pattern??=Gt,P.init(e,t)}),sr=/^[0-9a-fA-F:.]+$/;function cr(e){return sr.test(e)?Vn(`http://[${e}]`):!1}var lr=M(`$ZodIPv6`,(e,t)=>{t.pattern??=Kt,P.init(e,t),e._zod.check=n=>{cr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),ur=M(`$ZodCIDRv4`,(e,t)=>{t.pattern??=qt,P.init(e,t)});function dr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:cr(n)}var fr=M(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Jt,P.init(e,t),e._zod.check=n=>{dr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function pr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var mr=/^[0-9a-zA-Z+/]*={0,2}$/,hr=M(`$ZodBase64`,(e,t)=>{t.pattern??=mr,P.init(e,t),e._zod.check=n=>{pr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),gr=/^[A-Za-z0-9_-]*$/;function _r(e){if(!gr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return pr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var vr=M(`$ZodBase64URL`,(e,t)=>{t.pattern??=gr,P.init(e,t),e._zod.check=n=>{_r(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),yr=M(`$ZodE164`,(e,t)=>{t.pattern??=Qt,P.init(e,t)});function br(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var xr=M(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{br(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Sr=M(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=cn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Cr=M(`$ZodNumberFormat`,(e,t)=>{bn.init(e,t),Sr.init(e,t)}),wr=M(`$ZodBoolean`,(e,t)=>{N.init(e,t),e._zod.pattern=ln,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Tr=M(`$ZodUndefined`,(e,t)=>{N.init(e,t),e._zod.pattern=dn,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Er=M(`$ZodNull`,(e,t)=>{N.init(e,t),e._zod.pattern=un,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Dr=M(`$ZodAny`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),Or=M(`$ZodUnknown`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),kr=M(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Ar(e,t,n){e.issues.length&&t.issues.push(...Oe(n,e.issues)),t.value[n]=e.value}var jr=M(`$ZodArray`,(e,t)=>{N.init(e,t);let n=tt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Ar(t,r,e)));else if(Ar(c,r,e),s&&c.issues.length!==0&&Ee(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Mr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Oe(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Nr=[];function Pr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Nr,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=me(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Fr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Ee(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Mr(e,n,i,t,d,f))):Mr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Ir=M(`$ZodObject`,(e,t)=>{N.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=v(()=>Pr(t));j(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||S(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=ce,o=t.catchall,s,c=tt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Ee(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Mr(n,t,e,r,a,o))):Mr(s,t,e,r,a,o)}return o?Fr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Lr=M(`$ZodObjectJIT`,(e,t)=>{Ir.init(e,t);let n=e._zod.parse,r=v(()=>Pr(t)),i=tt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Mn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
1485
|
+
let ${e}_ab = false;
|
|
1486
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
1487
|
+
const iss = ${e}.issues[i];
|
|
1488
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
1489
|
+
payload.issues.push(iss);
|
|
1490
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
1491
|
+
}
|
|
1492
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
1493
|
+
payload.value = newResult;
|
|
1494
|
+
return payload;
|
|
1495
|
+
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:E(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
1496
|
+
const ${n}_present = ${i};
|
|
1497
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
1498
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
if (${e}) {
|
|
1502
|
+
newResult[${r}] = ${n}.value;
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
`)}else f?(o.write(`
|
|
1507
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
1508
|
+
}
|
|
1509
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
1510
|
+
if (${n}.value !== undefined || ${i}) {
|
|
1511
|
+
newResult[${r}] = ${n}.value;
|
|
1512
|
+
}
|
|
1513
|
+
`)):o.write(`
|
|
1514
|
+
const ${n}_present = ${i};
|
|
1515
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
1516
|
+
}
|
|
1517
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
1518
|
+
payload.issues.push({
|
|
1519
|
+
code: "invalid_type",
|
|
1520
|
+
expected: "nonoptional",
|
|
1521
|
+
input: undefined,
|
|
1522
|
+
path: [${r}]
|
|
1523
|
+
});
|
|
1524
|
+
if (ctx && ctx.abortEarly) {
|
|
1525
|
+
payload.value = newResult;
|
|
1526
|
+
return payload;
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
if (${n}_present) {
|
|
1531
|
+
newResult[${r}] = ${n}.value;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=ce,c=!tt.jitless,l=c&&le.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Fr([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Rr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Ee(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>je(e,r,nt())))}),t)}var zr=M(`$ZodUnion`,(e,t)=>{N.init(e,t),j(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),j(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),j(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),j(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>b(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Rr(t,r,e,i)):Rr(o,r,e,i)}});function Br(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Vr=M(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,zr.init(e,t);let n=e._zod.parse;j(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||S(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=ne(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=v(()=>Br(t));e._zod.parse=(i,a)=>{let o=i.value;if(!ce(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Hr=M(`$ZodIntersection`,(e,t)=>{N.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Wr(e,t,n)):Wr(e,i,a)}});function Ur(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ue(e)&&ue(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Ur(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Ur(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Wr(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Ur(t.value,n.value);if(!c.valid){if(Ee(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Gr=M(`$ZodRecord`,(e,t)=>{N.init(e,t);let n=tt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!ue(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>je(e,i,nt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Oe(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Oe(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&cn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>je(e,i,nt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Oe(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Oe(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Kr=M(`$ZodEnum`,(e,t)=>{N.init(e,t);let n=m(t.entries),r=new Set(n);e._zod.values=r,j(e,`pattern`,e=>{let t=m(e.def.entries).filter(e=>fe.has(typeof e));return RegExp(t.length?`^(${t.map(e=>pe(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),qr=M(`$ZodLiteral`,(e,t)=>{N.init(e,t);let n=new Set(t.values);e._zod.values=n,j(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?pe(e):e?pe(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Jr=M(`$ZodTransform`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,tt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new et(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new $e;return n.value=i,n}});function Yr(e,t){return e.value=t.issues.length?void 0:t.value,e}var Xr=M(`$ZodOptional`,(e,t)=>{N.init(e,t),j(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,j(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),j(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${b(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Yr(e,t)):Yr(e,r)}return t.innerType._zod.run(e,n)}}),Zr=M(`$ZodExactOptional`,(e,t)=>{Xr.init(e,t),j(e,`values`,e=>e.def.innerType._zod.values),j(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Qr=M(`$ZodNullable`,(e,t)=>{N.init(e,t),j(e,`optin`,e=>e.def.innerType._zod.optin),j(e,`optout`,e=>e.def.innerType._zod.optout),j(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${b(t.source)}|null)$`):void 0}),j(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$r=M(`$ZodDefault`,(e,t)=>{N.init(e,t),e._zod.optin=`defaulted`,j(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ei(e,t)):ei(r,t)}});function ei(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ti=M(`$ZodPrefault`,(e,t)=>{N.init(e,t),e._zod.optin=`defaulted`,j(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ni=M(`$ZodNonOptional`,(e,t)=>{N.init(e,t),j(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ri(t,e)):ri(i,e)}});function ri(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function ii(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>je(e,r,nt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ai=M(`$ZodCatch`,(e,t)=>{N.init(e,t),j(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),j(e,`optout`,e=>e.def.innerType._zod.optout),j(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>ii(e,r,t,n)):ii(e,r,t,n)}}),oi=M(`$ZodPipe`,(e,t)=>{N.init(e,t),j(e,`values`,e=>e.def.in._zod.values),j(e,`optin`,e=>e.def.in._zod.optin),j(e,`optout`,e=>e.def.out._zod.optout),j(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>si(e,t.in,n)):si(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>si(e,t.out,n)):si(r,t.out,n)}});function si(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ci=M(`$ZodPreprocess`,(e,t)=>{oi.init(e,t)}),li=M(`$ZodReadonly`,(e,t)=>{N.init(e,t),j(e,`propValues`,e=>e.def.innerType._zod.propValues),j(e,`values`,e=>e.def.innerType._zod.values),j(e,`optin`,e=>e.def.innerType?._zod?.optin),j(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ui):ui(r)}});function ui(e){return e.memo||(e.value=Object.freeze(e.value)),e}var di=M(`$ZodLazy`,(e,t)=>{N.init(e,t),te(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),j(e,`pattern`,e=>e.innerType?._zod?.pattern),j(e,`propValues`,e=>e.innerType?._zod?.propValues),j(e,`optin`,e=>e.innerType?._zod?.optin??void 0),j(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),fi=M(`$ZodCustom`,(e,t)=>{mn.init(e,t),N.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>pi(t,n,r,e));pi(i,n,r,e)}});function pi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ie(e))}}var mi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},hi=`~memo`,gi=[];function _i(e){return typeof e==`object`&&!!e}function vi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var yi=new WeakMap,bi=0,xi=1,Si=2;function Ci(e,t,n){let r=yi.get(e);if(r!==void 0)return r?Si:bi;if(t.has(e))return Si;t.add(e);let i=bi,a=e=>{if(i!==Si&&e?._zod){let r=Ci(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=bi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?xi:o.value?._zod?Ci(o.value,t,n):bi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ne(c);s(e?o(e,!0):xi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Ci(r,t,!1):xi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),wi(e,i)}function wi(e,t){return t!==xi&&yi.set(e,t===Si),t}function Ti(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Ei,Di=[],Oi={alloc(e,t,n){let r=Ei;if(!r)return n;Ei=void 0;let i={value:n,issues:null};return r.set(t.value,i),Di.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Ai(n,e.value))throw new mi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Ci(e,new Set,!1);if(i===bi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Si||r?n=!0:r=!0}let l=s.value;if(!_i(l))return t(s,c);let u=c[hi];u||(u={buckets:new WeakMap,backEdges:void 0},c[hi]=u);let d;i===c?d=a:(d=Ti(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...vi(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Ei=d;let p=Di.length,m=t(s,c);Ei=void 0;let h=Di.length>p?Di.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?vi(e.issues):gi),e)):(h&&(h.issues=m.issues.length?vi(m.issues):gi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ki(){return Oi}function Ai(e,t){let n=e[hi]?.backEdges;return n!==void 0&&_i(t)&&n.has(t)}var ji=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Fe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${k(e.values[0])}`:`Invalid option: expected one of ${h(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${h(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Mi(){return{localeError:ji()}}var Ni,Pi=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Fi(){return new Pi}(Ni=globalThis).__zod_globalRegistry??(Ni.__zod_globalRegistry=Fi());var Ii=globalThis.__zod_globalRegistry;function Li(e){return e.checks&&=[...e.checks],e}function Ri(e,t){return new e(Li({type:`string`,...O(t)}))}function zi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...O(t)})}function Bi(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...O(t)})}function Vi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...O(t)})}function Hi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...O(t)})}function Ui(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...O(t)})}function Wi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...O(t)})}function Gi(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...O(t)})}function Ki(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...O(t)})}function qi(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...O(t)})}function Ji(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...O(t)})}function Yi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...O(t)})}function Xi(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...O(t)})}function Zi(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...O(t)})}function Qi(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...O(t)})}function $i(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...O(t)})}function ea(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...O(t)})}function ta(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...O(t)})}function na(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...O(t)})}function ra(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...O(t)})}function ia(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...O(t)})}function aa(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...O(t)})}function oa(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...O(t)})}function sa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...O(t)})}function ca(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...O(t)})}function la(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...O(t)})}function ua(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...O(t)})}function da(e,t){return new e(Li({type:`number`,checks:[],...O(t)}))}function fa(e,t){return new e(Li({type:`number`,coerce:!0,checks:[],...O(t)}))}function pa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...O(t)})}function ma(e,t){return new e({type:`boolean`,...O(t)})}function ha(e,t){return new e({type:`undefined`,...O(t)})}function ga(e,t){return new e({type:`null`,...O(t)})}function _a(e){return new e({type:`any`})}function va(e){return new e({type:`unknown`})}function ya(e,t){return new e({type:`never`,...O(t)})}function ba(e,t){return new _n({check:`less_than`,...O(t),value:e,inclusive:!1})}function xa(e,t){return new _n({check:`less_than`,...O(t),value:e,inclusive:!0})}function Sa(e,t){return new vn({check:`greater_than`,...O(t),value:e,inclusive:!1})}function Ca(e,t){return new vn({check:`greater_than`,...O(t),value:e,inclusive:!0})}function wa(e,t){return new yn({check:`multiple_of`,...O(t),value:e})}function Ta(e,t){return new xn({check:`max_length`,...O(t),maximum:e})}function Ea(e,t){return new Sn({check:`min_length`,...O(t),minimum:e})}function Da(e,t){return new Cn({check:`length_equals`,...O(t),length:e})}function Oa(e,t){return new Tn({check:`string_format`,format:`regex`,...O(t),pattern:e})}function ka(e){return new En({check:`string_format`,format:`lowercase`,...O(e)})}function Aa(e){return new Dn({check:`string_format`,format:`uppercase`,...O(e)})}function ja(e,t){return new On({check:`string_format`,format:`includes`,...O(t),includes:e})}function Ma(e,t){return new kn({check:`string_format`,format:`starts_with`,...O(t),prefix:e})}function Na(e,t){return new An({check:`string_format`,format:`ends_with`,...O(t),suffix:e})}function Pa(e){return new jn({check:`overwrite`,tx:e})}function Fa(e){return Pa(t=>t.normalize(e))}function Ia(){return Pa(e=>e.trim())}function La(){return Pa(e=>e.toLowerCase())}function Ra(){return Pa(e=>e.toUpperCase())}function za(){return Pa(e=>oe(e))}function Ba(e,t,n){return new e({type:`array`,element:t,...O(n)})}function Va(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...O(n)})}function Ha(e,t){let n=Ua(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ie(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ie(r))}},e(t.value,t)),t);return n}function Ua(e,t){let n=new mn({check:`custom`,...O(t)});return n._zod.check=e,n}function Wa(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&S(e,t,n[t]);return e}function Ga(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ii,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Ka(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function F(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,F(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Wa(o.schema,c),t.io===`input`&&no(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function qa(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ja(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${qa(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+qa(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
1535
|
+
|
|
1536
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ya(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ya(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Xa=new Set([`type`,`properties`,`required`,`additionalProperties`]),Za=[`oneOf`,`anyOf`];function Qa(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function $a(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Xa.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Qa(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}S(n,r,e.length===1?e[0]:$a(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Qa(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function eo(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Xa)if(t in e)return;let n=t.filter(e=>Za.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=$a(t);else{let e=n[0],i=Za.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>$a([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Wa(e,r))}function to(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Wa(i,s),Wa(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ya(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])eo(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Wa(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,S(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:io(t,`input`,e.processors),output:io(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function no(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return no(r.element,n);if(r.type===`set`)return no(r.valueType,n);if(r.type===`lazy`)return no(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return no(r.innerType,n);if(r.type===`intersection`)return no(r.left,n)||no(r.right,n);if(r.type===`record`||r.type===`map`)return no(r.keyType,n)||no(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:no(r.in,n)||no(r.out,n);if(r.type===`object`){for(let e in r.shape)if(no(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(no(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(no(e,n))return!0;return!!(r.rest&&no(r.rest,n))}return!1}var ro=(e,t={})=>n=>{let r=Ga({...n,processors:t});return F(e,r),Ja(r,e),to(r,e)},io=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Ga({...i??{},target:a,io:t,processors:n});return F(e,o),Ja(o,e),to(o,e)},ao=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},oo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},so=(e,t)=>{ao(e,`minimum`,t),oo(e,`maximum`,t)},co=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},lo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},uo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},fo=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},po=(e,t)=>ao(e,`minimum`,t.minimum),mo=(e,t)=>oo(e,`maximum`,t.maximum),ho=e=>(t,n)=>{fo(t,n.format);let[r,i]=e[n.format];ao(t,`minimum`,r),oo(t,`maximum`,i)},go={greater_than:(e,t)=>ao(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>oo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>co(e,t.value),number_format:ho(he),bigint_format:ho(ge),min_length:po,max_length:mo,length_equals:(e,t)=>so(e,t.length),min_size:po,max_size:mo,size_equals:(e,t)=>so(e,t.size),string_format:(e,t)=>{fo(e,t.format),t.pattern&&lo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>uo(e,t.mime)};function _o(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)go[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&ao(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&ao(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&oo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&oo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&co(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&uo(t,i.mime);for(let e of i.patterns??[])lo(t,e);return t}var vo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},yo=new Map([[mr,Yt],[gr,Xt]]),bo=e=>yo.get(e)??e,xo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=_o(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=vo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(bo);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},So=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=_o(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Ka(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Co=(e,t,n,r)=>{n.type=`boolean`},wo=(e,t,n,r)=>{Ka(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},To=(e,t,n,r)=>{Ka(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},Eo=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Do=(e,t,n,r)=>{Ka(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Oo=(e,t,n,r)=>{Ka(e,t,n,r,`Void cannot be represented in JSON Schema`)},ko=(e,t,n,r)=>{n.not={}},Ao=(e,t,n,r)=>{},jo=(e,t,n,r)=>{},Mo=(e,t,n,r)=>{Ka(e,t,n,r,`Date cannot be represented in JSON Schema`)},No=(e,t,n,r)=>{let i=e._zod.def,a=m(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},Po=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Ka(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Ka(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Fo=(e,t,n,r)=>{Ka(e,t,n,r,`NaN cannot be represented in JSON Schema`)},Io=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Lo=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=_o(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},Ro=(e,t,n,r)=>{n.type=`boolean`},zo=(e,t,n,r)=>{Ka(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Bo=(e,t,n,r)=>{Ka(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Vo=(e,t,n,r)=>{Ka(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Ho=(e,t,n,r)=>{Ka(e,t,n,r,`Map cannot be represented in JSON Schema`)},Uo=(e,t,n,r)=>{Ka(e,t,n,r,`Set cannot be represented in JSON Schema`)},Wo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=_o(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=F(a.element,t,{...r,path:[...r.path,`items`]})};function Go(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Go(t.out):t.type===`catch`?Go(t.innerType):e._zod.optin}var Ko=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Ka(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)S(i.properties,e,F(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Go(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=F(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},qo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>F(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Jo=(e,t,n,r)=>{let i=e._zod.def,a=F(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=F(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Yo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>F(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?F(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?Go(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=_o(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function Xo(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Xo(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Xo(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?cn:sn).source)),p}var Zo=new WeakMap;function Qo(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Zo.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Xo(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var $o=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=_o(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=F(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)S(i.patternProperties,bo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=F(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Zo.get(t);n||(n=[],Zo.set(t,n),t.deferred.push(()=>Qo(t))),n.push(e)}i.additionalProperties=F(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Go(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},es=(e,t,n,r)=>{let i=e._zod.def,a=F(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ts=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ns=Symbol();function rs(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Ka(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),ns):JSON.parse(o)}var is=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=rs(i.defaultValue,e,t,n,r);o!==ns&&(n.default=o)},as=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=rs(i.defaultValue,e,t,n,r);o!==ns&&(n._prefault=o)},os=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Ka(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ss=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;F(o,t,r);let s=t.seen.get(e);s.ref=o},cs=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ls=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},us=(e,t,n,r)=>{let i=e._zod.def;F(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ds=(e,t,n,r)=>{let i=e._zod.innerType;F(i,t,r);let a=t.seen.get(e);a.ref=i},fs={string:xo,number:So,boolean:Co,bigint:wo,symbol:To,null:Eo,undefined:Do,void:Oo,never:ko,any:Ao,unknown:jo,date:Mo,enum:No,literal:Po,nan:Fo,template_literal:Io,file:Lo,success:Ro,custom:zo,function:Bo,transform:Vo,map:Ho,set:Uo,array:Wo,object:Ko,union:qo,intersection:Jo,tuple:Yo,record:$o,nullable:es,nonoptional:ts,default:is,prefault:as,catch:os,pipe:ss,readonly:cs,promise:ls,optional:us,lazy:ds};function ps(e,t){if(`_idmap`in e){let n=e,r=Ga({...t,processors:fs}),i={};for(let e of n._idmap.entries()){let[t,n]=e;F(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Ja(r,n),S(a,t,to(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Ga({...t,processors:fs});return F(e,n),Ja(n,e),to(n,e)}var ms=new WeakSet([Object.prototype,Error.prototype]);function hs(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var gs=M(`ZodError`,(e,t)=>{lt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);ms.has(n)||(ms.add(n),hs(n,`format`,e=>t=>ft(e,t)),hs(n,`flatten`,e=>t=>dt(e,t)),hs(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,g,2)}),hs(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,g,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),_s=mt(gs),vs=ht(gs),ys=gt(gs),bs=vt(gs),xs=wt(gs),Ss=Tt(gs),Cs=Et(gs),ws=Dt(gs),Ts=Ot(gs),Es=kt(gs),Ds=At(gs),Os=jt(gs);function ks(){tt.localeError||nt(Mi())}function As(){tt.memoizer||nt({memoizer:ki()})}var I=M(`ZodType`,(e,t)=>(ks(),N.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(T(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return D(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Zc(e,t))},superRefine(e,t){return this.check(Qc(e,t))},overwrite(e){return this.check(Pa(e))},optional(){return J(this)},exactOptional(){return Mc(this)},nullable(){return Pc(this)},nullish(){return J(Pc(this))},nonoptional(e){return Bc(this,e)},array(){return V(this)},or(e){return W([this,e])},and(e){return wc(this,e)},transform(e){return Wc(this,kc(e))},default(e){return Ic(this,e)},prefault(e){return Rc(this,e)},catch(e){return Hc(this,e)},pipe(e){return Wc(this,e)},readonly(){return qc(this)},describe(e){let t=this.clone();return Ii.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ii.get(this);let t=this.clone();return Ii.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Re(this,`~standard`,{...In(this),jsonSchema:{input:io(this,`input`),output:io(this,`output`)}})},set"~standard"(e){A(this,`~standard`,e)},parse:function e(t,n){return _s(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await vs(this,t,n,{callee:e})},safeParse(e,t){return ys(this,e,t)},async safeParseAsync(e,t){return bs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){A(this,`spa`,e)},validate(e,t){return xt(this,e,t)},validateAsync(e,t){return Ct(this,e,t)},encode:function e(t,n){return xs(this,t,n,{callee:e})},decode:function e(t,n){return Ss(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Cs(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await ws(this,t,n,{callee:e})},safeEncode(e,t){return Ts(this,e,t)},safeDecode(e,t){return Es(this,e,t)},async safeEncodeAsync(e,t){return Ds(this,e,t)},async safeDecodeAsync(e,t){return Os(this,e,t)},toJSONSchema(e){return ro(this,{})(e)},get description(){return Ii.get(this)?.description},get _def(){return this._zod.def}}),js=M(`_ZodString`,(e,t)=>{Ln.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xo(e,t,n,r)},ze({format:e=>_o(e).format??null,minLength:e=>_o(e).minimum??null,maxLength:e=>_o(e).maximum??null},{regex(...e){return this.check(Oa(...e))},includes(...e){return this.check(ja(...e))},startsWith(...e){return this.check(Ma(...e))},endsWith(...e){return this.check(Na(...e))},min(...e){return this.check(Ea(...e))},max(...e){return this.check(Ta(...e))},length(...e){return this.check(Da(...e))},nonempty(...e){return this.check(Ea(1,...e))},lowercase(e){return this.check(ka(e))},uppercase(e){return this.check(Aa(e))},trim(){return this.check(Ia())},normalize(...e){return this.check(Fa(...e))},toLowerCase(){return this.check(La())},toUpperCase(){return this.check(Ra())},slugify(){return this.check(za())}})),Ms=M(`ZodString`,(e,t)=>{Ln.init(e,t),js.init(e,t)},{email(e){return this.check(zi(Rs,e))},url(e){return this.check(Gi(Hs,e))},jwt(e){return this.check(oa(ic,e))},emoji(e){return this.check(Ki(Ws,e))},guid(e){return this.check(Bi(Bs,e))},uuid(e){return this.check(Vi(Vs,e))},uuidv4(e){return this.check(Hi(Vs,e))},uuidv6(e){return this.check(Ui(Vs,e))},uuidv7(e){return this.check(Wi(Vs,e))},nanoid(e){return this.check(qi(Gs,e))},cuid(e){return this.check(Ji(Ks,e))},cuid2(e){return this.check(Yi(qs,e))},ulid(e){return this.check(Xi(Js,e))},base64(e){return this.check(ra(tc,e))},base64url(e){return this.check(ia(nc,e))},xid(e){return this.check(Zi(Ys,e))},ksuid(e){return this.check(Qi(Xs,e))},ipv4(e){return this.check($i(Zs,e))},ipv6(e){return this.check(ea(Qs,e))},cidrv4(e){return this.check(ta($s,e))},cidrv6(e){return this.check(na(ec,e))},e164(e){return this.check(aa(rc,e))},datetime(e){return this.check(sa(Ps,e))},date(e){return this.check(ca(Fs,e))},time(e){return this.check(la(Is,e))},duration(e){return this.check(ua(Ls,e))}});function L(e){return Ri(Ms,e)}var Ns=M(`ZodStringFormat`,(e,t)=>{P.init(e,t),js.init(e,t)}),Ps=M(`ZodISODateTime`,(e,t)=>{nr.init(e,t),Ns.init(e,t)}),Fs=M(`ZodISODate`,(e,t)=>{rr.init(e,t),Ns.init(e,t)}),Is=M(`ZodISOTime`,(e,t)=>{ir.init(e,t),Ns.init(e,t)}),Ls=M(`ZodISODuration`,(e,t)=>{ar.init(e,t),Ns.init(e,t)}),Rs=M(`ZodEmail`,(e,t)=>{Bn.init(e,t),Ns.init(e,t)});function zs(e){return zi(Rs,e)}var Bs=M(`ZodGUID`,(e,t)=>{Rn.init(e,t),Ns.init(e,t)}),Vs=M(`ZodUUID`,(e,t)=>{zn.init(e,t),Ns.init(e,t)}),Hs=M(`ZodURL`,(e,t)=>{Jn.init(e,t),Ns.init(e,t)});function Us(e){return Gi(Hs,e)}var Ws=M(`ZodEmoji`,(e,t)=>{Yn.init(e,t),Ns.init(e,t)}),Gs=M(`ZodNanoID`,(e,t)=>{Xn.init(e,t),Ns.init(e,t)}),Ks=M(`ZodCUID`,(e,t)=>{Zn.init(e,t),Ns.init(e,t)}),qs=M(`ZodCUID2`,(e,t)=>{Qn.init(e,t),Ns.init(e,t)}),Js=M(`ZodULID`,(e,t)=>{$n.init(e,t),Ns.init(e,t)}),Ys=M(`ZodXID`,(e,t)=>{er.init(e,t),Ns.init(e,t)}),Xs=M(`ZodKSUID`,(e,t)=>{tr.init(e,t),Ns.init(e,t)}),Zs=M(`ZodIPv4`,(e,t)=>{or.init(e,t),Ns.init(e,t)}),Qs=M(`ZodIPv6`,(e,t)=>{lr.init(e,t),Ns.init(e,t)}),$s=M(`ZodCIDRv4`,(e,t)=>{ur.init(e,t),Ns.init(e,t)}),ec=M(`ZodCIDRv6`,(e,t)=>{fr.init(e,t),Ns.init(e,t)}),tc=M(`ZodBase64`,(e,t)=>{hr.init(e,t),Ns.init(e,t)}),nc=M(`ZodBase64URL`,(e,t)=>{vr.init(e,t),Ns.init(e,t)}),rc=M(`ZodE164`,(e,t)=>{yr.init(e,t),Ns.init(e,t)}),ic=M(`ZodJWT`,(e,t)=>{xr.init(e,t),Ns.init(e,t)}),ac=M(`ZodNumber`,(e,t)=>{Sr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>So(e,t,n,r),e.isFinite=!0},ze({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=_o(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=_o(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=_o(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>_o(e).format??null},{gt(e,t){return this.check(Sa(e,t))},gte(e,t){return this.check(Ca(e,t))},min(e,t){return this.check(Ca(e,t))},lt(e,t){return this.check(ba(e,t))},lte(e,t){return this.check(xa(e,t))},max(e,t){return this.check(xa(e,t))},int(e){return this.check(sc(e))},safe(e){return this.check(sc(e))},positive(e){return this.check(Sa(0,e))},nonnegative(e){return this.check(Ca(0,e))},negative(e){return this.check(ba(0,e))},nonpositive(e){return this.check(xa(0,e))},multipleOf(e,t){return this.check(wa(e,t))},step(e,t){return this.check(wa(e,t))},finite(){return this}}));function R(e){return da(ac,e)}var oc=M(`ZodNumberFormat`,(e,t)=>{Cr.init(e,t),ac.init(e,t)});function sc(e){return pa(oc,e)}var cc=M(`ZodBoolean`,(e,t)=>{wr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Co(e,t,n,r)});function z(e){return ma(cc,e)}var lc=M(`ZodUndefined`,(e,t)=>{Tr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Do(e,t,n,r)});function uc(e){return ha(lc,e)}var dc=M(`ZodNull`,(e,t)=>{Er.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r)});function fc(e){return ga(dc,e)}var pc=M(`ZodAny`,(e,t)=>{Dr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function mc(){return _a(pc)}var hc=M(`ZodUnknown`,(e,t)=>{Or.init(e,t),I.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function B(){return va(hc)}var gc=M(`ZodNever`,(e,t)=>{kr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r)});function _c(e){return ya(gc,e)}var vc=M(`ZodArray`,(e,t)=>{As(),jr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Ea(e,t))},nonempty(e){return this.check(Ea(1,e))},max(e,t){return this.check(Ta(e,t))},length(e,t){return this.check(Da(e,t))},unwrap(){return this.element}});function V(e,t){return Ba(vc,e,t)}var yc=M(`ZodObject`,(e,t)=>{As(),Lr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ko(e,t,n,r),Ge(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return K(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(T(this._zod.def,{catchall:e}))},passthrough(){return this.clone(T(this._zod.def,{catchall:B()}))},loose(){return this.clone(T(this._zod.def,{catchall:B()}))},strict(){return this.clone(T(this._zod.def,{catchall:_c()}))},strip(){return this.clone(T(this._zod.def,{catchall:void 0}))},extend(e){return be(this,e)},safeExtend(e){return Se(this,e)},merge(e){return Ce(this,e)},pick(e){return _e(this,e)},omit(e){return ye(this,e)},partial(...e){return we(Ac,this,e[0])},exactPartial(...e){return we(jc,this,e[0],`exactPartial`)},required(...e){return Te(zc,this,e[0])}});function H(e,t){return new yc({type:`object`,shape:e??{},...O(t)})}function U(e,t){return new yc({type:`object`,shape:e,catchall:B(),...O(t)})}var bc=M(`ZodUnion`,(e,t)=>{zr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r),e.options=t.options});function W(e,t){return new bc({type:`union`,options:e,...O(t)})}var xc=M(`ZodDiscriminatedUnion`,(e,t)=>{bc.init(e,t),Vr.init(e,t)});function Sc(e,t,n){return new xc({type:`union`,options:t,discriminator:e,...O(n)})}var Cc=M(`ZodIntersection`,(e,t)=>{Hr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r)});function wc(e,t){return new Cc({type:`intersection`,left:e,right:t})}var Tc=M(`ZodRecord`,(e,t)=>{As(),Gr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function G(e,t,n){return!t||!t._zod?new Tc({type:`record`,keyType:L(),valueType:e,...O(t)}):new Tc({type:`record`,keyType:e,valueType:t,...O(n)})}var Ec=M(`ZodEnum`,(e,t)=>{Kr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>No(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ec({...t,checks:[],...O(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ec({...t,checks:[],...O(r),entries:i})}});function K(e,t){return new Ec({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...O(t)})}var Dc=M(`ZodLiteral`,(e,t)=>{qr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Po(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function q(e,t){return new Dc({type:`literal`,values:Array.isArray(e)?e:[e],...O(t)})}var Oc=M(`ZodTransform`,(e,t)=>{As(),Jr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new et(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ie(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ie(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function kc(e){return new Oc({type:`transform`,transform:e})}var Ac=M(`ZodOptional`,(e,t)=>{Xr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>us(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function J(e){return new Ac({type:`optional`,innerType:e})}var jc=M(`ZodExactOptional`,(e,t)=>{Zr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>us(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mc(e){return new jc({type:`optional`,innerType:e})}var Nc=M(`ZodNullable`,(e,t)=>{Qr.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Pc(e){return new Nc({type:`nullable`,innerType:e})}var Fc=M(`ZodDefault`,(e,t)=>{$r.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ic(e,t){return new Fc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():de(t)}})}var Lc=M(`ZodPrefault`,(e,t)=>{ti.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>as(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Rc(e,t){return new Lc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():de(t)}})}var zc=M(`ZodNonOptional`,(e,t)=>{ni.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bc(e,t){return new zc({type:`nonoptional`,innerType:e,...O(t)})}var Vc=M(`ZodCatch`,(e,t)=>{ai.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Hc(e,t){return new Vc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:qe(t)})}var Uc=M(`ZodPipe`,(e,t)=>{oi.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r),e.in=t.in,e.out=t.out});function Wc(e,t){return new Uc({type:`pipe`,in:e,out:t})}var Gc=M(`ZodPreprocess`,(e,t)=>{Uc.init(e,t),ci.init(e,t)}),Kc=M(`ZodReadonly`,(e,t)=>{li.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qc(e){return new Kc({type:`readonly`,innerType:e})}var Jc=M(`ZodLazy`,(e,t)=>{di.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Yc(e){return new Jc({type:`lazy`,getter:e})}var Xc=M(`ZodCustom`,(e,t)=>{fi.init(e,t),I.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zo(e,t,n,r)});function Zc(e,t={}){return Va(Xc,e,t)}function Qc(e,t){return Ha(e,t)}function $c(e,t){return new Gc({type:`pipe`,in:kc(e),out:t})}var el={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`},tl;tl||={};function nl(e){return sa(Ps,e)}function rl(e){return ca(Fs,e)}function il(e){return fa(ac,e)}var al=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],ol=`io.modelcontextprotocol/related-task`,sl=`io.modelcontextprotocol/protocolVersion`,cl=`io.modelcontextprotocol/clientInfo`,ll=`io.modelcontextprotocol/serverInfo`,ul=`io.modelcontextprotocol/clientCapabilities`,dl=`io.modelcontextprotocol/subscriptionId`,fl=`io.modelcontextprotocol/logLevel`,pl=Yc(()=>W([L(),R(),z(),fc(),G(L(),pl),V(pl)])),ml=G(L(),pl),hl=V(pl),gl=W([L(),R().int()]),_l=L(),vl=H({ttl:R().optional()}),yl=H({taskId:L()}),bl=U({progressToken:gl.optional(),[ol]:yl.optional()}),xl=H({_meta:bl.optional()}),Sl=xl.extend({task:vl.optional()}),Cl=H({method:L(),params:xl.loose().optional()}),wl=H({_meta:bl.optional()}),Tl=H({method:L(),params:wl.loose().optional()}),El=U({get[ll](){return Vl.optional().catch(void 0)}}),Dl=U({_meta:El.optional()}),Ol=W([L(),R().int()]),kl=H({jsonrpc:q(`2.0`),id:Ol,...Cl.shape}).strict(),Al=H({jsonrpc:q(`2.0`),...Tl.shape}).strict(),jl=H({jsonrpc:q(`2.0`),id:Ol,result:Dl}).strict(),Ml=H({jsonrpc:q(`2.0`),id:Ol.optional(),error:H({code:R().int(),message:L(),data:B().optional()})}).strict(),Nl=W([kl,Al,jl,Ml]),Pl=W([jl,Ml]),Fl=Dl.strict(),Il=wl.extend({requestId:Ol.optional(),reason:L().optional()}),Ll=Tl.extend({method:q(`notifications/cancelled`),params:Il}),Rl=H({src:L(),mimeType:L().optional(),sizes:V(L()).optional(),theme:K([`light`,`dark`]).optional()}),zl=H({icons:V(Rl).optional()}),Bl=H({name:L(),title:L().optional()}),Vl=Bl.extend({...Bl.shape,...zl.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),Hl=$c(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,wc(H({form:wc(H({applyDefaults:z().optional()}),ml).optional(),url:ml.optional()}),ml.optional())),Ul=U({list:ml.optional(),cancel:ml.optional(),requests:U({sampling:U({createMessage:ml.optional()}).optional(),elicitation:U({create:ml.optional()}).optional()}).optional()}),Wl=U({list:ml.optional(),cancel:ml.optional(),requests:U({tools:U({call:ml.optional()}).optional()}).optional()}),Gl=H({experimental:G(L(),ml).optional(),sampling:H({context:ml.optional(),tools:ml.optional()}).optional(),elicitation:Hl.optional(),roots:H({listChanged:z().optional()}).optional(),tasks:Ul.optional(),extensions:G(L(),ml).optional()}),Kl=xl.extend({protocolVersion:L(),capabilities:Gl,clientInfo:Vl}),ql=Cl.extend({method:q(`initialize`),params:Kl}),Jl=H({experimental:G(L(),ml).optional(),logging:ml.optional(),completions:ml.optional(),prompts:H({listChanged:z().optional()}).optional(),resources:H({subscribe:z().optional(),listChanged:z().optional()}).optional(),tools:H({listChanged:z().optional()}).optional(),tasks:Wl.optional(),extensions:G(L(),ml).optional()}),Yl=Dl.extend({protocolVersion:L(),capabilities:Jl,serverInfo:Vl,instructions:L().optional()}),Xl=Tl.extend({method:q(`notifications/initialized`),params:wl.optional()}),Zl=Cl.extend({method:q(`server/discover`),params:xl.optional()}),Ql=Dl.extend({supportedVersions:V(L()),capabilities:Jl,instructions:L().optional()}),$l=Cl.extend({method:q(`ping`),params:xl.optional()}),eu=H({progress:R(),total:J(R()),message:J(L())}),tu=H({...wl.shape,...eu.shape,progressToken:gl}),nu=Tl.extend({method:q(`notifications/progress`),params:tu}),ru=xl.extend({cursor:_l.optional()}),iu=Cl.extend({params:ru.optional()}),au=Dl.extend({nextCursor:_l.optional()}),ou=H({uri:L(),mimeType:J(L()),_meta:G(L(),B()).optional()}),su=ou.extend({text:L()}),cu=L().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),lu=ou.extend({blob:cu}),uu=K([`user`,`assistant`]),du=H({audience:V(uu).optional(),priority:R().min(0).max(1).optional(),lastModified:nl({offset:!0}).optional()}),fu=H({...Bl.shape,...zl.shape,uri:L(),description:J(L()),mimeType:J(L()),size:J(R()),annotations:du.optional(),_meta:J(U({}))}),pu=H({...Bl.shape,...zl.shape,uriTemplate:L(),description:J(L()),mimeType:J(L()),annotations:du.optional(),_meta:J(U({}))}),mu=iu.extend({method:q(`resources/list`)}),hu=au.extend({resources:V(fu)}),gu=iu.extend({method:q(`resources/templates/list`)}),_u=au.extend({resourceTemplates:V(pu)}),vu=xl.extend({uri:L()}),yu=vu,bu=Cl.extend({method:q(`resources/read`),params:yu}),xu=Dl.extend({contents:V(W([su,lu]))}),Su=Tl.extend({method:q(`notifications/resources/list_changed`),params:wl.optional()}),Cu=vu,wu=Cl.extend({method:q(`resources/subscribe`),params:Cu}),Tu=vu,Eu=Cl.extend({method:q(`resources/unsubscribe`),params:Tu}),Du=H({toolsListChanged:z().optional(),promptsListChanged:z().optional(),resourcesListChanged:z().optional(),resourceSubscriptions:V(L()).optional()}),Ou=xl.extend({notifications:Du}),ku=Cl.extend({method:q(`subscriptions/listen`),params:Ou}),Au=wl.extend({notifications:Du}),ju=Tl.extend({method:q(`notifications/subscriptions/acknowledged`),params:Au}),Mu=El.extend({[dl]:Ol}),Nu=Dl.extend({_meta:Mu}),Pu=wl.extend({uri:L()}),Fu=Tl.extend({method:q(`notifications/resources/updated`),params:Pu}),Iu=H({name:L(),description:J(L()),required:J(z())}),Lu=H({...Bl.shape,...zl.shape,description:J(L()),arguments:J(V(Iu)),_meta:J(U({}))}),Ru=iu.extend({method:q(`prompts/list`)}),zu=au.extend({prompts:V(Lu)}),Bu=xl.extend({name:L(),arguments:G(L(),L()).optional()}),Vu=Cl.extend({method:q(`prompts/get`),params:Bu}),Hu=H({type:q(`text`),text:L(),annotations:du.optional(),_meta:G(L(),B()).optional()}),Uu=H({type:q(`image`),data:cu,mimeType:L(),annotations:du.optional(),_meta:G(L(),B()).optional()}),Wu=H({type:q(`audio`),data:cu,mimeType:L(),annotations:du.optional(),_meta:G(L(),B()).optional()}),Gu=H({type:q(`tool_use`),name:L(),id:L(),input:G(L(),B()),_meta:G(L(),B()).optional()}),Ku=H({type:q(`resource`),resource:W([su,lu]),annotations:du.optional(),_meta:G(L(),B()).optional()}),qu=fu.extend({type:q(`resource_link`)}),Ju=W([Hu,Uu,Wu,qu,Ku]),Yu=H({role:uu,content:Ju}),Xu=Dl.extend({description:L().optional(),messages:V(Yu)}),Zu=Tl.extend({method:q(`notifications/prompts/list_changed`),params:wl.optional()}),Qu=H({title:L().optional(),readOnlyHint:z().optional(),destructiveHint:z().optional(),idempotentHint:z().optional(),openWorldHint:z().optional()}),$u=H({taskSupport:K([`required`,`optional`,`forbidden`]).optional()}),ed=H({...Bl.shape,...zl.shape,description:L().optional(),inputSchema:H({type:q(`object`),properties:G(L(),pl).optional(),required:V(L()).optional()}).catchall(B()),outputSchema:U({$schema:L().optional()}).optional(),annotations:Qu.optional(),execution:$u.optional(),_meta:G(L(),B()).optional()}),td=iu.extend({method:q(`tools/list`)}),nd=au.extend({tools:V(ed)}),rd=Dl.extend({content:V(Ju).default([]),structuredContent:B().optional(),isError:z().optional()}),id=rd.or(Dl.extend({toolResult:B()})),ad=Sl.extend({name:L(),arguments:G(L(),B()).optional()}),od=Cl.extend({method:q(`tools/call`),params:ad}),sd=Tl.extend({method:q(`notifications/tools/list_changed`),params:wl.optional()}),cd=H({autoRefresh:z().default(!0),debounceMs:R().int().nonnegative().default(300)}),ld=K([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),ud=xl.extend({level:ld}),dd=Cl.extend({method:q(`logging/setLevel`),params:ud}),fd=wl.extend({level:ld,logger:L().optional(),data:B()}),pd=Tl.extend({method:q(`notifications/message`),params:fd}),md=H({name:L().optional()}),hd=H({hints:V(md).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),gd=H({mode:K([`auto`,`required`,`none`]).optional()}),_d=H({type:q(`tool_result`),toolUseId:L().describe(`The unique identifier for the corresponding tool call.`),content:V(Ju),structuredContent:B().optional(),isError:z().optional(),_meta:G(L(),B()).optional()}),vd=Sc(`type`,[Hu,Uu,Wu]),yd=Sc(`type`,[Hu,Uu,Wu,Gu,_d]),bd=H({role:uu,content:W([yd,V(yd)]),_meta:G(L(),B()).optional()}),xd=Sl.extend({messages:V(bd),modelPreferences:hd.optional(),systemPrompt:L().optional(),includeContext:K([`none`,`thisServer`,`allServers`]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:V(L()).optional(),metadata:ml.optional(),tools:V(ed).optional(),toolChoice:gd.optional()}),Sd=Cl.extend({method:q(`sampling/createMessage`),params:xd}),Cd=Dl.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`]).or(L())),role:uu,content:vd}),wd=Dl.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(L())),role:uu,content:W([yd,V(yd)])}),Td=H({type:q(`boolean`),title:L().optional(),description:L().optional(),default:z().optional()}),Ed=H({type:q(`string`),title:L().optional(),description:L().optional(),minLength:R().optional(),maxLength:R().optional(),format:K([`email`,`uri`,`date`,`date-time`]).optional(),default:L().optional()}),Dd=H({type:K([`number`,`integer`]),title:L().optional(),description:L().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),Od=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),default:L().optional()}),kd=H({type:q(`string`),title:L().optional(),description:L().optional(),oneOf:V(H({const:L(),title:L()})),default:L().optional()}),Ad=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),enumNames:V(L()).optional(),default:L().optional()}),jd=W([Od,kd]),Md=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({type:q(`string`),enum:V(L())}),default:V(L()).optional()}),Nd=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({anyOf:V(H({const:L(),title:L()}))}),default:V(L()).optional()}),Pd=W([Md,Nd]),Fd=W([Ad,jd,Pd]),Id=W([Fd,Td,Ed,Dd]),Ld=Sl.extend({mode:q(`form`).optional(),message:L(),requestedSchema:H({type:q(`object`),properties:G(L(),Id),required:V(L()).optional()}).catchall(B())}),Rd=Sl.extend({mode:q(`url`),message:L(),elicitationId:L(),url:L().url()}),zd=W([Ld,Rd]),Bd=Cl.extend({method:q(`elicitation/create`),params:zd}),Vd=wl.extend({elicitationId:L()}),Hd=Tl.extend({method:q(`notifications/elicitation/complete`),params:Vd}),Ud=Dl.extend({action:K([`accept`,`decline`,`cancel`]),content:$c(e=>e===null?void 0:e,G(L(),W([L(),R(),z(),V(L())])).optional())}),Wd=H({type:q(`ref/resource`),uri:L()}),Gd=H({type:q(`ref/prompt`),name:L()}),Kd=xl.extend({ref:W([Gd,Wd]),argument:H({name:L(),value:L()}),context:H({arguments:G(L(),L()).optional()}).optional()}),qd=Cl.extend({method:q(`completion/complete`),params:Kd}),Jd=Dl.extend({completion:U({values:V(L()).max(100),total:J(R().int()),hasMore:J(z())})}),Yd=H({uri:L().startsWith(`file://`),name:L().optional(),_meta:G(L(),B()).optional()}),Xd=Cl.extend({method:q(`roots/list`),params:xl.optional()}),Zd=Dl.extend({roots:V(Yd)}),Qd=Tl.extend({method:q(`notifications/roots/list_changed`),params:wl.optional()}),$d=U({ttl:R().optional(),pollInterval:R().optional()}),ef=K([`working`,`input_required`,`completed`,`failed`,`cancelled`]),tf=H({taskId:L(),status:ef,ttl:W([R(),fc()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:J(R()),statusMessage:J(L())}),nf=Dl.extend({task:tf}),rf=wl.merge(tf),af=Tl.extend({method:q(`notifications/tasks/status`),params:rf}),of=Cl.extend({method:q(`tasks/get`),params:xl.extend({taskId:L()})}),sf=Dl.merge(tf),cf=Cl.extend({method:q(`tasks/result`),params:xl.extend({taskId:L()})}),lf=Dl.loose(),uf=iu.extend({method:q(`tasks/list`)}),df=au.extend({tasks:V(tf)}),ff=Cl.extend({method:q(`tasks/cancel`),params:xl.extend({taskId:L()})}),pf=Dl.merge(tf),mf=W([$l,ql,Zl,qd,dd,Vu,Ru,mu,gu,bu,wu,Eu,ku,od,td]),hf=W([Ll,nu,Xl,Qd]),gf=W([Fl,Cd,wd,Ud,Zd]),_f=W([$l,Sd,Bd,Xd]),vf=W([Ll,nu,pd,Fu,Su,sd,Zu,ju,Hd]),yf=W([Fl,Yl,Ql,Jd,Xu,zu,hu,_u,xu,rd,nd,Nu]),bf=Us().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:el.custom,message:`URL must be parseable`,fatal:!0}),Ye}).refine(e=>{let t=new URL(e);return t.protocol!==`javascript:`&&t.protocol!==`data:`&&t.protocol!==`vbscript:`},{message:`URL cannot use javascript:, data:, or vbscript: scheme`}),xf=U({resource:L().url(),authorization_servers:V(bf).optional(),jwks_uri:L().url().optional(),scopes_supported:V(L()).optional(),bearer_methods_supported:V(L()).optional(),resource_signing_alg_values_supported:V(L()).optional(),resource_name:L().optional(),resource_documentation:L().optional(),resource_policy_uri:L().url().optional(),resource_tos_uri:L().url().optional(),tls_client_certificate_bound_access_tokens:z().optional(),authorization_details_types_supported:V(L()).optional(),dpop_signing_alg_values_supported:V(L()).optional(),dpop_bound_access_tokens_required:z().optional()}),Sf=U({issuer:L(),authorization_endpoint:bf,token_endpoint:bf,registration_endpoint:bf.optional(),scopes_supported:V(L()).optional(),response_types_supported:V(L()),response_modes_supported:V(L()).optional(),grant_types_supported:V(L()).optional(),token_endpoint_auth_methods_supported:V(L()).optional(),token_endpoint_auth_signing_alg_values_supported:V(L()).optional(),service_documentation:bf.optional(),revocation_endpoint:bf.optional(),revocation_endpoint_auth_methods_supported:V(L()).optional(),revocation_endpoint_auth_signing_alg_values_supported:V(L()).optional(),introspection_endpoint:L().optional(),introspection_endpoint_auth_methods_supported:V(L()).optional(),introspection_endpoint_auth_signing_alg_values_supported:V(L()).optional(),code_challenge_methods_supported:V(L()).optional(),client_id_metadata_document_supported:z().optional(),authorization_response_iss_parameter_supported:z().optional().catch(void 0),dpop_signing_alg_values_supported:V(L()).optional()}),Cf=U({issuer:L(),authorization_endpoint:bf,token_endpoint:bf,userinfo_endpoint:bf.optional(),jwks_uri:bf,registration_endpoint:bf.optional(),scopes_supported:V(L()).optional(),response_types_supported:V(L()),response_modes_supported:V(L()).optional(),grant_types_supported:V(L()).optional(),acr_values_supported:V(L()).optional(),subject_types_supported:V(L()),id_token_signing_alg_values_supported:V(L()),id_token_encryption_alg_values_supported:V(L()).optional(),id_token_encryption_enc_values_supported:V(L()).optional(),userinfo_signing_alg_values_supported:V(L()).optional(),userinfo_encryption_alg_values_supported:V(L()).optional(),userinfo_encryption_enc_values_supported:V(L()).optional(),request_object_signing_alg_values_supported:V(L()).optional(),request_object_encryption_alg_values_supported:V(L()).optional(),request_object_encryption_enc_values_supported:V(L()).optional(),token_endpoint_auth_methods_supported:V(L()).optional(),token_endpoint_auth_signing_alg_values_supported:V(L()).optional(),display_values_supported:V(L()).optional(),claim_types_supported:V(L()).optional(),claims_supported:V(L()).optional(),service_documentation:L().optional(),claims_locales_supported:V(L()).optional(),ui_locales_supported:V(L()).optional(),claims_parameter_supported:z().optional(),request_parameter_supported:z().optional(),request_uri_parameter_supported:z().optional(),require_request_uri_registration:z().optional(),op_policy_uri:bf.optional(),op_tos_uri:bf.optional(),client_id_metadata_document_supported:z().optional(),authorization_response_iss_parameter_supported:z().optional().catch(void 0)}),wf=H({...Cf.shape,...Sf.pick({code_challenge_methods_supported:!0}).shape}),Tf=H({access_token:L(),id_token:L().optional(),token_type:L(),expires_in:il().optional(),scope:L().optional(),refresh_token:L().optional(),issuer:L().optional().catch(void 0)}).strip(),Ef=H({issued_token_type:q(`urn:ietf:params:oauth:token-type:id-jag`),access_token:L(),token_type:L().optional(),expires_in:R().optional(),scope:L().optional()}).strip(),Df=H({error:L(),error_description:L().optional(),error_uri:L().optional()}),Of=bf.optional().or(q(``).transform(()=>void 0)),kf=H({redirect_uris:V(bf),token_endpoint_auth_method:L().optional(),grant_types:V(L()).optional(),response_types:V(L()).optional(),application_type:L().optional(),client_name:L().optional(),client_uri:bf.optional(),logo_uri:Of,scope:L().optional(),contacts:V(L()).optional(),tos_uri:Of,policy_uri:L().optional(),jwks_uri:bf.optional(),jwks:mc().optional(),software_id:L().optional(),software_version:L().optional(),software_statement:L().optional()}).strip(),Af=H({client_id:L(),client_secret:L().optional(),client_id_issued_at:R().optional(),client_secret_expires_at:R().optional(),issuer:L().optional().catch(void 0)}).strip(),jf=kf.merge(Af),Mf=H({error:L(),error_description:L().optional()}).strip(),Nf=H({token:L(),token_type_hint:L().optional()}).strip(),Pf=Symbol.for(`mcp.sdk.errorBrands`);function Ff(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Pf,{value:n,enumerable:!1,configurable:!0})}function If(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Pf)){let n=t[Pf];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return If(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return If(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Ff(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var Lf=function(e){return e.NotConnected=`NOT_CONNECTED`,e.AlreadyConnected=`ALREADY_CONNECTED`,e.NotInitialized=`NOT_INITIALIZED`,e.CapabilityNotSupported=`CAPABILITY_NOT_SUPPORTED`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.ConnectionClosed=`CONNECTION_CLOSED`,e.SendFailed=`SEND_FAILED`,e.InvalidResult=`INVALID_RESULT`,e.UnsupportedResultType=`UNSUPPORTED_RESULT_TYPE`,e.InputRequiredRoundsExceeded=`INPUT_REQUIRED_ROUNDS_EXCEEDED`,e.ListPaginationExceeded=`LIST_PAGINATION_EXCEEDED`,e.MethodNotSupportedByProtocolVersion=`METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION`,e.EraNegotiationFailed=`ERA_NEGOTIATION_FAILED`,e.ClientHttpNotImplemented=`CLIENT_HTTP_NOT_IMPLEMENTED`,e.ClientHttpAuthentication=`CLIENT_HTTP_AUTHENTICATION`,e.ClientHttpForbidden=`CLIENT_HTTP_FORBIDDEN`,e.ClientHttpUnexpectedContent=`CLIENT_HTTP_UNEXPECTED_CONTENT`,e.ClientHttpFailedToOpenStream=`CLIENT_HTTP_FAILED_TO_OPEN_STREAM`,e.ClientHttpFailedToTerminateSession=`CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION`,e}({}),Rf=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return If(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return If(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,Ff(this,new.target)}};(class extends Rf{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}});var zf=`2026-07-28`;function Bf(e){return e>=zf}function Vf(e){let t=e.structuredContent;return t===void 0||typeof t==`object`&&t&&!Array.isArray(t)||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var Hf=[`task`,`inputRequests`,`requestState`];function Uf(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Hf.some(t=>t in e)?e:{...e,content:[]}}function Wf(){let e=Yc(()=>W([L(),R(),z(),fc(),G(L(),e),V(e)])),t=G(L(),e),n=W([L(),R().int()]),r=L(),i=H({ttl:R().optional()}),a=H({taskId:L()}),o=U({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=H({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=H({method:L(),params:s.loose().optional()}),u=H({_meta:o.optional()}),d=H({method:L(),params:u.loose().optional()}),f=U({_meta:o.optional()}),p=W([L(),R().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:L().optional()}),g=d.extend({method:q(`notifications/cancelled`),params:h}),_=H({src:L(),mimeType:L().optional(),sizes:V(L()).optional(),theme:K([`light`,`dark`]).optional()}),v=H({icons:V(_).optional()}),y=H({name:L(),title:L().optional()}),b=y.extend({...y.shape,...v.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),ee=$c(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,wc(H({form:wc(H({applyDefaults:z().optional()}),t).optional(),url:t.optional()}),t.optional())),x=U({list:t.optional(),cancel:t.optional(),requests:U({sampling:U({createMessage:t.optional()}).optional(),elicitation:U({create:t.optional()}).optional()}).optional()}),te=U({list:t.optional(),cancel:t.optional(),requests:U({tools:U({call:t.optional()}).optional()}).optional()}),S=H({experimental:G(L(),t).optional(),sampling:H({context:t.optional(),tools:t.optional()}).optional(),elicitation:ee.optional(),roots:H({listChanged:z().optional()}).optional(),tasks:x.optional(),extensions:G(L(),t).optional()}),ne=s.extend({protocolVersion:L(),capabilities:S,clientInfo:b}),re=l.extend({method:q(`initialize`),params:ne}),C=H({experimental:G(L(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:H({listChanged:z().optional()}).optional(),resources:H({subscribe:z().optional(),listChanged:z().optional()}).optional(),tools:H({listChanged:z().optional()}).optional(),tasks:te.optional(),extensions:G(L(),t).optional()}),ie=f.extend({protocolVersion:L(),capabilities:C,serverInfo:b,instructions:L().optional()}),w=d.extend({method:q(`notifications/initialized`),params:u.optional()}),ae=l.extend({method:q(`ping`),params:s.optional()}),T=H({progress:R(),total:J(R()),message:J(L())}),E=H({...u.shape,...T.shape,progressToken:n}),oe=d.extend({method:q(`notifications/progress`),params:E}),se=s.extend({cursor:r.optional()}),ce=l.extend({params:se.optional()}),le=f.extend({nextCursor:r.optional()}),ue=H({uri:L(),mimeType:J(L()),_meta:G(L(),B()).optional()}),de=ue.extend({text:L()}),fe=L().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),pe=ue.extend({blob:fe}),D=K([`user`,`assistant`]),O=H({audience:V(D).optional(),priority:R().min(0).max(1).optional(),lastModified:nl({offset:!0}).optional()}),k=H({...y.shape,...v.shape,uri:L(),description:J(L()),mimeType:J(L()),size:J(R()),annotations:O.optional(),_meta:J(U({}))}),me=H({...y.shape,...v.shape,uriTemplate:L(),description:J(L()),mimeType:J(L()),annotations:O.optional(),_meta:J(U({}))}),he=ce.extend({method:q(`resources/list`)}),ge=le.extend({resources:V(k)}),_e=ce.extend({method:q(`resources/templates/list`)}),ve=le.extend({resourceTemplates:V(me)}),ye=s.extend({uri:L()}),be=ye,xe=l.extend({method:q(`resources/read`),params:be}),Se=f.extend({contents:V(W([de,pe]))}),Ce=d.extend({method:q(`notifications/resources/list_changed`),params:u.optional()}),we=ye,Te=l.extend({method:q(`resources/subscribe`),params:we}),Ee=ye,De=l.extend({method:q(`resources/unsubscribe`),params:Ee}),Oe=u.extend({uri:L()}),ke=d.extend({method:q(`notifications/resources/updated`),params:Oe}),Ae=H({name:L(),description:J(L()),required:J(z())}),je=H({...y.shape,...v.shape,description:J(L()),arguments:J(V(Ae)),_meta:J(U({}))}),Me=ce.extend({method:q(`prompts/list`)}),Ne=le.extend({prompts:V(je)}),Pe=s.extend({name:L(),arguments:G(L(),L()).optional()}),Fe=l.extend({method:q(`prompts/get`),params:Pe}),Ie=H({type:q(`text`),text:L(),annotations:O.optional(),_meta:G(L(),B()).optional()}),Le=H({type:q(`image`),data:fe,mimeType:L(),annotations:O.optional(),_meta:G(L(),B()).optional()}),A=H({type:q(`audio`),data:fe,mimeType:L(),annotations:O.optional(),_meta:G(L(),B()).optional()}),Re=H({type:q(`tool_use`),name:L(),id:L(),input:G(L(),B()),_meta:G(L(),B()).optional()}),ze=H({type:q(`resource`),resource:W([de,pe]),annotations:O.optional(),_meta:G(L(),B()).optional()}),Be=k.extend({type:q(`resource_link`)}),Ve=W([Ie,Le,A,Be,ze]),He=H({role:D,content:Ve}),Ue=f.extend({description:L().optional(),messages:V(He)}),We=d.extend({method:q(`notifications/prompts/list_changed`),params:u.optional()}),j=H({title:L().optional(),readOnlyHint:z().optional(),destructiveHint:z().optional(),idempotentHint:z().optional(),openWorldHint:z().optional()}),Ge=H({taskSupport:K([`required`,`optional`,`forbidden`]).optional()}),Ke=H({...y.shape,...v.shape,description:L().optional(),inputSchema:H({type:q(`object`),properties:G(L(),e).optional(),required:V(L()).optional()}).catchall(B()),outputSchema:H({type:q(`object`),properties:G(L(),e).optional(),required:V(L()).optional()}).catchall(B()).optional(),annotations:j.optional(),execution:Ge.optional(),_meta:G(L(),B()).optional()}),qe=ce.extend({method:q(`tools/list`)}),Je=le.extend({tools:V(Ke)}),Ye=f.extend({content:V(Ve),structuredContent:G(L(),B()).optional(),isError:z().optional()}),Xe=c.extend({name:L(),arguments:G(L(),B()).optional()}),Ze=l.extend({method:q(`tools/call`),params:Xe}),Qe=d.extend({method:q(`notifications/tools/list_changed`),params:u.optional()}),M=K([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),$e=s.extend({level:M}),et=l.extend({method:q(`logging/setLevel`),params:$e}),tt=u.extend({level:M,logger:L().optional(),data:B()}),nt=d.extend({method:q(`notifications/message`),params:tt}),rt=H({name:L().optional()}),it=H({hints:V(rt).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),at=H({mode:K([`auto`,`required`,`none`]).optional()}),ot=H({type:q(`tool_result`),toolUseId:L().describe(`The unique identifier for the corresponding tool call.`),content:V(Ve),structuredContent:H({}).loose().optional(),isError:z().optional(),_meta:G(L(),B()).optional()}),st=Sc(`type`,[Ie,Le,A]),ct=Sc(`type`,[Ie,Le,A,Re,ot]),lt=H({role:D,content:W([ct,V(ct)]),_meta:G(L(),B()).optional()}),ut=c.extend({messages:V(lt),modelPreferences:it.optional(),systemPrompt:L().optional(),includeContext:K([`none`,`thisServer`,`allServers`]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:V(L()).optional(),metadata:t.optional(),tools:V(Ke).optional(),toolChoice:at.optional()}),dt=l.extend({method:q(`sampling/createMessage`),params:ut}),ft=f.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`]).or(L())),role:D,content:st}),pt=f.extend({model:L(),stopReason:J(K([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(L())),role:D,content:W([ct,V(ct)])}),mt=H({type:q(`boolean`),title:L().optional(),description:L().optional(),default:z().optional()}),ht=H({type:q(`string`),title:L().optional(),description:L().optional(),minLength:R().optional(),maxLength:R().optional(),format:K([`email`,`uri`,`date`,`date-time`]).optional(),default:L().optional()}),gt=H({type:K([`number`,`integer`]),title:L().optional(),description:L().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),_t=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),default:L().optional()}),vt=H({type:q(`string`),title:L().optional(),description:L().optional(),oneOf:V(H({const:L(),title:L()})),default:L().optional()}),yt=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),enumNames:V(L()).optional(),default:L().optional()}),bt=W([_t,vt]),xt=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({type:q(`string`),enum:V(L())}),default:V(L()).optional()}),St=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({anyOf:V(H({const:L(),title:L()}))}),default:V(L()).optional()}),Ct=W([xt,St]),wt=W([yt,bt,Ct]),Tt=W([wt,mt,ht,gt]),Et=c.extend({mode:q(`form`).optional(),message:L(),requestedSchema:H({type:q(`object`),properties:G(L(),Tt),required:V(L()).optional()}).catchall(B())}),Dt=c.extend({mode:q(`url`),message:L(),elicitationId:L(),url:L().url()}),Ot=W([Et,Dt]),kt=l.extend({method:q(`elicitation/create`),params:Ot}),At=u.extend({elicitationId:L()}),jt=d.extend({method:q(`notifications/elicitation/complete`),params:At}),Mt=f.extend({action:K([`accept`,`decline`,`cancel`]),content:$c(e=>e===null?void 0:e,G(L(),W([L(),R(),z(),V(L())])).optional())}),Nt=H({type:q(`ref/resource`),uri:L()}),Pt=H({type:q(`ref/prompt`),name:L()}),Ft=s.extend({ref:W([Pt,Nt]),argument:H({name:L(),value:L()}),context:H({arguments:G(L(),L()).optional()}).optional()}),It=l.extend({method:q(`completion/complete`),params:Ft}),Lt=f.extend({completion:U({values:V(L()).max(100),total:J(R().int()),hasMore:J(z())})}),Rt=H({uri:L().startsWith(`file://`),name:L().optional(),_meta:G(L(),B()).optional()}),zt=l.extend({method:q(`roots/list`),params:s.optional()}),Bt=f.extend({roots:V(Rt)}),Vt=d.extend({method:q(`notifications/roots/list_changed`),params:u.optional()}),Ht=U({ttl:R().optional(),pollInterval:R().optional()}),Ut=K([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Wt=H({taskId:L(),status:Ut,ttl:W([R(),fc()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:J(R()),statusMessage:J(L())}),Gt=f.extend({task:Wt}),Kt=u.merge(Wt),qt=d.extend({method:q(`notifications/tasks/status`),params:Kt}),Jt=l.extend({method:q(`tasks/get`),params:s.extend({taskId:L()})}),Yt=f.merge(Wt),Xt=l.extend({method:q(`tasks/result`),params:s.extend({taskId:L()})}),Zt=f.loose(),Qt=ce.extend({method:q(`tasks/list`)}),$t=le.extend({tasks:V(Wt)}),en=l.extend({method:q(`tasks/cancel`),params:s.extend({taskId:L()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:b,ClientTasksCapabilitySchema:x,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:S,InitializeRequestParamsSchema:ne,InitializeRequestSchema:re,ServerCapabilitiesSchema:C,InitializeResultSchema:ie,InitializedNotificationSchema:w,PingRequestSchema:ae,ProgressSchema:T,ProgressNotificationParamsSchema:E,ProgressNotificationSchema:oe,PaginatedRequestParamsSchema:se,PaginatedRequestSchema:ce,PaginatedResultSchema:le,ResourceContentsSchema:ue,TextResourceContentsSchema:de,BlobResourceContentsSchema:pe,RoleSchema:D,AnnotationsSchema:O,ResourceSchema:k,ResourceTemplateSchema:me,ListResourcesRequestSchema:he,ListResourcesResultSchema:ge,ListResourceTemplatesRequestSchema:_e,ListResourceTemplatesResultSchema:ve,ResourceRequestParamsSchema:ye,ReadResourceRequestParamsSchema:be,ReadResourceRequestSchema:xe,ReadResourceResultSchema:Se,ResourceListChangedNotificationSchema:Ce,SubscribeRequestParamsSchema:we,SubscribeRequestSchema:Te,UnsubscribeRequestParamsSchema:Ee,UnsubscribeRequestSchema:De,ResourceUpdatedNotificationParamsSchema:Oe,ResourceUpdatedNotificationSchema:ke,PromptArgumentSchema:Ae,PromptSchema:je,ListPromptsRequestSchema:Me,ListPromptsResultSchema:Ne,GetPromptRequestParamsSchema:Pe,GetPromptRequestSchema:Fe,TextContentSchema:Ie,ImageContentSchema:Le,AudioContentSchema:A,ToolUseContentSchema:Re,EmbeddedResourceSchema:ze,ResourceLinkSchema:Be,ContentBlockSchema:Ve,PromptMessageSchema:He,GetPromptResultSchema:Ue,PromptListChangedNotificationSchema:We,ToolAnnotationsSchema:j,ToolExecutionSchema:Ge,ToolSchema:Ke,ListToolsRequestSchema:qe,ListToolsResultSchema:Je,CallToolResultSchema:Ye,CallToolRequestParamsSchema:Xe,CallToolRequestSchema:Ze,ToolListChangedNotificationSchema:Qe,LoggingLevelSchema:M,SetLevelRequestParamsSchema:$e,SetLevelRequestSchema:et,LoggingMessageNotificationParamsSchema:tt,LoggingMessageNotificationSchema:nt,ModelHintSchema:rt,ModelPreferencesSchema:it,ToolChoiceSchema:at,ToolResultContentSchema:ot,SamplingContentSchema:st,SamplingMessageContentBlockSchema:ct,SamplingMessageSchema:lt,CreateMessageRequestParamsSchema:ut,CreateMessageRequestSchema:dt,CreateMessageResultSchema:ft,CreateMessageResultWithToolsSchema:pt,BooleanSchemaSchema:mt,StringSchemaSchema:ht,NumberSchemaSchema:gt,UntitledSingleSelectEnumSchemaSchema:_t,TitledSingleSelectEnumSchemaSchema:vt,LegacyTitledEnumSchemaSchema:yt,SingleSelectEnumSchemaSchema:bt,UntitledMultiSelectEnumSchemaSchema:xt,TitledMultiSelectEnumSchemaSchema:St,MultiSelectEnumSchemaSchema:Ct,EnumSchemaSchema:wt,PrimitiveSchemaDefinitionSchema:Tt,ElicitRequestFormParamsSchema:Et,ElicitRequestURLParamsSchema:Dt,ElicitRequestParamsSchema:Ot,ElicitRequestSchema:kt,ElicitationCompleteNotificationParamsSchema:At,ElicitationCompleteNotificationSchema:jt,ElicitResultSchema:Mt,ResourceTemplateReferenceSchema:Nt,PromptReferenceSchema:Pt,CompleteRequestParamsSchema:Ft,CompleteRequestSchema:It,CompleteResultSchema:Lt,RootSchema:Rt,ListRootsRequestSchema:zt,ListRootsResultSchema:Bt,RootsListChangedNotificationSchema:Vt,TaskCreationParamsSchema:Ht,TaskStatusSchema:Ut,TaskSchema:Wt,CreateTaskResultSchema:Gt,TaskStatusNotificationParamsSchema:Kt,TaskStatusNotificationSchema:qt,GetTaskRequestSchema:Jt,GetTaskResultSchema:Yt,GetTaskPayloadRequestSchema:Xt,GetTaskPayloadResultSchema:Zt,ListTasksRequestSchema:Qt,ListTasksResultSchema:$t,CancelTaskRequestSchema:en,CancelTaskResultSchema:f.merge(Wt),ClientRequestSchema:W([ae,re,It,et,Fe,Me,he,_e,xe,Te,De,Ze,qe,Jt,Xt,Qt,en]),ClientNotificationSchema:W([g,oe,w,Vt,qt]),ClientResultSchema:W([m,ft,pt,Mt,Bt,Yt,$t,Gt]),ServerRequestSchema:W([ae,dt,kt,zt,Jt,Xt,Qt,en]),ServerNotificationSchema:W([g,oe,nt,ke,Ce,Qe,We,qt,jt]),ServerResultSchema:W([m,ie,Lt,Ue,Ne,ge,ve,Se,Ye,Je,Yt,$t,Gt]),CallToolResultWireSchema:B().superRefine((e,t)=>{if(typeof e==`object`&&e&&!Array.isArray(e)&&e.content===void 0){for(let n of Hf)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries '${n}' — another result family cannot default into an empty tools/call success`});return}}}).transform(Uf).pipe(Ye)}}var Gf;function Kf(){return Gf??=Wf()}function qf(e){return e.type!==`object`}var Jf=new Set([`const`,`enum`,`default`,`examples`]),Yf=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function Xf(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Zf(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(Xf(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=p(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&Xf(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:i[o]=Jf.has(o)?s:Yf.has(o)?r(s,!0):r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var Qf={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},$f={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},ep={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},tp;function np(){if(tp)return tp;let e=Kf();return tp={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},tp}function rp(e){return Object.prototype.hasOwnProperty.call(Qf,e)}function ip(e){return Object.prototype.hasOwnProperty.call($f,e)}function ap(e){return Object.prototype.hasOwnProperty.call(ep,e)}function op(e){return ap(e)?np().resultSchemas[e]:void 0}function sp(e){return rp(e)?np().requestSchemas[e]:void 0}function cp(e){return ip(e)?np().notificationSchemas[e]:void 0}Object.keys(Qf),Object.keys($f);function lp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function up(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var dp={ok:!1,reason:`not-in-era`};function fp(e){return lp(e)&&lp(e.outputSchema)&&qf(e.outputSchema)}function pp(e){return e}var mp={era:`2025-11-25`,hasRequestMethod:rp,hasNotificationMethod:ip,validateRequest:(e,t)=>up(sp(e),t),validateResult:(e,t)=>up(op(e),t),validateNotification:(e,t)=>up(cp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>dp,validateInputResponse:()=>dp,samplingResultVariant:((e,t)=>{let n=Kf();return up(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Vf(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&qf(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(lp(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:pp(e)}}return{kind:`complete`,result:pp(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>fp(e))?t:{...t,tools:n.map(e=>fp(e)?{...e,outputSchema:Zf(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function hp(){let e=Yc(()=>W([L(),R(),z(),fc(),G(L(),e),V(e)])),t=G(L(),e),n=W([L(),R().int()]),r=L(),i=W([L(),R().int()]),a=K([`user`,`assistant`]),o=K([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=L().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=H({ttl:R().optional()}),l=H({taskId:L()}),u=U({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=H({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=H({_meta:u.optional()}),m=H({method:L(),params:p.loose().optional()}),h=H({src:L(),mimeType:L().optional(),sizes:V(L()).optional(),theme:K([`light`,`dark`]).optional()}),g=H({icons:V(h).optional()}),_=H({name:L(),title:L().optional()}),v=_.extend({..._.shape,...g.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),y=$c(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,wc(H({form:wc(H({applyDefaults:z().optional()}),t).optional(),url:t.optional()}),t.optional())),b=U({list:t.optional(),cancel:t.optional(),requests:U({sampling:U({createMessage:t.optional()}).optional(),elicitation:U({create:t.optional()}).optional()}).optional()}),ee=U({list:t.optional(),cancel:t.optional(),requests:U({tools:U({call:t.optional()}).optional()}).optional()}),x=H({experimental:G(L(),t).optional(),sampling:H({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:H({listChanged:z().optional()}).optional(),tasks:b.optional(),extensions:G(L(),t).optional()}),te=H({experimental:G(L(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:H({listChanged:z().optional()}).optional(),resources:H({subscribe:z().optional(),listChanged:z().optional()}).optional(),tools:H({listChanged:z().optional()}).optional(),tasks:ee.optional(),extensions:G(L(),t).optional()}),S=H({progress:R(),total:J(R()),message:J(L())}),ne=H({...p.shape,...S.shape,progressToken:n}),re=m.extend({method:q(`notifications/progress`),params:ne}),C=p.extend({level:o,logger:L().optional(),data:B()}),ie=m.extend({method:q(`notifications/message`),params:C}),w=H({uri:L(),mimeType:J(L()),_meta:G(L(),B()).optional()}),ae=w.extend({text:L()}),T=w.extend({blob:s}),E=H({audience:V(a).optional(),priority:R().min(0).max(1).optional(),lastModified:nl({offset:!0}).optional()}),oe=H({..._.shape,...g.shape,uri:L(),description:J(L()),mimeType:J(L()),size:J(R()),annotations:E.optional(),_meta:J(U({}))}),se=H({..._.shape,...g.shape,uriTemplate:L(),description:J(L()),mimeType:J(L()),annotations:E.optional(),_meta:J(U({}))}),ce=m.extend({method:q(`notifications/resources/list_changed`),params:p.optional()}),le=p.extend({uri:L()}),ue=m.extend({method:q(`notifications/resources/updated`),params:le}),de=H({name:L(),description:J(L()),required:J(z())}),fe=H({..._.shape,...g.shape,description:J(L()),arguments:J(V(de)),_meta:J(U({}))}),pe=m.extend({method:q(`notifications/prompts/list_changed`),params:p.optional()}),D=H({type:q(`text`),text:L(),annotations:E.optional(),_meta:G(L(),B()).optional()}),O=H({type:q(`image`),data:s,mimeType:L(),annotations:E.optional(),_meta:G(L(),B()).optional()}),k=H({type:q(`audio`),data:s,mimeType:L(),annotations:E.optional(),_meta:G(L(),B()).optional()}),me=H({type:q(`tool_use`),name:L(),id:L(),input:G(L(),B()),_meta:G(L(),B()).optional()}),he=H({type:q(`resource`),resource:W([ae,T]),annotations:E.optional(),_meta:G(L(),B()).optional()}),ge=oe.extend({type:q(`resource_link`)}),_e=W([D,O,k,ge,he]),ve=H({role:a,content:_e}),ye=H({title:L().optional(),readOnlyHint:z().optional(),destructiveHint:z().optional(),idempotentHint:z().optional(),openWorldHint:z().optional()}),be=m.extend({method:q(`notifications/tools/list_changed`),params:p.optional()}),xe=H({name:L().optional()}),Se=H({hints:V(xe).optional(),costPriority:R().min(0).max(1).optional(),speedPriority:R().min(0).max(1).optional(),intelligencePriority:R().min(0).max(1).optional()}),Ce=H({mode:K([`auto`,`required`,`none`]).optional()}),we=H({type:q(`boolean`),title:L().optional(),description:L().optional(),default:z().optional()}),Te=H({type:q(`string`),title:L().optional(),description:L().optional(),minLength:R().optional(),maxLength:R().optional(),format:K([`email`,`uri`,`date`,`date-time`]).optional(),default:L().optional()}),Ee=H({type:K([`number`,`integer`]),title:L().optional(),description:L().optional(),minimum:R().optional(),maximum:R().optional(),default:R().optional()}),De=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),default:L().optional()}),Oe=H({type:q(`string`),title:L().optional(),description:L().optional(),oneOf:V(H({const:L(),title:L()})),default:L().optional()}),ke=H({type:q(`string`),title:L().optional(),description:L().optional(),enum:V(L()),enumNames:V(L()).optional(),default:L().optional()}),Ae=W([De,Oe]),je=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({type:q(`string`),enum:V(L())}),default:V(L()).optional()}),Me=H({type:q(`array`),title:L().optional(),description:L().optional(),minItems:R().optional(),maxItems:R().optional(),items:H({anyOf:V(H({const:L(),title:L()}))}),default:V(L()).optional()}),Ne=W([je,Me]),Pe=W([ke,Ae,Ne]),Fe=W([Pe,we,Te,Ee]),Ie=f.extend({mode:q(`form`).optional(),message:L(),requestedSchema:H({type:q(`object`),properties:G(L(),Fe),required:V(L()).optional()}).catchall(B())}),Le=H({type:q(`ref/resource`),uri:L()}),A=H({type:q(`ref/prompt`),name:L()}),Re=H({uri:L().startsWith(`file://`),name:L().optional(),_meta:G(L(),B()).optional()}),ze=x.shape,Be=H({experimental:ze.experimental,sampling:ze.sampling,elicitation:ze.elicitation,roots:ze.roots,extensions:ze.extensions}),Ve=te.shape,He=H({experimental:Ve.experimental,logging:Ve.logging,completions:Ve.completions,prompts:Ve.prompts,resources:Ve.resources,tools:Ve.tools,extensions:Ve.extensions}),Ue=U({progressToken:n.optional(),[sl]:L(),[cl]:v.optional(),[ul]:Be,[fl]:o.optional()}),We=H({..._.shape,...g.shape,description:L().optional(),inputSchema:U({$schema:L().optional(),type:q(`object`)}),outputSchema:U({$schema:L().optional()}).optional(),annotations:ye.optional(),_meta:G(L(),B()).optional()}),j=H({type:q(`tool_result`),toolUseId:L(),content:V(_e),structuredContent:B().optional(),isError:z().optional(),_meta:G(L(),B()).optional()}),Ge=W([D,O,k,me,j]),Ke=H({role:a,content:W([Ge,V(Ge)]),_meta:G(L(),B()).optional()}),qe=L(),Je=U({[ll]:v.optional().catch(void 0)}),Ye=Je.optional();function Xe(e){return U({_meta:Ye,resultType:qe.default(`complete`),...e})}let Ze=Xe({}),Qe=Xe({nextCursor:r.optional()}),M=Xe({content:V(_e),structuredContent:B().optional(),isError:z().optional()}),$e=Xe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),tools:V(We),nextCursor:r.optional()}),et=Xe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),prompts:V(fe),nextCursor:r.optional()}),tt=Xe({description:L().optional(),messages:V(ve)}),nt=Xe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resources:V(oe),nextCursor:r.optional()}),rt=Xe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resourceTemplates:V(se),nextCursor:r.optional()}),it=Xe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),contents:V(W([ae,T]))}),at=Xe({completion:H({values:V(L()).max(100),total:R().int().optional(),hasMore:z().optional()}).loose()}),ot=Xe({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`])}),st=Xe({ttlMs:R().int().min(0).catch(0),cacheScope:K([`public`,`private`]).catch(`private`),supportedVersions:V(L()),capabilities:He,instructions:L().optional()}),ct=H({messages:V(Ke),modelPreferences:Se.optional(),systemPrompt:L().optional(),includeContext:K([`none`,`thisServer`,`allServers`]).optional(),temperature:R().optional(),maxTokens:R().int(),stopSequences:V(L()).optional(),metadata:t.optional(),tools:V(We).optional(),toolChoice:Ce.optional()}),lt=H({method:q(`sampling/createMessage`),params:ct}),ut=H({method:q(`roots/list`),params:H({_meta:G(L(),B()).optional()}).optional()}),dt=H({...Ke.shape,model:L(),stopReason:L().optional()}),ft=H({roots:V(Re)}),pt=H({action:K([`accept`,`decline`,`cancel`]),content:G(L(),W([L(),R(),z(),V(L())])).optional()}),mt=H({mode:q(`url`),message:L(),url:L().url()}),ht=W([Ie,mt]),gt=H({method:q(`elicitation/create`),params:ht}),_t=W([lt,ut,gt]),vt=W([dt,ft,pt]),yt=G(L(),_t),bt=G(L(),vt),xt=Xe({inputRequests:yt.optional(),requestState:L().optional()}),St={inputResponses:bt.optional(),requestState:L().optional()},Ct=H({_meta:Ue,...St}),wt=U({progressToken:n.optional()});function Tt(e,t){return H({method:q(e),params:H({_meta:Ue,...t})})}function Et(e,t){return H({method:q(e),params:H({_meta:wt.optional(),...t}).optional()})}let Dt={name:L(),arguments:G(L(),B()).optional(),...St},Ot={cursor:r.optional()},kt=Tt(`tools/call`,Dt),At=Tt(`tools/list`,Ot),jt=Tt(`prompts/list`,Ot),Mt=Tt(`prompts/get`,{name:L(),arguments:G(L(),L()).optional(),...St}),Nt=Tt(`resources/list`,Ot),Pt=Tt(`resources/templates/list`,Ot),Ft=Tt(`resources/read`,{uri:L(),...St}),It={ref:W([A,Le]),argument:H({name:L(),value:L()}),context:H({arguments:G(L(),L()).optional()}).optional()},Lt=Tt(`completion/complete`,It),Rt=Tt(`server/discover`,{}),zt=H({toolsListChanged:z().optional(),promptsListChanged:z().optional(),resourcesListChanged:z().optional(),resourceSubscriptions:V(L()).optional()}),Bt={notifications:zt},Vt=Tt(`subscriptions/listen`,Bt),Ht=Je.extend({"io.modelcontextprotocol/subscriptionId":i}),Ut=U({_meta:Ht,resultType:qe.default(`complete`)}),Wt={"tools/call":Et(`tools/call`,Dt),"tools/list":Et(`tools/list`,Ot),"prompts/get":Et(`prompts/get`,{name:L(),arguments:G(L(),L()).optional()}),"prompts/list":Et(`prompts/list`,Ot),"resources/list":Et(`resources/list`,Ot),"resources/templates/list":Et(`resources/templates/list`,Ot),"resources/read":Et(`resources/read`,{uri:L()}),"completion/complete":Et(`completion/complete`,It),"server/discover":Et(`server/discover`,{}),"subscriptions/listen":Et(`subscriptions/listen`,Bt)};function Gt(e){return U({_meta:Ye,...e})}let Kt={"tools/call":Gt({content:V(_e),structuredContent:B().optional(),isError:z().optional()}),"tools/list":Gt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),tools:V(We),nextCursor:r.optional()}),"prompts/get":Gt({description:L().optional(),messages:V(ve)}),"prompts/list":Gt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),prompts:V(fe),nextCursor:r.optional()}),"resources/list":Gt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resources:V(oe),nextCursor:r.optional()}),"resources/templates/list":Gt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),resourceTemplates:V(se),nextCursor:r.optional()}),"resources/read":Gt({ttlMs:R().int().min(0),cacheScope:K([`public`,`private`]),contents:V(W([ae,T]))}),"completion/complete":Gt({completion:H({values:V(L()).max(100),total:R().int().optional(),hasMore:z().optional()}).loose()}),"server/discover":Gt({ttlMs:R().int().min(0).catch(0),cacheScope:K([`public`,`private`]).catch(`private`),supportedVersions:V(L()),capabilities:He,instructions:L().optional()}),"subscriptions/listen":Gt({})},qt=U({"io.modelcontextprotocol/subscriptionId":i.optional()}),Jt=H({method:q(`notifications/subscriptions/acknowledged`),params:H({_meta:qt.optional(),notifications:zt})}),Yt=H({_meta:qt.optional(),requestId:i,reason:L().optional()}),Xt=H({method:q(`notifications/cancelled`),params:Yt}),Zt={"notifications/cancelled":Xt,"notifications/progress":re,"notifications/message":ie,"notifications/resources/updated":ue,"notifications/resources/list_changed":ce,"notifications/tools/list_changed":be,"notifications/prompts/list_changed":pe,"notifications/subscriptions/acknowledged":Jt},Qt=e=>H({jsonrpc:q(`2.0`),id:W([L(),R().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:b,ServerTasksCapabilitySchema:ee,ClientCapabilitiesSchema:x,ServerCapabilitiesSchema:te,ProgressSchema:S,ProgressNotificationParamsSchema:ne,ProgressNotificationSchema:re,LoggingMessageNotificationParamsSchema:C,LoggingMessageNotificationSchema:ie,ResourceContentsSchema:w,TextResourceContentsSchema:ae,BlobResourceContentsSchema:T,AnnotationsSchema:E,ResourceSchema:oe,ResourceTemplateSchema:se,ResourceListChangedNotificationSchema:ce,ResourceUpdatedNotificationParamsSchema:le,ResourceUpdatedNotificationSchema:ue,PromptArgumentSchema:de,PromptSchema:fe,PromptListChangedNotificationSchema:pe,TextContentSchema:D,ImageContentSchema:O,AudioContentSchema:k,ToolUseContentSchema:me,EmbeddedResourceSchema:he,ResourceLinkSchema:ge,ContentBlockSchema:_e,PromptMessageSchema:ve,ToolAnnotationsSchema:ye,ToolListChangedNotificationSchema:be,ModelHintSchema:xe,ModelPreferencesSchema:Se,ToolChoiceSchema:Ce,BooleanSchemaSchema:we,StringSchemaSchema:Te,NumberSchemaSchema:Ee,UntitledSingleSelectEnumSchemaSchema:De,TitledSingleSelectEnumSchemaSchema:Oe,LegacyTitledEnumSchemaSchema:ke,SingleSelectEnumSchemaSchema:Ae,UntitledMultiSelectEnumSchemaSchema:je,TitledMultiSelectEnumSchemaSchema:Me,MultiSelectEnumSchemaSchema:Ne,EnumSchemaSchema:Pe,PrimitiveSchemaDefinitionSchema:Fe,ElicitRequestFormParamsSchema:Ie,ResourceTemplateReferenceSchema:Le,PromptReferenceSchema:A,RootSchema:Re,ClientCapabilities2026Schema:Be,ServerCapabilities2026Schema:He,RequestMetaEnvelopeSchema:Ue,ToolSchema:We,ToolResultContentSchema:j,SamplingMessageContentBlockSchema:Ge,SamplingMessageSchema:Ke,ResultTypeSchema:qe,ResultMetaSchema:Je,ResultSchema:Ze,PaginatedResultSchema:Qe,CallToolResultSchema:M,ListToolsResultSchema:$e,ListPromptsResultSchema:et,GetPromptResultSchema:tt,ListResourcesResultSchema:nt,ListResourceTemplatesResultSchema:rt,ReadResourceResultSchema:it,CompleteResultSchema:at,CacheableResultSchema:ot,DiscoverResultSchema:st,CreateMessageRequestParamsSchema:ct,CreateMessageRequestSchema:lt,ListRootsRequestSchema:ut,CreateMessageResultSchema:dt,ListRootsResultSchema:ft,ElicitResultSchema:pt,ElicitRequestURLParamsSchema:mt,ElicitRequestParamsSchema:ht,ElicitRequestSchema:gt,InputRequestSchema:_t,InputResponseSchema:vt,InputRequestsSchema:yt,InputResponsesSchema:bt,InputRequiredResultSchema:xt,InputResponseRequestParamsSchema:Ct,CallToolRequestSchema:kt,ListToolsRequestSchema:At,ListPromptsRequestSchema:jt,GetPromptRequestSchema:Mt,ListResourcesRequestSchema:Nt,ListResourceTemplatesRequestSchema:Pt,ReadResourceRequestSchema:Ft,CompleteRequestSchema:Lt,DiscoverRequestSchema:Rt,SubscriptionFilterSchema:zt,SubscriptionsListenRequestSchema:Vt,SubscriptionsListenResultMetaSchema:Ht,SubscriptionsListenResultSchema:Ut,dispatchRequestSchemas:Wt,dispatchResultSchemas:Kt,NotificationMetaSchema:qt,SubscriptionsAcknowledgedNotificationSchema:Jt,CancelledNotificationParamsSchema:Yt,CancelledNotificationSchema:Xt,notificationSchemas2026:Zt,JSONRPCResultResponseSchema:Qt(Ze),CallToolResultResponseSchema:Qt(W([M,xt])),ListToolsResultResponseSchema:Qt($e),ListPromptsResultResponseSchema:Qt(et),GetPromptResultResponseSchema:Qt(W([tt,xt])),ListResourcesResultResponseSchema:Qt(nt),ListResourceTemplatesResultResponseSchema:Qt(rt),ReadResourceResultResponseSchema:Qt(W([it,xt])),CompleteResultResponseSchema:Qt(at),DiscoverResultResponseSchema:Qt(st),SubscriptionsListenResultResponseSchema:Qt(Ut)}}var gp;function _p(){return gp??=hp()}var vp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function yp(e){return vp.includes(e)}var bp=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function xp(e){return e[bp]}function Sp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Cp(e){return e===`public`||e===`private`}var Y=function(e){return e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.ResourceNotFound=-32002]=`ResourceNotFound`,e[e.MissingRequiredClientCapability=-32021]=`MissingRequiredClientCapability`,e[e.UnsupportedProtocolVersion=-32022]=`UnsupportedProtocolVersion`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`,e}({}),wp=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return If(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return If(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Ff(this,new.target)}static fromError(t,n,r){if(t===Y.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Ep(e.elicitations,n)}if(t===Y.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Dp({supported:e.supported,requested:e.requested},n)}if(t===Y.InvalidParams||t===Y.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===Y.ResourceNotFound||Object.keys(e).length===1))return new Tp(e.uri,n)}if(t===Y.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Op({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Tp=class extends wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(Y.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Ep=class extends wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Dp=class extends wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(Y.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Op=class extends wp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(Y.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},kp=0,Ap=`private`,jp=[`tools/call`,`prompts/get`,`resources/read`];function Mp(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||jp.includes(e))return t;throw new wp(Y.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Np(e,t){let n=xp(t);if(t.resultType!==`complete`||!yp(e))return n===void 0?t:Rp(t);let r=t,i=Sp(r.ttlMs)?r.ttlMs:Ip(n),a=Cp(r.cacheScope)?r.cacheScope:Lp(n),o={...r,ttlMs:i,cacheScope:a};return delete o[bp],o}function Pp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fp(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[ll]:t}}:!Pp(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[ll]:t}}}function Ip(e){return e!==void 0&&Sp(e.ttlMs)?e.ttlMs:kp}function Lp(e){return e!==void 0&&Cp(e.cacheScope)?e.cacheScope:Ap}function Rp(e){let t={...e};return delete t[bp],t}var zp=[`elicitation/create`,`sampling/createMessage`,`roots/list`],Bp;function Vp(){if(Bp)return Bp;let e=_p();return Bp={request:{"elicitation/create":H({method:q(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":H({method:q(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":H({method:q(`roots/list`),params:U({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Bp}function Hp(e){return zp.includes(e)}function Up(e){return Hp(e)?Vp().request[e]:void 0}function Wp(e){return Hp(e)?Vp().response[e]:void 0}var Gp={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Kp={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function qp(e){return Object.prototype.hasOwnProperty.call(Gp,e)}function Jp(e){return Object.prototype.hasOwnProperty.call(Kp,e)}function Yp(e){return Object.prototype.hasOwnProperty.call(Gp,e)}function Xp(e){return qp(e)?_p().dispatchRequestSchemas[e]:void 0}function Zp(e){return Yp(e)?_p().dispatchResultSchemas[e]:void 0}function Qp(e){return Jp(e)?_p().notificationSchemas2026[e]:void 0}Object.keys(Gp),Object.keys(Kp);function $p(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function em(e,t){if(e===void 0)return{ok:!1,reason:`not-in-era`};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:`invalid`,message:String(n.error)}}var tm={ok:!1,reason:`not-in-era`},nm=[sl,ul];function rm(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>$p(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!$p(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if($p(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var im={era:`2026-07-28`,hasRequestMethod:qp,hasNotificationMethod:Jp,hasInputRequestMethod:e=>Up(e)!==void 0,validateRequest:(e,t)=>em(Xp(e),t),validateResult:(e,t)=>em(Zp(e),t),validateNotification:(e,t)=>em(Qp(e),t),validateInputRequest:(e,t)=>em(Up(e),t),validateInputResponse:(e,t)=>em(Wp(e),t),samplingResultVariant:()=>tm,outboundEnvelope(e){return{[sl]:e.protocolVersion,[cl]:e.clientInfo,[ul]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of nm)n in e||t.push({key:n,problem:`missing`});let n=_p().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>Vf(e),inputRequestSchema:Up,decodeResult(e,t){if(!$p(t))return{kind:`invalid`,error:new Rf(Lf.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new Rf(Lf.InvalidResult,`Invalid result for ${e}: missing required resultType — servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:`missing-resultType`})};if(typeof n!=`string`)return{kind:`invalid`,error:new Rf(Lf.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=$p(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:_p().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new Rf(Lf.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:`input-required-missing-both`})}:{kind:`input_required`,inputRequests:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new Rf(Lf.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let r=om(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new Rf(Lf.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return Fp(Np(e,Mp(e,rm(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return`Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)`;let t=_p().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},am;function om(){if(am)return am;let e=_p();return am={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},am}var sm=`2026-07-28`;function cm(e){return e!==void 0&&Bf(e)?im:mp}function lm(e){return e.revision===void 0?e.era===`modern`?im.era:mp.era:cm(e.revision).era}function um(e){return pm.some(t=>t.hasRequestMethod(e))}function dm(e){return pm.some(t=>t.hasNotificationMethod(e))}function fm(e){return e===`tasks/get`||e===`tasks/cancel`}var pm=[mp,im],mm=d({AnnotationsSchema:()=>du,AudioContentSchema:()=>Wu,BaseMetadataSchema:()=>Bl,BaseRequestParamsSchema:()=>xl,BlobResourceContentsSchema:()=>lu,BooleanSchemaSchema:()=>Td,CallToolRequestParamsSchema:()=>ad,CallToolRequestSchema:()=>od,CallToolResultSchema:()=>rd,CancelTaskRequestSchema:()=>ff,CancelTaskResultSchema:()=>pf,CancelledNotificationParamsSchema:()=>Il,CancelledNotificationSchema:()=>Ll,ClientCapabilitiesSchema:()=>Gl,ClientNotificationSchema:()=>hf,ClientRequestSchema:()=>mf,ClientResultSchema:()=>gf,ClientTasksCapabilitySchema:()=>Ul,CompatibilityCallToolResultSchema:()=>id,CompleteRequestParamsSchema:()=>Kd,CompleteRequestSchema:()=>qd,CompleteResultSchema:()=>Jd,ContentBlockSchema:()=>Ju,CreateMessageRequestParamsSchema:()=>xd,CreateMessageRequestSchema:()=>Sd,CreateMessageResultSchema:()=>Cd,CreateMessageResultWithToolsSchema:()=>wd,CreateTaskResultSchema:()=>nf,CursorSchema:()=>_l,DiscoverRequestSchema:()=>Zl,DiscoverResultSchema:()=>Ql,ElicitRequestFormParamsSchema:()=>Ld,ElicitRequestParamsSchema:()=>zd,ElicitRequestSchema:()=>Bd,ElicitRequestURLParamsSchema:()=>Rd,ElicitResultSchema:()=>Ud,ElicitationCompleteNotificationParamsSchema:()=>Vd,ElicitationCompleteNotificationSchema:()=>Hd,EmbeddedResourceSchema:()=>Ku,EmptyResultSchema:()=>Fl,EnumSchemaSchema:()=>Fd,GetPromptRequestParamsSchema:()=>Bu,GetPromptRequestSchema:()=>Vu,GetPromptResultSchema:()=>Xu,GetTaskPayloadRequestSchema:()=>cf,GetTaskPayloadResultSchema:()=>lf,GetTaskRequestSchema:()=>of,GetTaskResultSchema:()=>sf,IconSchema:()=>Rl,IconsSchema:()=>zl,ImageContentSchema:()=>Uu,ImplementationSchema:()=>Vl,InitializeRequestParamsSchema:()=>Kl,InitializeRequestSchema:()=>ql,InitializeResultSchema:()=>Yl,InitializedNotificationSchema:()=>Xl,JSONArraySchema:()=>hl,JSONObjectSchema:()=>ml,JSONRPCErrorResponseSchema:()=>Ml,JSONRPCMessageSchema:()=>Nl,JSONRPCNotificationSchema:()=>Al,JSONRPCRequestSchema:()=>kl,JSONRPCResponseSchema:()=>Pl,JSONRPCResultResponseSchema:()=>jl,JSONValueSchema:()=>pl,LegacyTitledEnumSchemaSchema:()=>Ad,ListChangedOptionsBaseSchema:()=>cd,ListPromptsRequestSchema:()=>Ru,ListPromptsResultSchema:()=>zu,ListResourceTemplatesRequestSchema:()=>gu,ListResourceTemplatesResultSchema:()=>_u,ListResourcesRequestSchema:()=>mu,ListResourcesResultSchema:()=>hu,ListRootsRequestSchema:()=>Xd,ListRootsResultSchema:()=>Zd,ListTasksRequestSchema:()=>uf,ListTasksResultSchema:()=>df,ListToolsRequestSchema:()=>td,ListToolsResultSchema:()=>nd,LoggingLevelSchema:()=>ld,LoggingMessageNotificationParamsSchema:()=>fd,LoggingMessageNotificationSchema:()=>pd,ModelHintSchema:()=>md,ModelPreferencesSchema:()=>hd,MultiSelectEnumSchemaSchema:()=>Pd,NotificationSchema:()=>Tl,NotificationsParamsSchema:()=>wl,NumberSchemaSchema:()=>Dd,PaginatedRequestParamsSchema:()=>ru,PaginatedRequestSchema:()=>iu,PaginatedResultSchema:()=>au,PingRequestSchema:()=>$l,PrimitiveSchemaDefinitionSchema:()=>Id,ProgressNotificationParamsSchema:()=>tu,ProgressNotificationSchema:()=>nu,ProgressSchema:()=>eu,ProgressTokenSchema:()=>gl,PromptArgumentSchema:()=>Iu,PromptListChangedNotificationSchema:()=>Zu,PromptMessageSchema:()=>Yu,PromptReferenceSchema:()=>Gd,PromptSchema:()=>Lu,ReadResourceRequestParamsSchema:()=>yu,ReadResourceRequestSchema:()=>bu,ReadResourceResultSchema:()=>xu,RelatedTaskMetadataSchema:()=>yl,RequestIdSchema:()=>Ol,RequestMetaSchema:()=>bl,RequestSchema:()=>Cl,ResourceContentsSchema:()=>ou,ResourceLinkSchema:()=>qu,ResourceListChangedNotificationSchema:()=>Su,ResourceRequestParamsSchema:()=>vu,ResourceSchema:()=>fu,ResourceTemplateReferenceSchema:()=>Wd,ResourceTemplateSchema:()=>pu,ResourceUpdatedNotificationParamsSchema:()=>Pu,ResourceUpdatedNotificationSchema:()=>Fu,ResultMetaObjectSchema:()=>El,ResultSchema:()=>Dl,RoleSchema:()=>uu,RootSchema:()=>Yd,RootsListChangedNotificationSchema:()=>Qd,SamplingContentSchema:()=>vd,SamplingMessageContentBlockSchema:()=>yd,SamplingMessageSchema:()=>bd,ServerCapabilitiesSchema:()=>Jl,ServerNotificationSchema:()=>vf,ServerRequestSchema:()=>_f,ServerResultSchema:()=>yf,ServerTasksCapabilitySchema:()=>Wl,SetLevelRequestParamsSchema:()=>ud,SetLevelRequestSchema:()=>dd,SingleSelectEnumSchemaSchema:()=>jd,StringSchemaSchema:()=>Ed,SubscribeRequestParamsSchema:()=>Cu,SubscribeRequestSchema:()=>wu,SubscriptionFilterSchema:()=>Du,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Au,SubscriptionsAcknowledgedNotificationSchema:()=>ju,SubscriptionsListenRequestParamsSchema:()=>Ou,SubscriptionsListenRequestSchema:()=>ku,SubscriptionsListenResultMetaSchema:()=>Mu,SubscriptionsListenResultSchema:()=>Nu,TaskAugmentedRequestParamsSchema:()=>Sl,TaskCreationParamsSchema:()=>$d,TaskMetadataSchema:()=>vl,TaskSchema:()=>tf,TaskStatusNotificationParamsSchema:()=>rf,TaskStatusNotificationSchema:()=>af,TaskStatusSchema:()=>ef,TextContentSchema:()=>Hu,TextResourceContentsSchema:()=>su,TitledMultiSelectEnumSchemaSchema:()=>Nd,TitledSingleSelectEnumSchemaSchema:()=>kd,ToolAnnotationsSchema:()=>Qu,ToolChoiceSchema:()=>gd,ToolExecutionSchema:()=>$u,ToolListChangedNotificationSchema:()=>sd,ToolResultContentSchema:()=>_d,ToolSchema:()=>ed,ToolUseContentSchema:()=>Gu,UnsubscribeRequestParamsSchema:()=>Tu,UnsubscribeRequestSchema:()=>Eu,UntitledMultiSelectEnumSchemaSchema:()=>Md,UntitledSingleSelectEnumSchemaSchema:()=>Od}),hm=e=>kl.safeParse(e).success,gm=e=>Al.safeParse(e).success,_m=e=>jl.safeParse(e).success,vm=e=>Ml.safeParse(e).success;Y.InvalidRequest,Y.UnsupportedProtocolVersion,Y.InvalidParams,Y.MethodNotFound,Y.InvalidParams,Y.MissingRequiredClientCapability,Y.ParseError,Y.InvalidRequest,Y.MethodNotFound,Y.UnsupportedProtocolVersion,Y.MissingRequiredClientCapability;function ym(e,t){return ys(e,t)}function bm(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function xm(e){if(e==null)return!1;let t=typeof e;return t!==`object`&&t!==`function`||!(`~standard`in e)?!1:typeof e[`~standard`]?.validate==`function`}var Sm=!1,Cm=`draft-2020-12`;function wm(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:Cm});else if(n.vendor===`zod`){if(!(`_zod`in e))throw Error(`Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().`);Sm||(Sm=!0,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),r=ps(e,{target:Cm,io:t})}else throw Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t===`output`)return r.type===void 0&&Tm(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}function Tm(e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;for(let t of[`oneOf`,`anyOf`,`allOf`]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||Tm(e)))}return!1}function Em(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function Dm(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>Em(e)).join(`, `)}:{success:!0,data:n.value}}function Om(e){let t=ps(e,{target:Cm,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var km=/\\\.\\d\{(\d+)\}/;function Am(e){let t=km.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>nl({local:e,offset:t,precision:n}))))}function jm(e,t){let n;switch(e){case`email`:n=[zs()];break;case`uri`:n=[Us()];break;case`date`:n=[rl()];break;case`date-time`:n=Am(t)}return new Set(n.map(e=>Om(e)).filter(e=>e!==void 0))}function Mm(e,t,n){return n!==`zod`||jm(e,t).has(t)}function Nm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pm(e){try{return wm(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new wp(Y.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Fm=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Im(e){return Fm.has(e)||e.startsWith(`x-`)}var Lm=new Set([`$schema`,...Object.keys(Ld.shape.requestedSchema.shape)]),Rm={string:bm([Ed,Od,kd,Ad]),number:bm([Dd]),integer:bm([Dd]),boolean:bm([Td]),array:bm([Md,Nd])},zm=new Set(Ed.shape.format.unwrap().options);function Bm(e,t,n,r){if(!Nm(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Rm,e.type)?Rm[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Im(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?zm.has(e.format)?(typeof s!=`string`||!Mm(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Vm(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&Nm(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Bm(n,`properties.${e}`,t,r)])):Lm.has(i)?n[i]=a:Im(i)||r.push(i);if(r.length>0)throw new wp(Y.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function Hm(e,t){if(!Nm(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!ym(Id,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Um(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Um(e,t[r],`${n}[${r}]`)):!Nm(e)||!Nm(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Um(r,t[e],i):Im(e)?[]:[i]})}function Wm(e){if(!xm(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Vm(Pm(e.requestedSchema),t),r=ym(Ld.shape.requestedSchema,n);if(!r.success)throw new wp(Y.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${Hm(n,r.error.message)}`);let i=Um(n,r.data);if(i.length>0)throw new wp(Y.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new wp(Y.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Gm(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw TypeError(`inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)`);return{resultType:`input_required`,...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(Gm,{elicit(e){try{return{method:`elicitation/create`,params:Wm(e)}}catch(e){throw e instanceof wp?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Km=`AnnotationsSchema.AudioContentSchema.BaseMetadataSchema.BlobResourceContentsSchema.BooleanSchemaSchema.CallToolRequestSchema.CallToolRequestParamsSchema.CallToolResultSchema.CancelledNotificationSchema.CancelledNotificationParamsSchema.CancelTaskRequestSchema.CancelTaskResultSchema.ClientCapabilitiesSchema.ClientNotificationSchema.ClientRequestSchema.ClientResultSchema.CompatibilityCallToolResultSchema.CompleteRequestSchema.CompleteRequestParamsSchema.CompleteResultSchema.ContentBlockSchema.CreateMessageRequestSchema.CreateMessageRequestParamsSchema.CreateMessageResultSchema.CreateMessageResultWithToolsSchema.CreateTaskResultSchema.CursorSchema.DiscoverRequestSchema.DiscoverResultSchema.ElicitationCompleteNotificationSchema.ElicitationCompleteNotificationParamsSchema.ElicitRequestSchema.ElicitRequestFormParamsSchema.ElicitRequestParamsSchema.ElicitRequestURLParamsSchema.ElicitResultSchema.EmbeddedResourceSchema.EmptyResultSchema.EnumSchemaSchema.GetPromptRequestSchema.GetPromptRequestParamsSchema.GetPromptResultSchema.GetTaskPayloadRequestSchema.GetTaskPayloadResultSchema.GetTaskRequestSchema.GetTaskResultSchema.IconSchema.IconsSchema.ImageContentSchema.ImplementationSchema.InitializedNotificationSchema.InitializeRequestSchema.InitializeRequestParamsSchema.InitializeResultSchema.JSONArraySchema.JSONObjectSchema.JSONRPCErrorResponseSchema.JSONRPCMessageSchema.JSONRPCNotificationSchema.JSONRPCRequestSchema.JSONRPCResponseSchema.JSONRPCResultResponseSchema.JSONValueSchema.LegacyTitledEnumSchemaSchema.ListPromptsRequestSchema.ListPromptsResultSchema.ListResourcesRequestSchema.ListResourcesResultSchema.ListResourceTemplatesRequestSchema.ListResourceTemplatesResultSchema.ListRootsRequestSchema.ListRootsResultSchema.ListTasksRequestSchema.ListTasksResultSchema.ListToolsRequestSchema.ListToolsResultSchema.LoggingLevelSchema.LoggingMessageNotificationSchema.LoggingMessageNotificationParamsSchema.ModelHintSchema.ModelPreferencesSchema.MultiSelectEnumSchemaSchema.NotificationSchema.NumberSchemaSchema.PaginatedRequestSchema.PaginatedRequestParamsSchema.PaginatedResultSchema.PingRequestSchema.PrimitiveSchemaDefinitionSchema.ProgressSchema.ProgressNotificationSchema.ProgressNotificationParamsSchema.ProgressTokenSchema.PromptSchema.PromptArgumentSchema.PromptListChangedNotificationSchema.PromptMessageSchema.PromptReferenceSchema.ReadResourceRequestSchema.ReadResourceRequestParamsSchema.ReadResourceResultSchema.RelatedTaskMetadataSchema.RequestSchema.RequestIdSchema.RequestMetaSchema.ResourceSchema.ResourceContentsSchema.ResourceLinkSchema.ResourceListChangedNotificationSchema.ResourceRequestParamsSchema.ResourceTemplateSchema.ResourceTemplateReferenceSchema.ResourceUpdatedNotificationSchema.ResourceUpdatedNotificationParamsSchema.ResultMetaObjectSchema.ResultSchema.RoleSchema.RootSchema.RootsListChangedNotificationSchema.SamplingContentSchema.SamplingMessageSchema.SamplingMessageContentBlockSchema.ServerCapabilitiesSchema.ServerNotificationSchema.ServerRequestSchema.ServerResultSchema.SetLevelRequestSchema.SetLevelRequestParamsSchema.SingleSelectEnumSchemaSchema.StringSchemaSchema.SubscribeRequestSchema.SubscribeRequestParamsSchema.SubscriptionFilterSchema.SubscriptionsAcknowledgedNotificationSchema.SubscriptionsAcknowledgedNotificationParamsSchema.SubscriptionsListenRequestSchema.SubscriptionsListenRequestParamsSchema.SubscriptionsListenResultSchema.SubscriptionsListenResultMetaSchema.TaskAugmentedRequestParamsSchema.TaskCreationParamsSchema.TaskMetadataSchema.TaskSchema.TaskStatusSchema.TaskStatusNotificationSchema.TaskStatusNotificationParamsSchema.TextContentSchema.TextResourceContentsSchema.TitledMultiSelectEnumSchemaSchema.TitledSingleSelectEnumSchemaSchema.ToolSchema.ToolAnnotationsSchema.ToolChoiceSchema.ToolExecutionSchema.ToolListChangedNotificationSchema.ToolResultContentSchema.ToolUseContentSchema.UnsubscribeRequestSchema.UnsubscribeRequestParamsSchema.UntitledMultiSelectEnumSchemaSchema.UntitledSingleSelectEnumSchemaSchema`.split(`.`),qm={IdJagTokenExchangeResponseSchema:Ef,OAuthClientInformationFullSchema:jf,OAuthClientInformationSchema:Af,OAuthClientMetadataSchema:kf,OAuthClientRegistrationErrorSchema:Mf,OAuthErrorResponseSchema:Df,OAuthMetadataSchema:Sf,OAuthProtectedResourceMetadataSchema:xf,OAuthTokenRevocationRequestSchema:Nf,OAuthTokensSchema:Tf,OpenIdProviderDiscoveryMetadataSchema:wf,OpenIdProviderMetadataSchema:Cf},Jm={},Ym={};function Xm(e,t){let n=e.slice(0,-6);Jm[n]=t,Ym[n]=e=>t.safeParse(e).success}for(let e of Km)Xm(e,mm[e]);for(let[e,t]of Object.entries(qm))Xm(e,t);Object.freeze(Jm),Object.freeze(Ym);function Zm(e){switch(e){case`initialize`:case`notifications/initialized`:return cm(void 0);case`server/discover`:return cm(sm);default:return}}var Qm=[sl,cl,ul,fl],$m=[`inputResponses`,`requestState`];function eh(e,t){let n=e.params;if(!ah(n))return{message:e,lifted:{}};let r=n._meta,i=ah(r)?Qm.filter(e=>e in r):[],a=t===`request`?$m.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ah(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function th(e,t){let n=e.validateResult(t,void 0);if(n.ok||n.reason!==`not-in-era`)return{"~standard":{version:1,vendor:`mcp-wire-codec`,validate(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function nh(e){return()=>e}var rh=nh(void 0),ih=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??al,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return{...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new Rf(Lf.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new Rf(Lf.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.()}finally{this._onclose()}};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),_m(e)||vm(e)?this._onresponse(e):hm(e)?this._onrequest(e,t):gm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new Rf(Lf.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=eh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=lm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification '${n.method}': classified as ${e} but this instance serves ${r.era}`));return}}if(dm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;(i!==void 0||a!==void 0)&&Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=eh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=lm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request '${n.method}': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(Y.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(um(n.method)&&!i.hasRequestMethod(n.method)&&!(fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(Y.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(Y.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(Y.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:sh(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?rh:nh(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),xm(t))return u(e,t,n);let i=th(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(Y.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:Y.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);n===void 0?this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`)):(this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),_m(e)?n(e):n(wp.fromError(e.error.code,e.error.message,e.error.data)))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,n){let r=this._resolveOutboundCodec(e.method);if(xm(t))return fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=th(r,e.method);if(i===void 0)throw TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return cm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Zm(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(um(t)&&!e.hasRequestMethod(t))throw new Rf(Lf.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof Rf?e:new Rf(Lf.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof Rf?e:new Rf(Lf.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(ch(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;Dm(n,o).then(e=>{e.success?d(e.data):f(new Rf(Lf.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let b=r?.timeout??6e4;this._setupTimeout(h,b,r?.maxTotalTimeout,()=>y(new Rf(Lf.RequestTimeout,`Request timed out`,{timeout:b})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new Rf(Lf.NotConnected,`Not connected`);if(dm(t.method)&&!e.hasNotificationMethod(t.method))throw new Rf(Lf.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(r,n).catch(e=>this._onerror(e))})}else await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!um(e))throw TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new wp(Y.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await Dm(t.params,{...r.params});if(!a.success)throw new wp(Y.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!dm(e))throw TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new wp(Y.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))})}else{if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await Dm(t.params,{...r.params});if(!i.success)throw new wp(Y.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ah(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function oh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function sh(e){let t={},n=[];if(!oh(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e))!oh(i)||`method`in i||`result`in i?n.push(r):t[r]=i;return{accepted:t,droppedKeys:n}}function ch(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}u((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,r=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))(),typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);var lh=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,uh=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,dh=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,fh=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,ph=/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,mh=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,hh=/^(?:\/(?:[^~/]|~0|~1)*)*$/,gh=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,_h=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,vh=/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,yh=/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i;function bh(e){return e.test.bind(e)}xh.bind(void 0,!1),bh(dh),bh(fh),bh(ph),bh(uh),bh(vh),bh(yh),bh(mh),bh(hh),bh(gh),bh(_h);function xh(e,t){let n=t.match(lh);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}globalThis.crypto;var Sh=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return If(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return If(this,e)}constructor(e){super(e),this.name=new.target.name,Ff(this,new.target)}};(class extends Sh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 §3.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Sh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Sh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint '${e}'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Sh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Sh{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return If(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return If(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,Ff(this,new.target)}},class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return If(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return If(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,Ff(this,new.target)}};var Ch=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},wh=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},Th=new Set;function Eh(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;Th.has(o)||(Th.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},Dh(t)):e=>s({method:a,params:e})]}function Dh(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var Oh=`2026-01-26`,kh=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Nl.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Ah=W([q(`light`),q(`dark`)]).describe(`Color theme preference for the host environment.`),jh=W([q(`inline`),q(`fullscreen`),q(`pip`)]).describe(`Display mode for UI presentation.`),Mh=G(W([q(`--color-background-primary`),q(`--color-background-secondary`),q(`--color-background-tertiary`),q(`--color-background-inverse`),q(`--color-background-ghost`),q(`--color-background-info`),q(`--color-background-danger`),q(`--color-background-success`),q(`--color-background-warning`),q(`--color-background-disabled`),q(`--color-text-primary`),q(`--color-text-secondary`),q(`--color-text-tertiary`),q(`--color-text-inverse`),q(`--color-text-ghost`),q(`--color-text-info`),q(`--color-text-danger`),q(`--color-text-success`),q(`--color-text-warning`),q(`--color-text-disabled`),q(`--color-border-primary`),q(`--color-border-secondary`),q(`--color-border-tertiary`),q(`--color-border-inverse`),q(`--color-border-ghost`),q(`--color-border-info`),q(`--color-border-danger`),q(`--color-border-success`),q(`--color-border-warning`),q(`--color-border-disabled`),q(`--color-ring-primary`),q(`--color-ring-secondary`),q(`--color-ring-inverse`),q(`--color-ring-info`),q(`--color-ring-danger`),q(`--color-ring-success`),q(`--color-ring-warning`),q(`--font-sans`),q(`--font-mono`),q(`--font-weight-normal`),q(`--font-weight-medium`),q(`--font-weight-semibold`),q(`--font-weight-bold`),q(`--font-text-xs-size`),q(`--font-text-sm-size`),q(`--font-text-md-size`),q(`--font-text-lg-size`),q(`--font-heading-xs-size`),q(`--font-heading-sm-size`),q(`--font-heading-md-size`),q(`--font-heading-lg-size`),q(`--font-heading-xl-size`),q(`--font-heading-2xl-size`),q(`--font-heading-3xl-size`),q(`--font-text-xs-line-height`),q(`--font-text-sm-line-height`),q(`--font-text-md-line-height`),q(`--font-text-lg-line-height`),q(`--font-heading-xs-line-height`),q(`--font-heading-sm-line-height`),q(`--font-heading-md-line-height`),q(`--font-heading-lg-line-height`),q(`--font-heading-xl-line-height`),q(`--font-heading-2xl-line-height`),q(`--font-heading-3xl-line-height`),q(`--border-radius-xs`),q(`--border-radius-sm`),q(`--border-radius-md`),q(`--border-radius-lg`),q(`--border-radius-xl`),q(`--border-radius-full`),q(`--border-width-regular`),q(`--shadow-hairline`),q(`--shadow-sm`),q(`--shadow-md`),q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
|
|
1537
|
+
|
|
1538
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
1539
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
1540
|
+
|
|
1541
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
1542
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),W([L(),uc()]).describe(`Style variables for theming MCP apps.
|
|
1543
|
+
|
|
1544
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
1545
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
1546
|
+
|
|
1547
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
1548
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.
|
|
1549
|
+
|
|
1550
|
+
Individual style keys are optional - hosts may provide any subset of these values.
|
|
1551
|
+
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
1552
|
+
|
|
1553
|
+
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
1554
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);H({method:q(`ui/open-link`),params:H({url:L().describe(`URL to open in the host's browser`)})});var Nh=H({isError:z().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Ph=H({isError:z().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Fh=H({isError:z().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();H({method:q(`ui/notifications/sandbox-proxy-ready`),params:H({})});var Ih=H({connectDomains:V(L()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
1555
|
+
|
|
1556
|
+
- Maps to CSP \`connect-src\` directive
|
|
1557
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:V(L()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:V(L()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:V(L()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Lh=H({camera:H({}).optional().describe(`Request camera access.
|
|
1558
|
+
|
|
1559
|
+
Maps to Permission Policy \`camera\` feature.`),microphone:H({}).optional().describe(`Request microphone access.
|
|
1560
|
+
|
|
1561
|
+
Maps to Permission Policy \`microphone\` feature.`),geolocation:H({}).optional().describe(`Request geolocation access.
|
|
1562
|
+
|
|
1563
|
+
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:H({}).optional().describe(`Request clipboard write access.
|
|
1564
|
+
|
|
1565
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});H({method:q(`ui/notifications/size-changed`),params:H({width:R().optional().describe(`New width in pixels.`),height:R().optional().describe(`New height in pixels.`)})});var Rh=H({method:q(`ui/notifications/tool-input`),params:H({arguments:G(L(),B().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),zh=H({method:q(`ui/notifications/tool-input-partial`),params:H({arguments:G(L(),B().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Bh=H({method:q(`ui/notifications/tool-cancelled`),params:H({reason:L().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Vh=H({fonts:L().optional()}),Hh=H({variables:Mh.optional().describe(`CSS variables for theming the app.`),css:Vh.optional().describe(`CSS blocks that apps can inject.`)}),Uh=H({method:q(`ui/resource-teardown`),params:H({})}),Wh=G(L(),B()),Gh=H({text:H({}).optional().describe(`Host supports text content blocks.`),image:H({}).optional().describe(`Host supports image content blocks.`),audio:H({}).optional().describe(`Host supports audio content blocks.`),resource:H({}).optional().describe(`Host supports resource content blocks.`),resourceLink:H({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:H({}).optional().describe(`Host supports structured content.`)});H({method:q(`ui/notifications/request-teardown`),params:H({}).optional()});var Kh=H({experimental:G(L(),G(L(),mc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:H({}).optional().describe(`Host supports opening external URLs.`),downloadFile:H({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:H({listChanged:z().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:H({listChanged:z().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:H({}).optional().describe(`Host accepts log messages.`),sandbox:H({permissions:Lh.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:Ih.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Gh.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Gh.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:H({tools:H({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),qh=H({experimental:G(L(),G(L(),mc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:H({listChanged:z().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:V(jh).optional().describe(`Display modes the app supports.`)});H({method:q(`ui/notifications/initialized`),params:H({}).optional()}),H({csp:Ih.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:Lh.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:L().optional().describe(`Dedicated origin for view sandbox.
|
|
1566
|
+
|
|
1567
|
+
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
1568
|
+
|
|
1569
|
+
**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:
|
|
1570
|
+
- Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`)
|
|
1571
|
+
- URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`)
|
|
1572
|
+
|
|
1573
|
+
If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:z().optional().describe(`Visual boundary preference - true if view prefers a visible border.
|
|
1574
|
+
|
|
1575
|
+
Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.
|
|
1576
|
+
|
|
1577
|
+
- \`true\`: request visible border + background
|
|
1578
|
+
- \`false\`: request no visible border + background
|
|
1579
|
+
- omitted: host decides border`)}),H({method:q(`ui/request-display-mode`),params:H({mode:jh.describe(`The display mode being requested.`)})});var Jh=H({mode:jh.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),Yh=W([q(`model`),q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);H({resourceUri:L().optional(),visibility:V(Yh).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
1580
|
+
- "model": Tool visible to and callable by the agent
|
|
1581
|
+
- "app": Tool callable by the app from this server only`),csp:_c().optional(),permissions:_c().optional()}),H({mimeTypes:V(L()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),H({method:q(`ui/download-file`),params:H({contents:V(W([Ku,qu])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),H({method:q(`ui/message`),params:H({role:q(`user`).describe(`Message role, currently only "user" is supported.`),content:V(Ju).describe(`Message content blocks (text, image, etc.).`)})}),H({method:q(`ui/notifications/sandbox-resource-ready`),params:H({html:L().describe(`HTML content to load into the inner iframe.`),sandbox:L().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:Ih.optional().describe(`CSP configuration from resource metadata.`),permissions:Lh.optional().describe(`Sandbox permissions from resource metadata.`)})});var Xh=H({method:q(`ui/notifications/tool-result`),params:rd.describe(`Standard MCP tool execution result.`)}),Zh=H({toolInfo:H({id:Ol.optional().describe(`JSON-RPC id of the tools/call request.`),tool:ed.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Ah.optional().describe(`Current color theme preference.`),styles:Hh.optional().describe(`Style configuration for theming the app.`),displayMode:jh.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:V(jh).optional().describe(`Display modes the host supports.`),containerDimensions:W([H({height:R().describe(`Fixed container height in pixels.`)}),H({maxHeight:W([R(),uc()]).optional().describe(`Maximum container height in pixels.`)})]).and(W([H({width:R().describe(`Fixed container width in pixels.`)}),H({maxWidth:W([R(),uc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
1582
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:L().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:L().optional().describe(`User's timezone in IANA format.`),userAgent:L().optional().describe(`Host application identifier.`),platform:W([q(`web`),q(`desktop`),q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:H({touch:z().optional().describe(`Whether the device supports touch input.`),hover:z().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:H({top:R().describe(`Top safe area inset in pixels.`),right:R().describe(`Right safe area inset in pixels.`),bottom:R().describe(`Bottom safe area inset in pixels.`),left:R().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),Qh=H({method:q(`ui/notifications/host-context-changed`),params:Zh.describe(`Partial context update containing only changed fields.`)});H({method:q(`ui/update-model-context`),params:H({content:V(Ju).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:G(L(),B().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),H({method:q(`ui/initialize`),params:H({appInfo:Vl.describe(`App identification (name and version).`),appCapabilities:qh.describe(`Features and capabilities this app provides.`),protocolVersion:L().describe(`Protocol version this app supports.`)})});var $h=H({protocolVersion:L().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Vl.describe(`Host application identification and version.`),hostCapabilities:Kh.describe(`Features and capabilities provided by the host.`),hostContext:Zh.describe(`Rich context about the host environment.`)}).passthrough(),eg={target:`draft-2020-12`};async function tg(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](eg);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function ng(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function rg(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var ig=class e extends ih{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new Ch;_methods=new wh;setRequestHandler=(...e)=>{let[t,...n]=Eh(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=Eh(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Rh,toolinputpartial:zh,toolresult:Xh,toolcancelled:Bh,hostcontextchanged:Qh};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&nt({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=rg(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await ng(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await ng(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await tg(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await tg(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:Uh.shape.params,result:Wh},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Fh,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Fl,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Nh,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Ph,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},Jh,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new kh(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:Oh}},$h,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function ag(e){return e.length>14?`${e.slice(0,8)}…${e.slice(-6)}`:e}function og(e){let t=new Date(e);return Number.isFinite(t.getTime())?`${t.toISOString().slice(0,19).replace(`T`,` `)} UTC`:typeof e==`number`?`${e} milliseconds since 1970-01-01T00:00:00Z`:e}function sg(e,t,n){let r=document.createElement(e);return t&&(r.className=t),n!==void 0&&(r.textContent=n),r}function cg(e,t,n=`primary`){let r=document.createElement(`button`);return r.type=`button`,r.className=n===`primary`?`ui-btn ui-btn--primary`:n===`danger`?`ui-btn ui-btn--danger`:`ui-btn`,r.textContent=e,r.addEventListener(`click`,t),r}function lg(e){let t=sg(`section`,`ui-section`);return e&&t.append(sg(`h2`,`ui-section-title`,e)),t}function ug(e,t){let n=sg(`div`,`ui-row`);n.append(sg(`span`,`ui-row-label`,e));let r=sg(`span`,`ui-row-value`);return typeof t==`string`?r.textContent=t:r.append(t),n.append(r),n}function dg(e,t=!1){let n=document.createElement(`details`);n.className=`ui-accordion`,n.open=t;let r=document.createElement(`summary`);r.className=`ui-accordion-summary`,r.append(sg(`span`,void 0,e));let i=sg(`div`,`ui-accordion-body`);return n.append(r,i),{details:n,body:i}}function fg(e){return sg(`span`,`ui-mono`,e)}function pg(e){let t=fg(ag(e));return t.title=e,t.setAttribute(`aria-label`,e),t.tabIndex=0,t}function mg(e){let t=sg(`time`,void 0,og(e));return t.dateTime=e,t.title=e,t.setAttribute(`aria-label`,e),t}var hg=/^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i,gg=/^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i,_g=235;function vg(e){return e.length>_g?!1:e.includes(`@`)?hg.test(e):gg.test(e)}var yg=/^([a-z0-9]+(?:-[a-z0-9]+)*)$/,bg=/^\d+$/,xg=64,Sg=e=>{let t=e.split(`/`);if(t.length<2||t.length>3)return!1;let[n,r,i]=t;return i!==void 0&&!bg.test(i)||!vg(n)?!1:yg.test(r)&&r.length<xg},Cg=e=>Object.freeze(e());function wg(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}function Tg(e){if(!wg(e))throw TypeError(`Uint8Array expected`)}function Eg(e,t){if(typeof t!=`string`)throw TypeError(`${e}: string expected`);return!0}var Dg=(()=>{try{let e=new TextDecoder;return e.decode(Uint8Array.of(65,48,43,127))===`A0+`?e:void 0}catch{return}})(),Og=8192;function kg(e){let t=e.length;if(Dg!==void 0&&t>=12)return Dg.decode(e);if(t<=Og)return String.fromCharCode.apply(null,e);let n=``;for(let r=0;r<t;r+=Og)n+=String.fromCharCode.apply(null,e.subarray(r,r+Og));return n}function Ag(e,t){let n=e.length;if(n>128)throw Error(`alphabet: max 128 letters`);let r=new Uint8Array(n),i=new Int8Array(128).fill(-1);for(let t=0;t<n;t++){let n=e.charCodeAt(t);if(e.codePointAt(t)!==n||n>127)throw Error(`alphabet: single-char ASCII letters only`);r[t]=n,i[n]=t}if(t!==void 0)for(let e of Object.keys(t)){let n=e.charCodeAt(0),r=i[t[e].charCodeAt(0)];if(e.length!==1||n>127||r===void 0||r===-1)throw Error(`alphabet: invalid alias ${e}`);i[n]=r}return{encode:e=>{let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){let i=e[n],a=r[i];if(a===void 0)throw Error(`alphabet.encode: invalid digit ${i}`);t[n]=a}return kg(t)},decode:t=>{Eg(`decode`,t);let n=t.length,r=new Uint8Array(n);for(let a=0;a<n;a++){let n=t.charCodeAt(a),o=n<128?i[n]:-1;if(o===-1)throw Error(`Unknown letter "${t[a]}". Allowed: ${e}`);r[a]=o}return r}}}var jg=656356768,Mg=65536,Ng=2048,Pg=4096,Fg=(e,t)=>({encode:n=>{Tg(n);let r=n.length;if(r===0)return new Uint8Array;if(r>=Mg)throw Error(`invalid length`);let i=0;for(;i<r-1&&n[i]===0;)i++;let a=Math.ceil(r/2),o=new Uint16Array(a),s=r&1;s&&(o[0]=n[0]);for(let e=s,t=s;e<r;e+=2,t++)o[t]=n[e]<<8|n[e+1];let c=[],l=0;for(;l<a;){let e=0;for(let n=l;n<a;n++){let r=e*65536+o[n],i=Math.floor(r/t);e=r-i*t,o[n]=i,i===0&&n===l&&l++}c.push(e)}let u=c.length-1,d=u*5;for(let t=c[u];d++,!(t<e);t=Math.floor(t/e));let f=new Uint8Array(i+d),p=f.length-1;for(let t=0;t<u;t++){let n=c[t];for(let t=0;t<5;t++)f[p--]=n%e,n=Math.floor(n/e)}for(let t=c[u];p>=i;t=Math.floor(t/e))f[p--]=t%e;return f},decode:t=>{Tg(t);let n=t.length;if(n===0)return new Uint8Array;if(n>=Mg)throw Error(`invalid length`);let r=0;for(;r<n-1&&t[r]===0;)r++;let i=new Uint16Array(Math.ceil(n*6/16)+1),a=0,o=0,s=n%5||5;for(;o<n;){let n=0,r=1;for(let i=o+s;o<i;o++){let i=t[o];if(i>=e)throw Error(`invalid integer: ${i}`);n=n*e+i,r*=e}s=5;let c=n;for(let e=0;e<a;e++){let t=i[e]*r+c;c=Math.floor(t/65536),i[e]=t-c*65536}for(;c>0;c=Math.floor(c/65536))i[a++]=c%65536}let c=a===0?1:a*2-(i[a-1]<256),l=new Uint8Array(r+c),u=l.length-1;for(let e=0;e<a;e++){let t=i[e];l[u--]=t&255,u>=r&&(l[u--]=t>>8)}return l}}),Ig=(e,t)=>{let n=Ag(t);return{encode(t){if(Tg(t),t.length>Ng)throw Error(`invalid length`);return n.encode(e.encode(t))},decode(t){if(Eg(`baseN.decode`,t),t.length>Pg)throw Error(`invalid length`);return e.decode(n.decode(t))}}},Lg=Fg(58,jg),Rg=e=>Ig(Lg,e),zg=Cg(()=>Rg(`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`)),Bg=e=>zg.decode(e);function Vg(e,t=[`<`,`>`]){let[n,r]=t,i=[],a=``,o=0;for(let t=0;t<e.length;t++){let s=e[t];s===n&&o++,s===r&&o--,o===0&&s===`,`?(i.push(a.trim()),a=``):a+=s}return i.push(a.trim()),i}var Hg=32;function Ug(e){try{return Bg(e).length===Hg}catch{return!1}}function Wg(e){return Yg(e)&&Xg(e)===32}function Gg(e){if(e.startsWith(`vector<`)){if(!e.endsWith(`>`))throw Error(`Invalid type tag: ${e}`);let t=e.slice(7,-1);if(!t)throw Error(`Invalid type tag: ${e}`);let n=Gg(t);return typeof n==`string`?`vector<${n}>`:`vector<${qg(n)}>`}return e.includes(`::`)?Kg(e):e}function Kg(e){let t=e.split(`::`);if(t.length<3)throw Error(`Invalid struct tag: ${e}`);let[n,r]=t;if(!n||!r)throw Error(`Invalid struct tag: ${e}`);let i=Sg(n),a=e.slice(n.length+r.length+4),o=a.includes(`<`)?a.slice(0,a.indexOf(`<`)):a;if(!o||a.includes(`<`)&&!a.endsWith(`>`))throw Error(`Invalid struct tag: ${e}`);let s=a.includes(`<`)?Vg(a.slice(a.indexOf(`<`)+1,a.lastIndexOf(`>`))).map(e=>Gg(e.trim())):[];return{address:i?n:Jg(n),module:r,name:o,typeParams:s}}function qg(e){if(typeof e==`string`&&e.startsWith(`vector<`))throw Error(`normalizeStructTag does not support vector types. Use normalizeTypeTag instead.`);let{address:t,module:n,name:r,typeParams:i}=typeof e==`string`?Kg(e):e;return`${t}::${n}::${r}${i?.length>0?`<${i.map(e=>typeof e==`string`?e:qg(e)).join(`,`)}>`:``}`}function Jg(e,t=!1){let n=e.toLowerCase();return!t&&n.startsWith(`0x`)&&(n=n.slice(2)),`0x${n.padStart(64,`0`)}`}function Yg(e){return/^(0x|0X)?[a-fA-F0-9]+$/.test(e)&&e.length%2==0}function Xg(e){return/^(0x|0X)/.test(e)?(e.length-2)/2:e.length/2}function Zg(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}var Qg=e=>e?`"${e}" `:``;function $g(e,t=``){if(typeof e!=`number`)throw TypeError(Qg(t)+`expected number, got `+typeof e);if(!Number.isSafeInteger(e)||e<0)throw RangeError(Qg(t)+`expected integer >= 0, got `+e);return e}function e_(e,t,n=``){if(Zg(e)&&(t===void 0||e.length===t))return e;t!==void 0&&$g(t,`length`);let r=Zg(e),i=t===void 0?``:` of length ${t}`,a=r?`length=${e.length}`:`type=${typeof e}`,o=Qg(n)+`expected Uint8Array`+i+`, got `+a;throw r?RangeError(o):TypeError(o)}var t_=(e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError((t===`object`?``:`"${t}" `)+`expected object, got type=`+typeof e)},n_=(e,t)=>{t_(e,t);let n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,`__proto__`))throw TypeError(`"${t}.__proto__" is not allowed`)};function r_(e,t=!0){if(e.destroyed)throw Error(`hash was destroyed`);if(t&&e.finished)throw Error(`digest() was already called`)}function i_(e,t){e_(e,void 0,`output`);let n=t.outputLen;if(!(e.length>=n))throw RangeError(`"output" expected length >= `+n)}function a_(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function o_(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function s_(e,t){return e<<32-t|e>>>t}function c_(e,t,n=`opts`){return n_(e,`defaults`),t!==void 0&&n_(t,n),Object.assign(Object.create(null),e,t)}function l_(e,t={}){if(typeof e!=`function`)throw TypeError(`"hashCons" expected function, got type=`+typeof e);t=c_({},t,`info`);let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}var u_=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])}),d_=e=>e/2**32|0,f_=e=>e>>>0;function p_(e,t,n,r){let i=d_(n),a=f_(n);e.setUint32(t,r?a:i,r),e.setUint32(t+4,r?i:a,r)}function m_(e,t,n){return e&t^~e&n}function h_(e,t,n){return e&t^e&n^t&n}var g_=class{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=o_(this.buffer)}update(e){r_(this),e_(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length,a=!1;for(let o=0;o<i;){let s=Math.min(r-this.pos,i-o);if(s===r){let t=o_(e);for(;r<=i-o;o+=r)this.process(t,o);a=!0}else n.set(o===0&&s===i?e:e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===r&&(this.process(t,0),this.pos=0,a=!0)}return this.length+=e.length,a&&this.roundClean(),this}digestInto(e){r_(this),i_(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,t.fill(0,a),this.padOffset>r-a&&(this.process(n,0),t.fill(0)),p_(n,r-8,this.length*8,i),this.process(n,0),this.roundClean();let o=e===t?n:o_(e),s=this.outputLen,c=s/4,l=this.get();if(s%4||c>l.length)throw Error(`invalid outputLen`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneIntoMeta(e){let{buffer:t,length:n,finished:r,destroyed:i,pos:a}=this;return e.destroyed=i,e.finished=r,e.length=n,e.pos=a,a&&e.buffer.set(t),e}clone(){return this._cloneInto()}},__=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),v_=`0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI`,y_=L().refine(Wg,`Expected a 32-byte Sui address`),b_=L().refine(Ug,`Expected a Sui transaction digest`),x_=y_.transform(e=>Jg(e));function S_(e){let t=x_.safeParse(e);return t.success?t.data:void 0}var C_=[`sui:mainnet`,`eip155:1`,`solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`],w_=C_[0],T_=K(C_),E_=G(T_,R().int().nonnegative()),D_=V(T_).refine(e=>new Set(e).size===e.length,`Networks must be distinct`);function O_(e){let t=new Set(D_.parse(e));return C_.filter(e=>t.has(e))}var k_={"sui:mainnet":`Sui`,"eip155:1":`Ethereum`,"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":`Solana`};function A_(e,t){if(e===w_)return S_(t);if(e===`eip155:1`)return/^0x[0-9a-fA-F]{40}$/.test(t)?t.toLowerCase():void 0;try{return Bg(t).length===32?t:void 0}catch{return}}var j_=H({chainId:T_,address:L()}).strict().refine(e=>A_(e.chainId,e.address)===e.address,`Expected a normalized chain address`),M_=V(H({chainId:T_,accounts:V(H({address:L(),displayAddress:L().optional(),methods:V(L()),events:V(L())}).strict()),invalidAccounts:q(!0).optional()}).strict().superRefine((e,t)=>{(new Set(e.accounts.map(e=>e.address)).size!==e.accounts.length||e.invalidAccounts&&e.accounts.length||e.accounts.some(t=>A_(e.chainId,t.address)!==t.address||t.displayAddress!==void 0&&A_(e.chainId,t.displayAddress)!==t.address))&&t.addIssue({code:`custom`,message:`Wallet grant accounts must match their chain`})})).refine(e=>new Set(e.map(e=>e.chainId)).size===e.length,`Wallet grants must have distinct chains`),N_=V(Sc(`status`,[j_.safeExtend({status:q(`bound`)}).strict(),H({chainId:T_,status:K([`not_approved`,`multiple_accounts`,`invalid_response`])}).strict()])).refine(e=>new Set(e.map(e=>e.chainId)).size===e.length,`One result per requested chain is required`);H({accounts:V(L()),methods:V(L()),events:V(L())});var P_=(1n<<64n)-1n,F_=/^(?:0|[1-9][0-9]*)$/,I_=/^(?:0|-?[1-9][0-9]*)$/;function L_(e,t,n={}){if(!/^\d+$/.test(e))throw Error(`${t} must be an unsigned integer string`);let r=BigInt(e);if(n.positive&&r===0n)throw Error(`${t} must be positive`);if(r>P_)throw Error(`${t} must fit u64`);return r}function R_(e){let t=e===`rawAmount`?`amount`:e;return L().min(1).refine(t=>{try{return L_(t,e),!0}catch{return!1}},`Expected a raw u64 ${t} string`)}function z_(e,t,n={}){if(!F_.test(e))throw Error(`${t} must be a canonical unsigned integer string`);return L_(e,t,n)}function B_(e){return L().min(1).refine(t=>{try{return z_(t,e),!0}catch{return!1}},`Expected an unsigned integer string`)}function V_(e,t){if(!I_.test(e))throw Error(`${t} must be a signed integer string`);return BigInt(e)}function H_(e){return L().min(1).refine(t=>{try{return V_(t,e),!0}catch{return!1}},`Expected a signed integer string`)}function U_(e){return qg(e)}var W_=[`transaction`,`effects`,`balanceChanges`,`objectTypes`],G_=L().refine(e=>{let t=new Date(e);return Number.isFinite(t.getTime())&&t.toISOString()===e},`Expected ISO 8601 UTC timestamp`),K_=V(K(W_)).length(W_.length).superRefine((e,t)=>{for(let n of W_)e.includes(n)||t.addIssue({code:`custom`,path:[],message:`chain receipt include is missing '${n}'`});new Set(e).size!==e.length&&t.addIssue({code:`custom`,path:[],message:`chain receipt include fields must not be duplicated`})}),q_=L().min(1).max(512).refine(e=>{try{return U_(e),!0}catch{return!1}},`Expected a Sui struct tag coin type`),J_=H({commandIndex:R().int().nonnegative(),packageId:y_,module:L().min(1).max(128),function:L().min(1).max(128),target:L().min(1).max(512)}).strict().superRefine((e,t)=>{let n=`${e.packageId}::${e.module}::${e.function}`;e.target!==n&&t.addIssue({code:`custom`,path:[`target`],message:`package call target must match packageId::module::function`})}),Y_=H({index:R().int().nonnegative(),coinType:q_,amountRaw:H_(`accountBalanceChanges[].amountRaw`),direction:K([`increase`,`decrease`,`zero`])}).strict().superRefine((e,t)=>{let n=V_(e.amountRaw,`accountBalanceChanges[].amountRaw`),r=n>0n?`increase`:n<0n?`decrease`:`zero`;e.direction!==r&&t.addIssue({code:`custom`,path:[`direction`],message:`balance change direction must match amountRaw sign`})}),X_=Sc(`success`,[H({success:q(!0),errorKind:_c().optional(),errorMessage:_c().optional()}).strict(),H({success:q(!1),errorKind:L().min(1).max(200).optional(),errorMessage:L().min(1).max(2e3).optional()}).strict()]),Z_=H({kind:q(`sui_chain_receipt_v1`),source:H({method:q(`client.core.getTransaction`),network:q(`sui:mainnet`),chainIdentifier:L().min(1),fetchedAt:G_,include:K_}).strict(),txDigest:b_,sender:y_,effectsStatus:X_,packageCalls:V(J_),accountBalanceChanges:V(Y_),objectTypes:G(y_,L().min(1).max(512))}).strict(),Q_=K([`awaiting_signature`,`submitting`,`awaiting_chain_result`,`stopped`,`request_failed`,`outcome_unknown`,`completed`]),$_=H({reviewSessionId:L().min(1),attemptId:L().min(1),planId:L().min(1),status:K([`success`,`failure`]),txDigest:b_,chainReceipt:Z_,failureReason:q(`chain_execution_failed`).optional(),recordedAt:L().datetime()}).strict().superRefine((e,t)=>{(e.txDigest!==e.chainReceipt.txDigest||e.status===`success`!==e.chainReceipt.effectsStatus.success)&&t.addIssue({code:`custom`,message:`Execution must match the observed chain receipt.`}),e.status===`failure`!=(e.failureReason!==void 0)&&t.addIssue({code:`custom`,message:`Only a chain failure has a chain execution failure reason.`})}),ev=H({attemptId:L().min(1),reviewSessionId:L().min(1),planId:L().min(1),reviewRevision:R().int().nonnegative(),account:y_,transactionDigest:b_,requestStatus:Q_,revision:R().int().nonnegative(),createdAt:L().datetime(),updatedAt:L().datetime(),signatureVerifiedAt:L().datetime().optional(),submittedAt:L().datetime().optional(),reason:L().optional(),execution:$_.optional()}).strict().superRefine((e,t)=>{let n=e.execution;e.requestStatus===`completed`!=(n!==void 0)&&t.addIssue({code:`custom`,message:`Completed requests require an observed execution result.`}),n&&(n.attemptId!==e.attemptId||n.reviewSessionId!==e.reviewSessionId||n.planId!==e.planId||n.txDigest!==e.transactionDigest||n.chainReceipt.sender!==e.account)&&t.addIssue({code:`custom`,message:`Execution identity differs from the admitted request.`})}),tv=L().uuid(),nv=K([`process_start`,`sdk_start`,`session_restore`,`state_sync`]),rv=K([`initialization_failed`,`restoration_failed`,`wallet_state_unavailable`]),iv=Sc(`status`,[H({status:q(`available`),walletRunId:tv}).strict(),H({status:q(`initializing`),walletRunId:tv,stage:nv,message:L()}).strict(),H({status:q(`recovering`),walletRunId:tv,message:L()}).strict(),H({status:q(`unavailable`),walletRunId:tv.optional(),reason:rv,message:L()}).strict()]),av=Sc(`status`,[H({status:q(`idle`)}).strict(),H({status:q(`waiting`)}).strict(),H({status:q(`unavailable`),reason:q(`wallet_unavailable`),message:L()}).strict()]),ov=K([`awaiting_approval`,`connected`,`rejected`,`failed`,`expired`,`stopped`,`disconnected`]);H({runId:L().uuid(),connections:V(H({connectionId:L().min(1),revision:R().int().nonnegative(),status:ov,chainResults:N_,walletName:L().optional(),sdkPending:z(),disconnectPending:z()}).strict()),preparations:V(H({id:L().min(1),revision:R().int().nonnegative(),review_revision:R().int().nonnegative(),preparation_id:L().nullable(),wallet_connection_id:L().nullable()}).strict()),requests:V(H({attempt_id:L().min(1),revision:R().int().nonnegative(),request_status:Q_,can_submit:R().int().min(0).max(1),sdk_pending:R().int().min(0).max(1),submit_pending:R().int().min(0).max(1),lookup_pending:R().int().min(0).max(1)}).strict())}).strict();var sv=H({connectionId:L().min(1),status:ov,revision:R().int().nonnegative(),requestedChains:D_,chainResults:N_,approvedAt:L().datetime().optional(),grants:M_,grantRevisions:E_,lifecycleRevision:R().int().nonnegative(),createdAt:L().datetime(),updatedAt:L().datetime(),expiresAt:L().datetime(),walletName:L().optional(),reason:L().optional()}).strict().superRefine((e,t)=>{(e.chainResults.some(t=>!e.requestedChains.includes(t.chainId))||e.approvedAt&&e.chainResults.length!==e.requestedChains.length||!e.approvedAt&&e.chainResults.length)&&t.addIssue({code:`custom`,message:`Approval results must match the exact requested networks.`})}),cv=H({chainId:T_,status:K([`available`,`multiple_accounts`,`not_approved`,`invalid_response`,`unavailable`]),address:L().optional(),suiSigningScopeApproved:z(),reason:L().optional()}).strict(),lv=Sc(`status`,[H({status:q(`available`),account:L()}).strict(),H({status:q(`address_required`),reason:q(`read_address_cleared`).optional()}).strict()]),uv=[`connect`,`disconnect`,`stop_connection`,`prepare_review`,`request_signature`,`cancel`,`stop_waiting`,`read_result`],dv=[`none`,`wait`,`check_status`,`open_settings`,`request_disconnect`,`request_review`],fv=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),pv=new Uint32Array(64),mv=class extends g_{A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;constructor(e,t){super(64,e,8,!1),this.A=t[0]|0,this.B=t[1]|0,this.C=t[2]|0,this.D=t[3]|0,this.E=t[4]|0,this.F=t[5]|0,this.G=t[6]|0,this.H=t[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}_cloneInto(e){return(e||=new this.constructor).set(...this.get()),this._cloneIntoMeta(e)}process(e,t){for(let n=0;n<16;n++,t+=4)pv[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=pv[e-15],n=pv[e-2],r=s_(t,7)^s_(t,18)^t>>>3,i=s_(n,17)^s_(n,19)^n>>>10;pv[e]=i+pv[e-7]+r+pv[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=s_(o,6)^s_(o,11)^s_(o,25),u=l+t+m_(o,s,c)+fv[e]+pv[e]|0,d=(s_(n,2)^s_(n,13)^s_(n,22))+h_(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){a_(pv)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),a_(this.buffer)}},hv=class extends mv{constructor(){super(32,__)}},gv=l_(()=>new hv,u_(1));function _v(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){if(t+1>=e.length)return!1;let n=e.charCodeAt(++t);if(n<56320||n>57343)return!1}else if(n>=56320&&n<=57343)return!1}return!0}function vv(e){if(typeof e!=`string`)throw TypeError(`invalid mnemonic type: `+typeof e);if(!_v(e))throw TypeError(`expected well-formed Unicode string`);return e.normalize(`NFKD`)}function yv(e){let t=vv(e),n=t.split(` `);if(![12,15,18,21,24].includes(n.length))throw Error(`Invalid mnemonic`);return{nfkd:t,words:n}}function bv(e){if(e_(e),![16,20,24,28,32].includes(e.length))throw RangeError(`invalid entropy length`)}var xv=e=>{let t=8-e.length/4;return gv(e)[0]>>t<<t};function Sv(e){if(!Array.isArray(e)||e.length!==2048||typeof e[0]!=`string`)throw TypeError(`Wordlist: expected array of 2048 strings`);e.forEach(e=>{if(typeof e!=`string`)throw TypeError(`wordlist: non-string element: `+e);if(!_v(e))throw TypeError(`wordlist: expected well-formed Unicode string`)})}function Cv(e,t){Sv(t);let n=e.length/3*4,r=new Uint8Array(n+1),i=0,a=0,o=0;for(let n of e){let e=t.indexOf(n);if(e===-1)throw Error(`Unknown word: `+n);for(i=i<<11|e,a+=11;a>=8;)a-=8,r[o++]=i>>>a&255;i&=(1<<a)-1}a>0&&(r[o]=i<<8-a);let s=r.subarray(0,n);if(r[n]!==xv(s))throw Error(`Invalid checksum`);return Uint8Array.from(s)}function wv(e,t){let{words:n}=yv(e),r=Cv(n,t);return bv(r),r}function Tv(e,t){try{wv(e,t)}catch{return!1}return!0}var Ev=Object.freeze(`abandon
|
|
1583
|
+
ability
|
|
1584
|
+
able
|
|
1585
|
+
about
|
|
1586
|
+
above
|
|
1587
|
+
absent
|
|
1588
|
+
absorb
|
|
1589
|
+
abstract
|
|
1590
|
+
absurd
|
|
1591
|
+
abuse
|
|
1592
|
+
access
|
|
1593
|
+
accident
|
|
1594
|
+
account
|
|
1595
|
+
accuse
|
|
1596
|
+
achieve
|
|
1597
|
+
acid
|
|
1598
|
+
acoustic
|
|
1599
|
+
acquire
|
|
1600
|
+
across
|
|
1601
|
+
act
|
|
1602
|
+
action
|
|
1603
|
+
actor
|
|
1604
|
+
actress
|
|
1605
|
+
actual
|
|
1606
|
+
adapt
|
|
1607
|
+
add
|
|
1608
|
+
addict
|
|
1609
|
+
address
|
|
1610
|
+
adjust
|
|
1611
|
+
admit
|
|
1612
|
+
adult
|
|
1613
|
+
advance
|
|
1614
|
+
advice
|
|
1615
|
+
aerobic
|
|
1616
|
+
affair
|
|
1617
|
+
afford
|
|
1618
|
+
afraid
|
|
1619
|
+
again
|
|
1620
|
+
age
|
|
1621
|
+
agent
|
|
1622
|
+
agree
|
|
1623
|
+
ahead
|
|
1624
|
+
aim
|
|
1625
|
+
air
|
|
1626
|
+
airport
|
|
1627
|
+
aisle
|
|
1628
|
+
alarm
|
|
1629
|
+
album
|
|
1630
|
+
alcohol
|
|
1631
|
+
alert
|
|
1632
|
+
alien
|
|
1633
|
+
all
|
|
1634
|
+
alley
|
|
1635
|
+
allow
|
|
1636
|
+
almost
|
|
1637
|
+
alone
|
|
1638
|
+
alpha
|
|
1639
|
+
already
|
|
1640
|
+
also
|
|
1641
|
+
alter
|
|
1642
|
+
always
|
|
1643
|
+
amateur
|
|
1644
|
+
amazing
|
|
1645
|
+
among
|
|
1646
|
+
amount
|
|
1647
|
+
amused
|
|
1648
|
+
analyst
|
|
1649
|
+
anchor
|
|
1650
|
+
ancient
|
|
1651
|
+
anger
|
|
1652
|
+
angle
|
|
1653
|
+
angry
|
|
1654
|
+
animal
|
|
1655
|
+
ankle
|
|
1656
|
+
announce
|
|
1657
|
+
annual
|
|
1658
|
+
another
|
|
1659
|
+
answer
|
|
1660
|
+
antenna
|
|
1661
|
+
antique
|
|
1662
|
+
anxiety
|
|
1663
|
+
any
|
|
1664
|
+
apart
|
|
1665
|
+
apology
|
|
1666
|
+
appear
|
|
1667
|
+
apple
|
|
1668
|
+
approve
|
|
1669
|
+
april
|
|
1670
|
+
arch
|
|
1671
|
+
arctic
|
|
1672
|
+
area
|
|
1673
|
+
arena
|
|
1674
|
+
argue
|
|
1675
|
+
arm
|
|
1676
|
+
armed
|
|
1677
|
+
armor
|
|
1678
|
+
army
|
|
1679
|
+
around
|
|
1680
|
+
arrange
|
|
1681
|
+
arrest
|
|
1682
|
+
arrive
|
|
1683
|
+
arrow
|
|
1684
|
+
art
|
|
1685
|
+
artefact
|
|
1686
|
+
artist
|
|
1687
|
+
artwork
|
|
1688
|
+
ask
|
|
1689
|
+
aspect
|
|
1690
|
+
assault
|
|
1691
|
+
asset
|
|
1692
|
+
assist
|
|
1693
|
+
assume
|
|
1694
|
+
asthma
|
|
1695
|
+
athlete
|
|
1696
|
+
atom
|
|
1697
|
+
attack
|
|
1698
|
+
attend
|
|
1699
|
+
attitude
|
|
1700
|
+
attract
|
|
1701
|
+
auction
|
|
1702
|
+
audit
|
|
1703
|
+
august
|
|
1704
|
+
aunt
|
|
1705
|
+
author
|
|
1706
|
+
auto
|
|
1707
|
+
autumn
|
|
1708
|
+
average
|
|
1709
|
+
avocado
|
|
1710
|
+
avoid
|
|
1711
|
+
awake
|
|
1712
|
+
aware
|
|
1713
|
+
away
|
|
1714
|
+
awesome
|
|
1715
|
+
awful
|
|
1716
|
+
awkward
|
|
1717
|
+
axis
|
|
1718
|
+
baby
|
|
1719
|
+
bachelor
|
|
1720
|
+
bacon
|
|
1721
|
+
badge
|
|
1722
|
+
bag
|
|
1723
|
+
balance
|
|
1724
|
+
balcony
|
|
1725
|
+
ball
|
|
1726
|
+
bamboo
|
|
1727
|
+
banana
|
|
1728
|
+
banner
|
|
1729
|
+
bar
|
|
1730
|
+
barely
|
|
1731
|
+
bargain
|
|
1732
|
+
barrel
|
|
1733
|
+
base
|
|
1734
|
+
basic
|
|
1735
|
+
basket
|
|
1736
|
+
battle
|
|
1737
|
+
beach
|
|
1738
|
+
bean
|
|
1739
|
+
beauty
|
|
1740
|
+
because
|
|
1741
|
+
become
|
|
1742
|
+
beef
|
|
1743
|
+
before
|
|
1744
|
+
begin
|
|
1745
|
+
behave
|
|
1746
|
+
behind
|
|
1747
|
+
believe
|
|
1748
|
+
below
|
|
1749
|
+
belt
|
|
1750
|
+
bench
|
|
1751
|
+
benefit
|
|
1752
|
+
best
|
|
1753
|
+
betray
|
|
1754
|
+
better
|
|
1755
|
+
between
|
|
1756
|
+
beyond
|
|
1757
|
+
bicycle
|
|
1758
|
+
bid
|
|
1759
|
+
bike
|
|
1760
|
+
bind
|
|
1761
|
+
biology
|
|
1762
|
+
bird
|
|
1763
|
+
birth
|
|
1764
|
+
bitter
|
|
1765
|
+
black
|
|
1766
|
+
blade
|
|
1767
|
+
blame
|
|
1768
|
+
blanket
|
|
1769
|
+
blast
|
|
1770
|
+
bleak
|
|
1771
|
+
bless
|
|
1772
|
+
blind
|
|
1773
|
+
blood
|
|
1774
|
+
blossom
|
|
1775
|
+
blouse
|
|
1776
|
+
blue
|
|
1777
|
+
blur
|
|
1778
|
+
blush
|
|
1779
|
+
board
|
|
1780
|
+
boat
|
|
1781
|
+
body
|
|
1782
|
+
boil
|
|
1783
|
+
bomb
|
|
1784
|
+
bone
|
|
1785
|
+
bonus
|
|
1786
|
+
book
|
|
1787
|
+
boost
|
|
1788
|
+
border
|
|
1789
|
+
boring
|
|
1790
|
+
borrow
|
|
1791
|
+
boss
|
|
1792
|
+
bottom
|
|
1793
|
+
bounce
|
|
1794
|
+
box
|
|
1795
|
+
boy
|
|
1796
|
+
bracket
|
|
1797
|
+
brain
|
|
1798
|
+
brand
|
|
1799
|
+
brass
|
|
1800
|
+
brave
|
|
1801
|
+
bread
|
|
1802
|
+
breeze
|
|
1803
|
+
brick
|
|
1804
|
+
bridge
|
|
1805
|
+
brief
|
|
1806
|
+
bright
|
|
1807
|
+
bring
|
|
1808
|
+
brisk
|
|
1809
|
+
broccoli
|
|
1810
|
+
broken
|
|
1811
|
+
bronze
|
|
1812
|
+
broom
|
|
1813
|
+
brother
|
|
1814
|
+
brown
|
|
1815
|
+
brush
|
|
1816
|
+
bubble
|
|
1817
|
+
buddy
|
|
1818
|
+
budget
|
|
1819
|
+
buffalo
|
|
1820
|
+
build
|
|
1821
|
+
bulb
|
|
1822
|
+
bulk
|
|
1823
|
+
bullet
|
|
1824
|
+
bundle
|
|
1825
|
+
bunker
|
|
1826
|
+
burden
|
|
1827
|
+
burger
|
|
1828
|
+
burst
|
|
1829
|
+
bus
|
|
1830
|
+
business
|
|
1831
|
+
busy
|
|
1832
|
+
butter
|
|
1833
|
+
buyer
|
|
1834
|
+
buzz
|
|
1835
|
+
cabbage
|
|
1836
|
+
cabin
|
|
1837
|
+
cable
|
|
1838
|
+
cactus
|
|
1839
|
+
cage
|
|
1840
|
+
cake
|
|
1841
|
+
call
|
|
1842
|
+
calm
|
|
1843
|
+
camera
|
|
1844
|
+
camp
|
|
1845
|
+
can
|
|
1846
|
+
canal
|
|
1847
|
+
cancel
|
|
1848
|
+
candy
|
|
1849
|
+
cannon
|
|
1850
|
+
canoe
|
|
1851
|
+
canvas
|
|
1852
|
+
canyon
|
|
1853
|
+
capable
|
|
1854
|
+
capital
|
|
1855
|
+
captain
|
|
1856
|
+
car
|
|
1857
|
+
carbon
|
|
1858
|
+
card
|
|
1859
|
+
cargo
|
|
1860
|
+
carpet
|
|
1861
|
+
carry
|
|
1862
|
+
cart
|
|
1863
|
+
case
|
|
1864
|
+
cash
|
|
1865
|
+
casino
|
|
1866
|
+
castle
|
|
1867
|
+
casual
|
|
1868
|
+
cat
|
|
1869
|
+
catalog
|
|
1870
|
+
catch
|
|
1871
|
+
category
|
|
1872
|
+
cattle
|
|
1873
|
+
caught
|
|
1874
|
+
cause
|
|
1875
|
+
caution
|
|
1876
|
+
cave
|
|
1877
|
+
ceiling
|
|
1878
|
+
celery
|
|
1879
|
+
cement
|
|
1880
|
+
census
|
|
1881
|
+
century
|
|
1882
|
+
cereal
|
|
1883
|
+
certain
|
|
1884
|
+
chair
|
|
1885
|
+
chalk
|
|
1886
|
+
champion
|
|
1887
|
+
change
|
|
1888
|
+
chaos
|
|
1889
|
+
chapter
|
|
1890
|
+
charge
|
|
1891
|
+
chase
|
|
1892
|
+
chat
|
|
1893
|
+
cheap
|
|
1894
|
+
check
|
|
1895
|
+
cheese
|
|
1896
|
+
chef
|
|
1897
|
+
cherry
|
|
1898
|
+
chest
|
|
1899
|
+
chicken
|
|
1900
|
+
chief
|
|
1901
|
+
child
|
|
1902
|
+
chimney
|
|
1903
|
+
choice
|
|
1904
|
+
choose
|
|
1905
|
+
chronic
|
|
1906
|
+
chuckle
|
|
1907
|
+
chunk
|
|
1908
|
+
churn
|
|
1909
|
+
cigar
|
|
1910
|
+
cinnamon
|
|
1911
|
+
circle
|
|
1912
|
+
citizen
|
|
1913
|
+
city
|
|
1914
|
+
civil
|
|
1915
|
+
claim
|
|
1916
|
+
clap
|
|
1917
|
+
clarify
|
|
1918
|
+
claw
|
|
1919
|
+
clay
|
|
1920
|
+
clean
|
|
1921
|
+
clerk
|
|
1922
|
+
clever
|
|
1923
|
+
click
|
|
1924
|
+
client
|
|
1925
|
+
cliff
|
|
1926
|
+
climb
|
|
1927
|
+
clinic
|
|
1928
|
+
clip
|
|
1929
|
+
clock
|
|
1930
|
+
clog
|
|
1931
|
+
close
|
|
1932
|
+
cloth
|
|
1933
|
+
cloud
|
|
1934
|
+
clown
|
|
1935
|
+
club
|
|
1936
|
+
clump
|
|
1937
|
+
cluster
|
|
1938
|
+
clutch
|
|
1939
|
+
coach
|
|
1940
|
+
coast
|
|
1941
|
+
coconut
|
|
1942
|
+
code
|
|
1943
|
+
coffee
|
|
1944
|
+
coil
|
|
1945
|
+
coin
|
|
1946
|
+
collect
|
|
1947
|
+
color
|
|
1948
|
+
column
|
|
1949
|
+
combine
|
|
1950
|
+
come
|
|
1951
|
+
comfort
|
|
1952
|
+
comic
|
|
1953
|
+
common
|
|
1954
|
+
company
|
|
1955
|
+
concert
|
|
1956
|
+
conduct
|
|
1957
|
+
confirm
|
|
1958
|
+
congress
|
|
1959
|
+
connect
|
|
1960
|
+
consider
|
|
1961
|
+
control
|
|
1962
|
+
convince
|
|
1963
|
+
cook
|
|
1964
|
+
cool
|
|
1965
|
+
copper
|
|
1966
|
+
copy
|
|
1967
|
+
coral
|
|
1968
|
+
core
|
|
1969
|
+
corn
|
|
1970
|
+
correct
|
|
1971
|
+
cost
|
|
1972
|
+
cotton
|
|
1973
|
+
couch
|
|
1974
|
+
country
|
|
1975
|
+
couple
|
|
1976
|
+
course
|
|
1977
|
+
cousin
|
|
1978
|
+
cover
|
|
1979
|
+
coyote
|
|
1980
|
+
crack
|
|
1981
|
+
cradle
|
|
1982
|
+
craft
|
|
1983
|
+
cram
|
|
1984
|
+
crane
|
|
1985
|
+
crash
|
|
1986
|
+
crater
|
|
1987
|
+
crawl
|
|
1988
|
+
crazy
|
|
1989
|
+
cream
|
|
1990
|
+
credit
|
|
1991
|
+
creek
|
|
1992
|
+
crew
|
|
1993
|
+
cricket
|
|
1994
|
+
crime
|
|
1995
|
+
crisp
|
|
1996
|
+
critic
|
|
1997
|
+
crop
|
|
1998
|
+
cross
|
|
1999
|
+
crouch
|
|
2000
|
+
crowd
|
|
2001
|
+
crucial
|
|
2002
|
+
cruel
|
|
2003
|
+
cruise
|
|
2004
|
+
crumble
|
|
2005
|
+
crunch
|
|
2006
|
+
crush
|
|
2007
|
+
cry
|
|
2008
|
+
crystal
|
|
2009
|
+
cube
|
|
2010
|
+
culture
|
|
2011
|
+
cup
|
|
2012
|
+
cupboard
|
|
2013
|
+
curious
|
|
2014
|
+
current
|
|
2015
|
+
curtain
|
|
2016
|
+
curve
|
|
2017
|
+
cushion
|
|
2018
|
+
custom
|
|
2019
|
+
cute
|
|
2020
|
+
cycle
|
|
2021
|
+
dad
|
|
2022
|
+
damage
|
|
2023
|
+
damp
|
|
2024
|
+
dance
|
|
2025
|
+
danger
|
|
2026
|
+
daring
|
|
2027
|
+
dash
|
|
2028
|
+
daughter
|
|
2029
|
+
dawn
|
|
2030
|
+
day
|
|
2031
|
+
deal
|
|
2032
|
+
debate
|
|
2033
|
+
debris
|
|
2034
|
+
decade
|
|
2035
|
+
december
|
|
2036
|
+
decide
|
|
2037
|
+
decline
|
|
2038
|
+
decorate
|
|
2039
|
+
decrease
|
|
2040
|
+
deer
|
|
2041
|
+
defense
|
|
2042
|
+
define
|
|
2043
|
+
defy
|
|
2044
|
+
degree
|
|
2045
|
+
delay
|
|
2046
|
+
deliver
|
|
2047
|
+
demand
|
|
2048
|
+
demise
|
|
2049
|
+
denial
|
|
2050
|
+
dentist
|
|
2051
|
+
deny
|
|
2052
|
+
depart
|
|
2053
|
+
depend
|
|
2054
|
+
deposit
|
|
2055
|
+
depth
|
|
2056
|
+
deputy
|
|
2057
|
+
derive
|
|
2058
|
+
describe
|
|
2059
|
+
desert
|
|
2060
|
+
design
|
|
2061
|
+
desk
|
|
2062
|
+
despair
|
|
2063
|
+
destroy
|
|
2064
|
+
detail
|
|
2065
|
+
detect
|
|
2066
|
+
develop
|
|
2067
|
+
device
|
|
2068
|
+
devote
|
|
2069
|
+
diagram
|
|
2070
|
+
dial
|
|
2071
|
+
diamond
|
|
2072
|
+
diary
|
|
2073
|
+
dice
|
|
2074
|
+
diesel
|
|
2075
|
+
diet
|
|
2076
|
+
differ
|
|
2077
|
+
digital
|
|
2078
|
+
dignity
|
|
2079
|
+
dilemma
|
|
2080
|
+
dinner
|
|
2081
|
+
dinosaur
|
|
2082
|
+
direct
|
|
2083
|
+
dirt
|
|
2084
|
+
disagree
|
|
2085
|
+
discover
|
|
2086
|
+
disease
|
|
2087
|
+
dish
|
|
2088
|
+
dismiss
|
|
2089
|
+
disorder
|
|
2090
|
+
display
|
|
2091
|
+
distance
|
|
2092
|
+
divert
|
|
2093
|
+
divide
|
|
2094
|
+
divorce
|
|
2095
|
+
dizzy
|
|
2096
|
+
doctor
|
|
2097
|
+
document
|
|
2098
|
+
dog
|
|
2099
|
+
doll
|
|
2100
|
+
dolphin
|
|
2101
|
+
domain
|
|
2102
|
+
donate
|
|
2103
|
+
donkey
|
|
2104
|
+
donor
|
|
2105
|
+
door
|
|
2106
|
+
dose
|
|
2107
|
+
double
|
|
2108
|
+
dove
|
|
2109
|
+
draft
|
|
2110
|
+
dragon
|
|
2111
|
+
drama
|
|
2112
|
+
drastic
|
|
2113
|
+
draw
|
|
2114
|
+
dream
|
|
2115
|
+
dress
|
|
2116
|
+
drift
|
|
2117
|
+
drill
|
|
2118
|
+
drink
|
|
2119
|
+
drip
|
|
2120
|
+
drive
|
|
2121
|
+
drop
|
|
2122
|
+
drum
|
|
2123
|
+
dry
|
|
2124
|
+
duck
|
|
2125
|
+
dumb
|
|
2126
|
+
dune
|
|
2127
|
+
during
|
|
2128
|
+
dust
|
|
2129
|
+
dutch
|
|
2130
|
+
duty
|
|
2131
|
+
dwarf
|
|
2132
|
+
dynamic
|
|
2133
|
+
eager
|
|
2134
|
+
eagle
|
|
2135
|
+
early
|
|
2136
|
+
earn
|
|
2137
|
+
earth
|
|
2138
|
+
easily
|
|
2139
|
+
east
|
|
2140
|
+
easy
|
|
2141
|
+
echo
|
|
2142
|
+
ecology
|
|
2143
|
+
economy
|
|
2144
|
+
edge
|
|
2145
|
+
edit
|
|
2146
|
+
educate
|
|
2147
|
+
effort
|
|
2148
|
+
egg
|
|
2149
|
+
eight
|
|
2150
|
+
either
|
|
2151
|
+
elbow
|
|
2152
|
+
elder
|
|
2153
|
+
electric
|
|
2154
|
+
elegant
|
|
2155
|
+
element
|
|
2156
|
+
elephant
|
|
2157
|
+
elevator
|
|
2158
|
+
elite
|
|
2159
|
+
else
|
|
2160
|
+
embark
|
|
2161
|
+
embody
|
|
2162
|
+
embrace
|
|
2163
|
+
emerge
|
|
2164
|
+
emotion
|
|
2165
|
+
employ
|
|
2166
|
+
empower
|
|
2167
|
+
empty
|
|
2168
|
+
enable
|
|
2169
|
+
enact
|
|
2170
|
+
end
|
|
2171
|
+
endless
|
|
2172
|
+
endorse
|
|
2173
|
+
enemy
|
|
2174
|
+
energy
|
|
2175
|
+
enforce
|
|
2176
|
+
engage
|
|
2177
|
+
engine
|
|
2178
|
+
enhance
|
|
2179
|
+
enjoy
|
|
2180
|
+
enlist
|
|
2181
|
+
enough
|
|
2182
|
+
enrich
|
|
2183
|
+
enroll
|
|
2184
|
+
ensure
|
|
2185
|
+
enter
|
|
2186
|
+
entire
|
|
2187
|
+
entry
|
|
2188
|
+
envelope
|
|
2189
|
+
episode
|
|
2190
|
+
equal
|
|
2191
|
+
equip
|
|
2192
|
+
era
|
|
2193
|
+
erase
|
|
2194
|
+
erode
|
|
2195
|
+
erosion
|
|
2196
|
+
error
|
|
2197
|
+
erupt
|
|
2198
|
+
escape
|
|
2199
|
+
essay
|
|
2200
|
+
essence
|
|
2201
|
+
estate
|
|
2202
|
+
eternal
|
|
2203
|
+
ethics
|
|
2204
|
+
evidence
|
|
2205
|
+
evil
|
|
2206
|
+
evoke
|
|
2207
|
+
evolve
|
|
2208
|
+
exact
|
|
2209
|
+
example
|
|
2210
|
+
excess
|
|
2211
|
+
exchange
|
|
2212
|
+
excite
|
|
2213
|
+
exclude
|
|
2214
|
+
excuse
|
|
2215
|
+
execute
|
|
2216
|
+
exercise
|
|
2217
|
+
exhaust
|
|
2218
|
+
exhibit
|
|
2219
|
+
exile
|
|
2220
|
+
exist
|
|
2221
|
+
exit
|
|
2222
|
+
exotic
|
|
2223
|
+
expand
|
|
2224
|
+
expect
|
|
2225
|
+
expire
|
|
2226
|
+
explain
|
|
2227
|
+
expose
|
|
2228
|
+
express
|
|
2229
|
+
extend
|
|
2230
|
+
extra
|
|
2231
|
+
eye
|
|
2232
|
+
eyebrow
|
|
2233
|
+
fabric
|
|
2234
|
+
face
|
|
2235
|
+
faculty
|
|
2236
|
+
fade
|
|
2237
|
+
faint
|
|
2238
|
+
faith
|
|
2239
|
+
fall
|
|
2240
|
+
false
|
|
2241
|
+
fame
|
|
2242
|
+
family
|
|
2243
|
+
famous
|
|
2244
|
+
fan
|
|
2245
|
+
fancy
|
|
2246
|
+
fantasy
|
|
2247
|
+
farm
|
|
2248
|
+
fashion
|
|
2249
|
+
fat
|
|
2250
|
+
fatal
|
|
2251
|
+
father
|
|
2252
|
+
fatigue
|
|
2253
|
+
fault
|
|
2254
|
+
favorite
|
|
2255
|
+
feature
|
|
2256
|
+
february
|
|
2257
|
+
federal
|
|
2258
|
+
fee
|
|
2259
|
+
feed
|
|
2260
|
+
feel
|
|
2261
|
+
female
|
|
2262
|
+
fence
|
|
2263
|
+
festival
|
|
2264
|
+
fetch
|
|
2265
|
+
fever
|
|
2266
|
+
few
|
|
2267
|
+
fiber
|
|
2268
|
+
fiction
|
|
2269
|
+
field
|
|
2270
|
+
figure
|
|
2271
|
+
file
|
|
2272
|
+
film
|
|
2273
|
+
filter
|
|
2274
|
+
final
|
|
2275
|
+
find
|
|
2276
|
+
fine
|
|
2277
|
+
finger
|
|
2278
|
+
finish
|
|
2279
|
+
fire
|
|
2280
|
+
firm
|
|
2281
|
+
first
|
|
2282
|
+
fiscal
|
|
2283
|
+
fish
|
|
2284
|
+
fit
|
|
2285
|
+
fitness
|
|
2286
|
+
fix
|
|
2287
|
+
flag
|
|
2288
|
+
flame
|
|
2289
|
+
flash
|
|
2290
|
+
flat
|
|
2291
|
+
flavor
|
|
2292
|
+
flee
|
|
2293
|
+
flight
|
|
2294
|
+
flip
|
|
2295
|
+
float
|
|
2296
|
+
flock
|
|
2297
|
+
floor
|
|
2298
|
+
flower
|
|
2299
|
+
fluid
|
|
2300
|
+
flush
|
|
2301
|
+
fly
|
|
2302
|
+
foam
|
|
2303
|
+
focus
|
|
2304
|
+
fog
|
|
2305
|
+
foil
|
|
2306
|
+
fold
|
|
2307
|
+
follow
|
|
2308
|
+
food
|
|
2309
|
+
foot
|
|
2310
|
+
force
|
|
2311
|
+
forest
|
|
2312
|
+
forget
|
|
2313
|
+
fork
|
|
2314
|
+
fortune
|
|
2315
|
+
forum
|
|
2316
|
+
forward
|
|
2317
|
+
fossil
|
|
2318
|
+
foster
|
|
2319
|
+
found
|
|
2320
|
+
fox
|
|
2321
|
+
fragile
|
|
2322
|
+
frame
|
|
2323
|
+
frequent
|
|
2324
|
+
fresh
|
|
2325
|
+
friend
|
|
2326
|
+
fringe
|
|
2327
|
+
frog
|
|
2328
|
+
front
|
|
2329
|
+
frost
|
|
2330
|
+
frown
|
|
2331
|
+
frozen
|
|
2332
|
+
fruit
|
|
2333
|
+
fuel
|
|
2334
|
+
fun
|
|
2335
|
+
funny
|
|
2336
|
+
furnace
|
|
2337
|
+
fury
|
|
2338
|
+
future
|
|
2339
|
+
gadget
|
|
2340
|
+
gain
|
|
2341
|
+
galaxy
|
|
2342
|
+
gallery
|
|
2343
|
+
game
|
|
2344
|
+
gap
|
|
2345
|
+
garage
|
|
2346
|
+
garbage
|
|
2347
|
+
garden
|
|
2348
|
+
garlic
|
|
2349
|
+
garment
|
|
2350
|
+
gas
|
|
2351
|
+
gasp
|
|
2352
|
+
gate
|
|
2353
|
+
gather
|
|
2354
|
+
gauge
|
|
2355
|
+
gaze
|
|
2356
|
+
general
|
|
2357
|
+
genius
|
|
2358
|
+
genre
|
|
2359
|
+
gentle
|
|
2360
|
+
genuine
|
|
2361
|
+
gesture
|
|
2362
|
+
ghost
|
|
2363
|
+
giant
|
|
2364
|
+
gift
|
|
2365
|
+
giggle
|
|
2366
|
+
ginger
|
|
2367
|
+
giraffe
|
|
2368
|
+
girl
|
|
2369
|
+
give
|
|
2370
|
+
glad
|
|
2371
|
+
glance
|
|
2372
|
+
glare
|
|
2373
|
+
glass
|
|
2374
|
+
glide
|
|
2375
|
+
glimpse
|
|
2376
|
+
globe
|
|
2377
|
+
gloom
|
|
2378
|
+
glory
|
|
2379
|
+
glove
|
|
2380
|
+
glow
|
|
2381
|
+
glue
|
|
2382
|
+
goat
|
|
2383
|
+
goddess
|
|
2384
|
+
gold
|
|
2385
|
+
good
|
|
2386
|
+
goose
|
|
2387
|
+
gorilla
|
|
2388
|
+
gospel
|
|
2389
|
+
gossip
|
|
2390
|
+
govern
|
|
2391
|
+
gown
|
|
2392
|
+
grab
|
|
2393
|
+
grace
|
|
2394
|
+
grain
|
|
2395
|
+
grant
|
|
2396
|
+
grape
|
|
2397
|
+
grass
|
|
2398
|
+
gravity
|
|
2399
|
+
great
|
|
2400
|
+
green
|
|
2401
|
+
grid
|
|
2402
|
+
grief
|
|
2403
|
+
grit
|
|
2404
|
+
grocery
|
|
2405
|
+
group
|
|
2406
|
+
grow
|
|
2407
|
+
grunt
|
|
2408
|
+
guard
|
|
2409
|
+
guess
|
|
2410
|
+
guide
|
|
2411
|
+
guilt
|
|
2412
|
+
guitar
|
|
2413
|
+
gun
|
|
2414
|
+
gym
|
|
2415
|
+
habit
|
|
2416
|
+
hair
|
|
2417
|
+
half
|
|
2418
|
+
hammer
|
|
2419
|
+
hamster
|
|
2420
|
+
hand
|
|
2421
|
+
happy
|
|
2422
|
+
harbor
|
|
2423
|
+
hard
|
|
2424
|
+
harsh
|
|
2425
|
+
harvest
|
|
2426
|
+
hat
|
|
2427
|
+
have
|
|
2428
|
+
hawk
|
|
2429
|
+
hazard
|
|
2430
|
+
head
|
|
2431
|
+
health
|
|
2432
|
+
heart
|
|
2433
|
+
heavy
|
|
2434
|
+
hedgehog
|
|
2435
|
+
height
|
|
2436
|
+
hello
|
|
2437
|
+
helmet
|
|
2438
|
+
help
|
|
2439
|
+
hen
|
|
2440
|
+
hero
|
|
2441
|
+
hidden
|
|
2442
|
+
high
|
|
2443
|
+
hill
|
|
2444
|
+
hint
|
|
2445
|
+
hip
|
|
2446
|
+
hire
|
|
2447
|
+
history
|
|
2448
|
+
hobby
|
|
2449
|
+
hockey
|
|
2450
|
+
hold
|
|
2451
|
+
hole
|
|
2452
|
+
holiday
|
|
2453
|
+
hollow
|
|
2454
|
+
home
|
|
2455
|
+
honey
|
|
2456
|
+
hood
|
|
2457
|
+
hope
|
|
2458
|
+
horn
|
|
2459
|
+
horror
|
|
2460
|
+
horse
|
|
2461
|
+
hospital
|
|
2462
|
+
host
|
|
2463
|
+
hotel
|
|
2464
|
+
hour
|
|
2465
|
+
hover
|
|
2466
|
+
hub
|
|
2467
|
+
huge
|
|
2468
|
+
human
|
|
2469
|
+
humble
|
|
2470
|
+
humor
|
|
2471
|
+
hundred
|
|
2472
|
+
hungry
|
|
2473
|
+
hunt
|
|
2474
|
+
hurdle
|
|
2475
|
+
hurry
|
|
2476
|
+
hurt
|
|
2477
|
+
husband
|
|
2478
|
+
hybrid
|
|
2479
|
+
ice
|
|
2480
|
+
icon
|
|
2481
|
+
idea
|
|
2482
|
+
identify
|
|
2483
|
+
idle
|
|
2484
|
+
ignore
|
|
2485
|
+
ill
|
|
2486
|
+
illegal
|
|
2487
|
+
illness
|
|
2488
|
+
image
|
|
2489
|
+
imitate
|
|
2490
|
+
immense
|
|
2491
|
+
immune
|
|
2492
|
+
impact
|
|
2493
|
+
impose
|
|
2494
|
+
improve
|
|
2495
|
+
impulse
|
|
2496
|
+
inch
|
|
2497
|
+
include
|
|
2498
|
+
income
|
|
2499
|
+
increase
|
|
2500
|
+
index
|
|
2501
|
+
indicate
|
|
2502
|
+
indoor
|
|
2503
|
+
industry
|
|
2504
|
+
infant
|
|
2505
|
+
inflict
|
|
2506
|
+
inform
|
|
2507
|
+
inhale
|
|
2508
|
+
inherit
|
|
2509
|
+
initial
|
|
2510
|
+
inject
|
|
2511
|
+
injury
|
|
2512
|
+
inmate
|
|
2513
|
+
inner
|
|
2514
|
+
innocent
|
|
2515
|
+
input
|
|
2516
|
+
inquiry
|
|
2517
|
+
insane
|
|
2518
|
+
insect
|
|
2519
|
+
inside
|
|
2520
|
+
inspire
|
|
2521
|
+
install
|
|
2522
|
+
intact
|
|
2523
|
+
interest
|
|
2524
|
+
into
|
|
2525
|
+
invest
|
|
2526
|
+
invite
|
|
2527
|
+
involve
|
|
2528
|
+
iron
|
|
2529
|
+
island
|
|
2530
|
+
isolate
|
|
2531
|
+
issue
|
|
2532
|
+
item
|
|
2533
|
+
ivory
|
|
2534
|
+
jacket
|
|
2535
|
+
jaguar
|
|
2536
|
+
jar
|
|
2537
|
+
jazz
|
|
2538
|
+
jealous
|
|
2539
|
+
jeans
|
|
2540
|
+
jelly
|
|
2541
|
+
jewel
|
|
2542
|
+
job
|
|
2543
|
+
join
|
|
2544
|
+
joke
|
|
2545
|
+
journey
|
|
2546
|
+
joy
|
|
2547
|
+
judge
|
|
2548
|
+
juice
|
|
2549
|
+
jump
|
|
2550
|
+
jungle
|
|
2551
|
+
junior
|
|
2552
|
+
junk
|
|
2553
|
+
just
|
|
2554
|
+
kangaroo
|
|
2555
|
+
keen
|
|
2556
|
+
keep
|
|
2557
|
+
ketchup
|
|
2558
|
+
key
|
|
2559
|
+
kick
|
|
2560
|
+
kid
|
|
2561
|
+
kidney
|
|
2562
|
+
kind
|
|
2563
|
+
kingdom
|
|
2564
|
+
kiss
|
|
2565
|
+
kit
|
|
2566
|
+
kitchen
|
|
2567
|
+
kite
|
|
2568
|
+
kitten
|
|
2569
|
+
kiwi
|
|
2570
|
+
knee
|
|
2571
|
+
knife
|
|
2572
|
+
knock
|
|
2573
|
+
know
|
|
2574
|
+
lab
|
|
2575
|
+
label
|
|
2576
|
+
labor
|
|
2577
|
+
ladder
|
|
2578
|
+
lady
|
|
2579
|
+
lake
|
|
2580
|
+
lamp
|
|
2581
|
+
language
|
|
2582
|
+
laptop
|
|
2583
|
+
large
|
|
2584
|
+
later
|
|
2585
|
+
latin
|
|
2586
|
+
laugh
|
|
2587
|
+
laundry
|
|
2588
|
+
lava
|
|
2589
|
+
law
|
|
2590
|
+
lawn
|
|
2591
|
+
lawsuit
|
|
2592
|
+
layer
|
|
2593
|
+
lazy
|
|
2594
|
+
leader
|
|
2595
|
+
leaf
|
|
2596
|
+
learn
|
|
2597
|
+
leave
|
|
2598
|
+
lecture
|
|
2599
|
+
left
|
|
2600
|
+
leg
|
|
2601
|
+
legal
|
|
2602
|
+
legend
|
|
2603
|
+
leisure
|
|
2604
|
+
lemon
|
|
2605
|
+
lend
|
|
2606
|
+
length
|
|
2607
|
+
lens
|
|
2608
|
+
leopard
|
|
2609
|
+
lesson
|
|
2610
|
+
letter
|
|
2611
|
+
level
|
|
2612
|
+
liar
|
|
2613
|
+
liberty
|
|
2614
|
+
library
|
|
2615
|
+
license
|
|
2616
|
+
life
|
|
2617
|
+
lift
|
|
2618
|
+
light
|
|
2619
|
+
like
|
|
2620
|
+
limb
|
|
2621
|
+
limit
|
|
2622
|
+
link
|
|
2623
|
+
lion
|
|
2624
|
+
liquid
|
|
2625
|
+
list
|
|
2626
|
+
little
|
|
2627
|
+
live
|
|
2628
|
+
lizard
|
|
2629
|
+
load
|
|
2630
|
+
loan
|
|
2631
|
+
lobster
|
|
2632
|
+
local
|
|
2633
|
+
lock
|
|
2634
|
+
logic
|
|
2635
|
+
lonely
|
|
2636
|
+
long
|
|
2637
|
+
loop
|
|
2638
|
+
lottery
|
|
2639
|
+
loud
|
|
2640
|
+
lounge
|
|
2641
|
+
love
|
|
2642
|
+
loyal
|
|
2643
|
+
lucky
|
|
2644
|
+
luggage
|
|
2645
|
+
lumber
|
|
2646
|
+
lunar
|
|
2647
|
+
lunch
|
|
2648
|
+
luxury
|
|
2649
|
+
lyrics
|
|
2650
|
+
machine
|
|
2651
|
+
mad
|
|
2652
|
+
magic
|
|
2653
|
+
magnet
|
|
2654
|
+
maid
|
|
2655
|
+
mail
|
|
2656
|
+
main
|
|
2657
|
+
major
|
|
2658
|
+
make
|
|
2659
|
+
mammal
|
|
2660
|
+
man
|
|
2661
|
+
manage
|
|
2662
|
+
mandate
|
|
2663
|
+
mango
|
|
2664
|
+
mansion
|
|
2665
|
+
manual
|
|
2666
|
+
maple
|
|
2667
|
+
marble
|
|
2668
|
+
march
|
|
2669
|
+
margin
|
|
2670
|
+
marine
|
|
2671
|
+
market
|
|
2672
|
+
marriage
|
|
2673
|
+
mask
|
|
2674
|
+
mass
|
|
2675
|
+
master
|
|
2676
|
+
match
|
|
2677
|
+
material
|
|
2678
|
+
math
|
|
2679
|
+
matrix
|
|
2680
|
+
matter
|
|
2681
|
+
maximum
|
|
2682
|
+
maze
|
|
2683
|
+
meadow
|
|
2684
|
+
mean
|
|
2685
|
+
measure
|
|
2686
|
+
meat
|
|
2687
|
+
mechanic
|
|
2688
|
+
medal
|
|
2689
|
+
media
|
|
2690
|
+
melody
|
|
2691
|
+
melt
|
|
2692
|
+
member
|
|
2693
|
+
memory
|
|
2694
|
+
mention
|
|
2695
|
+
menu
|
|
2696
|
+
mercy
|
|
2697
|
+
merge
|
|
2698
|
+
merit
|
|
2699
|
+
merry
|
|
2700
|
+
mesh
|
|
2701
|
+
message
|
|
2702
|
+
metal
|
|
2703
|
+
method
|
|
2704
|
+
middle
|
|
2705
|
+
midnight
|
|
2706
|
+
milk
|
|
2707
|
+
million
|
|
2708
|
+
mimic
|
|
2709
|
+
mind
|
|
2710
|
+
minimum
|
|
2711
|
+
minor
|
|
2712
|
+
minute
|
|
2713
|
+
miracle
|
|
2714
|
+
mirror
|
|
2715
|
+
misery
|
|
2716
|
+
miss
|
|
2717
|
+
mistake
|
|
2718
|
+
mix
|
|
2719
|
+
mixed
|
|
2720
|
+
mixture
|
|
2721
|
+
mobile
|
|
2722
|
+
model
|
|
2723
|
+
modify
|
|
2724
|
+
mom
|
|
2725
|
+
moment
|
|
2726
|
+
monitor
|
|
2727
|
+
monkey
|
|
2728
|
+
monster
|
|
2729
|
+
month
|
|
2730
|
+
moon
|
|
2731
|
+
moral
|
|
2732
|
+
more
|
|
2733
|
+
morning
|
|
2734
|
+
mosquito
|
|
2735
|
+
mother
|
|
2736
|
+
motion
|
|
2737
|
+
motor
|
|
2738
|
+
mountain
|
|
2739
|
+
mouse
|
|
2740
|
+
move
|
|
2741
|
+
movie
|
|
2742
|
+
much
|
|
2743
|
+
muffin
|
|
2744
|
+
mule
|
|
2745
|
+
multiply
|
|
2746
|
+
muscle
|
|
2747
|
+
museum
|
|
2748
|
+
mushroom
|
|
2749
|
+
music
|
|
2750
|
+
must
|
|
2751
|
+
mutual
|
|
2752
|
+
myself
|
|
2753
|
+
mystery
|
|
2754
|
+
myth
|
|
2755
|
+
naive
|
|
2756
|
+
name
|
|
2757
|
+
napkin
|
|
2758
|
+
narrow
|
|
2759
|
+
nasty
|
|
2760
|
+
nation
|
|
2761
|
+
nature
|
|
2762
|
+
near
|
|
2763
|
+
neck
|
|
2764
|
+
need
|
|
2765
|
+
negative
|
|
2766
|
+
neglect
|
|
2767
|
+
neither
|
|
2768
|
+
nephew
|
|
2769
|
+
nerve
|
|
2770
|
+
nest
|
|
2771
|
+
net
|
|
2772
|
+
network
|
|
2773
|
+
neutral
|
|
2774
|
+
never
|
|
2775
|
+
news
|
|
2776
|
+
next
|
|
2777
|
+
nice
|
|
2778
|
+
night
|
|
2779
|
+
noble
|
|
2780
|
+
noise
|
|
2781
|
+
nominee
|
|
2782
|
+
noodle
|
|
2783
|
+
normal
|
|
2784
|
+
north
|
|
2785
|
+
nose
|
|
2786
|
+
notable
|
|
2787
|
+
note
|
|
2788
|
+
nothing
|
|
2789
|
+
notice
|
|
2790
|
+
novel
|
|
2791
|
+
now
|
|
2792
|
+
nuclear
|
|
2793
|
+
number
|
|
2794
|
+
nurse
|
|
2795
|
+
nut
|
|
2796
|
+
oak
|
|
2797
|
+
obey
|
|
2798
|
+
object
|
|
2799
|
+
oblige
|
|
2800
|
+
obscure
|
|
2801
|
+
observe
|
|
2802
|
+
obtain
|
|
2803
|
+
obvious
|
|
2804
|
+
occur
|
|
2805
|
+
ocean
|
|
2806
|
+
october
|
|
2807
|
+
odor
|
|
2808
|
+
off
|
|
2809
|
+
offer
|
|
2810
|
+
office
|
|
2811
|
+
often
|
|
2812
|
+
oil
|
|
2813
|
+
okay
|
|
2814
|
+
old
|
|
2815
|
+
olive
|
|
2816
|
+
olympic
|
|
2817
|
+
omit
|
|
2818
|
+
once
|
|
2819
|
+
one
|
|
2820
|
+
onion
|
|
2821
|
+
online
|
|
2822
|
+
only
|
|
2823
|
+
open
|
|
2824
|
+
opera
|
|
2825
|
+
opinion
|
|
2826
|
+
oppose
|
|
2827
|
+
option
|
|
2828
|
+
orange
|
|
2829
|
+
orbit
|
|
2830
|
+
orchard
|
|
2831
|
+
order
|
|
2832
|
+
ordinary
|
|
2833
|
+
organ
|
|
2834
|
+
orient
|
|
2835
|
+
original
|
|
2836
|
+
orphan
|
|
2837
|
+
ostrich
|
|
2838
|
+
other
|
|
2839
|
+
outdoor
|
|
2840
|
+
outer
|
|
2841
|
+
output
|
|
2842
|
+
outside
|
|
2843
|
+
oval
|
|
2844
|
+
oven
|
|
2845
|
+
over
|
|
2846
|
+
own
|
|
2847
|
+
owner
|
|
2848
|
+
oxygen
|
|
2849
|
+
oyster
|
|
2850
|
+
ozone
|
|
2851
|
+
pact
|
|
2852
|
+
paddle
|
|
2853
|
+
page
|
|
2854
|
+
pair
|
|
2855
|
+
palace
|
|
2856
|
+
palm
|
|
2857
|
+
panda
|
|
2858
|
+
panel
|
|
2859
|
+
panic
|
|
2860
|
+
panther
|
|
2861
|
+
paper
|
|
2862
|
+
parade
|
|
2863
|
+
parent
|
|
2864
|
+
park
|
|
2865
|
+
parrot
|
|
2866
|
+
party
|
|
2867
|
+
pass
|
|
2868
|
+
patch
|
|
2869
|
+
path
|
|
2870
|
+
patient
|
|
2871
|
+
patrol
|
|
2872
|
+
pattern
|
|
2873
|
+
pause
|
|
2874
|
+
pave
|
|
2875
|
+
payment
|
|
2876
|
+
peace
|
|
2877
|
+
peanut
|
|
2878
|
+
pear
|
|
2879
|
+
peasant
|
|
2880
|
+
pelican
|
|
2881
|
+
pen
|
|
2882
|
+
penalty
|
|
2883
|
+
pencil
|
|
2884
|
+
people
|
|
2885
|
+
pepper
|
|
2886
|
+
perfect
|
|
2887
|
+
permit
|
|
2888
|
+
person
|
|
2889
|
+
pet
|
|
2890
|
+
phone
|
|
2891
|
+
photo
|
|
2892
|
+
phrase
|
|
2893
|
+
physical
|
|
2894
|
+
piano
|
|
2895
|
+
picnic
|
|
2896
|
+
picture
|
|
2897
|
+
piece
|
|
2898
|
+
pig
|
|
2899
|
+
pigeon
|
|
2900
|
+
pill
|
|
2901
|
+
pilot
|
|
2902
|
+
pink
|
|
2903
|
+
pioneer
|
|
2904
|
+
pipe
|
|
2905
|
+
pistol
|
|
2906
|
+
pitch
|
|
2907
|
+
pizza
|
|
2908
|
+
place
|
|
2909
|
+
planet
|
|
2910
|
+
plastic
|
|
2911
|
+
plate
|
|
2912
|
+
play
|
|
2913
|
+
please
|
|
2914
|
+
pledge
|
|
2915
|
+
pluck
|
|
2916
|
+
plug
|
|
2917
|
+
plunge
|
|
2918
|
+
poem
|
|
2919
|
+
poet
|
|
2920
|
+
point
|
|
2921
|
+
polar
|
|
2922
|
+
pole
|
|
2923
|
+
police
|
|
2924
|
+
pond
|
|
2925
|
+
pony
|
|
2926
|
+
pool
|
|
2927
|
+
popular
|
|
2928
|
+
portion
|
|
2929
|
+
position
|
|
2930
|
+
possible
|
|
2931
|
+
post
|
|
2932
|
+
potato
|
|
2933
|
+
pottery
|
|
2934
|
+
poverty
|
|
2935
|
+
powder
|
|
2936
|
+
power
|
|
2937
|
+
practice
|
|
2938
|
+
praise
|
|
2939
|
+
predict
|
|
2940
|
+
prefer
|
|
2941
|
+
prepare
|
|
2942
|
+
present
|
|
2943
|
+
pretty
|
|
2944
|
+
prevent
|
|
2945
|
+
price
|
|
2946
|
+
pride
|
|
2947
|
+
primary
|
|
2948
|
+
print
|
|
2949
|
+
priority
|
|
2950
|
+
prison
|
|
2951
|
+
private
|
|
2952
|
+
prize
|
|
2953
|
+
problem
|
|
2954
|
+
process
|
|
2955
|
+
produce
|
|
2956
|
+
profit
|
|
2957
|
+
program
|
|
2958
|
+
project
|
|
2959
|
+
promote
|
|
2960
|
+
proof
|
|
2961
|
+
property
|
|
2962
|
+
prosper
|
|
2963
|
+
protect
|
|
2964
|
+
proud
|
|
2965
|
+
provide
|
|
2966
|
+
public
|
|
2967
|
+
pudding
|
|
2968
|
+
pull
|
|
2969
|
+
pulp
|
|
2970
|
+
pulse
|
|
2971
|
+
pumpkin
|
|
2972
|
+
punch
|
|
2973
|
+
pupil
|
|
2974
|
+
puppy
|
|
2975
|
+
purchase
|
|
2976
|
+
purity
|
|
2977
|
+
purpose
|
|
2978
|
+
purse
|
|
2979
|
+
push
|
|
2980
|
+
put
|
|
2981
|
+
puzzle
|
|
2982
|
+
pyramid
|
|
2983
|
+
quality
|
|
2984
|
+
quantum
|
|
2985
|
+
quarter
|
|
2986
|
+
question
|
|
2987
|
+
quick
|
|
2988
|
+
quit
|
|
2989
|
+
quiz
|
|
2990
|
+
quote
|
|
2991
|
+
rabbit
|
|
2992
|
+
raccoon
|
|
2993
|
+
race
|
|
2994
|
+
rack
|
|
2995
|
+
radar
|
|
2996
|
+
radio
|
|
2997
|
+
rail
|
|
2998
|
+
rain
|
|
2999
|
+
raise
|
|
3000
|
+
rally
|
|
3001
|
+
ramp
|
|
3002
|
+
ranch
|
|
3003
|
+
random
|
|
3004
|
+
range
|
|
3005
|
+
rapid
|
|
3006
|
+
rare
|
|
3007
|
+
rate
|
|
3008
|
+
rather
|
|
3009
|
+
raven
|
|
3010
|
+
raw
|
|
3011
|
+
razor
|
|
3012
|
+
ready
|
|
3013
|
+
real
|
|
3014
|
+
reason
|
|
3015
|
+
rebel
|
|
3016
|
+
rebuild
|
|
3017
|
+
recall
|
|
3018
|
+
receive
|
|
3019
|
+
recipe
|
|
3020
|
+
record
|
|
3021
|
+
recycle
|
|
3022
|
+
reduce
|
|
3023
|
+
reflect
|
|
3024
|
+
reform
|
|
3025
|
+
refuse
|
|
3026
|
+
region
|
|
3027
|
+
regret
|
|
3028
|
+
regular
|
|
3029
|
+
reject
|
|
3030
|
+
relax
|
|
3031
|
+
release
|
|
3032
|
+
relief
|
|
3033
|
+
rely
|
|
3034
|
+
remain
|
|
3035
|
+
remember
|
|
3036
|
+
remind
|
|
3037
|
+
remove
|
|
3038
|
+
render
|
|
3039
|
+
renew
|
|
3040
|
+
rent
|
|
3041
|
+
reopen
|
|
3042
|
+
repair
|
|
3043
|
+
repeat
|
|
3044
|
+
replace
|
|
3045
|
+
report
|
|
3046
|
+
require
|
|
3047
|
+
rescue
|
|
3048
|
+
resemble
|
|
3049
|
+
resist
|
|
3050
|
+
resource
|
|
3051
|
+
response
|
|
3052
|
+
result
|
|
3053
|
+
retire
|
|
3054
|
+
retreat
|
|
3055
|
+
return
|
|
3056
|
+
reunion
|
|
3057
|
+
reveal
|
|
3058
|
+
review
|
|
3059
|
+
reward
|
|
3060
|
+
rhythm
|
|
3061
|
+
rib
|
|
3062
|
+
ribbon
|
|
3063
|
+
rice
|
|
3064
|
+
rich
|
|
3065
|
+
ride
|
|
3066
|
+
ridge
|
|
3067
|
+
rifle
|
|
3068
|
+
right
|
|
3069
|
+
rigid
|
|
3070
|
+
ring
|
|
3071
|
+
riot
|
|
3072
|
+
ripple
|
|
3073
|
+
risk
|
|
3074
|
+
ritual
|
|
3075
|
+
rival
|
|
3076
|
+
river
|
|
3077
|
+
road
|
|
3078
|
+
roast
|
|
3079
|
+
robot
|
|
3080
|
+
robust
|
|
3081
|
+
rocket
|
|
3082
|
+
romance
|
|
3083
|
+
roof
|
|
3084
|
+
rookie
|
|
3085
|
+
room
|
|
3086
|
+
rose
|
|
3087
|
+
rotate
|
|
3088
|
+
rough
|
|
3089
|
+
round
|
|
3090
|
+
route
|
|
3091
|
+
royal
|
|
3092
|
+
rubber
|
|
3093
|
+
rude
|
|
3094
|
+
rug
|
|
3095
|
+
rule
|
|
3096
|
+
run
|
|
3097
|
+
runway
|
|
3098
|
+
rural
|
|
3099
|
+
sad
|
|
3100
|
+
saddle
|
|
3101
|
+
sadness
|
|
3102
|
+
safe
|
|
3103
|
+
sail
|
|
3104
|
+
salad
|
|
3105
|
+
salmon
|
|
3106
|
+
salon
|
|
3107
|
+
salt
|
|
3108
|
+
salute
|
|
3109
|
+
same
|
|
3110
|
+
sample
|
|
3111
|
+
sand
|
|
3112
|
+
satisfy
|
|
3113
|
+
satoshi
|
|
3114
|
+
sauce
|
|
3115
|
+
sausage
|
|
3116
|
+
save
|
|
3117
|
+
say
|
|
3118
|
+
scale
|
|
3119
|
+
scan
|
|
3120
|
+
scare
|
|
3121
|
+
scatter
|
|
3122
|
+
scene
|
|
3123
|
+
scheme
|
|
3124
|
+
school
|
|
3125
|
+
science
|
|
3126
|
+
scissors
|
|
3127
|
+
scorpion
|
|
3128
|
+
scout
|
|
3129
|
+
scrap
|
|
3130
|
+
screen
|
|
3131
|
+
script
|
|
3132
|
+
scrub
|
|
3133
|
+
sea
|
|
3134
|
+
search
|
|
3135
|
+
season
|
|
3136
|
+
seat
|
|
3137
|
+
second
|
|
3138
|
+
secret
|
|
3139
|
+
section
|
|
3140
|
+
security
|
|
3141
|
+
seed
|
|
3142
|
+
seek
|
|
3143
|
+
segment
|
|
3144
|
+
select
|
|
3145
|
+
sell
|
|
3146
|
+
seminar
|
|
3147
|
+
senior
|
|
3148
|
+
sense
|
|
3149
|
+
sentence
|
|
3150
|
+
series
|
|
3151
|
+
service
|
|
3152
|
+
session
|
|
3153
|
+
settle
|
|
3154
|
+
setup
|
|
3155
|
+
seven
|
|
3156
|
+
shadow
|
|
3157
|
+
shaft
|
|
3158
|
+
shallow
|
|
3159
|
+
share
|
|
3160
|
+
shed
|
|
3161
|
+
shell
|
|
3162
|
+
sheriff
|
|
3163
|
+
shield
|
|
3164
|
+
shift
|
|
3165
|
+
shine
|
|
3166
|
+
ship
|
|
3167
|
+
shiver
|
|
3168
|
+
shock
|
|
3169
|
+
shoe
|
|
3170
|
+
shoot
|
|
3171
|
+
shop
|
|
3172
|
+
short
|
|
3173
|
+
shoulder
|
|
3174
|
+
shove
|
|
3175
|
+
shrimp
|
|
3176
|
+
shrug
|
|
3177
|
+
shuffle
|
|
3178
|
+
shy
|
|
3179
|
+
sibling
|
|
3180
|
+
sick
|
|
3181
|
+
side
|
|
3182
|
+
siege
|
|
3183
|
+
sight
|
|
3184
|
+
sign
|
|
3185
|
+
silent
|
|
3186
|
+
silk
|
|
3187
|
+
silly
|
|
3188
|
+
silver
|
|
3189
|
+
similar
|
|
3190
|
+
simple
|
|
3191
|
+
since
|
|
3192
|
+
sing
|
|
3193
|
+
siren
|
|
3194
|
+
sister
|
|
3195
|
+
situate
|
|
3196
|
+
six
|
|
3197
|
+
size
|
|
3198
|
+
skate
|
|
3199
|
+
sketch
|
|
3200
|
+
ski
|
|
3201
|
+
skill
|
|
3202
|
+
skin
|
|
3203
|
+
skirt
|
|
3204
|
+
skull
|
|
3205
|
+
slab
|
|
3206
|
+
slam
|
|
3207
|
+
sleep
|
|
3208
|
+
slender
|
|
3209
|
+
slice
|
|
3210
|
+
slide
|
|
3211
|
+
slight
|
|
3212
|
+
slim
|
|
3213
|
+
slogan
|
|
3214
|
+
slot
|
|
3215
|
+
slow
|
|
3216
|
+
slush
|
|
3217
|
+
small
|
|
3218
|
+
smart
|
|
3219
|
+
smile
|
|
3220
|
+
smoke
|
|
3221
|
+
smooth
|
|
3222
|
+
snack
|
|
3223
|
+
snake
|
|
3224
|
+
snap
|
|
3225
|
+
sniff
|
|
3226
|
+
snow
|
|
3227
|
+
soap
|
|
3228
|
+
soccer
|
|
3229
|
+
social
|
|
3230
|
+
sock
|
|
3231
|
+
soda
|
|
3232
|
+
soft
|
|
3233
|
+
solar
|
|
3234
|
+
soldier
|
|
3235
|
+
solid
|
|
3236
|
+
solution
|
|
3237
|
+
solve
|
|
3238
|
+
someone
|
|
3239
|
+
song
|
|
3240
|
+
soon
|
|
3241
|
+
sorry
|
|
3242
|
+
sort
|
|
3243
|
+
soul
|
|
3244
|
+
sound
|
|
3245
|
+
soup
|
|
3246
|
+
source
|
|
3247
|
+
south
|
|
3248
|
+
space
|
|
3249
|
+
spare
|
|
3250
|
+
spatial
|
|
3251
|
+
spawn
|
|
3252
|
+
speak
|
|
3253
|
+
special
|
|
3254
|
+
speed
|
|
3255
|
+
spell
|
|
3256
|
+
spend
|
|
3257
|
+
sphere
|
|
3258
|
+
spice
|
|
3259
|
+
spider
|
|
3260
|
+
spike
|
|
3261
|
+
spin
|
|
3262
|
+
spirit
|
|
3263
|
+
split
|
|
3264
|
+
spoil
|
|
3265
|
+
sponsor
|
|
3266
|
+
spoon
|
|
3267
|
+
sport
|
|
3268
|
+
spot
|
|
3269
|
+
spray
|
|
3270
|
+
spread
|
|
3271
|
+
spring
|
|
3272
|
+
spy
|
|
3273
|
+
square
|
|
3274
|
+
squeeze
|
|
3275
|
+
squirrel
|
|
3276
|
+
stable
|
|
3277
|
+
stadium
|
|
3278
|
+
staff
|
|
3279
|
+
stage
|
|
3280
|
+
stairs
|
|
3281
|
+
stamp
|
|
3282
|
+
stand
|
|
3283
|
+
start
|
|
3284
|
+
state
|
|
3285
|
+
stay
|
|
3286
|
+
steak
|
|
3287
|
+
steel
|
|
3288
|
+
stem
|
|
3289
|
+
step
|
|
3290
|
+
stereo
|
|
3291
|
+
stick
|
|
3292
|
+
still
|
|
3293
|
+
sting
|
|
3294
|
+
stock
|
|
3295
|
+
stomach
|
|
3296
|
+
stone
|
|
3297
|
+
stool
|
|
3298
|
+
story
|
|
3299
|
+
stove
|
|
3300
|
+
strategy
|
|
3301
|
+
street
|
|
3302
|
+
strike
|
|
3303
|
+
strong
|
|
3304
|
+
struggle
|
|
3305
|
+
student
|
|
3306
|
+
stuff
|
|
3307
|
+
stumble
|
|
3308
|
+
style
|
|
3309
|
+
subject
|
|
3310
|
+
submit
|
|
3311
|
+
subway
|
|
3312
|
+
success
|
|
3313
|
+
such
|
|
3314
|
+
sudden
|
|
3315
|
+
suffer
|
|
3316
|
+
sugar
|
|
3317
|
+
suggest
|
|
3318
|
+
suit
|
|
3319
|
+
summer
|
|
3320
|
+
sun
|
|
3321
|
+
sunny
|
|
3322
|
+
sunset
|
|
3323
|
+
super
|
|
3324
|
+
supply
|
|
3325
|
+
supreme
|
|
3326
|
+
sure
|
|
3327
|
+
surface
|
|
3328
|
+
surge
|
|
3329
|
+
surprise
|
|
3330
|
+
surround
|
|
3331
|
+
survey
|
|
3332
|
+
suspect
|
|
3333
|
+
sustain
|
|
3334
|
+
swallow
|
|
3335
|
+
swamp
|
|
3336
|
+
swap
|
|
3337
|
+
swarm
|
|
3338
|
+
swear
|
|
3339
|
+
sweet
|
|
3340
|
+
swift
|
|
3341
|
+
swim
|
|
3342
|
+
swing
|
|
3343
|
+
switch
|
|
3344
|
+
sword
|
|
3345
|
+
symbol
|
|
3346
|
+
symptom
|
|
3347
|
+
syrup
|
|
3348
|
+
system
|
|
3349
|
+
table
|
|
3350
|
+
tackle
|
|
3351
|
+
tag
|
|
3352
|
+
tail
|
|
3353
|
+
talent
|
|
3354
|
+
talk
|
|
3355
|
+
tank
|
|
3356
|
+
tape
|
|
3357
|
+
target
|
|
3358
|
+
task
|
|
3359
|
+
taste
|
|
3360
|
+
tattoo
|
|
3361
|
+
taxi
|
|
3362
|
+
teach
|
|
3363
|
+
team
|
|
3364
|
+
tell
|
|
3365
|
+
ten
|
|
3366
|
+
tenant
|
|
3367
|
+
tennis
|
|
3368
|
+
tent
|
|
3369
|
+
term
|
|
3370
|
+
test
|
|
3371
|
+
text
|
|
3372
|
+
thank
|
|
3373
|
+
that
|
|
3374
|
+
theme
|
|
3375
|
+
then
|
|
3376
|
+
theory
|
|
3377
|
+
there
|
|
3378
|
+
they
|
|
3379
|
+
thing
|
|
3380
|
+
this
|
|
3381
|
+
thought
|
|
3382
|
+
three
|
|
3383
|
+
thrive
|
|
3384
|
+
throw
|
|
3385
|
+
thumb
|
|
3386
|
+
thunder
|
|
3387
|
+
ticket
|
|
3388
|
+
tide
|
|
3389
|
+
tiger
|
|
3390
|
+
tilt
|
|
3391
|
+
timber
|
|
3392
|
+
time
|
|
3393
|
+
tiny
|
|
3394
|
+
tip
|
|
3395
|
+
tired
|
|
3396
|
+
tissue
|
|
3397
|
+
title
|
|
3398
|
+
toast
|
|
3399
|
+
tobacco
|
|
3400
|
+
today
|
|
3401
|
+
toddler
|
|
3402
|
+
toe
|
|
3403
|
+
together
|
|
3404
|
+
toilet
|
|
3405
|
+
token
|
|
3406
|
+
tomato
|
|
3407
|
+
tomorrow
|
|
3408
|
+
tone
|
|
3409
|
+
tongue
|
|
3410
|
+
tonight
|
|
3411
|
+
tool
|
|
3412
|
+
tooth
|
|
3413
|
+
top
|
|
3414
|
+
topic
|
|
3415
|
+
topple
|
|
3416
|
+
torch
|
|
3417
|
+
tornado
|
|
3418
|
+
tortoise
|
|
3419
|
+
toss
|
|
3420
|
+
total
|
|
3421
|
+
tourist
|
|
3422
|
+
toward
|
|
3423
|
+
tower
|
|
3424
|
+
town
|
|
3425
|
+
toy
|
|
3426
|
+
track
|
|
3427
|
+
trade
|
|
3428
|
+
traffic
|
|
3429
|
+
tragic
|
|
3430
|
+
train
|
|
3431
|
+
transfer
|
|
3432
|
+
trap
|
|
3433
|
+
trash
|
|
3434
|
+
travel
|
|
3435
|
+
tray
|
|
3436
|
+
treat
|
|
3437
|
+
tree
|
|
3438
|
+
trend
|
|
3439
|
+
trial
|
|
3440
|
+
tribe
|
|
3441
|
+
trick
|
|
3442
|
+
trigger
|
|
3443
|
+
trim
|
|
3444
|
+
trip
|
|
3445
|
+
trophy
|
|
3446
|
+
trouble
|
|
3447
|
+
truck
|
|
3448
|
+
true
|
|
3449
|
+
truly
|
|
3450
|
+
trumpet
|
|
3451
|
+
trust
|
|
3452
|
+
truth
|
|
3453
|
+
try
|
|
3454
|
+
tube
|
|
3455
|
+
tuition
|
|
3456
|
+
tumble
|
|
3457
|
+
tuna
|
|
3458
|
+
tunnel
|
|
3459
|
+
turkey
|
|
3460
|
+
turn
|
|
3461
|
+
turtle
|
|
3462
|
+
twelve
|
|
3463
|
+
twenty
|
|
3464
|
+
twice
|
|
3465
|
+
twin
|
|
3466
|
+
twist
|
|
3467
|
+
two
|
|
3468
|
+
type
|
|
3469
|
+
typical
|
|
3470
|
+
ugly
|
|
3471
|
+
umbrella
|
|
3472
|
+
unable
|
|
3473
|
+
unaware
|
|
3474
|
+
uncle
|
|
3475
|
+
uncover
|
|
3476
|
+
under
|
|
3477
|
+
undo
|
|
3478
|
+
unfair
|
|
3479
|
+
unfold
|
|
3480
|
+
unhappy
|
|
3481
|
+
uniform
|
|
3482
|
+
unique
|
|
3483
|
+
unit
|
|
3484
|
+
universe
|
|
3485
|
+
unknown
|
|
3486
|
+
unlock
|
|
3487
|
+
until
|
|
3488
|
+
unusual
|
|
3489
|
+
unveil
|
|
3490
|
+
update
|
|
3491
|
+
upgrade
|
|
3492
|
+
uphold
|
|
3493
|
+
upon
|
|
3494
|
+
upper
|
|
3495
|
+
upset
|
|
3496
|
+
urban
|
|
3497
|
+
urge
|
|
3498
|
+
usage
|
|
3499
|
+
use
|
|
3500
|
+
used
|
|
3501
|
+
useful
|
|
3502
|
+
useless
|
|
3503
|
+
usual
|
|
3504
|
+
utility
|
|
3505
|
+
vacant
|
|
3506
|
+
vacuum
|
|
3507
|
+
vague
|
|
3508
|
+
valid
|
|
3509
|
+
valley
|
|
3510
|
+
valve
|
|
3511
|
+
van
|
|
3512
|
+
vanish
|
|
3513
|
+
vapor
|
|
3514
|
+
various
|
|
3515
|
+
vast
|
|
3516
|
+
vault
|
|
3517
|
+
vehicle
|
|
3518
|
+
velvet
|
|
3519
|
+
vendor
|
|
3520
|
+
venture
|
|
3521
|
+
venue
|
|
3522
|
+
verb
|
|
3523
|
+
verify
|
|
3524
|
+
version
|
|
3525
|
+
very
|
|
3526
|
+
vessel
|
|
3527
|
+
veteran
|
|
3528
|
+
viable
|
|
3529
|
+
vibrant
|
|
3530
|
+
vicious
|
|
3531
|
+
victory
|
|
3532
|
+
video
|
|
3533
|
+
view
|
|
3534
|
+
village
|
|
3535
|
+
vintage
|
|
3536
|
+
violin
|
|
3537
|
+
virtual
|
|
3538
|
+
virus
|
|
3539
|
+
visa
|
|
3540
|
+
visit
|
|
3541
|
+
visual
|
|
3542
|
+
vital
|
|
3543
|
+
vivid
|
|
3544
|
+
vocal
|
|
3545
|
+
voice
|
|
3546
|
+
void
|
|
3547
|
+
volcano
|
|
3548
|
+
volume
|
|
3549
|
+
vote
|
|
3550
|
+
voyage
|
|
3551
|
+
wage
|
|
3552
|
+
wagon
|
|
3553
|
+
wait
|
|
3554
|
+
walk
|
|
3555
|
+
wall
|
|
3556
|
+
walnut
|
|
3557
|
+
want
|
|
3558
|
+
warfare
|
|
3559
|
+
warm
|
|
3560
|
+
warrior
|
|
3561
|
+
wash
|
|
3562
|
+
wasp
|
|
3563
|
+
waste
|
|
3564
|
+
water
|
|
3565
|
+
wave
|
|
3566
|
+
way
|
|
3567
|
+
wealth
|
|
3568
|
+
weapon
|
|
3569
|
+
wear
|
|
3570
|
+
weasel
|
|
3571
|
+
weather
|
|
3572
|
+
web
|
|
3573
|
+
wedding
|
|
3574
|
+
weekend
|
|
3575
|
+
weird
|
|
3576
|
+
welcome
|
|
3577
|
+
west
|
|
3578
|
+
wet
|
|
3579
|
+
whale
|
|
3580
|
+
what
|
|
3581
|
+
wheat
|
|
3582
|
+
wheel
|
|
3583
|
+
when
|
|
3584
|
+
where
|
|
3585
|
+
whip
|
|
3586
|
+
whisper
|
|
3587
|
+
wide
|
|
3588
|
+
width
|
|
3589
|
+
wife
|
|
3590
|
+
wild
|
|
3591
|
+
will
|
|
3592
|
+
win
|
|
3593
|
+
window
|
|
3594
|
+
wine
|
|
3595
|
+
wing
|
|
3596
|
+
wink
|
|
3597
|
+
winner
|
|
3598
|
+
winter
|
|
3599
|
+
wire
|
|
3600
|
+
wisdom
|
|
3601
|
+
wise
|
|
3602
|
+
wish
|
|
3603
|
+
witness
|
|
3604
|
+
wolf
|
|
3605
|
+
woman
|
|
3606
|
+
wonder
|
|
3607
|
+
wood
|
|
3608
|
+
wool
|
|
3609
|
+
word
|
|
3610
|
+
work
|
|
3611
|
+
world
|
|
3612
|
+
worry
|
|
3613
|
+
worth
|
|
3614
|
+
wrap
|
|
3615
|
+
wreck
|
|
3616
|
+
wrestle
|
|
3617
|
+
wrist
|
|
3618
|
+
write
|
|
3619
|
+
wrong
|
|
3620
|
+
yard
|
|
3621
|
+
year
|
|
3622
|
+
yellow
|
|
3623
|
+
you
|
|
3624
|
+
young
|
|
3625
|
+
youth
|
|
3626
|
+
zebra
|
|
3627
|
+
zero
|
|
3628
|
+
zone
|
|
3629
|
+
zoo`.split(`
|
|
3630
|
+
`)),Dv={0:`ED25519`,1:`Secp256k1`,2:`Secp256r1`,3:`MultiSig`,5:`ZkLogin`,6:`Passkey`},Ov=e=>Object.freeze(e());function kv(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`&&`BYTES_PER_ELEMENT`in e&&e.BYTES_PER_ELEMENT===1}function Av(e){if(!kv(e))throw TypeError(`Uint8Array expected`)}function jv(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(e=>typeof e==`string`):t.every(e=>Number.isSafeInteger(e)):!1}function Mv(e){if(typeof e!=`function`)throw TypeError(`function expected`);return!0}function Nv(e,t){if(typeof t!=`string`)throw TypeError(`${e}: string expected`);return!0}function Pv(e,t=`number`){if(typeof e!=`number`)throw TypeError(`${t}: expected number, got ${typeof e}`);if(!Number.isSafeInteger(e))throw RangeError(`${t}: expected safe integer, got ${e}`)}function Fv(e,t){if(!jv(!1,t))throw TypeError(`${e}: array of numbers expected`)}var Iv=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function Lv(e,t=e.length){let n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}var Rv=(()=>{try{let e=new TextDecoder;return e.decode(Uint8Array.of(65,48,43,127))===`A0+`?e:void 0}catch{return}})(),zv=8192;function Bv(e){let t=e.length;if(Rv!==void 0&&t>=12)return Rv.decode(e);if(t<=zv)return String.fromCharCode.apply(null,e);let n=``;for(let r=0;r<t;r+=zv)n+=String.fromCharCode.apply(null,e.subarray(r,r+zv));return n}function Vv(e){if(Pv(e),e<=0||e>8)throw RangeError(`radix2: bits should be in (0..8]`);let t=Iv[e]-1;return{encode:n=>{Av(n);let r=n.length,i=new Uint8Array(Math.ceil(r*8/e)),a=0,o=0,s=0;for(let c=0;c<r;)for(c+2<r?(a=a<<24|n[c]<<16|n[c+1]<<8|n[c+2],o+=24,c+=3):(a=(a<<8|n[c])&65535,o+=8,c++);o-=e,i[s++]=a>>o&t,!(o<e););return o>0&&(i[s]=a<<e-o&t),i},decode:t=>{let n=t.length,r=new Uint8Array(Math.floor(n*e/8)),i=0,a=0,o=0;for(let s=0;s<n;s++)for(i=(i<<e|t[s])&65535,a+=e;a>=8;a-=8)r[o++]=i>>a-8&255;if(i=i<<8-a&255,a>=e)throw Error(`Excess padding`);if(i>0)throw Error(`Non-zero padding: ${i}`);return r}}}function Hv(e,t){let n=e.length;if(n>128)throw Error(`alphabet: max 128 letters`);let r=new Uint8Array(n),i=new Int8Array(128).fill(-1);for(let t=0;t<n;t++){let n=e.charCodeAt(t);if(e.codePointAt(t)!==n||n>127)throw Error(`alphabet: single-char ASCII letters only`);r[t]=n,i[n]=t}if(t!==void 0)for(let e of Object.keys(t)){let n=e.charCodeAt(0),r=i[t[e].charCodeAt(0)];if(e.length!==1||n>127||r===void 0||r===-1)throw Error(`alphabet: invalid alias ${e}`);i[n]=r}return{encode:e=>{let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){let i=e[n],a=r[i];if(a===void 0)throw Error(`alphabet.encode: invalid digit ${i}`);t[n]=a}return Bv(t)},decode:t=>{Nv(`decode`,t);let n=t.length,r=new Uint8Array(n);for(let a=0;a<n;a++){let n=t.charCodeAt(a),o=n<128?i[n]:-1;if(o===-1)throw Error(`Unknown letter "${t[a]}". Allowed: ${e}`);r[a]=o}return r}}}function Uv(e){return Mv(e),function(...t){try{return e.apply(null,t)}catch{}}}var Wv=Hv(`qpzry9x8gf2tvdw0s3jn54khce6mua7l`),Gv=/^[\x21-\x60\x7b-\x7e]+$/;function Kv(e,t){for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(r<33||r>126)throw Error(`${e}: printable ASCII expected`)}}function qv(e){let t=e.length,n=new Uint8Array(t);for(let r=0;r<t;r++){let t=e[r];if(t<0||t>=32)throw Error(`alphabet.encode: invalid digit ${t}`);n[r]=t}return n}var Jv=[996825010,642813549,513874426,1027748829,705979059];function Yv(e){let t=e>>25,n=(e&33554431)<<5;for(let e=0;e<Jv.length;e++)(t>>e&1)==1&&(n^=Jv[e]);return n}function Xv(e,t,n=1){let r=e.length,i=1;for(let t=0;t<r;t++){let n=e.charCodeAt(t);if(n<33||n>126)throw Error(`Invalid prefix (${e})`);i=Yv(i)^n>>5}i=Yv(i);for(let t=0;t<r;t++)i=Yv(i)^e.charCodeAt(t)&31;for(let e of t)i=Yv(i)^e;for(let e=0;e<6;e++)i=Yv(i);i^=n;let a=new Uint8Array(6);for(let e=0;e<6;e++)a[e]=i>>>5*(5-e)&31;return Wv.encode(a)}function Zv(e){let t=e===`bech32`?1:734539939,n=Vv(5),r=e=>{Av(e);let t=e.length,n=Array(Math.ceil(t*8/5)),r=0,i=0,a=0;for(let o=0;o<t;o++)for(r=r<<8|e[o],i+=8;i>=5;i-=5)n[a++]=r>>i-5&31;return i>0&&(n[a]=r<<5-i&31),n},i=e=>{Fv(`radix2.decode`,e);let t=e.length,r=new Uint8Array(t);for(let n=0;n<t;n++){let t=e[n];if(t<0||t>=32)throw Error(`convertRadix2: invalid word=${t}`);r[n]=t}return n.decode(r)},a=Uv(i);function o(e,n,r=90){Nv(`bech32.encode prefix`,e),r!==!1&&Pv(r,`limit`),kv(n)&&(n=Lv(n)),Fv(`bech32.encode`,n);let i=e.length;if(i===0)throw TypeError(`Invalid prefix length ${i}`);let a=i+7+n.length;if(r!==!1&&a>r)throw TypeError(`Length ${a} exceeds limit ${r}`);Kv(`bech32.encode prefix`,e);let o=e.toLowerCase(),s=Xv(o,n,t);return`${o}1${Wv.encode(qv(n))}${s}`}function s(e,n=90){Nv(`bech32.decode input`,e),n!==!1&&Pv(n,`limit`);let r=e.length;if(r<8||n!==!1&&r>n)throw TypeError(`invalid string length ${r}, expected (8..${n})`);let i=e.toLowerCase();if(e!==i&&!Gv.test(e))throw Kv(`bech32.decode input`,e),Error(`mixed-case string not allowed`);let a=i.lastIndexOf(`1`);if(a===0||a===-1)throw Error(`invalid separator "1"`);let o=i.slice(0,a),s=i.slice(a+1);if(s.length<6)throw Error(`invalid data length`);let c=Wv.decode(s),l=Lv(c,c.length-6),u=Xv(o,l,t);if(!s.endsWith(u))throw Error(`Invalid checksum in ${e}`);return{prefix:o,words:l}}let c=Uv(s);function l(e,t=90){let{prefix:n,words:r}=s(e,t);return{prefix:n,words:r,bytes:i(r)}}function u(e,t){return o(e,r(t))}return{encode:o,decode:s,encodeFromBytes:u,decodeToBytes:l,decodeUnsafe:c,fromWords:i,fromWordsUnsafe:a,toWords:r}}var Qv=Ov(()=>Zv(`bech32`));function $v(e){let{prefix:t,words:n}=Qv.decode(e);if(t!==`suiprivkey`)throw Error(`invalid private key prefix`);let r=new Uint8Array(Qv.fromWords(n)),i=r.slice(1);return{scheme:Dv[r[0]],secretKey:i}}var ey=`external-proposal-alpha-2026-05-25`,ty=`proposal-review-model-alpha-2026-05-25`,ny=L().refine(e=>{let t=new Date(e);return!Number.isNaN(t.getTime())&&t.toISOString()===e},`Expected ISO 8601 UTC timestamp`),ry=/transaction\s*bytes?|transactionBytes|tx\s*bytes?|serialized\s*transaction|serializedTransaction|signed\s*transaction|signing\s*request|signingRequest|wallet\s*authorization|walletAuthorization|private\s*key|privateKey|secret\s*key|secretKey|seed\s*phrase|mnemonic|suiprivkey|signature|route[-_\s]*selected|routeSelectedPlan|bcs\s*transaction|programmable\s*transaction/i,iy=/(?:0x[0-9a-fA-F]{160,}|[A-Za-z0-9+/_=-]{160,})/,ay=/suiprivkey1[023456789acdefghjklmnpqrstuvwxyz]+/gi,oy=/(^|[^0-9a-fA-F])(?:0x)?[0-9a-fA-F]{64}($|[^0-9a-fA-F])/,sy=/(^|[^A-Za-z0-9+/_=-])(?:[A-Za-z0-9+/]{43}=|[A-Za-z0-9+/]{44}|[A-Za-z0-9_-]{43,44})($|[^A-Za-z0-9+/_=-])/,cy=/^(?:0|[1-9][0-9]*)(?:\.[0-9]+)?$/,ly=[12,15,18,21,24];function uy(e,t,n={}){return L().min(1).max(e).superRefine((e,r)=>{(ry.test(e)||iy.test(e)||fy(e)||py(e)||!n.allowRawSecretLikeText&&my(e))&&r.addIssue({code:`custom`,message:`${t} must not contain executable, signing, private-key, mnemonic, route-selected, or encoded secret-like material`})})}function dy(e,t){return uy(e,t,{allowRawSecretLikeText:!0})}function fy(e){return(e.match(ay)??[]).some(e=>{try{return $v(e.toLowerCase()),!0}catch{return e.toLowerCase().startsWith(`suiprivkey1`)}})}function py(e){let t=e.normalize(`NFKD`).toLowerCase().replace(/[^a-z]+/g,` `).trim().split(/\s+/).filter(Boolean);for(let e of ly)if(!(t.length<e)){for(let n=0;n<=t.length-e;n+=1)if(Tv(t.slice(n,n+e).join(` `),Ev))return!0}return!1}function my(e){return oy.test(e)||sy.test(e)}var hy=uy(80,`amountDisplay`).refine(e=>cy.test(e)&&/[1-9]/.test(e),{message:`Expected a positive decimal display amount`}),gy=H({kind:K([`mcp_server`,`ai_client`,`user`,`other`]),name:uy(120,`source.name`),reference:uy(256,`source.reference`).optional()}).strict(),_y=H({address:y_.optional(),label:uy(120,`party.label`).optional()}).strict().refine(e=>e.address!==void 0||e.label!==void 0,{message:`Expected address or label`}),vy=H({amountDisplay:hy,amountKind:q(`display_proposal`).default(`display_proposal`),symbol:uy(64,`amount.symbol`).optional(),coinType:dy(512,`amount.coinType`).optional(),denomination:uy(64,`amount.denomination`).optional()}).strict(),yy=H({packageId:dy(128,`action.target.packageId`).optional(),module:uy(128,`action.target.module`).optional(),function:uy(128,`action.target.function`).optional(),objectId:dy(128,`action.target.objectId`).optional(),label:uy(120,`action.target.label`).optional()}).strict().refine(e=>e.packageId!==void 0||e.module!==void 0||e.function!==void 0||e.objectId!==void 0||e.label!==void 0,{message:`Expected at least one action target field`}),by=H({direction:K([`outgoing`,`expected_incoming`,`fee`]),amount:vy,recipient:_y.optional(),description:uy(512,`assetFlow.description`).optional()}).strict(),xy=H({id:uy(120,`proposal.id`),source:gy,network:q(`sui:mainnet`),createdAt:ny,expiresAt:ny.optional(),purpose:uy(512,`purpose`),assumptions:V(uy(512,`assumptions[]`)).max(20).optional(),requiredUserChoices:V(uy(512,`requiredUserChoices[]`)).max(20).optional()}).strict(),Sy=Sc(`type`,[xy.extend({type:q(`payment`),payment:H({amount:vy,recipient:_y,target:uy(512,`payment.target`).optional()}).strict()}).strict(),xy.extend({type:q(`sui_action`),action:H({actionKind:uy(120,`action.actionKind`),target:yy,recipient:_y.optional(),assetFlow:V(by).max(20).optional()}).strict()}).strict()]),Cy=H({id:L(),label:L(),status:K([`pass`,`warning`,`fail`]),message:L(),source:K([`proposal`,`adapter`,`registry`,`quote`,`wallet`,`simulation`,`network`])}).strict(),wy=H({id:L(),label:L(),reason:L()}).strict(),Ty=H({modelVersion:q(ty),contractVersion:q(ey),proposalId:L(),proposalType:K([`payment`,`sui_action`]),proposalSource:gy,proposedAction:H({kind:K([`payment`,`sui_action`]),title:L(),purpose:L(),network:q(`sui:mainnet`),recipient:_y.optional(),target:W([L(),yy]).optional()}).strict(),assetFlow:H({outgoing:V(vy),expectedIncoming:V(vy),fees:V(vy)}).strict(),recipients:V(_y),targets:V(W([L(),yy])),evidenceUsed:V(H({id:L(),label:L(),source:K([`external_proposal`,`local_schema`]),summary:L()}).strict()),missingEvidence:V(wy),requiredUserChoices:V(wy),unsupportedClaims:V(H({id:L(),label:L(),reason:L()}).strict()),rejectedExecutableFields:V(H({fieldName:L(),reason:L()}).strict()),freshness:H({proposalCreatedAt:ny,proposalExpiresAt:ny.optional(),evaluatedAt:ny,status:K([`current`,`expired`,`created_in_future`,`expiry_not_provided`]),reason:L()}).strict(),blockingChecks:V(Cy),nonSignableReason:H({code:q(`external_proposal_review_only`),message:L(),blockedCapabilities:V(L())}).strict()}).strict();H({requestedIntent:Sy,implementationStatus:q(`read_only_review_only`),contractVersion:q(ey)}).strict();var Ey=[`adapter_not_implemented`,`producer_stage_missing`,`wallet_review_contract_emit_missing`,`network_mismatch`,`insufficient_balance`,`insufficient_gas`,`allowlist_violation`,`asset_mismatch`,`amount_mismatch`,`wallet_mismatch`,`unsupported_action`,`object_resolution_failed`,`proposal_review_only`],Dy=[`review_evidence_stale`,`quote_stale`,`quote_unavailable`,`simulation_transient_failure`,`review_update_failed`,`wallet_connection_changed`],Oy=[`proposed`,`awaiting_wallet`,`wallet_connected`,`ready_for_wallet_review`,`refresh_required`,`blocked`,`expired`],ky=[`humanReadableReview`,`simulation`,`transactionReviewData`,`ptbVisualization`,`assetFlowActual`,`beforeAfterBalance`],Ay=K([`client.core.simulateTransaction`,`client.transactionExecutionService.simulateTransaction`]),jy=`ptb-visualization-contract-alpha-2026-05-25`,My=[`proposedAction`,`assetFlow`,`recipients`,`targets`,`evidenceUsed`,`missingEvidence`,`requiredUserChoices`,`unsupportedClaims`,`freshness`,`blockingChecks`],Ny=[`effects`,`balanceChanges`,`objectTypes`,`transaction`],Py=[`transaction_bytes`,`serialized_transaction`,`wallet_signature_request`,`private_key_material`,`wallet_authorization`,`signing_data`,`signing_readiness`,`payment_execution_readiness`],Fy=[`transaction_building_input`,`wallet_authorization`,`signing_data`,`signing_readiness`,`payment_execution_readiness`,`route_recommendation`],Iy=v_,Ly=`MIST`,Ry=[`checkedAt`,`expiresAt`],zy=[`checkedAt`,`expiryStatus`],By=[`rawAmount`,`asset`,`amountRole`],Vy=[`minOutRaw`,`asset`,`amountRole`],Hy=[`gasBudgetRaw`,`asset`,`amountRole`],Uy=[`gasUsedRaw`,`asset`,`amountRole`],Wy=[`checkedAt`,`gasResolutionStatus`,`unresolvedReason`],Gy=[`balanceChanges`,`asset`,`amountRole`],Ky=[`coinType`,`decimals`],qy=[`quoteEvidenceId`,`minOutRaw`],Jy=[`maxSlippageBps`,`userSelection`],Yy=[`maxSlippageBps`,`minOutRaw`],Xy=[`ownerAccount`,`objects`],Zy=[`pinned_sdk_registry`,`verified_mainnet_onchain_metadata`,`wallet_account_read`,`quote_evidence`,`review_time_simulation`,`validated_request_fact`,`user_explicit_choice`],Qy=[`input`,`expected_output`,`minimum_output`,`gas_budget`,`gas_used`,`fee`,`balance_delta`],$y={input:{kinds:[`validated_request_fact`,`wallet_account_read`,`user_explicit_choice`],fields:By},expected_output:{kinds:[`quote_evidence`,`review_time_simulation`],fields:By},minimum_output:{kinds:[`quote_evidence`],fields:Vy},gas_budget:{kinds:[`review_time_simulation`],fields:Hy},gas_used:{kinds:[`review_time_simulation`],fields:Uy},fee:{kinds:[`review_time_simulation`],fields:By},balance_delta:{kinds:[`review_time_simulation`],fields:Gy}},eb={pinned_sdk_metadata:{kinds:[`pinned_sdk_registry`],fields:Ky},verified_mainnet_onchain_metadata:{kinds:[`verified_mainnet_onchain_metadata`],fields:Ky}},tb={user_explicit:{kinds:[`user_explicit_choice`],fields:Jy},adapter_policy_from_quote_evidence:{kinds:[`quote_evidence`],fields:Yy}},nb={kinds:[`review_time_simulation`],fields:Wy},rb={kinds:[`quote_evidence`],fields:qy},ib={kinds:[`validated_request_fact`],fields:Ry},ab={kinds:[`validated_request_fact`],fields:zy},ob={raw_quantity_amount:{byRole:$y},unit_metadata:{bySource:eb},gas_unresolved_status:nb,expiry_status:{current:ib,expired:ib,not_provided:ab,not_applicable:ab},quote_min_out:rb,slippage_policy:{bySource:tb},object_ownership:{kinds:[`wallet_account_read`],fields:Xy},simulation_result:{kinds:[`review_time_simulation`],fields:Ny}},sb={gasBudgetClaimId:{factKind:`raw_quantity_amount`,role:`gas_budget`,assetCoinType:Iy,rawUnit:Ly},gasUsedClaimId:{factKind:`raw_quantity_amount`,role:`gas_used`,assetCoinType:Iy,rawUnit:Ly},gasObjectOwnershipClaimId:{factKind:`object_ownership`,ownership:`owned_by_account`}},cb=L().refine(e=>{let t=new Date(e);return!Number.isNaN(t.getTime())&&t.toISOString()===e},`Expected ISO 8601 UTC timestamp`),lb=B_(`unsigned integer`),ub=L().regex(/^0x[0-9a-fA-F]{1,64}$/,{message:`Expected a Sui object id`}),db=L().min(1).max(512).refine(e=>{try{return U_(e)===e}catch{return!1}},`Expected a normalized Sui struct tag coin type`),X=L().min(1).max(120),fb=H({symbol:L().min(1).max(64).optional(),coinType:db}).strict(),pb=/transaction\s*bytes?|tx\s*bytes?|serialized\s*transaction|serializedTransaction|signed\s*transaction|signing\s*request|signingRequest|wallet\s*authorization|walletAuthorization|private\s*key|privateKey|secret\s*key|secretKey|seed\s*phrase|mnemonic|suiprivkey|signature|bcs\s*transaction/i,mb=/(?:0x[0-9a-fA-F]{160,}|[A-Za-z0-9+/_=-]{160,})/;function hb(e,t){return L().min(1).max(e).superRefine((e,n)=>{(pb.test(e)||mb.test(e))&&n.addIssue({code:`custom`,message:`${t} must not contain executable transaction, signing, private-key, mnemonic, or long encoded material`})})}function gb(e,t){let n=new Set(e);return t.filter(e=>!n.has(e))}function _b(e,t,n,r,i){let a=gb(t,n);a.length!==0&&e.addIssue({code:`custom`,path:r,message:`${i} must include ${a.join(`, `)}`})}function vb(e,t,n,r,i){_b(e,t,n,r,i)}function yb(e,t,n){e.addIssue({code:`custom`,path:t,message:`${n} must match referenced evidence claim`})}function Z(e,t,n,r,i){t!==n&&yb(e,r,i)}function bb(e,t,n,r,i){let a=new Set(t),o=new Set(n);if(a.size!==o.size)yb(e,r,i);else for(let t of a)if(!o.has(t)){yb(e,r,i);return}}function xb(e,t,n,r,i){(t.symbol!==n.symbol||t.coinType!==n.coinType)&&yb(e,r,i)}function Sb(e,t,n,r,i){try{U_(t.coinType)!==n&&yb(e,r,i)}catch{yb(e,r,i)}}var Cb=H({kind:K([`natural_language_intent`,`external_proposal`,`mcp_action_request`,`local_review_request`]),sourceId:L().min(1).max(160),capturedAt:cb,authority:q(`untrusted_until_review_regenerates_and_verifies`),userSelectionSource:K([`user_explicit`,`prior_user_explicit_context`]).optional()}).strict(),wb=H({id:X,kind:K(Zy),network:q(`sui:mainnet`),source:L().min(1).max(240),verifiedAt:cb,fields:V(L().min(1).max(120)).min(1)}).strict(),Tb=Sc(`factKind`,[H({id:X,factKind:q(`raw_quantity_amount`),sourceEvidenceId:X,role:K(Qy),asset:fb,rawAmount:lb}).strict(),H({id:X,factKind:q(`unit_metadata`),sourceEvidenceId:X,source:K([`pinned_sdk_metadata`,`verified_mainnet_onchain_metadata`]),coinType:db,decimals:R().int().min(0).max(255)}).strict(),H({id:X,factKind:q(`gas_unresolved_status`),sourceEvidenceId:X,checkedAt:cb,status:q(`unresolved`),reason:L().min(1).max(240)}).strict(),H({id:X,factKind:q(`expiry_status`),sourceEvidenceId:X,checkedAt:cb,status:K([`current`,`expired`,`not_provided`,`not_applicable`]),expiresAt:cb.optional(),reason:L().min(1).max(240).optional()}).strict(),H({id:X,factKind:q(`quote_min_out`),sourceEvidenceId:X,quoteEvidenceId:L().min(1).max(120),minOutRaw:lb}).strict(),H({id:X,factKind:q(`slippage_policy`),sourceEvidenceId:X,policySource:K([`user_explicit`,`adapter_policy_from_quote_evidence`]),maxSlippageBps:R().int().min(0).max(1e4),minOutRaw:lb.optional()}).strict(),H({id:X,factKind:q(`object_ownership`),sourceEvidenceId:X,objectId:ub,ownerAccount:y_,ownership:K([`owned_by_account`,`shared_object`,`immutable_or_package`,`not_owned_by_account`])}).strict(),H({id:X,factKind:q(`simulation_result`),sourceEvidenceId:X,provider:Ay,checksEnabled:q(!0),simulatedAt:cb,status:K([`success`,`failed`,`unavailable`]),requiredFields:V(K(Ny)).min(Ny.length),missingFields:V(K(Ny)).default([]),failureReason:L().min(1).max(240).optional()}).strict()]),Eb=H({id:X,role:K(Qy),asset:fb,rawAmount:lb,unit:H({decimals:R().int().min(0).max(255),source:K([`pinned_sdk_metadata`,`verified_mainnet_onchain_metadata`]),sourceField:L().min(1).max(160),unitClaimId:X}).strict(),amountClaimId:X,displayOnly:H({amountDisplay:L().min(1).max(120),reason:q(`presentation_only_not_signing_input`)}).strict().optional()}).strict(),Db=H({objectId:ub,ownerAccount:y_,ownershipClaimId:X}).strict(),Ob=H({source:q(`review_time_simulation`),checkedAt:cb,gasBudgetRaw:lb.optional(),gasBudgetClaimId:X.optional(),gasUsedRaw:lb.optional(),gasUsedClaimId:X.optional(),gasObjects:V(Db).optional(),unresolvedReason:L().min(1).max(240).optional(),unresolvedClaimId:X.optional()}).strict().superRefine((e,t)=>{let n=e.gasBudgetRaw!==void 0||e.gasUsedRaw!==void 0;!n&&e.unresolvedReason===void 0&&t.addIssue({code:`custom`,message:`Expected gas evidence or unresolvedReason`}),n&&e.unresolvedReason!==void 0&&t.addIssue({code:`custom`,path:[`unresolvedReason`],message:`Resolved gas quantities must not include unresolvedReason`}),e.gasBudgetRaw!==void 0&&e.gasBudgetClaimId===void 0&&t.addIssue({code:`custom`,path:[`gasBudgetClaimId`],message:`gasBudgetRaw requires gasBudgetClaimId`}),e.gasBudgetRaw===void 0&&e.gasBudgetClaimId!==void 0&&t.addIssue({code:`custom`,path:[`gasBudgetClaimId`],message:`gasBudgetClaimId requires gasBudgetRaw`}),e.gasUsedRaw!==void 0&&e.gasUsedClaimId===void 0&&t.addIssue({code:`custom`,path:[`gasUsedClaimId`],message:`gasUsedRaw requires gasUsedClaimId`}),e.gasUsedRaw===void 0&&e.gasUsedClaimId!==void 0&&t.addIssue({code:`custom`,path:[`gasUsedClaimId`],message:`gasUsedClaimId requires gasUsedRaw`}),e.unresolvedReason!==void 0&&e.unresolvedClaimId===void 0&&t.addIssue({code:`custom`,path:[`unresolvedClaimId`],message:`unresolvedReason requires unresolvedClaimId`}),e.unresolvedReason===void 0&&e.unresolvedClaimId!==void 0&&t.addIssue({code:`custom`,path:[`unresolvedClaimId`],message:`unresolvedClaimId requires unresolvedReason`})}),kb=Sc(`status`,[H({checkedAt:cb,status:q(`current`),expiresAt:cb,evidenceClaimId:X}).strict(),H({checkedAt:cb,status:q(`expired`),expiresAt:cb,evidenceClaimId:X}).strict(),H({checkedAt:cb,status:q(`not_provided`),evidenceClaimId:X,reason:L().min(1).max(240),expiresAt:_c().optional()}).strict(),H({checkedAt:cb,status:q(`not_applicable`),evidenceClaimId:X,reason:L().min(1).max(240),expiresAt:_c().optional()}).strict()]).superRefine((e,t)=>{e.status===`current`&&Date.parse(e.expiresAt)<=Date.parse(e.checkedAt)&&t.addIssue({code:`custom`,path:[`expiresAt`],message:`Current expiry evidence requires expiresAt after checkedAt`}),e.status===`expired`&&Date.parse(e.expiresAt)>Date.parse(e.checkedAt)&&t.addIssue({code:`custom`,path:[`expiresAt`],message:`Expired expiry evidence requires expiresAt at or before checkedAt`})}),Ab=H({status:K([`required_and_verified`,`not_required_for_action`,`missing`,`stale`]),quoteEvidenceId:L().min(1).max(120).optional(),quoteEvidenceClaimId:X.optional(),maxSlippageBps:R().int().min(0).max(1e4).optional(),minOutRaw:lb.optional(),policySource:K([`user_explicit`,`adapter_policy_from_quote_evidence`]).optional(),policyEvidenceClaimId:X.optional()}).strict().superRefine((e,t)=>{e.status===`required_and_verified`&&(e.quoteEvidenceId===void 0||e.quoteEvidenceClaimId===void 0||e.maxSlippageBps===void 0||e.minOutRaw===void 0||e.policySource===void 0||e.policyEvidenceClaimId===void 0)&&t.addIssue({code:`custom`,message:`Verified min-out evidence requires quoteEvidenceId, quoteEvidenceClaimId, maxSlippageBps, minOutRaw, policySource, and policyEvidenceClaimId`}),e.quoteEvidenceId!==void 0&&e.quoteEvidenceClaimId===void 0&&t.addIssue({code:`custom`,path:[`quoteEvidenceClaimId`],message:`quoteEvidenceId requires quoteEvidenceClaimId`}),e.quoteEvidenceId===void 0&&e.quoteEvidenceClaimId!==void 0&&t.addIssue({code:`custom`,path:[`quoteEvidenceClaimId`],message:`quoteEvidenceClaimId requires quoteEvidenceId`}),e.minOutRaw!==void 0&&e.quoteEvidenceClaimId===void 0&&t.addIssue({code:`custom`,path:[`quoteEvidenceClaimId`],message:`minOutRaw requires quoteEvidenceClaimId`}),e.maxSlippageBps!==void 0&&e.policySource===void 0&&t.addIssue({code:`custom`,path:[`policySource`],message:`maxSlippageBps requires policySource`}),e.policySource!==void 0&&e.policyEvidenceClaimId===void 0&&t.addIssue({code:`custom`,path:[`policyEvidenceClaimId`],message:`policySource requires policyEvidenceClaimId`}),e.policySource===void 0&&e.policyEvidenceClaimId!==void 0&&t.addIssue({code:`custom`,path:[`policyEvidenceClaimId`],message:`policyEvidenceClaimId requires policySource`})}),jb=H({checkedAt:cb,ownerAccount:y_,objects:V(H({objectId:ub,role:K([`input_coin`,`gas_coin`,`protocol_object`,`shared_object`,`receiving_object`]),ownership:K([`owned_by_account`,`shared_object`,`immutable_or_package`,`not_owned_by_account`]),evidenceClaimId:X}).strict()).min(1)}).strict(),Mb=H({evidenceClaimId:X,transactionDigest:b_,provider:Ay,checksEnabled:q(!0),simulatedAt:cb,status:K([`success`,`failed`,`unavailable`]),requiredFields:V(K(Ny)).min(Ny.length),missingFields:V(K(Ny)).default([]),failureReason:L().min(1).max(240).optional()}).strict().refine(e=>e.status!==`success`||e.missingFields.length===0,{message:`Successful simulation evidence must not have missing required fields`}).refine(e=>Ny.every(t=>e.requiredFields.includes(t)),{message:`Simulation evidence must include every required simulation field`}).refine(e=>e.status===`success`||e.failureReason!==void 0,{message:`Failed or unavailable simulation evidence requires failureReason`}).refine(e=>e.status!==`success`||e.failureReason===void 0,{message:`Successful simulation evidence must not include failureReason`}),Nb=H({fields:V(K(My)).min(My.length),transactionDigest:b_,source:q(`review_model_or_adapter_equivalent`),purpose:q(`human_review_before_wallet_authorization`)}).strict().refine(e=>My.every(t=>e.fields.includes(t)),{message:`Human-readable review fields must include every required review field`}),Pb=H({runtimeStatus:q(`emitted_pre_handoff`),mcpAndReviewUiMayExpose:V(K([`human_readable_review`,`ptb_visualization_artifact`,`diagnostics`,`status_checks`])).min(1),prohibited:V(K(Py)).min(1)}).strict().superRefine((e,t)=>{vb(t,e.prohibited,Py,[`prohibited`],`prohibited`)}),Fb=H({schemaVersion:q(1),adapterId:L().min(1).max(120),protocol:L().min(1).max(120),actionKind:L().min(1).max(120),network:q(`sui:mainnet`),inputProvenance:Cb,sourceReferences:V(wb).min(1),evidenceClaims:V(Tb).min(1),rawQuantities:V(Eb).min(1),gas:Ob,expiry:kb,slippageOrMinOut:Ab,objectOwnership:jb,simulation:Mb,humanReadableReview:Nb,outputBoundary:Pb,reviewedTransactionDigest:b_}).strict().superRefine((e,t)=>{let n=new Set,r=new Map,i=new Map;e.sourceReferences.forEach((e,a)=>{n.has(e.id)&&t.addIssue({code:`custom`,path:[`sourceReferences`,a,`id`],message:`sourceReferences id must be unique: ${e.id}`}),n.add(e.id),r.has(e.id)||(r.set(e.id,e),i.set(e.id,a))});let a=new Set,o=new Map,s=new Map;e.evidenceClaims.forEach((e,n)=>{a.has(e.id)&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`id`],message:`evidenceClaims id must be unique: ${e.id}`}),a.add(e.id),o.has(e.id)||(o.set(e.id,e),s.set(e.id,n))});let c=(e,n)=>{if(e===void 0)return;let i=r.get(e);if(i!==void 0)return i;t.addIssue({code:`custom`,path:n,message:`source evidence id must reference sourceReferences[].id: ${e}`})},l=(e,n,r,a)=>{if(e===void 0)return;let o=c(e,r);if(o===void 0)return;let s=i.get(e),l=s===void 0?r:[`sourceReferences`,s];n.kinds.includes(o.kind)||t.addIssue({code:`custom`,path:[...l,`kind`],message:`${a} source kind must be one of ${n.kinds.join(`, `)}`}),_b(t,o.fields,n.fields,[...l,`fields`],`${a} sourceReferences fields`)},u=(e,n,r,i)=>{if(e===void 0){t.addIssue({code:`custom`,path:r,message:`${i} must reference evidenceClaims[].id`});return}let a=o.get(e);if(a===void 0)t.addIssue({code:`custom`,path:r,message:`${i} must reference evidenceClaims[].id: ${e}`});else{if(a.factKind!==n){let a=s.get(e),o=a===void 0?r:[`evidenceClaims`,a,`factKind`];t.addIssue({code:`custom`,path:o,message:`${i} evidence claim factKind must be ${n}`})}return a}};if(e.evidenceClaims.forEach((e,n)=>{e.factKind===`raw_quantity_amount`&&l(e.sourceEvidenceId,ob.raw_quantity_amount.byRole[e.role],[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].raw_quantity_amount`),e.factKind===`unit_metadata`&&l(e.sourceEvidenceId,ob.unit_metadata.bySource[e.source],[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].unit_metadata`),e.factKind===`gas_unresolved_status`&&l(e.sourceEvidenceId,ob.gas_unresolved_status,[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].gas_unresolved_status`),e.factKind===`expiry_status`&&(l(e.sourceEvidenceId,ob.expiry_status[e.status],[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].expiry_status`),(e.status===`current`||e.status===`expired`)&&e.expiresAt===void 0&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`expiresAt`],message:`Current or expired expiry claim requires expiresAt`}),(e.status===`not_provided`||e.status===`not_applicable`)&&e.reason===void 0&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`reason`],message:`Unavailable expiry claim requires reason`}),(e.status===`not_provided`||e.status===`not_applicable`)&&e.expiresAt!==void 0&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`expiresAt`],message:`Unavailable expiry claim must not include expiresAt`}),e.status===`current`&&e.expiresAt!==void 0&&Date.parse(e.expiresAt)<=Date.parse(e.checkedAt)&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`expiresAt`],message:`Current expiry claim requires expiresAt after checkedAt`}),e.status===`expired`&&e.expiresAt!==void 0&&Date.parse(e.expiresAt)>Date.parse(e.checkedAt)&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`expiresAt`],message:`Expired expiry claim requires expiresAt at or before checkedAt`})),e.factKind===`quote_min_out`&&l(e.sourceEvidenceId,ob.quote_min_out,[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].quote_min_out`),e.factKind===`slippage_policy`&&(l(e.sourceEvidenceId,ob.slippage_policy.bySource[e.policySource],[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].slippage_policy`),e.policySource===`adapter_policy_from_quote_evidence`&&e.minOutRaw===void 0&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`minOutRaw`],message:`Adapter-derived slippage policy claim requires minOutRaw`})),e.factKind===`object_ownership`&&l(e.sourceEvidenceId,ob.object_ownership,[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].object_ownership`),e.factKind===`simulation_result`&&(l(e.sourceEvidenceId,ob.simulation_result,[`evidenceClaims`,n,`sourceEvidenceId`],`evidenceClaims[${n}].simulation_result`),e.status===`success`&&e.missingFields.length!==0&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`missingFields`],message:`Successful simulation claim must not have missing required fields`}),Ny.every(t=>e.requiredFields.includes(t))||t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`requiredFields`],message:`Simulation claim must include every required simulation field`}),e.status!==`success`&&e.failureReason===void 0&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`failureReason`],message:`Failed or unavailable simulation claim requires failureReason`}),e.status===`success`&&e.failureReason!==void 0&&t.addIssue({code:`custom`,path:[`evidenceClaims`,n,`failureReason`],message:`Successful simulation claim must not include failureReason`}))}),e.rawQuantities.forEach((e,n)=>{let r=u(e.amountClaimId,`raw_quantity_amount`,[`rawQuantities`,n,`amountClaimId`],`rawQuantities[${n}].amountClaimId`);r?.factKind===`raw_quantity_amount`&&(Z(t,e.role,r.role,[`rawQuantities`,n,`role`],`rawQuantities[${n}].role`),Z(t,e.rawAmount,r.rawAmount,[`rawQuantities`,n,`rawAmount`],`rawQuantities[${n}].rawAmount`),xb(t,e.asset,r.asset,[`rawQuantities`,n,`asset`],`rawQuantities[${n}].asset`));let i=u(e.unit.unitClaimId,`unit_metadata`,[`rawQuantities`,n,`unit`,`unitClaimId`],`rawQuantities[${n}].unit.unitClaimId`);i?.factKind===`unit_metadata`&&(Z(t,e.unit.source,i.source,[`rawQuantities`,n,`unit`,`source`],`rawQuantities[${n}].unit.source`),Z(t,e.unit.decimals,i.decimals,[`rawQuantities`,n,`unit`,`decimals`],`rawQuantities[${n}].unit.decimals`),e.asset.coinType!==void 0&&Z(t,e.asset.coinType,i.coinType,[`rawQuantities`,n,`asset`,`coinType`],`rawQuantities[${n}].asset.coinType`))}),e.gas.gasBudgetRaw!==void 0){let n=u(e.gas.gasBudgetClaimId,`raw_quantity_amount`,[`gas`,`gasBudgetClaimId`],`gas.gasBudgetClaimId`);n?.factKind===`raw_quantity_amount`&&(Z(t,n.role,sb.gasBudgetClaimId.role,[`gas`,`gasBudgetClaimId`],`gas.gasBudgetClaimId role`),Sb(t,n.asset,sb.gasBudgetClaimId.assetCoinType,[`gas`,`gasBudgetClaimId`],`gas.gasBudgetClaimId asset`),Z(t,e.gas.gasBudgetRaw,n.rawAmount,[`gas`,`gasBudgetRaw`],`gas.gasBudgetRaw`))}if(e.gas.gasUsedRaw!==void 0){let n=u(e.gas.gasUsedClaimId,`raw_quantity_amount`,[`gas`,`gasUsedClaimId`],`gas.gasUsedClaimId`);n?.factKind===`raw_quantity_amount`&&(Z(t,n.role,sb.gasUsedClaimId.role,[`gas`,`gasUsedClaimId`],`gas.gasUsedClaimId role`),Sb(t,n.asset,sb.gasUsedClaimId.assetCoinType,[`gas`,`gasUsedClaimId`],`gas.gasUsedClaimId asset`),Z(t,e.gas.gasUsedRaw,n.rawAmount,[`gas`,`gasUsedRaw`],`gas.gasUsedRaw`))}if(e.gas.unresolvedReason!==void 0){let n=u(e.gas.unresolvedClaimId,`gas_unresolved_status`,[`gas`,`unresolvedClaimId`],`gas.unresolvedClaimId`);n?.factKind===`gas_unresolved_status`&&(Z(t,n.status,`unresolved`,[`gas`,`unresolvedClaimId`],`gas.unresolvedClaimId status`),Z(t,e.gas.checkedAt,n.checkedAt,[`gas`,`checkedAt`],`gas.checkedAt`),Z(t,e.gas.unresolvedReason,n.reason,[`gas`,`unresolvedReason`],`gas.unresolvedReason`))}e.gas.gasObjects?.forEach((e,n)=>{let r=u(e.ownershipClaimId,`object_ownership`,[`gas`,`gasObjects`,n,`ownershipClaimId`],`gas.gasObjects[${n}].ownershipClaimId`);r?.factKind===`object_ownership`&&(Z(t,e.objectId,r.objectId,[`gas`,`gasObjects`,n,`objectId`],`gas.gasObjects[${n}].objectId`),Z(t,e.ownerAccount,r.ownerAccount,[`gas`,`gasObjects`,n,`ownerAccount`],`gas.gasObjects[${n}].ownerAccount`),Z(t,r.ownership,sb.gasObjectOwnershipClaimId.ownership,[`gas`,`gasObjects`,n,`ownershipClaimId`],`gas.gasObjects[${n}].ownershipClaimId ownership`))});let d=u(e.expiry.evidenceClaimId,`expiry_status`,[`expiry`,`evidenceClaimId`],`expiry.evidenceClaimId`);if(d?.factKind===`expiry_status`&&(Z(t,e.expiry.status,d.status,[`expiry`,`status`],`expiry.status`),Z(t,e.expiry.checkedAt,d.checkedAt,[`expiry`,`checkedAt`],`expiry.checkedAt`),e.expiry.status===`current`||e.expiry.status===`expired`?Z(t,e.expiry.expiresAt,d.expiresAt,[`expiry`,`expiresAt`],`expiry.expiresAt`):Z(t,e.expiry.reason,d.reason,[`expiry`,`reason`],`expiry.reason`)),e.slippageOrMinOut.quoteEvidenceClaimId!==void 0){let n=u(e.slippageOrMinOut.quoteEvidenceClaimId,`quote_min_out`,[`slippageOrMinOut`,`quoteEvidenceClaimId`],`slippageOrMinOut.quoteEvidenceClaimId`);n?.factKind===`quote_min_out`&&(Z(t,e.slippageOrMinOut.quoteEvidenceId,n.quoteEvidenceId,[`slippageOrMinOut`,`quoteEvidenceId`],`slippageOrMinOut.quoteEvidenceId`),Z(t,e.slippageOrMinOut.minOutRaw,n.minOutRaw,[`slippageOrMinOut`,`minOutRaw`],`slippageOrMinOut.minOutRaw`))}if(e.slippageOrMinOut.minOutRaw!==void 0&&(e.rawQuantities.some(t=>t.role===`minimum_output`&&t.rawAmount===e.slippageOrMinOut.minOutRaw)||t.addIssue({code:`custom`,path:[`slippageOrMinOut`,`minOutRaw`],message:`slippageOrMinOut.minOutRaw must match a minimum_output rawQuantities entry`})),e.slippageOrMinOut.policyEvidenceClaimId!==void 0){let n=u(e.slippageOrMinOut.policyEvidenceClaimId,`slippage_policy`,[`slippageOrMinOut`,`policyEvidenceClaimId`],`slippageOrMinOut.policyEvidenceClaimId`);n?.factKind===`slippage_policy`&&(Z(t,e.slippageOrMinOut.policySource,n.policySource,[`slippageOrMinOut`,`policySource`],`slippageOrMinOut.policySource`),Z(t,e.slippageOrMinOut.maxSlippageBps,n.maxSlippageBps,[`slippageOrMinOut`,`maxSlippageBps`],`slippageOrMinOut.maxSlippageBps`),n.policySource===`adapter_policy_from_quote_evidence`&&Z(t,e.slippageOrMinOut.minOutRaw,n.minOutRaw,[`slippageOrMinOut`,`minOutRaw`],`slippageOrMinOut.minOutRaw`))}e.objectOwnership.objects.forEach((n,r)=>{let i=u(n.evidenceClaimId,`object_ownership`,[`objectOwnership`,`objects`,r,`evidenceClaimId`],`objectOwnership.objects[${r}].evidenceClaimId`);i?.factKind===`object_ownership`&&(Z(t,n.objectId,i.objectId,[`objectOwnership`,`objects`,r,`objectId`],`objectOwnership.objects[${r}].objectId`),Z(t,e.objectOwnership.ownerAccount,i.ownerAccount,[`objectOwnership`,`ownerAccount`],`objectOwnership.ownerAccount`),Z(t,n.ownership,i.ownership,[`objectOwnership`,`objects`,r,`ownership`],`objectOwnership.objects[${r}].ownership`))});let f=u(e.simulation.evidenceClaimId,`simulation_result`,[`simulation`,`evidenceClaimId`],`simulation.evidenceClaimId`);f?.factKind===`simulation_result`&&(Z(t,e.simulation.provider,f.provider,[`simulation`,`provider`],`simulation.provider`),Z(t,e.simulation.checksEnabled,f.checksEnabled,[`simulation`,`checksEnabled`],`simulation.checksEnabled`),Z(t,e.simulation.simulatedAt,f.simulatedAt,[`simulation`,`simulatedAt`],`simulation.simulatedAt`),Z(t,e.simulation.status,f.status,[`simulation`,`status`],`simulation.status`),bb(t,e.simulation.requiredFields,f.requiredFields,[`simulation`,`requiredFields`],`simulation.requiredFields`),bb(t,e.simulation.missingFields,f.missingFields,[`simulation`,`missingFields`],`simulation.missingFields`),Z(t,e.simulation.failureReason,f.failureReason,[`simulation`,`failureReason`],`simulation.failureReason`))}).superRefine((e,t)=>{let n=e.reviewedTransactionDigest;Z(t,e.humanReadableReview.transactionDigest,n,[`humanReadableReview`,`transactionDigest`],`humanReadableReview.transactionDigest`),Z(t,e.simulation.transactionDigest,n,[`simulation`,`transactionDigest`],`simulation.transactionDigest`)}),Ib=H({contractVersion:q(jy),artifactKind:q(`ptb_visualization`),generatedAt:cb,source:H({adapterId:L().min(1).max(120),planId:L().min(1).max(120).optional(),sourceKind:K([`review_time_generated_transaction_kind`,`review_time_ir`,`renderer_model`]),authority:q(`visualization_only_not_wallet_authorization`),renderer:H({name:L().min(1).max(120),packageName:L().min(1).max(120).optional(),version:L().min(1).max(80).optional()}).strict().optional()}).strict(),mermaid:H({diagramType:q(`flowchart`),text:hb(2e4,`mermaid.text`),namedText:hb(2e4,`mermaid.namedText`)}).strict(),diagnostics:V(H({severity:K([`info`,`warning`,`error`]),code:L().min(1).max(120),message:hb(512,`diagnostics.message`),source:K([`adapter`,`renderer`,`schema`,`simulation`])}).strict()).default([]),unsupportedUse:V(K(Fy)).min(1),executableMaterial:H({included:q(!1),policy:q(`mcp_and_review_ui_outputs_must_not_include_executable_transaction_material`)}).strict()}).strict().superRefine((e,t)=>{vb(t,e.unsupportedUse,Fy,[`unsupportedUse`],`unsupportedUse`)}),Lb=G(L(),B()),Rb=K(Ey),zb=K(Dy);K([`ready_for_wallet_review`,`refresh_required`,`blocked`]);var Bb=K(Oy);K([`proposed`,`awaiting_wallet`,`wallet_connected`,`ready_for_wallet_review`,`refresh_required`,`blocked`,`expired`,`awaiting_signature`,`submitting`,`awaiting_chain_result`,`stopped`,`request_failed`,`outcome_unknown`,`completed`]);var Vb=H({id:L(),label:L(),status:K([`pass`,`warning`,`fail`]),message:L(),source:K([`registry`,`quote`,`wallet`,`simulation`,`adapter`,`network`,`proposal`])}),Hb=L().min(1),Ub=`human_readable_review`,Wb=`review_time_simulation`,Gb=H({stageCatalogId:L().min(1),adapterId:L(),protocol:L(),actionKind:L(),completedStages:V(Hb),missingStages:V(Hb)}).strict().superRefine((e,t)=>{let n=Kb(e.completedStages);n&&t.addIssue({code:`custom`,path:[`completedStages`],message:`completedStages contains duplicate stage '${n}'`});let r=Kb(e.missingStages);r&&t.addIssue({code:`custom`,path:[`missingStages`],message:`missingStages contains duplicate stage '${r}'`});for(let n of e.completedStages)e.missingStages.includes(n)&&t.addIssue({code:`custom`,path:[`missingStages`],message:`stage '${n}' cannot be both completed and missing`})});function Kb(e){let t=new Set;for(let n of e){if(t.has(n))return n;t.add(n)}}var qb=H({symbol:L(),amount:L(),coinType:L().optional(),approx:z().optional()}).strict(),Jb=qb.extend({amountKind:q(`display_intent`).default(`display_intent`)}),Yb=H({outgoing:V(Jb),expectedIncoming:V(Jb),minimumIncoming:V(Jb).optional(),fees:V(Jb).optional()}),Xb=H({outgoing:V(qb),expectedIncoming:V(qb),minimumIncoming:V(qb).optional(),fees:V(qb).optional()}),Zb=H({before:V(qb),after:V(qb),delta:V(qb)}),Qb=H({computationCostRaw:R_(`computationCostRaw`),storageCostRaw:R_(`storageCostRaw`),storageRebateRaw:R_(`storageRebateRaw`),nonRefundableStorageFeeRaw:R_(`nonRefundableStorageFeeRaw`)}).strict(),$b=H({address:y_,coinType:L().min(1).max(512).refine(e=>{try{return U_(e)===e}catch{return!1}},`Expected a normalized Sui struct tag coin type`),amount:H_(`balanceChanges[].amount`)}).strict(),ex=H({objectId:y_,objectType:L().min(1).max(512).optional(),inputState:L().min(1).max(80),outputState:L().min(1).max(80),idOperation:L().min(1).max(80)}).strict(),tx=H({provider:Ay,checksEnabled:z(),success:z(),gasCostSummary:Qb.optional(),balanceChanges:V($b).optional(),objectChanges:V(ex).optional(),error:L().optional()}),nx=tx,rx=tx.extend({checksEnabled:q(!0),success:q(!0),gasCostSummary:Qb,balanceChanges:V($b),objectChanges:V(ex),error:_c().optional()}).strict(),ix=H({role:K([`input`,`expected_output`,`minimum_output`,`fee`]),symbol:L(),coinType:L().min(1).max(512).refine(e=>{try{return U_(e),!0}catch{return!1}},`Expected a Sui struct tag coin type`),decimals:R().int().min(0).max(255),rawAmount:R_(`rawAmount`),rawAmountSource:q(`quote_policy_evidence`),displayAmount:L().optional(),displayAmountSource:q(`user_display_intent_not_signing_input`).optional()}).strict().superRefine((e,t)=>{e.displayAmount!==void 0&&e.displayAmountSource===void 0&&t.addIssue({code:`custom`,path:[`displayAmountSource`],message:`displayAmountSource is required when displayAmount is present`}),e.displayAmount===void 0&&e.displayAmountSource!==void 0&&t.addIssue({code:`custom`,path:[`displayAmount`],message:`displayAmount is required when displayAmountSource is present`})}),ax=H({role:K([`connected_account`,`output_recipient`]),address:y_}).strict(),ox=H({kind:q(`swap_output_asset`),symbol:L(),coinType:L().min(1).max(512).refine(e=>{try{return U_(e),!0}catch{return!1}},`Expected a Sui struct tag coin type`),protocol:L(),poolKey:L(),direction:K([`base_to_quote`,`quote_to_base`])}).strict(),sx=H({id:L(),label:L(),source:W([K([`registry`,`quote`,`wallet`,`simulation`,`adapter`,`network`,`proposal`]),K([`transaction_material`,`digest_commitment`])]),summary:L()}).strict(),cx=H({id:L(),label:L(),reason:L()}).strict(),lx=H({proposedAction:H({title:L(),summary:L(),actionKind:L(),adapterId:L(),protocol:L(),network:q(`sui:mainnet`)}).strict(),recipients:V(ax),evidenceUsed:V(sx),missingEvidence:V(cx),requiredUserChoices:V(cx),unsupportedClaims:V(cx),freshness:H({status:q(`current`),evaluatedAt:L(),expiresAt:L(),reason:L()}).strict(),blockingChecks:V(Vb)}).strict(),ux=H({assetFlow:H({outgoing:V(ix),expectedIncoming:V(ix),minimumIncoming:V(ix),fees:V(ix)}).strict(),targets:V(ox)}).strict(),dx=Sc(`kind`,[lx.extend({kind:q(`swap_human_readable_review`)}).merge(ux)]),fx=H({id:L(),actionKind:L(),adapterId:L(),protocol:L(),title:L(),summary:L(),assetFlowPreview:Yb,reviewModel:Ty.optional(),adapterData:Lb,createdAt:L(),expiresAt:L().optional(),registryVersion:L().optional(),preliminaryChecks:V(Vb).optional()}),px=H({planId:L(),reviewSessionId:L(),account:y_,checks:V(Vb),assetFlowActual:Xb.optional(),beforeAfterBalance:Zb.optional(),simulation:nx.optional(),humanReadableReview:dx.optional(),transactionReviewData:Fb.optional(),ptbVisualization:Ib.optional(),adapterLifecycle:Gb.optional(),updatedAt:L()}),mx=Sc(`status`,[px.extend({status:q(`ready_for_wallet_review`),evidenceValidity:_c().optional(),blockedReason:_c().optional(),refreshReason:_c().optional()}),px.extend({status:q(`refresh_required`),evidenceValidity:q(`invalidated`).optional(),refreshReason:zb,blockedReason:_c().optional()}),px.extend({status:q(`blocked`),evidenceValidity:q(`invalidated`).optional(),blockedReason:Rb,refreshReason:_c().optional()})]).superRefine((e,t)=>{if(e.evidenceValidity===`invalidated`)for(let n of ky)e[n]!==void 0&&t.addIssue({code:`custom`,path:[n],message:`Invalidated review evidence cannot carry current material-derived facts`});let n=e.adapterLifecycle;if(n!==void 0&&hx(e,t),e.humanReadableReview!==void 0&&n===void 0&&t.addIssue({code:`custom`,path:[`humanReadableReview`],message:`humanReadableReview requires adapterLifecycle evidence stage provenance`}),e.simulation!==void 0&&n===void 0&&t.addIssue({code:`custom`,path:[`simulation`],message:`simulation requires adapterLifecycle evidence stage provenance`}),e.ptbVisualization!==void 0){let e=n?.completedStages??[];e.includes(`transaction_material_build_or_verify`)&&e.includes(`digest_commitment`)||t.addIssue({code:`custom`,path:[`ptbVisualization`],message:`ptbVisualization requires completed transaction material and digest commitment lifecycle stages`})}let r=e.status===`ready_for_wallet_review`;e.transactionReviewData!==void 0&&!r&&t.addIssue({code:`custom`,path:[`transactionReviewData`],message:`transactionReviewData is only valid on ready_for_wallet_review`}),e.status===`ready_for_wallet_review`&&n!==void 0&&(e.transactionReviewData===void 0&&t.addIssue({code:`custom`,path:[`transactionReviewData`],message:`ready_for_wallet_review requires an emitted wallet review contract`}),(n===void 0||n.missingStages.length!==0)&&t.addIssue({code:`custom`,path:[`adapterLifecycle`],message:`ready_for_wallet_review requires a completed adapterLifecycle with no missing stages`}),e.humanReadableReview===void 0&&t.addIssue({code:`custom`,path:[`humanReadableReview`],message:`ready_for_wallet_review requires humanReadableReview public evidence`}),e.simulation===void 0&&t.addIssue({code:`custom`,path:[`simulation`],message:`ready_for_wallet_review requires successful simulation public evidence`})),e.status===`blocked`&&(e.blockedReason===`producer_stage_missing`&&n===void 0&&t.addIssue({code:`custom`,path:[`adapterLifecycle`],message:`producer_stage_missing requires adapterLifecycle with at least one missing stage`}),e.blockedReason===`producer_stage_missing`&&n!==void 0&&n.missingStages.length===0&&t.addIssue({code:`custom`,path:[`blockedReason`],message:`producer_stage_missing requires at least one adapterLifecycle.missingStages entry`}),e.blockedReason===`wallet_review_contract_emit_missing`&&e.transactionReviewData!==void 0&&t.addIssue({code:`custom`,path:[`transactionReviewData`],message:`wallet_review_contract_emit_missing requires the wallet review contract to be absent`}),e.blockedReason===`wallet_review_contract_emit_missing`&&n===void 0&&t.addIssue({code:`custom`,path:[`adapterLifecycle`],message:`wallet_review_contract_emit_missing requires adapterLifecycle`}),e.blockedReason===`wallet_review_contract_emit_missing`&&n!==void 0&&n.missingStages.length!==0&&t.addIssue({code:`custom`,path:[`blockedReason`],message:`wallet_review_contract_emit_missing requires a completed adapterLifecycle with no missing stages`}),e.blockedReason===`wallet_review_contract_emit_missing`&&e.evidenceValidity!==`invalidated`&&e.humanReadableReview===void 0&&t.addIssue({code:`custom`,path:[`humanReadableReview`],message:`wallet_review_contract_emit_missing requires humanReadableReview public evidence`}),e.blockedReason===`wallet_review_contract_emit_missing`&&e.evidenceValidity!==`invalidated`&&e.simulation===void 0&&t.addIssue({code:`custom`,path:[`simulation`],message:`wallet_review_contract_emit_missing requires simulation public evidence`}))});function hx(e,t){let n=e.adapterLifecycle;n&&(e.humanReadableReview!==void 0&&gx(t,n,Ub,[`humanReadableReview`]),e.simulation!==void 0&&(gx(t,n,Wb,[`simulation`]),gx(t,n,Ub,[`simulation`]),_x(t,e.simulation,[`simulation`])),n.missingStages.includes(Wb)&&e.simulation!==void 0&&t.addIssue({code:`custom`,path:[`simulation`],message:`simulation public evidence cannot be present while review_time_simulation is missing`}),n.missingStages.includes(Ub)&&e.humanReadableReview!==void 0&&t.addIssue({code:`custom`,path:[`humanReadableReview`],message:`humanReadableReview public evidence cannot be present while human_readable_review is missing`}))}function gx(e,t,n,r){t.completedStages.includes(n)||e.addIssue({code:`custom`,path:r,message:`${r.join(`.`)} requires completed adapterLifecycle stage '${n}'`}),t.missingStages.includes(n)&&e.addIssue({code:`custom`,path:r,message:`${r.join(`.`)} cannot be present while adapterLifecycle stage '${n}' is missing`})}function _x(e,t,n){rx.safeParse(t).success||e.addIssue({code:`custom`,path:n,message:`simulation public evidence requires a successful checks-enabled review-time simulation projection`})}var vx=H({topic:L().min(1),grants:M_,expiresAt:L().datetime(),walletName:L().optional()}).strict(),yx={topic:L().min(1),lifecycleRevision:R().int().positive(),grantRevisions:E_},bx=Sc(`status`,[H({...yx,status:q(`present`),session:vx}).strict(),H({...yx,status:K([`absent`,`unusable`])}).strict()]);H({chainId:q(w_),lifecycleRevision:R().int().positive(),grantRevision:R().int().nonnegative()});var xx=H({runId:tv,sequence:R().int().positive(),observedAt:L().datetime()}).strict();xx.extend({sessions:V(bx)}).strict();var Sx=L().uuid(),Cx={operationId:Sx,walletRunId:tv},wx=Sc(`action`,[H({action:q(`connect`),...Cx,chains:D_}).strict(),H({action:q(`disconnect`),...Cx,connectionId:L().min(1),impactId:L().min(1)}).strict()]);H({}).strict();var Tx=H({operationId:Sx,cardId:L().min(1),action:K([`connect`,`disconnect`]),status:K([`running`,`completed`,`failed`,`stopped`]),connectionId:L().min(1),createdAt:L().datetime(),updatedAt:L().datetime(),expiresAt:L().datetime(),settlementPending:z(),message:L().optional(),endReason:K([`user_stopped`,`expired`,`run_ended`]).optional()}).strict();Tx.pick({operationId:!0,action:!0,status:!0,settlementPending:!0});var Ex=`A wallet connection provides account context; it is not a transaction approval or proof of address ownership.`,Dx=`Review evidence is not a safety guarantee. Only an explicit card action and wallet approval may authorize this exact transaction.`,Ox=sv.extend({sessionPresence:K([`present`,`absent`,`unusable`,`unconfirmed`]),chainStates:V(cv).optional(),disconnectImpact:H({impactId:L(),requestCount:R().int().nonnegative(),chains:D_}).strict().optional()});K([`awaiting_approval`,`disconnect_pending`,`cleanup_pending`]);var kx=H({action:K([`prepare_review`,`request_signature`]),connectionId:L().min(1),walletRunId:tv,account:y_,reviewRevision:R().int().nonnegative()}).strict(),Ax=H({action:K([`cancel`,`stop_waiting`,`read_result`])}).strict(),jx=W([wx,H({action:q(`stop_connection`),operationId:L().uuid()}).strict(),kx,Ax]),Mx=W([wx.options[0],kx.extend({action:q(`prepare_review`)})]);function Nx(e,t){e.reviewTarget&&(e.review?.account&&e.review.account!==e.reviewTarget.account||e.request&&e.request.account!==e.reviewTarget.account)&&t.addIssue({code:`custom`,path:[`reviewTarget`],message:`The fixed review target must match its recorded account and request.`})}var Px=H({kind:K(dv),message:L().optional(),reason:L().optional()}).strict(),Fx={allowedActions:V(K(uv)),actionRemainingMs:R().int().nonnegative(),nextStateReadAfterMs:R().int().nonnegative().optional(),observe:z(),walletAvailability:iv,walletObservation:xx.optional(),progress:av,nextStep:Px},Ix=H({...Fx,kind:q(`connect`),mode:q(`connect`),allowedActions:V(K([`connect`,`cancel`,`stop_connection`])),boundary:q(Ex),requestedChains:D_,operation:Tx.optional(),automaticAction:wx.options[0].optional()}).strict(),Lx=H({...Fx,kind:q(`disconnect`),mode:q(`disconnect`),allowedActions:V(K([`disconnect`,`cancel`])),boundary:q(Ex),connection:Ox.optional(),operation:Tx.optional()}).strict(),Rx=H({reviewSessionId:L(),plan:fx,reviewRevision:R().int().nonnegative(),status:Bb,account:L().optional(),preparing:z(),accountRequestPending:q(!0).optional(),error:L().optional(),state:mx.optional()}).strict(),zx=H({connectionId:L(),account:y_}).strict(),Bx=L().regex(/^-?[0-9]+$/).optional(),Vx=Sc(`kind`,[Ix,Lx,H({...Fx,kind:q(`review`),mode:K([`review`,`review_manage`]),allowedActions:V(K([`prepare_review`,`request_signature`,`read_result`,`stop_waiting`,`cancel`])),boundary:q(Dx),reviewTarget:zx.optional(),review:Rx,walletName:L().optional(),acceptedWalletRunId:tv.optional(),automaticAction:kx.extend({action:q(`prepare_review`)}).optional(),request:ev.optional(),receipt:B().optional(),netGasMist:Bx,observationStopped:z().optional()}).strict().superRefine(Nx)]),Hx=H({message:L(),recordedAt:L().datetime()}).strict(),Ux={allowedActions:V(_c()),observe:q(!1),actionRemainingMs:q(0),result:Hx},Wx=H({...Ux,kind:K([`connect`,`disconnect`]),result:Hx.extend({pendingWork:K([`approval_response`,`session_removal`,`session_status`]).optional()}),walletName:L().optional(),networks:V(H({chainId:T_,status:K([`bound`,`not_approved`,`multiple_accounts`,`invalid_response`])}).strict())}).strict();H({...Ux,kind:q(`review`),mode:K([`review`,`review_manage`]),review:Rx.optional(),reviewTarget:zx.optional(),request:ev.optional(),receipt:B().optional(),netGasMist:Bx,observationStopped:z().optional(),boundary:q(Dx)}).strict().superRefine(Nx);var Gx=`sui-mcp.local-data`,Kx=16777216,Q=L().uuid(),qx=R().int().nonnegative().safe(),Jx=L().regex(/^[a-f0-9]{64}$/),Yx=Sc(`status`,[H({status:q(`no_file`)}).strict(),H({status:q(`receiving`)}).strict(),H({status:q(`checking`)}).strict(),H({status:q(`check_required`),message:L().min(1)}).strict(),H({status:q(`can_restore`)}).strict(),H({status:q(`cannot_restore`),reason:K([`invalid_backup`,`file_unavailable`,`wallet_request_unsettled`,`operation_busy`,`input_unavailable`,`check_failed`]),message:L().min(1)}).strict()]);H({fileId:Q,sha256:Jx,totalSize:qx,dataEpoch:qx,userDataRevision:qx,check:Yx}).strict();var Xx=Sc(`kind`,[H({kind:q(`set_endpoint`),endpoint:K([`grpc`,`graphql`]),value:L().min(1)}).strict(),H({kind:q(`restore_endpoint`),endpoint:K([`grpc`,`graphql`])}).strict(),H({kind:K([`import_local_data`,`reset_local_data`,`restart_wallet_service`])}).strict()]),Zx=Sc(`kind`,[H({kind:q(`clear_read_address`)}).strict(),...Xx.options,H({kind:q(`set_wallet_networks`),chains:D_}).strict(),H({kind:q(`download_backup`)}).strict()]);H({operationStatus:H({operationId:L().uuid()}).strict().optional(),backupDelivery:H({operationId:L().uuid(),fileId:L().uuid()}).strict().optional()}).strict().refine(e=>!(e.operationStatus&&e.backupDelivery),`Choose exactly one card purpose.`);var Qx=K([`acknowledged`,`not_completed`,`unconfirmed`,`unsupported`,`not_sent`]),$x=H({method:q(`ui/download-file`),code:q(-32601)}).strict(),eS=K([`acknowledged`,`cancelled`,`expired`,`server_restarted`,`data_replaced`,`source_unavailable`,`stored_locally`,`local_save_failed`]),tS=H({device:L().regex(/^\d+$/),inode:L().regex(/^\d+$/)}).strict(),nS=K([`not_published`,`target_conflict`,`source_unavailable`,`interrupted`]),rS=H({status:K([`needs_consent`,`saving`,`saved`,`failed`]),attemptId:Q,fileId:Q,sha256:Jx,totalSize:qx,destination:L(),ownerId:L().min(1),currentSaveAttemptId:Q.optional(),attempts:V(H({saveAttemptId:Q,cardId:L().min(1),previousSaveAttemptId:Q.optional(),admittedAt:L().datetime(),allowPossibleCopy:z()}).strict()),sourceIdentity:tS.optional(),savedAt:L().datetime().optional(),failure:nS.optional()}).strict().superRefine((e,t)=>{(e.status===`needs_consent`?e.attempts.length!==0||e.currentSaveAttemptId!==void 0:!e.currentSaveAttemptId||!e.attempts.some(t=>t.saveAttemptId===e.currentSaveAttemptId))&&t.addIssue({code:`custom`,message:`A local save must identify its admitted attempt.`}),(new Set(e.attempts.map(e=>e.saveAttemptId)).size!==e.attempts.length||e.status===`saved`!=(e.savedAt!==void 0)||e.status===`saved`&&!e.sourceIdentity||e.status===`failed`!=(e.failure!==void 0))&&t.addIssue({code:`custom`,message:`Local save evidence must match its state.`})});H({currentAttemptId:Q,attempts:V(H({attemptId:Q,cardId:L().min(1),admittedAt:L().datetime(),previousAttemptId:Q.optional(),hostReport:Qx.optional(),failure:$x.optional()}).strict()).min(1),readyAt:L().datetime().optional(),expiresAt:L().datetime().optional(),endReason:eS.optional(),localSave:rS.optional()}).strict().superRefine((e,t)=>{(new Set(e.attempts.map(e=>e.attemptId)).size!==e.attempts.length||!e.attempts.some(t=>t.attemptId===e.currentAttemptId)||e.readyAt===void 0!=(e.expiresAt===void 0))&&t.addIssue({code:`custom`,message:`Download attempts and lifetime must identify one stored snapshot.`}),(e.endReason===`stored_locally`&&e.localSave?.status!==`saved`||e.endReason===`local_save_failed`&&e.localSave?.status!==`failed`||e.attempts.some(e=>e.hostReport===`unsupported`!=(e.failure!==void 0))||e.localSave&&(e.localSave.attemptId!==e.currentAttemptId||!e.attempts.some(t=>t.attemptId===e.currentAttemptId&&t.hostReport===`unsupported`)||e.localSave.status===`saving`&&e.endReason!==void 0||e.localSave.status===`saved`!=(e.endReason===`stored_locally`)))&&t.addIssue({code:`custom`,message:`Local saving requires the current download's unsupported report.`})});var iS=K([`settings_retry_download`,`settings_report_download`,`settings_cancel_download`,`settings_store_backup`]),aS=Sc(`action`,[H({action:q(`settings_clear_read_address`),operationId:Q,connectionId:L().min(1),account:L().min(1)}).strict(),H({action:q(`settings_save_wallet_networks`),operationId:Q,chains:D_.transform(O_),expectedChains:D_.transform(O_)}).strict(),H({action:q(`settings_download_backup`),operationId:Q,attemptId:Q}).strict(),H({action:q(`settings_retry_download`),operationId:Q,fileId:Q,previousAttemptId:Q,attemptId:Q}).strict(),H({action:q(`settings_report_download`),operationId:Q,fileId:Q,attemptId:Q,status:Qx,failure:$x.optional()}).strict().refine(e=>e.status===`unsupported`==(e.failure!==void 0),`Only unsupported downloads require the exact method failure.`),H({action:q(`settings_store_backup`),operationId:Q,fileId:Q,attemptId:Q,saveAttemptId:Q,previousSaveAttemptId:Q.optional(),allowPossibleCopy:z()}).strict(),H({action:q(`settings_cancel_download`),operationId:Q,fileId:Q,attemptId:Q}).strict(),H({action:q(`settings_select`),draft:Xx}).strict(),H({action:q(`settings_prepare`),operationId:Q}).strict(),H({action:q(`settings_begin_upload`),operationId:Q,name:L().min(1),totalSize:qx.max(Kx),sha256:Jx}).strict(),H({action:q(`settings_upload_chunk`),operationId:Q,fileId:Q,offset:qx.max(Kx),chunkBase64:L()}).strict(),H({action:q(`settings_seal_upload`),operationId:Q,fileId:Q}).strict(),H({action:q(`settings_confirm`),operationId:Q,preparationId:Q}).strict(),H({action:q(`settings_back`),operationId:Q}).strict(),H({action:q(`settings_cancel`)}).strict()]),oS=H({outcome:K([`completed`,`failed`,`interrupted`,`superseded`]),recordedAt:L().datetime(),message:L().min(1),details:G(L(),B()).optional(),completionScope:q(`backup_delivery`).optional()}).strict(),sS=H({storedValue:L(),effectiveValue:L(),source:K([`environment`,`local_db`,`builtin_default`]),pendingStoredValue:L().optional(),appliesAfter:q(`mcp_server_restart`).optional()}).strict(),cS=H({endpoint:K([`grpc`,`graphql`]),key:K([`suiGrpcUrl`,`suiGraphqlUrl`]),value:L().min(1),status:K([`saved`,`reset`]),storedValue:L(),effectiveValue:L(),source:sS.shape.source}).strict().refine(e=>e.key===(e.endpoint===`grpc`?`suiGrpcUrl`:`suiGraphqlUrl`),`The endpoint kind and preference key must agree.`),lS=R().int().nonnegative().safe(),uS=H({accounts:lS,reviewSessions:lS,reviewStateSnapshots:lS,reviewStatusTransitions:lS,reviewExecutions:lS,reviewRequests:lS,outcomeUnknownRequests:lS,externalActivityScans:lS,externalActivityTransactions:lS,localSettings:lS}).strict(),dS=H({status:q(`valid`),format:q(Gx),network:q(`mainnet`),exportedAt:L().datetime(),currentCounts:uS,incomingCounts:uS,willReplace:q(!0),restartRequiredAfterImport:z()}).strict(),fS=H({kind:q(`settings`),operationId:Q,phase:K([`draft`,`uploading`,`sealed`,`prepared`,`executing`,`stopping`,`starting`,`terminal`]),draft:Zx.optional(),preparationId:Q.optional(),preparation:G(L(),B()).optional(),file:H({fileId:Q,displayName:L(),totalSize:qx,receivedSize:qx,sha256:Jx,sealed:z(),cleanup:K([`pending`,`complete`,`failed`])}).strict().optional(),download:H({availability:K([`preparing`,`available`,`ended`]),currentAttemptId:Q,hostReport:Qx.optional(),previousUnconfirmed:z(),endReason:eS.optional(),expiresAt:L().datetime().optional(),remainingMs:qx.optional(),localSave:H({status:K([`needs_consent`,`saving`,`saved`,`failed`]),currentSaveAttemptId:Q.optional(),failure:nS.optional(),savedAt:L().datetime().optional()}).strict().optional(),allowedFileActions:V(iS)}).strict().optional(),restoreCheck:Yx.optional(),backupLocation:H({directory:L().min(1),filename:L().min(1)}).strict().optional(),result:oS.optional(),temporaryFileCleanup:K([`pending`,`complete`,`failed`]).optional(),priorRunId:Q.optional(),nextRunId:Q.optional(),supersedesOperationId:Q.optional(),supersededByOperationId:Q.optional(),allowedActions:V(K(aS.options.map(e=>e.shape.action.value))),observe:z(),facts:H({server:H({name:L(),version:L(),network:q(`mainnet`)}).strict(),localSettings:H({suiGrpcUrl:sS,suiGraphqlUrl:sS,walletConnectionChains:D_}).strict(),readAddress:L().optional(),readConnectionId:L().optional(),assetReadAccount:lv,walletAvailability:iv,connectionReconciliationRequired:q(!0).optional(),observedAt:L().datetime().optional(),counts:uS}).strict().optional()}).strict().superRefine((e,t)=>{if(e.download&&(e.draft?.kind!==`download_backup`||!e.file||e.download.availability===`available`&&(!e.file.sealed||e.download.endReason||!e.download.expiresAt)||e.download.availability===`ended`&&!e.download.endReason)&&t.addIssue({code:`custom`,message:`Download delivery must describe its own snapshot and lifetime.`}),e.draft?.kind===`download_backup`&&e.preparation!==void 0&&t.addIssue({code:`custom`,message:`Private download preparation is not public preparation data.`}),e.restoreCheck&&(e.draft?.kind!==`import_local_data`||e.result)&&t.addIssue({code:`custom`,message:`Restore checks belong to an uncompleted import preparation.`}),e.restoreCheck?.status===`can_restore`&&(e.phase!==`prepared`||!e.file?.sealed||!e.allowedActions.includes(`settings_confirm`))&&t.addIssue({code:`custom`,message:`Restore availability requires a sealed file and current confirmation.`}),e.draft?.kind===`import_local_data`&&e.restoreCheck?.status!==`can_restore`&&e.allowedActions.includes(`settings_confirm`)&&t.addIssue({code:`custom`,message:`An unchecked or blocked import cannot offer confirmation.`}),e.restoreCheck?.status===`receiving`&&(!e.file||e.file.sealed||![`draft`,`uploading`].includes(e.phase))&&t.addIssue({code:`custom`,message:`Receiving requires the selected unsealed upload.`}),e.restoreCheck?.status===`check_required`&&(!e.file?.sealed||e.phase!==`sealed`)&&t.addIssue({code:`custom`,message:`A new check requires the same complete sealed upload.`}),e.restoreCheck?.status===`cannot_restore`&&e.restoreCheck.reason===`invalid_backup`&&(e.phase===`prepared`||e.allowedActions.includes(`settings_prepare`))&&t.addIssue({code:`custom`,message:`A rejected backup requires an explicit new selection.`}),e.backupLocation&&(e.result?.outcome!==`completed`||e.draft?.kind!==`download_backup`||e.download?.localSave?.status!==`saved`||e.download.endReason!==`stored_locally`)&&t.addIssue({code:`custom`,message:`A backup location requires its recorded successful export.`}),e.download?.localSave?.status===`saved`&&!e.backupLocation&&t.addIssue({code:`custom`,message:`A saved backup must identify its verified location.`}),e.temporaryFileCleanup&&!e.result&&t.addIssue({code:`custom`,message:`Cleanup of an applied or ended operation requires its recorded result.`}),(e.phase===`terminal`!=(e.result!==void 0)||e.phase===`terminal`&&(e.observe||e.allowedActions.length||e.download?.allowedFileActions.length))&&t.addIssue({code:`custom`,message:`A terminal Settings result cannot grant input or observation.`}),e.phase===`prepared`&&(!e.preparationId||!e.draft||!e.preparation)&&t.addIssue({code:`custom`,message:`Settings confirmation requires a prepared identity and facts.`}),e.phase===`prepared`&&e.draft?.kind===`import_local_data`&&!dS.safeParse(e.preparation?.preview).success&&t.addIssue({code:`custom`,path:[`preparation`,`preview`],message:`Import confirmation requires the validated current and incoming read context and record counts.`}),e.phase===`prepared`&&(e.draft?.kind===`set_endpoint`||e.draft?.kind===`restore_endpoint`)){let n=cS.safeParse(e.preparation?.endpoint);(!n.success||n.data.endpoint!==e.draft.endpoint||n.data.status!==(e.draft.kind===`set_endpoint`?`saved`:`reset`)||e.draft.kind===`set_endpoint`&&n.data.value!==e.draft.value)&&t.addIssue({code:`custom`,path:[`preparation`,`endpoint`],message:`Endpoint confirmation must name its exact prepared target.`})}e.file&&e.file.receivedSize>e.file.totalSize&&t.addIssue({code:`custom`,message:`Received content exceeds the selected file.`})}),pS=65536;function mS(e){return new TextEncoder().encode(JSON.stringify(e)).length}function hS(e){let t=pS-mS(e);return t>0?3*Math.floor(t/4):0}function gS(e){if(!e||typeof e!=`object`)return;let t=structuredClone(e);if(t.method===`tools/call`&&t.params?.name===`ui_act_card`&&t.params.arguments?.input?.action===`settings_upload_chunk`)return t.id=2**53-1,t.params.arguments.revision=2**53-1,t.params.arguments.input.offset=Kx,t.params.arguments.input.chunkBase64=``,hS(t)}var _S={uiOpenAccount:`ui_open_account`,uiOpenReceipt:`ui_open_receipt`,uiOpenChart:`ui_open_chart`,uiReadCard:`ui_read_card`,uiSubmitCard:`ui_submit_card`,uiActCard:`ui_act_card`,uiReadSettingsFile:`ui_read_settings_file`,sessionOpenReviewManagement:`session_open_review_management`,readGetServerStatus:`read_get_server_status`,readListSupportedProtocols:`read_list_supported_protocols`,readListDeepbookPools:`read_list_deepbook_pools`,readListDeepbookTokens:`read_list_deepbook_tokens`,readInspectDeepbookOrderbook:`read_inspect_deepbook_orderbook`,readGetDeepbookMidPrice:`read_get_deepbook_mid_price`,readGetDeepbookUsdcPriceHistory:`read_get_deepbook_usdc_price_history`,readGetDeepbookUsdcPriceAtTime:`read_get_deepbook_usdc_price_at_time`,readQuoteDeepbookAction:`read_quote_deepbook_action`,readQuoteDeepbookDisplayAmount:`read_quote_deepbook_display_amount`,readSummarizeDeepbookAccountInventory:`read_summarize_deepbook_account_inventory`,readSummarizeWalletAssets:`read_summarize_wallet_assets`,readClassifyWalletAssets:`read_classify_wallet_assets`,readListSettlementAssetGroups:`read_list_settlement_asset_groups`,readSummarizeSettlementAssetGroupParity:`read_summarize_settlement_asset_group_parity`,readPreviewIntentEvidence:`read_preview_intent_evidence`,readListReviewActivity:`read_list_review_activity`,readSummarizeReviewFunnel:`read_summarize_review_funnel`,readGetReviewSessionDetail:`read_get_review_session_detail`,readInspectSuiTransaction:`read_inspect_sui_transaction`,readScanSuiAccountActivity:`read_scan_sui_account_activity`,readSummarizeSuiActivityScan:`read_summarize_sui_activity_scan`,readScanSuiFunctionActivity:`read_scan_sui_function_activity`,readSummarizeSuiFunctionActivityScan:`read_summarize_sui_function_activity_scan`,readSummarizeSuiAccountActivity:`read_summarize_sui_account_activity`,readGetAccountAssetTimeline:`read_get_account_asset_timeline`,settingsCreateLocalSettingsSession:`settings_create_local_settings_session`,settingsGetLocalSettings:`settings_get_local_settings`,actionStartReview:`action_start_review`,actionCreateProposalReview:`action_create_proposal_review`,sessionOpenWalletDisconnectionCard:`session_open_wallet_disconnection_card`,sessionOpenWalletConnectionCard:`session_open_wallet_connection_card`,sessionGetWalletConnectionCard:`session_get_wallet_connection_card`,sessionWaitWalletConnectionCard:`session_wait_wallet_connection_card`,sessionGetInteractionStatus:`session_get_interaction_status`,sessionGetReviewStatus:`session_get_review_status`,sessionGetExecutionResult:`session_get_execution_result`,sessionWaitExecutionResult:`session_wait_execution_result`,accountGetActiveAccount:`account_get_active_account`},vS=H({connectionId:L().min(1),pairingUri:L().startsWith(`wc:`),expiresAt:L().datetime()}).strict(),yS=K([`account`,`receipt`,`chart`,`connect`,`disconnect`,`review`,`settings`]),bS=H({cardId:L().min(1),kind:yS,state:K([`ready`,`running`,`closed`]),revision:R().int().nonnegative(),createdAt:L().datetime(),expiresAt:L().datetime(),input:G(L(),B()),data:B().optional(),reason:K([`completed`,`expired`,`failed`,`server_restarted`,`cancelled`]).optional(),error:L().optional()}).strict().extend({pollAfterMs:R().int().positive(),inputRemainingMs:R().int().nonnegative()}),xS=H({transactionDigest:L().min(1),pureInputs:V(H({index:R().int().nonnegative(),bytes:L().regex(/^0x(?:[0-9a-f]{2})*$/i)}).strict()).refine(e=>new Set(e.map(e=>e.index)).size===e.length,`Duplicate input index.`),ptbGraph:H({mermaid:H({text:L(),namedText:L()}).strict()}).strict().optional()}).strict(),SS=`sui-mcp/card`,CS=`sui-mcp/receipt-display`,wS=`sui-mcp/wallet-display`,TS=`sui-mcp/settings-file`,ES=`suimcp://cards/`,DS=Sc(`kind`,[H({kind:q(`account`),status:q(`input_required`),field:q(`account`),message:L().min(1)}).strict(),H({kind:q(`receipt`),status:q(`input_required`),field:q(`digest`),message:L().min(1)}).strict()]),OS=H({cardId:L().min(1),permission:L().min(1)}).strict();OS.extend({revision:R().int().nonnegative(),input:G(L(),B())}).strict();var kS=xS.extend({cardId:L().min(1),revision:R().int().nonnegative(),attemptId:L().min(1).optional()}),AS=vS.extend({cardId:L().min(1),revision:R().int().nonnegative()}),jS=H({attemptId:L().uuid(),cardId:L().min(1),operationId:L().uuid(),fileId:L().uuid(),offset:R().int().nonnegative().safe(),totalSize:R().int().nonnegative().safe(),sha256:L().regex(/^[a-f0-9]{64}$/),chunkBase64:L()}).strict(),MS={account:_S.uiOpenAccount,receipt:_S.uiOpenReceipt,chart:_S.uiOpenChart,read:_S.uiReadCard,submit:_S.uiSubmitCard,act:_S.uiActCard,readSettingsFile:_S.uiReadSettingsFile};function NS(e){let t=e.commandPending;if(t)return t.phase===`confirming`?`Checking the current selection…`:t.action===`request_signature`?`Waiting for a response… Ask in chat to check the status of this same transaction request. Do not request approval again while its outcome is unknown.`:`Waiting for a response… You can ask in chat to check this same request.`}function $(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function PS(e){return e.kind!==`import_local_data`}function FS(e,t,n){if(e.kind!==`settings`||t.kind!==`settings`||e.cardId!==t.cardId||t.state!==`ready`)return;let r=fS.safeParse(e.data),i=fS.safeParse(t.data);if(!r.success||!i.success)return;let a=r.data,o=i.data,s=o.draft;if(n.action===`settings_select`&&a.operationId===o.operationId){let r=Zx.safeParse(n.draft);if(r.success&&PS(r.data)&&(t.revision===e.revision||LS(r.data,s)))return{kind:`selection_response`,cardId:t.cardId,operationId:o.operationId,draft:r.data}}if(!s||!a.draft||a.operationId!==o.operationId||n.operationId!==o.operationId||JSON.stringify(a.draft)!==JSON.stringify(s))return;if(PS(s))return n.action===`settings_prepare`?{kind:`preparation_response`,cardId:t.cardId,operationId:o.operationId,draft:s}:void 0;let c=o.file?.fileId;if(!(!c||!a.file?.fileId||a.file.fileId!==c||n.action!==`settings_prepare`&&n.action!==`settings_seal_upload`||n.action===`settings_seal_upload`&&n.fileId!==c))return{kind:`backup_check_response`,cardId:t.cardId,operationId:o.operationId,fileId:c,action:n.action}}function IS(e){return Object.keys(e).filter(t=>e[t]!==void 0)}function LS(e,t){if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,n)=>LS(e,t[n]));let n=$(e),r=$(t);if(!n||!r)return!1;let i=IS(n);return i.length===IS(r).length&&i.every(e=>Object.hasOwn(r,e)&&LS(n[e],r[e]))}function RS(e,t=!0){let n=$(e);if(!n)throw Error(`The app did not provide a usable card response.`);let r=()=>Error(`The app provided inconsistent card response information.`),i,a=e=>{let t=$(e);if(!t||typeof t.ok!=`boolean`||i&&!LS(i,t))throw r();i=t};n.structuredContent!==void 0&&a(n.structuredContent);let o,s;if(Array.isArray(n.content))for(let e of n.content){let n=$(e);if(n?.type!==`text`||typeof n.text!=`string`)continue;let i;try{i=$(JSON.parse(n.text))}catch{continue}if(i){if(i.ok!==void 0)a(i);else if(Array.isArray(i.content)){if(!t||o)throw r();let n=rd.safeParse(i);if(!n.success)throw r();o=RS(n.data,!1),s=e,o.structuredContent!==void 0&&a(o.structuredContent)}}}let c=Object.create(null),l=!1;for(let e of[n._meta,o?._meta]){if(e===void 0)continue;let t=$(e);if(!t)throw r();for(let e of IS(t)){let n=t[e];if(Object.hasOwn(c,e)&&!LS(c[e],n))throw r();c[e]=n}l=!0}if(n.isError!==void 0&&typeof n.isError!=`boolean`||o?.isError!==void 0&&n.isError!==void 0&&o.isError!==n.isError||(n.isError===!0||o?.isError===!0)&&i?.ok===!0)throw r();return{...o,...n,...o?{content:[...Array.isArray(n.content)?n.content.filter(e=>e!==s):[],...Array.isArray(o.content)?o.content:[]]}:{},...i?{structuredContent:i}:{},...l?{_meta:c}:{}}}function zS(e,t){let n=$($(e?.data)?.request);return!!e&&(e.kind===`receipt`||e.kind===`review`)&&t.cardId===e.cardId&&t.revision===e.revision&&t.transactionDigest===(e.kind===`receipt`?e.input.digest:n?.transactionDigest)&&(e.kind!==`review`||t.attemptId===n?.attemptId)}function BS(e){let t;for(let n of Array.isArray(e.content)?e.content:[]){let e=$(n),r;if(e?.type===`resource_link`&&typeof e.uri==`string`&&e.uri.startsWith(`suimcp://cards/`)&&(r=e.uri),e?.type===`text`&&typeof e.text==`string`){let t=/^\[Resource link: card_([A-Za-z0-9_-]+)\] (suimcp:\/\/cards\/([A-Za-z0-9_-]+)) \(Saved data for this exact card\.\)$/.exec(e.text);if(!t&&e.text.startsWith(`[Resource link:`)&&e.text.includes(`suimcp://cards/`))throw Error(`The saved card links could not be matched to one card.`);if(t){if(t[1]!==t[3])throw Error(`The saved card links could not be matched to one card.`);r=t[2]}}if(r===void 0)continue;let i=r.slice(ES.length);if(!i||encodeURIComponent(i)!==i||t!==void 0&&i!==t||e?.type===`resource_link`&&typeof e.name==`string`&&e.name.startsWith(`card_`)&&e.name!==`card_${i}`)throw Error(`The saved card links could not be matched to one card.`);t=i}return t}function VS(e){let t=$(e.structuredContent),n=t?.ok===!0?DS.safeParse(t.data):void 0,r=$($(t?.error)?.details),i=n?.success?void 0:t?.ok===!0?$(t.data)?.card??t.data:r?.snapshot,a=i===void 0?void 0:bS.parse(i);a?.kind===`settings`&&fS.parse(a.data);let o=$(e._meta)?.[CS],s=o===void 0?void 0:kS.parse(o);if(s&&!zS(a,s))throw Error(`Transaction details do not match this saved result.`);let c=$(e._meta)?.[wS],l=c===void 0?void 0:AS.parse(c);if(l&&(!a||a.kind!==`connect`||l.cardId!==a.cardId||l.revision!==a.revision||l.connectionId!==$($(a.data)?.operation)?.connectionId))throw Error(`The connection QR code does not match this card.`);return{snapshot:a,display:s,wallet:l,inputRequired:n?.success?n.data:void 0,error:typeof r?.message==`string`?r.message:typeof r?.reason==`string`?r.reason:void 0}}function HS(e,t){let n=document.getElementById(`app`);if(!n)throw Error(`Card root is unavailable.`);let r=document.createElement(`h1`);r.textContent=t.title;let i=document.createElement(`p`);i.className=`ui-note`,i.setAttribute(`role`,`status`);let a=document.createElement(`p`);a.className=`ui-error`,a.setAttribute(`role`,`alert`);let o=document.createElement(`p`);o.className=`ui-note card-guidance`;let s=document.createElement(`section`),c=document.createElement(`div`);c.className=`card-actions`;let l=document.createElement(`div`);l.className=`card-progress-hint`,l.hidden=!0,n.replaceChildren(r,i,a,s,o,l,c);let u=new ig({name:`sui-mcp-card`,version:`0.8.1`},{},{autoResize:!0,strict:!0}),d=new AbortController,f=e===`connect`||e===`disconnect`||e===`review`,p=e===`settings`,m=f||p,h=!1,g,_,v,y,b,ee,x,te=!1,S=!1,ne,re,C={status:`unconfirmed`},ie,w,ae,T,E,oe=`continue`,se,ce,le=0,ue=0,de,fe,pe,D,O,k,me,he,ge=!1;function _e(){if(!T||!y)return;let{input:t,basis:n}=T,r=$(y.data),i=$(n.data),a=$(r?.request),o=$(r?.review),s=$(i?.request),c=!!a&&a.attemptId===s?.attemptId;if(!f)return y.state===`running`||y.reason===`completed`?T.delivery===`rejected`?`past`:`observed`:y.state===`closed`?`past`:`active`;if((e===`connect`||e===`disconnect`)&&typeof t.operationId==`string`){let e=$(r?.operation)?.operationId===t.operationId?$(r?.operation):void 0;if(t.action===`stop_connection`){if(e?.endReason===`user_stopped`)return`observed`;if(e&&e.status!==`running`)return`past`}else if(e)return`observed`}if(t.walletRunId&&t.walletRunId!==$(r?.walletAvailability)?.walletRunId&&t.walletRunId!==r?.acceptedWalletRunId)return`past`;switch(t.action){case`connect`:break;case`prepare_review`:if(typeof o?.reviewRevision==`number`&&typeof t.reviewRevision==`number`&&o.reviewRevision>t.reviewRevision)return o.account===t.account?`observed`:`past`;break;case`request_signature`:if(a?.account===t.account&&a?.reviewRevision===t.reviewRevision)return`observed`;if(typeof o?.reviewRevision==`number`&&typeof t.reviewRevision==`number`&&o.reviewRevision>t.reviewRevision||!a&&o&&o.reviewRevision===t.reviewRevision&&o.account===t.account&&o.status===`refresh_required`&&$(o.state)?.refreshReason===`review_evidence_stale`&&Array.isArray(r?.allowedActions)&&r.allowedActions.includes(`prepare_review`))return`past`;break;case`cancel`:if(y.reason===`cancelled`)return`observed`;break;case`disconnect`:case`stop_connection`:break;case`stop_waiting`:if(c&&(a?.requestStatus===`stopped`||r?.observationStopped===!0))return`observed`;if(c&&[`completed`,`request_failed`,`outcome_unknown`].includes(String(a?.requestStatus)))return`past`;break;case`read_result`:if(c&&(r?.observe===!0||a?.requestStatus===`completed`))return`observed`;if(c&&[`stopped`,`request_failed`].includes(String(a?.requestStatus)))return`past`}return ve()||typeof r?.actionRemainingMs==`number`&&r.actionRemainingMs<=0||[`connect`,`disconnect`,`cancel`,`prepare_review`,`request_signature`].includes(String(t.action))&&(y.state!==`ready`||o?.status===`expired`)?`past`:`active`}function ve(){let e=jx.safeParse(T?.input),t=Vx.safeParse(y?.data);if(!e.success||!t.success)return!1;let n=e.data,r=t.data,i=`operationId`in n&&!!y&&y.state===`ready`&&y.input.operationId===n.operationId&&r.kind!==`review`&&!r.operation;if(n.action===`connect`)return r.kind===`connect`&&i&&JSON.stringify([...n.chains].sort())!==JSON.stringify([...r.requestedChains].sort());if(n.action===`prepare_review`||n.action===`request_signature`)return r.kind!==`review`||r.reviewTarget?.connectionId!==n.connectionId||r.reviewTarget?.account!==n.account;if(n.action!==`disconnect`||r.kind!==`disconnect`)return!1;let a=r.connection?.connectionId===n.connectionId?r.connection:void 0;return a?i&&a.disconnectImpact?.impactId!==n.impactId||r.nextStep.reason===`no_session_to_disconnect`||r.nextStep.reason===`connection_target_changed`:i}function ye(){if(!T)return;let e=_e();e&&T.disposition!==`observed`&&(e!==`active`||T.disposition===`active`)&&(T.disposition=e),T.disposition===`observed`&&(T.retryRequired=!1)}function be(){if(y?.reason===`cancelled`)return;let e=Mx.safeParse($(y?.data)?.automaticAction);return T?.retryRequired&&e.success&&T.input.action===e.data.action?e.data:void 0}function xe(e){let t={connect:`connection request`,prepare_review:`review update`,request_signature:`wallet approval request`,read_result:`transaction status check`,cancel:`cancellation request`,stop_connection:`request to stop connecting`,stop_waiting:$($(e.basis.data)?.request)?.requestStatus===`awaiting_signature`?`request to stop wallet approval`:`request to stop checking the result`,disconnect:`wallet disconnect request`};return f?t[String(e.input.action)]??`request`:`data request`}function Se(e){if(e!==`past`||!T)return;let t=xe(T),n=T.input.action===`read_result`&&$($(y?.data)?.request)?.requestStatus===`outcome_unknown`?` To check this transaction again, ask to open its result in chat.`:``;return`Message from an earlier ${t}: “${T.message}”${n}`}let Ce,we;function Te(){let t=$(y?.data),n=p?$(t?.download):void 0,r=y?.state===`closed`,i=Array.isArray(n?.allowedFileActions)?n.allowedFileActions:[],a=r?[]:[...Array.isArray(t?.allowedActions)?t.allowedActions:[],...i.filter(e=>e===`settings_report_download`||Ce===void 0||Date.now()<Ce)],o=e===`review`&&t?.mode===`review`&&!t.request&&!!g&&y?.state===`ready`,s=o&&de!==void 0&&Date.now()>=de,c=document.visibilityState!==`hidden`,l=d.signal.aborted||C.status===`rejected`,u=C.status===`confirmed`,v=T?.disposition,b=v===`active`,ee=T?.retryRequired===!0,x=T?.input.action===`request_signature`&&v===`active`,S=oe===`paused`,ne=k?.pending?.()===!0,le=k?.displayRecovery?.(),fe=u&&!l&&!w&&!ne&&!s&&!!g,pe=fe&&!E&&!h&&(!m||!(se&&(b||ee||S))),D=Mx.safeParse(t?.automaticAction),O=p?$(n?.localSave):void 0,me=!!y&&!r&&(m?t?.observe===!0||O?.status===`saving`:y.state===`running`),he=!!_&&te&&!l&&!se&&c&&(ce===`explicit`||C.status!==`read_failed`&&(ce===`background`||C.status===`needed`&&C.automatic)),_e=c&&fe&&!ie&&!se&&!ce&&!E&&!ee&&!x&&!S&&f&&D.success&&a.includes(D.data.action)?D.data:void 0,ve=$(t?.restoreCheck),ye=p&&fe&&y?.state===`ready`&&!y.input.backupDelivery&&!E&&!h&&!t?.result&&t?.observe!==!0&&(ve?.status===`cannot_restore`&&[`operation_busy`,`wallet_request_unsettled`].includes(String(ve.reason))||!a.includes(`settings_select`)||!a.includes(`settings_download_backup`)||t?.phase===`prepared`&&!a.includes(`settings_confirm`)||t?.phase===`draft`&&$(t.draft)?.kind!==void 0&&$(t.draft)?.kind!==`import_local_data`&&!a.includes(`settings_prepare`)),we;!l&&_&&(C.status===`read_failed`||ie||C.status===`unconfirmed`?we=`read`:C.status===`needed`?C.automatic||(we=`read`):w||le||!r&&p&&[`pending`,`failed`].includes(String(t?.temporaryFileCleanup))||!r&&(O?.status===`saving`||O?.status===`needs_consent`&&!a.includes(`settings_store_backup`)||O?.status===`failed`&&O.failure===`not_published`&&!n?.endReason&&!a.includes(`settings_store_backup`))||ye?we=`read`:g?!r&&$(t?.progress)?.status===`unavailable`||!r&&$(t?.walletAvailability)?.status===`initializing`&&$(t?.walletAvailability)?.stage===`state_sync`?we=`read`:!r&&!S&&be()?we=`retry`:b&&(!m&&pe&&y?.state===`ready`&&ge&&k?.selectionRecovery?we=`selection`:!me&&!(S&&a.length>0)&&!(T?.input.action===`prepare_review`&&a.includes(`prepare_review`)&&t?.automaticAction===void 0)&&f&&(we=`read`)):(y?.state!==`closed`||w)&&(we=`read`));let Te=f?t?.actionRemainingMs:y?.inputRemainingMs;we===`retry`&&s&&(we=`read`);let Ee=r?void 0:f?t?.nextStateReadAfterMs:p&&Ce!==void 0?Math.max(0,Ce-ue):void 0,De=[!r&&(f?a.length>0:y?.state===`ready`)?Te:void 0,Ee].filter(e=>typeof e==`number`&&Number.isFinite(e)&&e>0),Oe=!l&&!!g&&c&&!re&&!ie&&C.status!==`read_failed`,ke=$(t?.review),Ae=o&&!l&&!ie&&!w&&!b&&!ee&&!S&&C.status!==`read_failed`&&(ne||E?.input.action===`prepare_review`||ke?.preparing===!0||D.success&&D.data.action===`prepare_review`||C.status===`needed`&&ke?.status===`ready_for_wallet_review`);return{current:u,inputEnabled:pe,permitted:a,disposition:v,read:he,auto:_e,recover:we,paused:S,partialDisplayFailure:le,settingsInputBlocked:ye,reviewUpdatePending:Ae,reviewCommandDeliveryFailed:b&&T?.input.action===`prepare_review`,reviewHint:s?void 0:Ae?ne||ke?.preparing||E?.input.action===`prepare_review`?`Updating review…`:`Checking status…`:o&&$(ke?.state)?.refreshReason===`review_evidence_stale`?`Review details are out of date.`:void 0,errors:[C.status===`rejected`?C.message:C.status===`read_failed`?`This card's status could not be checked. Reported message: “${C.message}”`:void 0,ie&&C.status!==`rejected`?`This card could not be opened. Reported message: “${ie}”`:void 0,b&&T?`Message for this ${xe(T)}: “${T.message}”`:void 0,w,le?.message],note:[ae,Se(v)].filter(Boolean).join(` `),expiryAt:Oe&&u&&De.length?ue+Math.min(...De):void 0,poll:Oe&&(me||C.status===`needed`&&!C.automatic),lifetimeAt:!l&&c&&o?de:void 0}}function Ee(e){return e.recover===`retry`?T?.input.action===`connect`?`Retry connection`:`Retry review`:e.recover===`selection`?k?.selectionRecovery?.label:e.recover===`read`?`Check status`:void 0}function De(e){if(d.signal.aborted)return``;let n=e.errors.some(Boolean)||e.recover!==void 0||!!y&&!g&&y.state!==`closed`||y?.state===`closed`&&y.reason!==`completed`,r=e.errors.some(Boolean)||C.status!==`confirmed`||e.recover===`retry`||e.settingsInputBlocked;if(n&&r&&C.status!==`rejected`){if(se||e.read)return`Checking status…`;let t=Ee(e);if(e.recover===`selection`&&t)return`Use ${t} to try the current selection again.`;if(t)return t===`Check status`?w||e.partialDisplayFailure?`Use Check status to read this card and try displaying it again.`:`Use Check status to read this card again.`:t===`Retry connection`?`Use Retry connection to try connecting your wallet again.`:`Use Retry review to try again with the displayed wallet and account.`}return t.guidance?.(y,{confirmed:e.current,readOnly:!g,recoveryNeeded:n,visibleConfirmation:k?.visibleConfirmation?.(),commandPending:m&&E&&e.current&&!e.errors.some(Boolean)&&(E.phase===`confirming`||y?.state===`ready`&&!$(y.data)?.request&&!$($(y.data)?.review)?.preparing)?{phase:E.phase,action:String(E.input.action)}:void 0,approvalUnresolved:T?.input.action===`request_signature`&&e.disposition===`active`||E?.input.action===`request_signature`,automaticPaused:e.paused})??``}function Oe(e=Te()){return e.inputEnabled&&y?.state===`ready`&&ge}function ke(e,t=Te()){return y?.state!==`closed`&&m&&t.inputEnabled&&(e?t.permitted.includes(e.action):t.permitted.length>0)}function Ae(e){let t=Te();return p&&h&&t.current&&!!g&&!E&&!se&&!w&&!d.signal.aborted&&[`settings_begin_upload`,`settings_upload_chunk`,`settings_seal_upload`,`settings_retry_download`,`settings_report_download`,`settings_cancel_download`,`settings_store_backup`].includes(String(e.action))&&(t.permitted.includes(e.action)||e.action===`settings_report_download`)}function je(e){let u=$(y?.data),f=s.querySelector(`.review-action-feedback`),_=s.querySelector(`.review-primary-action`);if(f){let e=s.querySelector(`.review-lifetime`);e?(e.append(l),f.prepend(a)):f.prepend(l,a),f.append(o)}else n.insertBefore(a,s),n.insertBefore(l,c),n.insertBefore(o,l);a.className=f?`ui-note`:`ui-error`,y?(r.textContent=t.titleFor?.(y)??t.title,i.textContent=C.status===`rejected`?`Card unavailable`:!e.current&&y.state===`ready`?f?``:!d.signal.aborted&&(se||e.read)?`Checking whether actions are available in this card…`:`Actions are unavailable until this card's status is checked.`:!g&&y.state!==`closed`?`View only.`:m?$(u?.progress)?.status===`unavailable`?`Current progress is unavailable. The last recorded state is shown.`:!u?.request&&y.state===`closed`&&[`expired`,`server_restarted`,`cancelled`].includes(y.reason??``)?`This card no longer accepts actions.`:``:y.state===`running`?`Reading the requested data…`:y.reason===`completed`?``:y.error??(y.reason===`expired`?`The time to make a selection has ended.`:y.reason===`server_restarted`?`This request ended when Sui MCP restarted.`:``)):i.textContent=re?``:C.status===`read_failed`?`Card status unavailable`:ie||C.status===`rejected`?`Card unavailable`:`Opening card…`,i.hidden=!i.textContent,a.textContent=[...new Set(e.errors.filter(Boolean))].join(` `),a.hidden=!a.textContent;let v=s.querySelector(`.review-status`);if(v){let t=!!f&&(e.reviewUpdatePending||!!a.textContent);t?v.classList.add(`review-status--reserved`):v.classList.remove(`review-status--reserved`),v.setAttribute(`aria-hidden`,String(t))}let b=s.querySelector(`.review-material-status`);if(b&&(b.textContent=b.dataset.previous===`true`||!e.current||e.reviewUpdatePending?b.dataset.previousLabel??``:b.dataset.currentLabel??``),o.textContent=[e.note,De(e)].filter(Boolean).join(` `),o.hidden=!o.textContent,ge)for(let t of s.querySelectorAll(`input, button, select`))(!m||t.tagName!==`BUTTON`||t.dataset.cardAction!==void 0)&&(t.disabled=m?!ke(void 0,e):!Oe(e));if(m)for(let t of s.querySelectorAll(`[data-card-action]`))t.disabled=!ke({action:t.dataset.cardAction},e);if(p)for(let t of s.querySelectorAll(`[data-settings-file-action]`))t.disabled=t.dataset.settingsLocalBlocked===`true`||!(h?Ae({action:t.dataset.cardAction}):ke({action:t.dataset.cardAction},e));_&&(e.reviewUpdatePending||_.dataset.cardAction===`request_signature`&&e.reviewCommandDeliveryFailed||_.dataset.cardAction===void 0)&&(_.disabled=!0),O&&(O.disabled=!!E||!!se)}function Me(e){try{e?.()}catch{w=`The card display could not be closed cleanly. Its stored information is unchanged.`}}function Ne(e){if(!y||d.signal.aborted)return;if(y.state===`ready`&&C.status!==`confirmed`){if(p&&k?.update)try{k.update(y,{automaticPaused:oe===`paused`,settings:Ke,settingsCommandProgress:void 0,onDisplayChange:()=>A()})}catch{w=`This card could not be displayed. Its stored information is unchanged.`}return}let n=m?{...$(y.data),actionRemainingMs:void 0,nextStateReadAfterMs:void 0,...p&&$(y.data)?.download?{download:{...$($(y.data)?.download),remainingMs:void 0}}:{}}:void 0,r=p&&E?.phase===`sending`&&C.status===`confirmed`?FS(E.basis,y,E.input):void 0,i=`${oe===`paused`}:${JSON.stringify(r)}:${y.revision}:${g!==void 0}:${b!==void 0}:${x!==void 0}:${JSON.stringify(n)}`;if(i===me||i===he&&!e)return;he=i;let a=[...s.children],o=new Set([...s.querySelectorAll(`details`)].filter(e=>e.open).map(e=>e.querySelector(`summary`)?.textContent)),c,l=!1,u=!1;try{let e={automaticPaused:oe===`paused`,onDisplayChange:()=>A(),wallet:x,...p?{settings:Ke,settingsCommandProgress:r}:{}};if(k?.update?.(y,e)){me=i,w=void 0;return}if(y.state===`ready`&&g){let n=t.controls(y,e=>{We(e)},b,x,e);c=`node`in n?n:{node:n},l=!0}else(m||y.reason===`completed`)&&y.data!==void 0&&(c=t.result(y,b,g&&y.reason!==`cancelled`?e=>{We(e)}:void 0,x,e));s.replaceChildren(...c?[c.node]:[]),u=!0,c?.mount?.();for(let e of s.querySelectorAll(`details`))o.has(e.querySelector(`summary`)?.textContent)&&(e.open=!0)}catch{u&&s.replaceChildren(...a),Me(c?.dispose),w=`This card could not be displayed. Its stored information is unchanged.`;return}let f=k?.dispose;k=c,ge=l,me=i,w=void 0,Me(f)}function Pe(t,n,r,i,a){if(d.signal.aborted||C.status===`rejected`)return!1;if(t.kind!==e||t.cardId!==_)throw C={status:`rejected`,message:`The returned information does not match this card.`},Error(`The returned information does not match this card.`);let o=$(t.data),s=$(o?.request),c=$(s?.execution),l=o?.automaticAction===void 0?void 0:Mx.safeParse(o.automaticAction);if(l&&!l.success)throw Error(`This card could not start the next step.`);if(y&&t.revision<y.revision)return!1;if(y?.state===`closed`&&C.status===`confirmed`&&JSON.stringify(t)!==JSON.stringify(y))throw Error(`The completed card result cannot change.`);if(v&&[...new Set([...Object.keys(v),...Object.keys(t.input)])].some(e=>JSON.stringify(t.input[e])!==JSON.stringify(v[e])))throw C={status:`rejected`,message:`The returned information does not match this card.`},Error(`The returned information does not match this card.`);if(e===`review`&&($(o?.review)?.reviewSessionId!==void 0&&$(o?.review)?.reviewSessionId!==t.input.reviewSessionId||s&&(s.reviewSessionId!==t.input.reviewSessionId||t.input.attemptId!==void 0&&s.attemptId!==t.input.attemptId)||c&&(c.reviewSessionId!==s?.reviewSessionId||c.attemptId!==s?.attemptId||c.txDigest!==s?.transactionDigest)||$(o?.receipt)?.status===`found`&&$($(o?.receipt)?.receipt)?.txDigest!==s?.transactionDigest)||e===`receipt`&&o?.status===`found`&&$(o.receipt)?.txDigest!==t.input.digest)throw C={status:`rejected`,message:`The saved result does not match the information requested in this card.`},Error(C.message);!v&&(f||t.state!==`ready`)&&(v={...t.input});let u=r!==`preview`;if((!y||t.revision!==y.revision)&&(b=void 0,x=void 0),y=t,ye(),u){ue=Date.now();let t=p?$(o?.download):void 0;if(t?.availability===`available`&&typeof t.remainingMs==`number`&&Number.isFinite(t.remainingMs)){let e=`${o?.operationId}:${$(o?.file)?.fileId}:${t.expiresAt}`;we!==e&&(we=e,Ce=void 0),Ce=Math.min(Ce??1/0,ue+Math.max(0,t.remainingMs))}else p&&t?.availability===`ended`&&(Ce=void 0);g&&e===`review`&&o?.mode===`review`&&!o.request&&typeof o.actionRemainingMs==`number`&&Number.isFinite(o.actionRemainingMs)&&o.actionRemainingMs>=0&&(de=Math.min(de??1/0,ue+o.actionRemainingMs))}return r===`read`&&(C.status!==`needed`||a>C.afterRead)&&(C={status:`confirmed`},ie=void 0),n&&(b=n),x=i,!0}function Fe(){fe!==void 0&&clearTimeout(fe),pe!==void 0&&clearTimeout(pe),D!==void 0&&clearTimeout(D),fe=void 0,pe=void 0,D=void 0,l.hidden=!0}function Ie(e){let t=Ee(e);O?.textContent!==t&&(O?.remove(),O=void 0,t&&(O=cg(t,()=>{if(se||E||d.signal.aborted)return;let e=Te();if(e.recover===`selection`&&Oe(e))k?.selectionRecovery?.retry();else if(e.recover===`retry`){let e=be();e&&Ue(e)}else Le()})));let n=s.querySelector(`.review-primary-action`),r=s.querySelector(`.review-primary-slot`);n&&(n.hidden=!!O&&!!r),O&&(O.disabled=!!se||!!E,r?(O.classList.add(`review-recovery-action`),r.append(O)):(O.classList.remove(`review-recovery-action`),c.append(O)))}async function Le(){let e=k,t=e?.displayRecovery?.(),n=await ze(!0);n?.kind===`accepted`&&y===n.snapshot&&C.status===`confirmed`&&!d.signal.aborted&&document.visibilityState!==`hidden`&&!w&&e===k&&t&&e?.displayRecovery?.()===t&&(t.retry(),A())}function A(e=!1){if(re){let e=document.createElement(`p`);e.className=`ui-note`,e.textContent=re,s.replaceChildren(e)}else Ne(e);let t=Te();if(je(t),Fe(),Ie(t),d.signal.aborted||C.status===`rejected`)return;t.expiryAt!==void 0&&(pe=setTimeout(()=>{Re(),A()},Math.max(0,t.expiryAt-Date.now()))),t.reviewHint&&!a.textContent&&(l.replaceChildren(),l.textContent=t.reviewHint,l.setAttribute(`role`,`status`),l.hidden=!1);let n=s.querySelector(`.review-time-remaining`);if(n&&t.lifetimeAt!==void 0){let e=t.lifetimeAt,r=()=>{if(d.signal.aborted)return;let t=Math.max(0,e-Date.now()),i=Math.ceil(t/1e3);if(n.textContent=t>0?`Review expires in ${Math.floor(i/60)}:${String(i%60).padStart(2,`0`)}`:`Review time elapsed`,t>0)D=setTimeout(r,Math.min(1e3,t));else{let e=Te();je(e),Ie(e)}};r()}if(t.poll&&y){let e=ue+y.pollAfterMs-Date.now();fe=setTimeout(()=>{ze(!1)},e>0?e:y.pollAfterMs)}t.read?(ce=void 0,Be()):t.auto&&(fe=setTimeout(()=>{let e=Te().auto;e&&Ge(e,`automatic`)},0))}function Re(){C.status!==`rejected`&&C.status!==`read_failed`&&(C={status:`needed`,afterRead:le,automatic:!0})}function ze(e){return d.signal.aborted||C.status===`rejected`||!_||!te?Promise.resolve(void 0):se?se.promise:C.status===`read_failed`&&!e?Promise.resolve(void 0):(ce=e?`explicit`:`background`,A(),se?.promise??Promise.resolve(void 0))}function Be(){let e=++le,t=performance.now(),n={id:e,promise:Promise.resolve().then(async()=>{try{let n,r,i;if(g){let e=VS(await Ve(MS.read,{...g}));if(!e.snapshot)throw Error(e.error??`Saved card data is unavailable.`);if(e.error)throw Error(e.error);n=e.snapshot,r=e.display,i=e.wallet}else{let e=`${ES}${encodeURIComponent(_)}`,t=(await u.readServerResource({uri:e},{signal:d.signal})).contents.find(t=>t.uri===e&&`text`in t);if(!t||!(`text`in t))throw Error(`Saved card data is unavailable.`);n=bS.parse(JSON.parse(t.text));let i=b??ee;r=i&&zS(n,i)?i:void 0}if(d.signal.aborted||C.status===`rejected`)return{kind:`disposed`,id:e};let a=Pe(n,r,`read`,i,e);return ee=void 0,!a&&C.status===`needed`&&e>C.afterRead&&(C={...C,automatic:!1}),A(a),a&&C.status===`confirmed`?{kind:`accepted`,snapshot:n,id:e,requestStartedAt:t}:{kind:`ignored`,id:e}}catch(t){return d.signal.aborted?{kind:`disposed`,id:e}:(C.status!==`rejected`&&(C={status:`read_failed`,message:t instanceof Error?t.message:`Saved card data could not be read. The last displayed result is unchanged.`}),{kind:`failed`,id:e})}}).finally(()=>{se===n&&(se=void 0),A()})};se=n,A()}async function Ve(e,t){return RS(await u.callServerTool({name:e,arguments:t},{signal:d.signal}))}function He(e,t,n){let r=Vx.safeParse(n.data);if(!r.success||!r.data.allowedActions.some(t=>t===e.action))return!1;let i=r.data,a=$(t.data);return e.walletRunId&&e.walletRunId!==i.walletAvailability.walletRunId?!1:e.action===`connect`?i.kind===`connect`&&JSON.stringify(e.chains)===JSON.stringify(i.requestedChains):e.action===`prepare_review`||e.action===`request_signature`?i.kind===`review`&&i.review.reviewRevision===e.reviewRevision&&i.reviewTarget?.account===e.account&&i.reviewTarget?.connectionId===e.connectionId:e.action===`disconnect`?i.kind===`disconnect`&&i.connection?.connectionId===e.connectionId&&i.connection?.disconnectImpact?.impactId===e.impactId:e.action===`stop_connection`?i.kind===`connect`&&i.operation?.operationId===e.operationId&&i.operation?.status===`running`:JSON.stringify(t.input)===JSON.stringify(n.input)&&(i.kind!==`review`||i.request?.attemptId===$(a?.request)?.attemptId&&i.review.reviewRevision===$(a?.review)?.reviewRevision)}async function Ue(e){if(!y||se||!ke(e))return;let t={input:e,basis:y,phase:`confirming`};E=t;let n=await ze(!1);E===t&&(E=void 0,n?.kind===`accepted`&&y===n.snapshot&&C.status===`confirmed`&&!d.signal.aborted&&document.visibilityState!==`hidden`&&He(e,t.basis,n.snapshot)&&ke(e)?await Ge(e):C.status!==`read_failed`&&C.status!==`rejected`&&!d.signal.aborted&&(ae=`The card state changed. Check the current selection before trying again.`),A())}async function We(e){f&&(T?.disposition===`active`||T?.retryRequired||oe===`paused`)?await Ue(e):await Ge(e)}function j(e,t,n){T={input:e.input,basis:e.basis,message:t,delivery:n,disposition:`active`,retryRequired:e.input.action===`connect`||e.input.action===`prepare_review`},ye(),[`cancel`,`disconnect`,`stop_connection`,`stop_waiting`].includes(String(e.input.action))&&(oe=`paused`),(m||n===`unknown`)&&Re()}async function Ge(e,t=`user`){if(!y||!g||(t===`file`?!Ae(e):m?!ke(e):!Oe()))return;let n={input:e,basis:y,phase:`sending`};E=n,oe=`continue`,(t===`user`||T?.disposition!==`past`)&&(T=void 0),ae=void 0,A();try{let t=VS(await Ve(m?MS.act:MS.submit,{...g,revision:n.basis.revision,input:e}));if(d.signal.aborted||C.status===`rejected`)return;if(!t.snapshot)throw Error(t.error??`The request could not be confirmed.`);t.error&&j(n,t.error,`rejected`),Pe(t.snapshot,t.display,`action`,t.wallet)}catch(e){!d.signal.aborted&&C.status!==`rejected`&&(j(n,e instanceof Error?e.message:`The request could not be confirmed.`,`unknown`),T&&(T.data=$(e)?.data))}finally{E===n&&(E=void 0),A()}}let Ke={uploadChunkLimit(e,t){return g?gS({jsonrpc:`2.0`,id:2**53-1,method:`tools/call`,params:{name:MS.act,arguments:{...g,revision:2**53-1,input:{action:`settings_upload_chunk`,operationId:e,fileId:t,offset:2**53-1,chunkBase64:``}}}})??0:0},async readCurrent(){let e=await ze(!0);if(e?.kind!==`accepted`)throw Error(`The current Settings selection could not be checked. Use Check status before continuing.`);return{snapshot:e.snapshot,requestStartedAt:e.requestStartedAt}},async act(e,t=!1){if(t?!Ae(e):!ke(e))throw Error(`This Settings action is unavailable until its current status has been checked.`);if(await Ge(e,t?`file`:`user`),d.signal.aborted)throw Error(`This card closed before the request finished. Reopen the same conversation to check its status.`);if(T?.input===e){let e=Error(T.message);throw e.data=T.data,e}if(!y)throw Error(`The current Settings status could not be checked.`);return y},setFileTransferActive(e){h=e,A()},async readFile(e){if(!g||!_||!Te().current||d.signal.aborted)throw Error(`Backup read permission is unavailable.`);let t=await Ve(MS.readSettingsFile,{...g,...e}),n=jS.parse($(t._meta)?.[TS]);if(n.cardId!==_||n.operationId!==e.operationId||n.fileId!==e.fileId||n.offset!==e.offset||n.attemptId!==e.attemptId)throw Error(`The backup response does not match this card's selected file.`);return n},download:async(e,t,n)=>{let r=$($(y?.data)?.download);if(!g||!Te().current||d.signal.aborted||document.visibilityState===`hidden`||!r||r.currentAttemptId!==n||r.localSave||r.availability!==`available`||Ce===void 0||Date.now()>=Ce)throw Error(`This download is no longer available in this card.`);try{return{isError:(await u.downloadFile({contents:[{type:`resource`,resource:{uri:`file:///${encodeURIComponent(e)}`,mimeType:`application/json`,blob:t}}]},{signal:d.signal})).isError}}catch(e){if(e&&typeof e==`object`&&`code`in e&&e.code===-32601)return{unsupported:!0};throw e}}};async function qe(){if(te&&ne!==void 0&&!S){S=!0;try{let t=RS(ne),n=$(t._meta);if(t._meta!==void 0&&!n)throw Error(`This card cannot accept actions with the access information provided by the app.`);let r=n?.[SS];if(r!==void 0){let e=OS.safeParse(r);if(!e.success)throw Error(`This card cannot accept actions with the access information provided by the app.`);g=e.data}let i=VS(t);if(i.inputRequired){if(i.inputRequired.kind!==e||g)throw Error(`The app provided inconsistent card input information.`);re=i.inputRequired.message,A();return}let a=BS(t),o=[i.snapshot?.cardId,g?.cardId,a].filter(e=>e!==void 0);if(!o.length)throw Error(`Card data is unavailable.`);if(o.some(e=>e!==o[0])||i.snapshot&&i.snapshot.kind!==e)throw C={status:`rejected`,message:`The returned information does not match this card.`},Error(C.message);_=o[0];let s=i.snapshot;s&&(f||s.state!==`ready`)&&(v={...s.input}),ee=i.display,s&&g&&Pe(s,i.display,`preview`,i.wallet),Re(),A()}catch(e){if(d.signal.aborted)return;ie=e instanceof Error?e.message:`Card data could not be read.`,A()}}}u.ontoolresult=e=>{if(ne===void 0)ne=e,qe();else try{let t=VS(RS(ne)).snapshot??y,n=VS(RS(e)).snapshot;if(t&&n&&(t.cardId!==n.cardId||t.kind!==n.kind))throw Error(`The app returned a different card.`)}catch{C={status:`rejected`,message:`The returned information does not match this card.`},A()}},u.onhostcontextchanged=e=>{e.theme&&(document.documentElement.dataset.theme=e.theme)};let Je=()=>{document.visibilityState!==`hidden`&&g&&S&&C.status!==`read_failed`&&y?.state!==`closed`?ze(!1):A()};document.addEventListener?.(`visibilitychange`,Je),u.onteardown=async()=>{if(d.signal.aborted)return{};d.abort(),E=void 0,document.removeEventListener?.(`visibilitychange`,Je);let e=k?.dispose;return k=void 0,Me(e),A(),{}},u.connect().then(()=>{d.signal.aborted||(te=!0,document.documentElement.dataset.theme=u.getHostContext()?.theme??`light`,qe())}).catch(()=>{d.signal.aborted||(ie=`Could not connect this card to the app.`,A())})}var US=o(((e,t)=>{t.exports=function(){return typeof Promise==`function`&&Promise.prototype&&Promise.prototype.then}})),WS=o((e=>{var t,n=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];e.getSymbolSize=function(e){if(!e)throw Error(`"version" cannot be null or undefined`);if(e<1||e>40)throw Error(`"version" should be in range from 1 to 40`);return e*4+17},e.getSymbolTotalCodewords=function(e){return n[e]},e.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t},e.setToSJISFunction=function(e){if(typeof e!=`function`)throw Error(`"toSJISFunc" is not a valid function.`);t=e},e.isKanjiModeEnabled=function(){return t!==void 0},e.toSJIS=function(e){return t(e)}})),GS=o((e=>{e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`l`:case`low`:return e.L;case`m`:case`medium`:return e.M;case`q`:case`quartile`:return e.Q;case`h`:case`high`:return e.H;default:throw Error(`Unknown EC Level: `+t)}}e.isValid=function(e){return e&&e.bit!==void 0&&e.bit>=0&&e.bit<4},e.from=function(n,r){if(e.isValid(n))return n;try{return t(n)}catch{return r}}})),KS=o(((e,t)=>{function n(){this.buffer=[],this.length=0}n.prototype={get:function(e){let t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(let n=0;n<t;n++)this.putBit((e>>>t-n-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},t.exports=n})),qS=o(((e,t)=>{function n(e){if(!e||e<1)throw Error(`BitMatrix size must be defined and greater than 0`);this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}n.prototype.set=function(e,t,n,r){let i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},n.prototype.get=function(e,t){return this.data[e*this.size+t]},n.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},n.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},t.exports=n})),JS=o((e=>{var t=WS().getSymbolSize;e.getRowColCoords=function(e){if(e===1)return[];let n=Math.floor(e/7)+2,r=t(e),i=r===145?26:Math.ceil((r-13)/(2*n-2))*2,a=[r-7];for(let e=1;e<n-1;e++)a[e]=a[e-1]-i;return a.push(6),a.reverse()},e.getPositions=function(t){let n=[],r=e.getRowColCoords(t),i=r.length;for(let e=0;e<i;e++)for(let t=0;t<i;t++)e===0&&t===0||e===0&&t===i-1||e===i-1&&t===0||n.push([r[e],r[t]]);return n}})),YS=o((e=>{var t=WS().getSymbolSize,n=7;e.getPositions=function(e){let r=t(e);return[[0,0],[r-n,0],[0,r-n]]}})),XS=o((e=>{e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(e){return e!=null&&e!==``&&!isNaN(e)&&e>=0&&e<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(e){let n=e.size,r=0,i=0,a=0,o=null,s=null;for(let c=0;c<n;c++){i=a=0,o=s=null;for(let l=0;l<n;l++){let n=e.get(c,l);n===o?i++:(i>=5&&(r+=t.N1+(i-5)),o=n,i=1),n=e.get(l,c),n===s?a++:(a>=5&&(r+=t.N1+(a-5)),s=n,a=1)}i>=5&&(r+=t.N1+(i-5)),a>=5&&(r+=t.N1+(a-5))}return r},e.getPenaltyN2=function(e){let n=e.size,r=0;for(let t=0;t<n-1;t++)for(let i=0;i<n-1;i++){let n=e.get(t,i)+e.get(t,i+1)+e.get(t+1,i)+e.get(t+1,i+1);(n===4||n===0)&&r++}return r*t.N2},e.getPenaltyN3=function(e){let n=e.size,r=0,i=0,a=0;for(let t=0;t<n;t++){i=a=0;for(let o=0;o<n;o++)i=i<<1&2047|e.get(t,o),o>=10&&(i===1488||i===93)&&r++,a=a<<1&2047|e.get(o,t),o>=10&&(a===1488||a===93)&&r++}return r*t.N3},e.getPenaltyN4=function(e){let n=0,r=e.data.length;for(let t=0;t<r;t++)n+=e.data[t];return Math.abs(Math.ceil(n*100/r/5)-10)*t.N4};function n(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw Error(`bad maskPattern:`+t)}}e.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let a=0;a<r;a++)t.isReserved(a,i)||t.xor(a,i,n(e,a,i))},e.getBestMask=function(t,n){let r=Object.keys(e.Patterns).length,i=0,a=1/0;for(let o=0;o<r;o++){n(o),e.applyMask(o,t);let r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(o,t),r<a&&(a=r,i=o)}return i}})),ZS=o((e=>{var t=GS(),n=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],r=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];e.getBlocksCount=function(e,r){switch(r){case t.L:return n[(e-1)*4+0];case t.M:return n[(e-1)*4+1];case t.Q:return n[(e-1)*4+2];case t.H:return n[(e-1)*4+3];default:return}},e.getTotalCodewordsCount=function(e,n){switch(n){case t.L:return r[(e-1)*4+0];case t.M:return r[(e-1)*4+1];case t.Q:return r[(e-1)*4+2];case t.H:return r[(e-1)*4+3];default:return}}})),QS=o((e=>{var t=new Uint8Array(512),n=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)t[r]=e,n[e]=r,e<<=1,e&256&&(e^=285);for(let e=255;e<512;e++)t[e]=t[e-255]})(),e.log=function(e){if(e<1)throw Error(`log(`+e+`)`);return n[e]},e.exp=function(e){return t[e]},e.mul=function(e,r){return e===0||r===0?0:t[n[e]+n[r]]}})),$S=o((e=>{var t=QS();e.mul=function(e,n){let r=new Uint8Array(e.length+n.length-1);for(let i=0;i<e.length;i++)for(let a=0;a<n.length;a++)r[i+a]^=t.mul(e[i],n[a]);return r},e.mod=function(e,n){let r=new Uint8Array(e);for(;r.length-n.length>=0;){let e=r[0];for(let i=0;i<n.length;i++)r[i]^=t.mul(n[i],e);let i=0;for(;i<r.length&&r[i]===0;)i++;r=r.slice(i)}return r},e.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let i=0;i<n;i++)r=e.mul(r,new Uint8Array([1,t.exp(i)]));return r}})),eC=o(((e,t)=>{var n=$S();function r(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}r.prototype.initialize=function(e){this.degree=e,this.genPoly=n.generateECPolynomial(this.degree)},r.prototype.encode=function(e){if(!this.genPoly)throw Error(`Encoder not initialized`);let t=new Uint8Array(e.length+this.degree);t.set(e);let r=n.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let e=new Uint8Array(this.degree);return e.set(r,i),e}return r},t.exports=r})),tC=o((e=>{e.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}})),nC=o((e=>{var t=`[0-9]+`,n=`[A-Z $%*+\\-./:]+`,r=`(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+`;r=r.replace(/u/g,`\\u`);var i=`(?:(?![A-Z0-9 $%*+\\-./:]|`+r+`)(?:.|[\r
|
|
3631
|
+
]))+`;e.KANJI=new RegExp(r,`g`),e.BYTE_KANJI=RegExp(`[^A-Z0-9 $%*+\\-./:]+`,`g`),e.BYTE=new RegExp(i,`g`),e.NUMERIC=new RegExp(t,`g`),e.ALPHANUMERIC=new RegExp(n,`g`);var a=RegExp(`^`+r+`$`),o=RegExp(`^[0-9]+$`),s=RegExp(`^[A-Z0-9 $%*+\\-./:]+$`);e.testKanji=function(e){return a.test(e)},e.testNumeric=function(e){return o.test(e)},e.testAlphanumeric=function(e){return s.test(e)}})),rC=o((e=>{var t=tC(),n=nC();e.NUMERIC={id:`Numeric`,bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:`Alphanumeric`,bit:2,ccBits:[9,11,13]},e.BYTE={id:`Byte`,bit:4,ccBits:[8,16,16]},e.KANJI={id:`Kanji`,bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(e,n){if(!e.ccBits)throw Error(`Invalid mode: `+e);if(!t.isValid(n))throw Error(`Invalid version: `+n);return n>=1&&n<10?e.ccBits[0]:n<27?e.ccBits[1]:e.ccBits[2]},e.getBestModeForData=function(t){return n.testNumeric(t)?e.NUMERIC:n.testAlphanumeric(t)?e.ALPHANUMERIC:n.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(e){if(e&&e.id)return e.id;throw Error(`Invalid mode`)},e.isValid=function(e){return e&&e.bit&&e.ccBits};function r(t){if(typeof t!=`string`)throw Error(`Param is not a string`);switch(t.toLowerCase()){case`numeric`:return e.NUMERIC;case`alphanumeric`:return e.ALPHANUMERIC;case`kanji`:return e.KANJI;case`byte`:return e.BYTE;default:throw Error(`Unknown mode: `+t)}}e.from=function(t,n){if(e.isValid(t))return t;try{return r(t)}catch{return n}}})),iC=o((e=>{var t=WS(),n=ZS(),r=GS(),i=rC(),a=tC(),o=7973,s=t.getBCHDigit(o);function c(t,n,r){for(let i=1;i<=40;i++)if(n<=e.getCapacity(i,r,t))return i}function l(e,t){return i.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){let r=l(e.mode,t);n+=r+e.getBitsLength()}),n}function d(t,n){for(let r=1;r<=40;r++)if(u(t,r)<=e.getCapacity(r,n,i.MIXED))return r}e.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},e.getCapacity=function(e,r,o){if(!a.isValid(e))throw Error(`Invalid QR Code version`);o===void 0&&(o=i.BYTE);let s=(t.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,r))*8;if(o===i.MIXED)return s;let c=s-l(o,e);switch(o){case i.NUMERIC:return Math.floor(c/10*3);case i.ALPHANUMERIC:return Math.floor(c/11*2);case i.KANJI:return Math.floor(c/13);case i.BYTE:default:return Math.floor(c/8)}},e.getBestVersionForData=function(e,t){let n,i=r.from(t,r.M);if(Array.isArray(e)){if(e.length>1)return d(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return c(n.mode,n.getLength(),i)},e.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error(`Invalid QR Code version`);let n=e<<12;for(;t.getBCHDigit(n)-s>=0;)n^=o<<t.getBCHDigit(n)-s;return e<<12|n}})),aC=o((e=>{var t=WS(),n=1335,r=21522,i=t.getBCHDigit(n);e.getEncodedBits=function(e,a){let o=e.bit<<3|a,s=o<<10;for(;t.getBCHDigit(s)-i>=0;)s^=n<<t.getBCHDigit(s)-i;return(o<<10|s)^r}})),oC=o(((e,t)=>{var n=rC();function r(e){this.mode=n.NUMERIC,this.data=e.toString()}r.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);let i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,i*3+1))},t.exports=r})),sC=o(((e,t)=>{var n=rC(),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`.split(``);function i(e){this.mode=n.ALPHANUMERIC,this.data=e}i.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t+2<=this.data.length;t+=2){let n=r.indexOf(this.data[t])*45;n+=r.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(r.indexOf(this.data[t]),6)},t.exports=i})),cC=o(((e,t)=>{var n=rC();function r(e){this.mode=n.BYTE,this.data=typeof e==`string`?new TextEncoder().encode(e):new Uint8Array(e)}r.getBitsLength=function(e){return e*8},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},t.exports=r})),lC=o(((e,t)=>{var n=rC(),r=WS();function i(e){this.mode=n.KANJI,this.data=e}i.getBitsLength=function(e){return e*13},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t=0;for(;t<this.data.length;t++){let n=r.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw Error(`Invalid SJIS character: `+this.data[t]+`
|
|
3632
|
+
Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},t.exports=i})),uC=o(((e,t)=>{var n={single_source_shortest_paths:function(e,t,r){var i={},a={};a[t]=0;var o=n.PriorityQueue.make();o.push(t,0);for(var s,c,l,u,d,f,p,m,h;!o.empty();)for(l in s=o.pop(),c=s.value,u=s.cost,d=e[c]||{},d)d.hasOwnProperty(l)&&(f=d[l],p=u+f,m=a[l],h=a[l]===void 0,(h||m>p)&&(a[l]=p,o.push(l,p),i[l]=c));if(r!==void 0&&a[r]===void 0){var g=[`Could not find a path from `,t,` to `,r,`.`].join(``);throw Error(g)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,t,r){var i=n.single_source_shortest_paths(e,t,r);return n.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var t=n.PriorityQueue,r={},i;for(i in e||={},t)t.hasOwnProperty(i)&&(r[i]=t[i]);return r.queue=[],r.sorter=e.sorter||t.default_sorter,r},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t!==void 0&&(t.exports=n)})),dC=o((e=>{var t=rC(),n=oC(),r=sC(),i=cC(),a=lC(),o=nC(),s=WS(),c=uC();function l(e){return unescape(encodeURIComponent(e)).length}function u(e,t,n){let r=[],i;for(;(i=e.exec(n))!==null;)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function d(e){let n=u(o.NUMERIC,t.NUMERIC,e),r=u(o.ALPHANUMERIC,t.ALPHANUMERIC,e),i,a;return s.isKanjiModeEnabled()?(i=u(o.BYTE,t.BYTE,e),a=u(o.KANJI,t.KANJI,e)):(i=u(o.BYTE_KANJI,t.BYTE,e),a=[]),n.concat(r,i,a).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,o){switch(o){case t.NUMERIC:return n.getBitsLength(e);case t.ALPHANUMERIC:return r.getBitsLength(e);case t.KANJI:return a.getBitsLength(e);case t.BYTE:return i.getBitsLength(e)}}function p(e){return e.reduce(function(e,t){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function m(e){let n=[];for(let r=0;r<e.length;r++){let i=e[r];switch(i.mode){case t.NUMERIC:n.push([i,{data:i.data,mode:t.ALPHANUMERIC,length:i.length},{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.ALPHANUMERIC:n.push([i,{data:i.data,mode:t.BYTE,length:i.length}]);break;case t.KANJI:n.push([i,{data:i.data,mode:t.BYTE,length:l(i.data)}]);break;case t.BYTE:n.push([{data:i.data,mode:t.BYTE,length:l(i.data)}])}}return n}function h(e,n){let r={},i={start:{}},a=[`start`];for(let o=0;o<e.length;o++){let s=e[o],c=[];for(let e=0;e<s.length;e++){let l=s[e],u=``+o+e;c.push(u),r[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<a.length;e++){let o=a[e];r[o]&&r[o].node.mode===l.mode?(i[o][u]=f(r[o].lastCount+l.length,l.mode)-f(r[o].lastCount,l.mode),r[o].lastCount+=l.length):(r[o]&&(r[o].lastCount=l.length),i[o][u]=f(l.length,l.mode)+4+t.getCharCountIndicator(l.mode,n))}}a=c}for(let e=0;e<a.length;e++)i[a[e]].end=0;return{map:i,table:r}}function g(e,o){let c,l=t.getBestModeForData(e);if(c=t.from(o,l),c!==t.BYTE&&c.bit<l.bit)throw Error(`"`+e+`" cannot be encoded with mode `+t.toString(c)+`.
|
|
3633
|
+
Suggested mode is: `+t.toString(l));switch(c===t.KANJI&&!s.isKanjiModeEnabled()&&(c=t.BYTE),c){case t.NUMERIC:return new n(e);case t.ALPHANUMERIC:return new r(e);case t.KANJI:return new a(e);case t.BYTE:return new i(e)}}e.fromArray=function(e){return e.reduce(function(e,t){return typeof t==`string`?e.push(g(t,null)):t.data&&e.push(g(t.data,t.mode)),e},[])},e.fromString=function(t,n){let r=h(m(d(t,s.isKanjiModeEnabled())),n),i=c.find_path(r.map,`start`,`end`),a=[];for(let e=1;e<i.length-1;e++)a.push(r.table[i[e]].node);return e.fromArray(p(a))},e.rawSplit=function(t){return e.fromArray(d(t,s.isKanjiModeEnabled()))}})),fC=o((e=>{var t=WS(),n=GS(),r=KS(),i=qS(),a=JS(),o=YS(),s=XS(),c=ZS(),l=eC(),u=iC(),d=aC(),f=rC(),p=dC();function m(e,t){let n=e.size,r=o.getPositions(t);for(let t=0;t<r.length;t++){let i=r[t][0],a=r[t][1];for(let t=-1;t<=7;t++)if(!(i+t<=-1||n<=i+t))for(let r=-1;r<=7;r++)a+r<=-1||n<=a+r||(t>=0&&t<=6&&(r===0||r===6)||r>=0&&r<=6&&(t===0||t===6)||t>=2&&t<=4&&r>=2&&r<=4?e.set(i+t,a+r,!0,!0):e.set(i+t,a+r,!1,!0))}}function h(e){let t=e.size;for(let n=8;n<t-8;n++){let t=n%2==0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}function g(e,t){let n=a.getPositions(t);for(let t=0;t<n.length;t++){let r=n[t][0],i=n[t][1];for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)t===-2||t===2||n===-2||n===2||t===0&&n===0?e.set(r+t,i+n,!0,!0):e.set(r+t,i+n,!1,!0)}}function _(e,t){let n=e.size,r=u.getEncodedBits(t),i,a,o;for(let t=0;t<18;t++)i=Math.floor(t/3),a=t%3+n-8-3,o=(r>>t&1)==1,e.set(i,a,o,!0),e.set(a,i,o,!0)}function v(e,t,n){let r=e.size,i=d.getEncodedBits(t,n),a,o;for(a=0;a<15;a++)o=(i>>a&1)==1,a<6?e.set(a,8,o,!0):a<8?e.set(a+1,8,o,!0):e.set(r-15+a,8,o,!0),a<8?e.set(8,r-a-1,o,!0):a<9?e.set(8,15-a-1+1,o,!0):e.set(8,15-a-1,o,!0);e.set(r-8,8,1,!0)}function y(e,t){let n=e.size,r=-1,i=n-1,a=7,o=0;for(let s=n-1;s>0;s-=2)for(s===6&&s--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,s-n)){let r=!1;o<t.length&&(r=(t[o]>>>a&1)==1),e.set(i,s-n,r),a--,a===-1&&(o++,a=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}function b(e,n,i){let a=new r;i.forEach(function(t){a.put(t.mode.bit,4),a.put(t.getLength(),f.getCharCountIndicator(t.mode,e)),t.write(a)});let o=(t.getSymbolTotalCodewords(e)-c.getTotalCodewordsCount(e,n))*8;for(a.getLengthInBits()+4<=o&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(0);let s=(o-a.getLengthInBits())/8;for(let e=0;e<s;e++)a.put(e%2?17:236,8);return ee(a,e,n)}function ee(e,n,r){let i=t.getSymbolTotalCodewords(n),a=i-c.getTotalCodewordsCount(n,r),o=c.getBlocksCount(n,r),s=o-i%o,u=Math.floor(i/o),d=Math.floor(a/o),f=d+1,p=u-d,m=new l(p),h=0,g=Array(o),_=Array(o),v=0,y=new Uint8Array(e.buffer);for(let e=0;e<o;e++){let t=e<s?d:f;g[e]=y.slice(h,h+t),_[e]=m.encode(g[e]),h+=t,v=Math.max(v,t)}let b=new Uint8Array(i),ee=0,x,te;for(x=0;x<v;x++)for(te=0;te<o;te++)x<g[te].length&&(b[ee++]=g[te][x]);for(x=0;x<p;x++)for(te=0;te<o;te++)b[ee++]=_[te][x];return b}function x(e,n,r,a){let o;if(Array.isArray(e))o=p.fromArray(e);else if(typeof e==`string`){let t=n;if(!t){let n=p.rawSplit(e);t=u.getBestVersionForData(n,r)}o=p.fromString(e,t||40)}else throw Error(`Invalid data`);let c=u.getBestVersionForData(o,r);if(!c)throw Error(`The amount of data is too big to be stored in a QR Code`);if(!n)n=c;else if(n<c)throw Error(`
|
|
3634
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
3635
|
+
Minimum version required to store current data is: `+c+`.
|
|
3636
|
+
`);let l=b(n,r,o),d=new i(t.getSymbolSize(n));return m(d,n),h(d),g(d,n),v(d,r,0),n>=7&&_(d,n),y(d,l),isNaN(a)&&(a=s.getBestMask(d,v.bind(null,d,r))),s.applyMask(a,d),v(d,r,a),{modules:d,version:n,errorCorrectionLevel:r,maskPattern:a,segments:o}}e.create=function(e,r){if(e===void 0||e===``)throw Error(`No input text`);let i=n.M,a,o;return r!==void 0&&(i=n.from(r.errorCorrectionLevel,n.M),a=u.from(r.version),o=s.from(r.maskPattern),r.toSJISFunc&&t.setToSJISFunction(r.toSJISFunc)),x(e,a,i,o)}})),pC=o((e=>{function t(e){if(typeof e==`number`&&(e=e.toString()),typeof e!=`string`)throw Error(`Color should be defined as hex string`);let t=e.slice().replace(`#`,``).split(``);if(t.length<3||t.length===5||t.length>8)throw Error(`Invalid hex color: `+e);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),t.length===6&&t.push(`F`,`F`);let n=parseInt(t.join(``),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:`#`+t.slice(0,6).join(``)}}e.getOptions=function(e){e||={},e.color||(e.color={});let n=e.margin===void 0||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:n,color:{dark:t(e.color.dark||`#000000ff`),light:t(e.color.light||`#ffffffff`)},type:e.type,rendererOpts:e.rendererOpts||{}}},e.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},e.getImageWidth=function(t,n){let r=e.getScale(t,n);return Math.floor((t+n.margin*2)*r)},e.qrToImageData=function(t,n,r){let i=n.modules.size,a=n.modules.data,o=e.getScale(i,r),s=Math.floor((i+r.margin*2)*o),c=r.margin*o,l=[r.color.light,r.color.dark];for(let e=0;e<s;e++)for(let n=0;n<s;n++){let u=(e*s+n)*4,d=r.color.light;if(e>=c&&n>=c&&e<s-c&&n<s-c){let t=Math.floor((e-c)/o),r=Math.floor((n-c)/o);d=l[+!!a[t*i+r]]}t[u++]=d.r,t[u++]=d.g,t[u++]=d.b,t[u]=d.a}}})),mC=o((e=>{var t=pC();function n(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||={},t.height=n,t.width=n,t.style.height=n+`px`,t.style.width=n+`px`}function r(){try{return document.createElement(`canvas`)}catch{throw Error(`You need to specify a canvas element`)}}e.render=function(e,i,a){let o=a,s=i;o===void 0&&(!i||!i.getContext)&&(o=i,i=void 0),i||(s=r()),o=t.getOptions(o);let c=t.getImageWidth(e.modules.size,o),l=s.getContext(`2d`),u=l.createImageData(c,c);return t.qrToImageData(u.data,e,o),n(l,s,c),l.putImageData(u,0,0),s},e.renderToDataURL=function(t,n,r){let i=r;i===void 0&&(!n||!n.getContext)&&(i=n,n=void 0),i||={};let a=e.render(t,n,i),o=i.type||`image/png`,s=i.rendererOpts||{};return a.toDataURL(o,s.quality)}})),hC=o((e=>{var t=pC();function n(e,t){let n=e.a/255,r=t+`="`+e.hex+`"`;return n<1?r+` `+t+`-opacity="`+n.toFixed(2).slice(1)+`"`:r}function r(e,t,n){let r=e+t;return n!==void 0&&(r+=` `+n),r}function i(e,t,n){let i=``,a=0,o=!1,s=0;for(let c=0;c<e.length;c++){let l=Math.floor(c%t),u=Math.floor(c/t);!l&&!o&&(o=!0),e[c]?(s++,c>0&&l>0&&e[c-1]||(i+=o?r(`M`,l+n,.5+u+n):r(`m`,a,0),a=0,o=!1),l+1<t&&e[c+1]||(i+=r(`h`,s),s=0)):a++}return i}e.render=function(e,r,a){let o=t.getOptions(r),s=e.modules.size,c=e.modules.data,l=s+o.margin*2,u=o.color.light.a?`<path `+n(o.color.light,`fill`)+` d="M0 0h`+l+`v`+l+`H0z"/>`:``,d=`<path `+n(o.color.dark,`stroke`)+` d="`+i(c,s,o.margin)+`"/>`,f=`viewBox="0 0 `+l+` `+l+`"`,p=`<svg xmlns="http://www.w3.org/2000/svg" `+(o.width?`width="`+o.width+`" height="`+o.width+`" `:``)+f+` shape-rendering="crispEdges">`+u+d+`</svg>
|
|
3637
|
+
`;return typeof a==`function`&&a(null,p),p}})),gC=c(o((e=>{var t=US(),n=fC(),r=mC(),i=hC();function a(e,r,i,a,o){let s=[].slice.call(arguments,1),c=s.length,l=typeof s[c-1]==`function`;if(!l&&!t())throw Error(`Callback required as last argument`);if(l){if(c<2)throw Error(`Too few arguments provided`);c===2?(o=i,i=r,r=a=void 0):c===3&&(r.getContext&&o===void 0?(o=a,a=void 0):(o=a,a=i,i=r,r=void 0))}else{if(c<1)throw Error(`Too few arguments provided`);return c===1?(i=r,r=a=void 0):c===2&&!r.getContext&&(a=i,i=r,r=void 0),new Promise(function(t,o){try{t(e(n.create(i,a),r,a))}catch(e){o(e)}})}try{let t=n.create(i,a);o(null,e(t,r,a))}catch(e){o(e)}}e.create=n.create,e.toCanvas=a.bind(null,r.render),e.toDataURL=a.bind(null,r.renderToDataURL),e.toString=a.bind(null,function(e,t,n){return i.render(e,n)})}))(),1);function _C(e){let t=Wx.parse(e.data),n=lg(),r=ug(`Result`,t.result.message);r.setAttribute(`role`,`status`),n.append(r),t.walletName&&n.append(ug(`Wallet`,t.walletName));for(let e of t.networks)n.append(ug(k_[e.chainId]??e.chainId,e.status===`bound`?`Approved`:e.status===`not_approved`?`Not approved`:e.status===`multiple_accounts`?`Several addresses returned`:`Invalid response`));return n.append(ug(`Recorded at`,mg(t.result.recordedAt))),t.result.pendingWork&&n.append(sg(`p`,`ui-note`,t.result.pendingWork===`approval_response`?`The original wallet response was still outstanding when this result was recorded. A late approval will not be used. Ask in chat to check current status if needed.`:t.result.pendingWork===`session_removal`?`An unaccepted wallet session required removal when this result was recorded. Ask in chat to check its current status.`:`The wallet session's removal was not confirmed when this result was recorded. Ask in chat to check its current status.`)),n.append(sg(`p`,`ui-note`,`This card has ended. Ask in chat for another wallet request.`)),{node:n,dispose:()=>{}}}function vC(e,t,n,r){let i=e.kind===`disconnect`?Lx.parse(e.data):Ix.parse(e.data),a=lg(),o=String(e.input.operationId),s=(e,n,r=!1)=>{let i=cg(e,()=>{!c&&t&&t(n)},r?`danger`:`primary`);return i.dataset.cardAction=String(n.action),i.disabled=!t,i},c=!1,l=!1,u=!1,d,f=sg(`canvas`,`workflow-qr`);f.hidden=!0,f.setAttribute(`role`,`img`),f.setAttribute(`aria-label`,`Wallet connection QR code`);let p=sg(`p`,`ui-note`,`Scan to connect your wallet.`);p.hidden=!0;let m=()=>{l&&!c&&!u&&n&&(u=!0,d=void 0,gC.toCanvas(f,n.pairingUri).then(()=>{u=!1,c?(f.width=0,f.height=0):(f.hidden=!1,p.hidden=!1,r?.onDisplayChange?.())},()=>{u=!1,!c&&(d={message:`The QR code could not be displayed.`,retry:m},r?.onDisplayChange?.())}))};if(i.kind===`disconnect`){let t=i.connection?.connectionId===e.input.connectionId?i.connection:void 0;if(t&&(a.append(ug(`Wallet`,t.walletName??`Connected wallet`),ug(`Networks`,t.requestedChains.map(e=>k_[e]).join(`, `))),i.allowedActions.includes(`disconnect`)&&t.disconnectImpact)){for(let e of t.chainResults)e.status===`bound`&&a.append(ug(k_[e.chainId],pg(e.address)));a.append(ug(`Wallet approval requests to stop`,String(t.disconnectImpact.requestCount)),sg(`p`,`ui-note`,`This removes this connection from use on every listed network. Saved records remain. Submitted transactions cannot be cancelled.`),s(`Confirm disconnect`,{action:`disconnect`,operationId:o,connectionId:t.connectionId,impactId:t.disconnectImpact.impactId,walletRunId:i.walletAvailability.walletRunId},!0))}i.operation?.status===`running`?a.append(ug(`Status`,`Disconnecting…`)):t||a.append(sg(`p`,`ui-note`,`The wallet session for this request is no longer current. Ask in chat for a new request.`))}else a.append(ug(`Requested networks`,i.requestedChains.map(e=>k_[e]).join(`, `))),i.operation?.status===`running`?(a.append(sg(`p`,`ui-note`,`Waiting for approval in your wallet.`)),n?a.append(p,f):a.append(sg(`p`,`ui-note`,`The QR code is unavailable in this view. Check this request's status.`))):i.allowedActions.includes(`connect`)&&!i.automaticAction&&a.append(s(`Connect wallet`,{action:`connect`,operationId:o,chains:i.requestedChains,walletRunId:i.walletAvailability.walletRunId})),i.allowedActions.includes(`stop_connection`)&&a.append(s(`Stop connecting`,{action:`stop_connection`,operationId:o}));i.allowedActions.includes(`cancel`)&&a.append(s(`Cancel`,{action:`cancel`},!0));let h=dg(`Details`);h.body.append(ug(`Request ID`,e.cardId)),a.append(h.details),i.nextStep.message&&a.append(sg(`p`,`ui-note`,i.nextStep.message));let g=e=>{let{actionRemainingMs:t,nextStateReadAfterMs:n,walletObservation:r,...i}=Vx.parse(e.data);return JSON.stringify({state:e.state,input:e.input,facts:i})};return{node:a,update:(t,i)=>c||t.state===`closed`||g(t)!==g(e)||n?.pairingUri!==i.wallet?.pairingUri||n?.connectionId!==i.wallet?.connectionId?!1:(r=i,!0),visibleConfirmation:()=>i.kind===`disconnect`&&e.state===`ready`&&i.allowedActions.includes(`disconnect`)&&!c?`disconnect`:void 0,mount:()=>{l=!0,m()},displayRecovery:()=>d,dispose:()=>{c=!0,f.width=0,f.height=0}}}function yC(e){let t=(e,t,n,r)=>e.state===`closed`?_C(e):vC(e,t,n,r);return{title:e===`connect`?`Connect wallet`:`Disconnect wallet`,guidance:(e,t)=>{if(e?.state===`closed`)return`Ask in chat for a new wallet request.`;let n=NS(t);if(n)return n;let r=Vx.safeParse(e?.data);if(t.confirmed&&r.success)return r.data.nextStep.message},controls:(e,n,r,i,a)=>t(e,n,i,a),result:(e,n,r,i,a)=>t(e,r,i,a)}}HS(`disconnect`,yC(`disconnect`));</script></body></html>
|