@openephemeris/mcp-server 4.17.0 → 4.19.0
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/CHANGELOG.md +52 -0
- package/README.md +10 -10
- package/dist/backend/client.d.ts +57 -1
- package/dist/backend/client.js +125 -15
- package/dist/index.js +8 -110
- package/dist/prompts.js +26 -24
- package/dist/server-sse.d.ts +18 -0
- package/dist/server-sse.js +48 -120
- package/dist/tools/apps/_render-token.d.ts +34 -0
- package/dist/tools/apps/_render-token.js +50 -0
- package/dist/tools/apps/bazi-app.d.ts +1 -1
- package/dist/tools/apps/bazi-app.js +39 -14
- package/dist/tools/apps/bi-wheel-app.d.ts +10 -3
- package/dist/tools/apps/bi-wheel-app.js +79 -119
- package/dist/tools/apps/bodygraph-app.d.ts +7 -4
- package/dist/tools/apps/bodygraph-app.js +101 -46
- package/dist/tools/apps/chart-wheel-app.d.ts +1 -1
- package/dist/tools/apps/chart-wheel-app.js +59 -18
- package/dist/tools/apps/location-tools.js +10 -3
- package/dist/tools/apps/moon-phase-app.d.ts +1 -1
- package/dist/tools/apps/moon-phase-app.js +13 -4
- package/dist/tools/apps/transit-timeline-app.d.ts +1 -1
- package/dist/tools/apps/transit-timeline-app.js +6 -6
- package/dist/tools/apps/ui-resource.d.ts +43 -0
- package/dist/tools/apps/ui-resource.js +66 -0
- package/dist/tools/apps/ui-resources.d.ts +22 -0
- package/dist/tools/apps/ui-resources.js +105 -0
- package/dist/tools/apps/vedic-chart-app.d.ts +1 -1
- package/dist/tools/apps/vedic-chart-app.js +13 -3
- package/dist/tools/datetime-historical.js +7 -2
- package/dist/tools/datetime.js +2 -1
- package/dist/tools/dev.js +7 -6
- package/dist/tools/specialized/electional.js +4 -3
- package/dist/tools/specialized/ephemeris_extended.js +19 -4
- package/dist/tools/specialized/hd_group.js +2 -2
- package/dist/tools/specialized/moon.d.ts +1 -1
- package/dist/tools/specialized/moon.js +51 -43
- package/dist/tools/specialized/progressed.js +2 -25
- package/dist/tools/specialized/transits.js +5 -5
- package/dist/ui/bazi.html +1199 -1161
- package/dist/ui/bi-wheel.html +573 -504
- package/dist/ui/bodygraph.html +437 -337
- package/dist/ui/chart-wheel.html +654 -584
- package/dist/ui/moon-phase.html +190 -155
- package/dist/ui/transit-timeline.html +865 -830
- package/dist/ui/vedic-chart.html +971 -934
- package/package.json +2 -1
package/dist/ui/vedic-chart.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; font-src data:; connect-src 'none'" />
|
|
4
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; font-src data: https:; connect-src 'none'" />
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<meta name="color-scheme" content="dark light" />
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<title>Vedic Chart Explorer</title>
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
<style>:root{--bg:#010102;--surface:#030408;--surface-2:#080b11;--border:#13161d;--border-strong:#242933;--text:#e2e4e9;--text-secondary:#a1a5ab;--muted:#84868b;--gold:#cc9c42;--gold-dim:#7b6540;--gold-glow:rgba(204,156,66,.2);--gold-subtle:rgba(204,156,66,.1);--success:#1da871;--error:#c53443;--radius:10px;--radius-sm:6px;--radius-pill:99px;--shadow-md:0 8px 40px rgba(0,0,0,.65), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 28px rgba(204,156,66,.15), 0 0 0 1px rgba(204,156,66,.2)}@supports (color:color(display-p3 0 0 0)){:root{--bg:color(display-p3 .00306656 .00431968 .00888397);--surface:color(display-p3 .013072 .016989 .0298495);--surface-2:color(display-p3 .0345774 .0431759 .0653236);--border:color(display-p3 .0763929 .0859556 .109705);--border-strong:color(display-p3 .144788 .159634 .196542);--text:color(display-p3 .889546 .895785 .910689);--text-secondary:color(display-p3 .635245 .644982 .668335);--muted:color(display-p3 .518127 .525635 .543633);--gold:color(display-p3 .76996 .617341 .321369);--gold-dim:color(display-p3 .469305 .400291 .270966);--gold-glow:color(display-p3 .76996 .617341 .321369/.2);--gold-subtle:color(display-p3 .76996 .617341 .321369/.1);--success:color(display-p3 .313719 .651039 .459895);--error:color(display-p3 .710345 .252818 .279408);--shadow-md:0 8px 40px color(display-p3 0 0 0/.65), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 28px color(display-p3 .76996 .617341 .321369/.15), 0 0 0 1px color(display-p3 .76996 .617341 .321369/.2)}}@supports (color:lab(0% 0 0)){:root{--bg:lab(.302122% .0219196 -.522962);--surface:lab(1.18159% .0276566 -1.4848);--surface-2:lab(3.00584% .0228807 -3.15676);--border:lab(7.15581% -.0557452 -5.11242);--border-strong:lab(16.3712% -.0768155 -7.37782);--text:lab(90.6942% -.142366 -2.26941);--text-secondary:lab(67.4758% -.215352 -3.76978);--muted:lab(55.8848% -.174642 -3.01716);--gold:lab(67.5798% 11.9379 52.333);--gold-dim:lab(44.394% 5.21132 24.4453);--gold-glow:lab(67.5798% 11.9379 52.333/.2);--gold-subtle:lab(67.5798% 11.9379 52.333/.1);--success:lab(61.2436% -46.7762 18.3644);--error:lab(45.8893% 57.7361 27.393);--shadow-md:0 8px 40px lab(0% 0 0/.65), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 28px lab(67.5798% 11.9379 52.333/.15), 0 0 0 1px lab(67.5798% 11.9379 52.333/.2)}}:root[data-theme=light]{--bg:#f4f5f8;--surface:#fbfcfe;--surface-2:#eceef3;--border:#d5d7dd;--border-strong:#babec6;--text:#181b1f;--text-secondary:#4a4d54;--muted:#606369;--gold:#8a6000;--gold-dim:#967c4f;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@supports (color:color(display-p3 0 0 0)){:root[data-theme=light]{--bg:color(display-p3 .956515 .960735 .970805);--surface:color(display-p3 .98376 .986943 .994535);--surface-2:color(display-p3 .928401 .934691 .949715);--border:color(display-p3 .836244 .844458 .864107);--border-strong:color(display-p3 .731542 .743532 .772301);--text:color(display-p3 .096883 .103987 .12134);--text-secondary:color(display-p3 .291758 .301882 .326359);--muted:color(display-p3 .379924 .388781 .410092);--gold:color(display-p3 .524671 .380491 .0387678);--gold-dim:color(display-p3 .572756 .489268 .332751)}}@supports (color:lab(0% 0 0)){:root[data-theme=light]{--bg:lab(96.503% -.0977516 -1.51461);--surface:lab(98.8273% -.0742674 -1.13657);--surface-2:lab(94.1743% -.142753 -2.26963);--border:lab(86.0453% -.183702 -3.02233);--border-strong:lab(76.7468% -.254452 -4.52154);--text:lab(9.4703% -.119448 -3.722);--text-secondary:lab(32.6639% -.205323 -4.4957);--muted:lab(41.9548% -.197023 -3.7598);--gold:lab(44.2758% 13.6718 62.9124);--gold-dim:lab(53.685% 6.10271 28.558)}}:root[data-theme=light] body{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*,:before,:after{box-sizing:border-box;margin:0;padding:0}[hidden]{display:none!important}html,body{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:var(--bg);height:100%;color:var(--text);font-family:Geist,Space Grotesk,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Noto Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;line-height:1.5;overflow-x:hidden}#app{flex-direction:column;gap:8px;min-height:0;padding:8px 12px;display:flex}#loading-state{min-height:300px;color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:14px;display:flex}#loading-state p{letter-spacing:.06em;text-transform:uppercase;font-size:11px}.oe-loader{width:64px;height:64px;stroke:var(--gold);stroke-width:2px;fill:none;stroke-dasharray:200;stroke-dashoffset:200px;filter:drop-shadow(0 0 4px var(--gold-glow));animation:2.5s cubic-bezier(.16,1,.3,1) infinite oe-draw}@keyframes oe-draw{0%{stroke-dashoffset:200px;stroke-opacity:.1}50%{stroke-dashoffset:0;stroke-opacity:1;filter:drop-shadow(0 0 8px var(--gold))}to{stroke-dashoffset:-200px;stroke-opacity:.1}}.vedic-header{justify-content:space-between;align-items:center;width:100%;max-width:640px;margin:0 auto;padding:2px 2px 0;display:flex}.vedic-title{letter-spacing:.02em;color:var(--text);font-size:14px;font-weight:700}.vedic-ayanamsa-badge{letter-spacing:.04em;color:var(--gold);background:var(--gold-subtle);border:1px solid var(--gold-glow);border-radius:var(--radius-pill);padding:3px 10px;font-size:10px;font-weight:600}#vedic-container{border-radius:var(--radius);border:1px solid var(--border-strong);width:100%;max-width:640px;box-shadow:var(--shadow-gold);background:#010102;background:color(display-p3 .00306656 .00431968 .00888397);background:lab(.302122% .0219196 -.522962);margin:0 auto;transition:box-shadow .3s;position:relative;overflow:visible}#vedic-container:hover{box-shadow:0 0 40px rgba(204,156,66,.22),0 0 0 1px rgba(204,156,66,.3);box-shadow:0 0 40px color(display-p3 .76996 .617341 .321369/.22),0 0 0 1px color(display-p3 .76996 .617341 .321369/.3);box-shadow:0 0 40px lab(67.5798% 11.9379 52.333/.22),0 0 0 1px lab(67.5798% 11.9379 52.333/.3)}#vedic-container svg{aspect-ratio:1;width:100%;height:auto;max-height:min(62vh,560px);display:block}.vedic-cell{cursor:pointer;transition:filter .16s}.vedic-cell:hover{filter:brightness(1.18)drop-shadow(0 0 6px rgba(204,156,66,.35));filter:brightness(1.18)drop-shadow(0 0 6px color(display-p3 .76996 .617341 .321369/.35));filter:brightness(1.18)drop-shadow(0 0 6px lab(67.5798% 11.9379 52.333/.35));outline:none}.vedic-cell:focus-visible{filter:brightness(1.18)drop-shadow(0 0 6px rgba(204,156,66,.35));filter:brightness(1.18)drop-shadow(0 0 6px color(display-p3 .76996 .617341 .321369/.35));filter:brightness(1.18)drop-shadow(0 0 6px lab(67.5798% 11.9379 52.333/.35));outline:none}.vedic-cell:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}#info-panel{background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius);grid-template-columns:1fr 1fr;gap:6px 12px;width:100%;max-width:640px;max-height:220px;margin:0 auto;padding:10px 14px;display:grid;overflow-y:auto}.info-row{flex-direction:column;gap:1px;display:flex}.info-label{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:9px;font-weight:700}.info-value{color:var(--text);font-size:12px;font-weight:500}@media (max-width:420px){#app{gap:8px;padding:8px}#info-panel{grid-template-columns:1fr}}.error-state{min-height:200px;color:var(--muted);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.error-icon{opacity:.5;font-size:24px}.error-retry-btn{border:1px solid var(--border-strong);color:var(--gold);font:inherit;letter-spacing:.02em;cursor:pointer;background:0 0;border-radius:999px;margin-top:4px;padding:7px 20px;font-size:11px;font-weight:600;transition:background .18s,border-color .18s}.error-retry-btn:hover{background:rgba(122,128,141,.12);background:color(display-p3 .483965 .502358 .546955/.12);background:lab(53.5049% -.313222 -7.47857/.12)}.chart-status{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-radius:var(--radius-pill);color:var(--gold);letter-spacing:.04em;z-index:900;opacity:0;pointer-events:none;background:rgba(5,7,13,.92);background:color(display-p3 .0216592 .0280553 .0483601/.92);background:lab(1.95095% .0425801 -2.41514/.92);border:1px solid rgba(204,156,66,.35);border:1px solid color(display-p3 .76996 .617341 .321369/.35);border:1px solid lab(67.5798% 11.9379 52.333/.35);max-height:0;padding:5px 18px;font-size:11px;font-weight:600;transition:max-height .24s cubic-bezier(.16,1,.3,1),opacity .24s,transform .24s cubic-bezier(.16,1,.3,1);position:fixed;top:10px;left:50%;overflow:hidden;transform:translate(-50%)translateY(-10px);box-shadow:0 4px 20px rgba(0,0,0,.5),0 0 0 1px rgba(204,156,66,.08);box-shadow:0 4px 20px color(display-p3 0 0 0/.5),0 0 0 1px color(display-p3 .76996 .617341 .321369/.08);box-shadow:0 4px 20px lab(0% 0 0/.5),0 0 0 1px lab(67.5798% 11.9379 52.333/.08)}.chart-status.visible{opacity:1;max-height:44px;transform:translate(-50%)translateY(0)}.vedic-popup{background:var(--surface-2);border:1px solid var(--border-strong);z-index:1000;opacity:0;pointer-events:none;border-radius:12px;width:min(320px,92vw);padding:14px 16px 12px;transition:opacity .2s cubic-bezier(.16,1,.3,1);position:fixed;box-shadow:0 12px 48px rgba(0,0,0,.7),0 0 0 1px rgba(204,156,66,.15);box-shadow:0 12px 48px color(display-p3 0 0 0/.7),0 0 0 1px color(display-p3 .76996 .617341 .321369/.15);box-shadow:0 12px 48px lab(0% 0 0/.7),0 0 0 1px lab(67.5798% 11.9379 52.333/.15)}.vedic-popup.visible{opacity:1;pointer-events:all}.vedic-popup-header{align-items:flex-start;gap:10px;display:flex}.vedic-popup-title{color:var(--text);flex:1;font-size:13px;font-weight:700}.vedic-popup-sub{color:var(--text-secondary);margin-top:2px;font-size:11px;font-weight:400}.vedic-popup-close{cursor:pointer;color:var(--muted);background:0 0;border:none;border-radius:4px;flex-shrink:0;padding:2px 4px;font-size:15px;line-height:1;transition:color .12s}.vedic-popup-close:hover{color:var(--text)}.ask-claude-btn{border-radius:var(--radius-sm);width:100%;color:var(--gold);font:inherit;letter-spacing:.04em;cursor:pointer;background:rgba(204,156,66,.12);background:color(display-p3 .76996 .617341 .321369/.12);background:lab(67.5798% 11.9379 52.333/.12);border:1px solid rgba(204,156,66,.4);border:1px solid color(display-p3 .76996 .617341 .321369/.4);border:1px solid lab(67.5798% 11.9379 52.333/.4);justify-content:center;align-items:center;gap:6px;margin-top:12px;padding:9px 16px;font-size:12px;font-weight:600;transition:background .16s,border-color .16s,box-shadow .16s;display:flex}.ask-claude-btn:hover:not(:disabled){background:rgba(204,156,66,.2);background:color(display-p3 .76996 .617341 .321369/.2);background:lab(67.5798% 11.9379 52.333/.2);border-color:rgba(204,156,66,.65);border-color:color(display-p3 .76996 .617341 .321369/.65);border-color:lab(67.5798% 11.9379 52.333/.65);box-shadow:0 0 0 3px rgba(204,156,66,.12);box-shadow:0 0 0 3px color(display-p3 .76996 .617341 .321369/.12);box-shadow:0 0 0 3px lab(67.5798% 11.9379 52.333/.12)}.ask-claude-btn:disabled{opacity:.45;cursor:not-allowed}.ask-claude-btn.sending{opacity:.8;cursor:wait;pointer-events:none}.ask-claude-btn.sent{color:var(--success);pointer-events:none;background:rgba(29,168,113,.15);background:color(display-p3 .313719 .651039 .459895/.15);background:lab(61.2436% -46.7762 18.3644/.15);border-color:rgba(29,168,113,.5);border-color:color(display-p3 .313719 .651039 .459895/.5);border-color:lab(61.2436% -46.7762 18.3644/.5)}.ask-claude-btn.error{color:var(--error);background:rgba(197,52,67,.15);background:color(display-p3 .710345 .252818 .279408/.15);background:lab(45.8893% 57.7361 27.393/.15);border-color:rgba(197,52,67,.5);border-color:color(display-p3 .710345 .252818 .279408/.5);border-color:lab(45.8893% 57.7361 27.393/.5)}.vedic-action-bar{flex-wrap:wrap;gap:8px;padding:10px 16px 6px;display:flex}.action-btn{color:var(--gold);letter-spacing:.02em;cursor:pointer;white-space:nowrap;background:rgba(204,156,66,.08);background:color(display-p3 .76996 .617341 .321369/.08);background:lab(67.5798% 11.9379 52.333/.08);border:1px solid rgba(204,156,66,.3);border:1px solid color(display-p3 .76996 .617341 .321369/.3);border:1px solid lab(67.5798% 11.9379 52.333/.3);border-radius:8px;align-items:center;gap:6px;padding:7px 16px;font-size:12px;font-weight:600;transition:background .2s,border-color .2s,transform .1s;display:inline-flex}.action-btn:hover{background:rgba(204,156,66,.15);background:color(display-p3 .76996 .617341 .321369/.15);background:lab(67.5798% 11.9379 52.333/.15);border-color:rgba(204,156,66,.5);border-color:color(display-p3 .76996 .617341 .321369/.5);border-color:lab(67.5798% 11.9379 52.333/.5);transform:translateY(-1px)}.action-btn:active{background:rgba(204,156,66,.2);background:color(display-p3 .76996 .617341 .321369/.2);background:lab(67.5798% 11.9379 52.333/.2);transform:translateY(0)}.action-btn--primary{background:linear-gradient(135deg,rgba(204,156,66,.2),rgba(166,117,55,.25));background:linear-gradient(135deg,color(display-p3 .76996 .617341 .321369/.2),color(display-p3 .622862 .466276 .257278/.25));background:linear-gradient(135deg,lab(67.5798% 11.9379 52.333/.2),lab(53.4364% 15.3976 41.3855/.25));border-color:rgba(204,156,66,.5);border-color:color(display-p3 .76996 .617341 .321369/.5);border-color:lab(67.5798% 11.9379 52.333/.5)}.action-btn--primary:hover{background:linear-gradient(135deg,rgba(204,156,66,.3),rgba(166,117,55,.35));background:linear-gradient(135deg,color(display-p3 .76996 .617341 .321369/.3),color(display-p3 .622862 .466276 .257278/.35));background:linear-gradient(135deg,lab(67.5798% 11.9379 52.333/.3),lab(53.4364% 15.3976 41.3855/.35))}.tooltip{-webkit-backdrop-filter:blur(14px)saturate(1.6);backdrop-filter:blur(14px)saturate(1.6);border:1px solid var(--border-strong);border-radius:var(--radius);pointer-events:none;z-index:1000;opacity:0;background:rgba(7,9,14,.92);background:color(display-p3 .0286832 .0352525 .0537785/.92);background:lab(2.44746% .00379235 -2.33402/.92);max-width:220px;padding:8px 12px;font-size:12px;transition:opacity .12s;position:fixed;box-shadow:0 8px 32px rgba(0,0,0,.55);box-shadow:0 8px 32px color(display-p3 0 0 0/.55);box-shadow:0 8px 32px lab(0% 0 0/.55)}.tooltip.visible{opacity:1}.tooltip-title{color:var(--text);margin-bottom:2px;font-weight:700}.tooltip-detail{color:var(--text-secondary);line-height:1.4}.tooltip-hint{color:var(--gold-dim);letter-spacing:.03em;margin-top:4px;font-size:10px}.pan-zoom-controls{z-index:800;flex-direction:column;gap:6px;display:flex;position:absolute;bottom:12px;right:12px}.pan-zoom-controls[hidden]{display:none!important}.pan-btn{background:var(--surface-2);border:1px solid var(--border-strong);color:var(--text);border-radius:var(--radius-sm);cursor:pointer;width:36px;height:36px;box-shadow:var(--shadow-md);justify-content:center;align-items:center;font-family:inherit;font-size:18px;transition:all .15s;display:flex}.pan-btn.reset{width:auto;padding:0 10px;font-size:11px;font-weight:500}.pan-btn:hover{background:var(--surface);border-color:var(--gold-dim);color:var(--gold)}.pan-btn:active{transform:scale(.95)}.pan-btn--fullscreen{width:36px;height:36px}@media (max-width:480px){.pan-zoom-controls{gap:5px}.pan-btn,.pan-btn--fullscreen{background:color-mix(in oklab, var(--surface-2) 72%, transparent);-webkit-backdrop-filter:blur(6px);width:32px;height:32px;font-size:15px}.pan-btn.reset{width:32px;padding:0;font-size:0}.pan-btn.reset:before{content:"⟲";font-size:15px}}body.is-fullscreen{height:100vh;overflow:hidden}body.is-fullscreen #app{flex-direction:column;gap:0;width:100vw;max-width:100%;height:100vh;padding:0;display:flex;overflow:hidden}body.is-fullscreen #vedic-container{min-height:0;max-width:unset;width:100%;height:auto;box-shadow:none;background:0 0;border:none;flex:1;justify-content:center;align-items:center;margin:0;padding:16px 24px 0;display:flex}body.is-fullscreen #loading-state{flex:1;height:auto;min-height:0}body.is-fullscreen #vedic-container svg{width:auto;max-width:100%;height:100%;max-height:100%}body.is-fullscreen .pan-zoom-controls{top:16px;bottom:auto;right:16px}#fs-bottom-bar{border-top:1px solid var(--border);background:#020306;background:color(display-p3 .0100648 .0127997 .0215356);background:lab(.889429% .0122339 -1.01076);flex-shrink:0;grid-template-rows:1fr;grid-template-columns:220px 1fr 220px;height:240px;min-height:180px;max-height:280px;display:grid}#fs-bottom-bar [data-column=left],#fs-bottom-bar [data-column=right]{flex-direction:column;gap:4px;padding:10px 14px 12px;display:flex;overflow-x:hidden;overflow-y:auto}#fs-bottom-bar [data-column=left]{border-right:1px solid var(--border)}#fs-bottom-bar [data-column=center]{pointer-events:none}#fs-bottom-bar [data-column=right]{border-left:1px solid var(--border)}#fs-bottom-bar [data-column]>*+*{border-top:1px solid var(--border);margin-top:4px;padding-top:8px}#fs-bottom-bar .vedic-action-bar{flex-direction:column;padding:8px 0 0}#fs-bottom-bar .action-btn{justify-content:center;width:100%}.cancel-toast{background:var(--surface-2);border:1px solid var(--border-strong);color:var(--text-secondary);border-radius:var(--radius-sm);opacity:0;z-index:9999;pointer-events:none;box-shadow:var(--shadow-md);padding:8px 16px;font-size:12px;transition:opacity .3s,transform .3s;position:fixed;bottom:20px;left:50%;transform:translate(-50%)translateY(20px)}.cancel-toast.visible{opacity:1;transform:translate(-50%)translateY(0)}:root[data-theme=light] #vedic-container{background:var(--surface)}:root[data-theme=light] .chart-status,:root[data-theme=light] .tooltip{background:rgba(251,252,254,.92);background:color(display-p3 .98376 .986943 .994535/.92);background:lab(98.8273% -.0742674 -1.13657/.92)}:root[data-theme=light] #fs-bottom-bar{background:var(--surface-2)}:root[data-theme=light] .vedic-popup{background:var(--surface);border-color:var(--border-strong)}:root[data-theme=light] #info-panel{background:var(--surface);border-color:var(--border)}
|
|
13
|
+
<style>:root{--bg:#010102;--surface:#030408;--surface-2:#080b11;--border:#13161d;--border-strong:#242933;--text:#e2e4e9;--text-secondary:#a1a5ab;--muted:#84868b;--gold:#cc9c42;--gold-dim:#7b6540;--gold-glow:rgba(204,156,66,.2);--gold-subtle:rgba(204,156,66,.1);--success:#1da871;--error:#c53443;--radius:10px;--radius-sm:6px;--radius-pill:99px;--oe-shadow-md:0 8px 40px rgba(0,0,0,.65), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 28px rgba(204,156,66,.15), 0 0 0 1px rgba(204,156,66,.2);--font-ui:var(--font-sans,system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif);--font-code:var(--font-mono,ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace);--oe-page-bg:var(--color-background-primary,var(--bg));--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}@supports (color:color(display-p3 0 0 0)){:root{--bg:color(display-p3 .00306656 .00431968 .00888397);--surface:color(display-p3 .013072 .016989 .0298495);--surface-2:color(display-p3 .0345774 .0431759 .0653236);--border:color(display-p3 .0763929 .0859556 .109705);--border-strong:color(display-p3 .144788 .159634 .196542);--text:color(display-p3 .889546 .895785 .910689);--text-secondary:color(display-p3 .635245 .644982 .668335);--muted:color(display-p3 .518127 .525635 .543633);--gold:color(display-p3 .76996 .617341 .321369);--gold-dim:color(display-p3 .469305 .400291 .270966);--gold-glow:color(display-p3 .76996 .617341 .321369/.2);--gold-subtle:color(display-p3 .76996 .617341 .321369/.1);--success:color(display-p3 .313719 .651039 .459895);--error:color(display-p3 .710345 .252818 .279408);--oe-shadow-md:0 8px 40px color(display-p3 0 0 0/.65), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 28px color(display-p3 .76996 .617341 .321369/.15), 0 0 0 1px color(display-p3 .76996 .617341 .321369/.2)}}@supports (color:lab(0% 0 0)){:root{--bg:lab(.302122% .0219196 -.522962);--surface:lab(1.18159% .0276566 -1.4848);--surface-2:lab(3.00584% .0228807 -3.15676);--border:lab(7.15581% -.0557452 -5.11242);--border-strong:lab(16.3712% -.0768155 -7.37782);--text:lab(90.6942% -.142366 -2.26941);--text-secondary:lab(67.4758% -.215352 -3.76978);--muted:lab(55.8848% -.174642 -3.01716);--gold:lab(67.5798% 11.9379 52.333);--gold-dim:lab(44.394% 5.21132 24.4453);--gold-glow:lab(67.5798% 11.9379 52.333/.2);--gold-subtle:lab(67.5798% 11.9379 52.333/.1);--success:lab(61.2436% -46.7762 18.3644);--error:lab(45.8893% 57.7361 27.393);--oe-shadow-md:0 8px 40px lab(0% 0 0/.65), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 28px lab(67.5798% 11.9379 52.333/.15), 0 0 0 1px lab(67.5798% 11.9379 52.333/.2)}}:root[data-theme=light]{--bg:#f4f5f8;--surface:#fbfcfe;--surface-2:#eceef3;--border:#d5d7dd;--border-strong:#babec6;--text:#181b1f;--text-secondary:#4a4d54;--muted:#606369;--gold:#8a6000;--gold-dim:#967c4f;--gold-glow:rgba(141,95,0,.25);--gold-subtle:rgba(141,95,0,.07);--success:#007145;--error:#b1002b;--oe-shadow-md:0 4px 24px rgba(0,0,0,.12), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 16px rgba(141,95,0,.18), 0 0 0 1px rgba(141,95,0,.22);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@supports (color:color(display-p3 0 0 0)){:root[data-theme=light]{--bg:color(display-p3 .956515 .960735 .970805);--surface:color(display-p3 .98376 .986943 .994535);--surface-2:color(display-p3 .928401 .934691 .949715);--border:color(display-p3 .836244 .844458 .864107);--border-strong:color(display-p3 .731542 .743532 .772301);--text:color(display-p3 .096883 .103987 .12134);--text-secondary:color(display-p3 .291758 .301882 .326359);--muted:color(display-p3 .379924 .388781 .410092);--gold:color(display-p3 .524671 .380491 .0387678);--gold-dim:color(display-p3 .572756 .489268 .332751);--gold-glow:color(display-p3 .542549 .371783 -.107551/.25);--gold-subtle:color(display-p3 .542549 .371783 -.107551/.07);--success:color(display-p3 -.0793084 .456092 .255685);--error:color(display-p3 .642198 .101724 .18242);--oe-shadow-md:0 4px 24px color(display-p3 0 0 0/.12), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 16px color(display-p3 .542549 .371783 -.107551/.18), 0 0 0 1px color(display-p3 .542549 .371783 -.107551/.22)}}@supports (color:lab(0% 0 0)){:root[data-theme=light]{--bg:lab(96.503% -.0977516 -1.51461);--surface:lab(98.8273% -.0742674 -1.13657);--surface-2:lab(94.1743% -.142753 -2.26963);--border:lab(86.0453% -.183702 -3.02233);--border-strong:lab(76.7468% -.254452 -4.52154);--text:lab(9.4703% -.119448 -3.722);--text-secondary:lab(32.6639% -.205323 -4.4957);--muted:lab(41.9548% -.197023 -3.7598);--gold:lab(44.2758% 13.6718 62.9124);--gold-dim:lab(53.685% 6.10271 28.558);--gold-glow:lab(44.1995% 17.0662 84.3373/.25);--gold-subtle:lab(44.1995% 17.0662 84.3373/.07);--success:lab(41.7514% -55.3249 21.5039);--error:lab(37.5238% 64.2774 32.6097);--oe-shadow-md:0 4px 24px lab(0% 0 0/.12), 0 0 0 1px var(--border-strong);--shadow-gold:0 0 16px lab(44.1995% 17.0662 84.3373/.18), 0 0 0 1px lab(44.1995% 17.0662 84.3373/.22)}}:root{--safe-top:0px;--safe-right:0px;--safe-bottom:0px;--safe-left:0px;--oe-host-h:var(--host-height,var(--host-max-height,640px));--oe-chart-max:clamp(260px, calc(var(--oe-host-h) * .72), 560px);--oe-chart-max-lg:clamp(280px, calc(var(--oe-host-h) * .8), 720px);--oe-drawer-max:clamp(160px, calc(var(--oe-host-h) * .4), 360px);--oe-scroll-max:clamp(240px, calc(var(--oe-host-h) * .7), 560px)}html,body{font-family:var(--font-ui)}body{background-color:var(--oe-page-bg)}.oe-pannable{touch-action:pan-y}body.is-fullscreen .oe-pannable{touch-action:none}.pan-zoom-controls [hidden],.pan-btn[hidden]{display:none!important}.fs-hint-banner{top:calc(12px + var(--safe-top));z-index:9999;border-radius:var(--radius-pill);border:1px solid color-mix(in oklab, var(--gold) 35%, transparent);background:color-mix(in oklab, var(--surface-2) 92%, transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);max-width:calc(100% - 32px);color:var(--text);font:600 11px/1.4 var(--font-ui);letter-spacing:.04em;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;opacity:0;padding:6px 16px;transition:opacity .3s;position:fixed;left:50%;overflow:hidden;transform:translate(-50%)}.fs-hint-banner.visible{opacity:1}@media (prefers-reduced-motion:reduce){.fs-hint-banner{transition:none}}body.is-fullscreen{height:100vh;height:100dvh;overflow:hidden}body.is-fullscreen #app{width:100%;max-width:none;height:100%;min-height:0;padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);flex-direction:column;gap:0;margin:0;display:flex;overflow:hidden}body.is-fullscreen #app:has(>#fs-bottom-bar){padding-bottom:0}body.is-fullscreen #app .oe-stage{aspect-ratio:auto;width:100%;max-width:none;height:auto;min-height:0;max-height:none;box-shadow:none;background:0 0;border:0;border-radius:0;flex:auto;justify-content:center;align-items:center;margin:0;padding:16px 24px 8px;display:flex;overflow:hidden}body.is-fullscreen #app .oe-stage>svg{width:auto;max-width:100%;height:100%;max-height:100%}body.is-fullscreen #app .oe-stage--doc{width:100%;max-width:880px;padding:20px 24px calc(16px + var(--safe-bottom));flex-direction:column;justify-content:flex-start;align-items:stretch;margin:0 auto;display:flex;overflow-y:auto}body.is-fullscreen #app #loading-state{flex:1;height:auto;min-height:0}body.is-fullscreen #app .pan-zoom-controls{top:calc(54px + var(--safe-top));right:calc(12px + var(--safe-right));bottom:auto}body .oe-info-button{top:calc(12px + var(--safe-top));right:calc(12px + var(--safe-right))}#app #fs-bottom-bar{height:clamp(170px, calc(var(--oe-host-h) * .3), 280px);padding-bottom:var(--safe-bottom);border-top:1px solid var(--border);background:var(--surface);flex-shrink:0;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(200px,260px) minmax(0,1fr) minmax(200px,260px);display:grid}:root[data-safe-bottom] #app #fs-bottom-bar{height:calc(clamp(170px, calc(var(--oe-host-h) * .3), 280px) + var(--safe-bottom));grid-template-columns:minmax(0,1fr) minmax(0,1fr)}:root[data-safe-bottom] #fs-bottom-bar [data-column=center]{display:none}#fs-bottom-bar [data-column=left],#fs-bottom-bar [data-column=right]{scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent;flex-direction:column;gap:4px;min-height:0;padding:10px 14px 12px;display:flex;overflow-x:hidden;overflow-y:auto}#fs-bottom-bar [data-column=left]{border-right:1px solid var(--border)}#fs-bottom-bar [data-column=right]{border-left:1px solid var(--border)}#fs-bottom-bar [data-column=center]{pointer-events:none}#fs-bottom-bar [data-column]>*+*{border-top:1px solid var(--border);margin-top:4px;padding-top:8px}#fs-bottom-bar [class$=-action-bar],#fs-bottom-bar [class*=-action-bar\ ]{flex-direction:column;padding:8px 0 0}#fs-bottom-bar .action-btn{justify-content:center;width:100%}@media (max-width:640px){#app #fs-bottom-bar,:root[data-safe-bottom] #app #fs-bottom-bar{height:auto;max-height:42%;display:block;overflow-y:auto}#fs-bottom-bar [data-column=center]{display:none}#fs-bottom-bar [data-column=left],#fs-bottom-bar [data-column=right]{border:0;min-height:auto;overflow:visible}#fs-bottom-bar [data-column=right]{border-top:1px solid var(--border)}body.is-fullscreen #app .oe-stage{padding:8px}}body.is-pip{overflow:hidden}body.is-pip #app{gap:6px;padding:6px 8px}body.is-pip .oe-pip-hide,body.is-pip #param-controls-container,body.is-pip #chart-status,body.is-pip .oe-info-button{display:none!important}body.is-pip #app .pan-zoom-controls{top:6px;right:6px}:root[data-theme=light] body{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*,:before,:after{box-sizing:border-box;margin:0;padding:0}[hidden]{display:none!important}html,body{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;background:var(--oe-page-bg);height:100%;color:var(--text);font-family:var(--font-ui);font-size:13px;line-height:1.5;overflow-x:hidden}#app{flex-direction:column;gap:8px;min-height:0;padding:8px 12px;display:flex}#loading-state{min-height:300px;color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:14px;display:flex}#loading-state p{letter-spacing:.06em;text-transform:uppercase;font-size:11px}.oe-loader{width:64px;height:64px;stroke:var(--gold);stroke-width:2px;fill:none;stroke-dasharray:200;stroke-dashoffset:200px;filter:drop-shadow(0 0 4px var(--gold-glow));animation:2.5s cubic-bezier(.16,1,.3,1) infinite oe-draw}@keyframes oe-draw{0%{stroke-dashoffset:200px;stroke-opacity:.1}50%{stroke-dashoffset:0;stroke-opacity:1;filter:drop-shadow(0 0 8px var(--gold))}to{stroke-dashoffset:-200px;stroke-opacity:.1}}.vedic-header{justify-content:space-between;align-items:center;width:100%;max-width:640px;margin:0 auto;padding:2px 2px 0;display:flex}.vedic-title{letter-spacing:.02em;color:var(--text);font-size:14px;font-weight:700}.vedic-ayanamsa-badge{letter-spacing:.04em;color:var(--gold);background:var(--gold-subtle);border:1px solid var(--gold-glow);border-radius:var(--radius-pill);padding:3px 10px;font-size:10px;font-weight:600}#vedic-container{border-radius:var(--radius);width:100%;max-width:640px;margin:0 auto;position:relative;overflow:visible}#vedic-container svg{width:100%;height:auto;max-height:var(--oe-chart-max);aspect-ratio:1;display:block}.vedic-cell{cursor:pointer;transition:filter .16s}.vedic-cell:hover{filter:brightness(1.18)drop-shadow(0 0 6px rgba(204,156,66,.35));filter:brightness(1.18)drop-shadow(0 0 6px color(display-p3 .76996 .617341 .321369/.35));filter:brightness(1.18)drop-shadow(0 0 6px lab(67.5798% 11.9379 52.333/.35));outline:none}.vedic-cell:focus-visible{filter:brightness(1.18)drop-shadow(0 0 6px rgba(204,156,66,.35));filter:brightness(1.18)drop-shadow(0 0 6px color(display-p3 .76996 .617341 .321369/.35));filter:brightness(1.18)drop-shadow(0 0 6px lab(67.5798% 11.9379 52.333/.35));outline:none}.vedic-cell:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}#info-panel{background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius);grid-template-columns:1fr 1fr;gap:6px 12px;width:100%;max-width:640px;max-height:220px;margin:0 auto;padding:10px 14px;display:grid;overflow-y:auto}.info-row{flex-direction:column;gap:1px;display:flex}.info-label{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:9px;font-weight:700}.info-value{color:var(--text);font-size:12px;font-weight:500}@media (max-width:420px){#app{gap:8px;padding:8px}#info-panel{grid-template-columns:1fr}}.error-state{min-height:200px;color:var(--muted);text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:8px;padding:24px;display:flex}.error-icon{opacity:.5;font-size:24px}.error-retry-btn{border:1px solid var(--border-strong);color:var(--gold);font:inherit;letter-spacing:.02em;cursor:pointer;background:0 0;border-radius:999px;margin-top:4px;padding:7px 20px;font-size:11px;font-weight:600;transition:background .18s,border-color .18s}.error-retry-btn:hover{background:rgba(122,128,141,.12);background:color(display-p3 .483965 .502358 .546955/.12);background:lab(53.5049% -.313222 -7.47857/.12)}.chart-status{-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-radius:var(--radius-pill);color:var(--gold);letter-spacing:.04em;z-index:900;opacity:0;pointer-events:none;background:rgba(5,7,13,.92);background:color(display-p3 .0216592 .0280553 .0483601/.92);background:lab(1.95095% .0425801 -2.41514/.92);border:1px solid rgba(204,156,66,.35);border:1px solid color(display-p3 .76996 .617341 .321369/.35);border:1px solid lab(67.5798% 11.9379 52.333/.35);max-height:0;padding:5px 18px;font-size:11px;font-weight:600;transition:max-height .24s cubic-bezier(.16,1,.3,1),opacity .24s,transform .24s cubic-bezier(.16,1,.3,1);position:fixed;top:10px;left:50%;overflow:hidden;transform:translate(-50%)translateY(-10px);box-shadow:0 4px 20px rgba(0,0,0,.5),0 0 0 1px rgba(204,156,66,.08);box-shadow:0 4px 20px color(display-p3 0 0 0/.5),0 0 0 1px color(display-p3 .76996 .617341 .321369/.08);box-shadow:0 4px 20px lab(0% 0 0/.5),0 0 0 1px lab(67.5798% 11.9379 52.333/.08)}.chart-status.visible{opacity:1;max-height:44px;transform:translate(-50%)translateY(0)}.vedic-popup{background:var(--surface-2);border:1px solid var(--border-strong);z-index:1000;opacity:0;pointer-events:none;border-radius:12px;width:min(320px,92vw);padding:14px 16px 12px;transition:opacity .2s cubic-bezier(.16,1,.3,1);position:fixed;box-shadow:0 12px 48px rgba(0,0,0,.7),0 0 0 1px rgba(204,156,66,.15);box-shadow:0 12px 48px color(display-p3 0 0 0/.7),0 0 0 1px color(display-p3 .76996 .617341 .321369/.15);box-shadow:0 12px 48px lab(0% 0 0/.7),0 0 0 1px lab(67.5798% 11.9379 52.333/.15)}.vedic-popup.visible{opacity:1;pointer-events:all}.vedic-popup-header{align-items:flex-start;gap:10px;display:flex}.vedic-popup-title{color:var(--text);flex:1;font-size:13px;font-weight:700}.vedic-popup-sub{color:var(--text-secondary);margin-top:2px;font-size:11px;font-weight:400}.vedic-popup-close{cursor:pointer;color:var(--muted);background:0 0;border:none;border-radius:4px;flex-shrink:0;padding:2px 4px;font-size:15px;line-height:1;transition:color .12s}.vedic-popup-close:hover{color:var(--text)}.ask-claude-btn{border-radius:var(--radius-sm);width:100%;color:var(--gold);font:inherit;letter-spacing:.04em;cursor:pointer;background:rgba(204,156,66,.12);background:color(display-p3 .76996 .617341 .321369/.12);background:lab(67.5798% 11.9379 52.333/.12);border:1px solid rgba(204,156,66,.4);border:1px solid color(display-p3 .76996 .617341 .321369/.4);border:1px solid lab(67.5798% 11.9379 52.333/.4);justify-content:center;align-items:center;gap:6px;margin-top:12px;padding:9px 16px;font-size:12px;font-weight:600;transition:background .16s,border-color .16s,box-shadow .16s;display:flex}.ask-claude-btn:hover:not(:disabled){background:rgba(204,156,66,.2);background:color(display-p3 .76996 .617341 .321369/.2);background:lab(67.5798% 11.9379 52.333/.2);border-color:rgba(204,156,66,.65);border-color:color(display-p3 .76996 .617341 .321369/.65);border-color:lab(67.5798% 11.9379 52.333/.65);box-shadow:0 0 0 3px rgba(204,156,66,.12);box-shadow:0 0 0 3px color(display-p3 .76996 .617341 .321369/.12);box-shadow:0 0 0 3px lab(67.5798% 11.9379 52.333/.12)}.ask-claude-btn:disabled{opacity:.45;cursor:not-allowed}.ask-claude-btn.sending{opacity:.8;cursor:wait;pointer-events:none}.ask-claude-btn.sent{color:var(--success);pointer-events:none;background:rgba(29,168,113,.15);background:color(display-p3 .313719 .651039 .459895/.15);background:lab(61.2436% -46.7762 18.3644/.15);border-color:rgba(29,168,113,.5);border-color:color(display-p3 .313719 .651039 .459895/.5);border-color:lab(61.2436% -46.7762 18.3644/.5)}.ask-claude-btn.error{color:var(--error);background:rgba(197,52,67,.15);background:color(display-p3 .710345 .252818 .279408/.15);background:lab(45.8893% 57.7361 27.393/.15);border-color:rgba(197,52,67,.5);border-color:color(display-p3 .710345 .252818 .279408/.5);border-color:lab(45.8893% 57.7361 27.393/.5)}.vedic-action-bar{flex-wrap:wrap;gap:8px;padding:10px 16px 6px;display:flex}.action-btn{color:var(--gold);letter-spacing:.02em;cursor:pointer;white-space:nowrap;background:rgba(204,156,66,.08);background:color(display-p3 .76996 .617341 .321369/.08);background:lab(67.5798% 11.9379 52.333/.08);border:1px solid rgba(204,156,66,.3);border:1px solid color(display-p3 .76996 .617341 .321369/.3);border:1px solid lab(67.5798% 11.9379 52.333/.3);border-radius:8px;align-items:center;gap:6px;padding:7px 16px;font-size:12px;font-weight:600;transition:background .2s,border-color .2s,transform .1s;display:inline-flex}.action-btn:hover{background:rgba(204,156,66,.15);background:color(display-p3 .76996 .617341 .321369/.15);background:lab(67.5798% 11.9379 52.333/.15);border-color:rgba(204,156,66,.5);border-color:color(display-p3 .76996 .617341 .321369/.5);border-color:lab(67.5798% 11.9379 52.333/.5);transform:translateY(-1px)}.action-btn:active{background:rgba(204,156,66,.2);background:color(display-p3 .76996 .617341 .321369/.2);background:lab(67.5798% 11.9379 52.333/.2);transform:translateY(0)}.action-btn--primary{background:linear-gradient(135deg,rgba(204,156,66,.2),rgba(166,117,55,.25));background:linear-gradient(135deg,color(display-p3 .76996 .617341 .321369/.2),color(display-p3 .622862 .466276 .257278/.25));background:linear-gradient(135deg,lab(67.5798% 11.9379 52.333/.2),lab(53.4364% 15.3976 41.3855/.25));border-color:rgba(204,156,66,.5);border-color:color(display-p3 .76996 .617341 .321369/.5);border-color:lab(67.5798% 11.9379 52.333/.5)}.action-btn--primary:hover{background:linear-gradient(135deg,rgba(204,156,66,.3),rgba(166,117,55,.35));background:linear-gradient(135deg,color(display-p3 .76996 .617341 .321369/.3),color(display-p3 .622862 .466276 .257278/.35));background:linear-gradient(135deg,lab(67.5798% 11.9379 52.333/.3),lab(53.4364% 15.3976 41.3855/.35))}.tooltip{-webkit-backdrop-filter:blur(14px)saturate(1.6);backdrop-filter:blur(14px)saturate(1.6);border:1px solid var(--border-strong);border-radius:var(--radius);pointer-events:none;z-index:1000;opacity:0;background:rgba(7,9,14,.92);background:color(display-p3 .0286832 .0352525 .0537785/.92);background:lab(2.44746% .00379235 -2.33402/.92);max-width:220px;padding:8px 12px;font-size:12px;transition:opacity .12s;position:fixed;box-shadow:0 8px 32px rgba(0,0,0,.55);box-shadow:0 8px 32px color(display-p3 0 0 0/.55);box-shadow:0 8px 32px lab(0% 0 0/.55)}.tooltip.visible{opacity:1}.tooltip-title{color:var(--text);margin-bottom:2px;font-weight:700}.tooltip-detail{color:var(--text-secondary);line-height:1.4}.tooltip-hint{color:var(--gold-dim);letter-spacing:.03em;margin-top:4px;font-size:10px}.pan-zoom-controls{z-index:800;flex-direction:column;gap:6px;display:flex;position:absolute;bottom:12px;right:12px}.pan-zoom-controls[hidden]{display:none!important}.pan-btn{background:var(--surface-2);border:1px solid var(--border-strong);color:var(--text);border-radius:var(--radius-sm);cursor:pointer;width:36px;height:36px;box-shadow:var(--oe-shadow-md);justify-content:center;align-items:center;font-family:inherit;font-size:18px;transition:all .15s;display:flex}.pan-btn.reset{width:auto;padding:0 10px;font-size:11px;font-weight:500}.pan-btn:hover{background:var(--surface);border-color:var(--gold-dim);color:var(--gold)}.pan-btn:active{transform:scale(.95)}.pan-btn--fullscreen{width:36px;height:36px}@media (max-width:480px){.pan-zoom-controls{gap:5px}.pan-btn,.pan-btn--fullscreen{background:color-mix(in oklab, var(--surface-2) 72%, transparent);-webkit-backdrop-filter:blur(6px);width:32px;height:32px;font-size:15px}.pan-btn.reset{width:32px;padding:0;font-size:0}.pan-btn.reset:before{content:"⟲";font-size:15px}}.cancel-toast{background:var(--surface-2);border:1px solid var(--border-strong);color:var(--text-secondary);border-radius:var(--radius-sm);opacity:0;z-index:9999;pointer-events:none;box-shadow:var(--oe-shadow-md);padding:8px 16px;font-size:12px;transition:opacity .3s,transform .3s;position:fixed;bottom:20px;left:50%;transform:translate(-50%)translateY(20px)}.cancel-toast.visible{opacity:1;transform:translate(-50%)translateY(0)}:root[data-theme=light] .chart-status,:root[data-theme=light] .tooltip{background:rgba(251,252,254,.92);background:color(display-p3 .98376 .986943 .994535/.92);background:lab(98.8273% -.0742674 -1.13657/.92)}:root[data-theme=light] .vedic-popup{background:var(--surface);border-color:var(--border-strong)}:root[data-theme=light] #info-panel{background:var(--surface);border-color:var(--border)}
|
|
14
14
|
/*$vite$:1*/</style>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<p>Casting your Jyotish chart…</p>
|
|
21
21
|
</div>
|
|
22
22
|
<div id="chart-status" class="chart-status" aria-live="polite"></div>
|
|
23
|
-
<div id="vedic-container" hidden>
|
|
23
|
+
<div id="vedic-container" class="oe-stage" hidden>
|
|
24
24
|
<div id="pan-zoom-controls" class="pan-zoom-controls" hidden>
|
|
25
25
|
<button id="btn-zoom-in" class="pan-btn" aria-label="Zoom in">+</button>
|
|
26
26
|
<button id="btn-zoom-out" class="pan-btn" aria-label="Zoom out">-</button>
|
|
@@ -126,7 +126,7 @@ var l = /* @__PURE__ */ Symbol("zod_brand"), u = class extends Error {
|
|
|
126
126
|
function p(e4) {
|
|
127
127
|
return e4 && Object.assign(f, e4), f;
|
|
128
128
|
}
|
|
129
|
-
var ee = t({ BIGINT_FORMAT_RANGES: () => je, Class: () => $e, NUMBER_FORMAT_RANGES: () => Ae, aborted: () => ze, allowsEval: () => ye, assert: () => re, assertEqual: () => te, assertIs: () => h, assertNever: () => ne, assertNotEqual: () => m, assignProp: () => le, base64ToUint8Array: () => qe, base64urlToUint8Array: () => Ye, cached: () => ie, captureStackTrace: () => _e, cleanEnum: () => Ke, cleanRegex: () => oe, clone: () => De, cloneDef: () => de, createTransparentProxy: () => Oe, defineLazy: () => b, esc: () => he, escapeRegex: () => Ee, extend: () => Pe, finalizeIssue: () => He, floatSafeRemainder: () =>
|
|
129
|
+
var ee = t({ BIGINT_FORMAT_RANGES: () => je, Class: () => $e, NUMBER_FORMAT_RANGES: () => Ae, aborted: () => ze, allowsEval: () => ye, assert: () => re, assertEqual: () => te, assertIs: () => h, assertNever: () => ne, assertNotEqual: () => m, assignProp: () => le, base64ToUint8Array: () => qe, base64urlToUint8Array: () => Ye, cached: () => ie, captureStackTrace: () => _e, cleanEnum: () => Ke, cleanRegex: () => oe, clone: () => De, cloneDef: () => de, createTransparentProxy: () => Oe, defineLazy: () => b, esc: () => he, escapeRegex: () => Ee, extend: () => Pe, finalizeIssue: () => He, floatSafeRemainder: () => se, getElementAtPath: () => fe, getEnumValues: () => g, getLengthableOrigin: () => We, getParsedType: () => Ce, getSizableOrigin: () => Ue, hexToUint8Array: () => Ze, isObject: () => ve, isPlainObject: () => be, issue: () => Ge, joinValues: () => _, jsonStringifyReplacer: () => v, merge: () => Ie, mergeDefs: () => ue, normalizeParams: () => x, nullish: () => ae, numKeys: () => Se, objectClone: () => ce, omit: () => Ne, optionalKeys: () => ke, parsedType: () => C, partial: () => Le, pick: () => Me, prefixIssues: () => Be, primitiveTypes: () => Te, promiseAllObject: () => pe, propertyKeyTypes: () => we, randomString: () => me, required: () => Re, safeExtend: () => Fe, shallowClone: () => xe, slugify: () => ge, stringifyPrimitive: () => S, uint8ArrayToBase64: () => Je, uint8ArrayToBase64url: () => Xe, uint8ArrayToHex: () => Qe, unwrapMessage: () => Ve });
|
|
130
130
|
function te(e4) {
|
|
131
131
|
return e4;
|
|
132
132
|
}
|
|
@@ -166,7 +166,7 @@ function oe(e4) {
|
|
|
166
166
|
let t2 = +!!e4.startsWith("^"), n2 = e4.endsWith("$") ? e4.length - 1 : e4.length;
|
|
167
167
|
return e4.slice(t2, n2);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function se(e4, t2) {
|
|
170
170
|
let n2 = (e4.toString().split(".")[1] || "").length, r2 = t2.toString(), i2 = (r2.split(".")[1] || "").length;
|
|
171
171
|
if (i2 === 0 && /\d?e-\d?/.test(r2)) {
|
|
172
172
|
let e5 = r2.match(/\d?e-(\d?)/);
|
|
@@ -175,11 +175,11 @@ function y(e4, t2) {
|
|
|
175
175
|
let a2 = n2 > i2 ? n2 : i2;
|
|
176
176
|
return Number.parseInt(e4.toFixed(a2).replace(".", "")) % Number.parseInt(t2.toFixed(a2).replace(".", "")) / 10 ** a2;
|
|
177
177
|
}
|
|
178
|
-
var
|
|
178
|
+
var y = /* @__PURE__ */ Symbol("evaluating");
|
|
179
179
|
function b(e4, t2, n2) {
|
|
180
180
|
let r2;
|
|
181
181
|
Object.defineProperty(e4, t2, { get() {
|
|
182
|
-
if (r2 !==
|
|
182
|
+
if (r2 !== y) return r2 === void 0 && (r2 = y, r2 = n2()), r2;
|
|
183
183
|
}, set(n3) {
|
|
184
184
|
Object.defineProperty(e4, t2, { value: n3 });
|
|
185
185
|
}, configurable: true });
|
|
@@ -630,7 +630,7 @@ var On = /^[0-9a-fA-F]{32}$/, kn = En(22, "=="), An = Dn(22), jn = /^[0-9a-fA-F]
|
|
|
630
630
|
(n2 = e5._zod.bag).multipleOf != null || (n2.multipleOf = t2.value);
|
|
631
631
|
}), e4._zod.check = (n2) => {
|
|
632
632
|
if (typeof n2.value != typeof t2.value) throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
633
|
-
(typeof n2.value == "bigint" ? n2.value % t2.value === BigInt(0) :
|
|
633
|
+
(typeof n2.value == "bigint" ? n2.value % t2.value === BigInt(0) : se(n2.value, t2.value) === 0) || n2.issues.push({ origin: typeof n2.value, code: "not_multiple_of", divisor: t2.value, input: n2.value, inst: e4, continue: !t2.abort });
|
|
634
634
|
};
|
|
635
635
|
}), qn = c("$ZodCheckNumberFormat", (e4, t2) => {
|
|
636
636
|
var n2;
|
|
@@ -2447,22 +2447,22 @@ var Aa = () => {
|
|
|
2447
2447
|
}
|
|
2448
2448
|
if (t3.origin === "number") return "\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ".concat(n4, " \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ").concat(t3.inclusive ? "\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-".concat(t3.minimum) : "\u05D2\u05D3\u05D5\u05DC \u05DE-".concat(t3.minimum));
|
|
2449
2449
|
if (t3.origin === "array" || t3.origin === "set") {
|
|
2450
|
-
var oe2,
|
|
2450
|
+
var oe2, se2;
|
|
2451
2451
|
let r4 = t3.origin === "set" ? "\u05E6\u05E8\u05D9\u05DB\u05D4" : "\u05E6\u05E8\u05D9\u05DA";
|
|
2452
|
-
return t3.minimum === 1 && t3.inclusive ? "\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ".concat(n4, " ").concat(r4, " \u05DC\u05D4\u05DB\u05D9\u05DC ").concat((t3.origin, "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3")) : "\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ".concat(n4, " ").concat(r4, " \u05DC\u05D4\u05DB\u05D9\u05DC ").concat(t3.inclusive ? "".concat(t3.minimum, " ").concat((oe2 = e5 == null ? void 0 : e5.unit) == null ? "" : oe2, " \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8") : "\u05D9\u05D5\u05EA\u05E8 \u05DE-".concat(t3.minimum, " ").concat((
|
|
2452
|
+
return t3.minimum === 1 && t3.inclusive ? "\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ".concat(n4, " ").concat(r4, " \u05DC\u05D4\u05DB\u05D9\u05DC ").concat((t3.origin, "\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3")) : "\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ".concat(n4, " ").concat(r4, " \u05DC\u05D4\u05DB\u05D9\u05DC ").concat(t3.inclusive ? "".concat(t3.minimum, " ").concat((oe2 = e5 == null ? void 0 : e5.unit) == null ? "" : oe2, " \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8") : "\u05D9\u05D5\u05EA\u05E8 \u05DE-".concat(t3.minimum, " ").concat((se2 = e5 == null ? void 0 : e5.unit) == null ? "" : se2)).trim();
|
|
2453
2453
|
}
|
|
2454
2454
|
let r3 = t3.inclusive ? ">=" : ">", s3 = a2((g2 = t3.origin) == null ? "value" : g2);
|
|
2455
2455
|
return e5 != null && e5.unit ? "".concat(e5.shortLabel, " \u05DE\u05D3\u05D9: ").concat(n4, " ").concat(s3, " ").concat(r3).concat(t3.minimum.toString(), " ").concat(e5.unit) : "".concat((v2 = e5 == null ? void 0 : e5.shortLabel) == null ? "\u05E7\u05D8\u05DF" : v2, " \u05DE\u05D3\u05D9: ").concat(n4, " ").concat(s3, " ").concat(r3).concat(t3.minimum.toString());
|
|
2456
2456
|
}
|
|
2457
2457
|
case "invalid_format": {
|
|
2458
|
-
var
|
|
2458
|
+
var y2, b2;
|
|
2459
2459
|
let e5 = t3;
|
|
2460
2460
|
if (e5.format === "starts_with") return '\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "'.concat(e5.prefix, '"');
|
|
2461
2461
|
if (e5.format === "ends_with") return '\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "'.concat(e5.suffix, '"');
|
|
2462
2462
|
if (e5.format === "includes") return '\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "'.concat(e5.includes, '"');
|
|
2463
2463
|
if (e5.format === "regex") return "\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ".concat(e5.pattern);
|
|
2464
2464
|
let n4 = s2[e5.format];
|
|
2465
|
-
return "".concat((
|
|
2465
|
+
return "".concat((y2 = n4 == null ? void 0 : n4.label) == null ? e5.format : y2, " \u05DC\u05D0 ").concat(((b2 = n4 == null ? void 0 : n4.gender) == null ? "m" : b2) === "f" ? "\u05EA\u05E7\u05D9\u05E0\u05D4" : "\u05EA\u05E7\u05D9\u05DF");
|
|
2466
2466
|
}
|
|
2467
2467
|
case "not_multiple_of":
|
|
2468
2468
|
return "\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ".concat(t3.divisor);
|
|
@@ -4249,177 +4249,177 @@ function Qs(e4, t2) {
|
|
|
4249
4249
|
function $s(e4, t2) {
|
|
4250
4250
|
return new Wn({ check: "less_than", ...x(t2), value: e4, inclusive: false });
|
|
4251
4251
|
}
|
|
4252
|
-
function
|
|
4252
|
+
function ec(e4, t2) {
|
|
4253
4253
|
return new Wn({ check: "less_than", ...x(t2), value: e4, inclusive: true });
|
|
4254
4254
|
}
|
|
4255
|
-
function
|
|
4255
|
+
function tc(e4, t2) {
|
|
4256
4256
|
return new Gn({ check: "greater_than", ...x(t2), value: e4, inclusive: false });
|
|
4257
4257
|
}
|
|
4258
|
-
function
|
|
4258
|
+
function O(e4, t2) {
|
|
4259
4259
|
return new Gn({ check: "greater_than", ...x(t2), value: e4, inclusive: true });
|
|
4260
4260
|
}
|
|
4261
|
-
function tc(e4) {
|
|
4262
|
-
return ec(0, e4);
|
|
4263
|
-
}
|
|
4264
4261
|
function nc(e4) {
|
|
4265
|
-
return
|
|
4262
|
+
return tc(0, e4);
|
|
4266
4263
|
}
|
|
4267
4264
|
function rc(e4) {
|
|
4268
|
-
return
|
|
4265
|
+
return $s(0, e4);
|
|
4269
4266
|
}
|
|
4270
4267
|
function ic(e4) {
|
|
4271
|
-
return
|
|
4268
|
+
return ec(0, e4);
|
|
4272
4269
|
}
|
|
4273
|
-
function ac(e4
|
|
4274
|
-
return
|
|
4270
|
+
function ac(e4) {
|
|
4271
|
+
return O(0, e4);
|
|
4275
4272
|
}
|
|
4276
4273
|
function oc(e4, t2) {
|
|
4277
|
-
return new
|
|
4274
|
+
return new Kn({ check: "multiple_of", ...x(t2), value: e4 });
|
|
4278
4275
|
}
|
|
4279
4276
|
function sc(e4, t2) {
|
|
4280
|
-
return new
|
|
4277
|
+
return new Yn({ check: "max_size", ...x(t2), maximum: e4 });
|
|
4281
4278
|
}
|
|
4282
4279
|
function cc(e4, t2) {
|
|
4283
|
-
return new
|
|
4280
|
+
return new Xn({ check: "min_size", ...x(t2), minimum: e4 });
|
|
4284
4281
|
}
|
|
4285
4282
|
function lc(e4, t2) {
|
|
4286
|
-
return new
|
|
4283
|
+
return new Zn({ check: "size_equals", ...x(t2), size: e4 });
|
|
4287
4284
|
}
|
|
4288
4285
|
function uc(e4, t2) {
|
|
4289
|
-
return new
|
|
4286
|
+
return new Qn({ check: "max_length", ...x(t2), maximum: e4 });
|
|
4290
4287
|
}
|
|
4291
4288
|
function dc(e4, t2) {
|
|
4292
|
-
return new
|
|
4289
|
+
return new $n({ check: "min_length", ...x(t2), minimum: e4 });
|
|
4293
4290
|
}
|
|
4294
4291
|
function fc(e4, t2) {
|
|
4292
|
+
return new er({ check: "length_equals", ...x(t2), length: e4 });
|
|
4293
|
+
}
|
|
4294
|
+
function pc(e4, t2) {
|
|
4295
4295
|
return new nr({ check: "string_format", format: "regex", ...x(t2), pattern: e4 });
|
|
4296
4296
|
}
|
|
4297
|
-
function
|
|
4297
|
+
function mc(e4) {
|
|
4298
4298
|
return new rr({ check: "string_format", format: "lowercase", ...x(e4) });
|
|
4299
4299
|
}
|
|
4300
|
-
function
|
|
4300
|
+
function hc(e4) {
|
|
4301
4301
|
return new ir({ check: "string_format", format: "uppercase", ...x(e4) });
|
|
4302
4302
|
}
|
|
4303
|
-
function
|
|
4303
|
+
function gc(e4, t2) {
|
|
4304
4304
|
return new ar({ check: "string_format", format: "includes", ...x(t2), includes: e4 });
|
|
4305
4305
|
}
|
|
4306
|
-
function
|
|
4306
|
+
function _c(e4, t2) {
|
|
4307
4307
|
return new or({ check: "string_format", format: "starts_with", ...x(t2), prefix: e4 });
|
|
4308
4308
|
}
|
|
4309
|
-
function
|
|
4309
|
+
function vc(e4, t2) {
|
|
4310
4310
|
return new sr({ check: "string_format", format: "ends_with", ...x(t2), suffix: e4 });
|
|
4311
4311
|
}
|
|
4312
|
-
function
|
|
4312
|
+
function yc(e4, t2, n2) {
|
|
4313
4313
|
return new lr({ check: "property", property: e4, schema: t2, ...x(n2) });
|
|
4314
4314
|
}
|
|
4315
|
-
function
|
|
4315
|
+
function bc(e4, t2) {
|
|
4316
4316
|
return new ur({ check: "mime_type", mime: e4, ...x(t2) });
|
|
4317
4317
|
}
|
|
4318
|
-
function bc(e4) {
|
|
4319
|
-
return new dr({ check: "overwrite", tx: e4 });
|
|
4320
|
-
}
|
|
4321
4318
|
function xc(e4) {
|
|
4322
|
-
return
|
|
4319
|
+
return new dr({ check: "overwrite", tx: e4 });
|
|
4323
4320
|
}
|
|
4324
|
-
function Sc() {
|
|
4325
|
-
return
|
|
4321
|
+
function Sc(e4) {
|
|
4322
|
+
return xc((t2) => t2.normalize(e4));
|
|
4326
4323
|
}
|
|
4327
4324
|
function Cc() {
|
|
4328
|
-
return
|
|
4325
|
+
return xc((e4) => e4.trim());
|
|
4329
4326
|
}
|
|
4330
4327
|
function wc() {
|
|
4331
|
-
return
|
|
4328
|
+
return xc((e4) => e4.toLowerCase());
|
|
4332
4329
|
}
|
|
4333
4330
|
function Tc() {
|
|
4334
|
-
return
|
|
4331
|
+
return xc((e4) => e4.toUpperCase());
|
|
4335
4332
|
}
|
|
4336
|
-
function Ec(
|
|
4337
|
-
return
|
|
4333
|
+
function Ec() {
|
|
4334
|
+
return xc((e4) => ge(e4));
|
|
4338
4335
|
}
|
|
4339
4336
|
function Dc(e4, t2, n2) {
|
|
4340
|
-
return new e4({ type: "
|
|
4337
|
+
return new e4({ type: "array", element: t2, ...x(n2) });
|
|
4341
4338
|
}
|
|
4342
4339
|
function Oc(e4, t2, n2) {
|
|
4340
|
+
return new e4({ type: "union", options: t2, ...x(n2) });
|
|
4341
|
+
}
|
|
4342
|
+
function kc(e4, t2, n2) {
|
|
4343
4343
|
return new e4({ type: "union", options: t2, inclusive: false, ...x(n2) });
|
|
4344
4344
|
}
|
|
4345
|
-
function
|
|
4345
|
+
function Ac(e4, t2, n2, r2) {
|
|
4346
4346
|
return new e4({ type: "union", options: n2, discriminator: t2, ...x(r2) });
|
|
4347
4347
|
}
|
|
4348
|
-
function
|
|
4348
|
+
function jc(e4, t2, n2) {
|
|
4349
4349
|
return new e4({ type: "intersection", left: t2, right: n2 });
|
|
4350
4350
|
}
|
|
4351
|
-
function
|
|
4351
|
+
function Mc(e4, t2, n2, r2) {
|
|
4352
4352
|
let i2 = n2 instanceof T;
|
|
4353
4353
|
return new e4({ type: "tuple", items: t2, rest: i2 ? n2 : null, ...x(i2 ? r2 : n2) });
|
|
4354
4354
|
}
|
|
4355
|
-
function
|
|
4355
|
+
function Nc(e4, t2, n2, r2) {
|
|
4356
4356
|
return new e4({ type: "record", keyType: t2, valueType: n2, ...x(r2) });
|
|
4357
4357
|
}
|
|
4358
|
-
function
|
|
4358
|
+
function Pc(e4, t2, n2, r2) {
|
|
4359
4359
|
return new e4({ type: "map", keyType: t2, valueType: n2, ...x(r2) });
|
|
4360
4360
|
}
|
|
4361
|
-
function
|
|
4361
|
+
function Fc(e4, t2, n2) {
|
|
4362
4362
|
return new e4({ type: "set", valueType: t2, ...x(n2) });
|
|
4363
4363
|
}
|
|
4364
|
-
function
|
|
4364
|
+
function Ic(e4, t2, n2) {
|
|
4365
4365
|
return new e4({ type: "enum", entries: Array.isArray(t2) ? Object.fromEntries(t2.map((e5) => [e5, e5])) : t2, ...x(n2) });
|
|
4366
4366
|
}
|
|
4367
|
-
function
|
|
4367
|
+
function Lc(e4, t2, n2) {
|
|
4368
4368
|
return new e4({ type: "enum", entries: t2, ...x(n2) });
|
|
4369
4369
|
}
|
|
4370
|
-
function
|
|
4370
|
+
function Rc(e4, t2, n2) {
|
|
4371
4371
|
return new e4({ type: "literal", values: Array.isArray(t2) ? t2 : [t2], ...x(n2) });
|
|
4372
4372
|
}
|
|
4373
|
-
function
|
|
4373
|
+
function zc(e4, t2) {
|
|
4374
4374
|
return new e4({ type: "file", ...x(t2) });
|
|
4375
4375
|
}
|
|
4376
|
-
function
|
|
4376
|
+
function Bc(e4, t2) {
|
|
4377
4377
|
return new e4({ type: "transform", transform: t2 });
|
|
4378
4378
|
}
|
|
4379
|
-
function
|
|
4379
|
+
function Vc(e4, t2) {
|
|
4380
4380
|
return new e4({ type: "optional", innerType: t2 });
|
|
4381
4381
|
}
|
|
4382
|
-
function
|
|
4382
|
+
function Hc(e4, t2) {
|
|
4383
4383
|
return new e4({ type: "nullable", innerType: t2 });
|
|
4384
4384
|
}
|
|
4385
|
-
function
|
|
4385
|
+
function Uc(e4, t2, n2) {
|
|
4386
4386
|
return new e4({ type: "default", innerType: t2, get defaultValue() {
|
|
4387
4387
|
return typeof n2 == "function" ? n2() : xe(n2);
|
|
4388
4388
|
} });
|
|
4389
4389
|
}
|
|
4390
|
-
function
|
|
4390
|
+
function Wc(e4, t2, n2) {
|
|
4391
4391
|
return new e4({ type: "nonoptional", innerType: t2, ...x(n2) });
|
|
4392
4392
|
}
|
|
4393
|
-
function
|
|
4393
|
+
function Gc(e4, t2) {
|
|
4394
4394
|
return new e4({ type: "success", innerType: t2 });
|
|
4395
4395
|
}
|
|
4396
|
-
function
|
|
4396
|
+
function Kc(e4, t2, n2) {
|
|
4397
4397
|
return new e4({ type: "catch", innerType: t2, catchValue: typeof n2 == "function" ? n2 : () => n2 });
|
|
4398
4398
|
}
|
|
4399
|
-
function
|
|
4399
|
+
function qc(e4, t2, n2) {
|
|
4400
4400
|
return new e4({ type: "pipe", in: t2, out: n2 });
|
|
4401
4401
|
}
|
|
4402
|
-
function
|
|
4402
|
+
function Jc(e4, t2) {
|
|
4403
4403
|
return new e4({ type: "readonly", innerType: t2 });
|
|
4404
4404
|
}
|
|
4405
|
-
function
|
|
4405
|
+
function Yc(e4, t2, n2) {
|
|
4406
4406
|
return new e4({ type: "template_literal", parts: t2, ...x(n2) });
|
|
4407
4407
|
}
|
|
4408
|
-
function
|
|
4408
|
+
function Xc(e4, t2) {
|
|
4409
4409
|
return new e4({ type: "lazy", getter: t2 });
|
|
4410
4410
|
}
|
|
4411
|
-
function
|
|
4411
|
+
function Zc(e4, t2) {
|
|
4412
4412
|
return new e4({ type: "promise", innerType: t2 });
|
|
4413
4413
|
}
|
|
4414
|
-
function
|
|
4414
|
+
function Qc(e4, t2, n2) {
|
|
4415
4415
|
let r2 = x(n2);
|
|
4416
4416
|
return r2.abort != null || (r2.abort = true), new e4({ type: "custom", check: "custom", fn: t2, ...r2 });
|
|
4417
4417
|
}
|
|
4418
|
-
function
|
|
4418
|
+
function $c(e4, t2, n2) {
|
|
4419
4419
|
return new e4({ type: "custom", check: "custom", fn: t2, ...x(n2) });
|
|
4420
4420
|
}
|
|
4421
|
-
function
|
|
4422
|
-
let t2 =
|
|
4421
|
+
function el(e4) {
|
|
4422
|
+
let t2 = tl((n2) => (n2.addIssue = (e5) => {
|
|
4423
4423
|
if (typeof e5 == "string") n2.issues.push(Ge(e5, n2.value, t2._zod.def));
|
|
4424
4424
|
else {
|
|
4425
4425
|
let r2 = e5;
|
|
@@ -4428,11 +4428,11 @@ function $c(e4) {
|
|
|
4428
4428
|
}, e4(n2.value, n2)));
|
|
4429
4429
|
return t2;
|
|
4430
4430
|
}
|
|
4431
|
-
function
|
|
4431
|
+
function tl(e4, t2) {
|
|
4432
4432
|
let n2 = new w({ check: "custom", ...x(t2) });
|
|
4433
4433
|
return n2._zod.check = e4, n2;
|
|
4434
4434
|
}
|
|
4435
|
-
function
|
|
4435
|
+
function nl(e4) {
|
|
4436
4436
|
let t2 = new w({ check: "describe" });
|
|
4437
4437
|
return t2._zod.onattach = [(t3) => {
|
|
4438
4438
|
var n2;
|
|
@@ -4441,7 +4441,7 @@ function tl(e4) {
|
|
|
4441
4441
|
}], t2._zod.check = () => {
|
|
4442
4442
|
}, t2;
|
|
4443
4443
|
}
|
|
4444
|
-
function
|
|
4444
|
+
function rl(e4) {
|
|
4445
4445
|
let t2 = new w({ check: "meta" });
|
|
4446
4446
|
return t2._zod.onattach = [(t3) => {
|
|
4447
4447
|
var n2;
|
|
@@ -4450,7 +4450,7 @@ function nl(e4) {
|
|
|
4450
4450
|
}], t2._zod.check = () => {
|
|
4451
4451
|
}, t2;
|
|
4452
4452
|
}
|
|
4453
|
-
function
|
|
4453
|
+
function il(e4, t2) {
|
|
4454
4454
|
var n2, r2, i2, a2, o2;
|
|
4455
4455
|
let s2 = x(t2), c2 = (n2 = s2.truthy) == null ? ["true", "1", "yes", "on", "y", "enabled"] : n2, l2 = (r2 = s2.falsy) == null ? ["false", "0", "no", "off", "n", "disabled"] : r2;
|
|
4456
4456
|
s2.case !== "sensitive" && (c2 = c2.map((e5) => typeof e5 == "string" ? e5.toLowerCase() : e5), l2 = l2.map((e5) => typeof e5 == "string" ? e5.toLowerCase() : e5));
|
|
@@ -4460,17 +4460,17 @@ function rl(e4, t2) {
|
|
|
4460
4460
|
}), reverseTransform: ((e5, t3) => e5 === true ? c2[0] || "true" : l2[0] || "false"), error: s2.error });
|
|
4461
4461
|
return ee2;
|
|
4462
4462
|
}
|
|
4463
|
-
function
|
|
4463
|
+
function al(e4, t2, n2, r2 = {}) {
|
|
4464
4464
|
let i2 = x(r2), a2 = { ...x(r2), check: "string_format", type: "string", format: t2, fn: typeof n2 == "function" ? n2 : (e5) => n2.test(e5), ...i2 };
|
|
4465
4465
|
return n2 instanceof RegExp && (a2.pattern = n2), new e4(a2);
|
|
4466
4466
|
}
|
|
4467
|
-
function
|
|
4467
|
+
function ol(e4) {
|
|
4468
4468
|
var t2, n2, r2, i2, a2, o2, s2, c2, l2;
|
|
4469
4469
|
let u2 = (t2 = e4 == null ? void 0 : e4.target) == null ? "draft-2020-12" : t2;
|
|
4470
4470
|
return u2 === "draft-4" && (u2 = "draft-04"), u2 === "draft-7" && (u2 = "draft-07"), { processors: (n2 = e4.processors) == null ? {} : n2, metadataRegistry: (r2 = e4 == null ? void 0 : e4.metadata) == null ? D : r2, target: u2, unrepresentable: (i2 = e4 == null ? void 0 : e4.unrepresentable) == null ? "throw" : i2, override: (a2 = e4 == null ? void 0 : e4.override) == null ? (() => {
|
|
4471
4471
|
}) : a2, io: (o2 = e4 == null ? void 0 : e4.io) == null ? "output" : o2, counter: 0, seen: /* @__PURE__ */ new Map(), cycles: (s2 = e4 == null ? void 0 : e4.cycles) == null ? "ref" : s2, reused: (c2 = e4 == null ? void 0 : e4.reused) == null ? "inline" : c2, external: (l2 = e4 == null ? void 0 : e4.external) == null ? void 0 : l2 };
|
|
4472
4472
|
}
|
|
4473
|
-
function
|
|
4473
|
+
function k(e4, t2, n2 = { path: [], schemaPath: [] }) {
|
|
4474
4474
|
var r2, i2, a2;
|
|
4475
4475
|
let o2 = e4._zod.def, s2 = t2.seen.get(e4);
|
|
4476
4476
|
if (s2) return s2.count++, n2.schemaPath.includes(e4) && (s2.cycle = n2.path), s2.schema;
|
|
@@ -4487,12 +4487,12 @@ function A(e4, t2, n2 = { path: [], schemaPath: [] }) {
|
|
|
4487
4487
|
i4(e4, t2, n3, r3);
|
|
4488
4488
|
}
|
|
4489
4489
|
let i3 = e4._zod.parent;
|
|
4490
|
-
i3 && (c2.ref || (c2.ref = i3),
|
|
4490
|
+
i3 && (c2.ref || (c2.ref = i3), k(i3, t2, r3), t2.seen.get(i3).isParent = true);
|
|
4491
4491
|
}
|
|
4492
4492
|
let u2 = t2.metadataRegistry.get(e4);
|
|
4493
|
-
return u2 && Object.assign(c2.schema, u2), t2.io === "input" &&
|
|
4493
|
+
return u2 && Object.assign(c2.schema, u2), t2.io === "input" && A(e4) && (delete c2.schema.examples, delete c2.schema.default), t2.io === "input" && c2.schema._prefault && ((a2 = c2.schema).default != null || (a2.default = c2.schema._prefault)), delete c2.schema._prefault, t2.seen.get(e4).schema;
|
|
4494
4494
|
}
|
|
4495
|
-
function
|
|
4495
|
+
function sl(e4, t2) {
|
|
4496
4496
|
let n2 = e4.seen.get(t2);
|
|
4497
4497
|
if (!n2) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
4498
4498
|
let r2 = /* @__PURE__ */ new Map();
|
|
@@ -4562,7 +4562,7 @@ function ol(e4, t2) {
|
|
|
4562
4562
|
}
|
|
4563
4563
|
}
|
|
4564
4564
|
}
|
|
4565
|
-
function
|
|
4565
|
+
function cl(e4, t2) {
|
|
4566
4566
|
var n2, r2, i2, a2;
|
|
4567
4567
|
let o2 = e4.seen.get(t2);
|
|
4568
4568
|
if (!o2) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
@@ -4606,81 +4606,81 @@ function sl(e4, t2) {
|
|
|
4606
4606
|
e4.external || Object.keys(u2).length > 0 && (e4.target === "draft-2020-12" ? c2.$defs = u2 : c2.definitions = u2);
|
|
4607
4607
|
try {
|
|
4608
4608
|
let n3 = JSON.parse(JSON.stringify(c2));
|
|
4609
|
-
return Object.defineProperty(n3, "~standard", { value: { ...t2["~standard"], jsonSchema: { input:
|
|
4609
|
+
return Object.defineProperty(n3, "~standard", { value: { ...t2["~standard"], jsonSchema: { input: ul(t2, "input", e4.processors), output: ul(t2, "output", e4.processors) } }, enumerable: false, writable: false }), n3;
|
|
4610
4610
|
} catch (e5) {
|
|
4611
4611
|
throw Error("Error converting schema to JSON.");
|
|
4612
4612
|
}
|
|
4613
4613
|
}
|
|
4614
|
-
function
|
|
4614
|
+
function A(e4, t2) {
|
|
4615
4615
|
let n2 = t2 == null ? { seen: /* @__PURE__ */ new Set() } : t2;
|
|
4616
4616
|
if (n2.seen.has(e4)) return false;
|
|
4617
4617
|
n2.seen.add(e4);
|
|
4618
4618
|
let r2 = e4._zod.def;
|
|
4619
4619
|
if (r2.type === "transform") return true;
|
|
4620
|
-
if (r2.type === "array") return
|
|
4621
|
-
if (r2.type === "set") return
|
|
4622
|
-
if (r2.type === "lazy") return
|
|
4623
|
-
if (r2.type === "promise" || r2.type === "optional" || r2.type === "nonoptional" || r2.type === "nullable" || r2.type === "readonly" || r2.type === "default" || r2.type === "prefault") return
|
|
4624
|
-
if (r2.type === "intersection") return
|
|
4625
|
-
if (r2.type === "record" || r2.type === "map") return
|
|
4626
|
-
if (r2.type === "pipe") return
|
|
4620
|
+
if (r2.type === "array") return A(r2.element, n2);
|
|
4621
|
+
if (r2.type === "set") return A(r2.valueType, n2);
|
|
4622
|
+
if (r2.type === "lazy") return A(r2.getter(), n2);
|
|
4623
|
+
if (r2.type === "promise" || r2.type === "optional" || r2.type === "nonoptional" || r2.type === "nullable" || r2.type === "readonly" || r2.type === "default" || r2.type === "prefault") return A(r2.innerType, n2);
|
|
4624
|
+
if (r2.type === "intersection") return A(r2.left, n2) || A(r2.right, n2);
|
|
4625
|
+
if (r2.type === "record" || r2.type === "map") return A(r2.keyType, n2) || A(r2.valueType, n2);
|
|
4626
|
+
if (r2.type === "pipe") return A(r2.in, n2) || A(r2.out, n2);
|
|
4627
4627
|
if (r2.type === "object") {
|
|
4628
|
-
for (let e5 in r2.shape) if (
|
|
4628
|
+
for (let e5 in r2.shape) if (A(r2.shape[e5], n2)) return true;
|
|
4629
4629
|
return false;
|
|
4630
4630
|
}
|
|
4631
4631
|
if (r2.type === "union") {
|
|
4632
|
-
for (let e5 of r2.options) if (
|
|
4632
|
+
for (let e5 of r2.options) if (A(e5, n2)) return true;
|
|
4633
4633
|
return false;
|
|
4634
4634
|
}
|
|
4635
4635
|
if (r2.type === "tuple") {
|
|
4636
|
-
for (let e5 of r2.items) if (
|
|
4637
|
-
return !!(r2.rest &&
|
|
4636
|
+
for (let e5 of r2.items) if (A(e5, n2)) return true;
|
|
4637
|
+
return !!(r2.rest && A(r2.rest, n2));
|
|
4638
4638
|
}
|
|
4639
4639
|
return false;
|
|
4640
4640
|
}
|
|
4641
|
-
var
|
|
4642
|
-
let r2 =
|
|
4643
|
-
return
|
|
4644
|
-
},
|
|
4645
|
-
let { libraryOptions: i2, target: a2 } = r2 == null ? {} : r2, o2 =
|
|
4646
|
-
return
|
|
4647
|
-
},
|
|
4641
|
+
var ll = (e4, t2 = {}) => (n2) => {
|
|
4642
|
+
let r2 = ol({ ...n2, processors: t2 });
|
|
4643
|
+
return k(e4, r2), sl(r2, e4), cl(r2, e4);
|
|
4644
|
+
}, ul = (e4, t2, n2 = {}) => (r2) => {
|
|
4645
|
+
let { libraryOptions: i2, target: a2 } = r2 == null ? {} : r2, o2 = ol({ ...i2 == null ? {} : i2, target: a2, io: t2, processors: n2 });
|
|
4646
|
+
return k(e4, o2), sl(o2, e4), cl(o2, e4);
|
|
4647
|
+
}, dl = { guid: "uuid", url: "uri", datetime: "date-time", json_string: "json-string", regex: "" }, fl = (e4, t2, n2, r2) => {
|
|
4648
4648
|
let i2 = n2;
|
|
4649
4649
|
i2.type = "string";
|
|
4650
4650
|
let { minimum: a2, maximum: o2, format: s2, patterns: c2, contentEncoding: l2 } = e4._zod.bag;
|
|
4651
4651
|
if (typeof a2 == "number" && (i2.minLength = a2), typeof o2 == "number" && (i2.maxLength = o2), s2) {
|
|
4652
4652
|
var u2;
|
|
4653
|
-
i2.format = (u2 =
|
|
4653
|
+
i2.format = (u2 = dl[s2]) == null ? s2 : u2, i2.format === "" && delete i2.format, s2 === "time" && delete i2.format;
|
|
4654
4654
|
}
|
|
4655
4655
|
if (l2 && (i2.contentEncoding = l2), c2 && c2.size > 0) {
|
|
4656
4656
|
let e5 = [...c2];
|
|
4657
4657
|
e5.length === 1 ? i2.pattern = e5[0].source : e5.length > 1 && (i2.allOf = [...e5.map((e6) => ({ ...t2.target === "draft-07" || t2.target === "draft-04" || t2.target === "openapi-3.0" ? { type: "string" } : {}, pattern: e6.source }))]);
|
|
4658
4658
|
}
|
|
4659
|
-
},
|
|
4659
|
+
}, pl = (e4, t2, n2, r2) => {
|
|
4660
4660
|
let i2 = n2, { minimum: a2, maximum: o2, format: s2, multipleOf: c2, exclusiveMaximum: l2, exclusiveMinimum: u2 } = e4._zod.bag;
|
|
4661
4661
|
typeof s2 == "string" && s2.includes("int") ? i2.type = "integer" : i2.type = "number", typeof u2 == "number" && (t2.target === "draft-04" || t2.target === "openapi-3.0" ? (i2.minimum = u2, i2.exclusiveMinimum = true) : i2.exclusiveMinimum = u2), typeof a2 == "number" && (i2.minimum = a2, typeof u2 == "number" && t2.target !== "draft-04" && (u2 >= a2 ? delete i2.minimum : delete i2.exclusiveMinimum)), typeof l2 == "number" && (t2.target === "draft-04" || t2.target === "openapi-3.0" ? (i2.maximum = l2, i2.exclusiveMaximum = true) : i2.exclusiveMaximum = l2), typeof o2 == "number" && (i2.maximum = o2, typeof l2 == "number" && t2.target !== "draft-04" && (l2 <= o2 ? delete i2.maximum : delete i2.exclusiveMaximum)), typeof c2 == "number" && (i2.multipleOf = c2);
|
|
4662
|
-
}, pl = (e4, t2, n2, r2) => {
|
|
4663
|
-
n2.type = "boolean";
|
|
4664
4662
|
}, ml = (e4, t2, n2, r2) => {
|
|
4665
|
-
|
|
4663
|
+
n2.type = "boolean";
|
|
4666
4664
|
}, hl = (e4, t2, n2, r2) => {
|
|
4667
|
-
if (t2.unrepresentable === "throw") throw Error("
|
|
4665
|
+
if (t2.unrepresentable === "throw") throw Error("BigInt cannot be represented in JSON Schema");
|
|
4668
4666
|
}, gl = (e4, t2, n2, r2) => {
|
|
4669
|
-
t2.
|
|
4667
|
+
if (t2.unrepresentable === "throw") throw Error("Symbols cannot be represented in JSON Schema");
|
|
4670
4668
|
}, _l = (e4, t2, n2, r2) => {
|
|
4671
|
-
|
|
4669
|
+
t2.target === "openapi-3.0" ? (n2.type = "string", n2.nullable = true, n2.enum = [null]) : n2.type = "null";
|
|
4672
4670
|
}, vl = (e4, t2, n2, r2) => {
|
|
4673
|
-
if (t2.unrepresentable === "throw") throw Error("
|
|
4671
|
+
if (t2.unrepresentable === "throw") throw Error("Undefined cannot be represented in JSON Schema");
|
|
4674
4672
|
}, yl = (e4, t2, n2, r2) => {
|
|
4675
|
-
|
|
4673
|
+
if (t2.unrepresentable === "throw") throw Error("Void cannot be represented in JSON Schema");
|
|
4676
4674
|
}, bl = (e4, t2, n2, r2) => {
|
|
4675
|
+
n2.not = {};
|
|
4677
4676
|
}, xl = (e4, t2, n2, r2) => {
|
|
4678
4677
|
}, Sl = (e4, t2, n2, r2) => {
|
|
4679
|
-
if (t2.unrepresentable === "throw") throw Error("Date cannot be represented in JSON Schema");
|
|
4680
4678
|
}, Cl = (e4, t2, n2, r2) => {
|
|
4679
|
+
if (t2.unrepresentable === "throw") throw Error("Date cannot be represented in JSON Schema");
|
|
4680
|
+
}, wl = (e4, t2, n2, r2) => {
|
|
4681
4681
|
let i2 = e4._zod.def, a2 = g(i2.entries);
|
|
4682
4682
|
a2.every((e5) => typeof e5 == "number") && (n2.type = "number"), a2.every((e5) => typeof e5 == "string") && (n2.type = "string"), n2.enum = a2;
|
|
4683
|
-
},
|
|
4683
|
+
}, Tl = (e4, t2, n2, r2) => {
|
|
4684
4684
|
let i2 = e4._zod.def, a2 = [];
|
|
4685
4685
|
for (let e5 of i2.values) if (e5 === void 0) {
|
|
4686
4686
|
if (t2.unrepresentable === "throw") throw Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
@@ -4692,89 +4692,89 @@ var cl = (e4, t2 = {}) => (n2) => {
|
|
|
4692
4692
|
let e5 = a2[0];
|
|
4693
4693
|
n2.type = e5 === null ? "null" : typeof e5, t2.target === "draft-04" || t2.target === "openapi-3.0" ? n2.enum = [e5] : n2.const = e5;
|
|
4694
4694
|
} else a2.every((e5) => typeof e5 == "number") && (n2.type = "number"), a2.every((e5) => typeof e5 == "string") && (n2.type = "string"), a2.every((e5) => typeof e5 == "boolean") && (n2.type = "boolean"), a2.every((e5) => e5 === null) && (n2.type = "null"), n2.enum = a2;
|
|
4695
|
-
}, Tl = (e4, t2, n2, r2) => {
|
|
4696
|
-
if (t2.unrepresentable === "throw") throw Error("NaN cannot be represented in JSON Schema");
|
|
4697
4695
|
}, El = (e4, t2, n2, r2) => {
|
|
4696
|
+
if (t2.unrepresentable === "throw") throw Error("NaN cannot be represented in JSON Schema");
|
|
4697
|
+
}, Dl = (e4, t2, n2, r2) => {
|
|
4698
4698
|
let i2 = n2, a2 = e4._zod.pattern;
|
|
4699
4699
|
if (!a2) throw Error("Pattern not found in template literal");
|
|
4700
4700
|
i2.type = "string", i2.pattern = a2.source;
|
|
4701
|
-
},
|
|
4701
|
+
}, Ol = (e4, t2, n2, r2) => {
|
|
4702
4702
|
let i2 = n2, a2 = { type: "string", format: "binary", contentEncoding: "binary" }, { minimum: o2, maximum: s2, mime: c2 } = e4._zod.bag;
|
|
4703
4703
|
o2 !== void 0 && (a2.minLength = o2), s2 !== void 0 && (a2.maxLength = s2), c2 ? c2.length === 1 ? (a2.contentMediaType = c2[0], Object.assign(i2, a2)) : (Object.assign(i2, a2), i2.anyOf = c2.map((e5) => ({ contentMediaType: e5 }))) : Object.assign(i2, a2);
|
|
4704
|
-
}, Ol = (e4, t2, n2, r2) => {
|
|
4705
|
-
n2.type = "boolean";
|
|
4706
4704
|
}, kl = (e4, t2, n2, r2) => {
|
|
4707
|
-
|
|
4705
|
+
n2.type = "boolean";
|
|
4708
4706
|
}, Al = (e4, t2, n2, r2) => {
|
|
4709
|
-
if (t2.unrepresentable === "throw") throw Error("
|
|
4707
|
+
if (t2.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
|
|
4710
4708
|
}, jl = (e4, t2, n2, r2) => {
|
|
4711
|
-
if (t2.unrepresentable === "throw") throw Error("
|
|
4709
|
+
if (t2.unrepresentable === "throw") throw Error("Function types cannot be represented in JSON Schema");
|
|
4712
4710
|
}, Ml = (e4, t2, n2, r2) => {
|
|
4713
|
-
if (t2.unrepresentable === "throw") throw Error("
|
|
4711
|
+
if (t2.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
|
|
4714
4712
|
}, Nl = (e4, t2, n2, r2) => {
|
|
4715
|
-
if (t2.unrepresentable === "throw") throw Error("
|
|
4713
|
+
if (t2.unrepresentable === "throw") throw Error("Map cannot be represented in JSON Schema");
|
|
4716
4714
|
}, Pl = (e4, t2, n2, r2) => {
|
|
4717
|
-
|
|
4718
|
-
typeof o2 == "number" && (i2.minItems = o2), typeof s2 == "number" && (i2.maxItems = s2), i2.type = "array", i2.items = A(a2.element, t2, { ...r2, path: [...r2.path, "items"] });
|
|
4715
|
+
if (t2.unrepresentable === "throw") throw Error("Set cannot be represented in JSON Schema");
|
|
4719
4716
|
}, Fl = (e4, t2, n2, r2) => {
|
|
4717
|
+
let i2 = n2, a2 = e4._zod.def, { minimum: o2, maximum: s2 } = e4._zod.bag;
|
|
4718
|
+
typeof o2 == "number" && (i2.minItems = o2), typeof s2 == "number" && (i2.maxItems = s2), i2.type = "array", i2.items = k(a2.element, t2, { ...r2, path: [...r2.path, "items"] });
|
|
4719
|
+
}, Il = (e4, t2, n2, r2) => {
|
|
4720
4720
|
var i2;
|
|
4721
4721
|
let a2 = n2, o2 = e4._zod.def;
|
|
4722
4722
|
a2.type = "object", a2.properties = {};
|
|
4723
4723
|
let s2 = o2.shape;
|
|
4724
|
-
for (let e5 in s2) a2.properties[e5] =
|
|
4724
|
+
for (let e5 in s2) a2.properties[e5] = k(s2[e5], t2, { ...r2, path: [...r2.path, "properties", e5] });
|
|
4725
4725
|
let c2 = new Set(Object.keys(s2)), l2 = new Set([...c2].filter((e5) => {
|
|
4726
4726
|
let n3 = o2.shape[e5]._zod;
|
|
4727
4727
|
return t2.io === "input" ? n3.optin === void 0 : n3.optout === void 0;
|
|
4728
4728
|
}));
|
|
4729
|
-
l2.size > 0 && (a2.required = Array.from(l2)), ((i2 = o2.catchall) == null ? void 0 : i2._zod.def.type) === "never" ? a2.additionalProperties = false : o2.catchall ? o2.catchall && (a2.additionalProperties =
|
|
4730
|
-
}, Il = (e4, t2, n2, r2) => {
|
|
4731
|
-
let i2 = e4._zod.def, a2 = i2.inclusive === false, o2 = i2.options.map((e5, n3) => A(e5, t2, { ...r2, path: [...r2.path, a2 ? "oneOf" : "anyOf", n3] }));
|
|
4732
|
-
a2 ? n2.oneOf = o2 : n2.anyOf = o2;
|
|
4729
|
+
l2.size > 0 && (a2.required = Array.from(l2)), ((i2 = o2.catchall) == null ? void 0 : i2._zod.def.type) === "never" ? a2.additionalProperties = false : o2.catchall ? o2.catchall && (a2.additionalProperties = k(o2.catchall, t2, { ...r2, path: [...r2.path, "additionalProperties"] })) : t2.io === "output" && (a2.additionalProperties = false);
|
|
4733
4730
|
}, Ll = (e4, t2, n2, r2) => {
|
|
4734
|
-
let i2 = e4._zod.def, a2 =
|
|
4735
|
-
|
|
4731
|
+
let i2 = e4._zod.def, a2 = i2.inclusive === false, o2 = i2.options.map((e5, n3) => k(e5, t2, { ...r2, path: [...r2.path, a2 ? "oneOf" : "anyOf", n3] }));
|
|
4732
|
+
a2 ? n2.oneOf = o2 : n2.anyOf = o2;
|
|
4736
4733
|
}, Rl = (e4, t2, n2, r2) => {
|
|
4734
|
+
let i2 = e4._zod.def, a2 = k(i2.left, t2, { ...r2, path: [...r2.path, "allOf", 0] }), o2 = k(i2.right, t2, { ...r2, path: [...r2.path, "allOf", 1] }), s2 = (e5) => "allOf" in e5 && Object.keys(e5).length === 1;
|
|
4735
|
+
n2.allOf = [...s2(a2) ? a2.allOf : [a2], ...s2(o2) ? o2.allOf : [o2]];
|
|
4736
|
+
}, zl = (e4, t2, n2, r2) => {
|
|
4737
4737
|
let i2 = n2, a2 = e4._zod.def;
|
|
4738
4738
|
i2.type = "array";
|
|
4739
|
-
let o2 = t2.target === "draft-2020-12" ? "prefixItems" : "items", s2 = t2.target === "draft-2020-12" || t2.target === "openapi-3.0" ? "items" : "additionalItems", c2 = a2.items.map((e5, n3) =>
|
|
4739
|
+
let o2 = t2.target === "draft-2020-12" ? "prefixItems" : "items", s2 = t2.target === "draft-2020-12" || t2.target === "openapi-3.0" ? "items" : "additionalItems", c2 = a2.items.map((e5, n3) => k(e5, t2, { ...r2, path: [...r2.path, o2, n3] })), l2 = a2.rest ? k(a2.rest, t2, { ...r2, path: [...r2.path, s2, ...t2.target === "openapi-3.0" ? [a2.items.length] : []] }) : null;
|
|
4740
4740
|
t2.target === "draft-2020-12" ? (i2.prefixItems = c2, l2 && (i2.items = l2)) : t2.target === "openapi-3.0" ? (i2.items = { anyOf: c2 }, l2 && i2.items.anyOf.push(l2), i2.minItems = c2.length, l2 || (i2.maxItems = c2.length)) : (i2.items = c2, l2 && (i2.additionalItems = l2));
|
|
4741
4741
|
let { minimum: u2, maximum: d2 } = e4._zod.bag;
|
|
4742
4742
|
typeof u2 == "number" && (i2.minItems = u2), typeof d2 == "number" && (i2.maxItems = d2);
|
|
4743
|
-
},
|
|
4743
|
+
}, Bl = (e4, t2, n2, r2) => {
|
|
4744
4744
|
let i2 = n2, a2 = e4._zod.def;
|
|
4745
4745
|
i2.type = "object";
|
|
4746
4746
|
let o2 = a2.keyType, s2 = o2._zod.bag, c2 = s2 == null ? void 0 : s2.patterns;
|
|
4747
4747
|
if (a2.mode === "loose" && c2 && c2.size > 0) {
|
|
4748
|
-
let e5 =
|
|
4748
|
+
let e5 = k(a2.valueType, t2, { ...r2, path: [...r2.path, "patternProperties", "*"] });
|
|
4749
4749
|
i2.patternProperties = {};
|
|
4750
4750
|
for (let t3 of c2) i2.patternProperties[t3.source] = e5;
|
|
4751
|
-
} else (t2.target === "draft-07" || t2.target === "draft-2020-12") && (i2.propertyNames =
|
|
4751
|
+
} else (t2.target === "draft-07" || t2.target === "draft-2020-12") && (i2.propertyNames = k(a2.keyType, t2, { ...r2, path: [...r2.path, "propertyNames"] })), i2.additionalProperties = k(a2.valueType, t2, { ...r2, path: [...r2.path, "additionalProperties"] });
|
|
4752
4752
|
let l2 = o2._zod.values;
|
|
4753
4753
|
if (l2) {
|
|
4754
4754
|
let e5 = [...l2].filter((e6) => typeof e6 == "string" || typeof e6 == "number");
|
|
4755
4755
|
e5.length > 0 && (i2.required = e5);
|
|
4756
4756
|
}
|
|
4757
|
-
}, Bl = (e4, t2, n2, r2) => {
|
|
4758
|
-
let i2 = e4._zod.def, a2 = A(i2.innerType, t2, r2), o2 = t2.seen.get(e4);
|
|
4759
|
-
t2.target === "openapi-3.0" ? (o2.ref = i2.innerType, n2.nullable = true) : n2.anyOf = [a2, { type: "null" }];
|
|
4760
4757
|
}, Vl = (e4, t2, n2, r2) => {
|
|
4758
|
+
let i2 = e4._zod.def, a2 = k(i2.innerType, t2, r2), o2 = t2.seen.get(e4);
|
|
4759
|
+
t2.target === "openapi-3.0" ? (o2.ref = i2.innerType, n2.nullable = true) : n2.anyOf = [a2, { type: "null" }];
|
|
4760
|
+
}, Hl = (e4, t2, n2, r2) => {
|
|
4761
4761
|
let i2 = e4._zod.def;
|
|
4762
|
-
|
|
4762
|
+
k(i2.innerType, t2, r2);
|
|
4763
4763
|
let a2 = t2.seen.get(e4);
|
|
4764
4764
|
a2.ref = i2.innerType;
|
|
4765
|
-
},
|
|
4765
|
+
}, Ul = (e4, t2, n2, r2) => {
|
|
4766
4766
|
let i2 = e4._zod.def;
|
|
4767
|
-
|
|
4767
|
+
k(i2.innerType, t2, r2);
|
|
4768
4768
|
let a2 = t2.seen.get(e4);
|
|
4769
4769
|
a2.ref = i2.innerType, n2.default = JSON.parse(JSON.stringify(i2.defaultValue));
|
|
4770
|
-
},
|
|
4770
|
+
}, Wl = (e4, t2, n2, r2) => {
|
|
4771
4771
|
let i2 = e4._zod.def;
|
|
4772
|
-
|
|
4772
|
+
k(i2.innerType, t2, r2);
|
|
4773
4773
|
let a2 = t2.seen.get(e4);
|
|
4774
4774
|
a2.ref = i2.innerType, t2.io === "input" && (n2._prefault = JSON.parse(JSON.stringify(i2.defaultValue)));
|
|
4775
|
-
},
|
|
4775
|
+
}, Gl = (e4, t2, n2, r2) => {
|
|
4776
4776
|
let i2 = e4._zod.def;
|
|
4777
|
-
|
|
4777
|
+
k(i2.innerType, t2, r2);
|
|
4778
4778
|
let a2 = t2.seen.get(e4);
|
|
4779
4779
|
a2.ref = i2.innerType;
|
|
4780
4780
|
let o2;
|
|
@@ -4784,51 +4784,51 @@ var cl = (e4, t2 = {}) => (n2) => {
|
|
|
4784
4784
|
throw Error("Dynamic catch values are not supported in JSON Schema");
|
|
4785
4785
|
}
|
|
4786
4786
|
n2.default = o2;
|
|
4787
|
-
},
|
|
4787
|
+
}, Kl = (e4, t2, n2, r2) => {
|
|
4788
4788
|
let i2 = e4._zod.def, a2 = t2.io === "input" ? i2.in._zod.def.type === "transform" ? i2.out : i2.in : i2.out;
|
|
4789
|
-
|
|
4789
|
+
k(a2, t2, r2);
|
|
4790
4790
|
let o2 = t2.seen.get(e4);
|
|
4791
4791
|
o2.ref = a2;
|
|
4792
|
-
},
|
|
4792
|
+
}, ql = (e4, t2, n2, r2) => {
|
|
4793
4793
|
let i2 = e4._zod.def;
|
|
4794
|
-
|
|
4794
|
+
k(i2.innerType, t2, r2);
|
|
4795
4795
|
let a2 = t2.seen.get(e4);
|
|
4796
4796
|
a2.ref = i2.innerType, n2.readOnly = true;
|
|
4797
|
-
},
|
|
4797
|
+
}, Jl = (e4, t2, n2, r2) => {
|
|
4798
4798
|
let i2 = e4._zod.def;
|
|
4799
|
-
|
|
4799
|
+
k(i2.innerType, t2, r2);
|
|
4800
4800
|
let a2 = t2.seen.get(e4);
|
|
4801
4801
|
a2.ref = i2.innerType;
|
|
4802
|
-
},
|
|
4802
|
+
}, Yl = (e4, t2, n2, r2) => {
|
|
4803
4803
|
let i2 = e4._zod.def;
|
|
4804
|
-
|
|
4804
|
+
k(i2.innerType, t2, r2);
|
|
4805
4805
|
let a2 = t2.seen.get(e4);
|
|
4806
4806
|
a2.ref = i2.innerType;
|
|
4807
|
-
},
|
|
4807
|
+
}, Xl = (e4, t2, n2, r2) => {
|
|
4808
4808
|
let i2 = e4._zod.innerType;
|
|
4809
|
-
|
|
4809
|
+
k(i2, t2, r2);
|
|
4810
4810
|
let a2 = t2.seen.get(e4);
|
|
4811
4811
|
a2.ref = i2;
|
|
4812
|
-
},
|
|
4813
|
-
function
|
|
4812
|
+
}, Zl = { string: fl, number: pl, boolean: ml, bigint: hl, symbol: gl, null: _l, undefined: vl, void: yl, never: bl, any: xl, unknown: Sl, date: Cl, enum: wl, literal: Tl, nan: El, template_literal: Dl, file: Ol, success: kl, custom: Al, function: jl, transform: Ml, map: Nl, set: Pl, array: Fl, object: Il, union: Ll, intersection: Rl, tuple: zl, record: Bl, nullable: Vl, nonoptional: Hl, default: Ul, prefault: Wl, catch: Gl, pipe: Kl, readonly: ql, promise: Jl, optional: Yl, lazy: Xl };
|
|
4813
|
+
function Ql(e4, t2) {
|
|
4814
4814
|
if ("_idmap" in e4) {
|
|
4815
|
-
let n3 = e4, r2 =
|
|
4815
|
+
let n3 = e4, r2 = ol({ ...t2, processors: Zl }), i2 = {};
|
|
4816
4816
|
for (let e5 of n3._idmap.entries()) {
|
|
4817
4817
|
let [t3, n4] = e5;
|
|
4818
|
-
|
|
4818
|
+
k(n4, r2);
|
|
4819
4819
|
}
|
|
4820
4820
|
let a2 = {};
|
|
4821
4821
|
r2.external = { registry: n3, uri: t2 == null ? void 0 : t2.uri, defs: i2 };
|
|
4822
4822
|
for (let e5 of n3._idmap.entries()) {
|
|
4823
4823
|
let [t3, n4] = e5;
|
|
4824
|
-
|
|
4824
|
+
sl(r2, n4), a2[t3] = cl(r2, n4);
|
|
4825
4825
|
}
|
|
4826
4826
|
return Object.keys(i2).length > 0 && (a2.__shared = { [r2.target === "draft-2020-12" ? "$defs" : "definitions"]: i2 }), { schemas: a2 };
|
|
4827
4827
|
}
|
|
4828
|
-
let n2 =
|
|
4829
|
-
return
|
|
4828
|
+
let n2 = ol({ ...t2, processors: Zl });
|
|
4829
|
+
return k(e4, n2), sl(n2, e4), cl(n2, e4);
|
|
4830
4830
|
}
|
|
4831
|
-
var
|
|
4831
|
+
var $l = class {
|
|
4832
4832
|
get metadataRegistry() {
|
|
4833
4833
|
return this.ctx.metadataRegistry;
|
|
4834
4834
|
}
|
|
@@ -4856,27 +4856,27 @@ var Ql = class {
|
|
|
4856
4856
|
constructor(e4) {
|
|
4857
4857
|
var t2;
|
|
4858
4858
|
let n2 = (t2 = e4 == null ? void 0 : e4.target) == null ? "draft-2020-12" : t2;
|
|
4859
|
-
n2 === "draft-4" && (n2 = "draft-04"), n2 === "draft-7" && (n2 = "draft-07"), this.ctx =
|
|
4859
|
+
n2 === "draft-4" && (n2 = "draft-04"), n2 === "draft-7" && (n2 = "draft-07"), this.ctx = ol({ processors: Zl, target: n2, ...(e4 == null ? void 0 : e4.metadata) && { metadata: e4.metadata }, ...(e4 == null ? void 0 : e4.unrepresentable) && { unrepresentable: e4.unrepresentable }, ...(e4 == null ? void 0 : e4.override) && { override: e4.override }, ...(e4 == null ? void 0 : e4.io) && { io: e4.io } });
|
|
4860
4860
|
}
|
|
4861
4861
|
process(e4, t2 = { path: [], schemaPath: [] }) {
|
|
4862
|
-
return
|
|
4862
|
+
return k(e4, this.ctx, t2);
|
|
4863
4863
|
}
|
|
4864
4864
|
emit(e4, t2) {
|
|
4865
|
-
t2 && (t2.cycles && (this.ctx.cycles = t2.cycles), t2.reused && (this.ctx.reused = t2.reused), t2.external && (this.ctx.external = t2.external)),
|
|
4866
|
-
let { "~standard": n2, ...r2 } =
|
|
4865
|
+
t2 && (t2.cycles && (this.ctx.cycles = t2.cycles), t2.reused && (this.ctx.reused = t2.reused), t2.external && (this.ctx.external = t2.external)), sl(this.ctx, e4);
|
|
4866
|
+
let { "~standard": n2, ...r2 } = cl(this.ctx, e4);
|
|
4867
4867
|
return r2;
|
|
4868
4868
|
}
|
|
4869
|
-
},
|
|
4870
|
-
function
|
|
4869
|
+
}, eu = t({}), tu = t({ $ZodAny: () => Zr, $ZodArray: () => ri, $ZodAsyncError: () => u, $ZodBase64: () => Ir, $ZodBase64URL: () => Rr, $ZodBigInt: () => Kr, $ZodBigIntFormat: () => qr, $ZodBoolean: () => Gr, $ZodCIDRv4: () => Nr, $ZodCIDRv6: () => Pr, $ZodCUID: () => xr, $ZodCUID2: () => Sr, $ZodCatch: () => Ri, $ZodCheck: () => w, $ZodCheckBigIntFormat: () => Jn, $ZodCheckEndsWith: () => sr, $ZodCheckGreaterThan: () => Gn, $ZodCheckIncludes: () => ar, $ZodCheckLengthEquals: () => er, $ZodCheckLessThan: () => Wn, $ZodCheckLowerCase: () => rr, $ZodCheckMaxLength: () => Qn, $ZodCheckMaxSize: () => Yn, $ZodCheckMimeType: () => ur, $ZodCheckMinLength: () => $n, $ZodCheckMinSize: () => Xn, $ZodCheckMultipleOf: () => Kn, $ZodCheckNumberFormat: () => qn, $ZodCheckOverwrite: () => dr, $ZodCheckProperty: () => lr, $ZodCheckRegex: () => nr, $ZodCheckSizeEquals: () => Zn, $ZodCheckStartsWith: () => or, $ZodCheckStringFormat: () => tr, $ZodCheckUpperCase: () => ir, $ZodCodec: () => Hi, $ZodCustom: () => Zi, $ZodCustomStringFormat: () => Hr, $ZodDate: () => ti, $ZodDefault: () => Mi, $ZodDiscriminatedUnion: () => pi, $ZodE164: () => zr, $ZodEmail: () => _r, $ZodEmoji: () => yr, $ZodEncodeError: () => d, $ZodEnum: () => wi, $ZodError: () => tt, $ZodExactOptional: () => Ai, $ZodFile: () => Ei, $ZodFunction: () => Ji, $ZodGUID: () => hr, $ZodIPv4: () => Ar, $ZodIPv6: () => jr, $ZodISODate: () => Dr, $ZodISODateTime: () => Er, $ZodISODuration: () => kr, $ZodISOTime: () => Or, $ZodIntersection: () => mi, $ZodJWT: () => Vr, $ZodKSUID: () => Tr, $ZodLazy: () => Xi, $ZodLiteral: () => Ti, $ZodMAC: () => Mr, $ZodMap: () => bi, $ZodNaN: () => zi, $ZodNanoID: () => br, $ZodNever: () => $r, $ZodNonOptional: () => Fi, $ZodNull: () => Xr, $ZodNullable: () => ji, $ZodNumber: () => Ur, $ZodNumberFormat: () => Wr, $ZodObject: () => si, $ZodObjectJIT: () => ci, $ZodOptional: () => ki, $ZodPipe: () => Bi, $ZodPrefault: () => Pi, $ZodPromise: () => Yi, $ZodReadonly: () => Gi, $ZodRealError: () => nt, $ZodRecord: () => yi, $ZodRegistry: () => Qo, $ZodSet: () => Si, $ZodString: () => mr, $ZodStringFormat: () => E, $ZodSuccess: () => Li, $ZodSymbol: () => Jr, $ZodTemplateLiteral: () => qi, $ZodTransform: () => Di, $ZodTuple: () => _i, $ZodType: () => T, $ZodULID: () => Cr, $ZodURL: () => vr, $ZodUUID: () => gr, $ZodUndefined: () => Yr, $ZodUnion: () => ui, $ZodUnknown: () => Qr, $ZodVoid: () => ei, $ZodXID: () => wr, $ZodXor: () => fi, $brand: () => l, $constructor: () => c, $input: () => Zo, $output: () => Xo, Doc: () => fr, JSONSchema: () => eu, JSONSchemaGenerator: () => $l, NEVER: () => s, TimePrecision: () => Ts, _any: () => Ks, _array: () => Dc, _base64: () => xs, _base64url: () => Ss, _bigint: () => zs, _boolean: () => Ls, _catch: () => Kc, _check: () => tl, _cidrv4: () => ys, _cidrv6: () => bs, _coercedBigint: () => Bs, _coercedBoolean: () => Rs, _coercedDate: () => Zs, _coercedNumber: () => js, _coercedString: () => ts, _cuid: () => ds, _cuid2: () => fs, _custom: () => Qc, _date: () => Xs, _decode: () => vt, _decodeAsync: () => St, _default: () => Uc, _discriminatedUnion: () => Ac, _e164: () => Cs, _email: () => ns, _emoji: () => ls, _encode: () => gt, _encodeAsync: () => bt, _endsWith: () => vc, _enum: () => Ic, _file: () => zc, _float32: () => Ns, _float64: () => Ps, _gt: () => tc, _gte: () => O, _guid: () => rs, _includes: () => gc, _int: () => Ms, _int32: () => Fs, _int64: () => Vs, _intersection: () => jc, _ipv4: () => gs, _ipv6: () => _s, _isoDate: () => Ds, _isoDateTime: () => Es, _isoDuration: () => ks, _isoTime: () => Os, _jwt: () => ws, _ksuid: () => hs, _lazy: () => Xc, _length: () => fc, _literal: () => Rc, _lowercase: () => mc, _lt: () => $s, _lte: () => ec, _mac: () => vs, _map: () => Pc, _max: () => ec, _maxLength: () => uc, _maxSize: () => sc, _mime: () => bc, _min: () => O, _minLength: () => dc, _minSize: () => cc, _multipleOf: () => oc, _nan: () => Qs, _nanoid: () => us, _nativeEnum: () => Lc, _negative: () => rc, _never: () => Js, _nonnegative: () => ac, _nonoptional: () => Wc, _nonpositive: () => ic, _normalize: () => Sc, _null: () => Gs, _nullable: () => Hc, _number: () => As, _optional: () => Vc, _overwrite: () => xc, _parse: () => ct, _parseAsync: () => ut, _pipe: () => qc, _positive: () => nc, _promise: () => Zc, _property: () => yc, _readonly: () => Jc, _record: () => Nc, _refine: () => $c, _regex: () => pc, _safeDecode: () => Et, _safeDecodeAsync: () => At, _safeEncode: () => wt, _safeEncodeAsync: () => Ot, _safeParse: () => ft, _safeParseAsync: () => mt, _set: () => Fc, _size: () => lc, _slugify: () => Ec, _startsWith: () => _c, _string: () => es, _stringFormat: () => al, _stringbool: () => il, _success: () => Gc, _superRefine: () => el, _symbol: () => Us, _templateLiteral: () => Yc, _toLowerCase: () => wc, _toUpperCase: () => Tc, _transform: () => Bc, _trim: () => Cc, _tuple: () => Mc, _uint32: () => Is, _uint64: () => Hs, _ulid: () => ps, _undefined: () => Ws, _union: () => Oc, _unknown: () => qs, _uppercase: () => hc, _url: () => cs, _uuid: () => is, _uuidv4: () => as, _uuidv6: () => os, _uuidv7: () => ss, _void: () => Ys, _xid: () => ms, _xor: () => kc, clone: () => De, config: () => p, createStandardJSONSchemaMethod: () => ul, createToJSONSchemaMethod: () => ll, decode: () => yt, decodeAsync: () => Ct, describe: () => nl, encode: () => _t, encodeAsync: () => xt, extractDefs: () => sl, finalize: () => cl, flattenError: () => rt, formatError: () => it, globalConfig: () => f, globalRegistry: () => D, initializeContext: () => ol, isValidBase64: () => Fr, isValidBase64URL: () => Lr, isValidJWT: () => Br, locales: () => Jo, meta: () => rl, parse: () => lt, parseAsync: () => dt, prettifyError: () => st, process: () => k, regexes: () => Mt, registry: () => $o, safeDecode: () => Dt, safeDecodeAsync: () => jt, safeEncode: () => Tt, safeEncodeAsync: () => kt, safeParse: () => pt, safeParseAsync: () => ht, toDotPath: () => ot, toJSONSchema: () => Ql, treeifyError: () => at, util: () => ee, version: () => pr });
|
|
4870
|
+
function nu(e4) {
|
|
4871
4871
|
return !!e4._zod;
|
|
4872
4872
|
}
|
|
4873
|
-
function
|
|
4874
|
-
return
|
|
4873
|
+
function ru(e4, t2) {
|
|
4874
|
+
return nu(e4) ? pt(e4, t2) : e4.safeParse(t2);
|
|
4875
4875
|
}
|
|
4876
|
-
function
|
|
4876
|
+
function iu(e4) {
|
|
4877
4877
|
if (!e4) return;
|
|
4878
4878
|
let t2;
|
|
4879
|
-
if (
|
|
4879
|
+
if (nu(e4)) {
|
|
4880
4880
|
var n2;
|
|
4881
4881
|
t2 = (n2 = e4._zod) == null || (n2 = n2.def) == null ? void 0 : n2.shape;
|
|
4882
4882
|
} else t2 = e4.shape;
|
|
@@ -4889,8 +4889,8 @@ function ru(e4) {
|
|
|
4889
4889
|
return t2;
|
|
4890
4890
|
}
|
|
4891
4891
|
}
|
|
4892
|
-
function
|
|
4893
|
-
if (
|
|
4892
|
+
function au(e4) {
|
|
4893
|
+
if (nu(e4)) {
|
|
4894
4894
|
var t2;
|
|
4895
4895
|
let n3 = (t2 = e4._zod) == null ? void 0 : t2.def;
|
|
4896
4896
|
if (n3) {
|
|
@@ -4906,31 +4906,31 @@ function iu(e4) {
|
|
|
4906
4906
|
let r2 = e4.value;
|
|
4907
4907
|
if (r2 !== void 0) return r2;
|
|
4908
4908
|
}
|
|
4909
|
-
var
|
|
4910
|
-
Er.init(e4, t2),
|
|
4909
|
+
var ou = t({ endsWith: () => vc, gt: () => tc, gte: () => O, includes: () => gc, length: () => fc, lowercase: () => mc, lt: () => $s, lte: () => ec, maxLength: () => uc, maxSize: () => sc, mime: () => bc, minLength: () => dc, minSize: () => cc, multipleOf: () => oc, negative: () => rc, nonnegative: () => ac, nonpositive: () => ic, normalize: () => Sc, overwrite: () => xc, positive: () => nc, property: () => yc, regex: () => pc, size: () => lc, slugify: () => Ec, startsWith: () => _c, toLowerCase: () => wc, toUpperCase: () => Tc, trim: () => Cc, uppercase: () => hc }), su = t({ ZodISODate: () => uu, ZodISODateTime: () => cu, ZodISODuration: () => mu, ZodISOTime: () => fu, date: () => du, datetime: () => lu, duration: () => hu, time: () => pu }), cu = c("ZodISODateTime", (e4, t2) => {
|
|
4910
|
+
Er.init(e4, t2), P.init(e4, t2);
|
|
4911
4911
|
});
|
|
4912
|
-
function
|
|
4913
|
-
return Es(
|
|
4912
|
+
function lu(e4) {
|
|
4913
|
+
return Es(cu, e4);
|
|
4914
4914
|
}
|
|
4915
|
-
var
|
|
4916
|
-
Dr.init(e4, t2),
|
|
4915
|
+
var uu = c("ZodISODate", (e4, t2) => {
|
|
4916
|
+
Dr.init(e4, t2), P.init(e4, t2);
|
|
4917
4917
|
});
|
|
4918
|
-
function
|
|
4919
|
-
return Ds(
|
|
4918
|
+
function du(e4) {
|
|
4919
|
+
return Ds(uu, e4);
|
|
4920
4920
|
}
|
|
4921
|
-
var
|
|
4922
|
-
Or.init(e4, t2),
|
|
4921
|
+
var fu = c("ZodISOTime", (e4, t2) => {
|
|
4922
|
+
Or.init(e4, t2), P.init(e4, t2);
|
|
4923
4923
|
});
|
|
4924
|
-
function
|
|
4925
|
-
return Os(
|
|
4924
|
+
function pu(e4) {
|
|
4925
|
+
return Os(fu, e4);
|
|
4926
4926
|
}
|
|
4927
|
-
var
|
|
4928
|
-
kr.init(e4, t2),
|
|
4927
|
+
var mu = c("ZodISODuration", (e4, t2) => {
|
|
4928
|
+
kr.init(e4, t2), P.init(e4, t2);
|
|
4929
4929
|
});
|
|
4930
|
-
function
|
|
4931
|
-
return ks(
|
|
4930
|
+
function hu(e4) {
|
|
4931
|
+
return ks(mu, e4);
|
|
4932
4932
|
}
|
|
4933
|
-
var
|
|
4933
|
+
var gu = (e4, t2) => {
|
|
4934
4934
|
tt.init(e4, t2), e4.name = "ZodError", Object.defineProperties(e4, { format: { value: (t3) => it(e4, t3) }, flatten: { value: (t3) => rt(e4, t3) }, addIssue: { value: (t3) => {
|
|
4935
4935
|
e4.issues.push(t3), e4.message = JSON.stringify(e4.issues, v, 2);
|
|
4936
4936
|
} }, addIssues: { value: (t3) => {
|
|
@@ -4938,10 +4938,10 @@ var hu = (e4, t2) => {
|
|
|
4938
4938
|
} }, isEmpty: { get() {
|
|
4939
4939
|
return e4.issues.length === 0;
|
|
4940
4940
|
} } });
|
|
4941
|
-
},
|
|
4941
|
+
}, _u = c("ZodError", gu), j = c("ZodError", gu, { Parent: Error }), vu = ct(j), yu = ut(j), bu = ft(j), xu = mt(j), Su = gt(j), Cu = vt(j), wu = bt(j), Tu = St(j), Eu = wt(j), Du = Et(j), Ou = Ot(j), ku = At(j), Au = t({ ZodAny: () => qd, ZodArray: () => nf, ZodBase64: () => hd, ZodBase64URL: () => _d, ZodBigInt: () => Id, ZodBigIntFormat: () => Rd, ZodBoolean: () => Fd, ZodCIDRv4: () => dd, ZodCIDRv6: () => pd, ZodCUID: () => Yu, ZodCUID2: () => Zu, ZodCatch: () => Wf, ZodCodec: () => Xf, ZodCustom: () => cp, ZodCustomStringFormat: () => Cd, ZodDate: () => ef, ZodDefault: () => If, ZodDiscriminatedUnion: () => uf, ZodE164: () => yd, ZodEmail: () => Nu, ZodEmoji: () => Gu, ZodEnum: () => Cf, ZodExactOptional: () => jf, ZodFile: () => Ef, ZodFunction: () => op, ZodGUID: () => Fu, ZodIPv4: () => ad, ZodIPv6: () => ld, ZodIntersection: () => ff, ZodJWT: () => xd, ZodKSUID: () => rd, ZodLazy: () => np, ZodLiteral: () => Tf, ZodMAC: () => sd, ZodMap: () => yf, ZodNaN: () => Kf, ZodNanoID: () => qu, ZodNever: () => Xd, ZodNonOptional: () => Bf, ZodNull: () => Gd, ZodNullable: () => Nf, ZodNumber: () => Od, ZodNumberFormat: () => kd, ZodObject: () => af, ZodOptional: () => Af, ZodPipe: () => Jf, ZodPrefault: () => Rf, ZodPromise: () => ip, ZodReadonly: () => Qf, ZodRecord: () => gf, ZodSet: () => xf, ZodString: () => Mu, ZodStringFormat: () => P, ZodSuccess: () => Hf, ZodSymbol: () => Vd, ZodTemplateLiteral: () => ep, ZodTransform: () => Of, ZodTuple: () => mf, ZodType: () => M, ZodULID: () => $u, ZodURL: () => Hu, ZodUUID: () => Lu, ZodUndefined: () => Ud, ZodUnion: () => sf, ZodUnknown: () => Yd, ZodVoid: () => Qd, ZodXID: () => td, ZodXor: () => cf, _ZodString: () => ju, _default: () => Lf, _function: () => sp, any: () => Jd, array: () => R, base64: () => gd, base64url: () => vd, bigint: () => Ld, boolean: () => I, catch: () => Gf, check: () => lp, cidrv4: () => fd, cidrv6: () => md, codec: () => Zf, cuid: () => Xu, cuid2: () => Qu, custom: () => up, date: () => tf, describe: () => pp, discriminatedUnion: () => df, e164: () => bd, email: () => Pu, emoji: () => Ku, enum: () => U, exactOptional: () => Mf, file: () => Df, float32: () => jd, float64: () => Md, function: () => sp, guid: () => Iu, hash: () => Dd, hex: () => Ed, hostname: () => Td, httpUrl: () => Wu, instanceof: () => hp, int: () => Ad, int32: () => Nd, int64: () => zd, intersection: () => pf, ipv4: () => od, ipv6: () => ud, json: () => _p, jwt: () => Sd, keyof: () => rf, ksuid: () => id, lazy: () => rp, literal: () => W, looseObject: () => B, looseRecord: () => vf, mac: () => cd, map: () => bf, meta: () => mp, nan: () => qf, nanoid: () => Ju, nativeEnum: () => wf, never: () => Zd, nonoptional: () => Vf, null: () => Kd, nullable: () => Pf, nullish: () => Ff, number: () => F, object: () => z, optional: () => G, partialRecord: () => _f, pipe: () => Yf, prefault: () => zf, preprocess: () => vp, promise: () => ap, readonly: () => $f, record: () => H, refine: () => dp, set: () => Sf, strictObject: () => of, string: () => N, stringFormat: () => wd, stringbool: () => gp, success: () => Uf, superRefine: () => fp, symbol: () => Hd, templateLiteral: () => tp, transform: () => kf, tuple: () => hf, uint32: () => Pd, uint64: () => Bd, ulid: () => ed, undefined: () => Wd, union: () => V, unknown: () => L, url: () => Uu, uuid: () => Ru, uuidv4: () => zu, uuidv6: () => Bu, uuidv7: () => Vu, void: () => $d, xid: () => nd, xor: () => lf }), M = c("ZodType", (e4, t2) => (T.init(e4, t2), Object.assign(e4["~standard"], { jsonSchema: { input: ul(e4, "input"), output: ul(e4, "output") } }), e4.toJSONSchema = ll(e4, {}), e4.def = t2, e4.type = t2.type, Object.defineProperty(e4, "_def", { value: t2 }), e4.check = (...n2) => {
|
|
4942
4942
|
var r2;
|
|
4943
4943
|
return e4.clone(ue(t2, { checks: [...(r2 = t2.checks) == null ? [] : r2, ...n2.map((e5) => typeof e5 == "function" ? { _zod: { check: e5, def: { check: "custom" }, onattach: [] } } : e5)] }), { parent: true });
|
|
4944
|
-
}, e4.with = e4.check, e4.clone = (t3, n2) => De(e4, t3, n2), e4.brand = () => e4, e4.register = ((t3, n2) => (t3.add(e4, n2), e4)), e4.parse = (t3, n2) =>
|
|
4944
|
+
}, e4.with = e4.check, e4.clone = (t3, n2) => De(e4, t3, n2), e4.brand = () => e4, e4.register = ((t3, n2) => (t3.add(e4, n2), e4)), e4.parse = (t3, n2) => vu(e4, t3, n2, { callee: e4.parse }), e4.safeParse = (t3, n2) => bu(e4, t3, n2), e4.parseAsync = async (t3, n2) => yu(e4, t3, n2, { callee: e4.parseAsync }), e4.safeParseAsync = async (t3, n2) => xu(e4, t3, n2), e4.spa = e4.safeParseAsync, e4.encode = (t3, n2) => Su(e4, t3, n2), e4.decode = (t3, n2) => Cu(e4, t3, n2), e4.encodeAsync = async (t3, n2) => wu(e4, t3, n2), e4.decodeAsync = async (t3, n2) => Tu(e4, t3, n2), e4.safeEncode = (t3, n2) => Eu(e4, t3, n2), e4.safeDecode = (t3, n2) => Du(e4, t3, n2), e4.safeEncodeAsync = async (t3, n2) => Ou(e4, t3, n2), e4.safeDecodeAsync = async (t3, n2) => ku(e4, t3, n2), e4.refine = (t3, n2) => e4.check(dp(t3, n2)), e4.superRefine = (t3) => e4.check(fp(t3)), e4.overwrite = (t3) => e4.check(xc(t3)), e4.optional = () => G(e4), e4.exactOptional = () => Mf(e4), e4.nullable = () => Pf(e4), e4.nullish = () => G(Pf(e4)), e4.nonoptional = (t3) => Vf(e4, t3), e4.array = () => R(e4), e4.or = (t3) => V([e4, t3]), e4.and = (t3) => pf(e4, t3), e4.transform = (t3) => Yf(e4, kf(t3)), e4.default = (t3) => Lf(e4, t3), e4.prefault = (t3) => zf(e4, t3), e4.catch = (t3) => Gf(e4, t3), e4.pipe = (t3) => Yf(e4, t3), e4.readonly = () => $f(e4), e4.describe = (t3) => {
|
|
4945
4945
|
let n2 = e4.clone();
|
|
4946
4946
|
return D.add(n2, { description: t3 }), n2;
|
|
4947
4947
|
}, Object.defineProperty(e4, "description", { get() {
|
|
@@ -4951,386 +4951,386 @@ var hu = (e4, t2) => {
|
|
|
4951
4951
|
if (t3.length === 0) return D.get(e4);
|
|
4952
4952
|
let n2 = e4.clone();
|
|
4953
4953
|
return D.add(n2, t3[0]), n2;
|
|
4954
|
-
}, e4.isOptional = () => e4.safeParse(void 0).success, e4.isNullable = () => e4.safeParse(null).success, e4.apply = (t3) => t3(e4), e4)),
|
|
4954
|
+
}, e4.isOptional = () => e4.safeParse(void 0).success, e4.isNullable = () => e4.safeParse(null).success, e4.apply = (t3) => t3(e4), e4)), ju = c("_ZodString", (e4, t2) => {
|
|
4955
4955
|
var n2, r2, i2;
|
|
4956
|
-
mr.init(e4, t2),
|
|
4956
|
+
mr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n3, r3) => fl(e4, t3, n3, r3);
|
|
4957
4957
|
let a2 = e4._zod.bag;
|
|
4958
|
-
e4.format = (n2 = a2.format) == null ? null : n2, e4.minLength = (r2 = a2.minimum) == null ? null : r2, e4.maxLength = (i2 = a2.maximum) == null ? null : i2, e4.regex = (...t3) => e4.check(
|
|
4959
|
-
}),
|
|
4960
|
-
mr.init(e4, t2),
|
|
4958
|
+
e4.format = (n2 = a2.format) == null ? null : n2, e4.minLength = (r2 = a2.minimum) == null ? null : r2, e4.maxLength = (i2 = a2.maximum) == null ? null : i2, e4.regex = (...t3) => e4.check(pc(...t3)), e4.includes = (...t3) => e4.check(gc(...t3)), e4.startsWith = (...t3) => e4.check(_c(...t3)), e4.endsWith = (...t3) => e4.check(vc(...t3)), e4.min = (...t3) => e4.check(dc(...t3)), e4.max = (...t3) => e4.check(uc(...t3)), e4.length = (...t3) => e4.check(fc(...t3)), e4.nonempty = (...t3) => e4.check(dc(1, ...t3)), e4.lowercase = (t3) => e4.check(mc(t3)), e4.uppercase = (t3) => e4.check(hc(t3)), e4.trim = () => e4.check(Cc()), e4.normalize = (...t3) => e4.check(Sc(...t3)), e4.toLowerCase = () => e4.check(wc()), e4.toUpperCase = () => e4.check(Tc()), e4.slugify = () => e4.check(Ec());
|
|
4959
|
+
}), Mu = c("ZodString", (e4, t2) => {
|
|
4960
|
+
mr.init(e4, t2), ju.init(e4, t2), e4.email = (t3) => e4.check(ns(Nu, t3)), e4.url = (t3) => e4.check(cs(Hu, t3)), e4.jwt = (t3) => e4.check(ws(xd, t3)), e4.emoji = (t3) => e4.check(ls(Gu, t3)), e4.guid = (t3) => e4.check(rs(Fu, t3)), e4.uuid = (t3) => e4.check(is(Lu, t3)), e4.uuidv4 = (t3) => e4.check(as(Lu, t3)), e4.uuidv6 = (t3) => e4.check(os(Lu, t3)), e4.uuidv7 = (t3) => e4.check(ss(Lu, t3)), e4.nanoid = (t3) => e4.check(us(qu, t3)), e4.guid = (t3) => e4.check(rs(Fu, t3)), e4.cuid = (t3) => e4.check(ds(Yu, t3)), e4.cuid2 = (t3) => e4.check(fs(Zu, t3)), e4.ulid = (t3) => e4.check(ps($u, t3)), e4.base64 = (t3) => e4.check(xs(hd, t3)), e4.base64url = (t3) => e4.check(Ss(_d, t3)), e4.xid = (t3) => e4.check(ms(td, t3)), e4.ksuid = (t3) => e4.check(hs(rd, t3)), e4.ipv4 = (t3) => e4.check(gs(ad, t3)), e4.ipv6 = (t3) => e4.check(_s(ld, t3)), e4.cidrv4 = (t3) => e4.check(ys(dd, t3)), e4.cidrv6 = (t3) => e4.check(bs(pd, t3)), e4.e164 = (t3) => e4.check(Cs(yd, t3)), e4.datetime = (t3) => e4.check(lu(t3)), e4.date = (t3) => e4.check(du(t3)), e4.time = (t3) => e4.check(pu(t3)), e4.duration = (t3) => e4.check(hu(t3));
|
|
4961
4961
|
});
|
|
4962
|
-
function
|
|
4963
|
-
return es(
|
|
4962
|
+
function N(e4) {
|
|
4963
|
+
return es(Mu, e4);
|
|
4964
4964
|
}
|
|
4965
|
-
var
|
|
4966
|
-
E.init(e4, t2),
|
|
4967
|
-
}),
|
|
4968
|
-
_r.init(e4, t2),
|
|
4965
|
+
var P = c("ZodStringFormat", (e4, t2) => {
|
|
4966
|
+
E.init(e4, t2), ju.init(e4, t2);
|
|
4967
|
+
}), Nu = c("ZodEmail", (e4, t2) => {
|
|
4968
|
+
_r.init(e4, t2), P.init(e4, t2);
|
|
4969
4969
|
});
|
|
4970
|
-
function
|
|
4971
|
-
return ns(
|
|
4970
|
+
function Pu(e4) {
|
|
4971
|
+
return ns(Nu, e4);
|
|
4972
4972
|
}
|
|
4973
|
-
var
|
|
4974
|
-
hr.init(e4, t2),
|
|
4973
|
+
var Fu = c("ZodGUID", (e4, t2) => {
|
|
4974
|
+
hr.init(e4, t2), P.init(e4, t2);
|
|
4975
4975
|
});
|
|
4976
|
-
function
|
|
4977
|
-
return rs(
|
|
4976
|
+
function Iu(e4) {
|
|
4977
|
+
return rs(Fu, e4);
|
|
4978
4978
|
}
|
|
4979
|
-
var
|
|
4980
|
-
gr.init(e4, t2),
|
|
4979
|
+
var Lu = c("ZodUUID", (e4, t2) => {
|
|
4980
|
+
gr.init(e4, t2), P.init(e4, t2);
|
|
4981
4981
|
});
|
|
4982
|
-
function Lu(e4) {
|
|
4983
|
-
return is(Iu, e4);
|
|
4984
|
-
}
|
|
4985
4982
|
function Ru(e4) {
|
|
4986
|
-
return
|
|
4983
|
+
return is(Lu, e4);
|
|
4987
4984
|
}
|
|
4988
4985
|
function zu(e4) {
|
|
4989
|
-
return
|
|
4986
|
+
return as(Lu, e4);
|
|
4990
4987
|
}
|
|
4991
4988
|
function Bu(e4) {
|
|
4992
|
-
return
|
|
4989
|
+
return os(Lu, e4);
|
|
4993
4990
|
}
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
});
|
|
4997
|
-
function Hu(e4) {
|
|
4998
|
-
return cs(Vu, e4);
|
|
4991
|
+
function Vu(e4) {
|
|
4992
|
+
return ss(Lu, e4);
|
|
4999
4993
|
}
|
|
4994
|
+
var Hu = c("ZodURL", (e4, t2) => {
|
|
4995
|
+
vr.init(e4, t2), P.init(e4, t2);
|
|
4996
|
+
});
|
|
5000
4997
|
function Uu(e4) {
|
|
5001
|
-
return cs(
|
|
4998
|
+
return cs(Hu, e4);
|
|
5002
4999
|
}
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
});
|
|
5006
|
-
function Gu(e4) {
|
|
5007
|
-
return ls(Wu, e4);
|
|
5000
|
+
function Wu(e4) {
|
|
5001
|
+
return cs(Hu, { protocol: /^https?$/, hostname: ln, ...x(e4) });
|
|
5008
5002
|
}
|
|
5009
|
-
var
|
|
5010
|
-
|
|
5003
|
+
var Gu = c("ZodEmoji", (e4, t2) => {
|
|
5004
|
+
yr.init(e4, t2), P.init(e4, t2);
|
|
5011
5005
|
});
|
|
5012
|
-
function
|
|
5013
|
-
return
|
|
5006
|
+
function Ku(e4) {
|
|
5007
|
+
return ls(Gu, e4);
|
|
5014
5008
|
}
|
|
5015
|
-
var
|
|
5016
|
-
|
|
5009
|
+
var qu = c("ZodNanoID", (e4, t2) => {
|
|
5010
|
+
br.init(e4, t2), P.init(e4, t2);
|
|
5017
5011
|
});
|
|
5018
|
-
function
|
|
5019
|
-
return
|
|
5012
|
+
function Ju(e4) {
|
|
5013
|
+
return us(qu, e4);
|
|
5020
5014
|
}
|
|
5021
|
-
var
|
|
5022
|
-
|
|
5015
|
+
var Yu = c("ZodCUID", (e4, t2) => {
|
|
5016
|
+
xr.init(e4, t2), P.init(e4, t2);
|
|
5023
5017
|
});
|
|
5024
|
-
function
|
|
5025
|
-
return
|
|
5018
|
+
function Xu(e4) {
|
|
5019
|
+
return ds(Yu, e4);
|
|
5026
5020
|
}
|
|
5027
|
-
var
|
|
5028
|
-
|
|
5021
|
+
var Zu = c("ZodCUID2", (e4, t2) => {
|
|
5022
|
+
Sr.init(e4, t2), P.init(e4, t2);
|
|
5029
5023
|
});
|
|
5030
|
-
function
|
|
5031
|
-
return
|
|
5024
|
+
function Qu(e4) {
|
|
5025
|
+
return fs(Zu, e4);
|
|
5032
5026
|
}
|
|
5033
|
-
var
|
|
5034
|
-
|
|
5027
|
+
var $u = c("ZodULID", (e4, t2) => {
|
|
5028
|
+
Cr.init(e4, t2), P.init(e4, t2);
|
|
5035
5029
|
});
|
|
5036
|
-
function
|
|
5037
|
-
return
|
|
5030
|
+
function ed(e4) {
|
|
5031
|
+
return ps($u, e4);
|
|
5038
5032
|
}
|
|
5039
|
-
var
|
|
5040
|
-
|
|
5033
|
+
var td = c("ZodXID", (e4, t2) => {
|
|
5034
|
+
wr.init(e4, t2), P.init(e4, t2);
|
|
5041
5035
|
});
|
|
5042
|
-
function
|
|
5043
|
-
return
|
|
5036
|
+
function nd(e4) {
|
|
5037
|
+
return ms(td, e4);
|
|
5044
5038
|
}
|
|
5045
|
-
var
|
|
5046
|
-
|
|
5039
|
+
var rd = c("ZodKSUID", (e4, t2) => {
|
|
5040
|
+
Tr.init(e4, t2), P.init(e4, t2);
|
|
5047
5041
|
});
|
|
5048
|
-
function
|
|
5049
|
-
return
|
|
5042
|
+
function id(e4) {
|
|
5043
|
+
return hs(rd, e4);
|
|
5050
5044
|
}
|
|
5051
|
-
var
|
|
5052
|
-
|
|
5045
|
+
var ad = c("ZodIPv4", (e4, t2) => {
|
|
5046
|
+
Ar.init(e4, t2), P.init(e4, t2);
|
|
5053
5047
|
});
|
|
5054
|
-
function
|
|
5055
|
-
return
|
|
5048
|
+
function od(e4) {
|
|
5049
|
+
return gs(ad, e4);
|
|
5056
5050
|
}
|
|
5057
|
-
var
|
|
5058
|
-
|
|
5051
|
+
var sd = c("ZodMAC", (e4, t2) => {
|
|
5052
|
+
Mr.init(e4, t2), P.init(e4, t2);
|
|
5059
5053
|
});
|
|
5060
|
-
function
|
|
5061
|
-
return
|
|
5054
|
+
function cd(e4) {
|
|
5055
|
+
return vs(sd, e4);
|
|
5062
5056
|
}
|
|
5063
|
-
var
|
|
5064
|
-
|
|
5057
|
+
var ld = c("ZodIPv6", (e4, t2) => {
|
|
5058
|
+
jr.init(e4, t2), P.init(e4, t2);
|
|
5065
5059
|
});
|
|
5066
|
-
function
|
|
5067
|
-
return
|
|
5060
|
+
function ud(e4) {
|
|
5061
|
+
return _s(ld, e4);
|
|
5068
5062
|
}
|
|
5069
|
-
var
|
|
5070
|
-
|
|
5063
|
+
var dd = c("ZodCIDRv4", (e4, t2) => {
|
|
5064
|
+
Nr.init(e4, t2), P.init(e4, t2);
|
|
5071
5065
|
});
|
|
5072
|
-
function
|
|
5073
|
-
return
|
|
5066
|
+
function fd(e4) {
|
|
5067
|
+
return ys(dd, e4);
|
|
5074
5068
|
}
|
|
5075
|
-
var
|
|
5076
|
-
|
|
5069
|
+
var pd = c("ZodCIDRv6", (e4, t2) => {
|
|
5070
|
+
Pr.init(e4, t2), P.init(e4, t2);
|
|
5077
5071
|
});
|
|
5078
|
-
function
|
|
5079
|
-
return
|
|
5072
|
+
function md(e4) {
|
|
5073
|
+
return bs(pd, e4);
|
|
5080
5074
|
}
|
|
5081
|
-
var
|
|
5082
|
-
|
|
5075
|
+
var hd = c("ZodBase64", (e4, t2) => {
|
|
5076
|
+
Ir.init(e4, t2), P.init(e4, t2);
|
|
5083
5077
|
});
|
|
5084
|
-
function
|
|
5085
|
-
return
|
|
5078
|
+
function gd(e4) {
|
|
5079
|
+
return xs(hd, e4);
|
|
5086
5080
|
}
|
|
5087
|
-
var
|
|
5088
|
-
|
|
5081
|
+
var _d = c("ZodBase64URL", (e4, t2) => {
|
|
5082
|
+
Rr.init(e4, t2), P.init(e4, t2);
|
|
5089
5083
|
});
|
|
5090
|
-
function
|
|
5091
|
-
return
|
|
5084
|
+
function vd(e4) {
|
|
5085
|
+
return Ss(_d, e4);
|
|
5092
5086
|
}
|
|
5093
|
-
var
|
|
5094
|
-
|
|
5087
|
+
var yd = c("ZodE164", (e4, t2) => {
|
|
5088
|
+
zr.init(e4, t2), P.init(e4, t2);
|
|
5095
5089
|
});
|
|
5096
|
-
function
|
|
5097
|
-
return
|
|
5090
|
+
function bd(e4) {
|
|
5091
|
+
return Cs(yd, e4);
|
|
5098
5092
|
}
|
|
5099
|
-
var
|
|
5100
|
-
|
|
5093
|
+
var xd = c("ZodJWT", (e4, t2) => {
|
|
5094
|
+
Vr.init(e4, t2), P.init(e4, t2);
|
|
5101
5095
|
});
|
|
5102
|
-
function
|
|
5103
|
-
return
|
|
5096
|
+
function Sd(e4) {
|
|
5097
|
+
return ws(xd, e4);
|
|
5104
5098
|
}
|
|
5105
|
-
|
|
5106
|
-
|
|
5099
|
+
var Cd = c("ZodCustomStringFormat", (e4, t2) => {
|
|
5100
|
+
Hr.init(e4, t2), P.init(e4, t2);
|
|
5101
|
+
});
|
|
5102
|
+
function wd(e4, t2, n2 = {}) {
|
|
5103
|
+
return al(Cd, e4, t2, n2);
|
|
5107
5104
|
}
|
|
5108
5105
|
function Td(e4) {
|
|
5109
|
-
return
|
|
5106
|
+
return al(Cd, "hostname", cn, e4);
|
|
5110
5107
|
}
|
|
5111
|
-
function Ed(e4
|
|
5108
|
+
function Ed(e4) {
|
|
5109
|
+
return al(Cd, "hex", Tn, e4);
|
|
5110
|
+
}
|
|
5111
|
+
function Dd(e4, t2) {
|
|
5112
5112
|
var n2;
|
|
5113
5113
|
let r2 = "".concat(e4, "_").concat((n2 = t2 == null ? void 0 : t2.enc) == null ? "hex" : n2), i2 = Mt[r2];
|
|
5114
5114
|
if (!i2) throw Error("Unrecognized hash format: ".concat(r2));
|
|
5115
|
-
return
|
|
5115
|
+
return al(Cd, r2, i2, t2);
|
|
5116
5116
|
}
|
|
5117
|
-
var
|
|
5117
|
+
var Od = c("ZodNumber", (e4, t2) => {
|
|
5118
5118
|
var n2, r2, i2, a2, o2, s2, c2, l2, u2;
|
|
5119
|
-
Ur.init(e4, t2),
|
|
5119
|
+
Ur.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n3, r3) => pl(e4, t3, n3, r3), e4.gt = (t3, n3) => e4.check(tc(t3, n3)), e4.gte = (t3, n3) => e4.check(O(t3, n3)), e4.min = (t3, n3) => e4.check(O(t3, n3)), e4.lt = (t3, n3) => e4.check($s(t3, n3)), e4.lte = (t3, n3) => e4.check(ec(t3, n3)), e4.max = (t3, n3) => e4.check(ec(t3, n3)), e4.int = (t3) => e4.check(Ad(t3)), e4.safe = (t3) => e4.check(Ad(t3)), e4.positive = (t3) => e4.check(tc(0, t3)), e4.nonnegative = (t3) => e4.check(O(0, t3)), e4.negative = (t3) => e4.check($s(0, t3)), e4.nonpositive = (t3) => e4.check(ec(0, t3)), e4.multipleOf = (t3, n3) => e4.check(oc(t3, n3)), e4.step = (t3, n3) => e4.check(oc(t3, n3)), e4.finite = () => e4;
|
|
5120
5120
|
let d2 = e4._zod.bag;
|
|
5121
5121
|
e4.minValue = (n2 = Math.max((r2 = d2.minimum) == null ? -1 / 0 : r2, (i2 = d2.exclusiveMinimum) == null ? -1 / 0 : i2)) == null ? null : n2, e4.maxValue = (a2 = Math.min((o2 = d2.maximum) == null ? 1 / 0 : o2, (s2 = d2.exclusiveMaximum) == null ? 1 / 0 : s2)) == null ? null : a2, e4.isInt = ((c2 = d2.format) == null ? "" : c2).includes("int") || Number.isSafeInteger((l2 = d2.multipleOf) == null ? 0.5 : l2), e4.isFinite = true, e4.format = (u2 = d2.format) == null ? null : u2;
|
|
5122
5122
|
});
|
|
5123
|
-
function
|
|
5124
|
-
return As(
|
|
5123
|
+
function F(e4) {
|
|
5124
|
+
return As(Od, e4);
|
|
5125
5125
|
}
|
|
5126
|
-
var
|
|
5127
|
-
Wr.init(e4, t2),
|
|
5126
|
+
var kd = c("ZodNumberFormat", (e4, t2) => {
|
|
5127
|
+
Wr.init(e4, t2), Od.init(e4, t2);
|
|
5128
5128
|
});
|
|
5129
|
-
function kd(e4) {
|
|
5130
|
-
return Ms(Od, e4);
|
|
5131
|
-
}
|
|
5132
5129
|
function Ad(e4) {
|
|
5133
|
-
return
|
|
5130
|
+
return Ms(kd, e4);
|
|
5134
5131
|
}
|
|
5135
5132
|
function jd(e4) {
|
|
5136
|
-
return
|
|
5133
|
+
return Ns(kd, e4);
|
|
5137
5134
|
}
|
|
5138
5135
|
function Md(e4) {
|
|
5139
|
-
return
|
|
5136
|
+
return Ps(kd, e4);
|
|
5140
5137
|
}
|
|
5141
5138
|
function Nd(e4) {
|
|
5142
|
-
return
|
|
5139
|
+
return Fs(kd, e4);
|
|
5143
5140
|
}
|
|
5144
|
-
|
|
5145
|
-
|
|
5141
|
+
function Pd(e4) {
|
|
5142
|
+
return Is(kd, e4);
|
|
5143
|
+
}
|
|
5144
|
+
var Fd = c("ZodBoolean", (e4, t2) => {
|
|
5145
|
+
Gr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => ml(e4, t3, n2, r2);
|
|
5146
5146
|
});
|
|
5147
|
-
function
|
|
5148
|
-
return Ls(
|
|
5147
|
+
function I(e4) {
|
|
5148
|
+
return Ls(Fd, e4);
|
|
5149
5149
|
}
|
|
5150
|
-
var
|
|
5150
|
+
var Id = c("ZodBigInt", (e4, t2) => {
|
|
5151
5151
|
var n2, r2, i2;
|
|
5152
|
-
Kr.init(e4, t2),
|
|
5152
|
+
Kr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n3, r3) => hl(e4, t3, n3, r3), e4.gte = (t3, n3) => e4.check(O(t3, n3)), e4.min = (t3, n3) => e4.check(O(t3, n3)), e4.gt = (t3, n3) => e4.check(tc(t3, n3)), e4.gte = (t3, n3) => e4.check(O(t3, n3)), e4.min = (t3, n3) => e4.check(O(t3, n3)), e4.lt = (t3, n3) => e4.check($s(t3, n3)), e4.lte = (t3, n3) => e4.check(ec(t3, n3)), e4.max = (t3, n3) => e4.check(ec(t3, n3)), e4.positive = (t3) => e4.check(tc(BigInt(0), t3)), e4.negative = (t3) => e4.check($s(BigInt(0), t3)), e4.nonpositive = (t3) => e4.check(ec(BigInt(0), t3)), e4.nonnegative = (t3) => e4.check(O(BigInt(0), t3)), e4.multipleOf = (t3, n3) => e4.check(oc(t3, n3));
|
|
5153
5153
|
let a2 = e4._zod.bag;
|
|
5154
5154
|
e4.minValue = (n2 = a2.minimum) == null ? null : n2, e4.maxValue = (r2 = a2.maximum) == null ? null : r2, e4.format = (i2 = a2.format) == null ? null : i2;
|
|
5155
5155
|
});
|
|
5156
|
-
function
|
|
5157
|
-
return zs(
|
|
5156
|
+
function Ld(e4) {
|
|
5157
|
+
return zs(Id, e4);
|
|
5158
5158
|
}
|
|
5159
|
-
var
|
|
5160
|
-
qr.init(e4, t2),
|
|
5159
|
+
var Rd = c("ZodBigIntFormat", (e4, t2) => {
|
|
5160
|
+
qr.init(e4, t2), Id.init(e4, t2);
|
|
5161
5161
|
});
|
|
5162
|
-
function Rd(e4) {
|
|
5163
|
-
return Vs(Ld, e4);
|
|
5164
|
-
}
|
|
5165
5162
|
function zd(e4) {
|
|
5166
|
-
return
|
|
5163
|
+
return Vs(Rd, e4);
|
|
5164
|
+
}
|
|
5165
|
+
function Bd(e4) {
|
|
5166
|
+
return Hs(Rd, e4);
|
|
5167
5167
|
}
|
|
5168
|
-
var
|
|
5169
|
-
Jr.init(e4, t2),
|
|
5168
|
+
var Vd = c("ZodSymbol", (e4, t2) => {
|
|
5169
|
+
Jr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => gl(e4, t3, n2, r2);
|
|
5170
5170
|
});
|
|
5171
|
-
function
|
|
5172
|
-
return Us(
|
|
5171
|
+
function Hd(e4) {
|
|
5172
|
+
return Us(Vd, e4);
|
|
5173
5173
|
}
|
|
5174
|
-
var
|
|
5175
|
-
Yr.init(e4, t2),
|
|
5174
|
+
var Ud = c("ZodUndefined", (e4, t2) => {
|
|
5175
|
+
Yr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => vl(e4, t3, n2, r2);
|
|
5176
5176
|
});
|
|
5177
|
-
function
|
|
5178
|
-
return Ws(
|
|
5177
|
+
function Wd(e4) {
|
|
5178
|
+
return Ws(Ud, e4);
|
|
5179
5179
|
}
|
|
5180
|
-
var
|
|
5181
|
-
Xr.init(e4, t2),
|
|
5180
|
+
var Gd = c("ZodNull", (e4, t2) => {
|
|
5181
|
+
Xr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => _l(e4, t3, n2, r2);
|
|
5182
5182
|
});
|
|
5183
|
-
function
|
|
5184
|
-
return Gs(
|
|
5183
|
+
function Kd(e4) {
|
|
5184
|
+
return Gs(Gd, e4);
|
|
5185
5185
|
}
|
|
5186
|
-
var
|
|
5187
|
-
Zr.init(e4, t2),
|
|
5186
|
+
var qd = c("ZodAny", (e4, t2) => {
|
|
5187
|
+
Zr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (e5, t3, n2) => void 0;
|
|
5188
5188
|
});
|
|
5189
|
-
function
|
|
5190
|
-
return Ks(
|
|
5189
|
+
function Jd() {
|
|
5190
|
+
return Ks(qd);
|
|
5191
5191
|
}
|
|
5192
|
-
var
|
|
5193
|
-
Qr.init(e4, t2),
|
|
5192
|
+
var Yd = c("ZodUnknown", (e4, t2) => {
|
|
5193
|
+
Qr.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (e5, t3, n2) => void 0;
|
|
5194
5194
|
});
|
|
5195
|
-
function
|
|
5196
|
-
return qs(
|
|
5195
|
+
function L() {
|
|
5196
|
+
return qs(Yd);
|
|
5197
5197
|
}
|
|
5198
|
-
var
|
|
5199
|
-
$r.init(e4, t2),
|
|
5198
|
+
var Xd = c("ZodNever", (e4, t2) => {
|
|
5199
|
+
$r.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => bl(e4, t3, n2, r2);
|
|
5200
5200
|
});
|
|
5201
|
-
function
|
|
5202
|
-
return Js(
|
|
5201
|
+
function Zd(e4) {
|
|
5202
|
+
return Js(Xd, e4);
|
|
5203
5203
|
}
|
|
5204
|
-
var
|
|
5205
|
-
ei.init(e4, t2),
|
|
5204
|
+
var Qd = c("ZodVoid", (e4, t2) => {
|
|
5205
|
+
ei.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => yl(e4, t3, n2, r2);
|
|
5206
5206
|
});
|
|
5207
|
-
function
|
|
5208
|
-
return Ys(
|
|
5207
|
+
function $d(e4) {
|
|
5208
|
+
return Ys(Qd, e4);
|
|
5209
5209
|
}
|
|
5210
|
-
var
|
|
5211
|
-
ti.init(e4, t2),
|
|
5210
|
+
var ef = c("ZodDate", (e4, t2) => {
|
|
5211
|
+
ti.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n3, r2) => Cl(e4, t3, n3, r2), e4.min = (t3, n3) => e4.check(O(t3, n3)), e4.max = (t3, n3) => e4.check(ec(t3, n3));
|
|
5212
5212
|
let n2 = e4._zod.bag;
|
|
5213
5213
|
e4.minDate = n2.minimum ? new Date(n2.minimum) : null, e4.maxDate = n2.maximum ? new Date(n2.maximum) : null;
|
|
5214
5214
|
});
|
|
5215
|
-
function
|
|
5216
|
-
return Xs(
|
|
5215
|
+
function tf(e4) {
|
|
5216
|
+
return Xs(ef, e4);
|
|
5217
5217
|
}
|
|
5218
|
-
var
|
|
5219
|
-
ri.init(e4, t2),
|
|
5218
|
+
var nf = c("ZodArray", (e4, t2) => {
|
|
5219
|
+
ri.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Fl(e4, t3, n2, r2), e4.element = t2.element, e4.min = (t3, n2) => e4.check(dc(t3, n2)), e4.nonempty = (t3) => e4.check(dc(1, t3)), e4.max = (t3, n2) => e4.check(uc(t3, n2)), e4.length = (t3, n2) => e4.check(fc(t3, n2)), e4.unwrap = () => e4.element;
|
|
5220
5220
|
});
|
|
5221
|
-
function
|
|
5222
|
-
return
|
|
5221
|
+
function R(e4, t2) {
|
|
5222
|
+
return Dc(nf, e4, t2);
|
|
5223
5223
|
}
|
|
5224
|
-
function
|
|
5224
|
+
function rf(e4) {
|
|
5225
5225
|
let t2 = e4._zod.def.shape;
|
|
5226
|
-
return
|
|
5226
|
+
return U(Object.keys(t2));
|
|
5227
5227
|
}
|
|
5228
|
-
var
|
|
5229
|
-
ci.init(e4, t2),
|
|
5228
|
+
var af = c("ZodObject", (e4, t2) => {
|
|
5229
|
+
ci.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Il(e4, t3, n2, r2), b(e4, "shape", () => t2.shape), e4.keyof = () => U(Object.keys(e4._zod.def.shape)), e4.catchall = (t3) => e4.clone({ ...e4._zod.def, catchall: t3 }), e4.passthrough = () => e4.clone({ ...e4._zod.def, catchall: L() }), e4.loose = () => e4.clone({ ...e4._zod.def, catchall: L() }), e4.strict = () => e4.clone({ ...e4._zod.def, catchall: Zd() }), e4.strip = () => e4.clone({ ...e4._zod.def, catchall: void 0 }), e4.extend = (t3) => Pe(e4, t3), e4.safeExtend = (t3) => Fe(e4, t3), e4.merge = (t3) => Ie(e4, t3), e4.pick = (t3) => Me(e4, t3), e4.omit = (t3) => Ne(e4, t3), e4.partial = (...t3) => Le(Af, e4, t3[0]), e4.required = (...t3) => Re(Bf, e4, t3[0]);
|
|
5230
5230
|
});
|
|
5231
|
-
function
|
|
5232
|
-
return new
|
|
5231
|
+
function z(e4, t2) {
|
|
5232
|
+
return new af({ type: "object", shape: e4 == null ? {} : e4, ...x(t2) });
|
|
5233
5233
|
}
|
|
5234
|
-
function
|
|
5235
|
-
return new
|
|
5234
|
+
function of(e4, t2) {
|
|
5235
|
+
return new af({ type: "object", shape: e4, catchall: Zd(), ...x(t2) });
|
|
5236
5236
|
}
|
|
5237
|
-
function
|
|
5238
|
-
return new
|
|
5237
|
+
function B(e4, t2) {
|
|
5238
|
+
return new af({ type: "object", shape: e4, catchall: L(), ...x(t2) });
|
|
5239
5239
|
}
|
|
5240
|
-
var
|
|
5241
|
-
ui.init(e4, t2),
|
|
5240
|
+
var sf = c("ZodUnion", (e4, t2) => {
|
|
5241
|
+
ui.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Ll(e4, t3, n2, r2), e4.options = t2.options;
|
|
5242
5242
|
});
|
|
5243
|
-
function
|
|
5244
|
-
return new
|
|
5243
|
+
function V(e4, t2) {
|
|
5244
|
+
return new sf({ type: "union", options: e4, ...x(t2) });
|
|
5245
5245
|
}
|
|
5246
|
-
var
|
|
5247
|
-
|
|
5246
|
+
var cf = c("ZodXor", (e4, t2) => {
|
|
5247
|
+
sf.init(e4, t2), fi.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Ll(e4, t3, n2, r2), e4.options = t2.options;
|
|
5248
5248
|
});
|
|
5249
|
-
function
|
|
5250
|
-
return new
|
|
5249
|
+
function lf(e4, t2) {
|
|
5250
|
+
return new cf({ type: "union", options: e4, inclusive: false, ...x(t2) });
|
|
5251
5251
|
}
|
|
5252
|
-
var
|
|
5253
|
-
|
|
5252
|
+
var uf = c("ZodDiscriminatedUnion", (e4, t2) => {
|
|
5253
|
+
sf.init(e4, t2), pi.init(e4, t2);
|
|
5254
5254
|
});
|
|
5255
|
-
function
|
|
5256
|
-
return new
|
|
5255
|
+
function df(e4, t2, n2) {
|
|
5256
|
+
return new uf({ type: "union", options: t2, discriminator: e4, ...x(n2) });
|
|
5257
5257
|
}
|
|
5258
|
-
var
|
|
5259
|
-
mi.init(e4, t2),
|
|
5258
|
+
var ff = c("ZodIntersection", (e4, t2) => {
|
|
5259
|
+
mi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Rl(e4, t3, n2, r2);
|
|
5260
5260
|
});
|
|
5261
|
-
function
|
|
5262
|
-
return new
|
|
5261
|
+
function pf(e4, t2) {
|
|
5262
|
+
return new ff({ type: "intersection", left: e4, right: t2 });
|
|
5263
5263
|
}
|
|
5264
|
-
var
|
|
5265
|
-
_i.init(e4, t2),
|
|
5264
|
+
var mf = c("ZodTuple", (e4, t2) => {
|
|
5265
|
+
_i.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => zl(e4, t3, n2, r2), e4.rest = (t3) => e4.clone({ ...e4._zod.def, rest: t3 });
|
|
5266
5266
|
});
|
|
5267
|
-
function
|
|
5267
|
+
function hf(e4, t2, n2) {
|
|
5268
5268
|
let r2 = t2 instanceof T;
|
|
5269
|
-
return new
|
|
5269
|
+
return new mf({ type: "tuple", items: e4, rest: r2 ? t2 : null, ...x(r2 ? n2 : t2) });
|
|
5270
5270
|
}
|
|
5271
|
-
var
|
|
5272
|
-
yi.init(e4, t2),
|
|
5271
|
+
var gf = c("ZodRecord", (e4, t2) => {
|
|
5272
|
+
yi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Bl(e4, t3, n2, r2), e4.keyType = t2.keyType, e4.valueType = t2.valueType;
|
|
5273
5273
|
});
|
|
5274
|
-
function
|
|
5275
|
-
return new
|
|
5274
|
+
function H(e4, t2, n2) {
|
|
5275
|
+
return new gf({ type: "record", keyType: e4, valueType: t2, ...x(n2) });
|
|
5276
5276
|
}
|
|
5277
|
-
function
|
|
5277
|
+
function _f(e4, t2, n2) {
|
|
5278
5278
|
let r2 = De(e4);
|
|
5279
|
-
return r2._zod.values = void 0, new
|
|
5279
|
+
return r2._zod.values = void 0, new gf({ type: "record", keyType: r2, valueType: t2, ...x(n2) });
|
|
5280
5280
|
}
|
|
5281
|
-
function
|
|
5282
|
-
return new
|
|
5281
|
+
function vf(e4, t2, n2) {
|
|
5282
|
+
return new gf({ type: "record", keyType: e4, valueType: t2, mode: "loose", ...x(n2) });
|
|
5283
5283
|
}
|
|
5284
|
-
var
|
|
5285
|
-
bi.init(e4, t2),
|
|
5284
|
+
var yf = c("ZodMap", (e4, t2) => {
|
|
5285
|
+
bi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Nl(e4, t3, n2, r2), e4.keyType = t2.keyType, e4.valueType = t2.valueType, e4.min = (...t3) => e4.check(cc(...t3)), e4.nonempty = (t3) => e4.check(cc(1, t3)), e4.max = (...t3) => e4.check(sc(...t3)), e4.size = (...t3) => e4.check(lc(...t3));
|
|
5286
5286
|
});
|
|
5287
|
-
function
|
|
5288
|
-
return new
|
|
5287
|
+
function bf(e4, t2, n2) {
|
|
5288
|
+
return new yf({ type: "map", keyType: e4, valueType: t2, ...x(n2) });
|
|
5289
5289
|
}
|
|
5290
|
-
var
|
|
5291
|
-
Si.init(e4, t2),
|
|
5290
|
+
var xf = c("ZodSet", (e4, t2) => {
|
|
5291
|
+
Si.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Pl(e4, t3, n2, r2), e4.min = (...t3) => e4.check(cc(...t3)), e4.nonempty = (t3) => e4.check(cc(1, t3)), e4.max = (...t3) => e4.check(sc(...t3)), e4.size = (...t3) => e4.check(lc(...t3));
|
|
5292
5292
|
});
|
|
5293
|
-
function
|
|
5294
|
-
return new
|
|
5293
|
+
function Sf(e4, t2) {
|
|
5294
|
+
return new xf({ type: "set", valueType: e4, ...x(t2) });
|
|
5295
5295
|
}
|
|
5296
|
-
var
|
|
5297
|
-
wi.init(e4, t2),
|
|
5296
|
+
var Cf = c("ZodEnum", (e4, t2) => {
|
|
5297
|
+
wi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n3, r2) => wl(e4, t3, n3, r2), e4.enum = t2.entries, e4.options = Object.values(t2.entries);
|
|
5298
5298
|
let n2 = new Set(Object.keys(t2.entries));
|
|
5299
5299
|
e4.extract = (e5, r2) => {
|
|
5300
5300
|
let i2 = {};
|
|
5301
5301
|
for (let r3 of e5) if (n2.has(r3)) i2[r3] = t2.entries[r3];
|
|
5302
5302
|
else throw Error("Key ".concat(r3, " not found in enum"));
|
|
5303
|
-
return new
|
|
5303
|
+
return new Cf({ ...t2, checks: [], ...x(r2), entries: i2 });
|
|
5304
5304
|
}, e4.exclude = (e5, r2) => {
|
|
5305
5305
|
let i2 = { ...t2.entries };
|
|
5306
5306
|
for (let t3 of e5) if (n2.has(t3)) delete i2[t3];
|
|
5307
5307
|
else throw Error("Key ".concat(t3, " not found in enum"));
|
|
5308
|
-
return new
|
|
5308
|
+
return new Cf({ ...t2, checks: [], ...x(r2), entries: i2 });
|
|
5309
5309
|
};
|
|
5310
5310
|
});
|
|
5311
|
-
function
|
|
5312
|
-
return new
|
|
5311
|
+
function U(e4, t2) {
|
|
5312
|
+
return new Cf({ type: "enum", entries: Array.isArray(e4) ? Object.fromEntries(e4.map((e5) => [e5, e5])) : e4, ...x(t2) });
|
|
5313
5313
|
}
|
|
5314
|
-
function
|
|
5315
|
-
return new
|
|
5314
|
+
function wf(e4, t2) {
|
|
5315
|
+
return new Cf({ type: "enum", entries: e4, ...x(t2) });
|
|
5316
5316
|
}
|
|
5317
|
-
var
|
|
5318
|
-
Ti.init(e4, t2),
|
|
5317
|
+
var Tf = c("ZodLiteral", (e4, t2) => {
|
|
5318
|
+
Ti.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Tl(e4, t3, n2, r2), e4.values = new Set(t2.values), Object.defineProperty(e4, "value", { get() {
|
|
5319
5319
|
if (t2.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
5320
5320
|
return t2.values[0];
|
|
5321
5321
|
} });
|
|
5322
5322
|
});
|
|
5323
|
-
function
|
|
5324
|
-
return new
|
|
5323
|
+
function W(e4, t2) {
|
|
5324
|
+
return new Tf({ type: "literal", values: Array.isArray(e4) ? e4 : [e4], ...x(t2) });
|
|
5325
5325
|
}
|
|
5326
|
-
var
|
|
5327
|
-
Ei.init(e4, t2),
|
|
5326
|
+
var Ef = c("ZodFile", (e4, t2) => {
|
|
5327
|
+
Ei.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Ol(e4, t3, n2, r2), e4.min = (t3, n2) => e4.check(cc(t3, n2)), e4.max = (t3, n2) => e4.check(sc(t3, n2)), e4.mime = (t3, n2) => e4.check(bc(Array.isArray(t3) ? t3 : [t3], n2));
|
|
5328
5328
|
});
|
|
5329
|
-
function
|
|
5330
|
-
return
|
|
5329
|
+
function Df(e4) {
|
|
5330
|
+
return zc(Ef, e4);
|
|
5331
5331
|
}
|
|
5332
|
-
var
|
|
5333
|
-
Di.init(e4, t2),
|
|
5332
|
+
var Of = c("ZodTransform", (e4, t2) => {
|
|
5333
|
+
Di.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Ml(e4, t3, n2, r2), e4._zod.parse = (n2, r2) => {
|
|
5334
5334
|
if (r2.direction === "backward") throw new d(e4.constructor.name);
|
|
5335
5335
|
n2.addIssue = (r3) => {
|
|
5336
5336
|
if (typeof r3 == "string") n2.issues.push(Ge(r3, n2.value, t2));
|
|
@@ -5343,132 +5343,132 @@ var Df = c("ZodTransform", (e4, t2) => {
|
|
|
5343
5343
|
return i2 instanceof Promise ? i2.then((e5) => (n2.value = e5, n2)) : (n2.value = i2, n2);
|
|
5344
5344
|
};
|
|
5345
5345
|
});
|
|
5346
|
-
function
|
|
5347
|
-
return new
|
|
5346
|
+
function kf(e4) {
|
|
5347
|
+
return new Of({ type: "transform", transform: e4 });
|
|
5348
5348
|
}
|
|
5349
|
-
var
|
|
5350
|
-
ki.init(e4, t2),
|
|
5349
|
+
var Af = c("ZodOptional", (e4, t2) => {
|
|
5350
|
+
ki.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Yl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5351
5351
|
});
|
|
5352
|
-
function
|
|
5353
|
-
return new kf({ type: "optional", innerType: e4 });
|
|
5354
|
-
}
|
|
5355
|
-
var Af = c("ZodExactOptional", (e4, t2) => {
|
|
5356
|
-
Ai.init(e4, t2), N.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Jl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5357
|
-
});
|
|
5358
|
-
function jf(e4) {
|
|
5352
|
+
function G(e4) {
|
|
5359
5353
|
return new Af({ type: "optional", innerType: e4 });
|
|
5360
5354
|
}
|
|
5361
|
-
var
|
|
5362
|
-
|
|
5355
|
+
var jf = c("ZodExactOptional", (e4, t2) => {
|
|
5356
|
+
Ai.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Yl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5363
5357
|
});
|
|
5364
|
-
function
|
|
5365
|
-
return new
|
|
5358
|
+
function Mf(e4) {
|
|
5359
|
+
return new jf({ type: "optional", innerType: e4 });
|
|
5366
5360
|
}
|
|
5361
|
+
var Nf = c("ZodNullable", (e4, t2) => {
|
|
5362
|
+
ji.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Vl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5363
|
+
});
|
|
5367
5364
|
function Pf(e4) {
|
|
5368
|
-
return
|
|
5365
|
+
return new Nf({ type: "nullable", innerType: e4 });
|
|
5366
|
+
}
|
|
5367
|
+
function Ff(e4) {
|
|
5368
|
+
return G(Pf(e4));
|
|
5369
5369
|
}
|
|
5370
|
-
var
|
|
5371
|
-
Mi.init(e4, t2),
|
|
5370
|
+
var If = c("ZodDefault", (e4, t2) => {
|
|
5371
|
+
Mi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Ul(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType, e4.removeDefault = e4.unwrap;
|
|
5372
5372
|
});
|
|
5373
|
-
function
|
|
5374
|
-
return new
|
|
5373
|
+
function Lf(e4, t2) {
|
|
5374
|
+
return new If({ type: "default", innerType: e4, get defaultValue() {
|
|
5375
5375
|
return typeof t2 == "function" ? t2() : xe(t2);
|
|
5376
5376
|
} });
|
|
5377
5377
|
}
|
|
5378
|
-
var
|
|
5379
|
-
Pi.init(e4, t2),
|
|
5378
|
+
var Rf = c("ZodPrefault", (e4, t2) => {
|
|
5379
|
+
Pi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Wl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5380
5380
|
});
|
|
5381
|
-
function
|
|
5382
|
-
return new
|
|
5381
|
+
function zf(e4, t2) {
|
|
5382
|
+
return new Rf({ type: "prefault", innerType: e4, get defaultValue() {
|
|
5383
5383
|
return typeof t2 == "function" ? t2() : xe(t2);
|
|
5384
5384
|
} });
|
|
5385
5385
|
}
|
|
5386
|
-
var
|
|
5387
|
-
Fi.init(e4, t2),
|
|
5386
|
+
var Bf = c("ZodNonOptional", (e4, t2) => {
|
|
5387
|
+
Fi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Hl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5388
5388
|
});
|
|
5389
|
-
function
|
|
5390
|
-
return new
|
|
5389
|
+
function Vf(e4, t2) {
|
|
5390
|
+
return new Bf({ type: "nonoptional", innerType: e4, ...x(t2) });
|
|
5391
5391
|
}
|
|
5392
|
-
var
|
|
5393
|
-
Li.init(e4, t2),
|
|
5392
|
+
var Hf = c("ZodSuccess", (e4, t2) => {
|
|
5393
|
+
Li.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => kl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5394
5394
|
});
|
|
5395
|
-
function
|
|
5396
|
-
return new
|
|
5395
|
+
function Uf(e4) {
|
|
5396
|
+
return new Hf({ type: "success", innerType: e4 });
|
|
5397
5397
|
}
|
|
5398
|
-
var
|
|
5399
|
-
Ri.init(e4, t2),
|
|
5398
|
+
var Wf = c("ZodCatch", (e4, t2) => {
|
|
5399
|
+
Ri.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Gl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType, e4.removeCatch = e4.unwrap;
|
|
5400
5400
|
});
|
|
5401
|
-
function
|
|
5402
|
-
return new
|
|
5401
|
+
function Gf(e4, t2) {
|
|
5402
|
+
return new Wf({ type: "catch", innerType: e4, catchValue: typeof t2 == "function" ? t2 : () => t2 });
|
|
5403
5403
|
}
|
|
5404
|
-
var
|
|
5405
|
-
zi.init(e4, t2),
|
|
5404
|
+
var Kf = c("ZodNaN", (e4, t2) => {
|
|
5405
|
+
zi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => El(e4, t3, n2, r2);
|
|
5406
5406
|
});
|
|
5407
|
-
function
|
|
5408
|
-
return Qs(
|
|
5407
|
+
function qf(e4) {
|
|
5408
|
+
return Qs(Kf, e4);
|
|
5409
5409
|
}
|
|
5410
|
-
var
|
|
5411
|
-
Bi.init(e4, t2),
|
|
5410
|
+
var Jf = c("ZodPipe", (e4, t2) => {
|
|
5411
|
+
Bi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Kl(e4, t3, n2, r2), e4.in = t2.in, e4.out = t2.out;
|
|
5412
5412
|
});
|
|
5413
|
-
function
|
|
5414
|
-
return new
|
|
5413
|
+
function Yf(e4, t2) {
|
|
5414
|
+
return new Jf({ type: "pipe", in: e4, out: t2 });
|
|
5415
5415
|
}
|
|
5416
|
-
var
|
|
5417
|
-
|
|
5416
|
+
var Xf = c("ZodCodec", (e4, t2) => {
|
|
5417
|
+
Jf.init(e4, t2), Hi.init(e4, t2);
|
|
5418
5418
|
});
|
|
5419
|
-
function
|
|
5420
|
-
return new
|
|
5419
|
+
function Zf(e4, t2, n2) {
|
|
5420
|
+
return new Xf({ type: "pipe", in: e4, out: t2, transform: n2.decode, reverseTransform: n2.encode });
|
|
5421
5421
|
}
|
|
5422
|
-
var
|
|
5423
|
-
Gi.init(e4, t2),
|
|
5422
|
+
var Qf = c("ZodReadonly", (e4, t2) => {
|
|
5423
|
+
Gi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => ql(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5424
5424
|
});
|
|
5425
|
-
function
|
|
5426
|
-
return new
|
|
5425
|
+
function $f(e4) {
|
|
5426
|
+
return new Qf({ type: "readonly", innerType: e4 });
|
|
5427
5427
|
}
|
|
5428
|
-
var
|
|
5429
|
-
qi.init(e4, t2),
|
|
5428
|
+
var ep = c("ZodTemplateLiteral", (e4, t2) => {
|
|
5429
|
+
qi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Dl(e4, t3, n2, r2);
|
|
5430
5430
|
});
|
|
5431
|
-
function
|
|
5432
|
-
return new
|
|
5431
|
+
function tp(e4, t2) {
|
|
5432
|
+
return new ep({ type: "template_literal", parts: e4, ...x(t2) });
|
|
5433
5433
|
}
|
|
5434
|
-
var
|
|
5435
|
-
Xi.init(e4, t2),
|
|
5434
|
+
var np = c("ZodLazy", (e4, t2) => {
|
|
5435
|
+
Xi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Xl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.getter();
|
|
5436
5436
|
});
|
|
5437
|
-
function
|
|
5438
|
-
return new
|
|
5437
|
+
function rp(e4) {
|
|
5438
|
+
return new np({ type: "lazy", getter: e4 });
|
|
5439
5439
|
}
|
|
5440
|
-
var
|
|
5441
|
-
Yi.init(e4, t2),
|
|
5440
|
+
var ip = c("ZodPromise", (e4, t2) => {
|
|
5441
|
+
Yi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Jl(e4, t3, n2, r2), e4.unwrap = () => e4._zod.def.innerType;
|
|
5442
5442
|
});
|
|
5443
|
-
function
|
|
5444
|
-
return new
|
|
5443
|
+
function ap(e4) {
|
|
5444
|
+
return new ip({ type: "promise", innerType: e4 });
|
|
5445
5445
|
}
|
|
5446
|
-
var
|
|
5447
|
-
Ji.init(e4, t2),
|
|
5446
|
+
var op = c("ZodFunction", (e4, t2) => {
|
|
5447
|
+
Ji.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => jl(e4, t3, n2, r2);
|
|
5448
5448
|
});
|
|
5449
|
-
function
|
|
5449
|
+
function sp(e4) {
|
|
5450
5450
|
var t2, n2;
|
|
5451
|
-
return new
|
|
5451
|
+
return new op({ type: "function", input: Array.isArray(e4 == null ? void 0 : e4.input) ? hf(e4 == null ? void 0 : e4.input) : (t2 = e4 == null ? void 0 : e4.input) == null ? R(L()) : t2, output: (n2 = e4 == null ? void 0 : e4.output) == null ? L() : n2 });
|
|
5452
5452
|
}
|
|
5453
|
-
var
|
|
5454
|
-
Zi.init(e4, t2),
|
|
5453
|
+
var cp = c("ZodCustom", (e4, t2) => {
|
|
5454
|
+
Zi.init(e4, t2), M.init(e4, t2), e4._zod.processJSONSchema = (t3, n2, r2) => Al(e4, t3, n2, r2);
|
|
5455
5455
|
});
|
|
5456
|
-
function
|
|
5456
|
+
function lp(e4) {
|
|
5457
5457
|
let t2 = new w({ check: "custom" });
|
|
5458
5458
|
return t2._zod.check = e4, t2;
|
|
5459
5459
|
}
|
|
5460
|
-
function
|
|
5461
|
-
return
|
|
5460
|
+
function up(e4, t2) {
|
|
5461
|
+
return Qc(cp, e4 == null ? (() => true) : e4, t2);
|
|
5462
5462
|
}
|
|
5463
|
-
function
|
|
5464
|
-
return
|
|
5463
|
+
function dp(e4, t2 = {}) {
|
|
5464
|
+
return $c(cp, e4, t2);
|
|
5465
5465
|
}
|
|
5466
|
-
function
|
|
5467
|
-
return
|
|
5466
|
+
function fp(e4) {
|
|
5467
|
+
return el(e4);
|
|
5468
5468
|
}
|
|
5469
|
-
var
|
|
5470
|
-
function
|
|
5471
|
-
let n2 = new
|
|
5469
|
+
var pp = nl, mp = rl;
|
|
5470
|
+
function hp(e4, t2 = {}) {
|
|
5471
|
+
let n2 = new cp({ type: "custom", check: "custom", fn: (t3) => t3 instanceof e4, abort: true, ...x(t2) });
|
|
5472
5472
|
return n2._zod.bag.Class = e4, n2._zod.check = (t3) => {
|
|
5473
5473
|
if (!(t3.value instanceof e4)) {
|
|
5474
5474
|
var r2;
|
|
@@ -5476,30 +5476,30 @@ function mp(e4, t2 = {}) {
|
|
|
5476
5476
|
}
|
|
5477
5477
|
}, n2;
|
|
5478
5478
|
}
|
|
5479
|
-
var
|
|
5480
|
-
function
|
|
5481
|
-
let t2 =
|
|
5479
|
+
var gp = (...e4) => il({ Codec: Xf, Boolean: Fd, String: Mu }, ...e4);
|
|
5480
|
+
function _p(e4) {
|
|
5481
|
+
let t2 = rp(() => V([N(e4), F(), I(), Kd(), R(t2), H(N(), t2)]));
|
|
5482
5482
|
return t2;
|
|
5483
5483
|
}
|
|
5484
|
-
function
|
|
5485
|
-
return
|
|
5484
|
+
function vp(e4, t2) {
|
|
5485
|
+
return Yf(kf(e4), t2);
|
|
5486
5486
|
}
|
|
5487
|
-
var
|
|
5488
|
-
function
|
|
5487
|
+
var yp = { 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" };
|
|
5488
|
+
function bp(e4) {
|
|
5489
5489
|
p({ customError: e4 });
|
|
5490
5490
|
}
|
|
5491
|
-
function
|
|
5491
|
+
function xp() {
|
|
5492
5492
|
return p().customError;
|
|
5493
5493
|
}
|
|
5494
|
-
var
|
|
5494
|
+
var Sp;
|
|
5495
5495
|
/* @__PURE__ */ (function(e4) {
|
|
5496
|
-
})(
|
|
5497
|
-
var
|
|
5498
|
-
function
|
|
5496
|
+
})(Sp || (Sp = {}));
|
|
5497
|
+
var K = { ...Au, ...ou, iso: su }, Cp = new Set("$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly".split("."));
|
|
5498
|
+
function wp(e4, t2) {
|
|
5499
5499
|
let n2 = e4.$schema;
|
|
5500
5500
|
return n2 === "https://json-schema.org/draft/2020-12/schema" ? "draft-2020-12" : n2 === "http://json-schema.org/draft-07/schema#" ? "draft-7" : n2 === "http://json-schema.org/draft-04/schema#" ? "draft-4" : t2 == null ? "draft-2020-12" : t2;
|
|
5501
5501
|
}
|
|
5502
|
-
function
|
|
5502
|
+
function Tp(e4, t2) {
|
|
5503
5503
|
if (!e4.startsWith("#")) throw Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
5504
5504
|
let n2 = e4.slice(1).split("/").filter(Boolean);
|
|
5505
5505
|
if (n2.length === 0) return t2.rootSchema;
|
|
@@ -5511,9 +5511,9 @@ function wp(e4, t2) {
|
|
|
5511
5511
|
}
|
|
5512
5512
|
throw Error("Reference not found: ".concat(e4));
|
|
5513
5513
|
}
|
|
5514
|
-
function
|
|
5514
|
+
function Ep(e4, t2) {
|
|
5515
5515
|
if (e4.not !== void 0) {
|
|
5516
|
-
if (typeof e4.not == "object" && Object.keys(e4.not).length === 0) return
|
|
5516
|
+
if (typeof e4.not == "object" && Object.keys(e4.not).length === 0) return K.never();
|
|
5517
5517
|
throw Error("not is not supported in Zod (except { not: {} } for never)");
|
|
5518
5518
|
}
|
|
5519
5519
|
if (e4.unevaluatedItems !== void 0) throw Error("unevaluatedItems is not supported");
|
|
@@ -5523,101 +5523,101 @@ function Tp(e4, t2) {
|
|
|
5523
5523
|
if (e4.$ref) {
|
|
5524
5524
|
let n3 = e4.$ref;
|
|
5525
5525
|
if (t2.refs.has(n3)) return t2.refs.get(n3);
|
|
5526
|
-
if (t2.processing.has(n3)) return
|
|
5526
|
+
if (t2.processing.has(n3)) return K.lazy(() => {
|
|
5527
5527
|
if (!t2.refs.has(n3)) throw Error("Circular reference not resolved: ".concat(n3));
|
|
5528
5528
|
return t2.refs.get(n3);
|
|
5529
5529
|
});
|
|
5530
5530
|
t2.processing.add(n3);
|
|
5531
|
-
let r3 =
|
|
5531
|
+
let r3 = q(Tp(n3, t2), t2);
|
|
5532
5532
|
return t2.refs.set(n3, r3), t2.processing.delete(n3), r3;
|
|
5533
5533
|
}
|
|
5534
5534
|
if (e4.enum !== void 0) {
|
|
5535
5535
|
let n3 = e4.enum;
|
|
5536
|
-
if (t2.version === "openapi-3.0" && e4.nullable === true && n3.length === 1 && n3[0] === null) return
|
|
5537
|
-
if (n3.length === 0) return
|
|
5538
|
-
if (n3.length === 1) return
|
|
5539
|
-
if (n3.every((e5) => typeof e5 == "string")) return
|
|
5540
|
-
let r3 = n3.map((e5) =>
|
|
5541
|
-
return r3.length < 2 ? r3[0] :
|
|
5542
|
-
}
|
|
5543
|
-
if (e4.const !== void 0) return
|
|
5536
|
+
if (t2.version === "openapi-3.0" && e4.nullable === true && n3.length === 1 && n3[0] === null) return K.null();
|
|
5537
|
+
if (n3.length === 0) return K.never();
|
|
5538
|
+
if (n3.length === 1) return K.literal(n3[0]);
|
|
5539
|
+
if (n3.every((e5) => typeof e5 == "string")) return K.enum(n3);
|
|
5540
|
+
let r3 = n3.map((e5) => K.literal(e5));
|
|
5541
|
+
return r3.length < 2 ? r3[0] : K.union([r3[0], r3[1], ...r3.slice(2)]);
|
|
5542
|
+
}
|
|
5543
|
+
if (e4.const !== void 0) return K.literal(e4.const);
|
|
5544
5544
|
let n2 = e4.type;
|
|
5545
5545
|
if (Array.isArray(n2)) {
|
|
5546
|
-
let r3 = n2.map((n3) =>
|
|
5547
|
-
return r3.length === 0 ?
|
|
5546
|
+
let r3 = n2.map((n3) => Ep({ ...e4, type: n3 }, t2));
|
|
5547
|
+
return r3.length === 0 ? K.never() : r3.length === 1 ? r3[0] : K.union(r3);
|
|
5548
5548
|
}
|
|
5549
|
-
if (!n2) return
|
|
5549
|
+
if (!n2) return K.any();
|
|
5550
5550
|
let r2;
|
|
5551
5551
|
switch (n2) {
|
|
5552
5552
|
case "string": {
|
|
5553
|
-
let t3 =
|
|
5553
|
+
let t3 = K.string();
|
|
5554
5554
|
if (e4.format) {
|
|
5555
5555
|
let n3 = e4.format;
|
|
5556
|
-
n3 === "email" ? t3 = t3.check(
|
|
5556
|
+
n3 === "email" ? t3 = t3.check(K.email()) : n3 === "uri" || n3 === "uri-reference" ? t3 = t3.check(K.url()) : n3 === "uuid" || n3 === "guid" ? t3 = t3.check(K.uuid()) : n3 === "date-time" ? t3 = t3.check(K.iso.datetime()) : n3 === "date" ? t3 = t3.check(K.iso.date()) : n3 === "time" ? t3 = t3.check(K.iso.time()) : n3 === "duration" ? t3 = t3.check(K.iso.duration()) : n3 === "ipv4" ? t3 = t3.check(K.ipv4()) : n3 === "ipv6" ? t3 = t3.check(K.ipv6()) : n3 === "mac" ? t3 = t3.check(K.mac()) : n3 === "cidr" ? t3 = t3.check(K.cidrv4()) : n3 === "cidr-v6" ? t3 = t3.check(K.cidrv6()) : n3 === "base64" ? t3 = t3.check(K.base64()) : n3 === "base64url" ? t3 = t3.check(K.base64url()) : n3 === "e164" ? t3 = t3.check(K.e164()) : n3 === "jwt" ? t3 = t3.check(K.jwt()) : n3 === "emoji" ? t3 = t3.check(K.emoji()) : n3 === "nanoid" ? t3 = t3.check(K.nanoid()) : n3 === "cuid" ? t3 = t3.check(K.cuid()) : n3 === "cuid2" ? t3 = t3.check(K.cuid2()) : n3 === "ulid" ? t3 = t3.check(K.ulid()) : n3 === "xid" ? t3 = t3.check(K.xid()) : n3 === "ksuid" && (t3 = t3.check(K.ksuid()));
|
|
5557
5557
|
}
|
|
5558
5558
|
typeof e4.minLength == "number" && (t3 = t3.min(e4.minLength)), typeof e4.maxLength == "number" && (t3 = t3.max(e4.maxLength)), e4.pattern && (t3 = t3.regex(new RegExp(e4.pattern))), r2 = t3;
|
|
5559
5559
|
break;
|
|
5560
5560
|
}
|
|
5561
5561
|
case "number":
|
|
5562
5562
|
case "integer": {
|
|
5563
|
-
let t3 = n2 === "integer" ?
|
|
5563
|
+
let t3 = n2 === "integer" ? K.number().int() : K.number();
|
|
5564
5564
|
typeof e4.minimum == "number" && (t3 = t3.min(e4.minimum)), typeof e4.maximum == "number" && (t3 = t3.max(e4.maximum)), typeof e4.exclusiveMinimum == "number" ? t3 = t3.gt(e4.exclusiveMinimum) : e4.exclusiveMinimum === true && typeof e4.minimum == "number" && (t3 = t3.gt(e4.minimum)), typeof e4.exclusiveMaximum == "number" ? t3 = t3.lt(e4.exclusiveMaximum) : e4.exclusiveMaximum === true && typeof e4.maximum == "number" && (t3 = t3.lt(e4.maximum)), typeof e4.multipleOf == "number" && (t3 = t3.multipleOf(e4.multipleOf)), r2 = t3;
|
|
5565
5565
|
break;
|
|
5566
5566
|
}
|
|
5567
5567
|
case "boolean":
|
|
5568
|
-
r2 =
|
|
5568
|
+
r2 = K.boolean();
|
|
5569
5569
|
break;
|
|
5570
5570
|
case "null":
|
|
5571
|
-
r2 =
|
|
5571
|
+
r2 = K.null();
|
|
5572
5572
|
break;
|
|
5573
5573
|
case "object": {
|
|
5574
5574
|
let n3 = {}, i2 = e4.properties || {}, a2 = new Set(e4.required || []);
|
|
5575
5575
|
for (let [e5, r3] of Object.entries(i2)) {
|
|
5576
|
-
let i3 =
|
|
5576
|
+
let i3 = q(r3, t2);
|
|
5577
5577
|
n3[e5] = a2.has(e5) ? i3 : i3.optional();
|
|
5578
5578
|
}
|
|
5579
5579
|
if (e4.propertyNames) {
|
|
5580
|
-
let i3 =
|
|
5580
|
+
let i3 = q(e4.propertyNames, t2), a3 = e4.additionalProperties && typeof e4.additionalProperties == "object" ? q(e4.additionalProperties, t2) : K.any();
|
|
5581
5581
|
if (Object.keys(n3).length === 0) {
|
|
5582
|
-
r2 =
|
|
5582
|
+
r2 = K.record(i3, a3);
|
|
5583
5583
|
break;
|
|
5584
5584
|
}
|
|
5585
|
-
let o3 =
|
|
5586
|
-
r2 =
|
|
5585
|
+
let o3 = K.object(n3).passthrough(), s2 = K.looseRecord(i3, a3);
|
|
5586
|
+
r2 = K.intersection(o3, s2);
|
|
5587
5587
|
break;
|
|
5588
5588
|
}
|
|
5589
5589
|
if (e4.patternProperties) {
|
|
5590
5590
|
let i3 = e4.patternProperties, a3 = Object.keys(i3), o3 = [];
|
|
5591
5591
|
for (let e5 of a3) {
|
|
5592
|
-
let n4 =
|
|
5593
|
-
o3.push(
|
|
5592
|
+
let n4 = q(i3[e5], t2), r3 = K.string().regex(new RegExp(e5));
|
|
5593
|
+
o3.push(K.looseRecord(r3, n4));
|
|
5594
5594
|
}
|
|
5595
5595
|
let s2 = [];
|
|
5596
|
-
if (Object.keys(n3).length > 0 && s2.push(
|
|
5596
|
+
if (Object.keys(n3).length > 0 && s2.push(K.object(n3).passthrough()), s2.push(...o3), s2.length === 0) r2 = K.object({}).passthrough();
|
|
5597
5597
|
else if (s2.length === 1) r2 = s2[0];
|
|
5598
5598
|
else {
|
|
5599
|
-
let e5 =
|
|
5600
|
-
for (let t3 = 2; t3 < s2.length; t3++) e5 =
|
|
5599
|
+
let e5 = K.intersection(s2[0], s2[1]);
|
|
5600
|
+
for (let t3 = 2; t3 < s2.length; t3++) e5 = K.intersection(e5, s2[t3]);
|
|
5601
5601
|
r2 = e5;
|
|
5602
5602
|
}
|
|
5603
5603
|
break;
|
|
5604
5604
|
}
|
|
5605
|
-
let o2 =
|
|
5606
|
-
r2 = e4.additionalProperties === false ? o2.strict() : typeof e4.additionalProperties == "object" ? o2.catchall(
|
|
5605
|
+
let o2 = K.object(n3);
|
|
5606
|
+
r2 = e4.additionalProperties === false ? o2.strict() : typeof e4.additionalProperties == "object" ? o2.catchall(q(e4.additionalProperties, t2)) : o2.passthrough();
|
|
5607
5607
|
break;
|
|
5608
5608
|
}
|
|
5609
5609
|
case "array": {
|
|
5610
5610
|
let n3 = e4.prefixItems, i2 = e4.items;
|
|
5611
5611
|
if (n3 && Array.isArray(n3)) {
|
|
5612
|
-
let a2 = n3.map((e5) =>
|
|
5613
|
-
r2 = o2 ?
|
|
5612
|
+
let a2 = n3.map((e5) => q(e5, t2)), o2 = i2 && typeof i2 == "object" && !Array.isArray(i2) ? q(i2, t2) : void 0;
|
|
5613
|
+
r2 = o2 ? K.tuple(a2).rest(o2) : K.tuple(a2), typeof e4.minItems == "number" && (r2 = r2.check(K.minLength(e4.minItems))), typeof e4.maxItems == "number" && (r2 = r2.check(K.maxLength(e4.maxItems)));
|
|
5614
5614
|
} else if (Array.isArray(i2)) {
|
|
5615
|
-
let n4 = i2.map((e5) =>
|
|
5616
|
-
r2 = a2 ?
|
|
5615
|
+
let n4 = i2.map((e5) => q(e5, t2)), a2 = e4.additionalItems && typeof e4.additionalItems == "object" ? q(e4.additionalItems, t2) : void 0;
|
|
5616
|
+
r2 = a2 ? K.tuple(n4).rest(a2) : K.tuple(n4), typeof e4.minItems == "number" && (r2 = r2.check(K.minLength(e4.minItems))), typeof e4.maxItems == "number" && (r2 = r2.check(K.maxLength(e4.maxItems)));
|
|
5617
5617
|
} else if (i2 !== void 0) {
|
|
5618
|
-
let n4 =
|
|
5618
|
+
let n4 = q(i2, t2), a2 = K.array(n4);
|
|
5619
5619
|
typeof e4.minItems == "number" && (a2 = a2.min(e4.minItems)), typeof e4.maxItems == "number" && (a2 = a2.max(e4.maxItems)), r2 = a2;
|
|
5620
|
-
} else r2 =
|
|
5620
|
+
} else r2 = K.array(K.any());
|
|
5621
5621
|
break;
|
|
5622
5622
|
}
|
|
5623
5623
|
default:
|
|
@@ -5625,120 +5625,120 @@ function Tp(e4, t2) {
|
|
|
5625
5625
|
}
|
|
5626
5626
|
return e4.description && (r2 = r2.describe(e4.description)), e4.default !== void 0 && (r2 = r2.default(e4.default)), r2;
|
|
5627
5627
|
}
|
|
5628
|
-
function
|
|
5629
|
-
if (typeof e4 == "boolean") return e4 ?
|
|
5630
|
-
let n2 =
|
|
5628
|
+
function q(e4, t2) {
|
|
5629
|
+
if (typeof e4 == "boolean") return e4 ? K.any() : K.never();
|
|
5630
|
+
let n2 = Ep(e4, t2), r2 = e4.type || e4.enum !== void 0 || e4.const !== void 0;
|
|
5631
5631
|
if (e4.anyOf && Array.isArray(e4.anyOf)) {
|
|
5632
|
-
let i3 = e4.anyOf.map((e5) =>
|
|
5633
|
-
n2 = r2 ?
|
|
5632
|
+
let i3 = e4.anyOf.map((e5) => q(e5, t2)), a2 = K.union(i3);
|
|
5633
|
+
n2 = r2 ? K.intersection(n2, a2) : a2;
|
|
5634
5634
|
}
|
|
5635
5635
|
if (e4.oneOf && Array.isArray(e4.oneOf)) {
|
|
5636
|
-
let i3 = e4.oneOf.map((e5) =>
|
|
5637
|
-
n2 = r2 ?
|
|
5636
|
+
let i3 = e4.oneOf.map((e5) => q(e5, t2)), a2 = K.xor(i3);
|
|
5637
|
+
n2 = r2 ? K.intersection(n2, a2) : a2;
|
|
5638
5638
|
}
|
|
5639
|
-
if (e4.allOf && Array.isArray(e4.allOf)) if (e4.allOf.length === 0) n2 = r2 ? n2 :
|
|
5639
|
+
if (e4.allOf && Array.isArray(e4.allOf)) if (e4.allOf.length === 0) n2 = r2 ? n2 : K.any();
|
|
5640
5640
|
else {
|
|
5641
|
-
let i3 = r2 ? n2 :
|
|
5642
|
-
for (let n3 = a2; n3 < e4.allOf.length; n3++) i3 =
|
|
5641
|
+
let i3 = r2 ? n2 : q(e4.allOf[0], t2), a2 = +!r2;
|
|
5642
|
+
for (let n3 = a2; n3 < e4.allOf.length; n3++) i3 = K.intersection(i3, q(e4.allOf[n3], t2));
|
|
5643
5643
|
n2 = i3;
|
|
5644
5644
|
}
|
|
5645
|
-
e4.nullable === true && t2.version === "openapi-3.0" && (n2 =
|
|
5645
|
+
e4.nullable === true && t2.version === "openapi-3.0" && (n2 = K.nullable(n2)), e4.readOnly === true && (n2 = K.readonly(n2));
|
|
5646
5646
|
let i2 = {};
|
|
5647
5647
|
for (let t3 of ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"]) t3 in e4 && (i2[t3] = e4[t3]);
|
|
5648
5648
|
for (let t3 of ["contentEncoding", "contentMediaType", "contentSchema"]) t3 in e4 && (i2[t3] = e4[t3]);
|
|
5649
|
-
for (let t3 of Object.keys(e4))
|
|
5649
|
+
for (let t3 of Object.keys(e4)) Cp.has(t3) || (i2[t3] = e4[t3]);
|
|
5650
5650
|
return Object.keys(i2).length > 0 && t2.registry.add(n2, i2), n2;
|
|
5651
5651
|
}
|
|
5652
|
-
function
|
|
5652
|
+
function Dp(e4, t2) {
|
|
5653
5653
|
var n2;
|
|
5654
|
-
return typeof e4 == "boolean" ? e4 ?
|
|
5655
|
-
}
|
|
5656
|
-
var Dp = t({ bigint: () => jp, boolean: () => Ap, date: () => Mp, number: () => kp, string: () => Op });
|
|
5657
|
-
function Op(e4) {
|
|
5658
|
-
return ts(ju, e4);
|
|
5654
|
+
return typeof e4 == "boolean" ? e4 ? K.any() : K.never() : q(e4, { version: wp(e4, t2 == null ? void 0 : t2.defaultTarget), defs: e4.$defs || e4.definitions || {}, refs: /* @__PURE__ */ new Map(), processing: /* @__PURE__ */ new Set(), rootSchema: e4, registry: (n2 = t2 == null ? void 0 : t2.registry) == null ? D : n2 });
|
|
5659
5655
|
}
|
|
5656
|
+
var Op = t({ bigint: () => Mp, boolean: () => jp, date: () => Np, number: () => Ap, string: () => kp });
|
|
5660
5657
|
function kp(e4) {
|
|
5661
|
-
return
|
|
5658
|
+
return ts(Mu, e4);
|
|
5662
5659
|
}
|
|
5663
5660
|
function Ap(e4) {
|
|
5664
|
-
return
|
|
5661
|
+
return js(Od, e4);
|
|
5665
5662
|
}
|
|
5666
5663
|
function jp(e4) {
|
|
5667
|
-
return
|
|
5664
|
+
return Rs(Fd, e4);
|
|
5668
5665
|
}
|
|
5669
5666
|
function Mp(e4) {
|
|
5670
|
-
return
|
|
5667
|
+
return Bs(Id, e4);
|
|
5671
5668
|
}
|
|
5672
|
-
|
|
5669
|
+
function Np(e4) {
|
|
5670
|
+
return Zs(ef, e4);
|
|
5671
|
+
}
|
|
5672
|
+
var Pp = t({ $brand: () => l, $input: () => Zo, $output: () => Xo, NEVER: () => s, TimePrecision: () => Ts, ZodAny: () => qd, ZodArray: () => nf, ZodBase64: () => hd, ZodBase64URL: () => _d, ZodBigInt: () => Id, ZodBigIntFormat: () => Rd, ZodBoolean: () => Fd, ZodCIDRv4: () => dd, ZodCIDRv6: () => pd, ZodCUID: () => Yu, ZodCUID2: () => Zu, ZodCatch: () => Wf, ZodCodec: () => Xf, ZodCustom: () => cp, ZodCustomStringFormat: () => Cd, ZodDate: () => ef, ZodDefault: () => If, ZodDiscriminatedUnion: () => uf, ZodE164: () => yd, ZodEmail: () => Nu, ZodEmoji: () => Gu, ZodEnum: () => Cf, ZodError: () => _u, ZodExactOptional: () => jf, ZodFile: () => Ef, ZodFirstPartyTypeKind: () => Sp, ZodFunction: () => op, ZodGUID: () => Fu, ZodIPv4: () => ad, ZodIPv6: () => ld, ZodISODate: () => uu, ZodISODateTime: () => cu, ZodISODuration: () => mu, ZodISOTime: () => fu, ZodIntersection: () => ff, ZodIssueCode: () => yp, ZodJWT: () => xd, ZodKSUID: () => rd, ZodLazy: () => np, ZodLiteral: () => Tf, ZodMAC: () => sd, ZodMap: () => yf, ZodNaN: () => Kf, ZodNanoID: () => qu, ZodNever: () => Xd, ZodNonOptional: () => Bf, ZodNull: () => Gd, ZodNullable: () => Nf, ZodNumber: () => Od, ZodNumberFormat: () => kd, ZodObject: () => af, ZodOptional: () => Af, ZodPipe: () => Jf, ZodPrefault: () => Rf, ZodPromise: () => ip, ZodReadonly: () => Qf, ZodRealError: () => j, ZodRecord: () => gf, ZodSet: () => xf, ZodString: () => Mu, ZodStringFormat: () => P, ZodSuccess: () => Hf, ZodSymbol: () => Vd, ZodTemplateLiteral: () => ep, ZodTransform: () => Of, ZodTuple: () => mf, ZodType: () => M, ZodULID: () => $u, ZodURL: () => Hu, ZodUUID: () => Lu, ZodUndefined: () => Ud, ZodUnion: () => sf, ZodUnknown: () => Yd, ZodVoid: () => Qd, ZodXID: () => td, ZodXor: () => cf, _ZodString: () => ju, _default: () => Lf, _function: () => sp, any: () => Jd, array: () => R, base64: () => gd, base64url: () => vd, bigint: () => Ld, boolean: () => I, catch: () => Gf, check: () => lp, cidrv4: () => fd, cidrv6: () => md, clone: () => De, codec: () => Zf, coerce: () => Op, config: () => p, core: () => tu, cuid: () => Xu, cuid2: () => Qu, custom: () => up, date: () => tf, decode: () => Cu, decodeAsync: () => Tu, describe: () => pp, discriminatedUnion: () => df, e164: () => bd, email: () => Pu, emoji: () => Ku, encode: () => Su, encodeAsync: () => wu, endsWith: () => vc, enum: () => U, exactOptional: () => Mf, file: () => Df, flattenError: () => rt, float32: () => jd, float64: () => Md, formatError: () => it, fromJSONSchema: () => Dp, function: () => sp, getErrorMap: () => xp, globalRegistry: () => D, gt: () => tc, gte: () => O, guid: () => Iu, hash: () => Dd, hex: () => Ed, hostname: () => Td, httpUrl: () => Wu, includes: () => gc, instanceof: () => hp, int: () => Ad, int32: () => Nd, int64: () => zd, intersection: () => pf, ipv4: () => od, ipv6: () => ud, iso: () => su, json: () => _p, jwt: () => Sd, keyof: () => rf, ksuid: () => id, lazy: () => rp, length: () => fc, literal: () => W, locales: () => Jo, looseObject: () => B, looseRecord: () => vf, lowercase: () => mc, lt: () => $s, lte: () => ec, mac: () => cd, map: () => bf, maxLength: () => uc, maxSize: () => sc, meta: () => mp, mime: () => bc, minLength: () => dc, minSize: () => cc, multipleOf: () => oc, nan: () => qf, nanoid: () => Ju, nativeEnum: () => wf, negative: () => rc, never: () => Zd, nonnegative: () => ac, nonoptional: () => Vf, nonpositive: () => ic, normalize: () => Sc, null: () => Kd, nullable: () => Pf, nullish: () => Ff, number: () => F, object: () => z, optional: () => G, overwrite: () => xc, parse: () => vu, parseAsync: () => yu, partialRecord: () => _f, pipe: () => Yf, positive: () => nc, prefault: () => zf, preprocess: () => vp, prettifyError: () => st, promise: () => ap, property: () => yc, readonly: () => $f, record: () => H, refine: () => dp, regex: () => pc, regexes: () => Mt, registry: () => $o, safeDecode: () => Du, safeDecodeAsync: () => ku, safeEncode: () => Eu, safeEncodeAsync: () => Ou, safeParse: () => bu, safeParseAsync: () => xu, set: () => Sf, setErrorMap: () => bp, size: () => lc, slugify: () => Ec, startsWith: () => _c, strictObject: () => of, string: () => N, stringFormat: () => wd, stringbool: () => gp, success: () => Uf, superRefine: () => fp, symbol: () => Hd, templateLiteral: () => tp, toJSONSchema: () => Ql, toLowerCase: () => wc, toUpperCase: () => Tc, transform: () => kf, treeifyError: () => at, trim: () => Cc, tuple: () => hf, uint32: () => Pd, uint64: () => Bd, ulid: () => ed, undefined: () => Wd, union: () => V, unknown: () => L, uppercase: () => hc, url: () => Uu, util: () => ee, uuid: () => Ru, uuidv4: () => zu, uuidv6: () => Bu, uuidv7: () => Vu, void: () => $d, xid: () => nd, xor: () => lf });
|
|
5673
5673
|
p(_a());
|
|
5674
|
-
var
|
|
5675
|
-
|
|
5676
|
-
var
|
|
5674
|
+
var Fp = t({ $brand: () => l, $input: () => Zo, $output: () => Xo, NEVER: () => s, TimePrecision: () => Ts, ZodAny: () => qd, ZodArray: () => nf, ZodBase64: () => hd, ZodBase64URL: () => _d, ZodBigInt: () => Id, ZodBigIntFormat: () => Rd, ZodBoolean: () => Fd, ZodCIDRv4: () => dd, ZodCIDRv6: () => pd, ZodCUID: () => Yu, ZodCUID2: () => Zu, ZodCatch: () => Wf, ZodCodec: () => Xf, ZodCustom: () => cp, ZodCustomStringFormat: () => Cd, ZodDate: () => ef, ZodDefault: () => If, ZodDiscriminatedUnion: () => uf, ZodE164: () => yd, ZodEmail: () => Nu, ZodEmoji: () => Gu, ZodEnum: () => Cf, ZodError: () => _u, ZodExactOptional: () => jf, ZodFile: () => Ef, ZodFirstPartyTypeKind: () => Sp, ZodFunction: () => op, ZodGUID: () => Fu, ZodIPv4: () => ad, ZodIPv6: () => ld, ZodISODate: () => uu, ZodISODateTime: () => cu, ZodISODuration: () => mu, ZodISOTime: () => fu, ZodIntersection: () => ff, ZodIssueCode: () => yp, ZodJWT: () => xd, ZodKSUID: () => rd, ZodLazy: () => np, ZodLiteral: () => Tf, ZodMAC: () => sd, ZodMap: () => yf, ZodNaN: () => Kf, ZodNanoID: () => qu, ZodNever: () => Xd, ZodNonOptional: () => Bf, ZodNull: () => Gd, ZodNullable: () => Nf, ZodNumber: () => Od, ZodNumberFormat: () => kd, ZodObject: () => af, ZodOptional: () => Af, ZodPipe: () => Jf, ZodPrefault: () => Rf, ZodPromise: () => ip, ZodReadonly: () => Qf, ZodRealError: () => j, ZodRecord: () => gf, ZodSet: () => xf, ZodString: () => Mu, ZodStringFormat: () => P, ZodSuccess: () => Hf, ZodSymbol: () => Vd, ZodTemplateLiteral: () => ep, ZodTransform: () => Of, ZodTuple: () => mf, ZodType: () => M, ZodULID: () => $u, ZodURL: () => Hu, ZodUUID: () => Lu, ZodUndefined: () => Ud, ZodUnion: () => sf, ZodUnknown: () => Yd, ZodVoid: () => Qd, ZodXID: () => td, ZodXor: () => cf, _ZodString: () => ju, _default: () => Lf, _function: () => sp, any: () => Jd, array: () => R, base64: () => gd, base64url: () => vd, bigint: () => Ld, boolean: () => I, catch: () => Gf, check: () => lp, cidrv4: () => fd, cidrv6: () => md, clone: () => De, codec: () => Zf, coerce: () => Op, config: () => p, core: () => tu, cuid: () => Xu, cuid2: () => Qu, custom: () => up, date: () => tf, decode: () => Cu, decodeAsync: () => Tu, describe: () => pp, discriminatedUnion: () => df, e164: () => bd, email: () => Pu, emoji: () => Ku, encode: () => Su, encodeAsync: () => wu, endsWith: () => vc, enum: () => U, exactOptional: () => Mf, file: () => Df, flattenError: () => rt, float32: () => jd, float64: () => Md, formatError: () => it, fromJSONSchema: () => Dp, function: () => sp, getErrorMap: () => xp, globalRegistry: () => D, gt: () => tc, gte: () => O, guid: () => Iu, hash: () => Dd, hex: () => Ed, hostname: () => Td, httpUrl: () => Wu, includes: () => gc, instanceof: () => hp, int: () => Ad, int32: () => Nd, int64: () => zd, intersection: () => pf, ipv4: () => od, ipv6: () => ud, iso: () => su, json: () => _p, jwt: () => Sd, keyof: () => rf, ksuid: () => id, lazy: () => rp, length: () => fc, literal: () => W, locales: () => Jo, looseObject: () => B, looseRecord: () => vf, lowercase: () => mc, lt: () => $s, lte: () => ec, mac: () => cd, map: () => bf, maxLength: () => uc, maxSize: () => sc, meta: () => mp, mime: () => bc, minLength: () => dc, minSize: () => cc, multipleOf: () => oc, nan: () => qf, nanoid: () => Ju, nativeEnum: () => wf, negative: () => rc, never: () => Zd, nonnegative: () => ac, nonoptional: () => Vf, nonpositive: () => ic, normalize: () => Sc, null: () => Kd, nullable: () => Pf, nullish: () => Ff, number: () => F, object: () => z, optional: () => G, overwrite: () => xc, parse: () => vu, parseAsync: () => yu, partialRecord: () => _f, pipe: () => Yf, positive: () => nc, prefault: () => zf, preprocess: () => vp, prettifyError: () => st, promise: () => ap, property: () => yc, readonly: () => $f, record: () => H, refine: () => dp, regex: () => pc, regexes: () => Mt, registry: () => $o, safeDecode: () => Du, safeDecodeAsync: () => ku, safeEncode: () => Eu, safeEncodeAsync: () => Ou, safeParse: () => bu, safeParseAsync: () => xu, set: () => Sf, setErrorMap: () => bp, size: () => lc, slugify: () => Ec, startsWith: () => _c, strictObject: () => of, string: () => N, stringFormat: () => wd, stringbool: () => gp, success: () => Uf, superRefine: () => fp, symbol: () => Hd, templateLiteral: () => tp, toJSONSchema: () => Ql, toLowerCase: () => wc, toUpperCase: () => Tc, transform: () => kf, treeifyError: () => at, trim: () => Cc, tuple: () => hf, uint32: () => Pd, uint64: () => Bd, ulid: () => ed, undefined: () => Wd, union: () => V, unknown: () => L, uppercase: () => hc, url: () => Uu, util: () => ee, uuid: () => Ru, uuidv4: () => zu, uuidv6: () => Bu, uuidv7: () => Vu, void: () => $d, xid: () => nd, xor: () => lf, z: () => Pp }), Ip = "io.modelcontextprotocol/related-task", J = up((e4) => e4 !== null && (typeof e4 == "object" || typeof e4 == "function")), Lp = V([N(), F().int()]), Rp = N();
|
|
5675
|
+
B({ ttl: F().optional(), pollInterval: F().optional() });
|
|
5676
|
+
var zp = z({ ttl: F().optional() }), Bp = z({ taskId: N() }), Vp = B({ progressToken: Lp.optional(), [Ip]: Bp.optional() }), Hp = z({ _meta: Vp.optional() }), Up = Hp.extend({ task: zp.optional() }), Wp = (e4) => Up.safeParse(e4).success, Y = z({ method: N(), params: Hp.loose().optional() }), Gp = z({ _meta: Vp.optional() }), Kp = z({ method: N(), params: Gp.loose().optional() }), X = B({ _meta: Vp.optional() }), qp = V([N(), F().int()]), Jp = z({ jsonrpc: W("2.0"), id: qp, ...Y.shape }).strict(), Yp = (e4) => Jp.safeParse(e4).success, Xp = z({ jsonrpc: W("2.0"), ...Kp.shape }).strict(), Zp = (e4) => Xp.safeParse(e4).success, Qp = z({ jsonrpc: W("2.0"), id: qp, result: X }).strict(), $p = (e4) => Qp.safeParse(e4).success, Z;
|
|
5677
5677
|
(function(e4) {
|
|
5678
5678
|
e4[e4.ConnectionClosed = -32e3] = "ConnectionClosed", e4[e4.RequestTimeout = -32001] = "RequestTimeout", e4[e4.ParseError = -32700] = "ParseError", e4[e4.InvalidRequest = -32600] = "InvalidRequest", e4[e4.MethodNotFound = -32601] = "MethodNotFound", e4[e4.InvalidParams = -32602] = "InvalidParams", e4[e4.InternalError = -32603] = "InternalError", e4[e4.UrlElicitationRequired = -32042] = "UrlElicitationRequired";
|
|
5679
|
-
})(
|
|
5680
|
-
var
|
|
5681
|
-
|
|
5682
|
-
var
|
|
5683
|
-
|
|
5684
|
-
var
|
|
5679
|
+
})(Z || (Z = {}));
|
|
5680
|
+
var em = z({ jsonrpc: W("2.0"), id: qp.optional(), error: z({ code: F().int(), message: N(), data: L().optional() }) }).strict(), tm = (e4) => em.safeParse(e4).success, nm = V([Jp, Xp, Qp, em]);
|
|
5681
|
+
V([Qp, em]);
|
|
5682
|
+
var rm = X.strict(), im = Gp.extend({ requestId: qp.optional(), reason: N().optional() }), am = Kp.extend({ method: W("notifications/cancelled"), params: im }), om = z({ icons: R(z({ src: N(), mimeType: N().optional(), sizes: R(N()).optional(), theme: U(["light", "dark"]).optional() })).optional() }), sm = z({ name: N(), title: N().optional() }), cm = sm.extend({ ...sm.shape, ...om.shape, version: N(), websiteUrl: N().optional(), description: N().optional() }), lm = vp((e4) => e4 && typeof e4 == "object" && !Array.isArray(e4) && Object.keys(e4).length === 0 ? { form: {} } : e4, pf(z({ form: pf(z({ applyDefaults: I().optional() }), H(N(), L())).optional(), url: J.optional() }), H(N(), L()).optional())), um = B({ list: J.optional(), cancel: J.optional(), requests: B({ sampling: B({ createMessage: J.optional() }).optional(), elicitation: B({ create: J.optional() }).optional() }).optional() }), dm = B({ list: J.optional(), cancel: J.optional(), requests: B({ tools: B({ call: J.optional() }).optional() }).optional() }), fm = z({ experimental: H(N(), J).optional(), sampling: z({ context: J.optional(), tools: J.optional() }).optional(), elicitation: lm.optional(), roots: z({ listChanged: I().optional() }).optional(), tasks: um.optional(), extensions: H(N(), J).optional() }), pm = Hp.extend({ protocolVersion: N(), capabilities: fm, clientInfo: cm }), mm = Y.extend({ method: W("initialize"), params: pm }), hm = z({ experimental: H(N(), J).optional(), logging: J.optional(), completions: J.optional(), prompts: z({ listChanged: I().optional() }).optional(), resources: z({ subscribe: I().optional(), listChanged: I().optional() }).optional(), tools: z({ listChanged: I().optional() }).optional(), tasks: dm.optional(), extensions: H(N(), J).optional() }), gm = X.extend({ protocolVersion: N(), capabilities: hm, serverInfo: cm, instructions: N().optional() }), _m = Kp.extend({ method: W("notifications/initialized"), params: Gp.optional() }), vm = Y.extend({ method: W("ping"), params: Hp.optional() }), ym = z({ progress: F(), total: G(F()), message: G(N()) }), bm = z({ ...Gp.shape, ...ym.shape, progressToken: Lp }), xm = Kp.extend({ method: W("notifications/progress"), params: bm }), Sm = Hp.extend({ cursor: Rp.optional() }), Cm = Y.extend({ params: Sm.optional() }), wm = X.extend({ nextCursor: Rp.optional() }), Tm = U(["working", "input_required", "completed", "failed", "cancelled"]), Em = z({ taskId: N(), status: Tm, ttl: V([F(), Kd()]), createdAt: N(), lastUpdatedAt: N(), pollInterval: G(F()), statusMessage: G(N()) }), Dm = X.extend({ task: Em }), Om = Gp.merge(Em), km = Kp.extend({ method: W("notifications/tasks/status"), params: Om }), Am = Y.extend({ method: W("tasks/get"), params: Hp.extend({ taskId: N() }) }), jm = X.merge(Em), Mm = Y.extend({ method: W("tasks/result"), params: Hp.extend({ taskId: N() }) });
|
|
5683
|
+
X.loose();
|
|
5684
|
+
var Nm = Cm.extend({ method: W("tasks/list") }), Pm = wm.extend({ tasks: R(Em) }), Fm = Y.extend({ method: W("tasks/cancel"), params: Hp.extend({ taskId: N() }) }), Im = X.merge(Em), Lm = z({ uri: N(), mimeType: G(N()), _meta: H(N(), L()).optional() }), Rm = Lm.extend({ text: N() }), zm = N().refine((e4) => {
|
|
5685
5685
|
try {
|
|
5686
5686
|
return atob(e4), true;
|
|
5687
5687
|
} catch (e5) {
|
|
5688
5688
|
return false;
|
|
5689
5689
|
}
|
|
5690
|
-
}, { message: "Invalid Base64 string" }),
|
|
5691
|
-
|
|
5692
|
-
var
|
|
5693
|
-
|
|
5694
|
-
var
|
|
5695
|
-
|
|
5696
|
-
var
|
|
5690
|
+
}, { message: "Invalid Base64 string" }), Bm = Lm.extend({ blob: zm }), Vm = U(["user", "assistant"]), Hm = z({ audience: R(Vm).optional(), priority: F().min(0).max(1).optional(), lastModified: lu({ offset: true }).optional() }), Um = z({ ...sm.shape, ...om.shape, uri: N(), description: G(N()), mimeType: G(N()), size: G(F()), annotations: Hm.optional(), _meta: G(B({})) }), Wm = z({ ...sm.shape, ...om.shape, uriTemplate: N(), description: G(N()), mimeType: G(N()), annotations: Hm.optional(), _meta: G(B({})) }), Gm = Cm.extend({ method: W("resources/list") }), Km = wm.extend({ resources: R(Um) }), qm = Cm.extend({ method: W("resources/templates/list") }), Jm = wm.extend({ resourceTemplates: R(Wm) }), Ym = Hp.extend({ uri: N() }), Xm = Ym, Zm = Y.extend({ method: W("resources/read"), params: Xm }), Qm = X.extend({ contents: R(V([Rm, Bm])) }), $m = Kp.extend({ method: W("notifications/resources/list_changed"), params: Gp.optional() }), eh = Ym, th = Y.extend({ method: W("resources/subscribe"), params: eh }), nh = Ym, rh = Y.extend({ method: W("resources/unsubscribe"), params: nh }), ih = Gp.extend({ uri: N() }), ah = Kp.extend({ method: W("notifications/resources/updated"), params: ih }), oh = z({ name: N(), description: G(N()), required: G(I()) }), sh = z({ ...sm.shape, ...om.shape, description: G(N()), arguments: G(R(oh)), _meta: G(B({})) }), ch = Cm.extend({ method: W("prompts/list") }), lh = wm.extend({ prompts: R(sh) }), uh = Hp.extend({ name: N(), arguments: H(N(), N()).optional() }), dh = Y.extend({ method: W("prompts/get"), params: uh }), fh = z({ type: W("text"), text: N(), annotations: Hm.optional(), _meta: H(N(), L()).optional() }), ph = z({ type: W("image"), data: zm, mimeType: N(), annotations: Hm.optional(), _meta: H(N(), L()).optional() }), mh = z({ type: W("audio"), data: zm, mimeType: N(), annotations: Hm.optional(), _meta: H(N(), L()).optional() }), hh = z({ type: W("tool_use"), name: N(), id: N(), input: H(N(), L()), _meta: H(N(), L()).optional() }), gh = z({ type: W("resource"), resource: V([Rm, Bm]), annotations: Hm.optional(), _meta: H(N(), L()).optional() }), _h = Um.extend({ type: W("resource_link") }), vh = V([fh, ph, mh, _h, gh]), yh = z({ role: Vm, content: vh }), bh = X.extend({ description: N().optional(), messages: R(yh) }), xh = Kp.extend({ method: W("notifications/prompts/list_changed"), params: Gp.optional() }), Sh = z({ title: N().optional(), readOnlyHint: I().optional(), destructiveHint: I().optional(), idempotentHint: I().optional(), openWorldHint: I().optional() }), Ch = z({ taskSupport: U(["required", "optional", "forbidden"]).optional() }), wh = z({ ...sm.shape, ...om.shape, description: N().optional(), inputSchema: z({ type: W("object"), properties: H(N(), J).optional(), required: R(N()).optional() }).catchall(L()), outputSchema: z({ type: W("object"), properties: H(N(), J).optional(), required: R(N()).optional() }).catchall(L()).optional(), annotations: Sh.optional(), execution: Ch.optional(), _meta: H(N(), L()).optional() }), Th = Cm.extend({ method: W("tools/list") }), Eh = wm.extend({ tools: R(wh) }), Dh = X.extend({ content: R(vh).default([]), structuredContent: H(N(), L()).optional(), isError: I().optional() });
|
|
5691
|
+
Dh.or(X.extend({ toolResult: L() }));
|
|
5692
|
+
var Oh = Up.extend({ name: N(), arguments: H(N(), L()).optional() }), kh = Y.extend({ method: W("tools/call"), params: Oh }), Ah = Kp.extend({ method: W("notifications/tools/list_changed"), params: Gp.optional() });
|
|
5693
|
+
z({ autoRefresh: I().default(true), debounceMs: F().int().nonnegative().default(300) });
|
|
5694
|
+
var jh = U(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]), Mh = Hp.extend({ level: jh }), Nh = Y.extend({ method: W("logging/setLevel"), params: Mh }), Ph = Gp.extend({ level: jh, logger: N().optional(), data: L() }), Fh = Kp.extend({ method: W("notifications/message"), params: Ph }), Ih = z({ hints: R(z({ name: N().optional() })).optional(), costPriority: F().min(0).max(1).optional(), speedPriority: F().min(0).max(1).optional(), intelligencePriority: F().min(0).max(1).optional() }), Lh = z({ mode: U(["auto", "required", "none"]).optional() }), Rh = z({ type: W("tool_result"), toolUseId: N().describe("The unique identifier for the corresponding tool call."), content: R(vh).default([]), structuredContent: z({}).loose().optional(), isError: I().optional(), _meta: H(N(), L()).optional() }), zh = df("type", [fh, ph, mh]), Bh = df("type", [fh, ph, mh, hh, Rh]), Vh = z({ role: Vm, content: V([Bh, R(Bh)]), _meta: H(N(), L()).optional() }), Hh = Up.extend({ messages: R(Vh), modelPreferences: Ih.optional(), systemPrompt: N().optional(), includeContext: U(["none", "thisServer", "allServers"]).optional(), temperature: F().optional(), maxTokens: F().int(), stopSequences: R(N()).optional(), metadata: J.optional(), tools: R(wh).optional(), toolChoice: Lh.optional() }), Uh = Y.extend({ method: W("sampling/createMessage"), params: Hh }), Wh = X.extend({ model: N(), stopReason: G(U(["endTurn", "stopSequence", "maxTokens"]).or(N())), role: Vm, content: zh }), Gh = X.extend({ model: N(), stopReason: G(U(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(N())), role: Vm, content: V([Bh, R(Bh)]) }), Kh = z({ type: W("boolean"), title: N().optional(), description: N().optional(), default: I().optional() }), qh = z({ type: W("string"), title: N().optional(), description: N().optional(), minLength: F().optional(), maxLength: F().optional(), format: U(["email", "uri", "date", "date-time"]).optional(), default: N().optional() }), Jh = z({ type: U(["number", "integer"]), title: N().optional(), description: N().optional(), minimum: F().optional(), maximum: F().optional(), default: F().optional() }), Yh = z({ type: W("string"), title: N().optional(), description: N().optional(), enum: R(N()), default: N().optional() }), Xh = z({ type: W("string"), title: N().optional(), description: N().optional(), oneOf: R(z({ const: N(), title: N() })), default: N().optional() }), Zh = V([V([z({ type: W("string"), title: N().optional(), description: N().optional(), enum: R(N()), enumNames: R(N()).optional(), default: N().optional() }), V([Yh, Xh]), V([z({ type: W("array"), title: N().optional(), description: N().optional(), minItems: F().optional(), maxItems: F().optional(), items: z({ type: W("string"), enum: R(N()) }), default: R(N()).optional() }), z({ type: W("array"), title: N().optional(), description: N().optional(), minItems: F().optional(), maxItems: F().optional(), items: z({ anyOf: R(z({ const: N(), title: N() })) }), default: R(N()).optional() })])]), Kh, qh, Jh]), Qh = V([Up.extend({ mode: W("form").optional(), message: N(), requestedSchema: z({ type: W("object"), properties: H(N(), Zh), required: R(N()).optional() }) }), Up.extend({ mode: W("url"), message: N(), elicitationId: N(), url: N().url() })]), $h = Y.extend({ method: W("elicitation/create"), params: Qh }), eg = Gp.extend({ elicitationId: N() }), tg = Kp.extend({ method: W("notifications/elicitation/complete"), params: eg }), ng = X.extend({ action: U(["accept", "decline", "cancel"]), content: vp((e4) => e4 === null ? void 0 : e4, H(N(), V([N(), F(), I(), R(N())])).optional()) }), rg = z({ type: W("ref/resource"), uri: N() }), ig = z({ type: W("ref/prompt"), name: N() }), ag = Hp.extend({ ref: V([ig, rg]), argument: z({ name: N(), value: N() }), context: z({ arguments: H(N(), N()).optional() }).optional() }), og = Y.extend({ method: W("completion/complete"), params: ag }), sg = X.extend({ completion: B({ values: R(N()).max(100), total: G(F().int()), hasMore: G(I()) }) }), cg = z({ uri: N().startsWith("file://"), name: N().optional(), _meta: H(N(), L()).optional() }), lg = Y.extend({ method: W("roots/list"), params: Hp.optional() }), ug = X.extend({ roots: R(cg) }), dg = Kp.extend({ method: W("notifications/roots/list_changed"), params: Gp.optional() });
|
|
5695
|
+
V([vm, mm, og, Nh, dh, ch, Gm, qm, Zm, th, rh, kh, Th, Am, Mm, Nm, Fm]), V([am, xm, _m, dg, km]), V([rm, Wh, Gh, ng, ug, jm, Pm, Dm]), V([vm, Uh, $h, lg, Am, Mm, Nm, Fm]), V([am, xm, Fh, ah, $m, Ah, xh, km, tg]), V([rm, gm, sg, bh, lh, Km, Jm, Qm, Dh, Eh, jm, Pm, Dm]);
|
|
5696
|
+
var Q = class e2 extends Error {
|
|
5697
5697
|
constructor(e4, t2, n2) {
|
|
5698
5698
|
super("MCP error ".concat(e4, ": ").concat(t2)), this.code = e4, this.data = n2, this.name = "McpError";
|
|
5699
5699
|
}
|
|
5700
5700
|
static fromError(t2, n2, r2) {
|
|
5701
|
-
if (t2 ===
|
|
5701
|
+
if (t2 === Z.UrlElicitationRequired && r2) {
|
|
5702
5702
|
let e4 = r2;
|
|
5703
|
-
if (e4.elicitations) return new
|
|
5703
|
+
if (e4.elicitations) return new fg(e4.elicitations, n2);
|
|
5704
5704
|
}
|
|
5705
5705
|
return new e2(t2, n2, r2);
|
|
5706
5706
|
}
|
|
5707
|
-
},
|
|
5707
|
+
}, fg = class extends Q {
|
|
5708
5708
|
constructor(e4, t2 = "URL elicitation".concat(e4.length > 1 ? "s" : "", " required")) {
|
|
5709
|
-
super(
|
|
5709
|
+
super(Z.UrlElicitationRequired, t2, { elicitations: e4 });
|
|
5710
5710
|
}
|
|
5711
5711
|
get elicitations() {
|
|
5712
5712
|
var e4, t2;
|
|
5713
5713
|
return (e4 = (t2 = this.data) == null ? void 0 : t2.elicitations) == null ? [] : e4;
|
|
5714
5714
|
}
|
|
5715
5715
|
};
|
|
5716
|
-
function
|
|
5716
|
+
function pg(e4) {
|
|
5717
5717
|
return e4 === "completed" || e4 === "failed" || e4 === "cancelled";
|
|
5718
5718
|
}
|
|
5719
|
-
function
|
|
5720
|
-
let t2 =
|
|
5719
|
+
function mg(e4) {
|
|
5720
|
+
let t2 = iu(e4), n2 = t2 == null ? void 0 : t2.method;
|
|
5721
5721
|
if (!n2) throw Error("Schema is missing a method literal");
|
|
5722
|
-
let r2 =
|
|
5722
|
+
let r2 = au(n2);
|
|
5723
5723
|
if (typeof r2 != "string") throw Error("Schema method literal must be a string");
|
|
5724
5724
|
return r2;
|
|
5725
5725
|
}
|
|
5726
|
-
function
|
|
5727
|
-
let n2 =
|
|
5726
|
+
function hg(e4, t2) {
|
|
5727
|
+
let n2 = ru(e4, t2);
|
|
5728
5728
|
if (!n2.success) throw n2.error;
|
|
5729
5729
|
return n2.data;
|
|
5730
5730
|
}
|
|
5731
|
-
var
|
|
5731
|
+
var gg = 6e4, _g = class {
|
|
5732
5732
|
constructor(e4) {
|
|
5733
|
-
this._options = e4, this._requestMessageId = 0, this._requestHandlers = /* @__PURE__ */ new Map(), this._requestHandlerAbortControllers = /* @__PURE__ */ new Map(), this._notificationHandlers = /* @__PURE__ */ new Map(), this._responseHandlers = /* @__PURE__ */ new Map(), this._progressHandlers = /* @__PURE__ */ new Map(), this._timeoutInfo = /* @__PURE__ */ new Map(), this._pendingDebouncedNotifications = /* @__PURE__ */ new Set(), this._taskProgressTokens = /* @__PURE__ */ new Map(), this._requestResolvers = /* @__PURE__ */ new Map(), this.setNotificationHandler(
|
|
5733
|
+
this._options = e4, this._requestMessageId = 0, this._requestHandlers = /* @__PURE__ */ new Map(), this._requestHandlerAbortControllers = /* @__PURE__ */ new Map(), this._notificationHandlers = /* @__PURE__ */ new Map(), this._responseHandlers = /* @__PURE__ */ new Map(), this._progressHandlers = /* @__PURE__ */ new Map(), this._timeoutInfo = /* @__PURE__ */ new Map(), this._pendingDebouncedNotifications = /* @__PURE__ */ new Set(), this._taskProgressTokens = /* @__PURE__ */ new Map(), this._requestResolvers = /* @__PURE__ */ new Map(), this.setNotificationHandler(am, (e5) => {
|
|
5734
5734
|
this._oncancel(e5);
|
|
5735
|
-
}), this.setNotificationHandler(
|
|
5735
|
+
}), this.setNotificationHandler(xm, (e5) => {
|
|
5736
5736
|
this._onprogress(e5);
|
|
5737
|
-
}), this.setRequestHandler(
|
|
5737
|
+
}), this.setRequestHandler(vm, (e5) => ({})), this._taskStore = e4 == null ? void 0 : e4.taskStore, this._taskMessageQueue = e4 == null ? void 0 : e4.taskMessageQueue, this._taskStore && (this.setRequestHandler(Am, async (e5, t2) => {
|
|
5738
5738
|
let n2 = await this._taskStore.getTask(e5.params.taskId, t2.sessionId);
|
|
5739
|
-
if (!n2) throw new
|
|
5739
|
+
if (!n2) throw new Q(Z.InvalidParams, "Failed to retrieve task: Task not found");
|
|
5740
5740
|
return { ...n2 };
|
|
5741
|
-
}), this.setRequestHandler(
|
|
5741
|
+
}), this.setRequestHandler(Mm, async (e5, t2) => {
|
|
5742
5742
|
let n2 = async () => {
|
|
5743
5743
|
let r2 = e5.params.taskId;
|
|
5744
5744
|
if (this._taskMessageQueue) {
|
|
@@ -5750,7 +5750,7 @@ var hg = 6e4, gg = class {
|
|
|
5750
5750
|
if (r3) if (this._requestResolvers.delete(n3), e6.type === "response") r3(t3);
|
|
5751
5751
|
else {
|
|
5752
5752
|
let e7 = t3;
|
|
5753
|
-
r3(new
|
|
5753
|
+
r3(new Q(e7.error.code, e7.error.message, e7.error.data));
|
|
5754
5754
|
}
|
|
5755
5755
|
else {
|
|
5756
5756
|
let t4 = e6.type === "response" ? "Response" : "Error";
|
|
@@ -5762,34 +5762,34 @@ var hg = 6e4, gg = class {
|
|
|
5762
5762
|
}
|
|
5763
5763
|
}
|
|
5764
5764
|
let a2 = await this._taskStore.getTask(r2, t2.sessionId);
|
|
5765
|
-
if (!a2) throw new
|
|
5766
|
-
if (!
|
|
5767
|
-
if (
|
|
5765
|
+
if (!a2) throw new Q(Z.InvalidParams, "Task not found: ".concat(r2));
|
|
5766
|
+
if (!pg(a2.status)) return await this._waitForTaskUpdate(r2, t2.signal), await n2();
|
|
5767
|
+
if (pg(a2.status)) {
|
|
5768
5768
|
let e6 = await this._taskStore.getTaskResult(r2, t2.sessionId);
|
|
5769
|
-
return this._clearTaskQueue(r2), { ...e6, _meta: { ...e6._meta, [
|
|
5769
|
+
return this._clearTaskQueue(r2), { ...e6, _meta: { ...e6._meta, [Ip]: { taskId: r2 } } };
|
|
5770
5770
|
}
|
|
5771
5771
|
return await n2();
|
|
5772
5772
|
};
|
|
5773
5773
|
return await n2();
|
|
5774
|
-
}), this.setRequestHandler(
|
|
5774
|
+
}), this.setRequestHandler(Nm, async (e5, t2) => {
|
|
5775
5775
|
try {
|
|
5776
5776
|
var n2;
|
|
5777
5777
|
let { tasks: r2, nextCursor: i2 } = await this._taskStore.listTasks((n2 = e5.params) == null ? void 0 : n2.cursor, t2.sessionId);
|
|
5778
5778
|
return { tasks: r2, nextCursor: i2, _meta: {} };
|
|
5779
5779
|
} catch (e6) {
|
|
5780
|
-
throw new
|
|
5780
|
+
throw new Q(Z.InvalidParams, "Failed to list tasks: ".concat(e6 instanceof Error ? e6.message : String(e6)));
|
|
5781
5781
|
}
|
|
5782
|
-
}), this.setRequestHandler(
|
|
5782
|
+
}), this.setRequestHandler(Fm, async (e5, t2) => {
|
|
5783
5783
|
try {
|
|
5784
5784
|
let n2 = await this._taskStore.getTask(e5.params.taskId, t2.sessionId);
|
|
5785
|
-
if (!n2) throw new
|
|
5786
|
-
if (
|
|
5785
|
+
if (!n2) throw new Q(Z.InvalidParams, "Task not found: ".concat(e5.params.taskId));
|
|
5786
|
+
if (pg(n2.status)) throw new Q(Z.InvalidParams, "Cannot cancel task in terminal status: ".concat(n2.status));
|
|
5787
5787
|
await this._taskStore.updateTaskStatus(e5.params.taskId, "cancelled", "Client cancelled task execution.", t2.sessionId), this._clearTaskQueue(e5.params.taskId);
|
|
5788
5788
|
let r2 = await this._taskStore.getTask(e5.params.taskId, t2.sessionId);
|
|
5789
|
-
if (!r2) throw new
|
|
5789
|
+
if (!r2) throw new Q(Z.InvalidParams, "Task not found after cancellation: ".concat(e5.params.taskId));
|
|
5790
5790
|
return { _meta: {}, ...r2 };
|
|
5791
5791
|
} catch (e6) {
|
|
5792
|
-
throw e6 instanceof
|
|
5792
|
+
throw e6 instanceof Q ? e6 : new Q(Z.InvalidRequest, "Failed to cancel task: ".concat(e6 instanceof Error ? e6.message : String(e6)));
|
|
5793
5793
|
}
|
|
5794
5794
|
}));
|
|
5795
5795
|
}
|
|
@@ -5805,7 +5805,7 @@ var hg = 6e4, gg = class {
|
|
|
5805
5805
|
let t2 = this._timeoutInfo.get(e4);
|
|
5806
5806
|
if (!t2) return false;
|
|
5807
5807
|
let n2 = Date.now() - t2.startTime;
|
|
5808
|
-
if (t2.maxTotalTimeout && n2 >= t2.maxTotalTimeout) throw this._timeoutInfo.delete(e4),
|
|
5808
|
+
if (t2.maxTotalTimeout && n2 >= t2.maxTotalTimeout) throw this._timeoutInfo.delete(e4), Q.fromError(Z.RequestTimeout, "Maximum total timeout exceeded", { maxTotalTimeout: t2.maxTotalTimeout, totalElapsed: n2 });
|
|
5809
5809
|
return clearTimeout(t2.timeoutId), t2.timeoutId = setTimeout(t2.onTimeout, t2.timeout), true;
|
|
5810
5810
|
}
|
|
5811
5811
|
_cleanupTimeout(e4) {
|
|
@@ -5826,7 +5826,7 @@ var hg = 6e4, gg = class {
|
|
|
5826
5826
|
};
|
|
5827
5827
|
let o2 = (r2 = this._transport) == null ? void 0 : r2.onmessage;
|
|
5828
5828
|
this._transport.onmessage = (e5, t3) => {
|
|
5829
|
-
o2 == null || o2(e5, t3),
|
|
5829
|
+
o2 == null || o2(e5, t3), $p(e5) || tm(e5) ? this._onresponse(e5) : Yp(e5) ? this._onrequest(e5, t3) : Zp(e5) ? this._onnotification(e5) : this._onerror(Error("Unknown message type: ".concat(JSON.stringify(e5))));
|
|
5830
5830
|
}, await this._transport.start();
|
|
5831
5831
|
}
|
|
5832
5832
|
_onclose() {
|
|
@@ -5837,7 +5837,7 @@ var hg = 6e4, gg = class {
|
|
|
5837
5837
|
this._timeoutInfo.clear();
|
|
5838
5838
|
for (let e5 of this._requestHandlerAbortControllers.values()) e5.abort();
|
|
5839
5839
|
this._requestHandlerAbortControllers.clear();
|
|
5840
|
-
let n2 =
|
|
5840
|
+
let n2 = Q.fromError(Z.ConnectionClosed, "Connection closed");
|
|
5841
5841
|
this._transport = void 0, (e4 = this.onclose) == null || e4.call(this);
|
|
5842
5842
|
for (let e5 of t2.values()) e5(n2);
|
|
5843
5843
|
}
|
|
@@ -5854,19 +5854,19 @@ var hg = 6e4, gg = class {
|
|
|
5854
5854
|
var n2, r2, i2;
|
|
5855
5855
|
let a2 = (n2 = this._requestHandlers.get(e4.method)) == null ? this.fallbackRequestHandler : n2, o2 = this._transport, s2 = (r2 = e4.params) == null || (r2 = r2._meta) == null || (r2 = r2["io.modelcontextprotocol/related-task"]) == null ? void 0 : r2.taskId;
|
|
5856
5856
|
if (a2 === void 0) {
|
|
5857
|
-
let t3 = { jsonrpc: "2.0", id: e4.id, error: { code:
|
|
5857
|
+
let t3 = { jsonrpc: "2.0", id: e4.id, error: { code: Z.MethodNotFound, message: "Method not found" } };
|
|
5858
5858
|
s2 && this._taskMessageQueue ? this._enqueueTaskMessage(s2, { type: "error", message: t3, timestamp: Date.now() }, o2 == null ? void 0 : o2.sessionId).catch((e5) => this._onerror(Error("Failed to enqueue error response: ".concat(e5)))) : o2 == null || o2.send(t3).catch((e5) => this._onerror(Error("Failed to send an error response: ".concat(e5))));
|
|
5859
5859
|
return;
|
|
5860
5860
|
}
|
|
5861
5861
|
let c2 = new AbortController();
|
|
5862
5862
|
this._requestHandlerAbortControllers.set(e4.id, c2);
|
|
5863
|
-
let l2 =
|
|
5863
|
+
let l2 = Wp(e4.params) ? e4.params.task : void 0, u2 = this._taskStore ? this.requestTaskStore(e4, o2 == null ? void 0 : o2.sessionId) : void 0, d2 = { signal: c2.signal, sessionId: o2 == null ? void 0 : o2.sessionId, _meta: (i2 = e4.params) == null ? void 0 : i2._meta, sendNotification: async (t3) => {
|
|
5864
5864
|
if (c2.signal.aborted) return;
|
|
5865
5865
|
let n3 = { relatedRequestId: e4.id };
|
|
5866
5866
|
s2 && (n3.relatedTask = { taskId: s2 }), await this.notification(t3, n3);
|
|
5867
5867
|
}, sendRequest: async (t3, n3, r3) => {
|
|
5868
5868
|
var i3, a3;
|
|
5869
|
-
if (c2.signal.aborted) throw new
|
|
5869
|
+
if (c2.signal.aborted) throw new Q(Z.ConnectionClosed, "Request was cancelled");
|
|
5870
5870
|
let o3 = { ...r3, relatedRequestId: e4.id };
|
|
5871
5871
|
s2 && !o3.relatedTask && (o3.relatedTask = { taskId: s2 });
|
|
5872
5872
|
let l3 = (i3 = (a3 = o3.relatedTask) == null ? void 0 : a3.taskId) == null ? s2 : i3;
|
|
@@ -5881,7 +5881,7 @@ var hg = 6e4, gg = class {
|
|
|
5881
5881
|
}, async (t3) => {
|
|
5882
5882
|
var n3;
|
|
5883
5883
|
if (c2.signal.aborted) return;
|
|
5884
|
-
let r3 = { jsonrpc: "2.0", id: e4.id, error: { code: Number.isSafeInteger(t3.code) ? t3.code :
|
|
5884
|
+
let r3 = { jsonrpc: "2.0", id: e4.id, error: { code: Number.isSafeInteger(t3.code) ? t3.code : Z.InternalError, message: (n3 = t3.message) == null ? "Internal error" : n3, ...t3.data !== void 0 && { data: t3.data } } };
|
|
5885
5885
|
s2 && this._taskMessageQueue ? await this._enqueueTaskMessage(s2, { type: "error", message: r3, timestamp: Date.now() }, o2 == null ? void 0 : o2.sessionId) : await (o2 == null ? void 0 : o2.send(r3));
|
|
5886
5886
|
}).catch((e5) => this._onerror(Error("Failed to send response: ".concat(e5)))).finally(() => {
|
|
5887
5887
|
this._requestHandlerAbortControllers.get(e4.id) === c2 && this._requestHandlerAbortControllers.delete(e4.id);
|
|
@@ -5905,7 +5905,7 @@ var hg = 6e4, gg = class {
|
|
|
5905
5905
|
_onresponse(e4) {
|
|
5906
5906
|
let t2 = Number(e4.id), n2 = this._requestResolvers.get(t2);
|
|
5907
5907
|
if (n2) {
|
|
5908
|
-
this._requestResolvers.delete(t2),
|
|
5908
|
+
this._requestResolvers.delete(t2), $p(e4) ? n2(e4) : n2(new Q(e4.error.code, e4.error.message, e4.error.data));
|
|
5909
5909
|
return;
|
|
5910
5910
|
}
|
|
5911
5911
|
let r2 = this._responseHandlers.get(t2);
|
|
@@ -5915,14 +5915,14 @@ var hg = 6e4, gg = class {
|
|
|
5915
5915
|
}
|
|
5916
5916
|
this._responseHandlers.delete(t2), this._cleanupTimeout(t2);
|
|
5917
5917
|
let i2 = false;
|
|
5918
|
-
if (
|
|
5918
|
+
if ($p(e4) && e4.result && typeof e4.result == "object") {
|
|
5919
5919
|
let n3 = e4.result;
|
|
5920
5920
|
if (n3.task && typeof n3.task == "object") {
|
|
5921
5921
|
let e5 = n3.task;
|
|
5922
5922
|
typeof e5.taskId == "string" && (i2 = true, this._taskProgressTokens.set(e5.taskId, t2));
|
|
5923
5923
|
}
|
|
5924
5924
|
}
|
|
5925
|
-
i2 || this._progressHandlers.delete(t2),
|
|
5925
|
+
i2 || this._progressHandlers.delete(t2), $p(e4) ? r2(e4) : r2(Q.fromError(e4.error.code, e4.error.message, e4.error.data));
|
|
5926
5926
|
}
|
|
5927
5927
|
get transport() {
|
|
5928
5928
|
return this._transport;
|
|
@@ -5937,20 +5937,20 @@ var hg = 6e4, gg = class {
|
|
|
5937
5937
|
try {
|
|
5938
5938
|
yield { type: "result", result: await this.request(e4, t2, n2) };
|
|
5939
5939
|
} catch (e5) {
|
|
5940
|
-
yield { type: "error", error: e5 instanceof
|
|
5940
|
+
yield { type: "error", error: e5 instanceof Q ? e5 : new Q(Z.InternalError, String(e5)) };
|
|
5941
5941
|
}
|
|
5942
5942
|
return;
|
|
5943
5943
|
}
|
|
5944
5944
|
let i2;
|
|
5945
5945
|
try {
|
|
5946
|
-
let r3 = await this.request(e4,
|
|
5946
|
+
let r3 = await this.request(e4, Dm, n2);
|
|
5947
5947
|
if (r3.task) i2 = r3.task.taskId, yield { type: "taskCreated", task: r3.task };
|
|
5948
|
-
else throw new
|
|
5948
|
+
else throw new Q(Z.InternalError, "Task creation did not return a task");
|
|
5949
5949
|
for (; ; ) {
|
|
5950
5950
|
var a2, o2, s2, c2;
|
|
5951
5951
|
let e5 = await this.getTask({ taskId: i2 }, n2);
|
|
5952
|
-
if (yield { type: "taskStatus", task: e5 },
|
|
5953
|
-
e5.status === "completed" ? yield { type: "result", result: await this.getTaskResult({ taskId: i2 }, t2, n2) } : e5.status === "failed" ? yield { type: "error", error: new
|
|
5952
|
+
if (yield { type: "taskStatus", task: e5 }, pg(e5.status)) {
|
|
5953
|
+
e5.status === "completed" ? yield { type: "result", result: await this.getTaskResult({ taskId: i2 }, t2, n2) } : e5.status === "failed" ? yield { type: "error", error: new Q(Z.InternalError, "Task ".concat(i2, " failed")) } : e5.status === "cancelled" && (yield { type: "error", error: new Q(Z.InternalError, "Task ".concat(i2, " was cancelled")) });
|
|
5954
5954
|
return;
|
|
5955
5955
|
}
|
|
5956
5956
|
if (e5.status === "input_required") {
|
|
@@ -5961,7 +5961,7 @@ var hg = 6e4, gg = class {
|
|
|
5961
5961
|
await new Promise((e6) => setTimeout(e6, r4)), n2 == null || (c2 = n2.signal) == null || c2.throwIfAborted();
|
|
5962
5962
|
}
|
|
5963
5963
|
} catch (e5) {
|
|
5964
|
-
yield { type: "error", error: e5 instanceof
|
|
5964
|
+
yield { type: "error", error: e5 instanceof Q ? e5 : new Q(Z.InternalError, String(e5)) };
|
|
5965
5965
|
}
|
|
5966
5966
|
}
|
|
5967
5967
|
request(e4, t2, n2) {
|
|
@@ -5989,18 +5989,18 @@ var hg = 6e4, gg = class {
|
|
|
5989
5989
|
}
|
|
5990
5990
|
if (o2 && (h2.params = { ...h2.params, task: o2 }), s2) {
|
|
5991
5991
|
var re2;
|
|
5992
|
-
h2.params = { ...h2.params, _meta: { ...((re2 = h2.params) == null ? void 0 : re2._meta) || {}, [
|
|
5992
|
+
h2.params = { ...h2.params, _meta: { ...((re2 = h2.params) == null ? void 0 : re2._meta) || {}, [Ip]: s2 } };
|
|
5993
5993
|
}
|
|
5994
5994
|
let g2 = (e5) => {
|
|
5995
5995
|
var t3;
|
|
5996
|
-
this._responseHandlers.delete(m2), this._progressHandlers.delete(m2), this._cleanupTimeout(m2), (t3 = this._transport) == null || t3.send({ jsonrpc: "2.0", method: "notifications/cancelled", params: { requestId: m2, reason: String(e5) } }, { relatedRequestId: r2, resumptionToken: i2, onresumptiontoken: a2 }).catch((e6) => this._onerror(Error("Failed to send cancellation: ".concat(e6)))), l2(e5 instanceof
|
|
5996
|
+
this._responseHandlers.delete(m2), this._progressHandlers.delete(m2), this._cleanupTimeout(m2), (t3 = this._transport) == null || t3.send({ jsonrpc: "2.0", method: "notifications/cancelled", params: { requestId: m2, reason: String(e5) } }, { relatedRequestId: r2, resumptionToken: i2, onresumptiontoken: a2 }).catch((e6) => this._onerror(Error("Failed to send cancellation: ".concat(e6)))), l2(e5 instanceof Q ? e5 : new Q(Z.RequestTimeout, String(e5)));
|
|
5997
5997
|
};
|
|
5998
5998
|
this._responseHandlers.set(m2, (e5) => {
|
|
5999
5999
|
var r3;
|
|
6000
6000
|
if (!(!(n2 == null || (r3 = n2.signal) == null) && r3.aborted)) {
|
|
6001
6001
|
if (e5 instanceof Error) return l2(e5);
|
|
6002
6002
|
try {
|
|
6003
|
-
let n3 =
|
|
6003
|
+
let n3 = ru(t2, e5.result);
|
|
6004
6004
|
n3.success ? c2(n3.data) : l2(n3.error);
|
|
6005
6005
|
} catch (e6) {
|
|
6006
6006
|
l2(e6);
|
|
@@ -6010,8 +6010,8 @@ var hg = 6e4, gg = class {
|
|
|
6010
6010
|
var e5;
|
|
6011
6011
|
g2(n2 == null || (e5 = n2.signal) == null ? void 0 : e5.reason);
|
|
6012
6012
|
});
|
|
6013
|
-
let _2 = (p2 = n2 == null ? void 0 : n2.timeout) == null ?
|
|
6014
|
-
this._setupTimeout(m2, _2, n2 == null ? void 0 : n2.maxTotalTimeout, () => g2(
|
|
6013
|
+
let _2 = (p2 = n2 == null ? void 0 : n2.timeout) == null ? gg : p2;
|
|
6014
|
+
this._setupTimeout(m2, _2, n2 == null ? void 0 : n2.maxTotalTimeout, () => g2(Q.fromError(Z.RequestTimeout, "Request timed out", { timeout: _2 })), (ee2 = n2 == null ? void 0 : n2.resetTimeoutOnProgress) == null ? false : ee2);
|
|
6015
6015
|
let v2 = s2 == null ? void 0 : s2.taskId;
|
|
6016
6016
|
v2 ? (this._requestResolvers.set(m2, (e5) => {
|
|
6017
6017
|
let t3 = this._responseHandlers.get(m2);
|
|
@@ -6024,16 +6024,16 @@ var hg = 6e4, gg = class {
|
|
|
6024
6024
|
});
|
|
6025
6025
|
}
|
|
6026
6026
|
async getTask(e4, t2) {
|
|
6027
|
-
return this.request({ method: "tasks/get", params: e4 },
|
|
6027
|
+
return this.request({ method: "tasks/get", params: e4 }, jm, t2);
|
|
6028
6028
|
}
|
|
6029
6029
|
async getTaskResult(e4, t2, n2) {
|
|
6030
6030
|
return this.request({ method: "tasks/result", params: e4 }, t2, n2);
|
|
6031
6031
|
}
|
|
6032
6032
|
async listTasks(e4, t2) {
|
|
6033
|
-
return this.request({ method: "tasks/list", params: e4 },
|
|
6033
|
+
return this.request({ method: "tasks/list", params: e4 }, Pm, t2);
|
|
6034
6034
|
}
|
|
6035
6035
|
async cancelTask(e4, t2) {
|
|
6036
|
-
return this.request({ method: "tasks/cancel", params: e4 },
|
|
6036
|
+
return this.request({ method: "tasks/cancel", params: e4 }, Im, t2);
|
|
6037
6037
|
}
|
|
6038
6038
|
async notification(e4, t2) {
|
|
6039
6039
|
var n2, r2, i2;
|
|
@@ -6042,7 +6042,7 @@ var hg = 6e4, gg = class {
|
|
|
6042
6042
|
let a2 = t2 == null || (n2 = t2.relatedTask) == null ? void 0 : n2.taskId;
|
|
6043
6043
|
if (a2) {
|
|
6044
6044
|
var o2;
|
|
6045
|
-
let n3 = { ...e4, jsonrpc: "2.0", params: { ...e4.params, _meta: { ...((o2 = e4.params) == null ? void 0 : o2._meta) || {}, [
|
|
6045
|
+
let n3 = { ...e4, jsonrpc: "2.0", params: { ...e4.params, _meta: { ...((o2 = e4.params) == null ? void 0 : o2._meta) || {}, [Ip]: t2.relatedTask } } };
|
|
6046
6046
|
await this._enqueueTaskMessage(a2, { type: "notification", message: n3, timestamp: Date.now() });
|
|
6047
6047
|
return;
|
|
6048
6048
|
}
|
|
@@ -6054,7 +6054,7 @@ var hg = 6e4, gg = class {
|
|
|
6054
6054
|
let r3 = { ...e4, jsonrpc: "2.0" };
|
|
6055
6055
|
if (t2 != null && t2.relatedTask) {
|
|
6056
6056
|
var i3;
|
|
6057
|
-
r3 = { ...r3, params: { ...r3.params, _meta: { ...((i3 = r3.params) == null ? void 0 : i3._meta) || {}, [
|
|
6057
|
+
r3 = { ...r3, params: { ...r3.params, _meta: { ...((i3 = r3.params) == null ? void 0 : i3._meta) || {}, [Ip]: t2.relatedTask } } };
|
|
6058
6058
|
}
|
|
6059
6059
|
(n3 = this._transport) == null || n3.send(r3, t2).catch((e5) => this._onerror(e5));
|
|
6060
6060
|
});
|
|
@@ -6063,14 +6063,14 @@ var hg = 6e4, gg = class {
|
|
|
6063
6063
|
let s2 = { ...e4, jsonrpc: "2.0" };
|
|
6064
6064
|
if (t2 != null && t2.relatedTask) {
|
|
6065
6065
|
var c2;
|
|
6066
|
-
s2 = { ...s2, params: { ...s2.params, _meta: { ...((c2 = s2.params) == null ? void 0 : c2._meta) || {}, [
|
|
6066
|
+
s2 = { ...s2, params: { ...s2.params, _meta: { ...((c2 = s2.params) == null ? void 0 : c2._meta) || {}, [Ip]: t2.relatedTask } } };
|
|
6067
6067
|
}
|
|
6068
6068
|
await this._transport.send(s2, t2);
|
|
6069
6069
|
}
|
|
6070
6070
|
setRequestHandler(e4, t2) {
|
|
6071
|
-
let n2 =
|
|
6071
|
+
let n2 = mg(e4);
|
|
6072
6072
|
this.assertRequestHandlerCapability(n2), this._requestHandlers.set(n2, (n3, r2) => {
|
|
6073
|
-
let i2 =
|
|
6073
|
+
let i2 = hg(e4, n3);
|
|
6074
6074
|
return Promise.resolve(t2(i2, r2));
|
|
6075
6075
|
});
|
|
6076
6076
|
}
|
|
@@ -6081,9 +6081,9 @@ var hg = 6e4, gg = class {
|
|
|
6081
6081
|
if (this._requestHandlers.has(e4)) throw Error("A request handler for ".concat(e4, " already exists, which would be overridden"));
|
|
6082
6082
|
}
|
|
6083
6083
|
setNotificationHandler(e4, t2) {
|
|
6084
|
-
let n2 =
|
|
6084
|
+
let n2 = mg(e4);
|
|
6085
6085
|
this._notificationHandlers.set(n2, (n3) => {
|
|
6086
|
-
let r2 =
|
|
6086
|
+
let r2 = hg(e4, n3);
|
|
6087
6087
|
return Promise.resolve(t2(r2));
|
|
6088
6088
|
});
|
|
6089
6089
|
}
|
|
@@ -6103,9 +6103,9 @@ var hg = 6e4, gg = class {
|
|
|
6103
6103
|
async _clearTaskQueue(e4, t2) {
|
|
6104
6104
|
if (this._taskMessageQueue) {
|
|
6105
6105
|
let n2 = await this._taskMessageQueue.dequeueAll(e4, t2);
|
|
6106
|
-
for (let t3 of n2) if (t3.type === "request" &&
|
|
6106
|
+
for (let t3 of n2) if (t3.type === "request" && Yp(t3.message)) {
|
|
6107
6107
|
let n3 = t3.message.id, r2 = this._requestResolvers.get(n3);
|
|
6108
|
-
r2 ? (r2(new
|
|
6108
|
+
r2 ? (r2(new Q(Z.InternalError, "Task cancelled or completed")), this._requestResolvers.delete(n3)) : this._onerror(Error("Resolver missing for request ".concat(n3, " during task ").concat(e4, " cleanup")));
|
|
6109
6109
|
}
|
|
6110
6110
|
}
|
|
6111
6111
|
}
|
|
@@ -6120,12 +6120,12 @@ var hg = 6e4, gg = class {
|
|
|
6120
6120
|
}
|
|
6121
6121
|
return new Promise((e5, n3) => {
|
|
6122
6122
|
if (t2.aborted) {
|
|
6123
|
-
n3(new
|
|
6123
|
+
n3(new Q(Z.InvalidRequest, "Request cancelled"));
|
|
6124
6124
|
return;
|
|
6125
6125
|
}
|
|
6126
6126
|
let r3 = setTimeout(e5, i2);
|
|
6127
6127
|
t2.addEventListener("abort", () => {
|
|
6128
|
-
clearTimeout(r3), n3(new
|
|
6128
|
+
clearTimeout(r3), n3(new Q(Z.InvalidRequest, "Request cancelled"));
|
|
6129
6129
|
}, { once: true });
|
|
6130
6130
|
});
|
|
6131
6131
|
}
|
|
@@ -6137,44 +6137,44 @@ var hg = 6e4, gg = class {
|
|
|
6137
6137
|
return await n2.createTask(r2, e4.id, { method: e4.method, params: e4.params }, t2);
|
|
6138
6138
|
}, getTask: async (e5) => {
|
|
6139
6139
|
let r2 = await n2.getTask(e5, t2);
|
|
6140
|
-
if (!r2) throw new
|
|
6140
|
+
if (!r2) throw new Q(Z.InvalidParams, "Failed to retrieve task: Task not found");
|
|
6141
6141
|
return r2;
|
|
6142
6142
|
}, storeTaskResult: async (e5, r2, i2) => {
|
|
6143
6143
|
await n2.storeTaskResult(e5, r2, i2, t2);
|
|
6144
6144
|
let a2 = await n2.getTask(e5, t2);
|
|
6145
6145
|
if (a2) {
|
|
6146
|
-
let t3 =
|
|
6147
|
-
await this.notification(t3),
|
|
6146
|
+
let t3 = km.parse({ method: "notifications/tasks/status", params: a2 });
|
|
6147
|
+
await this.notification(t3), pg(a2.status) && this._cleanupTaskProgressHandler(e5);
|
|
6148
6148
|
}
|
|
6149
6149
|
}, getTaskResult: (e5) => n2.getTaskResult(e5, t2), updateTaskStatus: async (e5, r2, i2) => {
|
|
6150
6150
|
let a2 = await n2.getTask(e5, t2);
|
|
6151
|
-
if (!a2) throw new
|
|
6152
|
-
if (
|
|
6151
|
+
if (!a2) throw new Q(Z.InvalidParams, 'Task "'.concat(e5, '" not found - it may have been cleaned up'));
|
|
6152
|
+
if (pg(a2.status)) throw new Q(Z.InvalidParams, 'Cannot update task "'.concat(e5, '" from terminal status "').concat(a2.status, '" to "').concat(r2, '". Terminal states (completed, failed, cancelled) cannot transition to other states.'));
|
|
6153
6153
|
await n2.updateTaskStatus(e5, r2, i2, t2);
|
|
6154
6154
|
let o2 = await n2.getTask(e5, t2);
|
|
6155
6155
|
if (o2) {
|
|
6156
|
-
let t3 =
|
|
6157
|
-
await this.notification(t3),
|
|
6156
|
+
let t3 = km.parse({ method: "notifications/tasks/status", params: o2 });
|
|
6157
|
+
await this.notification(t3), pg(o2.status) && this._cleanupTaskProgressHandler(e5);
|
|
6158
6158
|
}
|
|
6159
6159
|
}, listTasks: (e5) => n2.listTasks(e5, t2) };
|
|
6160
6160
|
}
|
|
6161
6161
|
};
|
|
6162
|
-
function
|
|
6162
|
+
function vg(e4) {
|
|
6163
6163
|
return typeof e4 == "object" && !!e4 && !Array.isArray(e4);
|
|
6164
6164
|
}
|
|
6165
|
-
function
|
|
6165
|
+
function yg(e4, t2) {
|
|
6166
6166
|
let n2 = { ...e4 };
|
|
6167
6167
|
for (let e5 in t2) {
|
|
6168
6168
|
let r2 = e5, i2 = t2[r2];
|
|
6169
6169
|
if (i2 === void 0) continue;
|
|
6170
6170
|
let a2 = n2[r2];
|
|
6171
|
-
|
|
6171
|
+
vg(a2) && vg(i2) ? n2[r2] = { ...a2, ...i2 } : n2[r2] = i2;
|
|
6172
6172
|
}
|
|
6173
6173
|
return n2;
|
|
6174
6174
|
}
|
|
6175
|
-
var
|
|
6175
|
+
var bg = "modulepreload", xg = function(e4) {
|
|
6176
6176
|
return "/" + e4;
|
|
6177
|
-
},
|
|
6177
|
+
}, Sg = {}, Cg = function(e4, t2, n2) {
|
|
6178
6178
|
let r2 = Promise.resolve();
|
|
6179
6179
|
if (t2 && t2.length > 0) {
|
|
6180
6180
|
let o3 = function(e6) {
|
|
@@ -6183,8 +6183,8 @@ var yg = "modulepreload", bg = function(e4) {
|
|
|
6183
6183
|
var o2 = o3;
|
|
6184
6184
|
let e5 = document.getElementsByTagName("link"), i3 = document.querySelector("meta[property=csp-nonce]"), a2 = (i3 == null ? void 0 : i3.nonce) || (i3 == null ? void 0 : i3.getAttribute("nonce"));
|
|
6185
6185
|
r2 = o3(t2.map((t3) => {
|
|
6186
|
-
if (t3 =
|
|
6187
|
-
|
|
6186
|
+
if (t3 = xg(t3, n2), t3 in Sg) return;
|
|
6187
|
+
Sg[t3] = true;
|
|
6188
6188
|
let r3 = t3.endsWith(".css"), i4 = r3 ? '[rel="stylesheet"]' : "";
|
|
6189
6189
|
if (n2) for (let n3 = e5.length - 1; n3 >= 0; n3--) {
|
|
6190
6190
|
let i5 = e5[n3];
|
|
@@ -6192,7 +6192,7 @@ var yg = "modulepreload", bg = function(e4) {
|
|
|
6192
6192
|
}
|
|
6193
6193
|
else if (document.querySelector('link[href="'.concat(t3, '"]').concat(i4))) return;
|
|
6194
6194
|
let o4 = document.createElement("link");
|
|
6195
|
-
if (o4.rel = r3 ? "stylesheet" :
|
|
6195
|
+
if (o4.rel = r3 ? "stylesheet" : bg, r3 || (o4.as = "script"), o4.crossOrigin = "", o4.href = t3, a2 && o4.setAttribute("nonce", a2), document.head.appendChild(o4), r3) return new Promise((e6, n3) => {
|
|
6196
6196
|
o4.addEventListener("load", e6), o4.addEventListener("error", () => n3(Error("Unable to preload CSS for ".concat(t3))));
|
|
6197
6197
|
});
|
|
6198
6198
|
}));
|
|
@@ -6210,7 +6210,7 @@ var yg = "modulepreload", bg = function(e4) {
|
|
|
6210
6210
|
if (typeof n < "u") return n.apply(this, arguments);
|
|
6211
6211
|
throw Error('Dynamic require of "' + e4 + '" is not supported');
|
|
6212
6212
|
});
|
|
6213
|
-
var
|
|
6213
|
+
var wg = class extends _g {
|
|
6214
6214
|
constructor(...e4) {
|
|
6215
6215
|
super(...e4), o(this, "_registeredMethods", /* @__PURE__ */ new Set()), o(this, "_eventSlots", /* @__PURE__ */ new Map()), o(this, "setRequestHandler", (e5, t2) => {
|
|
6216
6216
|
this._assertMethodNotRegistered(e5, "setRequestHandler"), super.setRequestHandler(e5, t2);
|
|
@@ -6266,7 +6266,7 @@ var Cg = class extends gg {
|
|
|
6266
6266
|
if (this._registeredMethods.has(n2)) throw Error('Handler for "'.concat(n2, '" already registered (via ').concat(t2, "). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics."));
|
|
6267
6267
|
this._registeredMethods.add(n2);
|
|
6268
6268
|
}
|
|
6269
|
-
},
|
|
6269
|
+
}, Tg = "2026-01-26", Eg = class {
|
|
6270
6270
|
constructor(e4 = window.parent, t2) {
|
|
6271
6271
|
o(this, "eventTarget", void 0), o(this, "eventSource", void 0), o(this, "messageListener", void 0), o(this, "onclose", void 0), o(this, "onerror", void 0), o(this, "onmessage", void 0), o(this, "sessionId", void 0), o(this, "setProtocolVersion", void 0), this.eventTarget = e4, this.eventSource = t2, this.messageListener = (e5) => {
|
|
6272
6272
|
var n2, r2, i2;
|
|
@@ -6274,7 +6274,7 @@ var Cg = class extends gg {
|
|
|
6274
6274
|
console.debug("Ignoring message from unknown source", e5);
|
|
6275
6275
|
return;
|
|
6276
6276
|
}
|
|
6277
|
-
let a2 =
|
|
6277
|
+
let a2 = nm.safeParse(e5.data);
|
|
6278
6278
|
a2.success ? (console.debug("Parsed message", a2.data), (n2 = this.onmessage) == null || n2.call(this, a2.data)) : ((r2 = e5.data) == null ? void 0 : r2.jsonrpc) === "2.0" ? (console.error("Failed to parse message", a2.error.message, e5), (i2 = this.onerror) == null || i2.call(this, Error("Invalid JSON-RPC message received: " + a2.error.message))) : console.debug("Ignoring non-JSON-RPC message", a2.error.message, e5);
|
|
6279
6279
|
};
|
|
6280
6280
|
}
|
|
@@ -6288,36 +6288,36 @@ var Cg = class extends gg {
|
|
|
6288
6288
|
var e4;
|
|
6289
6289
|
window.removeEventListener("message", this.messageListener), (e4 = this.onclose) == null || e4.call(this);
|
|
6290
6290
|
}
|
|
6291
|
-
},
|
|
6292
|
-
|
|
6293
|
-
var
|
|
6294
|
-
|
|
6295
|
-
var
|
|
6296
|
-
|
|
6297
|
-
var
|
|
6298
|
-
|
|
6299
|
-
var
|
|
6300
|
-
|
|
6301
|
-
var
|
|
6302
|
-
|
|
6303
|
-
var
|
|
6304
|
-
|
|
6305
|
-
var
|
|
6306
|
-
|
|
6307
|
-
var
|
|
6308
|
-
async function
|
|
6291
|
+
}, Dg = V([W("light"), W("dark")]).describe("Color theme preference for the host environment."), Og = V([W("inline"), W("fullscreen"), W("pip")]).describe("Display mode for UI presentation."), kg = H(V([W("--color-background-primary"), W("--color-background-secondary"), W("--color-background-tertiary"), W("--color-background-inverse"), W("--color-background-ghost"), W("--color-background-info"), W("--color-background-danger"), W("--color-background-success"), W("--color-background-warning"), W("--color-background-disabled"), W("--color-text-primary"), W("--color-text-secondary"), W("--color-text-tertiary"), W("--color-text-inverse"), W("--color-text-ghost"), W("--color-text-info"), W("--color-text-danger"), W("--color-text-success"), W("--color-text-warning"), W("--color-text-disabled"), W("--color-border-primary"), W("--color-border-secondary"), W("--color-border-tertiary"), W("--color-border-inverse"), W("--color-border-ghost"), W("--color-border-info"), W("--color-border-danger"), W("--color-border-success"), W("--color-border-warning"), W("--color-border-disabled"), W("--color-ring-primary"), W("--color-ring-secondary"), W("--color-ring-inverse"), W("--color-ring-info"), W("--color-ring-danger"), W("--color-ring-success"), W("--color-ring-warning"), W("--font-sans"), W("--font-mono"), W("--font-weight-normal"), W("--font-weight-medium"), W("--font-weight-semibold"), W("--font-weight-bold"), W("--font-text-xs-size"), W("--font-text-sm-size"), W("--font-text-md-size"), W("--font-text-lg-size"), W("--font-heading-xs-size"), W("--font-heading-sm-size"), W("--font-heading-md-size"), W("--font-heading-lg-size"), W("--font-heading-xl-size"), W("--font-heading-2xl-size"), W("--font-heading-3xl-size"), W("--font-text-xs-line-height"), W("--font-text-sm-line-height"), W("--font-text-md-line-height"), W("--font-text-lg-line-height"), W("--font-heading-xs-line-height"), W("--font-heading-sm-line-height"), W("--font-heading-md-line-height"), W("--font-heading-lg-line-height"), W("--font-heading-xl-line-height"), W("--font-heading-2xl-line-height"), W("--font-heading-3xl-line-height"), W("--border-radius-xs"), W("--border-radius-sm"), W("--border-radius-md"), W("--border-radius-lg"), W("--border-radius-xl"), W("--border-radius-full"), W("--border-width-regular"), W("--shadow-hairline"), W("--shadow-sm"), W("--shadow-md"), W("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming.").describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation."), V([N(), Wd()]).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.")).describe("Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.");
|
|
6292
|
+
z({ method: W("ui/open-link"), params: z({ url: N().describe("URL to open in the host's browser") }) });
|
|
6293
|
+
var Ag = z({ isError: I().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough(), jg = z({ isError: I().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough(), Mg = z({ isError: I().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough();
|
|
6294
|
+
z({ method: W("ui/notifications/sandbox-proxy-ready"), params: z({}) });
|
|
6295
|
+
var Ng = z({ connectDomains: R(N()).optional().describe("Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP `connect-src` directive\n- Empty or omitted \u2192 no network connections (secure default)"), resourceDomains: R(N()).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 \u2192 no network resources (secure default)"), frameDomains: R(N()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src 'none'`)"), baseUriDomains: R(N()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted \u2192 only same origin allowed (`base-uri 'self'`)") }), Pg = z({ camera: z({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."), microphone: z({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."), geolocation: z({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."), clipboardWrite: z({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.") });
|
|
6296
|
+
z({ method: W("ui/notifications/size-changed"), params: z({ width: F().optional().describe("New width in pixels."), height: F().optional().describe("New height in pixels.") }) });
|
|
6297
|
+
var Fg = z({ method: W("ui/notifications/tool-input"), params: z({ arguments: H(N(), L().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.") }) }), Ig = z({ method: W("ui/notifications/tool-input-partial"), params: z({ arguments: H(N(), L().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).") }) }), Lg = z({ method: W("ui/notifications/tool-cancelled"), params: z({ reason: N().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").') }) }), Rg = z({ fonts: N().optional() }), zg = z({ variables: kg.optional().describe("CSS variables for theming the app."), css: Rg.optional().describe("CSS blocks that apps can inject.") }), Bg = z({ method: W("ui/resource-teardown"), params: z({}) });
|
|
6298
|
+
H(N(), L());
|
|
6299
|
+
var Vg = z({ text: z({}).optional().describe("Host supports text content blocks."), image: z({}).optional().describe("Host supports image content blocks."), audio: z({}).optional().describe("Host supports audio content blocks."), resource: z({}).optional().describe("Host supports resource content blocks."), resourceLink: z({}).optional().describe("Host supports resource link content blocks."), structuredContent: z({}).optional().describe("Host supports structured content.") });
|
|
6300
|
+
z({ method: W("ui/notifications/request-teardown"), params: z({}).optional() });
|
|
6301
|
+
var Hg = z({ experimental: z({}).optional().describe("Experimental features (structure TBD)."), openLinks: z({}).optional().describe("Host supports opening external URLs."), downloadFile: z({}).optional().describe("Host supports file downloads via ui/download-file."), serverTools: z({ listChanged: I().optional().describe("Host supports tools/list_changed notifications.") }).optional().describe("Host can proxy tool calls to the MCP server."), serverResources: z({ listChanged: I().optional().describe("Host supports resources/list_changed notifications.") }).optional().describe("Host can proxy resource reads to the MCP server."), logging: z({}).optional().describe("Host accepts log messages."), sandbox: z({ permissions: Pg.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."), csp: Ng.optional().describe("CSP domains approved by the host.") }).optional().describe("Sandbox configuration applied by the host."), updateModelContext: Vg.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."), message: Vg.optional().describe("Host supports receiving content messages (ui/message) from the view."), sampling: z({ tools: z({}).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.") }), Ug = z({ experimental: z({}).optional().describe("Experimental features (structure TBD)."), tools: z({ listChanged: I().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."), availableDisplayModes: R(Og).optional().describe("Display modes the app supports.") });
|
|
6302
|
+
z({ method: W("ui/notifications/initialized"), params: z({}).optional() }), z({ csp: Ng.optional().describe("Content Security Policy configuration for UI resources."), permissions: Pg.optional().describe("Sandbox permissions requested by the UI resource."), domain: N().optional().describe("Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**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:\n- Hash-based subdomains (e.g., `{hash}.claudemcpcontent.com`)\n- URL-derived subdomains (e.g., `www-example-com.oaiusercontent.com`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation)."), prefersBorder: I().optional().describe("Visual boundary preference - true if view prefers a visible border.\n\nBoolean 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.\n\n- `true`: request visible border + background\n- `false`: request no visible border + background\n- omitted: host decides border") }), z({ method: W("ui/request-display-mode"), params: z({ mode: Og.describe("The display mode being requested.") }) });
|
|
6303
|
+
var Wg = z({ mode: Og.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough(), Gg = V([W("model"), W("app")]).describe("Tool visibility scope - who can access the tool.");
|
|
6304
|
+
z({ resourceUri: N().optional(), visibility: R(Gg).optional().describe('Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only'), csp: Zd().optional(), permissions: Zd().optional() }), z({ mimeTypes: R(N()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.') }), z({ method: W("ui/download-file"), params: z({ contents: R(V([gh, _h])).describe("Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.") }) }), z({ method: W("ui/message"), params: z({ role: W("user").describe('Message role, currently only "user" is supported.'), content: R(vh).describe("Message content blocks (text, image, etc.).") }) }), z({ method: W("ui/notifications/sandbox-resource-ready"), params: z({ html: N().describe("HTML content to load into the inner iframe."), sandbox: N().optional().describe("Optional override for the inner iframe's sandbox attribute."), csp: Ng.optional().describe("CSP configuration from resource metadata."), permissions: Pg.optional().describe("Sandbox permissions from resource metadata.") }) });
|
|
6305
|
+
var Kg = z({ method: W("ui/notifications/tool-result"), params: Dh.describe("Standard MCP tool execution result.") }), qg = z({ toolInfo: z({ id: qp.optional().describe("JSON-RPC id of the tools/call request."), tool: wh.describe("Tool definition including name, inputSchema, etc.") }).optional().describe("Metadata of the tool call that instantiated this App."), theme: Dg.optional().describe("Current color theme preference."), styles: zg.optional().describe("Style configuration for theming the app."), displayMode: Og.optional().describe("How the UI is currently displayed."), availableDisplayModes: R(Og).optional().describe("Display modes the host supports."), containerDimensions: V([z({ height: F().describe("Fixed container height in pixels.") }), z({ maxHeight: V([F(), Wd()]).optional().describe("Maximum container height in pixels.") })]).and(V([z({ width: F().describe("Fixed container width in pixels.") }), z({ maxWidth: V([F(), Wd()]).optional().describe("Maximum container width in pixels.") })])).optional().describe("Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight."), locale: N().optional().describe("User's language and region preference in BCP 47 format."), timeZone: N().optional().describe("User's timezone in IANA format."), userAgent: N().optional().describe("Host application identifier."), platform: V([W("web"), W("desktop"), W("mobile")]).optional().describe("Platform type for responsive design decisions."), deviceCapabilities: z({ touch: I().optional().describe("Whether the device supports touch input."), hover: I().optional().describe("Whether the device supports hover interactions.") }).optional().describe("Device input capabilities."), safeAreaInsets: z({ top: F().describe("Top safe area inset in pixels."), right: F().describe("Right safe area inset in pixels."), bottom: F().describe("Bottom safe area inset in pixels."), left: F().describe("Left safe area inset in pixels.") }).optional().describe("Mobile safe area boundaries in pixels.") }).passthrough(), Jg = z({ method: W("ui/notifications/host-context-changed"), params: qg.describe("Partial context update containing only changed fields.") });
|
|
6306
|
+
z({ method: W("ui/update-model-context"), params: z({ content: R(vh).optional().describe("Context content blocks (text, image, etc.)."), structuredContent: H(N(), L().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.") }) }), z({ method: W("ui/initialize"), params: z({ appInfo: cm.describe("App identification (name and version)."), appCapabilities: Ug.describe("Features and capabilities this app provides."), protocolVersion: N().describe("Protocol version this app supports.") }) });
|
|
6307
|
+
var Yg = z({ protocolVersion: N().describe('Negotiated protocol version string (e.g., "2025-11-21").'), hostInfo: cm.describe("Host application identification and version."), hostCapabilities: Hg.describe("Features and capabilities provided by the host."), hostContext: qg.describe("Rich context about the host environment.") }).passthrough(), Xg = { target: "draft-2020-12" };
|
|
6308
|
+
async function Zg(e4, t2) {
|
|
6309
6309
|
let n2 = e4["~standard"];
|
|
6310
|
-
if (n2.jsonSchema) return n2.jsonSchema[t2](
|
|
6310
|
+
if (n2.jsonSchema) return n2.jsonSchema[t2](Xg);
|
|
6311
6311
|
if (n2.vendor === "zod") {
|
|
6312
|
-
let { z: n3 } = await
|
|
6313
|
-
let { z: e5 } = await Promise.resolve().then(() =>
|
|
6312
|
+
let { z: n3 } = await Cg(async () => {
|
|
6313
|
+
let { z: e5 } = await Promise.resolve().then(() => Fp);
|
|
6314
6314
|
return { z: e5 };
|
|
6315
6315
|
}, __VITE_PRELOAD__);
|
|
6316
6316
|
return n3.toJSONSchema(e4, { io: t2 });
|
|
6317
6317
|
}
|
|
6318
6318
|
throw Error("Schema (vendor: ".concat(n2.vendor, ") does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly."));
|
|
6319
6319
|
}
|
|
6320
|
-
async function
|
|
6320
|
+
async function Qg(e4, t2, n2 = "") {
|
|
6321
6321
|
let r2 = await e4["~standard"].validate(t2);
|
|
6322
6322
|
if (r2.issues) {
|
|
6323
6323
|
let e5 = r2.issues.map((e6) => {
|
|
@@ -6329,7 +6329,15 @@ async function Zg(e4, t2, n2 = "") {
|
|
|
6329
6329
|
}
|
|
6330
6330
|
return r2.value;
|
|
6331
6331
|
}
|
|
6332
|
-
|
|
6332
|
+
function $g(e4, t2 = document.documentElement) {
|
|
6333
|
+
for (let [n2, r2] of Object.entries(e4)) r2 !== void 0 && t2.style.setProperty(n2, r2);
|
|
6334
|
+
}
|
|
6335
|
+
function e_(e4) {
|
|
6336
|
+
if (document.getElementById("__mcp-host-fonts")) return;
|
|
6337
|
+
let t2 = document.createElement("style");
|
|
6338
|
+
t2.id = "__mcp-host-fonts", t2.textContent = e4, document.head.appendChild(t2);
|
|
6339
|
+
}
|
|
6340
|
+
var t_ = class e3 extends wg {
|
|
6333
6341
|
_assertInitialized(e4) {
|
|
6334
6342
|
var t2;
|
|
6335
6343
|
if (this._initializedSent) return;
|
|
@@ -6354,11 +6362,11 @@ var Qg = class e3 extends Cg {
|
|
|
6354
6362
|
e4 === "hostcontextchanged" && (this._hostContext = { ...this._hostContext, ...t2 });
|
|
6355
6363
|
}
|
|
6356
6364
|
constructor(e4, t2 = {}, n2 = { autoResize: true }) {
|
|
6357
|
-
super(n2), o(this, "_appInfo", void 0), o(this, "_capabilities", void 0), o(this, "options", void 0), o(this, "_hostCapabilities", void 0), o(this, "_hostInfo", void 0), o(this, "_hostContext", void 0), o(this, "_registeredTools", {}), o(this, "_initializedSent", false), o(this, "eventSchemas", { toolinput:
|
|
6365
|
+
super(n2), o(this, "_appInfo", void 0), o(this, "_capabilities", void 0), o(this, "options", void 0), o(this, "_hostCapabilities", void 0), o(this, "_hostInfo", void 0), o(this, "_hostContext", void 0), o(this, "_registeredTools", {}), o(this, "_initializedSent", false), o(this, "eventSchemas", { toolinput: Fg, toolinputpartial: Ig, toolresult: Kg, toolcancelled: Lg, hostcontextchanged: Jg }), o(this, "_everHadListener", /* @__PURE__ */ new Set()), o(this, "_toolHandlersInitialized", false), o(this, "_onteardown", void 0), o(this, "_oncalltool", void 0), o(this, "_onlisttools", void 0), o(this, "sendOpenLink", this.openLink), this._appInfo = e4, this._capabilities = t2, this.options = n2, n2.allowUnsafeEval || p({ jitless: true }), this.setRequestHandler(vm, (e5) => (console.log("Received ping:", e5.params), {})), this.setEventHandler("hostcontextchanged", void 0);
|
|
6358
6366
|
}
|
|
6359
6367
|
registerCapabilities(e4) {
|
|
6360
6368
|
if (this.transport) throw Error("Cannot register capabilities after transport is established");
|
|
6361
|
-
this._capabilities =
|
|
6369
|
+
this._capabilities = yg(this._capabilities, e4);
|
|
6362
6370
|
}
|
|
6363
6371
|
registerTool(e4, t2, n2) {
|
|
6364
6372
|
if (this._registeredTools[e4]) throw Error("Tool ".concat(e4, " is already registered"));
|
|
@@ -6378,9 +6386,9 @@ var Qg = class e3 extends Cg {
|
|
|
6378
6386
|
let i3;
|
|
6379
6387
|
if (a2) {
|
|
6380
6388
|
let a3 = o2.inputSchema;
|
|
6381
|
-
i3 = await n2(a3 ? await
|
|
6389
|
+
i3 = await n2(a3 ? await Qg(a3, t3 == null ? {} : t3, "Invalid input for tool ".concat(e4, ": ")) : t3 == null ? {} : t3, r3);
|
|
6382
6390
|
} else i3 = await n2(r3);
|
|
6383
|
-
return o2.outputSchema && !i3.isError && (i3.structuredContent = await
|
|
6391
|
+
return o2.outputSchema && !i3.isError && (i3.structuredContent = await Qg(o2.outputSchema, i3.structuredContent, "Invalid output for tool ".concat(e4, ": "))), i3;
|
|
6384
6392
|
} };
|
|
6385
6393
|
return this._registeredTools[e4] = o2, !this._capabilities.tools && !this.transport && this.registerCapabilities({ tools: { listChanged: true } }), this.ensureToolHandlersInitialized(), i2(), o2;
|
|
6386
6394
|
}
|
|
@@ -6390,8 +6398,8 @@ var Qg = class e3 extends Cg {
|
|
|
6390
6398
|
if (!n2) throw Error("Tool ".concat(e4.name, " not found"));
|
|
6391
6399
|
return n2.handler(e4.arguments, t2);
|
|
6392
6400
|
}, this.onlisttools = async (e4, t2) => ({ tools: await Promise.all(Object.entries(this._registeredTools).filter(([e5, t3]) => t3.enabled).map(async ([e5, t3]) => {
|
|
6393
|
-
let n2 = { name: e5, title: t3.title, description: t3.description, inputSchema: t3.inputSchema ? await
|
|
6394
|
-
return t3.outputSchema && (n2.outputSchema = await
|
|
6401
|
+
let n2 = { name: e5, title: t3.title, description: t3.description, inputSchema: t3.inputSchema ? await Zg(t3.inputSchema, "input") : { type: "object", properties: {} } };
|
|
6402
|
+
return t3.outputSchema && (n2.outputSchema = await Zg(t3.outputSchema, "output")), t3.annotations && (n2.annotations = t3.annotations), t3._meta && (n2._meta = t3._meta), n2;
|
|
6395
6403
|
})) }));
|
|
6396
6404
|
}
|
|
6397
6405
|
async sendToolListChanged(e4 = {}) {
|
|
@@ -6440,7 +6448,7 @@ var Qg = class e3 extends Cg {
|
|
|
6440
6448
|
return this._onteardown;
|
|
6441
6449
|
}
|
|
6442
6450
|
set onteardown(e4) {
|
|
6443
|
-
this.warnIfRequestHandlerReplaced("onteardown", this._onteardown, e4), this._onteardown = e4, this.replaceRequestHandler(
|
|
6451
|
+
this.warnIfRequestHandlerReplaced("onteardown", this._onteardown, e4), this._onteardown = e4, this.replaceRequestHandler(Bg, (e5, t2) => {
|
|
6444
6452
|
if (!this._onteardown) throw Error("No onteardown handler set");
|
|
6445
6453
|
return this._onteardown(e5.params, t2);
|
|
6446
6454
|
});
|
|
@@ -6449,7 +6457,7 @@ var Qg = class e3 extends Cg {
|
|
|
6449
6457
|
return this._oncalltool;
|
|
6450
6458
|
}
|
|
6451
6459
|
set oncalltool(e4) {
|
|
6452
|
-
this.warnIfRequestHandlerReplaced("oncalltool", this._oncalltool, e4), this._oncalltool = e4, this.replaceRequestHandler(
|
|
6460
|
+
this.warnIfRequestHandlerReplaced("oncalltool", this._oncalltool, e4), this._oncalltool = e4, this.replaceRequestHandler(kh, (e5, t2) => {
|
|
6453
6461
|
if (!this._oncalltool) throw Error("No oncalltool handler set");
|
|
6454
6462
|
return this._oncalltool(e5.params, t2);
|
|
6455
6463
|
});
|
|
@@ -6458,7 +6466,7 @@ var Qg = class e3 extends Cg {
|
|
|
6458
6466
|
return this._onlisttools;
|
|
6459
6467
|
}
|
|
6460
6468
|
set onlisttools(e4) {
|
|
6461
|
-
this.warnIfRequestHandlerReplaced("onlisttools", this._onlisttools, e4), this._onlisttools = e4, this.replaceRequestHandler(
|
|
6469
|
+
this.warnIfRequestHandlerReplaced("onlisttools", this._onlisttools, e4), this._onlisttools = e4, this.replaceRequestHandler(Th, (e5, t2) => {
|
|
6462
6470
|
if (!this._onlisttools) throw Error("No onlisttools handler set");
|
|
6463
6471
|
return this._onlisttools(e5.params, t2);
|
|
6464
6472
|
});
|
|
@@ -6494,40 +6502,40 @@ var Qg = class e3 extends Cg {
|
|
|
6494
6502
|
}
|
|
6495
6503
|
async callServerTool(e4, t2) {
|
|
6496
6504
|
if (this._assertInitialized("callServerTool"), typeof e4 == "string") throw Error('callServerTool() expects an object as its first argument, but received a string ("'.concat(e4, '"). Did you mean: callServerTool({ name: "').concat(e4, '", arguments: { ... } })?'));
|
|
6497
|
-
return await this.request({ method: "tools/call", params: e4 },
|
|
6505
|
+
return await this.request({ method: "tools/call", params: e4 }, Dh, { onprogress: () => {
|
|
6498
6506
|
}, resetTimeoutOnProgress: true, ...t2 });
|
|
6499
6507
|
}
|
|
6500
6508
|
async readServerResource(e4, t2) {
|
|
6501
|
-
return this._assertInitialized("readServerResource"), await this.request({ method: "resources/read", params: e4 },
|
|
6509
|
+
return this._assertInitialized("readServerResource"), await this.request({ method: "resources/read", params: e4 }, Qm, t2);
|
|
6502
6510
|
}
|
|
6503
6511
|
async listServerResources(e4, t2) {
|
|
6504
|
-
return this._assertInitialized("listServerResources"), await this.request({ method: "resources/list", params: e4 },
|
|
6512
|
+
return this._assertInitialized("listServerResources"), await this.request({ method: "resources/list", params: e4 }, Km, t2);
|
|
6505
6513
|
}
|
|
6506
6514
|
async createSamplingMessage(e4, t2) {
|
|
6507
6515
|
this._assertInitialized("createSamplingMessage");
|
|
6508
|
-
let n2 = e4.tools ?
|
|
6516
|
+
let n2 = e4.tools ? Gh : Wh;
|
|
6509
6517
|
return await this.request({ method: "sampling/createMessage", params: e4 }, n2, t2);
|
|
6510
6518
|
}
|
|
6511
6519
|
sendMessage(e4, t2) {
|
|
6512
|
-
return this._assertInitialized("sendMessage"), this.request({ method: "ui/message", params: e4 },
|
|
6520
|
+
return this._assertInitialized("sendMessage"), this.request({ method: "ui/message", params: e4 }, Mg, t2);
|
|
6513
6521
|
}
|
|
6514
6522
|
sendLog(e4) {
|
|
6515
6523
|
return this.notification({ method: "notifications/message", params: e4 });
|
|
6516
6524
|
}
|
|
6517
6525
|
updateModelContext(e4, t2) {
|
|
6518
|
-
return this._assertInitialized("updateModelContext"), this.request({ method: "ui/update-model-context", params: e4 },
|
|
6526
|
+
return this._assertInitialized("updateModelContext"), this.request({ method: "ui/update-model-context", params: e4 }, rm, t2);
|
|
6519
6527
|
}
|
|
6520
6528
|
openLink(e4, t2) {
|
|
6521
|
-
return this._assertInitialized("openLink"), this.request({ method: "ui/open-link", params: e4 },
|
|
6529
|
+
return this._assertInitialized("openLink"), this.request({ method: "ui/open-link", params: e4 }, Ag, t2);
|
|
6522
6530
|
}
|
|
6523
6531
|
downloadFile(e4, t2) {
|
|
6524
|
-
return this._assertInitialized("downloadFile"), this.request({ method: "ui/download-file", params: e4 },
|
|
6532
|
+
return this._assertInitialized("downloadFile"), this.request({ method: "ui/download-file", params: e4 }, jg, t2);
|
|
6525
6533
|
}
|
|
6526
6534
|
requestTeardown(e4 = {}) {
|
|
6527
6535
|
return this.notification({ method: "ui/notifications/request-teardown", params: e4 });
|
|
6528
6536
|
}
|
|
6529
6537
|
requestDisplayMode(e4, t2) {
|
|
6530
|
-
return this._assertInitialized("requestDisplayMode"), this.request({ method: "ui/request-display-mode", params: e4 },
|
|
6538
|
+
return this._assertInitialized("requestDisplayMode"), this.request({ method: "ui/request-display-mode", params: e4 }, Wg, t2);
|
|
6531
6539
|
}
|
|
6532
6540
|
sendSizeChanged(e4) {
|
|
6533
6541
|
return this.notification({ method: "ui/notifications/size-changed", params: e4 });
|
|
@@ -6548,12 +6556,12 @@ var Qg = class e3 extends Cg {
|
|
|
6548
6556
|
let i2 = new ResizeObserver(r2);
|
|
6549
6557
|
return i2.observe(document.documentElement), i2.observe(document.body), () => i2.disconnect();
|
|
6550
6558
|
}
|
|
6551
|
-
async connect(e4 = new
|
|
6559
|
+
async connect(e4 = new Eg(window.parent, window.parent), t2) {
|
|
6552
6560
|
if (this.transport) throw Error("App is already connected. Call close() before connecting again.");
|
|
6553
6561
|
this._initializedSent = false, await super.connect(e4);
|
|
6554
6562
|
try {
|
|
6555
6563
|
var n2;
|
|
6556
|
-
let e5 = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion:
|
|
6564
|
+
let e5 = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion: Tg } }, Yg, t2);
|
|
6557
6565
|
if (e5 === void 0) throw Error("Server sent invalid initialize result: ".concat(e5));
|
|
6558
6566
|
this._hostCapabilities = e5.hostCapabilities, this._hostInfo = e5.hostInfo, this._hostContext = e5.hostContext, await this.notification({ method: "ui/notifications/initialized" }), this._initializedSent = true, (n2 = this.options) != null && n2.autoResize && this.setupSizeChangedNotifications();
|
|
6559
6567
|
} catch (e5) {
|
|
@@ -6561,40 +6569,40 @@ var Qg = class e3 extends Cg {
|
|
|
6561
6569
|
}
|
|
6562
6570
|
}
|
|
6563
6571
|
};
|
|
6564
|
-
o(
|
|
6565
|
-
var
|
|
6566
|
-
function
|
|
6567
|
-
|
|
6572
|
+
o(t_, "ONE_SHOT_EVENTS", /* @__PURE__ */ new Set(["toolinput", "toolinputpartial", "toolresult", "toolcancelled"]));
|
|
6573
|
+
var n_ = null;
|
|
6574
|
+
function r_(e4) {
|
|
6575
|
+
n_ = e4;
|
|
6568
6576
|
}
|
|
6569
|
-
var
|
|
6570
|
-
function
|
|
6571
|
-
|
|
6577
|
+
var i_ = null;
|
|
6578
|
+
function a_(e4) {
|
|
6579
|
+
i_ = e4;
|
|
6572
6580
|
}
|
|
6573
|
-
var
|
|
6574
|
-
function
|
|
6575
|
-
return
|
|
6581
|
+
var o_ = null;
|
|
6582
|
+
function s_() {
|
|
6583
|
+
return o_ || (o_ = document.getElementById("tooltip")), o_;
|
|
6576
6584
|
}
|
|
6577
|
-
function
|
|
6578
|
-
let a2 =
|
|
6585
|
+
function c_(e4, t2, n2, r2, i2) {
|
|
6586
|
+
let a2 = s_();
|
|
6579
6587
|
if (!a2) return;
|
|
6580
|
-
a2.innerHTML = '\n <div class="tooltip-title">'.concat(
|
|
6588
|
+
a2.innerHTML = '\n <div class="tooltip-title">'.concat(h_(n2), '</div>\n <div class="tooltip-detail">').concat(h_(r2), "</div>\n ").concat(i2 ? '<div class="tooltip-hint">'.concat(h_(i2), "</div>") : "", "\n ");
|
|
6581
6589
|
let o2 = a2.getBoundingClientRect(), s2 = o2.width || 220, c2 = o2.height || 70, l2 = e4 + 14, u2 = t2 + 10;
|
|
6582
6590
|
l2 + s2 > window.innerWidth && (l2 = e4 - s2 - 8), u2 + c2 > window.innerHeight && (u2 = t2 - c2 - 8), a2.style.left = "".concat(l2, "px"), a2.style.top = "".concat(u2, "px"), a2.classList.add("visible");
|
|
6583
6591
|
}
|
|
6584
|
-
function
|
|
6592
|
+
function l_() {
|
|
6585
6593
|
var e4;
|
|
6586
|
-
(e4 =
|
|
6594
|
+
(e4 = s_()) == null || e4.classList.remove("visible");
|
|
6587
6595
|
}
|
|
6588
|
-
var
|
|
6589
|
-
function
|
|
6590
|
-
return
|
|
6596
|
+
var u_ = null;
|
|
6597
|
+
function d_() {
|
|
6598
|
+
return u_ || (u_ = document.createElement("div"), u_.id = "vedic-popup-panel", u_.className = "vedic-popup", document.body.appendChild(u_)), u_;
|
|
6591
6599
|
}
|
|
6592
|
-
function
|
|
6593
|
-
|
|
6600
|
+
function f_() {
|
|
6601
|
+
u_ == null || u_.classList.remove("visible"), i_ == null || i_(null);
|
|
6594
6602
|
}
|
|
6595
|
-
function
|
|
6603
|
+
function p_(e4, t2, n2, r2) {
|
|
6596
6604
|
var i2;
|
|
6597
|
-
let a2 =
|
|
6605
|
+
let a2 = n_ ? '<button class="ask-claude-btn" id="vedic-ask-claude-btn">Interpret</button>' : "", o2 = '\n <div class="vedic-popup-header">\n <div class="vedic-popup-title">\n <strong>'.concat(h_(t2), '</strong>\n <div class="vedic-popup-sub">').concat(h_(n2), '</div>\n </div>\n <button class="vedic-popup-close" id="vedic-popup-close">\u2715</button>\n </div>\n ').concat(a2, "\n "), s2 = d_();
|
|
6598
6606
|
s2.innerHTML = o2, s2.classList.add("visible"), requestAnimationFrame(() => {
|
|
6599
6607
|
let t3 = s2.getBoundingClientRect(), n3 = s2.offsetParent, r3, i3, a3, o3;
|
|
6600
6608
|
if (n3) {
|
|
@@ -6603,14 +6611,14 @@ function u_(e4, t2, n2, r2) {
|
|
|
6603
6611
|
} else r3 = window.innerWidth, i3 = window.innerHeight, a3 = 0, o3 = 0;
|
|
6604
6612
|
let c2 = e4.clientX - a3 + 14, l2 = e4.clientY - o3 + 14;
|
|
6605
6613
|
c2 + t3.width > r3 - 14 && (c2 = e4.clientX - a3 - t3.width - 14), l2 + t3.height > i3 - 14 && (l2 = e4.clientY - o3 - t3.height - 14), c2 = Math.max(14, c2), l2 = Math.max(14, l2), s2.style.left = "".concat(c2, "px"), s2.style.top = "".concat(l2, "px");
|
|
6606
|
-
}), (i2 = document.getElementById("vedic-popup-close")) == null || i2.addEventListener("click",
|
|
6614
|
+
}), (i2 = document.getElementById("vedic-popup-close")) == null || i2.addEventListener("click", f_), m_(s2, r2);
|
|
6607
6615
|
}
|
|
6608
|
-
function
|
|
6616
|
+
function m_(e4, t2) {
|
|
6609
6617
|
var n2;
|
|
6610
6618
|
(n2 = e4.querySelector("#vedic-ask-claude-btn")) == null || n2.addEventListener("click", () => {
|
|
6611
|
-
if (
|
|
6619
|
+
if (!n_) return;
|
|
6612
6620
|
let n3 = e4.querySelector("#vedic-ask-claude-btn");
|
|
6613
|
-
!n3 || n3.disabled || (n3.disabled = true, n3.textContent = "Sending\u2026", n3.classList.add("sending"),
|
|
6621
|
+
!n3 || n3.disabled || (n3.disabled = true, n3.textContent = "Sending\u2026", n3.classList.add("sending"), n_(t2).then(() => {
|
|
6614
6622
|
n3.textContent = "Sent", n3.classList.remove("sending"), n3.classList.add("sent"), setTimeout(() => {
|
|
6615
6623
|
n3.textContent = "Interpret", n3.classList.remove("sent"), n3.disabled = false;
|
|
6616
6624
|
}, 2500);
|
|
@@ -6619,69 +6627,71 @@ function d_(e4, t2) {
|
|
|
6619
6627
|
}));
|
|
6620
6628
|
});
|
|
6621
6629
|
}
|
|
6622
|
-
function
|
|
6630
|
+
function h_(e4) {
|
|
6623
6631
|
return e4.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
6624
6632
|
}
|
|
6625
|
-
var
|
|
6626
|
-
function
|
|
6633
|
+
var g_ = { Aries: "initiation & courage", Taurus: "stability & resource", Gemini: "communication & duality", Cancer: "nurture & emotional memory", Leo: "sovereignty & self-expression", Virgo: "refinement & service", Libra: "balance & relationship", Scorpio: "transformation & depth", Sagittarius: "expansion & meaning", Capricorn: "structure & discipline", Aquarius: "vision & detachment", Pisces: "dissolution & compassion" };
|
|
6634
|
+
function __(e4, t2) {
|
|
6627
6635
|
var n2, r2, i2, a2, o2, s2;
|
|
6628
6636
|
let c2 = document.getElementById(t2), l2 = c2 == null ? void 0 : c2.querySelector("#btn-zoom-in"), u2 = c2 == null ? void 0 : c2.querySelector("#btn-zoom-out"), d2 = c2 == null ? void 0 : c2.querySelector("#btn-reset-view");
|
|
6629
6637
|
c2 && (c2.hidden = false);
|
|
6630
6638
|
let f2 = (n2 = (r2 = e4.getAttribute("viewBox")) == null ? void 0 : r2.split(/[\s,]+/).map(Number)) == null ? [0, 0, 500, 500] : n2, p2 = (i2 = f2[0]) == null ? 0 : i2, ee2 = (a2 = f2[1]) == null ? 0 : a2, te2 = (o2 = f2[2]) == null ? 500 : o2, m2 = (s2 = f2[3]) == null ? 500 : s2, h2 = te2 / 5, ne2 = te2 * 2, re2 = p2, g2 = ee2, _2 = te2, v2 = m2;
|
|
6631
|
-
e4.
|
|
6632
|
-
let ie2 = () => e4.setAttribute("viewBox", "".concat(re2, " ").concat(g2, " ").concat(_2, " ").concat(v2)),
|
|
6639
|
+
e4.classList.add("oe-pannable");
|
|
6640
|
+
let ie2 = () => document.body.classList.contains("is-fullscreen"), ae2 = () => e4.setAttribute("viewBox", "".concat(re2, " ").concat(g2, " ").concat(_2, " ").concat(v2)), oe2 = (e5, t3, n3) => {
|
|
6633
6641
|
t3 === void 0 && (t3 = re2 + _2 / 2), n3 === void 0 && (n3 = g2 + v2 / 2);
|
|
6634
6642
|
let r3 = _2 * e5;
|
|
6635
|
-
r3 < h2 && (r3 = h2), r3 > ne2 && (r3 = ne2), r3 !== _2 && (e5 = r3 / _2, re2 = t3 - (t3 - re2) * e5, g2 = n3 - (n3 - g2) * e5, _2 = r3, v2 *= e5,
|
|
6643
|
+
r3 < h2 && (r3 = h2), r3 > ne2 && (r3 = ne2), r3 !== _2 && (e5 = r3 / _2, re2 = t3 - (t3 - re2) * e5, g2 = n3 - (n3 - g2) * e5, _2 = r3, v2 *= e5, ae2());
|
|
6636
6644
|
};
|
|
6637
|
-
l2 == null || l2.addEventListener("click", () =>
|
|
6638
|
-
re2 = p2, g2 = ee2, _2 = te2, v2 = m2,
|
|
6645
|
+
l2 == null || l2.addEventListener("click", () => oe2(0.8)), u2 == null || u2.addEventListener("click", () => oe2(1.25)), d2 == null || d2.addEventListener("click", () => {
|
|
6646
|
+
re2 = p2, g2 = ee2, _2 = te2, v2 = m2, ae2();
|
|
6639
6647
|
});
|
|
6640
|
-
let
|
|
6648
|
+
let se2 = (t3, n3) => {
|
|
6641
6649
|
let r3 = e4.getBoundingClientRect();
|
|
6642
6650
|
return { x: re2 + (t3 - r3.left) / r3.width * _2, y: g2 + (n3 - r3.top) / r3.height * v2 };
|
|
6643
6651
|
};
|
|
6644
6652
|
e4.addEventListener("wheel", (e5) => {
|
|
6653
|
+
if (!ie2() && !e5.ctrlKey && !e5.metaKey) return;
|
|
6645
6654
|
e5.preventDefault();
|
|
6646
|
-
let t3 = Math.exp((e5.deltaY < 0 ? -1 : 1) * 0.1), n3 =
|
|
6647
|
-
|
|
6655
|
+
let t3 = Math.exp((e5.deltaY < 0 ? -1 : 1) * 0.1), n3 = se2(e5.clientX, e5.clientY);
|
|
6656
|
+
oe2(t3, n3.x, n3.y);
|
|
6648
6657
|
}, { passive: false });
|
|
6649
|
-
let y2 = /* @__PURE__ */ new Map(),
|
|
6658
|
+
let y2 = /* @__PURE__ */ new Map(), b2 = null, ce2 = () => {
|
|
6650
6659
|
let [e5, t3] = [...y2.values()];
|
|
6651
6660
|
return { dist: Math.hypot(e5.x - t3.x, e5.y - t3.y), midX: (e5.x + t3.x) / 2, midY: (e5.y + t3.y) / 2 };
|
|
6652
|
-
},
|
|
6661
|
+
}, le2 = (t3, n3) => {
|
|
6653
6662
|
let r3 = e4.getBoundingClientRect();
|
|
6654
|
-
re2 -= t3 / r3.width * _2, g2 -= n3 / r3.height * v2,
|
|
6663
|
+
re2 -= t3 / r3.width * _2, g2 -= n3 / r3.height * v2, ae2();
|
|
6655
6664
|
};
|
|
6656
6665
|
e4.addEventListener("pointerdown", (t3) => {
|
|
6666
|
+
if (t3.pointerType === "touch" && !ie2()) return;
|
|
6657
6667
|
let n3 = t3.target, r3 = !!(n3.closest && (n3.closest('[class*="-hit"]') || n3.closest('[class*="-activation"]') || n3.closest(".variable-arrow") || n3.closest("button")));
|
|
6658
|
-
y2.set(t3.pointerId, { x: t3.clientX, y: t3.clientY, interactive: r3 }), r3 || (e4.setPointerCapture(t3.pointerId), e4.style.cursor = "grabbing"), y2.size === 2 && (
|
|
6668
|
+
y2.set(t3.pointerId, { x: t3.clientX, y: t3.clientY, interactive: r3 }), r3 || (e4.setPointerCapture(t3.pointerId), e4.style.cursor = "grabbing"), y2.size === 2 && (b2 = ce2());
|
|
6659
6669
|
}), e4.addEventListener("pointermove", (e5) => {
|
|
6660
6670
|
let t3 = y2.get(e5.pointerId);
|
|
6661
|
-
if (t3) if (y2.set(e5.pointerId, { x: e5.clientX, y: e5.clientY, interactive: t3.interactive }), y2.size >= 2 &&
|
|
6662
|
-
let e6 =
|
|
6663
|
-
if (
|
|
6664
|
-
let t4 =
|
|
6665
|
-
|
|
6666
|
-
}
|
|
6667
|
-
|
|
6668
|
-
} else y2.size === 1 && !t3.interactive &&
|
|
6671
|
+
if (t3) if (y2.set(e5.pointerId, { x: e5.clientX, y: e5.clientY, interactive: t3.interactive }), y2.size >= 2 && b2) {
|
|
6672
|
+
let e6 = ce2();
|
|
6673
|
+
if (b2.dist > 0 && e6.dist > 0) {
|
|
6674
|
+
let t4 = se2(e6.midX, e6.midY);
|
|
6675
|
+
oe2(b2.dist / e6.dist, t4.x, t4.y);
|
|
6676
|
+
}
|
|
6677
|
+
le2(e6.midX - b2.midX, e6.midY - b2.midY), b2 = e6;
|
|
6678
|
+
} else y2.size === 1 && !t3.interactive && le2(e5.clientX - t3.x, e5.clientY - t3.y);
|
|
6669
6679
|
});
|
|
6670
|
-
let
|
|
6671
|
-
y2.delete(t3.pointerId) && (e4.hasPointerCapture(t3.pointerId) && e4.releasePointerCapture(t3.pointerId),
|
|
6680
|
+
let ue2 = (t3) => {
|
|
6681
|
+
y2.delete(t3.pointerId) && (e4.hasPointerCapture(t3.pointerId) && e4.releasePointerCapture(t3.pointerId), b2 = y2.size >= 2 ? ce2() : null, y2.size === 0 && (e4.style.cursor = "default"));
|
|
6672
6682
|
};
|
|
6673
|
-
e4.addEventListener("pointerup",
|
|
6683
|
+
e4.addEventListener("pointerup", ue2), e4.addEventListener("pointercancel", ue2);
|
|
6674
6684
|
}
|
|
6675
|
-
function
|
|
6685
|
+
function v_(e4, t2, n2, r2) {
|
|
6676
6686
|
var i2, a2;
|
|
6677
|
-
|
|
6687
|
+
r_((i2 = r2.onAskClaude) == null ? null : i2);
|
|
6678
6688
|
let o2 = e4.querySelector("#pan-zoom-controls");
|
|
6679
6689
|
e4.innerHTML = "", o2 && e4.appendChild(o2);
|
|
6680
6690
|
let s2 = document.createElement("div");
|
|
6681
6691
|
s2.style.cssText = "width:100%;height:100%;", s2.innerHTML = t2;
|
|
6682
6692
|
let c2 = s2.querySelector("svg");
|
|
6683
6693
|
if (!c2) return console.error("[wire-go-svg] No <svg> element found in payload"), null;
|
|
6684
|
-
c2.setAttribute("width", "100%"), c2.setAttribute("height", "100%"), c2.setAttribute("role", "group"), c2.setAttribute("aria-label", "Vedic Jyotish Rashi Chart"), c2.addEventListener("click", (e5) => e5.stopPropagation()), e4.appendChild(c2),
|
|
6694
|
+
c2.setAttribute("width", "100%"), c2.setAttribute("height", "100%"), c2.setAttribute("role", "group"), c2.setAttribute("aria-label", "Vedic Jyotish Rashi Chart"), c2.addEventListener("click", (e5) => e5.stopPropagation()), e4.appendChild(c2), __(c2, "pan-zoom-controls");
|
|
6685
6695
|
let l2 = /* @__PURE__ */ new Map();
|
|
6686
6696
|
for (let e5 of (a2 = n2.planets) == null ? [] : a2) {
|
|
6687
6697
|
var u2;
|
|
@@ -6700,10 +6710,10 @@ function h_(e4, t2, n2, r2) {
|
|
|
6700
6710
|
var t3, n3, r3;
|
|
6701
6711
|
let i3 = d2(e5.target);
|
|
6702
6712
|
if (!i3) return;
|
|
6703
|
-
let a3 = (t3 = i3.getAttribute("data-sign")) == null ? "" : t3, o3 = i3.getAttribute("data-lagna") === "true", s3 = (n3 = l2.get(a3)) == null ? [] : n3, c3 = s3.length ? s3.map((e6) => "".concat(e6.planet, " ").concat(e6.rashi_degree.toFixed(1), "\xB0").concat(e6.is_retrograde ? " \u211E" : "")).join(", ") : "Unoccupied", u3 = (r3 =
|
|
6704
|
-
|
|
6713
|
+
let a3 = (t3 = i3.getAttribute("data-sign")) == null ? "" : t3, o3 = i3.getAttribute("data-lagna") === "true", s3 = (n3 = l2.get(a3)) == null ? [] : n3, c3 = s3.length ? s3.map((e6) => "".concat(e6.planet, " ").concat(e6.rashi_degree.toFixed(1), "\xB0").concat(e6.is_retrograde ? " \u211E" : "")).join(", ") : "Unoccupied", u3 = (r3 = g_[a3]) == null ? "" : r3;
|
|
6714
|
+
c_(e5.clientX, e5.clientY, "".concat(a3).concat(o3 ? " \u2014 Lagna" : ""), c3, u3 ? "".concat(u3, " \xB7 click to interpret") : "Click to interpret");
|
|
6705
6715
|
}), c2.addEventListener("mouseout", (e5) => {
|
|
6706
|
-
d2(e5.target) &&
|
|
6716
|
+
d2(e5.target) && l_();
|
|
6707
6717
|
}), c2.addEventListener("click", (e5) => {
|
|
6708
6718
|
var t3, n3;
|
|
6709
6719
|
let i3 = d2(e5.target);
|
|
@@ -6711,7 +6721,7 @@ function h_(e4, t2, n2, r2) {
|
|
|
6711
6721
|
let a3 = (t3 = i3.getAttribute("data-sign")) == null ? "" : t3, o3 = i3.getAttribute("data-lagna") === "true", s3 = (n3 = l2.get(a3)) == null ? [] : n3;
|
|
6712
6722
|
if (r2.onSignClick(a3, o3, s3), r2.onAskClaude) {
|
|
6713
6723
|
let t4 = s3.length ? s3.map((e6) => "".concat(e6.planet, " ").concat(e6.rashi_degree.toFixed(1), "\xB0")).join(", ") : "Unoccupied rashi";
|
|
6714
|
-
|
|
6724
|
+
p_(e5, "".concat(a3).concat(o3 ? " \u2014 Lagna" : ""), t4, { type: "sign", data: { sign: a3, is_lagna: o3, planets: s3.map((e6) => e6.planet) } });
|
|
6715
6725
|
}
|
|
6716
6726
|
}), c2.querySelectorAll("[data-sign]").forEach((e5) => {
|
|
6717
6727
|
var t3;
|
|
@@ -6725,13 +6735,13 @@ function h_(e4, t2, n2, r2) {
|
|
|
6725
6735
|
});
|
|
6726
6736
|
}), c2;
|
|
6727
6737
|
}
|
|
6728
|
-
var
|
|
6729
|
-
function
|
|
6738
|
+
var y_ = { "chart-wheel": { stripIcon: "\u2726", stripTitle: "About the Natal Chart", stripHints: ["Click any <strong>planet</strong> for a deep placement reading", "Click any <strong>aspect line</strong> for its dynamic interpretation", "Click any <strong>house cusp</strong> for house themes", "Use the <strong>date controls</strong> to move through time"], modalText: "This wheel is an exact celestial snapshot of the sky at a given moment and place \u2014 every planet, house, and aspect line is clickable." }, "bi-wheel": { stripIcon: "\u2295", stripTitle: "About the Bi-Wheel", stripHints: ["Click any <strong>inner planet</strong> for natal placement depth", "Click any <strong>outer planet</strong> for transit or synastry meaning", "Click a <strong>cross-aspect line</strong> for inter-chart dynamics", "Use the <strong>date controls</strong> to advance transits"], modalText: "Two charts are layered here \u2014 the inner wheel is the natal chart; the outer ring shows the second chart (transits or another person's planets)." }, bodygraph: { stripIcon: "\u25C8", stripTitle: "About the Bodygraph", stripHints: ["Click any <strong>center</strong> (defined or undefined) for its meaning", "Click any <strong>channel</strong> to explore its life theme", "Click any <strong>gate number</strong> for its I Ching hexagram reading", "Click a <strong>planet row</strong> in the sidebar for its HD role"], modalText: "The bodygraph is a living map of the energy centres, channels, and gates that define a Human Design chart." }, "vedic-chart": { stripIcon: "\u{1F549}", stripTitle: "About the Jyotish Chart", stripHints: ["Click any <strong>rashi cell</strong> for its themes and any planets placed there", "The <strong>diagonal mark</strong> shows the Lagna (Ascendant) rashi", "Use the <strong>action bar</strong> for a full chart interpretation", "Click <strong>Moon & Nakshatra</strong> for lunar mansion detail"], modalText: "This is a Vedic birth chart rendered as a South Indian Rashi grid \u2014 sidereal planetary placements by fixed sign." }, "transit-timeline": { stripIcon: "\u2604", stripTitle: "About the Transit Timeline", stripHints: ["Each entry is an <strong>exact transit hit</strong> \u2014 a transiting planet contacting a natal point", "Events are <strong>grouped by month</strong> in chronological order", "The <strong>\u211E marker</strong> flags a retrograde crossing", "Click any transit for a focused <strong>interpretation</strong>"], modalText: "This timeline lists upcoming transits to the natal chart \u2014 the exact dates outer-planet energies activate each placement." }, "moon-phase": { stripIcon: "\u263E", stripTitle: "About the Moon Phase Dial", stripHints: ["Click the <strong>Moon</strong> for its phase interpretation", "Click the <strong>Void-of-Course</strong> card when the Moon is VOC", "Use the <strong>date control</strong> to move the sky to any moment"], modalText: "The dial shows the Moon's live illumination, phase, sign, and void-of-course status for the selected moment." }, bazi: { stripIcon: "\u56DB", stripTitle: "About the BaZi Chart", stripHints: ["Click any <strong>pillar</strong> (Year, Month, Day, Hour) for its interpretation", "The <strong>Day Master</strong> is the core identity element", "The <strong>Wu Xing bar</strong> shows the Five Element balance"], modalText: "This BaZi (Four Pillars of Destiny) chart maps the Heavenly Stems and Earthly Branches present at a given moment of birth." } }, b_ = '\n .oe-welcome-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: oklch(0% 0 0 / 0.55);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n z-index: 9999;\n display: flex;\n align-items: center;\n justify-content: center;\n animation: oe-fade-in 0.4s ease both;\n font-family: system-ui, sans-serif;\n }\n\n .oe-welcome-modal {\n /* Themed, not hardcoded: the title/text/hints below all resolve through\n var(--text\u2026), so a fixed dark surface here meant that once the light\n palette became reachable the modal rendered near-black text on a\n near-black card \u2014 1.09:1, effectively invisible. The fallback is the\n previous literal, and every app\'s dark --surface is oklch(11-12%), so\n dark rendering is unchanged. */\n background: var(--surface, oklch(11% 0.010 265));\n border: 1px solid var(--gold-glow, oklch(72% 0.12 80 / 0.20));\n border-radius: 16px;\n padding: 32px;\n width: 90%;\n max-width: 440px;\n box-shadow: 0 20px 40px oklch(0% 0 0 / 0.55), inset 0 1px 0 oklch(100% 0 0 / 0.06);\n animation: oe-modal-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n\n @keyframes oe-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n\n @keyframes oe-modal-in {\n from { opacity: 0; transform: scale(0.95) translateY(10px); }\n to { opacity: 1; transform: scale(1) translateY(0); }\n }\n\n .oe-welcome-header {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 4px;\n }\n\n .oe-welcome-icon {\n font-size: 28px;\n color: var(--gold, oklch(72% 0.12 80));\n line-height: 1;\n text-shadow: 0 0 10px var(--gold-glow, oklch(72% 0.12 80 / 0.30));\n }\n\n .oe-welcome-title {\n font-size: 20px;\n font-weight: 600;\n color: var(--text, oklch(92% 0.006 265));\n margin: 0;\n letter-spacing: 0.02em;\n }\n\n .oe-welcome-text {\n font-size: 14.5px;\n line-height: 1.5;\n color: var(--text-secondary, oklch(68% 0.008 265));\n margin: 0;\n }\n\n .oe-welcome-hints {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin: 8px 0 12px 0;\n padding: 0;\n list-style: none;\n }\n\n .oe-welcome-hints li {\n font-size: 13.5px;\n line-height: 1.4;\n color: var(--text-secondary, oklch(68% 0.008 265));\n display: flex;\n align-items: flex-start;\n gap: 10px;\n opacity: 0;\n animation: oe-fade-in 0.4s ease forwards;\n }\n\n /* Stagger the hints */\n .oe-welcome-hints li:nth-child(1) { animation-delay: 0.15s; }\n .oe-welcome-hints li:nth-child(2) { animation-delay: 0.25s; }\n .oe-welcome-hints li:nth-child(3) { animation-delay: 0.35s; }\n .oe-welcome-hints li:nth-child(4) { animation-delay: 0.45s; }\n\n .oe-welcome-hints li::before {\n content: "\u2726";\n color: var(--gold-dim, oklch(52% 0.06 80));\n font-size: 12px;\n padding-top: 2px;\n }\n\n .oe-welcome-hints strong {\n color: var(--text, oklch(92% 0.006 265));\n font-weight: 600;\n }\n\n .oe-welcome-button {\n align-self: flex-end;\n background: var(--gold-subtle, oklch(72% 0.12 80 / 0.10));\n color: var(--gold, oklch(72% 0.12 80));\n border: 1px solid var(--gold-glow, oklch(72% 0.12 80 / 0.20));\n padding: 10px 24px;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.2s ease, border-color 0.2s ease;\n margin-top: 4px;\n }\n\n .oe-welcome-button:hover {\n background: oklch(72% 0.12 80 / 0.18);\n border-color: oklch(72% 0.12 80 / 0.40);\n }\n\n .oe-welcome-button:focus-visible {\n outline: 2px solid var(--gold, oklch(72% 0.12 80));\n outline-offset: 2px;\n }\n\n .oe-welcome-backdrop.is-dismissing {\n animation: oe-fade-out 0.3s ease forwards;\n }\n\n .oe-welcome-backdrop.is-dismissing .oe-welcome-modal {\n animation: oe-modal-out 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;\n }\n\n @keyframes oe-fade-out {\n to { opacity: 0; }\n }\n\n @keyframes oe-modal-out {\n to { opacity: 0; transform: scale(0.95) translateY(10px); }\n }\n';
|
|
6739
|
+
function x_() {
|
|
6730
6740
|
if (document.getElementById("oe-first-run-styles")) return;
|
|
6731
6741
|
let e4 = document.createElement("style");
|
|
6732
|
-
e4.id = "oe-first-run-styles", e4.textContent =
|
|
6742
|
+
e4.id = "oe-first-run-styles", e4.textContent = b_, document.head.appendChild(e4);
|
|
6733
6743
|
}
|
|
6734
|
-
function
|
|
6744
|
+
function S_(e4) {
|
|
6735
6745
|
let t2 = document.activeElement, n2 = document.createElement("div");
|
|
6736
6746
|
n2.className = "oe-welcome-backdrop";
|
|
6737
6747
|
let r2 = document.createElement("div");
|
|
@@ -6749,24 +6759,24 @@ function y_(e4) {
|
|
|
6749
6759
|
e5.key === "Escape" && (e5.preventDefault(), o2()), e5.key === "Tab" && (e5.preventDefault(), a2.focus());
|
|
6750
6760
|
}), requestAnimationFrame(() => a2.focus()), n2;
|
|
6751
6761
|
}
|
|
6752
|
-
function
|
|
6753
|
-
|
|
6754
|
-
let t2 = y_
|
|
6762
|
+
function C_(e4) {
|
|
6763
|
+
x_();
|
|
6764
|
+
let t2 = S_(y_[e4]);
|
|
6755
6765
|
document.body.appendChild(t2);
|
|
6756
6766
|
}
|
|
6757
|
-
var
|
|
6758
|
-
function
|
|
6767
|
+
var w_ = "\n .oe-info-button {\n position: fixed;\n top: 12px;\n right: 12px;\n width: 30px;\n height: 30px;\n border-radius: 50%;\n background: var(--surface-2, oklch(16% 0.010 265));\n border: 1px solid var(--border-strong, oklch(30% 0.010 265));\n color: var(--text-secondary, oklch(68% 0.008 265));\n font: 600 14px/1 Georgia, serif;\n font-style: italic;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 9998;\n transition: all 150ms ease;\n }\n\n .oe-info-button:hover {\n background: var(--surface, oklch(11% 0.010 265));\n border-color: var(--gold-dim, oklch(52% 0.06 80));\n color: var(--gold, oklch(72% 0.12 80));\n }\n\n .oe-info-button:focus-visible {\n outline: 2px solid var(--gold, oklch(72% 0.12 80));\n outline-offset: 2px;\n }\n";
|
|
6768
|
+
function T_() {
|
|
6759
6769
|
if (document.getElementById("oe-info-button-styles")) return;
|
|
6760
6770
|
let e4 = document.createElement("style");
|
|
6761
|
-
e4.id = "oe-info-button-styles", e4.textContent =
|
|
6771
|
+
e4.id = "oe-info-button-styles", e4.textContent = w_, document.head.appendChild(e4);
|
|
6762
6772
|
}
|
|
6763
|
-
function
|
|
6773
|
+
function E_(e4) {
|
|
6764
6774
|
if (document.getElementById("oe-info-button")) return;
|
|
6765
|
-
|
|
6775
|
+
T_();
|
|
6766
6776
|
let t2 = document.createElement("button");
|
|
6767
|
-
t2.id = "oe-info-button", t2.className = "oe-info-button", t2.setAttribute("aria-label", "About this chart"), t2.title = "About this chart", t2.textContent = "i", t2.addEventListener("click", () =>
|
|
6777
|
+
t2.id = "oe-info-button", t2.className = "oe-info-button", t2.setAttribute("aria-label", "About this chart"), t2.title = "About this chart", t2.textContent = "i", t2.addEventListener("click", () => C_(e4)), document.body.appendChild(t2);
|
|
6768
6778
|
}
|
|
6769
|
-
function
|
|
6779
|
+
function D_(e4) {
|
|
6770
6780
|
var t2;
|
|
6771
6781
|
if (!e4) return null;
|
|
6772
6782
|
if (e4.structuredContent != null && typeof e4.structuredContent == "object") return e4.structuredContent;
|
|
@@ -6779,50 +6789,63 @@ function w_(e4) {
|
|
|
6779
6789
|
}
|
|
6780
6790
|
return null;
|
|
6781
6791
|
}
|
|
6782
|
-
function
|
|
6792
|
+
function O_(e4) {
|
|
6783
6793
|
return e4.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
6784
6794
|
}
|
|
6785
|
-
function
|
|
6786
|
-
let { container: t2, message: n2, onRetry: r2, retryLabel: i2 = "\u21BA Try again" } = e4, a2 = r2 ? '<button class="error-retry-btn" type="button">'.concat(
|
|
6787
|
-
if (t2.innerHTML = '<div class="error-state" role="alert"><div class="error-icon" aria-hidden="true">\u26A0\uFE0F</div><p class="error-msg">'.concat(
|
|
6795
|
+
function k_(e4) {
|
|
6796
|
+
let { container: t2, message: n2, onRetry: r2, retryLabel: i2 = "\u21BA Try again" } = e4, a2 = r2 ? '<button class="error-retry-btn" type="button">'.concat(O_(i2), "</button>") : "";
|
|
6797
|
+
if (t2.innerHTML = '<div class="error-state" role="alert"><div class="error-icon" aria-hidden="true">\u26A0\uFE0F</div><p class="error-msg">'.concat(O_(n2), "</p>") + a2 + "</div>", t2.removeAttribute("hidden"), r2) {
|
|
6788
6798
|
var o2;
|
|
6789
6799
|
(o2 = t2.querySelector(".error-retry-btn")) == null || o2.addEventListener("click", r2);
|
|
6790
6800
|
}
|
|
6791
6801
|
}
|
|
6792
|
-
var
|
|
6793
|
-
function
|
|
6794
|
-
return
|
|
6802
|
+
var A_;
|
|
6803
|
+
function j_() {
|
|
6804
|
+
return A_ ? A_ === "dark" : window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
6795
6805
|
}
|
|
6796
|
-
function
|
|
6806
|
+
function M_(e4 = j_()) {
|
|
6797
6807
|
let t2 = e4 ? "dark" : "light";
|
|
6798
6808
|
return document.documentElement.setAttribute("data-theme", t2), t2;
|
|
6799
6809
|
}
|
|
6800
|
-
function
|
|
6801
|
-
|
|
6810
|
+
function N_(e4) {
|
|
6811
|
+
M_();
|
|
6802
6812
|
try {
|
|
6803
6813
|
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (t2) => {
|
|
6804
|
-
|
|
6814
|
+
A_ || e4 == null || e4(M_(t2.matches));
|
|
6805
6815
|
});
|
|
6806
6816
|
} catch (e5) {
|
|
6807
6817
|
}
|
|
6808
6818
|
}
|
|
6809
|
-
function
|
|
6819
|
+
function P_(e4, t2) {
|
|
6810
6820
|
var n2, r2;
|
|
6811
6821
|
let i2 = (e5) => {
|
|
6812
6822
|
let n3 = e5 == null ? void 0 : e5.theme;
|
|
6813
6823
|
if (n3 !== "light" && n3 !== "dark") return;
|
|
6814
|
-
|
|
6815
|
-
let r3 = document.documentElement.getAttribute("data-theme"), i3 =
|
|
6824
|
+
A_ = n3;
|
|
6825
|
+
let r3 = document.documentElement.getAttribute("data-theme"), i3 = M_(n3 === "dark");
|
|
6816
6826
|
i3 !== r3 && (t2 == null || t2(i3));
|
|
6817
6827
|
};
|
|
6818
6828
|
(n2 = e4.addEventListener) == null || n2.call(e4, "hostcontextchanged", i2), i2((r2 = e4.getHostContext) == null ? void 0 : r2.call(e4));
|
|
6819
6829
|
}
|
|
6820
|
-
|
|
6821
|
-
|
|
6830
|
+
var F_ = ["inline", "fullscreen"];
|
|
6831
|
+
function I_(e4) {
|
|
6832
|
+
var t2;
|
|
6833
|
+
return (t2 = e4.getHostContext) == null ? void 0 : t2.call(e4);
|
|
6834
|
+
}
|
|
6835
|
+
function L_(e4) {
|
|
6836
|
+
var t2;
|
|
6837
|
+
let n2 = (t2 = I_(e4)) == null ? void 0 : t2.availableDisplayModes;
|
|
6838
|
+
return Array.isArray(n2) ? n2 : [];
|
|
6839
|
+
}
|
|
6840
|
+
var R_ = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">\n <polyline points="5,1 1,1 1,5"/>\n <polyline points="11,1 15,1 15,5"/>\n <polyline points="5,15 1,15 1,11"/>\n <polyline points="11,15 15,15 15,11"/>\n </svg>', z_ = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">\n <polyline points="1,5 5,5 5,1"/>\n <polyline points="15,5 11,5 11,1"/>\n <polyline points="1,11 5,11 5,15"/>\n <polyline points="15,11 11,11 11,15"/>\n </svg>', B_ = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" aria-hidden="true">\n <rect x="1" y="2.5" width="14" height="11" rx="1.5"/>\n <rect x="8" y="8" width="5.5" height="4" rx="0.8" fill="currentColor" stroke="none"/>\n </svg>', V_ = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">\n <rect x="1" y="2.5" width="14" height="11" rx="1.5"/>\n <polyline points="6,6 10,10"/>\n <polyline points="6,9.5 6,6 9.5,6"/>\n </svg>';
|
|
6841
|
+
function H_(e4, t2, n2 = [], r2 = {}) {
|
|
6842
|
+
var i2;
|
|
6822
6843
|
if (!t2 || t2.querySelector("#btn-fullscreen")) return;
|
|
6823
6844
|
let a2 = document.createElement("button");
|
|
6824
|
-
a2.id = "btn-fullscreen", a2.className = "pan-btn pan-btn--fullscreen", a2.
|
|
6825
|
-
let o2 =
|
|
6845
|
+
a2.id = "btn-fullscreen", a2.type = "button", a2.className = "pan-btn pan-btn--fullscreen", a2.innerHTML = R_, a2.hidden = true;
|
|
6846
|
+
let o2 = null;
|
|
6847
|
+
r2.pip && (o2 = document.createElement("button"), o2.id = "btn-pip", o2.type = "button", o2.className = "pan-btn pan-btn--pip", o2.innerHTML = B_, o2.hidden = true);
|
|
6848
|
+
let s2 = ["param-controls", "aspect-filter", "controls-panel", "mode-badge"];
|
|
6826
6849
|
function c2() {
|
|
6827
6850
|
if (document.getElementById("fs-bottom-bar") || !n2.length) return;
|
|
6828
6851
|
let e5 = document.getElementById("app");
|
|
@@ -6855,59 +6878,59 @@ function M_(e4, t2, n2 = []) {
|
|
|
6855
6878
|
}
|
|
6856
6879
|
e5.remove();
|
|
6857
6880
|
}
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6881
|
+
let u2 = "inline";
|
|
6882
|
+
function d2(t3) {
|
|
6883
|
+
let n3 = u2 === "fullscreen", r3 = t3 === "fullscreen";
|
|
6884
|
+
u2 = t3, document.body.classList.toggle("is-fullscreen", r3), document.body.classList.toggle("is-pip", t3 === "pip"), document.documentElement.setAttribute("data-display-mode", t3), a2.innerHTML = r3 ? z_ : R_;
|
|
6885
|
+
let i3 = r3 ? "Exit fullscreen" : "Enter fullscreen";
|
|
6886
|
+
if (a2.setAttribute("aria-label", i3), a2.title = r3 ? "Exit fullscreen (Esc)" : i3, o2) {
|
|
6887
|
+
let e5 = t3 === "pip";
|
|
6888
|
+
o2.innerHTML = e5 ? V_ : B_;
|
|
6889
|
+
let n4 = e5 ? "Return to the conversation" : "Pop out (picture-in-picture)";
|
|
6890
|
+
o2.setAttribute("aria-label", n4), o2.title = n4;
|
|
6891
|
+
}
|
|
6892
|
+
r3 && !n3 && (c2(), U_(e4)), !r3 && n3 && l2();
|
|
6861
6893
|
}
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6894
|
+
function f2() {
|
|
6895
|
+
var n3, r3;
|
|
6896
|
+
let i3 = L_(e4);
|
|
6897
|
+
a2.hidden = !i3.includes("fullscreen"), o2 && (o2.hidden = !i3.includes("pip")), (!a2.hidden || o2 && !o2.hidden) && (t2.hidden = false);
|
|
6898
|
+
let s3 = (n3 = (r3 = I_(e4)) == null ? void 0 : r3.displayMode) == null ? "inline" : n3;
|
|
6899
|
+
s3 !== u2 && d2(s3);
|
|
6900
|
+
}
|
|
6901
|
+
async function p2(t3) {
|
|
6902
|
+
if (!(t3 !== "inline" && !L_(e4).includes(t3))) try {
|
|
6903
|
+
var n3;
|
|
6904
|
+
let r3 = await e4.requestDisplayMode({ mode: t3 });
|
|
6905
|
+
d2((n3 = r3 == null ? void 0 : r3.mode) == null ? u2 : n3);
|
|
6872
6906
|
} catch (e5) {
|
|
6873
6907
|
console.warn("[AppChrome] requestDisplayMode failed:", e5);
|
|
6874
6908
|
}
|
|
6875
|
-
}), document.addEventListener("keydown", async (t3) => {
|
|
6876
|
-
if (t3.key === "Escape" && document.body.classList.contains("is-fullscreen")) {
|
|
6877
|
-
t3.preventDefault();
|
|
6878
|
-
try {
|
|
6879
|
-
var n3;
|
|
6880
|
-
let t4 = await e4.requestDisplayMode({ mode: "inline" });
|
|
6881
|
-
u2((n3 = t4 == null ? void 0 : t4.mode) == null ? "inline" : n3);
|
|
6882
|
-
} catch (e5) {
|
|
6883
|
-
console.warn("[AppChrome] Escape fullscreen failed:", e5);
|
|
6884
|
-
}
|
|
6885
|
-
}
|
|
6886
|
-
}), (r2 = e4.addEventListener) == null || r2.call(e4, "hostcontextchanged", (e5) => {
|
|
6887
|
-
var t3;
|
|
6888
|
-
u2((t3 = e5 == null ? void 0 : e5.displayMode) == null ? "inline" : t3);
|
|
6889
|
-
});
|
|
6890
|
-
let d2 = (i2 = e4.getHostContext) == null ? void 0 : i2.call(e4);
|
|
6891
|
-
d2 != null && d2.displayMode && u2(d2.displayMode), t2.insertBefore(a2, t2.firstChild), t2.removeAttribute("hidden");
|
|
6892
|
-
function f2() {
|
|
6893
|
-
let e5 = document.getElementById("fs-hint-banner");
|
|
6894
|
-
e5 && e5.remove();
|
|
6895
|
-
let t3 = document.createElement("div");
|
|
6896
|
-
t3.id = "fs-hint-banner", Object.assign(t3.style, { position: "fixed", top: "12px", left: "50%", transform: "translateX(-50%)", background: "oklch(14% 0.012 265 / 0.90)", backdropFilter: "blur(12px)", WebkitBackdropFilter: "blur(12px)", border: "1px solid oklch(72% 0.12 80 / 0.3)", borderRadius: "20px", padding: "6px 16px", fontSize: "11px", fontWeight: "600", color: "oklch(80% 0.08 80)", letterSpacing: "0.04em", zIndex: "9999", pointerEvents: "none", opacity: "0", transition: "opacity 300ms ease", whiteSpace: "nowrap" }), t3.textContent = "Esc \u2014 exit fullscreen & return to chat", document.body.appendChild(t3), requestAnimationFrame(() => {
|
|
6897
|
-
t3.style.opacity = "1";
|
|
6898
|
-
}), setTimeout(() => {
|
|
6899
|
-
t3.style.opacity = "0", setTimeout(() => t3.remove(), 350);
|
|
6900
|
-
}, 4e3);
|
|
6901
6909
|
}
|
|
6910
|
+
a2.addEventListener("click", () => {
|
|
6911
|
+
p2(u2 === "fullscreen" ? "inline" : "fullscreen");
|
|
6912
|
+
}), o2 == null || o2.addEventListener("click", () => {
|
|
6913
|
+
p2(u2 === "pip" ? "inline" : "pip");
|
|
6914
|
+
}), document.addEventListener("keydown", (e5) => {
|
|
6915
|
+
e5.key !== "Escape" || u2 !== "fullscreen" || (e5.preventDefault(), p2("inline"));
|
|
6916
|
+
}), (i2 = e4.addEventListener) == null || i2.call(e4, "hostcontextchanged", f2), o2 && t2.insertBefore(o2, t2.firstChild), t2.insertBefore(a2, t2.firstChild), d2("inline"), f2();
|
|
6917
|
+
}
|
|
6918
|
+
function U_(e4) {
|
|
6919
|
+
var t2, n2;
|
|
6920
|
+
(t2 = document.getElementById("fs-hint-banner")) == null || t2.remove();
|
|
6921
|
+
let r2 = (n2 = I_(e4)) == null ? void 0 : n2.deviceCapabilities, i2 = !!(r2 != null && r2.touch) && (r2 == null ? void 0 : r2.hover) === false, a2 = document.createElement("div");
|
|
6922
|
+
a2.id = "fs-hint-banner", a2.className = "fs-hint-banner", a2.setAttribute("role", "status"), a2.textContent = i2 ? "Tap the collapse button to return to the chat" : "Esc \u2014 exit fullscreen & return to chat", document.body.appendChild(a2), requestAnimationFrame(() => a2.classList.add("visible")), setTimeout(() => {
|
|
6923
|
+
a2.classList.remove("visible"), setTimeout(() => a2.remove(), 350);
|
|
6924
|
+
}, 4e3);
|
|
6902
6925
|
}
|
|
6903
|
-
function
|
|
6926
|
+
function W_(e4, t2) {
|
|
6904
6927
|
e4.ontoolcancelled = (e5) => {
|
|
6905
6928
|
var n2, r2, i2;
|
|
6906
6929
|
let a2 = (n2 = e5.reason) == null ? "Tool call was cancelled" : n2;
|
|
6907
|
-
console.warn("[AppChrome] Tool cancelled:", a2), (r2 = t2.statusFn) == null || r2.call(t2, null), !t2.loadingEl.hidden && t2.loadingEl.getAttribute("hidden") === null && (t2.loadingEl.setAttribute("hidden", ""), t2.contentEl.removeAttribute("hidden")), (i2 = t2.paramControls) == null || (i2 = i2.call(t2)) == null || i2.setBusy(false),
|
|
6930
|
+
console.warn("[AppChrome] Tool cancelled:", a2), (r2 = t2.statusFn) == null || r2.call(t2, null), !t2.loadingEl.hidden && t2.loadingEl.getAttribute("hidden") === null && (t2.loadingEl.setAttribute("hidden", ""), t2.contentEl.removeAttribute("hidden")), (i2 = t2.paramControls) == null || (i2 = i2.call(t2)) == null || i2.setBusy(false), G_(a2);
|
|
6908
6931
|
};
|
|
6909
6932
|
}
|
|
6910
|
-
function
|
|
6933
|
+
function G_(e4) {
|
|
6911
6934
|
var t2;
|
|
6912
6935
|
(t2 = document.getElementById("cancel-toast")) == null || t2.remove();
|
|
6913
6936
|
let n2 = document.createElement("div");
|
|
@@ -6915,23 +6938,37 @@ function P_(e4) {
|
|
|
6915
6938
|
n2.classList.remove("visible"), setTimeout(() => n2.remove(), 300);
|
|
6916
6939
|
}, 3e3);
|
|
6917
6940
|
}
|
|
6918
|
-
function
|
|
6941
|
+
function K_(e4) {
|
|
6919
6942
|
var t2;
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6943
|
+
let n2 = document.documentElement, r2 = (e5, t3) => {
|
|
6944
|
+
typeof t3 == "number" && Number.isFinite(t3) && t3 > 0 ? n2.style.setProperty(e5, "".concat(t3, "px")) : n2.style.removeProperty(e5);
|
|
6945
|
+
}, i2 = (e5, t3) => {
|
|
6946
|
+
t3 === void 0 ? n2.removeAttribute(e5) : n2.setAttribute(e5, t3 ? "true" : "false");
|
|
6947
|
+
};
|
|
6948
|
+
function a2() {
|
|
6949
|
+
var t3, a3, o2;
|
|
6950
|
+
let s2 = I_(e4);
|
|
6951
|
+
if (!s2) return;
|
|
6952
|
+
let c2 = (t3 = s2.containerDimensions) == null ? {} : t3;
|
|
6953
|
+
r2("--host-width", c2.width), r2("--host-max-width", c2.maxWidth), r2("--host-height", c2.height), r2("--host-max-height", c2.maxHeight);
|
|
6954
|
+
let l2 = (a3 = s2.safeAreaInsets) == null ? {} : a3;
|
|
6955
|
+
for (let e5 of ["top", "right", "bottom", "left"]) {
|
|
6956
|
+
let t4 = l2[e5];
|
|
6957
|
+
n2.style.setProperty("--safe-".concat(e5), typeof t4 == "number" && t4 > 0 ? "".concat(t4, "px") : "0px");
|
|
6958
|
+
}
|
|
6959
|
+
let u2 = l2.bottom;
|
|
6960
|
+
n2.toggleAttribute("data-safe-bottom", typeof u2 == "number" && u2 > 0), typeof s2.platform == "string" && n2.setAttribute("data-platform", s2.platform);
|
|
6961
|
+
let d2 = s2.deviceCapabilities;
|
|
6962
|
+
i2("data-touch", d2 == null ? void 0 : d2.touch), i2("data-hover", d2 == null ? void 0 : d2.hover);
|
|
6963
|
+
let f2 = s2.styles;
|
|
6964
|
+
f2 != null && f2.variables && $g(f2.variables, n2), !(f2 == null || (o2 = f2.css) == null) && o2.fonts && e_(f2.css.fonts);
|
|
6965
|
+
}
|
|
6966
|
+
a2(), (t2 = e4.addEventListener) == null || t2.call(e4, "hostcontextchanged", a2);
|
|
6967
|
+
}
|
|
6968
|
+
var q_ = /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}):(\d{2})(?::(\d{2}))?(?:\.\d+)?$/;
|
|
6969
|
+
function J_(e4, t2) {
|
|
6933
6970
|
if (!e4) return null;
|
|
6934
|
-
let n2 =
|
|
6971
|
+
let n2 = q_.exec(e4.trim());
|
|
6935
6972
|
if (n2) {
|
|
6936
6973
|
let [, e5, t3, r3, i2, a2, o2] = n2, s2 = new Date(Date.UTC(+e5, t3 - 1, +r3, +i2, +a2, o2 ? +o2 : 0));
|
|
6937
6974
|
return isNaN(s2.getTime()) ? null : { date: s2, timeZone: "UTC" };
|
|
@@ -6939,59 +6976,59 @@ function L_(e4, t2) {
|
|
|
6939
6976
|
let r2 = new Date(e4);
|
|
6940
6977
|
return isNaN(r2.getTime()) ? null : { date: r2, timeZone: t2 || "UTC" };
|
|
6941
6978
|
}
|
|
6942
|
-
function
|
|
6979
|
+
function Y_(e4) {
|
|
6943
6980
|
var t2;
|
|
6944
6981
|
if (!e4) return "";
|
|
6945
6982
|
let n2 = [], r2 = (t2 = e4.location) == null ? void 0 : t2.trim();
|
|
6946
6983
|
if (r2 ? n2.push(r2) : typeof e4.latitude == "number" && typeof e4.longitude == "number" && n2.push("".concat(e4.latitude.toFixed(2), ", ").concat(e4.longitude.toFixed(2))), e4.datetime) {
|
|
6947
|
-
let t3 = /^\d{4}-\d{2}-\d{2}/.test(e4.datetime.trim()) ?
|
|
6984
|
+
let t3 = /^\d{4}-\d{2}-\d{2}/.test(e4.datetime.trim()) ? J_(e4.datetime, e4.timezone) : null;
|
|
6948
6985
|
t3 ? n2.push(t3.date.toLocaleString("en-US", { timeZone: t3.timeZone, day: "numeric", month: "short", year: "numeric", hour: "numeric", minute: "2-digit" })) : n2.push(e4.datetime);
|
|
6949
6986
|
}
|
|
6950
6987
|
return n2.join(" \xB7 ");
|
|
6951
6988
|
}
|
|
6952
|
-
function
|
|
6953
|
-
let r2 =
|
|
6989
|
+
function X_(e4, t2, n2 = "Chart") {
|
|
6990
|
+
let r2 = Y_(t2);
|
|
6954
6991
|
return r2 ? "".concat(n2, ": ").concat(r2, "\n\n").concat(e4) : e4;
|
|
6955
6992
|
}
|
|
6956
|
-
var
|
|
6957
|
-
function
|
|
6958
|
-
return
|
|
6993
|
+
var Z_ = document.getElementById("loading-state"), Q_ = document.getElementById("vedic-container"), $_ = document.getElementById("info-panel"), ev = document.getElementById("chart-status"), tv = new t_({ name: "Vedic Chart Explorer", version: "1.0.0" }, { availableDisplayModes: F_ }), $ = null, nv = "dark", rv = false;
|
|
6994
|
+
function iv() {
|
|
6995
|
+
return M_();
|
|
6959
6996
|
}
|
|
6960
|
-
|
|
6961
|
-
function
|
|
6962
|
-
if (
|
|
6997
|
+
N_((e4) => void hv(e4));
|
|
6998
|
+
function av(e4) {
|
|
6999
|
+
if (ev) {
|
|
6963
7000
|
if (!e4) {
|
|
6964
|
-
|
|
7001
|
+
ev.classList.remove("visible");
|
|
6965
7002
|
return;
|
|
6966
7003
|
}
|
|
6967
|
-
|
|
7004
|
+
ev.textContent = "\xB7 ".concat(e4), ev.classList.add("visible");
|
|
6968
7005
|
}
|
|
6969
7006
|
}
|
|
6970
|
-
|
|
6971
|
-
async function
|
|
6972
|
-
e4 =
|
|
7007
|
+
a_(av);
|
|
7008
|
+
async function ov(e4) {
|
|
7009
|
+
e4 = X_(e4, $ == null ? void 0 : $._birth_params, "Vedic chart");
|
|
6973
7010
|
try {
|
|
6974
|
-
(await
|
|
7011
|
+
(await tv.sendMessage({ role: "user", content: [{ type: "text", text: e4 }] })).isError && console.error("[VedicChart] Host rejected sendMessage");
|
|
6975
7012
|
} catch (e5) {
|
|
6976
7013
|
console.error("[VedicChart] sendMessage failed:", e5);
|
|
6977
7014
|
}
|
|
6978
7015
|
}
|
|
6979
|
-
async function
|
|
7016
|
+
async function sv(e4) {
|
|
6980
7017
|
var t2, n2;
|
|
6981
|
-
if (
|
|
6982
|
-
let r2 = (t2 =
|
|
7018
|
+
if (!$) return;
|
|
7019
|
+
let r2 = (t2 = $.lagna) == null ? "unknown" : t2, i2 = (n2 = $.ayanamsa) == null ? "Lahiri" : n2;
|
|
6983
7020
|
if (e4.type === "sign") {
|
|
6984
7021
|
var a2, o2;
|
|
6985
|
-
let t3 = String((a2 = e4.data.sign) == null ? "" : a2), n3 = !!e4.data.is_lagna, s3 = ((o2 =
|
|
7022
|
+
let t3 = String((a2 = e4.data.sign) == null ? "" : a2), n3 = !!e4.data.is_lagna, s3 = ((o2 = $.planets) == null ? [] : o2).filter((e5) => e5.rashi_western === t3).map((e5) => {
|
|
6986
7023
|
var t4, n4, r3, i3;
|
|
6987
7024
|
return "".concat(e5.planet, " ").concat(e5.rashi_degree.toFixed(1), "\xB0").concat(e5.is_retrograde ? " (retrograde)" : "", " \u2014 Nakshatra ").concat((t4 = (n4 = e5.nakshatra) == null ? void 0 : n4.name) == null ? "" : t4, " pada ").concat((r3 = (i3 = e5.nakshatra) == null ? void 0 : i3.pada) == null ? "" : r3);
|
|
6988
7025
|
}).join("; ");
|
|
6989
|
-
await
|
|
7026
|
+
await ov("Interpret the rashi ".concat(t3, " in this Vedic (Jyotish) chart \u2014 Ayanamsa: ").concat(i2, ", Lagna: ").concat(r2, ".\n\n") + (n3 ? "This is the Lagna (Ascendant) rashi. " : "") + (s3 ? "Planets placed here: ".concat(s3, ".\n\n") : "This rashi is unoccupied.\n\n") + "Please explain the themes of this rashi".concat(n3 ? " as the Lagna" : "", ", and interpret each placed planet's sidereal sign, nakshatra, and pada in the context of this birth chart."));
|
|
6990
7027
|
return;
|
|
6991
7028
|
}
|
|
6992
7029
|
if (e4.type === "overview") {
|
|
6993
7030
|
var s2;
|
|
6994
|
-
await
|
|
7031
|
+
await ov("Vedic chart \u2014 Ayanamsa: ".concat(i2, ". Lagna: ").concat(r2, ". Planets: ").concat(((s2 = $.planets) == null ? [] : s2).map((e5) => {
|
|
6995
7032
|
var t3, n3, r3, i3;
|
|
6996
7033
|
return "".concat(e5.planet, " in ").concat(e5.rashi_western, " ").concat(e5.rashi_degree.toFixed(1), "\xB0 (").concat((t3 = (n3 = e5.nakshatra) == null ? void 0 : n3.name) == null ? "" : t3, " pada ").concat((r3 = (i3 = e5.nakshatra) == null ? void 0 : i3.pada) == null ? "" : r3, ")").concat(e5.is_retrograde ? " \u211E" : "");
|
|
6997
7034
|
}).join(", "), ".\n\nPlease give a comprehensive interpretation of this Jyotish birth chart, covering the Lagna, chart lord, key planetary placements, and overall life themes."));
|
|
@@ -6999,88 +7036,88 @@ async function Z_(e4) {
|
|
|
6999
7036
|
}
|
|
7000
7037
|
if (e4.type === "moon") {
|
|
7001
7038
|
var c2, l2, u2, d2;
|
|
7002
|
-
let e5 = ((c2 =
|
|
7003
|
-
await
|
|
7039
|
+
let e5 = ((c2 = $.planets) == null ? [] : c2).find((e6) => e6.planet === "Moon");
|
|
7040
|
+
await ov(e5 ? "Focus on the Moon in ".concat(e5.rashi_western, " (").concat(e5.rashi, "), ").concat(e5.rashi_degree.toFixed(2), "\xB0, in Nakshatra ").concat((l2 = e5.nakshatra) == null ? void 0 : l2.name, " (lord: ").concat((u2 = e5.nakshatra) == null ? void 0 : u2.lord, ", pada: ").concat((d2 = e5.nakshatra) == null ? void 0 : d2.pada, "). Interpret the Moon's placement for emotional nature, mind, mother, and public life. Include the Nakshatra's influence.") : "Interpret the Moon's placement in this Vedic chart, including Nakshatra detail.");
|
|
7004
7041
|
return;
|
|
7005
7042
|
}
|
|
7006
7043
|
}
|
|
7007
|
-
function
|
|
7044
|
+
function cv(e4, t2, n2) {
|
|
7008
7045
|
var r2;
|
|
7009
|
-
let i2 = (r2 =
|
|
7010
|
-
|
|
7046
|
+
let i2 = (r2 = g_[e4]) == null ? "" : r2;
|
|
7047
|
+
av("".concat(e4).concat(t2 ? " \xB7 Lagna" : "").concat(i2 ? " \xB7 " + i2 : ""));
|
|
7011
7048
|
}
|
|
7012
|
-
function
|
|
7049
|
+
function lv(e4) {
|
|
7013
7050
|
return '\n <div class="vedic-header">\n <span class="vedic-title">Jyotish Rashi Chart</span>\n <span class="vedic-ayanamsa-badge">'.concat(e4.ayanamsa || "Lahiri", "</span>\n </div>\n ");
|
|
7014
7051
|
}
|
|
7015
|
-
function
|
|
7052
|
+
function uv(e4) {
|
|
7016
7053
|
var t2, n2, r2, i2, a2, o2;
|
|
7017
|
-
|
|
7054
|
+
$ = e4, Z_.setAttribute("hidden", ""), Q_.removeAttribute("hidden");
|
|
7018
7055
|
let s2 = e4._svg;
|
|
7019
7056
|
if (!s2) {
|
|
7020
|
-
|
|
7057
|
+
pv("Vedic chart render unavailable \u2014 the server did not return an SVG.", mv);
|
|
7021
7058
|
return;
|
|
7022
7059
|
}
|
|
7023
7060
|
let c2 = document.getElementById("vedic-header-wrap");
|
|
7024
7061
|
if (!c2) {
|
|
7025
7062
|
var l2;
|
|
7026
|
-
c2 = document.createElement("div"), c2.id = "vedic-header-wrap", (l2 =
|
|
7063
|
+
c2 = document.createElement("div"), c2.id = "vedic-header-wrap", (l2 = Q_.parentElement) == null || l2.insertBefore(c2, Q_);
|
|
7027
7064
|
}
|
|
7028
|
-
c2.innerHTML =
|
|
7065
|
+
c2.innerHTML = lv(e4), v_(Q_, s2, e4, { onSignClick: cv, onAskClaude: sv });
|
|
7029
7066
|
let u2 = document.getElementById("vedic-action-bar");
|
|
7030
7067
|
if (!u2) {
|
|
7031
7068
|
var d2;
|
|
7032
7069
|
u2 = document.createElement("div"), u2.id = "vedic-action-bar", u2.className = "vedic-action-bar";
|
|
7033
7070
|
let e5 = document.querySelector("#fs-bottom-bar [data-column='right']");
|
|
7034
|
-
e5 ? e5.appendChild(u2) : (d2 =
|
|
7071
|
+
e5 ? e5.appendChild(u2) : (d2 = Q_.parentElement) == null || d2.insertBefore(u2, Q_);
|
|
7035
7072
|
}
|
|
7036
|
-
u2.innerHTML = '\n <button class="action-btn action-btn--primary" id="vedic-interpret-btn">\u2726 Interpret this chart</button>\n <button class="action-btn" id="vedic-lagna-btn">Lagna & Ascendant</button>\n <button class="action-btn" id="vedic-moon-btn">Moon & Nakshatra</button>\n ', (t2 = u2.querySelector("#vedic-interpret-btn")) == null || t2.addEventListener("click", () => void
|
|
7073
|
+
u2.innerHTML = '\n <button class="action-btn action-btn--primary" id="vedic-interpret-btn">\u2726 Interpret this chart</button>\n <button class="action-btn" id="vedic-lagna-btn">Lagna & Ascendant</button>\n <button class="action-btn" id="vedic-moon-btn">Moon & Nakshatra</button>\n ', (t2 = u2.querySelector("#vedic-interpret-btn")) == null || t2.addEventListener("click", () => void sv({ type: "overview", data: {} })), (n2 = u2.querySelector("#vedic-lagna-btn")) == null || n2.addEventListener("click", () => void sv({ type: "sign", data: { sign: e4.lagna, is_lagna: true } })), (r2 = u2.querySelector("#vedic-moon-btn")) == null || r2.addEventListener("click", () => void sv({ type: "moon", data: {} }));
|
|
7037
7074
|
let f2 = ((i2 = e4.planets) == null ? [] : i2).map((e5) => '<div class="info-row"><span class="info-label">'.concat(e5.planet, '</span><span class="info-value">').concat(e5.rashi_western, " ").concat(e5.rashi_degree.toFixed(1), "\xB0").concat(e5.is_retrograde ? " \u211E" : "", "</span></div>")).join("");
|
|
7038
|
-
|
|
7075
|
+
$_.innerHTML = '\n <div class="info-row"><span class="info-label">Lagna</span><span class="info-value">'.concat((a2 = e4.lagna) == null ? "\u2014" : a2, '</span></div>\n <div class="info-row"><span class="info-label">Ayanamsa</span><span class="info-value">').concat((o2 = e4.ayanamsa) == null ? "Lahiri" : o2, "</span></div>\n ").concat(f2, "\n "), $_.removeAttribute("hidden"), E_("vedic-chart");
|
|
7039
7076
|
}
|
|
7040
|
-
var
|
|
7041
|
-
function
|
|
7042
|
-
|
|
7077
|
+
var dv;
|
|
7078
|
+
function fv() {
|
|
7079
|
+
dv && (clearTimeout(dv), dv = void 0);
|
|
7043
7080
|
}
|
|
7044
|
-
function
|
|
7045
|
-
|
|
7081
|
+
function pv(e4, t2) {
|
|
7082
|
+
fv(), Z_.setAttribute("hidden", ""), k_({ container: Q_, message: e4, onRetry: t2 });
|
|
7046
7083
|
}
|
|
7047
|
-
function
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
}, 3e4),
|
|
7084
|
+
function mv() {
|
|
7085
|
+
fv(), Q_.setAttribute("hidden", ""), Z_.removeAttribute("hidden"), dv = setTimeout(() => {
|
|
7086
|
+
pv("The Vedic chart didn't load. Tap to try again.", mv);
|
|
7087
|
+
}, 3e4), tv.sendMessage({ role: "user", content: [{ type: "text", text: "Please regenerate the Vedic chart." }] }).catch(() => {
|
|
7051
7088
|
});
|
|
7052
7089
|
}
|
|
7053
|
-
async function
|
|
7054
|
-
if (!(e4 ===
|
|
7055
|
-
|
|
7090
|
+
async function hv(e4) {
|
|
7091
|
+
if (!(e4 === nv || rv || !($ != null && $._birth_params))) {
|
|
7092
|
+
rv = true, nv = e4;
|
|
7056
7093
|
try {
|
|
7057
7094
|
var t2, n2, r2, i2;
|
|
7058
|
-
let a2 =
|
|
7059
|
-
o2 && ((i2 = o2.planets) != null && i2.length || o2._svg) &&
|
|
7095
|
+
let a2 = $._birth_params, o2 = D_(await tv.callServerTool({ name: "vedic_chart_recalculate", arguments: { datetime: a2.datetime, latitude: (t2 = a2.latitude) == null ? void 0 : t2, longitude: (n2 = a2.longitude) == null ? void 0 : n2, ayanamsa: (r2 = a2.ayanamsa) == null ? void 0 : r2, theme: e4, ...$._render_token ? { render_token: $._render_token } : {} } }));
|
|
7096
|
+
o2 && ((i2 = o2.planets) != null && i2.length || o2._svg) && uv(o2);
|
|
7060
7097
|
} catch (e5) {
|
|
7061
7098
|
console.error("[VedicChart] Theme re-fetch failed:", e5);
|
|
7062
7099
|
} finally {
|
|
7063
|
-
|
|
7100
|
+
rv = false;
|
|
7064
7101
|
}
|
|
7065
7102
|
}
|
|
7066
7103
|
}
|
|
7067
|
-
|
|
7068
|
-
|
|
7104
|
+
tv.ontoolresult = (e4) => {
|
|
7105
|
+
fv();
|
|
7069
7106
|
try {
|
|
7070
|
-
let t2 =
|
|
7071
|
-
if (((t2 == null ? void 0 : t2._theme) === "light" || (t2 == null ? void 0 : t2._theme) === "dark") && (
|
|
7072
|
-
|
|
7107
|
+
let t2 = D_(e4);
|
|
7108
|
+
if (((t2 == null ? void 0 : t2._theme) === "light" || (t2 == null ? void 0 : t2._theme) === "dark") && (nv = t2._theme), !t2 || !t2.planets) {
|
|
7109
|
+
pv("Vedic chart data could not be parsed from the server response.", mv);
|
|
7073
7110
|
return;
|
|
7074
7111
|
}
|
|
7075
|
-
|
|
7112
|
+
uv(t2), hv(iv());
|
|
7076
7113
|
} catch (e5) {
|
|
7077
|
-
|
|
7114
|
+
pv("An error occurred while rendering the Vedic chart.", mv), console.error("[VedicChart] Render error:", e5);
|
|
7078
7115
|
}
|
|
7079
|
-
},
|
|
7080
|
-
|
|
7116
|
+
}, W_(tv, { loadingEl: Z_, contentEl: Q_, statusFn: av, paramControls: null }), dv = setTimeout(() => {
|
|
7117
|
+
pv("Vedic chart data is taking longer than expected.", mv);
|
|
7081
7118
|
}, 3e4), (async () => {
|
|
7082
7119
|
try {
|
|
7083
|
-
await
|
|
7120
|
+
await tv.connect(), H_(tv, document.getElementById("pan-zoom-controls"), ["info-panel", "vedic-action-bar"]), K_(tv), P_(tv, (e4) => void hv(e4));
|
|
7084
7121
|
} catch (e4) {
|
|
7085
7122
|
console.error("[VedicChart] connect() failed:", e4);
|
|
7086
7123
|
}
|