@vpxa/aikit 0.1.351 → 0.1.353
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/package.json +1 -1
- package/packages/blocks-core/dist/index.mjs +949 -118
- package/packages/core/dist/index.d.ts +3 -0
- package/packages/core/dist/index.js +1 -1
- package/packages/present/dist/annotation-layer.js +48 -74
- package/packages/present/dist/index.html +977 -153
- package/packages/server/dist/bin.js +1 -1
- package/packages/server/dist/index.js +288 -109
- package/packages/server/dist/prelude-DetbWo8R.js +1 -0
- package/packages/server/dist/prelude-hfAEi93R.js +2 -0
- package/packages/server/dist/sampling-CWjnUevo.js +2 -0
- package/packages/server/dist/sampling-CnE3owSt.js +1 -0
- package/packages/server/dist/{server-Dc2XtS92.js → server-D5eu57oU.js} +150 -148
- package/packages/server/dist/{server-Ct4BK2hi.js → server-D7gZ4K_H.js} +150 -148
- package/packages/server/dist/{server-http-DBmzukZH.js → server-http-AarbD3gm.js} +1 -1
- package/packages/server/dist/{server-http-BNC9qZBj.js → server-http-wnYmWFkC.js} +1 -1
- package/packages/server/dist/{server-stdio-JHWimdo9.js → server-stdio-BWoMqXU8.js} +1 -1
- package/packages/server/dist/{server-stdio-DkDdZI98.js → server-stdio-CBGO6XiO.js} +1 -1
- package/packages/server/viewers/canvas.html +944 -127
- package/packages/server/viewers/code-review-viewer.html +352 -0
- package/packages/server/viewers/report-template.html +918 -101
- package/packages/server/viewers/task-plan-static.html +1 -1
- package/packages/server/viewers/tour-viewer.html +919 -102
- package/packages/tools/dist/index.js +82 -82
- package/scaffold/dist/definitions/skills/c4-architecture.mjs +1 -1
- package/scaffold/dist/definitions/skills/docs.mjs +19 -3
- package/scaffold/dist/definitions/skills/present.mjs +317 -13
- package/scaffold/dist/generated/block-docs.mjs +18 -64
- package/packages/server/dist/prelude-Clxlztkk.js +0 -1
- package/packages/server/dist/prelude-Dn7jTsqe.js +0 -2
- package/packages/server/dist/sampling-giGWyrcO.js +0 -1
- package/packages/server/dist/sampling-nivAea83.js +0 -2
|
@@ -463,6 +463,11 @@
|
|
|
463
463
|
cursor: pointer;
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
+
.bk-multi-select {
|
|
467
|
+
max-height: 2.25rem;
|
|
468
|
+
min-width: 8rem;
|
|
469
|
+
}
|
|
470
|
+
|
|
466
471
|
.bk-text-submit { display: flex; gap: var(--dt-space-2); align-items: center; }
|
|
467
472
|
.bk-input { min-height: 2.25rem; padding: 0 var(--dt-space-3); border: 1px solid var(--dt-border-default); border-radius: var(--dt-radius-md); background: var(--dt-bg-primary); color: var(--dt-text-primary); font: inherit; font-size: var(--dt-font-size-sm); flex: 1; min-width: 200px; transition: border-color var(--dt-transition-fast); }
|
|
468
473
|
.bk-input:focus { outline: none; border-color: var(--dt-accent-emphasis); box-shadow: 0 0 0 2px var(--dt-accent-subtle); }
|
|
@@ -473,7 +478,54 @@
|
|
|
473
478
|
.bk-form-label { font-size: var(--dt-font-size-sm); font-weight: 500; color: var(--dt-text-secondary); }
|
|
474
479
|
.bk-action-feedback { font-size: var(--dt-font-size-sm); color: var(--dt-text-secondary); padding: var(--dt-space-2) 0; }
|
|
475
480
|
.bk-action-feedback[data-feedback-state="sent"] { color: var(--dt-success-fg); }
|
|
476
|
-
`;function ne(e,t){return`<div class="bk-actions">${ee(e.value).map(e=>{let t=o(e.id);if(e.type===`select`){let n=(e.options??[]).map(e=>{let t=typeof e==`string`?e:e.value,n=typeof e==`string`?e:e.label;return`<option value="${i(t)}">${i(n)}</option>`}).join(``);return`<label class="bk-select-wrap"><span class="bk-visually-hidden">${i(e.label)}</span><select class="bk-select" data-action-id="${t}"><option value="" selected disabled>${i(e.label)}</option>${n}</select></label>`}if(e.type===`text-submit`)return`<div class="bk-text-submit" data-action-id="${t}"><input type="text" class="bk-input" placeholder="${i(e.label)}" data-action-id="${t}" /><button type="button" class="bk-action bk-action--primary" data-action-id="${t}">Send</button></div>`;if(e.type===`form-submit`&&e.schema){let n=e.schema;return`<form class="bk-form" data-action-id="${t}"><fieldset>${Object.entries(n).map(([e,t])=>{let n=t.description??e,r=t.type===`number`?`number`:`text`;return`<label class="bk-form-field"><span class="bk-form-label">${i(n)}</span><input type="${r}" class="bk-input" name="${i(e)}" placeholder="${i(n)}" /></label>`}).join(``)}<button type="submit" class="bk-action bk-action--primary">${i(e.label)}</button></fieldset></form>`}return`<button type="button" class="bk-action bk-action--${i(e.variant??`default`)}" data-action-id="${t}">${i(e.label)}</button>`}).join(``)}<div class="bk-action-feedback" style="display:none;font-size:0.875rem;color:var(--dt-text-secondary);padding:var(--dt-space-2) 0;" data-feedback-state="pending">💬 Feedback sent</div></div>`}var re=`
|
|
481
|
+
`;function ne(e,t){return`<div class="bk-actions">${ee(e.value).map(e=>{let t=o(e.id);if(e.type===`select`){let n=(e.options??[]).map(e=>{let t=typeof e==`string`?e:e.value,n=typeof e==`string`?e:e.label;return`<option value="${i(t)}">${i(n)}</option>`}).join(``);return`<label class="bk-select-wrap"><span class="bk-visually-hidden">${i(e.label)}</span><select class="bk-select" data-action-id="${t}" data-action-row="single"><option value="" selected disabled>${i(e.label)}</option>${n}</select></label>`}if(e.type===`text-submit`)return`<div class="bk-text-submit" data-action-id="${t}" data-action-row="multi"><input type="text" class="bk-input" placeholder="${i(e.label)}" data-action-id="${t}" /><button type="button" class="bk-action bk-action--primary" data-action-id="${t}">Send</button></div>`;if(e.type===`multi-select`){let n=(e.options??[]).map(e=>{let t=typeof e==`string`?e:e.value,n=typeof e==`string`?e:e.label;return`<option value="${i(t)}">${i(n)}</option>`}).join(``);return`<label class="bk-select-wrap"><span class="bk-visually-hidden">${i(e.label)}</span><select class="bk-select bk-multi-select" data-action-id="${t}" data-action-row="single" multiple size="1">${n}</select></label>`}if(e.type===`form-submit`&&e.schema){let n=e.schema;return`<form class="bk-form" data-action-id="${t}" data-action-row="multi"><fieldset>${Object.entries(n).map(([e,t])=>{let n=t.description??e,r=t.type===`number`?`number`:`text`;return`<label class="bk-form-field"><span class="bk-form-label">${i(n)}</span><input type="${r}" class="bk-input" name="${i(e)}" placeholder="${i(n)}" /></label>`}).join(``)}<button type="submit" class="bk-action bk-action--primary">${i(e.label)}</button></fieldset></form>`}return`<button type="button" class="bk-action bk-action--${i(e.variant??`default`)}" data-action-id="${t}" data-action-row="single">${i(e.label)}</button>`}).join(``)}<div class="bk-action-feedback" style="display:none;font-size:0.875rem;color:var(--dt-text-secondary);padding:var(--dt-space-2) 0;" data-feedback-state="pending">💬 Feedback sent</div></div>`}var re=`
|
|
482
|
+
/* ── Entrance: fade-in + slide-up for cards, metrics, checklist, findings ── */
|
|
483
|
+
@keyframes aikit-enter-fade {
|
|
484
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
485
|
+
to { opacity: 1; transform: translateY(0); }
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/* ── Progress bar: 0% → target width fill ── */
|
|
489
|
+
@keyframes aikit-progress-fill {
|
|
490
|
+
from { width: 0%; }
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/* ── Checklist/completed state: scale bounce ── */
|
|
494
|
+
@keyframes aikit-check-bounce {
|
|
495
|
+
0% { transform: scale(0); }
|
|
496
|
+
50% { transform: scale(1.2); }
|
|
497
|
+
100% { transform: scale(1); }
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/* ── Chart: stroke draw for line/area/sparkline ── */
|
|
501
|
+
@keyframes aikit-chart-draw {
|
|
502
|
+
to { stroke-dashoffset: 0; }
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/* ── Chart: bar grow from baseline ── */
|
|
506
|
+
@keyframes aikit-chart-grow {
|
|
507
|
+
from { transform: scaleY(0); }
|
|
508
|
+
to { transform: scaleY(1); }
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
/* ── Chart: area reveal from bottom ── */
|
|
512
|
+
@keyframes aikit-chart-reveal {
|
|
513
|
+
from { clip-path: inset(100% 0 0 0); }
|
|
514
|
+
to { clip-path: inset(0 0 0 0); }
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/* ── Chart: pie/donut fade-in + rotation ── */
|
|
518
|
+
@keyframes aikit-pie-enter {
|
|
519
|
+
from { opacity: 0; transform: rotate(-20deg); }
|
|
520
|
+
to { opacity: 1; transform: rotate(0deg); }
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/* ── Loading shimmer for skeleton states ── */
|
|
524
|
+
@keyframes aikit-shimmer {
|
|
525
|
+
0% { background-position: -200px 0; }
|
|
526
|
+
100% { background-position: calc(200px + 100%) 0; }
|
|
527
|
+
}
|
|
528
|
+
`,ie=`
|
|
477
529
|
.bk-cards {
|
|
478
530
|
display: grid;
|
|
479
531
|
grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
|
|
@@ -489,6 +541,8 @@
|
|
|
489
541
|
background: var(--dt-bg-secondary);
|
|
490
542
|
box-shadow: var(--dt-shadow-sm);
|
|
491
543
|
transition: transform var(--dt-transition-normal), box-shadow var(--dt-transition-normal), border-color var(--dt-transition-normal);
|
|
544
|
+
animation: aikit-enter-fade 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
545
|
+
animation-delay: calc(var(--i, 0) * 60ms);
|
|
492
546
|
}
|
|
493
547
|
|
|
494
548
|
.bk-card:hover {
|
|
@@ -528,7 +582,26 @@
|
|
|
528
582
|
letter-spacing: 0.02em;
|
|
529
583
|
white-space: nowrap;
|
|
530
584
|
}
|
|
531
|
-
|
|
585
|
+
|
|
586
|
+
/* ── Compact cards on mobile ── */
|
|
587
|
+
@media (max-width: 480px) {
|
|
588
|
+
.bk-cards {
|
|
589
|
+
gap: var(--dt-space-3);
|
|
590
|
+
}
|
|
591
|
+
.bk-card {
|
|
592
|
+
padding: var(--dt-space-4);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
@media (max-width: 320px) {
|
|
597
|
+
.bk-card {
|
|
598
|
+
padding: var(--dt-space-3);
|
|
599
|
+
}
|
|
600
|
+
.bk-card-title {
|
|
601
|
+
font-size: var(--dt-font-size-base);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
`;function ae(e,t){return`<div class="bk-cards">${p(e).map((e,t)=>{let n=e.badge?`<span class="bk-card-badge">${i(e.badge)}</span>`:``,r=e.body?`<div class="bk-card-body">${i(e.body)}</div>`:``,a=e.description?`<div class="bk-card-description">${i(e.description)}</div>`:``;return`<article class="bk-card" data-tone="${f(e.status)}" style="--i: ${t}" aria-label="${i(e.title)}">${n?`<div class="bk-card-header"><div class="bk-card-title">${i(e.title)}</div>${n}</div>`:`<div class="bk-card-header"><div class="bk-card-title">${i(e.title)}</div></div>`}${r}${a}</article>`}).join(``)}</div>`}var oe=[`#45c8a8`,`#c89bff`,`#f5b342`,`#6baef8`,`#2bd47c`,`#f56a6a`,`#f472b6`,`#38bdf8`],se=new Set([`line`,`area`,`bar`,`horizontal-bar`,`pie`,`donut`,`sparkline`,`heatmap`]),ce=500,le=300,ue=300,de=100,fe=30,pe=`
|
|
532
605
|
.bk-chart {
|
|
533
606
|
display: grid;
|
|
534
607
|
gap: var(--dt-space-3);
|
|
@@ -551,6 +624,7 @@
|
|
|
551
624
|
width: 100%;
|
|
552
625
|
height: auto;
|
|
553
626
|
overflow: visible;
|
|
627
|
+
animation: aikit-enter-fade 500ms ease-out both;
|
|
554
628
|
}
|
|
555
629
|
|
|
556
630
|
.bk-chart-svg .bk-chart-grid {
|
|
@@ -638,7 +712,64 @@
|
|
|
638
712
|
border-bottom: 1px solid var(--dt-border-muted);
|
|
639
713
|
text-align: left;
|
|
640
714
|
}
|
|
641
|
-
`;function pe(e,t){let n=me(e),r=Se(n.headers,n.data);if(n.data.length===0||!oe.has(n.chartType))return Ce(n.note,r);let i=he(n);if(!i)return Ce(n.note,r);let a=n.chartType===`pie`||n.chartType===`donut`?[]:n.yKeys;return`<div class="bk-chart"><div class="bk-chart-surface">${i}</div>${a.length>1?Te(a):``}${we(r)}</div>`}function me(e){let t=c(e.value),n=Array.isArray(t?.data)?t.data:[],r=String(t?.chartType??e.chartType??`bar`),a=oe.has(r)?r:`bar`,o=i(r),s=Ee(n,String(t?.xKey??`label`)),l=Array.isArray(t?.yKeys)?t.yKeys.filter(e=>typeof e==`string`):[],u=l.length>0?l:[`value`];if(l.length===0&&n.length>0&&n[0]!=null){let e=n[0];if(!(`value`in e&&typeof e.value==`number`)){let t=Object.keys(e).filter(t=>t!==s&&typeof e[t]==`number`);t.length>0&&(u=t)}}let d=[s,...u.filter((e,t)=>e!==s&&u.indexOf(e)===t)];return{chartType:a,data:n,xKey:s,yKeys:u,headers:d,note:o}}function he(e){switch(e.chartType){case`line`:case`area`:return ge(e,e.chartType===`area`);case`bar`:return _e(e);case`horizontal-bar`:return ve(e);case`pie`:return ye(e,!1);case`donut`:return ye(e,!0);case`sparkline`:return be(e);case`heatmap`:return xe(e);default:return``}}function ge(e,t){let n=Oe(e.data,e.xKey,e.yKeys),r=n.flatMap(e=>e.values).filter(Number.isFinite);if(r.length===0)return``;let a=Pe(r),o=Ne(se,ce,{left:60,right:20,top:20,bottom:40}),s=n.map((e,t)=>Fe(t,n.length,o.left,o.right)),c=e.yKeys.map((e,r)=>{let i=ae[r%ae.length],c=n.map((e,t)=>{let n=s[t],i=Ie(e.values[r],a,o.bottom,o.top);return`${m(n)},${m(i)}`}),l=n.map((e,t)=>{let n=s[t],c=Ie(e.values[r],a,o.bottom,o.top);return`<circle cx="${m(n)}" cy="${m(c)}" r="3" fill="${i}" />`}).join(``),u=`<polyline fill="none" stroke="${i}" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round" points="${c.join(` `)}" />`;return t?`<polygon fill="${i}" fill-opacity="0.16" points="${[`${m(s[0])},${m(o.bottom)}`,...c,`${m(s[s.length-1])},${m(o.bottom)}`].join(` `)}" />${u}${l}`:`${u}${l}`}).join(``);return`<svg class="bk-chart-svg" viewBox="0 0 ${se} ${ce}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${i(`${e.chartType} chart`)}">${ke(o,a)}${je(o)}${Me(n,s,o.bottom+18)}${c}</svg>`}function _e(e){let t=Oe(e.data,e.xKey,e.yKeys),n=t.flatMap(e=>e.values).filter(Number.isFinite);if(n.length===0)return``;let r=Pe(n,{includeZero:!0}),i=Ne(se,ce,{left:60,right:20,top:20,bottom:40}),a=i.width/t.length,o=Math.max(4,Math.min(28,(a-12-4*(e.yKeys.length-1))/e.yKeys.length)),s=e.yKeys.length*o+(e.yKeys.length-1)*4,c=Ie(0,r,i.bottom,i.top),l=t.map((e,t)=>{let n=i.left+t*a+(a-s)/2;return e.values.map((e,t)=>{let a=ae[t%ae.length],s=n+t*(o+4),l=Ie(e,r,i.bottom,i.top),u=Math.min(l,c),d=Math.max(1,Math.abs(c-l));return`<rect x="${m(s)}" y="${m(u)}" width="${m(o)}" height="${m(d)}" rx="3" fill="${a}" />`}).join(``)}).join(``),u=t.map((e,t)=>i.left+t*a+a/2);return`<svg class="bk-chart-svg" viewBox="0 0 ${se} ${ce}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="bar chart">${ke(i,r)}${je(i)}${Me(t,u,i.bottom+18)}${l}</svg>`}function ve(e){let t=Oe(e.data,e.xKey,e.yKeys),n=t.flatMap(e=>e.values).filter(Number.isFinite);if(n.length===0)return``;let r=Pe(n,{includeZero:!0}),a=Ne(se,ce,{left:110,right:20,top:20,bottom:36}),o=a.height/t.length,s=Math.max(4,Math.min(18,(o-8-4*(e.yKeys.length-1))/e.yKeys.length)),c=e.yKeys.length*s+(e.yKeys.length-1)*4,l=Ie(0,r,a.left,a.right),u=t.map((e,t)=>{let n=a.top+t*o+(o-c)/2,u=a.top+t*o+o/2+4;return`${`<text class="bk-chart-label" x="${m(a.left-8)}" y="${m(u)}" text-anchor="end">${i(e.label)}</text>`}${e.values.map((e,t)=>{let i=ae[t%ae.length],o=n+t*(s+4),c=Ie(e,r,a.left,a.right),u=Math.min(l,c),d=Math.max(1,Math.abs(c-l));return`<rect x="${m(u)}" y="${m(o)}" width="${m(d)}" height="${m(s)}" rx="3" fill="${i}" />`}).join(``)}`}).join(``);return`<svg class="bk-chart-svg" viewBox="0 0 ${se} ${ce}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="horizontal bar chart">${Ae(a,r)}<line class="bk-chart-axis" x1="${m(l)}" y1="${m(a.top)}" x2="${m(l)}" y2="${m(a.bottom)}" />${u}</svg>`}function ye(e,t){let n=De(e.data,e.xKey,e.yKeys),r=e.data.map(t=>({label:Ve(t[e.xKey]),value:He(t[n])})).filter(e=>e.value>0);if(r.length===0)return``;let a=r.reduce((e,t)=>e+t.value,0);if(a<=0)return``;let o=le/2,s=t?88*.6:0,c=-90,l=[],u=[];r.forEach((e,n)=>{let r=ae[n%ae.length],d=e.value/a*360,f=c+d,p=e.value/a*100,ee=t?Re(o,140,88,s,c,f):Le(o,140,88,c,f);l.push(`${ee?`<path d="${ee}" fill="${r}" stroke="var(--dt-bg-secondary)" stroke-width="2" />`:`<circle cx="${o}" cy="140" r="88" fill="${r}" />`}`);let te=ze(o,140,108,c+d/2);u.push(`<text class="bk-chart-slice-label" x="${m(te.x)}" y="${m(te.y)}" text-anchor="${te.x>=o?`start`:`end`}">${i(e.label)} ${i(We(p))}%</text>`),c=f});let d=t?`<circle cx="${o}" cy="140" r="${m(s-1)}" fill="var(--dt-bg-secondary)" />`:``;return`<svg class="bk-chart-svg" viewBox="0 0 ${le} ${le}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t?`donut chart`:`pie chart`}">${l.join(``)}${d}${u.join(``)}</svg>`}function be(e){let t=De(e.data,e.xKey,e.yKeys),n=e.data.map(e=>He(e[t]));if(n.every(e=>e===0))return``;let r=Pe(n),i=n.map((e,t)=>{let i=Fe(t,n.length,0,ue),a=Ie(e,r,de-2,2);return`${m(i)},${m(a)}`});return`<svg class="bk-chart-svg" viewBox="0 0 ${ue} ${de}" width="100%" height="${de}" preserveAspectRatio="none" role="img" aria-label="sparkline"><polyline fill="none" stroke="${ae[0]}" stroke-width="2.25" stroke-linejoin="round" stroke-linecap="round" points="${i.join(` `)}" /></svg>`}function xe(e){let t=e.data.map(t=>({label:Ve(t[e.xKey]),values:e.yKeys.map(e=>He(t[e]))})),n=t.flatMap(e=>e.values).filter(Number.isFinite);if(n.length===0)return``;let r=Pe(n),a=Ne(se,ce,{left:80,right:20,top:42,bottom:20}),o=a.width/e.yKeys.length,s=a.height/t.length;return`<svg class="bk-chart-svg" viewBox="0 0 ${se} ${ce}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="heatmap chart">${e.yKeys.map((e,t)=>`<text class="bk-chart-label" x="${m(a.left+t*o+o/2)}" y="28" text-anchor="middle">${i(e)}</text>`).join(``)}${t.map((e,t)=>{let n=a.top+t*s+s/2+4;return`<text class="bk-chart-label" x="${m(a.left-8)}" y="${m(n)}" text-anchor="end">${i(e.label)}</text>`}).join(``)}${t.map((e,t)=>e.values.map((e,n)=>{let i=a.left+n*o,c=a.top+t*s;return`<rect x="${m(i)}" y="${m(c)}" width="${m(o-4)}" height="${m(s-4)}" rx="4" stroke="var(--dt-border-muted)" style="fill: ${Be(e,r)}" />`}).join(``)).join(``)}</svg>`}function Se(e,t){return`<div class="bk-chart-table-wrap"><table class="bk-chart-table"><thead><tr>${e.map(e=>`<th>${i(e)}</th>`).join(``)}</tr></thead><tbody>${t.map(t=>`<tr>${e.map(e=>`<td>${i(s(t[e]))}</td>`).join(``)}</tr>`).join(``)}</tbody></table></div>`}function Ce(e,t){return`<div class="bk-chart"><div class="bk-chart-note">Chart fallback (${e}) rendered as a data table.</div>${t}</div>`}function we(e){return`<details class="bk-chart-details"><summary>Show data</summary>${e}</details>`}function Te(e){return`<div class="bk-chart-legend">${e.map((e,t)=>`<span class="bk-chart-legend-item"><span class="bk-chart-legend-swatch" style="background:${ae[t%ae.length]}"></span>${i(e)}</span>`).join(``)}</div>`}function Ee(e,t){if(e.length===0||t in e[0])return t;for(let t of e){let e=Object.keys(t).find(e=>typeof t[e]==`string`);if(e)return e}return t}function De(e,t,n){let r=n.find(n=>n!==t&&e.some(e=>Ue(e[n])));if(r)return r;for(let n of e){let e=Object.keys(n).find(e=>e!==t&&Ue(n[e]));if(e)return e}return n[0]??`value`}function Oe(e,t,n){return e.map(e=>({label:Ve(e[t]),values:n.map(t=>He(e[t]))}))}function ke(e,t){return Array.from({length:5},(n,r)=>{let a=r/4,o=t.max-a*(t.max-t.min),s=e.top+a*e.height;return`<line class="bk-chart-grid" x1="${m(e.left)}" y1="${m(s)}" x2="${m(e.right)}" y2="${m(s)}" /><text class="bk-chart-label" x="${m(e.left-8)}" y="${m(s+4)}" text-anchor="end">${i(We(o))}</text>`}).join(``)}function Ae(e,t){return Array.from({length:5},(n,r)=>{let a=r/4,o=t.min+a*(t.max-t.min),s=e.left+a*e.width;return`<line class="bk-chart-grid" x1="${m(s)}" y1="${m(e.top)}" x2="${m(s)}" y2="${m(e.bottom)}" /><text class="bk-chart-label" x="${m(s)}" y="${m(e.bottom+18)}" text-anchor="middle">${i(We(o))}</text>`}).join(``)}function je(e){return`<line class="bk-chart-axis" x1="${m(e.left)}" y1="${m(e.top)}" x2="${m(e.left)}" y2="${m(e.bottom)}" /><line class="bk-chart-axis" x1="${m(e.left)}" y1="${m(e.bottom)}" x2="${m(e.right)}" y2="${m(e.bottom)}" />`}function Me(e,t,n){return e.map((e,r)=>`<text class="bk-chart-label" x="${m(t[r])}" y="${m(n)}" text-anchor="middle">${i(e.label)}</text>`).join(``)}function Ne(e,t,n){return{left:n.left,top:n.top,right:e-n.right,bottom:t-n.bottom,width:e-n.left-n.right,height:t-n.top-n.bottom}}function Pe(e,t){let n=Math.min(...e),r=Math.max(...e);if(t?.includeZero&&(n=Math.min(n,0),r=Math.max(r,0)),n===r){let e=n===0?1:Math.abs(n)*.1||1;n-=e,r+=e}return{min:n,max:r}}function Fe(e,t,n,r){return t<=1?(n+r)/2:n+e/(t-1)*(r-n)}function Ie(e,t,n,r){return n+(e-t.min)/(t.max-t.min)*(r-n)}function Le(e,t,n,r,i){if(Math.abs(i-r)>=359.999)return``;let a=ze(e,t,n,r),o=ze(e,t,n,i),s=+(i-r>180);return`M ${m(e)} ${m(t)} L ${m(a.x)} ${m(a.y)} A ${m(n)} ${m(n)} 0 ${s} 1 ${m(o.x)} ${m(o.y)} Z`}function Re(e,t,n,r,i,a){if(Math.abs(a-i)>=359.999)return``;let o=ze(e,t,n,i),s=ze(e,t,n,a),c=ze(e,t,r,a),l=ze(e,t,r,i),u=+(a-i>180);return[`M ${m(o.x)} ${m(o.y)}`,`A ${m(n)} ${m(n)} 0 ${u} 1 ${m(s.x)} ${m(s.y)}`,`L ${m(c.x)} ${m(c.y)}`,`A ${m(r)} ${m(r)} 0 ${u} 0 ${m(l.x)} ${m(l.y)}`,`Z`].join(` `)}function ze(e,t,n,r){let i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}function Be(e,t){let n=18+Math.max(0,Math.min(1,(e-t.min)/(t.max-t.min)))*64;return`color-mix(in srgb, var(--dt-bg-secondary) ${m(100-n)}%, var(--dt-accent-fg) ${m(n)}%)`}function Ve(e){return e==null?``:String(s(e))}function He(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return t}return 0}function Ue(e){return typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e.trim()!==``&&Number.isFinite(Number(e))}function We(e){return String(s(Number(e.toFixed(2))))}function m(e){return Number(e.toFixed(2)).toString()}var Ge=`
|
|
715
|
+
|
|
716
|
+
/* ── Compact chart on mobile ── */
|
|
717
|
+
@media (max-width: 480px) {
|
|
718
|
+
.bk-chart-surface {
|
|
719
|
+
padding: var(--dt-space-2);
|
|
720
|
+
}
|
|
721
|
+
.bk-chart-legend {
|
|
722
|
+
gap: var(--dt-space-1) var(--dt-space-3);
|
|
723
|
+
}
|
|
724
|
+
.bk-chart-legend-item {
|
|
725
|
+
font-size: 0.75rem;
|
|
726
|
+
}
|
|
727
|
+
.bk-chart-legend-swatch {
|
|
728
|
+
width: 0.625rem;
|
|
729
|
+
height: 0.625rem;
|
|
730
|
+
}
|
|
731
|
+
.bk-chart-table th,
|
|
732
|
+
.bk-chart-table td {
|
|
733
|
+
padding: var(--dt-space-2) var(--dt-space-3);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
@media (max-width: 320px) {
|
|
738
|
+
.bk-chart {
|
|
739
|
+
gap: var(--dt-space-2);
|
|
740
|
+
}
|
|
741
|
+
.bk-chart-surface {
|
|
742
|
+
padding: var(--dt-space-1);
|
|
743
|
+
border-radius: var(--dt-radius-md);
|
|
744
|
+
}
|
|
745
|
+
.bk-chart-note {
|
|
746
|
+
font-size: 0.6875rem;
|
|
747
|
+
}
|
|
748
|
+
.bk-chart-table th,
|
|
749
|
+
.bk-chart-table td {
|
|
750
|
+
padding: var(--dt-space-1) var(--dt-space-2);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
`;function me(e,t){let n=he(e),r=Ce(n.headers,n.data);if(n.data.length===0||!se.has(n.chartType))return we(n.note,r);let i=ge(n);if(!i)return we(n.note,r);let a=n.chartType===`pie`||n.chartType===`donut`?[]:n.yKeys;return`<div class="bk-chart"><div class="bk-chart-surface">${i}</div>${a.length>1?Ee(a):``}${Te(r)}</div>`}function he(e){let t=c(e.value),n=Array.isArray(t?.data)?t.data:[],r=String(t?.chartType??e.chartType??`bar`),a=se.has(r)?r:`bar`,o=i(r),s=De(n,String(t?.xKey??`label`)),l=Array.isArray(t?.yKeys)?t.yKeys.filter(e=>typeof e==`string`):[],u=l.length>0?l:[`value`];if(l.length===0&&n.length>0&&n[0]!=null){let e=n[0];if(!(`value`in e&&typeof e.value==`number`)){let t=Object.keys(e).filter(t=>t!==s&&typeof e[t]==`number`);t.length>0&&(u=t)}}let d=[s,...u.filter((e,t)=>e!==s&&u.indexOf(e)===t)];return{chartType:a,data:n,xKey:s,yKeys:u,headers:d,note:o}}function ge(e){switch(e.chartType){case`line`:case`area`:return _e(e,e.chartType===`area`);case`bar`:return ve(e);case`horizontal-bar`:return ye(e);case`pie`:return be(e,!1);case`donut`:return be(e,!0);case`sparkline`:return xe(e);case`heatmap`:return Se(e);default:return``}}function _e(e,t){let n=ke(e.data,e.xKey,e.yKeys),r=n.flatMap(e=>e.values).filter(Number.isFinite);if(r.length===0)return``;let a=Fe(r),o=Pe(ce,le,{left:60,right:20,top:20,bottom:40}),s=n.map((e,t)=>Ie(t,n.length,o.left,o.right)),c=e.yKeys.map((e,r)=>{let i=oe[r%oe.length],c=n.map((e,t)=>{let n=s[t],i=Le(e.values[r],a,o.bottom,o.top);return`${m(n)},${m(i)}`}),l=n.map((e,t)=>{let n=s[t],c=Le(e.values[r],a,o.bottom,o.top);return`<circle cx="${m(n)}" cy="${m(c)}" r="3" fill="${i}" />`}).join(``),u=`<polyline fill="none" stroke="${i}" stroke-width="2.5" stroke-linejoin="round" stroke-linecap="round" points="${c.join(` `)}" />`;return t?`<polygon fill="${i}" fill-opacity="0.16" points="${[`${m(s[0])},${m(o.bottom)}`,...c,`${m(s[s.length-1])},${m(o.bottom)}`].join(` `)}" />${u}${l}`:`${u}${l}`}).join(``);return`<svg class="bk-chart-svg" viewBox="0 0 ${ce} ${le}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${i(`${e.chartType} chart`)}">${Ae(o,a)}${Me(o)}${Ne(n,s,o.bottom+18)}${c}</svg>`}function ve(e){let t=ke(e.data,e.xKey,e.yKeys),n=t.flatMap(e=>e.values).filter(Number.isFinite);if(n.length===0)return``;let r=Fe(n,{includeZero:!0}),i=Pe(ce,le,{left:60,right:20,top:20,bottom:40}),a=i.width/t.length,o=Math.max(4,Math.min(28,(a-12-4*(e.yKeys.length-1))/e.yKeys.length)),s=e.yKeys.length*o+(e.yKeys.length-1)*4,c=Le(0,r,i.bottom,i.top),l=t.map((e,t)=>{let n=i.left+t*a+(a-s)/2;return e.values.map((e,t)=>{let a=oe[t%oe.length],s=n+t*(o+4),l=Le(e,r,i.bottom,i.top),u=Math.min(l,c),d=Math.max(1,Math.abs(c-l));return`<rect x="${m(s)}" y="${m(u)}" width="${m(o)}" height="${m(d)}" rx="3" fill="${a}" />`}).join(``)}).join(``),u=t.map((e,t)=>i.left+t*a+a/2);return`<svg class="bk-chart-svg" viewBox="0 0 ${ce} ${le}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="bar chart">${Ae(i,r)}${Me(i)}${Ne(t,u,i.bottom+18)}${l}</svg>`}function ye(e){let t=ke(e.data,e.xKey,e.yKeys),n=t.flatMap(e=>e.values).filter(Number.isFinite);if(n.length===0)return``;let r=Fe(n,{includeZero:!0}),a=Pe(ce,le,{left:110,right:20,top:20,bottom:36}),o=a.height/t.length,s=Math.max(4,Math.min(18,(o-8-4*(e.yKeys.length-1))/e.yKeys.length)),c=e.yKeys.length*s+(e.yKeys.length-1)*4,l=Le(0,r,a.left,a.right),u=t.map((e,t)=>{let n=a.top+t*o+(o-c)/2,u=a.top+t*o+o/2+4;return`${`<text class="bk-chart-label" x="${m(a.left-8)}" y="${m(u)}" text-anchor="end">${i(e.label)}</text>`}${e.values.map((e,t)=>{let i=oe[t%oe.length],o=n+t*(s+4),c=Le(e,r,a.left,a.right),u=Math.min(l,c),d=Math.max(1,Math.abs(c-l));return`<rect x="${m(u)}" y="${m(o)}" width="${m(d)}" height="${m(s)}" rx="3" fill="${i}" />`}).join(``)}`}).join(``);return`<svg class="bk-chart-svg" viewBox="0 0 ${ce} ${le}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="horizontal bar chart">${je(a,r)}<line class="bk-chart-axis" x1="${m(l)}" y1="${m(a.top)}" x2="${m(l)}" y2="${m(a.bottom)}" />${u}</svg>`}function be(e,t){let n=Oe(e.data,e.xKey,e.yKeys),r=e.data.map(t=>({label:He(t[e.xKey]),value:Ue(t[n])})).filter(e=>e.value>0);if(r.length===0)return``;let a=r.reduce((e,t)=>e+t.value,0);if(a<=0)return``;let o=ue/2,s=t?88*.6:0,c=-90,l=[],u=[];r.forEach((e,n)=>{let r=oe[n%oe.length],d=e.value/a*360,f=c+d,p=e.value/a*100,ee=t?ze(o,140,88,s,c,f):Re(o,140,88,c,f);l.push(`${ee?`<path d="${ee}" fill="${r}" stroke="var(--dt-bg-secondary)" stroke-width="2" />`:`<circle cx="${o}" cy="140" r="88" fill="${r}" />`}`);let te=Be(o,140,108,c+d/2);u.push(`<text class="bk-chart-slice-label" x="${m(te.x)}" y="${m(te.y)}" text-anchor="${te.x>=o?`start`:`end`}">${i(e.label)} ${i(Ge(p))}%</text>`),c=f});let d=t?`<circle cx="${o}" cy="140" r="${m(s-1)}" fill="var(--dt-bg-secondary)" />`:``;return`<svg class="bk-chart-svg" viewBox="0 0 ${ue} ${ue}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="${t?`donut chart`:`pie chart`}">${l.join(``)}${d}${u.join(``)}</svg>`}function xe(e){let t=Oe(e.data,e.xKey,e.yKeys),n=e.data.map(e=>Ue(e[t]));if(n.every(e=>e===0))return``;let r=Fe(n),i=n.map((e,t)=>{let i=Ie(t,n.length,0,de),a=Le(e,r,fe-2,2);return`${m(i)},${m(a)}`});return`<svg class="bk-chart-svg" viewBox="0 0 ${de} ${fe}" width="100%" height="${fe}" preserveAspectRatio="none" role="img" aria-label="sparkline"><polyline fill="none" stroke="${oe[0]}" stroke-width="2.25" stroke-linejoin="round" stroke-linecap="round" points="${i.join(` `)}" /></svg>`}function Se(e){let t=e.data.map(t=>({label:He(t[e.xKey]),values:e.yKeys.map(e=>Ue(t[e]))})),n=t.flatMap(e=>e.values).filter(Number.isFinite);if(n.length===0)return``;let r=Fe(n),a=Pe(ce,le,{left:80,right:20,top:42,bottom:20}),o=a.width/e.yKeys.length,s=a.height/t.length;return`<svg class="bk-chart-svg" viewBox="0 0 ${ce} ${le}" width="100%" preserveAspectRatio="xMidYMid meet" role="img" aria-label="heatmap chart">${e.yKeys.map((e,t)=>`<text class="bk-chart-label" x="${m(a.left+t*o+o/2)}" y="28" text-anchor="middle">${i(e)}</text>`).join(``)}${t.map((e,t)=>{let n=a.top+t*s+s/2+4;return`<text class="bk-chart-label" x="${m(a.left-8)}" y="${m(n)}" text-anchor="end">${i(e.label)}</text>`}).join(``)}${t.map((e,t)=>e.values.map((e,n)=>{let i=a.left+n*o,c=a.top+t*s;return`<rect x="${m(i)}" y="${m(c)}" width="${m(o-4)}" height="${m(s-4)}" rx="4" stroke="var(--dt-border-muted)" style="fill: ${Ve(e,r)}" />`}).join(``)).join(``)}</svg>`}function Ce(e,t){return`<div class="bk-chart-table-wrap"><table class="bk-chart-table"><thead><tr>${e.map(e=>`<th>${i(e)}</th>`).join(``)}</tr></thead><tbody>${t.map(t=>`<tr>${e.map(e=>`<td>${i(s(t[e]))}</td>`).join(``)}</tr>`).join(``)}</tbody></table></div>`}function we(e,t){return`<div class="bk-chart"><div class="bk-chart-note">Chart fallback (${e}) rendered as a data table.</div>${t}</div>`}function Te(e){return`<details class="bk-chart-details"><summary>Show data</summary>${e}</details>`}function Ee(e){return`<div class="bk-chart-legend">${e.map((e,t)=>`<span class="bk-chart-legend-item"><span class="bk-chart-legend-swatch" style="background:${oe[t%oe.length]}"></span>${i(e)}</span>`).join(``)}</div>`}function De(e,t){if(e.length===0||t in e[0])return t;for(let t of e){let e=Object.keys(t).find(e=>typeof t[e]==`string`);if(e)return e}return t}function Oe(e,t,n){let r=n.find(n=>n!==t&&e.some(e=>We(e[n])));if(r)return r;for(let n of e){let e=Object.keys(n).find(e=>e!==t&&We(n[e]));if(e)return e}return n[0]??`value`}function ke(e,t,n){return e.map(e=>({label:He(e[t]),values:n.map(t=>Ue(e[t]))}))}function Ae(e,t){return Array.from({length:5},(n,r)=>{let a=r/4,o=t.max-a*(t.max-t.min),s=e.top+a*e.height;return`<line class="bk-chart-grid" x1="${m(e.left)}" y1="${m(s)}" x2="${m(e.right)}" y2="${m(s)}" /><text class="bk-chart-label" x="${m(e.left-8)}" y="${m(s+4)}" text-anchor="end">${i(Ge(o))}</text>`}).join(``)}function je(e,t){return Array.from({length:5},(n,r)=>{let a=r/4,o=t.min+a*(t.max-t.min),s=e.left+a*e.width;return`<line class="bk-chart-grid" x1="${m(s)}" y1="${m(e.top)}" x2="${m(s)}" y2="${m(e.bottom)}" /><text class="bk-chart-label" x="${m(s)}" y="${m(e.bottom+18)}" text-anchor="middle">${i(Ge(o))}</text>`}).join(``)}function Me(e){return`<line class="bk-chart-axis" x1="${m(e.left)}" y1="${m(e.top)}" x2="${m(e.left)}" y2="${m(e.bottom)}" /><line class="bk-chart-axis" x1="${m(e.left)}" y1="${m(e.bottom)}" x2="${m(e.right)}" y2="${m(e.bottom)}" />`}function Ne(e,t,n){return e.map((e,r)=>`<text class="bk-chart-label" x="${m(t[r])}" y="${m(n)}" text-anchor="middle">${i(e.label)}</text>`).join(``)}function Pe(e,t,n){return{left:n.left,top:n.top,right:e-n.right,bottom:t-n.bottom,width:e-n.left-n.right,height:t-n.top-n.bottom}}function Fe(e,t){let n=e.reduce((e,t)=>e<t?e:t,1/0),r=e.reduce((e,t)=>e>t?e:t,-1/0);if(t?.includeZero&&(n=Math.min(n,0),r=Math.max(r,0)),n===r){let e=n===0?1:Math.abs(n)*.1||1;n-=e,r+=e}return{min:n,max:r}}function Ie(e,t,n,r){return t<=1?(n+r)/2:n+e/(t-1)*(r-n)}function Le(e,t,n,r){return n+(e-t.min)/(t.max-t.min)*(r-n)}function Re(e,t,n,r,i){if(Math.abs(i-r)>=359.999)return``;let a=Be(e,t,n,r),o=Be(e,t,n,i),s=+(i-r>180);return`M ${m(e)} ${m(t)} L ${m(a.x)} ${m(a.y)} A ${m(n)} ${m(n)} 0 ${s} 1 ${m(o.x)} ${m(o.y)} Z`}function ze(e,t,n,r,i,a){if(Math.abs(a-i)>=359.999)return``;let o=Be(e,t,n,i),s=Be(e,t,n,a),c=Be(e,t,r,a),l=Be(e,t,r,i),u=+(a-i>180);return[`M ${m(o.x)} ${m(o.y)}`,`A ${m(n)} ${m(n)} 0 ${u} 1 ${m(s.x)} ${m(s.y)}`,`L ${m(c.x)} ${m(c.y)}`,`A ${m(r)} ${m(r)} 0 ${u} 0 ${m(l.x)} ${m(l.y)}`,`Z`].join(` `)}function Be(e,t,n,r){let i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}function Ve(e,t){let n=18+Math.max(0,Math.min(1,(e-t.min)/(t.max-t.min)))*64;return`color-mix(in srgb, var(--dt-bg-secondary) ${m(100-n)}%, var(--dt-accent-fg) ${m(n)}%)`}function He(e){return e==null?``:String(s(e))}function Ue(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()!==``){let t=Number(e);if(Number.isFinite(t))return t}return 0}function We(e){return typeof e==`number`?Number.isFinite(e):typeof e==`string`&&e.trim()!==``&&Number.isFinite(Number(e))}function Ge(e){return String(s(Number(e.toFixed(2))))}function m(e){return Number(e.toFixed(2)).toString()}var Ke=`
|
|
754
|
+
/* ===== Base Styles ===== */
|
|
755
|
+
@keyframes strike-through {
|
|
756
|
+
from { width: 0; }
|
|
757
|
+
to { width: 100%; }
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
@keyframes slide-in {
|
|
761
|
+
from { opacity: 0; transform: translateX(-20px); }
|
|
762
|
+
to { opacity: 1; transform: translateX(0); }
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
@keyframes hover-pulse {
|
|
766
|
+
0% { transform: scale(1); }
|
|
767
|
+
25% { transform: scale(1.03); }
|
|
768
|
+
50% { transform: scale(0.98); }
|
|
769
|
+
75% { transform: scale(1.02); }
|
|
770
|
+
100% { transform: scale(1); }
|
|
771
|
+
}
|
|
772
|
+
|
|
642
773
|
.bk-checklist {
|
|
643
774
|
display: grid;
|
|
644
775
|
gap: var(--dt-space-2);
|
|
@@ -656,6 +787,7 @@
|
|
|
656
787
|
border-radius: var(--dt-radius-lg);
|
|
657
788
|
background: var(--dt-bg-secondary);
|
|
658
789
|
transition: border-color var(--dt-transition-fast), background var(--dt-transition-fast);
|
|
790
|
+
animation: slide-in 400ms ease-out both;
|
|
659
791
|
}
|
|
660
792
|
|
|
661
793
|
.bk-checklist-item:hover {
|
|
@@ -663,6 +795,7 @@
|
|
|
663
795
|
background: var(--dt-bg-tertiary);
|
|
664
796
|
}
|
|
665
797
|
|
|
798
|
+
/* ===== Icon Styles ===== */
|
|
666
799
|
.bk-checklist-icon {
|
|
667
800
|
display: inline-flex;
|
|
668
801
|
align-items: center;
|
|
@@ -681,15 +814,126 @@
|
|
|
681
814
|
.bk-checklist-item[data-checked='true'] .bk-checklist-icon {
|
|
682
815
|
background: var(--dt-success-subtle);
|
|
683
816
|
color: var(--dt-success-fg);
|
|
817
|
+
animation: aikit-check-bounce 400ms cubic-bezier(0.34,1.56,0.64,1) 500ms both;
|
|
684
818
|
}
|
|
685
819
|
|
|
820
|
+
/* ===== Label Styles ===== */
|
|
686
821
|
.bk-checklist-label {
|
|
687
822
|
color: var(--dt-text-primary);
|
|
688
823
|
font-size: var(--dt-font-size-sm);
|
|
689
824
|
line-height: 1.5;
|
|
690
825
|
padding-top: 1px;
|
|
691
826
|
}
|
|
692
|
-
|
|
827
|
+
|
|
828
|
+
.bk-checklist-item[data-checked='true'] .bk-checklist-label {
|
|
829
|
+
position: relative;
|
|
830
|
+
color: var(--dt-text-tertiary);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.bk-checklist-item[data-checked='true'] .bk-checklist-label::after {
|
|
834
|
+
content: '';
|
|
835
|
+
position: absolute;
|
|
836
|
+
left: 0;
|
|
837
|
+
top: 50%;
|
|
838
|
+
height: 1px;
|
|
839
|
+
background: currentColor;
|
|
840
|
+
animation: strike-through 300ms ease-out 700ms forwards;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/* ===== Hover Pulse for Unchecked Items ===== */
|
|
844
|
+
.bk-checklist-item[data-checked='false'] {
|
|
845
|
+
cursor: pointer;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
.bk-checklist-item[data-checked='false']:hover {
|
|
849
|
+
animation: hover-pulse 600ms ease-in-out 0ms none;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
/* Stagger via inline --i (rendered from index) instead of nth-child */
|
|
853
|
+
.bk-checklist-item {
|
|
854
|
+
animation-delay: calc(var(--i, 0) * 50ms);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/* ── Compact checklist on mobile ── */
|
|
858
|
+
@media (max-width: 480px) {
|
|
859
|
+
.bk-checklist-item {
|
|
860
|
+
padding: var(--dt-space-2) var(--dt-space-3);
|
|
861
|
+
gap: var(--dt-space-2);
|
|
862
|
+
}
|
|
863
|
+
.bk-checklist-icon {
|
|
864
|
+
width: 1.25rem;
|
|
865
|
+
height: 1.25rem;
|
|
866
|
+
font-size: 0.625rem;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
@media (max-width: 320px) {
|
|
871
|
+
.bk-checklist-item {
|
|
872
|
+
padding: var(--dt-space-2);
|
|
873
|
+
}
|
|
874
|
+
.bk-checklist-label {
|
|
875
|
+
font-size: 0.75rem;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
`;function qe(e,t){return`<ul class="bk-checklist">${p(e).map((e,t)=>{let n=!!e.checked;return`<li class="bk-checklist-item" data-checked="${String(n)}" role="checkbox" aria-checked="${String(n)}" tabindex="0" style="--i: ${t}"><span class="bk-checklist-icon" aria-hidden="true">${n?`✓`:`×`}</span><span class="bk-checklist-label">${i(e.label)}</span></li>`}).join(``)}</ul>`}var Je=`
|
|
879
|
+
.bk-code .bk-hljs-keyword {
|
|
880
|
+
color: var(--dt-purple-fg);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.bk-code .bk-hljs-string,
|
|
884
|
+
.bk-code .bk-hljs-attr-value {
|
|
885
|
+
color: var(--dt-success-fg);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
.bk-code .bk-hljs-comment {
|
|
889
|
+
color: var(--dt-text-tertiary);
|
|
890
|
+
font-style: italic;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.bk-code .bk-hljs-number {
|
|
894
|
+
color: var(--dt-info-fg);
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
.bk-code .bk-hljs-builtin {
|
|
898
|
+
color: var(--dt-accent-fg);
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.bk-code .bk-hljs-operator {
|
|
902
|
+
color: var(--dt-warning-fg);
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.bk-code .bk-hljs-punctuation {
|
|
906
|
+
color: var(--dt-text-secondary);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.bk-code .bk-hljs-function {
|
|
910
|
+
color: var(--dt-accent-fg);
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.bk-code .bk-hljs-class-name {
|
|
914
|
+
color: var(--dt-accent-fg);
|
|
915
|
+
font-weight: 500;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
.bk-code .bk-hljs-tag {
|
|
919
|
+
color: var(--dt-accent-fg);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.bk-code .bk-hljs-attr-name {
|
|
923
|
+
color: var(--dt-warning-fg);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
.bk-code .bk-hljs-variable {
|
|
927
|
+
color: var(--dt-text-primary);
|
|
928
|
+
font-weight: 400;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.bk-code .bk-hljs-property {
|
|
932
|
+
color: var(--dt-text-primary);
|
|
933
|
+
}
|
|
934
|
+
`,Ye={javascript:{keywords:`async.await.break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.false.finally.for.function.if.import.in.instanceof.let.new.null.of.return.static.super.switch.this.throw.true.try.typeof.undefined.var.void.while.with.yield`.split(`.`),builtins:[`console`,`Math`,`JSON`,`Promise`,`Array`,`Object`,`String`,`Number`,`Boolean`,`Map`,`Set`,`Symbol`,`RegExp`,`Date`,`Error`,`Proxy`,`Reflect`,`Buffer`,`setTimeout`,`setInterval`,`fetch`,`process`,`globalThis`,`Intl`,`BigInt`],types:[`string`,`number`,`boolean`,`symbol`,`bigint`,`undefined`,`null`,`any`,`void`,`never`,`unknown`],commentSingle:`//`,commentMultiOpen:`/*`,commentMultiClose:`*/`,stringDelims:[`"`,`'`,"`"],operators:`+\\-*/%=<>!&|^~?:`},typescript:{keywords:`async.await.break.case.catch.class.const.continue.debugger.default.delete.do.else.enum.export.extends.false.finally.for.function.if.import.in.implements.infer.instanceof.interface.is.keyof.let.new.null.of.readonly.return.static.super.switch.satisfies.this.throw.true.try.typeof.type.undefined.using.var.void.while.with.yield`.split(`.`),builtins:`console.Math.JSON.Promise.Array.Object.String.Number.Boolean.Map.Set.Symbol.RegExp.Date.Error.Proxy.Reflect.Buffer.setTimeout.setInterval.fetch.process.globalThis.Intl.BigInt.Partial.Required.Readonly.Pick.Omit.Record.Exclude.Extract.NonNullable.Parameters.ReturnType.InstanceType.Awaited`.split(`.`),types:[`string`,`number`,`boolean`,`symbol`,`bigint`,`undefined`,`null`,`any`,`void`,`never`,`unknown`,`object`],commentSingle:`//`,commentMultiOpen:`/*`,commentMultiClose:`*/`,stringDelims:[`"`,`'`,"`"],operators:`+\\-*/%=<>!&|^~?:`},python:{keywords:`False.None.True.and.as.assert.async.await.break.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.nonlocal.not.or.pass.raise.return.try.while.with.yield`.split(`.`),builtins:`print.len.range.type.int.str.float.list.dict.set.tuple.bool.map.filter.zip.enumerate.reversed.sorted.open.input.isinstance.issubclass.hasattr.getattr.setattr.delattr.super.object.property.staticmethod.classmethod.self.cls.Exception.ValueError.TypeError.KeyError.IndexError.StopIteration`.split(`.`),types:[`int`,`float`,`str`,`bool`,`bytes`,`list`,`dict`,`set`,`tuple`,`None`,`Any`],commentSingle:`#`,stringDelims:[`"`,`'`],hashStrings:!0,operators:`+\\-*/%=<>!&|^~`},json:{keywords:[`true`,`false`,`null`],stringDelims:[`"`],operators:`:`,commentSingle:`//`,commentMultiOpen:`/*`,commentMultiClose:`*/`},yaml:{keywords:[`true`,`false`,`yes`,`no`,`on`,`off`,`null`,`~`],commentSingle:`#`,stringDelims:[`"`,`'`],operators:`:\\-`},html:{keywords:[`!DOCTYPE`],commentMultiOpen:`\x3C!--`,commentMultiClose:`-->`,stringDelims:[`"`,`'`],operators:`=`},css:{keywords:[`import`,`media`,`keyframes`,`font-face`,`supports`,`charset`,`namespace`,`page`,`layer`,`container`],builtins:[`red`,`blue`,`green`,`white`,`black`,`transparent`,`currentcolor`,`inherit`,`initial`,`unset`,`revert`],commentMultiOpen:`/*`,commentMultiClose:`*/`,stringDelims:[`"`,`'`],operators:`:;`},shell:{keywords:[`if`,`then`,`else`,`elif`,`fi`,`for`,`while`,`do`,`done`,`case`,`esac`,`in`,`function`,`return`,`exit`,`break`,`continue`,`select`,`until`,`declare`,`local`,`export`,`readonly`,`unset`],builtins:`echo,printf,read,source,.,cd,pwd,ls,cat,grep,awk,sed,find,xargs,sort,uniq,wc,cut,tr,head,tail,tee,test,[,eval,exec,shift,type,command,let,mapfile,readarray,mkdir,rm,cp,mv,chmod,chown,docker,npm,node,git`.split(`,`),commentSingle:`#`,stringDelims:[`"`,`'`],operators:`=|<>`}},Xe={js:`javascript`,ts:`typescript`,py:`python`,sh:`shell`,bash:`shell`,zsh:`shell`,html:`html`,htm:`html`,css:`css`,json:`json`,yml:`yaml`};function Ze(e){return e?Ye[Xe[e.toLowerCase()]??e.toLowerCase()]??null:null}function Qe(e,t){let n=[],r=0;for(;r<e.length;){let i=e[r];if(t.stringDelims.includes(i)&&i!=="`"){let a=i;if(t.hashStrings&&e.slice(r,r+3)===a+a+a){n.push({type:`string`,value:a+a+a}),r+=3;let t=e.indexOf(a+a+a,r);t===-1?(n.push({type:`string`,value:e.slice(r)}),r=e.length):(n.push({type:`string`,value:e.slice(r,t)}),n.push({type:`string`,value:a+a+a}),r=t+3);continue}let o=a;for(r++;r<e.length;){if(e[r]===`\\`&&r+1<e.length){o+=e[r]+e[r+1],r+=2;continue}if(e[r]===a){o+=a,r++;break}o+=e[r],r++}n.push({type:`string`,value:o});continue}if(t.stringDelims.includes("`")&&i==="`"){let t="`";for(r++;r<e.length;){if(e[r]===`\\`&&r+1<e.length){t+=e[r]+e[r+1],r+=2;continue}if(e[r]==="`"){t+="`",r++;break}t+=e[r],r++}n.push({type:`string`,value:t});continue}if(t.commentSingle&&e.startsWith(t.commentSingle,r)){n.push({type:`comment`,value:e.slice(r)}),r=e.length;continue}if(t.commentMultiOpen&&t.commentMultiClose&&e.startsWith(t.commentMultiOpen,r)){let i=t.commentMultiClose,a=e.indexOf(i,r+t.commentMultiOpen.length);a===-1?(n.push({type:`comment`,value:e.slice(r)}),r=e.length):(n.push({type:`comment`,value:e.slice(r,a+i.length)}),r=a+i.length);continue}if(i===`0`&&r+1<e.length&&/[xXbB]/.test(e[r+1])&&t.commentSingle!==`#`){let t=e.slice(r).match(/^0[xX][0-9a-fA-F]+/);if(t){n.push({type:`number`,value:t[0]}),r+=t[0].length;continue}}if(/[0-9]/.test(i)||i===`.`&&r+1<e.length&&/[0-9]/.test(e[r+1])){let t=e.slice(r).match(/^\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/);if(t){n.push({type:`number`,value:t[0]}),r+=t[0].length;continue}}if(/[a-zA-Z_$]/.test(i)||i===`@`){let i=e.slice(r).match(/^[@]?[a-zA-Z_$][a-zA-Z0-9_$]*/);if(i){let a=i[0],o=e=>e?e.includes(a):!1;if(o(t.keywords))n.push({type:`keyword`,value:a});else if(o(t.types))n.push({type:`keyword`,value:a});else if(o(t.builtins))n.push({type:`builtin`,value:a});else{let t=r+a.length;t<e.length&&e[t]===`(`?n.push({type:`function`,value:a}):n.push({type:`variable`,value:a})}r+=a.length;continue}}if(i===`<`&&t===Ye.html)if(r+1<e.length&&e[r+1]===`/`){let t=e.indexOf(`>`,r+2);if(t!==-1){n.push({type:`punctuation`,value:`</`}),n.push({type:`tag`,value:e.slice(r+2,t)}),n.push({type:`punctuation`,value:`>`}),r=t+1;continue}}else{let t=e.indexOf(`>`,r+1);if(t!==-1){n.push({type:`punctuation`,value:`<`});let i=e.slice(r+1,t),a=i.match(/^[a-zA-Z][a-zA-Z0-9_-]*/);if(a){n.push({type:`tag`,value:a[0]});let e=a[0].length;for(;e<i.length;){if(i[e]===` `||i[e]===` `){e++;continue}let t=i.slice(e).match(/^[a-zA-Z_-][a-zA-Z0-9_-]*(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+))?/);if(t){let r=t[0],i=r.indexOf(`=`);if(i!==-1){n.push({type:`variable`,value:r.slice(0,i).trim()}),n.push({type:`operator`,value:`=`});let e=r.slice(i+1).trim();e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`)?n.push({type:`string`,value:e}):n.push({type:`attr-value`,value:e})}else n.push({type:`attr-name`,value:r});e+=t[0].length;continue}break}}else n.push({type:`variable`,value:i});n.push({type:`punctuation`,value:`>`}),r=t+1;continue}}if(t.operators&&!t._opRegex&&(t._opRegex=RegExp(`[${t.operators}]`)),t._opRegex?.test(i)){let t=i,a=i+(e[r+1]||``);[`=>`,`==`,`!=`,`<=`,`>=`,`&&`,`||`,`++`,`--`,`+=`,`-=`,`*=`,`/=`,`::`,`?.`,`??`,`?:`,`??=`].includes(a)?(t=a,r++):i+e.slice(r+1,r+3)===`...`&&(t=`...`,r+=2),n.push({type:`operator`,value:t}),r++;continue}if(/[{}()[\];,:.]/.test(i)){n.push({type:`punctuation`,value:i}),r++;continue}let a=e.slice(r).match(/^[^\s]+/);a?(n.push({type:`variable`,value:a[0]}),r+=a[0].length):(n.push({type:`variable`,value:i}),r++)}return n}var $e={keyword:`bk-hljs-keyword`,string:`bk-hljs-string`,comment:`bk-hljs-comment`,number:`bk-hljs-number`,builtin:`bk-hljs-builtin`,operator:`bk-hljs-operator`,punctuation:`bk-hljs-punctuation`,tag:`bk-hljs-tag`,"attr-name":`bk-hljs-attr-name`,"attr-value":`bk-hljs-attr-value`,function:`bk-hljs-function`,variable:`bk-hljs-variable`};function et(e){if(!e.length)return``;let t=[],n=null,r=``,a=()=>{if(!r)return;let e=i(r);n&&!/^\s+$/.test(r)?t.push(`<span class="${n}">${e}</span>`):t.push(e),r=``,n=null};for(let o of e){let e=$e[o.type];if(/^\s+$/.test(o.value)||!e){r&&a(),t.push(i(o.value));continue}n===e?r+=o.value:(a(),n=e,r=o.value)}return a(),t.join(``)}function tt(e,t){let n=Ze(t);if(!n)return``;let r=e.split(`
|
|
935
|
+
`),a=[],o=!1;for(let e of r){if(o&&n.commentMultiClose){let t=n.commentMultiClose,r=e.indexOf(t);if(r!==-1){o=!1;let s=e.slice(0,r+t.length),c=e.slice(r+t.length),l=`<span class="bk-hljs-comment">${i(s)}</span>`;c.trim()&&(l+=et(Qe(c,n))),a.push(l);continue}a.push(`<span class="bk-hljs-comment">${i(e)}</span>`);continue}if(n.commentMultiOpen&&n.commentMultiClose){let t=e.indexOf(n.commentMultiOpen);if(t!==-1&&e.indexOf(n.commentMultiClose,t+n.commentMultiOpen.length)===-1){o=!0;let r=e.slice(0,t),s=``;r.trim()&&(s+=et(Qe(r,n))),s+=`<span class="bk-hljs-comment">${i(e.slice(t))}</span>`,a.push(s);continue}}a.push(et(Qe(e,n)))}return a.join(`
|
|
936
|
+
`)}var nt=`
|
|
693
937
|
.bk-code {
|
|
694
938
|
margin: 0;
|
|
695
939
|
padding: var(--dt-space-5);
|
|
@@ -707,13 +951,62 @@
|
|
|
707
951
|
font-size: var(--dt-font-size-sm);
|
|
708
952
|
line-height: 1.7;
|
|
709
953
|
}
|
|
710
|
-
|
|
954
|
+
|
|
955
|
+
/* Token spans inherit code font properties */
|
|
956
|
+
.bk-code code .bk-hljs-string,
|
|
957
|
+
.bk-code code .bk-hljs-comment,
|
|
958
|
+
.bk-code code .bk-hljs-keyword,
|
|
959
|
+
.bk-code code .bk-hljs-builtin,
|
|
960
|
+
.bk-code code .bk-hljs-number,
|
|
961
|
+
.bk-code code .bk-hljs-operator,
|
|
962
|
+
.bk-code code .bk-hljs-punctuation,
|
|
963
|
+
.bk-code code .bk-hljs-function,
|
|
964
|
+
.bk-code code .bk-hljs-class-name,
|
|
965
|
+
.bk-code code .bk-hljs-tag,
|
|
966
|
+
.bk-code code .bk-hljs-attr-name,
|
|
967
|
+
.bk-code code .bk-hljs-attr-value,
|
|
968
|
+
.bk-code code .bk-hljs-variable,
|
|
969
|
+
.bk-code code .bk-hljs-property {
|
|
970
|
+
font-family: inherit;
|
|
971
|
+
font-size: inherit;
|
|
972
|
+
line-height: inherit;
|
|
973
|
+
background: none;
|
|
974
|
+
text-shadow: none;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/* ── Compact code on mobile ── */
|
|
978
|
+
@media (max-width: 480px) {
|
|
979
|
+
.bk-code {
|
|
980
|
+
padding: var(--dt-space-4);
|
|
981
|
+
}
|
|
982
|
+
.bk-code code {
|
|
983
|
+
font-size: 0.75rem;
|
|
984
|
+
line-height: 1.5;
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
/* ── Ultra-compact code on 320px ── */
|
|
989
|
+
@media (max-width: 320px) {
|
|
990
|
+
.bk-code {
|
|
991
|
+
padding: var(--dt-space-3);
|
|
992
|
+
tab-size: 1;
|
|
993
|
+
}
|
|
994
|
+
.bk-code code {
|
|
995
|
+
font-size: 0.6875rem;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
${Je}
|
|
1000
|
+
`;function rt(e,t){let n=e.language?` language-${o(String(e.language))}`:``,r=e.value??``,a=typeof r==`object`&&r?JSON.stringify(r,null,2):String(r),s=(e.language?tt(a,String(e.language)):``)||i(a);return`<pre class="bk-code"><code class="${n.trim()}">${s}</code></pre>`}function it(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.items;return typeof t.title==`string`&&Array.isArray(n)&&n.every(e=>typeof e==`string`)}function at(e){let t=c(e);return Array.isArray(t)?t.filter(it):t&&typeof t==`object`&&Array.isArray(t.columns)?t.columns.filter(it):[]}function ot(e){let t=new Set,n=[];for(let r of e)for(let e of r.items)t.has(e)||(t.add(e),n.push(e));return n}function st(e,t){if(e.length<2||t.length===0)return!1;let n=!1,r=!1;for(let i of t){let t=e.filter(e=>e.items.includes(i)).length;if(t>1&&(n=!0),t>0&&t<e.length&&(r=!0),n&&r)return!0}return!1}var ct=`
|
|
1001
|
+
/* ── Comparison grid (CSS Grid for equal-height columns) ──────────────── */
|
|
711
1002
|
.bk-comparison {
|
|
712
1003
|
display: grid;
|
|
713
1004
|
grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
|
|
714
1005
|
gap: var(--dt-space-4);
|
|
1006
|
+
align-items: stretch;
|
|
715
1007
|
}
|
|
716
1008
|
|
|
1009
|
+
/* ── Column card ────────────────────────────────────────────────────────── */
|
|
717
1010
|
.bk-comparison-column {
|
|
718
1011
|
display: grid;
|
|
719
1012
|
gap: var(--dt-space-3);
|
|
@@ -722,8 +1015,36 @@
|
|
|
722
1015
|
border-radius: var(--dt-radius-lg);
|
|
723
1016
|
background: var(--dt-bg-secondary);
|
|
724
1017
|
box-shadow: var(--dt-shadow-sm);
|
|
1018
|
+
position: relative;
|
|
1019
|
+
min-width: 0;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/* Recommended column — accent border + glow */
|
|
1023
|
+
.bk-comparison-column[data-recommended="true"] {
|
|
1024
|
+
border-color: var(--dt-accent-fg);
|
|
1025
|
+
box-shadow: var(--dt-shadow-md), 0 0 0 1px var(--dt-accent-fg);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
/* ── "Recommended" badge / ribbon ──────────────────────────────────────── */
|
|
1029
|
+
.bk-comparison-recommended-badge {
|
|
1030
|
+
position: absolute;
|
|
1031
|
+
top: 0;
|
|
1032
|
+
left: 50%;
|
|
1033
|
+
transform: translate(-50%, -50%);
|
|
1034
|
+
background: var(--dt-accent-fg);
|
|
1035
|
+
color: var(--dt-accent-foreground);
|
|
1036
|
+
font-size: var(--dt-font-size-xs);
|
|
1037
|
+
font-weight: 700;
|
|
1038
|
+
text-transform: uppercase;
|
|
1039
|
+
letter-spacing: 0.05em;
|
|
1040
|
+
padding: var(--dt-space-1) var(--dt-space-3);
|
|
1041
|
+
border-radius: var(--dt-radius-pill);
|
|
1042
|
+
white-space: nowrap;
|
|
1043
|
+
line-height: 1.4;
|
|
1044
|
+
z-index: 1;
|
|
725
1045
|
}
|
|
726
1046
|
|
|
1047
|
+
/* ── Column title ───────────────────────────────────────────────────────── */
|
|
727
1048
|
.bk-comparison-title {
|
|
728
1049
|
color: var(--dt-text-primary);
|
|
729
1050
|
font-size: var(--dt-font-size-lg);
|
|
@@ -733,21 +1054,83 @@
|
|
|
733
1054
|
border-bottom: 1px solid var(--dt-border-muted);
|
|
734
1055
|
}
|
|
735
1056
|
|
|
1057
|
+
/* ── Item list ──────────────────────────────────────────────────────────── */
|
|
736
1058
|
.bk-comparison-items {
|
|
737
1059
|
display: grid;
|
|
738
1060
|
gap: var(--dt-space-2);
|
|
739
1061
|
margin: 0;
|
|
740
1062
|
padding: 0;
|
|
741
|
-
|
|
1063
|
+
list-style: none;
|
|
742
1064
|
color: var(--dt-text-secondary);
|
|
743
1065
|
font-size: var(--dt-font-size-sm);
|
|
744
1066
|
line-height: 1.6;
|
|
745
1067
|
}
|
|
746
1068
|
|
|
747
1069
|
.bk-comparison-items li {
|
|
748
|
-
padding
|
|
1070
|
+
padding: var(--dt-space-1) var(--dt-space-2);
|
|
1071
|
+
border-radius: var(--dt-radius-sm);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
/* ── Diff indicators ────────────────────────────────────────────────────── */
|
|
1075
|
+
/* Item present in this column but missing from at least one other */
|
|
1076
|
+
.bk-comparison-item-diff-present {
|
|
1077
|
+
background: var(--dt-success-subtle);
|
|
1078
|
+
color: var(--dt-success-emphasis);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.bk-comparison-item-diff-present::before {
|
|
1082
|
+
content: "\\2713\\00a0\\00a0";
|
|
1083
|
+
font-weight: 700;
|
|
1084
|
+
color: var(--dt-success-fg);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/* Item absent from this column but present in at least one other */
|
|
1088
|
+
.bk-comparison-item-diff-absent {
|
|
1089
|
+
background: var(--dt-danger-subtle);
|
|
1090
|
+
color: var(--dt-text-tertiary);
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.bk-comparison-item-diff-absent::before {
|
|
1094
|
+
content: "\\2717\\00a0\\00a0";
|
|
1095
|
+
font-weight: 700;
|
|
1096
|
+
color: var(--dt-danger-fg);
|
|
749
1097
|
}
|
|
750
|
-
|
|
1098
|
+
|
|
1099
|
+
/* ── Responsive: stack vertically on mobile ── */
|
|
1100
|
+
@media (max-width: 640px) {
|
|
1101
|
+
.bk-comparison {
|
|
1102
|
+
grid-template-columns: 1fr;
|
|
1103
|
+
}
|
|
1104
|
+
.bk-comparison-column {
|
|
1105
|
+
padding: var(--dt-space-4);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
@media (max-width: 360px) {
|
|
1110
|
+
.bk-comparison-column {
|
|
1111
|
+
padding: var(--dt-space-3);
|
|
1112
|
+
}
|
|
1113
|
+
.bk-comparison-items {
|
|
1114
|
+
font-size: 0.75rem;
|
|
1115
|
+
}
|
|
1116
|
+
.bk-comparison-title {
|
|
1117
|
+
font-size: var(--dt-font-size-base);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
@media (max-width: 320px) {
|
|
1122
|
+
.bk-comparison {
|
|
1123
|
+
gap: var(--dt-space-3);
|
|
1124
|
+
}
|
|
1125
|
+
.bk-comparison-column {
|
|
1126
|
+
padding: var(--dt-space-3) var(--dt-space-2);
|
|
1127
|
+
}
|
|
1128
|
+
.bk-comparison-recommended-badge {
|
|
1129
|
+
font-size: 0.625rem;
|
|
1130
|
+
padding: 2px var(--dt-space-2);
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
`;function lt(e,t){let n=at(e.value),r=ot(n),a=st(n,r);return`<div class="bk-comparison">${n.map(e=>{let t=e.recommended===!0,n;if(a){let t=new Set(e.items);n=r.map(e=>`<li class="${t.has(e)?`bk-comparison-item-diff-present`:`bk-comparison-item-diff-absent`}">${i(e)}</li>`).join(``)}else n=e.items.map(e=>`<li>${i(e)}</li>`).join(``);return`<section class="bk-comparison-column"${t?` data-recommended="true"`:``}>${t?`<div class="bk-comparison-recommended-badge">Recommended</div>`:``}<div class="bk-comparison-title">${i(e.title)}</div><ul class="bk-comparison-items">${n}</ul></section>`}).join(``)}</div>`}function ut(e){let t=c(e);if(t&&typeof t==`object`){let e=t;return{name:typeof e.name==`string`?e.name:`Untitled component`,description:typeof e.description==`string`?e.description:void 0,type:typeof e.type==`string`?e.type:void 0,technology:typeof e.technology==`string`?e.technology:void 0,responsibilities:Array.isArray(e.responsibilities)?e.responsibilities.map(String).filter(Boolean):[],interfaces:Array.isArray(e.interfaces)?e.interfaces:[],dependencies:Array.isArray(e.dependencies)?e.dependencies:[],metrics:e.metrics&&typeof e.metrics==`object`?e.metrics:void 0,codeLinks:Array.isArray(e.codeLinks)?e.codeLinks:[]}}return{name:`Untitled component`}}function dt(e){return e.length===0?``:`<details class="bk-component-detail-section" open><summary class="bk-component-detail-summary">Responsibilities</summary><ul class="bk-component-detail-list">${e.map(e=>`<li>${i(e)}</li>`).join(``)}</ul></details>`}function ft(e){return e.length===0?``:`<details class="bk-component-detail-section" open><summary class="bk-component-detail-summary">Interfaces</summary><div class="bk-component-detail-table-wrap"><table class="bk-component-detail-table"><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody>${e.map(e=>`<tr><td class="bk-component-detail-code">${i(e.name)}</td><td class="bk-component-detail-code">${i(e.type)}</td><td>${i(e.description??``)}</td></tr>`).join(``)}</tbody></table></div></details>`}function pt(e){return e.length===0?``:`<details class="bk-component-detail-section" open><summary class="bk-component-detail-summary">Dependencies</summary><ul class="bk-component-detail-dependencies">${e.map(e=>`<li class="bk-component-detail-dependency"><span class="bk-component-detail-dependency-name">${i(e.name)}</span>${e.relationship?`<span class="bk-component-detail-dependency-relationship">${i(e.relationship)}</span>`:``}</li>`).join(``)}</ul></details>`}function mt(e){let t=Object.entries(e??{});return t.length===0?``:`<details class="bk-component-detail-section" open><summary class="bk-component-detail-summary">Metrics</summary><div class="bk-component-detail-metrics">${t.map(([e,t])=>`<div class="bk-component-detail-metric"><span class="bk-component-detail-metric-label">${i(e)}</span><strong class="bk-component-detail-metric-value">${i(String(t))}</strong></div>`).join(``)}</div></details>`}function ht(e){let t=Array.isArray(e.codeLinks)?e.codeLinks:[];return t.length===0?``:`<details class="bk-component-detail-section" open><summary class="bk-component-detail-summary">Code Links</summary><div class="bk-component-detail-links">${t.map(e=>`<a class="bk-component-detail-link" href="${a(e.href)}">${i(e.label)}</a>`).join(``)}</div></details>`}var gt=`
|
|
751
1134
|
.bk-component-detail {
|
|
752
1135
|
display: grid;
|
|
753
1136
|
gap: var(--dt-space-4);
|
|
@@ -951,7 +1334,7 @@
|
|
|
951
1334
|
padding-bottom: var(--dt-space-3);
|
|
952
1335
|
}
|
|
953
1336
|
}
|
|
954
|
-
`;function
|
|
1337
|
+
`;function _t(e,t){let n=ut(e.value),r=n.description?`<p class="bk-component-detail-description">${i(n.description)}</p>`:``,a=n.type?`<span class="bk-component-detail-badge">${i(n.type)}</span>`:``,o=n.technology?`<span class="bk-component-detail-tech">${i(n.technology)}</span>`:``,s=[dt(n.responsibilities??[]),ft(n.interfaces??[]),pt(n.dependencies??[]),mt(n.metrics),ht(n)].join(``);return`<article class="bk-component-detail"><header class="bk-component-detail-header"><div class="bk-component-detail-heading"><h4 class="bk-component-detail-name">${i(n.name)}</h4>${a}${o}</div>${r}</header><div class="bk-component-detail-body">${s}</div></article>`}function vt(e){let t=c(e);if(t&&typeof t==`object`){let e=t;return{name:typeof e.name==`string`?e.name:`unnamed_schema`,description:typeof e.description==`string`?e.description:void 0,fields:Array.isArray(e.fields)?e.fields:[],indexes:Array.isArray(e.indexes)?e.indexes:[]}}return{name:`unnamed_schema`,fields:[]}}function yt(e){return Array.isArray(e.constraints)&&e.constraints.includes(`primary-key`)}function bt(e){return e.startsWith(`foreign-key:`)?`<a class="bk-data-table-schema-badge bk-data-table-schema-badge--link" href="${a(`#${o(e.slice(12).replace(/\./g,`_`))}`)}">${i(e)}</a>`:`<span class="bk-data-table-schema-badge${e===`primary-key`?` bk-data-table-schema-badge--primary`:``}">${i(e)}</span>`}function xt(e){return e.length===0?``:`<section class="bk-data-table-schema-indexes"><h5 class="bk-data-table-schema-subtitle">Indexes</h5><div class="bk-data-table-schema-index-grid">${e.map(e=>`<article class="bk-data-table-schema-index"><div class="bk-data-table-schema-index-name">${i(e.name)}</div><div class="bk-data-table-schema-index-columns">${i(e.columns.join(`, `))}</div><div class="bk-data-table-schema-index-meta">${e.unique?`Unique`:`Standard`}</div></article>`).join(``)}</div></section>`}var St=`
|
|
955
1338
|
.bk-data-table-schema {
|
|
956
1339
|
display: grid;
|
|
957
1340
|
gap: var(--dt-space-4);
|
|
@@ -1074,91 +1457,298 @@
|
|
|
1074
1457
|
color: var(--dt-text-primary);
|
|
1075
1458
|
font-weight: 700;
|
|
1076
1459
|
}
|
|
1077
|
-
`;function
|
|
1460
|
+
`;function Ct(e,t){let n=vt(e.value),r=n.description?`<p class="bk-data-table-schema-description">${i(n.description)}</p>`:``;if(!Array.isArray(n.fields)||n.fields.length===0)return`<section class="bk-data-table-schema"><header class="bk-data-table-schema-header"><h4 class="bk-data-table-schema-title">${i(n.name)}</h4>${r}</header><p class="bk-data-table-schema-empty">No schema fields available.</p></section>`;let a=n.fields.map(e=>{let t=Array.isArray(e.constraints)?e.constraints:[],r=t.length>0?t.map(e=>bt(e)).join(``):`<span class="bk-data-table-schema-badge">none</span>`;return`<tr class="bk-data-table-schema-row${yt(e)?` bk-data-table-schema-row--primary`:``}" id="${o(`${n.name}_${e.name}`)}"><td class="bk-data-table-schema-code">${i(e.name)}</td><td class="bk-data-table-schema-code">${i(e.type)}</td><td class="bk-data-table-schema-required">${e.required?`✓`:`—`}</td><td><div class="bk-data-table-schema-constraints">${r}</div></td><td class="bk-data-table-schema-code">${i(e.default??`—`)}</td><td>${i(e.description??``)}</td></tr>`}).join(``);return`<section class="bk-data-table-schema"><header class="bk-data-table-schema-header"><h4 class="bk-data-table-schema-title">${i(n.name)}</h4>${r}</header><div class="bk-data-table-schema-wrap"><table class="bk-data-table-schema-table"><thead><tr><th>Field Name</th><th>Type</th><th>Required</th><th>Constraints</th><th>Default</th><th>Description</th></tr></thead><tbody>${a}</tbody></table></div>${xt(n.indexes??[])}</section>`}var wt=`
|
|
1078
1461
|
.bk-diagram {
|
|
1079
|
-
border: 1px solid var(--dt-border-default
|
|
1080
|
-
border-radius: var(--dt-radius-lg
|
|
1462
|
+
border: 1px solid var(--dt-border-default);
|
|
1463
|
+
border-radius: var(--dt-radius-lg);
|
|
1081
1464
|
overflow: hidden;
|
|
1465
|
+
box-shadow: var(--dt-shadow-sm);
|
|
1466
|
+
transition: box-shadow var(--dt-transition-normal);
|
|
1467
|
+
}
|
|
1468
|
+
.bk-diagram:hover {
|
|
1469
|
+
box-shadow: var(--dt-shadow-md);
|
|
1082
1470
|
}
|
|
1083
|
-
.bk-diagram summary {
|
|
1084
|
-
padding: var(--dt-space-3
|
|
1471
|
+
.bk-diagram.bk-diagram-has-viz summary {
|
|
1472
|
+
padding: var(--dt-space-2) var(--dt-space-3);
|
|
1085
1473
|
cursor: pointer;
|
|
1086
1474
|
font-weight: 600;
|
|
1087
|
-
font-size: var(--dt-font-size-sm
|
|
1088
|
-
background: var(--dt-bg-secondary
|
|
1089
|
-
border-bottom: 1px solid var(--dt-border-default
|
|
1475
|
+
font-size: var(--dt-font-size-sm);
|
|
1476
|
+
background: var(--dt-bg-secondary);
|
|
1477
|
+
border-bottom: 1px solid var(--dt-border-default);
|
|
1090
1478
|
user-select: none;
|
|
1479
|
+
color: var(--dt-text-secondary);
|
|
1480
|
+
transition: background var(--dt-transition-fast);
|
|
1481
|
+
}
|
|
1482
|
+
.bk-diagram.bk-diagram-has-viz summary:hover {
|
|
1483
|
+
background: var(--dt-bg-tertiary);
|
|
1091
1484
|
}
|
|
1092
|
-
.bk-diagram[open] summary {
|
|
1093
|
-
border-bottom: 1px solid var(--dt-border-default
|
|
1485
|
+
.bk-diagram.bk-diagram-has-viz[open] summary {
|
|
1486
|
+
border-bottom: 1px solid var(--dt-border-default);
|
|
1094
1487
|
margin-bottom: 0;
|
|
1095
1488
|
}
|
|
1096
|
-
.bk-diagram-content {
|
|
1097
|
-
padding: var(--dt-space-3
|
|
1489
|
+
.bk-diagram .bk-diagram-content {
|
|
1490
|
+
padding: var(--dt-space-3);
|
|
1098
1491
|
}
|
|
1099
1492
|
.bk-diagram table {
|
|
1100
1493
|
width: 100%;
|
|
1101
1494
|
border-collapse: collapse;
|
|
1102
|
-
font-size: var(--dt-font-size-sm
|
|
1495
|
+
font-size: var(--dt-font-size-sm);
|
|
1103
1496
|
}
|
|
1104
1497
|
.bk-diagram th, .bk-diagram td {
|
|
1105
|
-
padding: var(--dt-space-1
|
|
1498
|
+
padding: var(--dt-space-1) var(--dt-space-2);
|
|
1106
1499
|
text-align: left;
|
|
1107
|
-
border-bottom: 1px solid var(--dt-border-subtle
|
|
1500
|
+
border-bottom: 1px solid var(--dt-border-subtle);
|
|
1108
1501
|
}
|
|
1109
1502
|
.bk-diagram th {
|
|
1110
1503
|
font-weight: 600;
|
|
1111
|
-
color: var(--dt-text-secondary
|
|
1112
|
-
font-size: var(--dt-font-size-xs
|
|
1504
|
+
color: var(--dt-text-secondary);
|
|
1505
|
+
font-size: var(--dt-font-size-xs);
|
|
1113
1506
|
text-transform: uppercase;
|
|
1114
1507
|
letter-spacing: 0.5px;
|
|
1115
1508
|
}
|
|
1116
1509
|
.bk-diagram .bk-diagram-meta {
|
|
1117
1510
|
display: grid;
|
|
1118
1511
|
grid-template-columns: auto 1fr;
|
|
1119
|
-
gap: var(--dt-space-1
|
|
1120
|
-
font-size: var(--dt-font-size-sm
|
|
1121
|
-
margin-bottom: var(--dt-space-3
|
|
1512
|
+
gap: var(--dt-space-1) var(--dt-space-3);
|
|
1513
|
+
font-size: var(--dt-font-size-sm);
|
|
1514
|
+
margin-bottom: var(--dt-space-3);
|
|
1122
1515
|
}
|
|
1123
1516
|
.bk-diagram .bk-diagram-meta dt {
|
|
1124
1517
|
font-weight: 600;
|
|
1125
|
-
color: var(--dt-text-secondary
|
|
1518
|
+
color: var(--dt-text-secondary);
|
|
1126
1519
|
}
|
|
1127
1520
|
.bk-diagram .bk-diagram-meta dd {
|
|
1128
1521
|
margin: 0;
|
|
1129
1522
|
}
|
|
1130
1523
|
.bk-diagram ul {
|
|
1131
|
-
margin: var(--dt-space-2
|
|
1132
|
-
padding-left: var(--dt-space-4
|
|
1524
|
+
margin: var(--dt-space-2) 0;
|
|
1525
|
+
padding-left: var(--dt-space-4);
|
|
1133
1526
|
}
|
|
1134
1527
|
.bk-diagram li {
|
|
1135
|
-
font-size: var(--dt-font-size-sm
|
|
1528
|
+
font-size: var(--dt-font-size-sm);
|
|
1136
1529
|
line-height: 1.6;
|
|
1137
1530
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
.bk-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
.bk-
|
|
1156
|
-
|
|
1157
|
-
|
|
1531
|
+
|
|
1532
|
+
/* After mini-mermaid renders — hide border, show clean SVG */
|
|
1533
|
+
.bk-diagram[data-mini-mermaid-rendered] {
|
|
1534
|
+
border: 1px solid var(--dt-border-default);
|
|
1535
|
+
border-radius: var(--dt-radius-lg);
|
|
1536
|
+
overflow: hidden;
|
|
1537
|
+
box-shadow: var(--dt-shadow-sm);
|
|
1538
|
+
background: var(--dt-bg-canvas);
|
|
1539
|
+
}
|
|
1540
|
+
.bk-diagram[data-mini-mermaid-rendered]:hover {
|
|
1541
|
+
box-shadow: var(--dt-shadow-md);
|
|
1542
|
+
}
|
|
1543
|
+
.bk-diagram[data-mini-mermaid-rendered] .bk-diagram-viz {
|
|
1544
|
+
display: block;
|
|
1545
|
+
padding: var(--dt-space-4);
|
|
1546
|
+
background: var(--dt-bg-canvas);
|
|
1547
|
+
}
|
|
1548
|
+
.bk-diagram[data-mini-mermaid-rendered] .bk-diagram-fallback {
|
|
1549
|
+
display: none;
|
|
1550
|
+
}
|
|
1551
|
+
.bk-diagram-viz {
|
|
1552
|
+
display: block;
|
|
1553
|
+
overflow-x: auto;
|
|
1554
|
+
}
|
|
1555
|
+
.bk-diagram-viz svg {
|
|
1556
|
+
display: block;
|
|
1557
|
+
margin: 0 auto;
|
|
1558
|
+
max-width: 100%;
|
|
1559
|
+
height: auto;
|
|
1560
|
+
}
|
|
1561
|
+
`,Tt={frontend:`🖥️`,backend:`⚙️`,database:`🗄️`,storage:`💾`,cloud:`☁️`,external:`🔗`,security:`🔒`,messagebus:`📨`,person:`👤`,actor:`👤`,system:`🏛️`,"start-end":`●`,automated:`🤖`,manual:`👆`,decision:`🔀`,branch:`🔀`,infrastructure:`📦`},Et=`📋`;function Dt(e){return Tt[e]??Et}var Ot={frontend:`fill:var(--dt-agent-frontend,#38bdf8)`,backend:`fill:var(--dt-accent-subtle,#14b8a6)`,database:`fill:var(--dt-purple-subtle,#c084fc)`,storage:`fill:var(--dt-purple-subtle,#c084fc)`,cloud:`fill:var(--dt-info-subtle,#bae6fd)`,external:`fill:var(--dt-bg-tertiary,#64748b)`,security:`fill:var(--dt-danger-subtle,#fecaca)`,messagebus:`fill:var(--dt-warning-subtle,#fde68a)`,decision:`fill:var(--dt-danger-subtle,#fecaca)`,automated:`fill:var(--dt-success-subtle,#bbf7d0)`,manual:`fill:var(--dt-warning-subtle,#fde68a)`,person:`fill:var(--dt-accent-subtle,#ccfbf1)`,actor:`fill:var(--dt-accent-subtle,#ccfbf1)`,system:`fill:var(--dt-info-subtle,#bae6fd)`,infrastructure:`fill:var(--dt-bg-tertiary,#e2e8f0)`},kt={person:{open:`([`,close:`])`},actor:{open:`([`,close:`])`},database:{open:`[(`,close:`)]`},storage:{open:`[(`,close:`)]`},decision:{open:`{`,close:`}`},branch:{open:`{`,close:`}`},external:{open:`{{`,close:`}}`},system:{open:`{{`,close:`}}`},start:{open:`((`,close:`))`},end:{open:`((`,close:`))`}},At={open:`[`,close:`]`};function jt(e){return kt[e]??At}function Mt(e,t){return e.replace(/[^a-zA-Z0-9_]/g,`_`).replace(/^_+|_+$/g,``).replace(/_+/g,`_`)||(t===void 0?`node`:`node_${t}`)}function Nt(e){return e.replace(/"/g,`#quot;`).replace(/\[/g,`#91;`).replace(/\]/g,`#93;`).replace(/\(/g,`#40;`).replace(/\)/g,`#41;`).replace(/\{/g,`#123;`).replace(/\}/g,`#125;`).replace(/`/g,`#96;`).replace(/\n/g,` `).replace(/\r/g,``)}function Pt(e,t){let n=e.value;if(!n||typeof n!=`object`)return`<div class="bk-diagram"><p class="bk-diagram-empty">No diagram data</p></div>`;let r=e.type??`unknown`,a=r.startsWith(`architecture`)?`architecture`:r.startsWith(`workflow`)?`workflow`:r.startsWith(`sequence`)?`sequence`:r.startsWith(`dataflow`)?`dataflow`:r.startsWith(`lifecycle`)?`lifecycle`:String(n.diagram_type??`unknown`),o=n.meta,s=String(o?.title??`Diagram`),c=Ft(n.components??n.nodes??n.participants??n.states??[]),l=Ft(n.connections??n.edges??n.messages??n.flows??n.transitions??[]),u=[`graph TD`],d=new Set,f=new Map,p=0;for(let e of c){let t=Mt(String(e.id??e.label??e.name??`node`),p);if(p++,d.has(t))continue;d.add(t),f.set(t,e);let n=String(e.label??e.name??t),r=String(e.type??String(e.kind??``)),i=Dt(r),a=e.technology?`<br><small>${Nt(String(e.technology))}</small>`:``,o=Ot[r]??`fill:var(--dt-bg-secondary,#1e293b)`,s=jt(r),c=`${i} ${Nt(n)}`;u.push(` ${t}${s.open}"${c}${a}"${s.close}`),u.push(` style ${t} ${o}`)}for(let e of l){let t=String(e.from??e.source??``),n=String(e.to??e.target??``),r=Mt(t),i=Mt(n);if(!d.has(r)||!d.has(i))continue;let a=e.label?` -- "${Nt(String(e.label))}" --> `:` --> `;u.push(` ${r}${a}${i}`)}let ee=d.size>0,te=u.join(`
|
|
1562
|
+
`),ne=[`<dt>Type</dt><dd>${i(a)}</dd>`,`<dt>Components</dt><dd>${c.length}</dd>`,`<dt>Relationships</dt><dd>${l.length}</dd>`];n.schema_version!==void 0&&ne.push(`<dt>Schema</dt><dd>v${String(n.schema_version)}</dd>`);let re=``;c.length>0&&(re=`<table><thead><tr><th>Component</th><th>Type</th></tr></thead><tbody>${c.slice(0,30).map(e=>{let t=String(e.label??e.name??`(unnamed)`),n=String(e.type??String(e.kind??`-`));return`<tr><td>${i(t)}</td><td>${i(n)}</td></tr>`}).join(``)}</tbody></table>${c.length>30?`<p class="bk-diagram-truncated">… and ${c.length-30} more</p>`:``}`);let ie=``;return l.length>0&&(ie=`<h4>Relationships</h4><ul>${l.slice(0,20).map(e=>{let t=String(e.from??e.source??`-`),n=String(e.to??e.target??`-`),r=e.label?`: ${i(String(e.label))}`:``;return`<li><strong>${i(t)}</strong> → <strong>${i(n)}</strong>${r}</li>`}).join(``)}</ul>${l.length>20?`<p class="bk-diagram-truncated">… and ${l.length-20} more relationships</p>`:``}`),ee?`<div class="${`bk-diagram${ee?` bk-diagram-has-viz`:``}`}">
|
|
1563
|
+
<pre class="bk-diagram-viz mermaid">${i(te)}</pre>
|
|
1564
|
+
<details class="bk-diagram-fallback">
|
|
1565
|
+
<summary>${i(s)} <small>(${a}, ${c.length} components)</small></summary>
|
|
1566
|
+
<div class="bk-diagram-content">
|
|
1567
|
+
<dl class="bk-diagram-meta">${ne.join(``)}</dl>
|
|
1568
|
+
${re}
|
|
1569
|
+
${ie}
|
|
1570
|
+
</div>
|
|
1571
|
+
</details>
|
|
1572
|
+
</div>`:`<div class="bk-diagram">
|
|
1573
|
+
<details open>
|
|
1574
|
+
<summary>${i(s)} <small>(${i(a)}, ${c.length} components)</small></summary>
|
|
1575
|
+
<div class="bk-diagram-content">
|
|
1576
|
+
<dl class="bk-diagram-meta">${ne.join(``)}</dl>
|
|
1577
|
+
${re}
|
|
1578
|
+
${ie}
|
|
1579
|
+
</div>
|
|
1580
|
+
</details>
|
|
1581
|
+
</div>`}function Ft(e){return Array.isArray(e)?e:[]}var It=`
|
|
1582
|
+
/* ── Diff Container ── */
|
|
1583
|
+
.bk-diff {
|
|
1584
|
+
overflow-x: auto;
|
|
1585
|
+
font-family: var(--dt-font-mono);
|
|
1586
|
+
font-size: var(--dt-font-size-sm);
|
|
1587
|
+
border: 1px solid var(--dt-border-default);
|
|
1588
|
+
border-radius: var(--dt-radius-lg);
|
|
1589
|
+
position: relative;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
/* ── Diff Toolbar (copy / expand) ── */
|
|
1593
|
+
.bk-diff-toolbar {
|
|
1594
|
+
display: flex;
|
|
1595
|
+
justify-content: flex-end;
|
|
1596
|
+
gap: var(--dt-space-1);
|
|
1597
|
+
padding: var(--dt-space-1) var(--dt-space-2);
|
|
1598
|
+
background: var(--dt-bg-secondary);
|
|
1599
|
+
border-bottom: 1px solid var(--dt-border-default);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
.bk-diff-btn {
|
|
1603
|
+
display: inline-flex;
|
|
1604
|
+
align-items: center;
|
|
1605
|
+
gap: 4px;
|
|
1606
|
+
padding: 2px 8px;
|
|
1607
|
+
font-size: var(--dt-font-size-xs);
|
|
1608
|
+
font-family: var(--dt-font-sans);
|
|
1609
|
+
color: var(--dt-text-tertiary);
|
|
1610
|
+
background: transparent;
|
|
1611
|
+
border: 1px solid var(--dt-border-muted);
|
|
1612
|
+
border-radius: var(--dt-radius-sm);
|
|
1613
|
+
cursor: pointer;
|
|
1614
|
+
transition: color var(--dt-transition-fast), border-color var(--dt-transition-fast);
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
.bk-diff-btn:hover {
|
|
1618
|
+
color: var(--dt-text-primary);
|
|
1619
|
+
border-color: var(--dt-accent-muted);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.bk-diff-btn:active {
|
|
1623
|
+
transform: scale(0.96);
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
/* ── 44px touch targets on mobile ── */
|
|
1627
|
+
@media (max-width: 640px) {
|
|
1628
|
+
.bk-diff-btn {
|
|
1629
|
+
min-width: 2.75rem;
|
|
1630
|
+
min-height: 2.75rem;
|
|
1631
|
+
padding: var(--dt-space-1) var(--dt-space-3);
|
|
1632
|
+
justify-content: center;
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
@media (max-width: 320px) {
|
|
1637
|
+
.bk-diff {
|
|
1638
|
+
font-size: 0.75rem;
|
|
1639
|
+
}
|
|
1640
|
+
.bk-diff-line {
|
|
1641
|
+
padding: 0 8px;
|
|
1642
|
+
}
|
|
1643
|
+
.bk-diff-ln {
|
|
1644
|
+
min-width: 3ch;
|
|
1645
|
+
max-width: 3ch;
|
|
1646
|
+
padding: 0 4px;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
.bk-diff-btn[data-copied="true"] {
|
|
1651
|
+
color: var(--dt-success-fg);
|
|
1652
|
+
border-color: var(--dt-success-muted);
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
/* ── Diff Table ── */
|
|
1656
|
+
.bk-diff-table {
|
|
1657
|
+
width: 100%;
|
|
1658
|
+
border-collapse: collapse;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
/* ── Line Number Cells ── */
|
|
1662
|
+
.bk-diff-ln {
|
|
1663
|
+
color: var(--dt-text-tertiary);
|
|
1664
|
+
padding: 0 8px;
|
|
1665
|
+
text-align: right;
|
|
1666
|
+
user-select: none;
|
|
1667
|
+
width: 4ch;
|
|
1668
|
+
min-width: 4ch;
|
|
1669
|
+
max-width: 4ch;
|
|
1670
|
+
white-space: nowrap;
|
|
1671
|
+
border-right: 1px solid var(--dt-border-default);
|
|
1672
|
+
font-variant-numeric: tabular-nums;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/* ── Content Cells ── */
|
|
1676
|
+
.bk-diff-line {
|
|
1677
|
+
padding: 0 12px;
|
|
1678
|
+
white-space: pre-wrap;
|
|
1679
|
+
word-break: break-all;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
/* ── Hunk Headers (@@ … @@) ── */
|
|
1683
|
+
.bk-diff-hunk td {
|
|
1684
|
+
background: var(--dt-info-subtle);
|
|
1685
|
+
color: var(--dt-info-fg);
|
|
1686
|
+
padding: 4px 12px;
|
|
1687
|
+
font-style: italic;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
/* ── Added Lines (+) ── */
|
|
1691
|
+
.bk-diff-add td {
|
|
1692
|
+
background: var(--dt-success-subtle);
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/* ── Removed Lines (-) ── */
|
|
1696
|
+
.bk-diff-del td {
|
|
1697
|
+
background: var(--dt-danger-subtle);
|
|
1698
|
+
}
|
|
1699
|
+
|
|
1700
|
+
/* ── Header Lines (--- / +++) ── */
|
|
1701
|
+
.bk-diff-header td {
|
|
1702
|
+
font-family: var(--dt-font-mono);
|
|
1703
|
+
color: var(--dt-accent-fg);
|
|
1704
|
+
padding: 4px 12px;
|
|
1705
|
+
background: var(--dt-bg-secondary);
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
/* ── Inline Word-Level Highlights ── */
|
|
1709
|
+
.bk-diff-word-del {
|
|
1710
|
+
background: var(--dt-danger-subtle);
|
|
1711
|
+
text-decoration: line-through;
|
|
1712
|
+
border-radius: 2px;
|
|
1713
|
+
padding: 0 1px;
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
.bk-diff-word-add {
|
|
1717
|
+
background: var(--dt-success-subtle);
|
|
1718
|
+
border-radius: 2px;
|
|
1719
|
+
padding: 0 1px;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
/* ── Expand/Collapse ── */
|
|
1723
|
+
.bk-diff-body {
|
|
1724
|
+
transition: max-height 300ms ease;
|
|
1725
|
+
overflow: hidden;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
.bk-diff-body[data-collapsed="true"] {
|
|
1729
|
+
max-height: 480px;
|
|
1730
|
+
position: relative;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
.bk-diff-body[data-collapsed="true"]::after {
|
|
1734
|
+
content: '';
|
|
1735
|
+
position: absolute;
|
|
1736
|
+
bottom: 0;
|
|
1737
|
+
left: 0;
|
|
1738
|
+
right: 0;
|
|
1739
|
+
height: 48px;
|
|
1740
|
+
background: linear-gradient(transparent, var(--dt-bg-canvas));
|
|
1741
|
+
pointer-events: none;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
.bk-diff-body[data-expanded="true"] {
|
|
1745
|
+
max-height: none;
|
|
1746
|
+
}
|
|
1747
|
+
`;function Lt(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e;if(typeof t.content==`string`)return t.content;if(typeof t.before==`string`&&typeof t.after==`string`)return Rt(t.before,t.after)}return``}function Rt(e,t){let n=e.split(`
|
|
1158
1748
|
`),r=t.split(`
|
|
1159
|
-
`),i=[
|
|
1160
|
-
`)}function
|
|
1161
|
-
`),a=0,o=0,s=[];for(let e of r)if(e.startsWith(`@@`)){let t=e.match(/@@ -(\d+)/);if(t){a=parseInt(t[1],10)-1;let n=e.match(
|
|
1749
|
+
`),i=[`--- a/previous`,`+++ a/current`];for(let e of n)i.push(`-${e}`);for(let e of r)i.push(`+${e}`);return i.join(`
|
|
1750
|
+
`)}function zt(e,t){let n=e.slice(1),r=t.slice(1);if(n===r)return{oldHtml:i(e),newHtml:i(t)};let a=0;for(;a<n.length&&a<r.length&&n[a]===r[a];)a++;let o=0,s=n.length-a,c=r.length-a;for(;o<s&&o<c&&n[n.length-1-o]===r[r.length-1-o];)o++;let l=i(n.slice(0,a)),u=i(n.slice(a,n.length-o)),d=i(r.slice(a,r.length-o)),f=i(n.slice(n.length-o));return{oldHtml:u.length>0?`-${l}<span class="bk-diff-word-del">${u}</span>${f}`:`-${l}${f}`,newHtml:d.length>0?`+${l}<span class="bk-diff-word-add">${d}</span>${f}`:`+${l}${f}`}}function Bt(e,t){let n=Lt(e.value);if(!n)return`<div class="bk-diff"></div>`;let r=n.split(`
|
|
1751
|
+
`),a=0,o=0,s=[],c=[];function l(){for(let e of c)s.push(`<tr class="bk-diff-del"><td class="bk-diff-ln">${e.oldLnVal}</td><td class="bk-diff-ln"></td><td class="bk-diff-line">${i(e.line)}</td></tr>`);c.length=0}for(let e of r)if(e.startsWith(`@@`)){l();let t=e.match(/@@ -(\d+)/);if(t){a=parseInt(t[1],10)-1;let n=e.match(/\+\s*(\d+)/);o=n?parseInt(n[1],10)-1:0}s.push(`<tr class="bk-diff-hunk"><td colspan="3">${i(e)}</td></tr>`)}else if(e.startsWith(`---`)||e.startsWith(`+++`))l(),s.push(`<tr class="bk-diff-header"><td colspan="3">${i(e)}</td></tr>`);else if(e.startsWith(`+`))if(c.length>0){let t=c.shift();o++;let{oldHtml:n,newHtml:r}=zt(t.line,e);s.push(`<tr class="bk-diff-del"><td class="bk-diff-ln">${t.oldLnVal}</td><td class="bk-diff-ln"></td><td class="bk-diff-line">${n}</td></tr>`),s.push(`<tr class="bk-diff-add"><td class="bk-diff-ln"></td><td class="bk-diff-ln">${o}</td><td class="bk-diff-line">${r}</td></tr>`)}else o++,s.push(`<tr class="bk-diff-add"><td class="bk-diff-ln"></td><td class="bk-diff-ln">${o}</td><td class="bk-diff-line">${i(e)}</td></tr>`);else if(e.startsWith(`-`))a++,c.push({line:e,oldLnVal:a});else{l(),a++,o++;let t=e.startsWith(` `)?e:` ${e}`;s.push(`<tr class="bk-diff-context"><td class="bk-diff-ln">${a}</td><td class="bk-diff-ln">${o}</td><td class="bk-diff-line">${i(t)}</td></tr>`)}l();let u=r.length>25;return`<div class="bk-diff">${`<div class="bk-diff-toolbar">${u?`<button class="bk-diff-btn bk-diff-expand" data-expand-text="▼ Expand" data-collapse-text="▲ Collapse">▼ Expand</button>`:``}${`<button class="bk-diff-btn bk-diff-copy" data-diff="${encodeURIComponent(n)}">\uD83D\uDCCB Copy</button>`}</div>`}<script>(function(){var c=document.currentScript;if(!c)return;var d=c.parentElement;if(!d)return;var b=d.querySelector('.bk-diff-body');if(!b)return;var e=d.querySelector('.bk-diff-expand');if(e){e.addEventListener('click',function(){var l=b.dataset.collapsed==='true';b.dataset.collapsed=l?'false':'true';b.dataset.expanded=l?'true':'false';e.textContent=l?e.dataset.collapseText:e.dataset.expandText;})}var p=d.querySelector('.bk-diff-copy');if(p&&navigator.clipboard){p.addEventListener('click',function(){navigator.clipboard.writeText(decodeURIComponent(p.dataset.diff)).then(function(){p.dataset.copied='true';setTimeout(function(){delete p.dataset.copied},2000)})})}})();<\/script><div class="bk-diff-body"${u?` data-collapsed="true"`:``}><table class="bk-diff-table">${s.join(``)}</table></div></div>`}function Vt(e){let t=c(e);return Array.isArray(t)?t:t&&typeof t==`object`&&Array.isArray(t.files)?t.files:[]}var Ht=`
|
|
1162
1752
|
.bk-docs-browser {
|
|
1163
1753
|
display: grid;
|
|
1164
1754
|
gap: var(--dt-space-3);
|
|
@@ -1203,7 +1793,7 @@
|
|
|
1203
1793
|
font-size: var(--dt-font-size-xs);
|
|
1204
1794
|
font-weight: 700;
|
|
1205
1795
|
}
|
|
1206
|
-
`;function
|
|
1796
|
+
`;function Ut(e,t){return`<div class="bk-docs-browser">${Vt(e.value).map(e=>{let t=f(e.status),n=e.title?`<div class="bk-doc-title">${i(e.title)}</div>`:``,r=e.content?`<pre class="bk-doc-content">${i(e.content)}</pre>`:``;return`<article class="bk-doc-entry"><div class="bk-doc-header"><div>${n}<div class="bk-doc-path">${i(e.path)}</div></div><span class="bk-doc-status" style="background:var(--dt-${t}-subtle);color:var(--dt-${t}-fg);">${i(e.status??`current`)}</span></div>${r}</article>`}).join(``)}</div>`}function Wt(e){let t=c(e);if(t&&typeof t==`object`){let e=t;return{title:typeof e.title==`string`?e.title:void 0,description:typeof e.description==`string`?e.description:void 0,pages:Array.isArray(e.pages)?e.pages:[]}}return{pages:[]}}function Gt(e){switch(e){case`draft`:return`warning`;case`deprecated`:return`danger`;default:return`accent`}}function Kt(e){let t=e.href?`a`:`article`,n=e.href?` href="${a(e.href)}"`:``,r=e.icon?`<span class="bk-docs-hub-card-icon" aria-hidden="true">${i(e.icon)}</span>`:``,o=e.description?`<p class="bk-docs-hub-card-description">${i(e.description)}</p>`:``,s=e.category?`<span class="bk-docs-hub-card-category">${i(e.category)}</span>`:``,c=e.status?`<span class="bk-docs-hub-card-status" data-tone="${Gt(e.status)}"><span class="bk-docs-hub-card-status-dot" aria-hidden="true"></span>${i(e.status)}</span>`:``;return`<${t} class="bk-docs-hub-card"${n}><div class="bk-docs-hub-card-head">${r}<div class="bk-docs-hub-card-copy"><div class="bk-docs-hub-card-title">${i(e.title)}</div>${o}</div></div><div class="bk-docs-hub-card-meta">${s}${c}</div></${t}>`}var qt=`
|
|
1207
1797
|
.bk-docs-hub {
|
|
1208
1798
|
display: grid;
|
|
1209
1799
|
gap: var(--dt-space-4);
|
|
@@ -1339,7 +1929,7 @@
|
|
|
1339
1929
|
grid-template-columns: minmax(0, 1fr);
|
|
1340
1930
|
}
|
|
1341
1931
|
}
|
|
1342
|
-
`;function
|
|
1932
|
+
`;function Jt(e,t){let n=Wt(e.value),r=n.title?`<h4 class="bk-docs-hub-title">${i(n.title)}</h4>`:``,a=n.description?`<p class="bk-docs-hub-description">${i(n.description)}</p>`:``,o=Array.isArray(n.pages)?n.pages:[];return`<section class="bk-docs-hub"><div class="bk-docs-hub-header">${r}${a}</div>${o.length>0?`<div class="bk-docs-hub-grid">${o.map(e=>Kt(e)).join(``)}</div>`:`<p class="bk-docs-hub-empty">No documentation pages available.</p>`}</section>`}function Yt(e){let t=c(e.value);if(t&&typeof t==`object`){let n=t;return{title:String(n.title??e.title??``),severity:n.severity?String(n.severity):e.severity?String(e.severity):void 0,detail:n.detail??n.value}}return{title:String(e.title??`Finding`),severity:e.severity?String(e.severity):void 0,detail:t}}var Xt=`
|
|
1343
1933
|
.bk-finding {
|
|
1344
1934
|
display: grid;
|
|
1345
1935
|
gap: var(--dt-space-3);
|
|
@@ -1386,7 +1976,7 @@
|
|
|
1386
1976
|
line-height: 1.7;
|
|
1387
1977
|
font-size: var(--dt-font-size-sm);
|
|
1388
1978
|
}
|
|
1389
|
-
`;function
|
|
1979
|
+
`;function Zt(e,t){let n=Yt(e),r=f(n.severity),a=n.detail===void 0?``:l(String(n.detail)).replace(/\n/g,`<br>`);return`<article class="bk-finding" data-tone="${r}"><div class="bk-finding-header"><div class="bk-finding-title">${i(n.title)}</div><span class="bk-finding-severity" style="background:var(--dt-${r}-subtle);color:var(--dt-${r}-fg);">${i(n.severity??`info`)}</span></div><div class="bk-finding-detail">${a}</div></article>`}function Qt(e){return typeof e==`object`&&!!e}function $t(e){return Qt(e)?{name:typeof e.name==`string`?e.name:``,total:typeof e.total==`number`?e.total:0,self:typeof e.self==`number`?e.self:void 0,children:Array.isArray(e.children)?e.children.map($t).filter(e=>e!==null):[]}:null}function en(e){let t=[],n=[{node:e,depth:0}];for(;n.length>0;){let e=n.shift();if(!e)continue;let{node:r,depth:i}=e;t[i]||(t[i]=[]),t[i].push(r);for(let e of r.children??[])n.push({node:e,depth:i+1})}return t}function tn(e){let t=[`#e24d28`,`#e8602a`,`#edad2a`,`#f5c842`,`#fce94f`,`#c4a000`,`#e07028`,`#d45500`];return t[e%t.length]}var nn=`
|
|
1390
1980
|
.bk-flame {
|
|
1391
1981
|
display: grid;
|
|
1392
1982
|
gap: 1px;
|
|
@@ -1431,10 +2021,10 @@
|
|
|
1431
2021
|
font-size: 10px;
|
|
1432
2022
|
}
|
|
1433
2023
|
}
|
|
1434
|
-
`;function
|
|
2024
|
+
`;function rn(e,t){let n=c(e.value);if(!Qt(n))return`<div class="bk-flame"></div>`;let r=Qt(n.profile)?$t(n.profile):$t(n);if(!r)return`<div class="bk-flame"></div>`;let a=en(r),o=Math.max(r.total,1);return`<div class="bk-flame">${a.map((e,t)=>`<div class="bk-flame-row">${e.map(e=>{let n=Math.max(.5,e.total/o*100),r=n<8?` bk-flame-bar-label--muted`:``,a=(e.children?.length??0)>0,s=e.self===void 0?`${i(e.name)}: ${e.total}`:`${i(e.name)}: ${e.total} (self: ${e.self})`;return`<div class="bk-flame-bar" style="width:${n}%;background:${tn(t)}" title="${s}" data-has-children="${a}">
|
|
1435
2025
|
<span class="bk-flame-bar-label${r}">${i(e.name)} (${e.total})</span>
|
|
1436
2026
|
</div>`}).join(``)}</div>`).join(`
|
|
1437
|
-
`)}</div>`}function
|
|
2027
|
+
`)}</div>`}function an(e){return String(e??``).replace(/"/g,`\\"`)}var on=`
|
|
1438
2028
|
.bk-graph {
|
|
1439
2029
|
margin: 0;
|
|
1440
2030
|
padding: var(--dt-space-4);
|
|
@@ -1447,8 +2037,8 @@
|
|
|
1447
2037
|
font-size: var(--dt-font-size-sm);
|
|
1448
2038
|
line-height: 1.6;
|
|
1449
2039
|
}
|
|
1450
|
-
`;function
|
|
1451
|
-
`))}</pre>`}var
|
|
2040
|
+
`;function sn(e,t){let n=c(e.value),r=[`graph ${[`TD`,`LR`,`RL`,`BT`].includes(String(e.direction??`TD`))?String(e.direction??`TD`):`TD`}`];for(let e of n?.nodes??[]){let t=o(String(e.id??e.name??`node`)),n=an(e.label??e.name??t);r.push(` ${t}["${n}"]`)}for(let e of n?.edges??[]){let t=o(String(e.from??e.source??`from`)),n=o(String(e.to??e.target??`to`)),i=e.label?`|${an(e.label)}|`:``;r.push(` ${t} -->${i} ${n}`)}return`<pre class="bk-graph mermaid">${i(r.join(`
|
|
2041
|
+
`))}</pre>`}var cn=`
|
|
1452
2042
|
.bk-heading {
|
|
1453
2043
|
margin: 0;
|
|
1454
2044
|
color: var(--dt-text-primary);
|
|
@@ -1463,7 +2053,7 @@
|
|
|
1463
2053
|
.bk-heading--4 { font-size: var(--dt-font-size-xl); }
|
|
1464
2054
|
.bk-heading--5,
|
|
1465
2055
|
.bk-heading--6 { font-size: var(--dt-font-size-base); letter-spacing: normal; }
|
|
1466
|
-
`;function
|
|
2056
|
+
`;function ln(e,t){let n=Number(e.level??2),r=Number.isFinite(n)?Math.max(1,Math.min(n,6)):2;return`<h${r} class="bk-heading bk-heading--${r}">${i(String(e.value??e.title??``))}</h${r}>`}function un(e){return Array.isArray(e)?e.flatMap(e=>{if(!e||typeof e!=`object`)return[];let t=e;return[{key:s(t.key),value:s(t.value)}]}):e&&typeof e==`object`?Object.entries(e).map(([e,t])=>({key:e,value:s(t)})):[]}var dn=`
|
|
1467
2057
|
.bk-kv {
|
|
1468
2058
|
display: grid;
|
|
1469
2059
|
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
|
@@ -1495,7 +2085,7 @@
|
|
|
1495
2085
|
font-size: var(--dt-font-size-sm);
|
|
1496
2086
|
line-height: 1.5;
|
|
1497
2087
|
}
|
|
1498
|
-
`;function
|
|
2088
|
+
`;function fn(e,t){return`<dl class="bk-kv">${un(e.value).map(e=>`<div class="bk-kv-entry"><dt class="bk-kv-key">${l(e.key)}</dt><dd class="bk-kv-value">${l(e.value)}</dd></div>`).join(``)}</dl>`}var pn=164,mn=84,hn=44,gn=32,_n=28;function vn(e){let t=c(e);if(t&&typeof t==`object`){let e=t;return{title:typeof e.title==`string`?e.title:void 0,steps:Array.isArray(e.steps)?e.steps:[],edges:Array.isArray(e.edges)?e.edges:[]}}return{steps:[],edges:[]}}function yn(e){switch(e){case`completed`:return`success`;case`error`:return`danger`;case`pending`:return`slate`;default:return`accent`}}function bn(e,t){let n=e.trim().split(/\s+/).filter(Boolean);if(n.length===0)return[``];let r=[],i=``;for(let e of n){let n=i?`${i} ${e}`:e;if(n.length<=t||i.length===0){i=n;continue}if(r.push(i),i=e,r.length===1)break}return i&&r.push(i),r.length>2?r.slice(0,2):(r.length===2&&n.join(` `).length>r[0].length+r[1].length&&(r[1]=`${r[1].slice(0,Math.max(0,t-1))}…`),r)}function xn(e){return e.type===`decision`?{width:112,height:112}:{width:pn,height:mn}}function Sn(e){let t=gn;return e.map(e=>{let{width:n,height:r}=xn(e),i={step:e,x:t,y:_n,width:n,height:r,centerX:t+n/2,centerY:_n+r/2};return t+=n+hn,i})}function Cn(e){let t=bn(e.step.label,e.step.type===`decision`?12:16),n=e.step.description?bn(e.step.description,e.step.type===`decision`?12:18).slice(0,1):[],r=e.centerY-(t.length+n.length-1)*18/2,a=[...t.map((t,n)=>`<text class="bk-lifecycle-flow-label" x="${e.centerX}" y="${r+n*18}">${i(t)}</text>`),...n.map((n,a)=>`<text class="bk-lifecycle-flow-description" x="${e.centerX}" y="${r+(t.length+a)*18}">${i(n)}</text>`)].join(``),s=`<rect class="bk-lifecycle-flow-shape" x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="18" ry="18" />`;e.step.type===`start`||e.step.type===`end`?s=`<rect class="bk-lifecycle-flow-shape" x="${e.x}" y="${e.y}" width="${e.width}" height="${e.height}" rx="40" ry="40" />`:e.step.type===`decision`&&(s=`<polygon class="bk-lifecycle-flow-shape" points="${`${e.centerX},${e.y}`} ${`${e.x+e.width},${e.centerY}`} ${`${e.centerX},${e.y+e.height}`} ${`${e.x},${e.centerY}`}" />`);let c=e.step.type===`parallel`?`<g class="bk-lifecycle-flow-parallel-mark"><line x1="${e.x+18}" y1="${e.y+18}" x2="${e.x+18}" y2="${e.y+e.height-18}" /><line x1="${e.x+e.width-18}" y1="${e.y+18}" x2="${e.x+e.width-18}" y2="${e.y+e.height-18}" /></g>`:``;return`<g class="bk-lifecycle-flow-node bk-lifecycle-flow-node--${e.step.type??`step`} bk-lifecycle-flow-node--${yn(e.step.status)}" id="${o(e.step.id)}">${s}${c}${a}</g>`}function wn(e,t){let n=t.get(e.from),r=t.get(e.to);if(!n||!r)return``;let a=n.x+n.width,o=n.centerY,s=r.x,c=r.centerY,l=Math.round((a+s)/2);return`${`<path class="bk-lifecycle-flow-edge" d="M ${a} ${o} C ${l} ${o} ${l} ${c} ${s} ${c}" marker-end="url(#bk-lifecycle-flow-arrow)" />`}${e.label?`<text class="bk-lifecycle-flow-edge-label" x="${l}" y="${Math.min(o,c)-12}">${i(e.label)}</text>`:``}`}function Tn(e,t){return Array.isArray(t)&&t.length>0?t:e.slice(1).map((t,n)=>({from:e[n].id,to:t.id}))}var En=`
|
|
1499
2089
|
.bk-lifecycle-flow {
|
|
1500
2090
|
display: grid;
|
|
1501
2091
|
gap: var(--dt-space-3);
|
|
@@ -1589,7 +2179,7 @@
|
|
|
1589
2179
|
.bk-lifecycle-flow-node--slate {
|
|
1590
2180
|
color: var(--dt-text-secondary);
|
|
1591
2181
|
}
|
|
1592
|
-
`;function
|
|
2182
|
+
`;function Dn(e,t){let n=vn(e.value),r=Array.isArray(n.steps)?n.steps.filter(e=>e?.id):[];if(r.length===0)return`<div class="bk-lifecycle-flow"><p class="bk-docs-hub-empty">No lifecycle steps available.</p></div>`;let a=Sn(r),o=new Map(a.map(e=>[e.step.id,e])),s=Tn(r,n.edges),c=Math.max(320,(a.at(-1)?.x??0)+(a.at(-1)?.width??0)+gn);return`<figure class="bk-lifecycle-flow">${n.title?`<figcaption class="bk-lifecycle-flow-title">${i(n.title)}</figcaption>`:``}<div class="bk-lifecycle-flow-frame"><svg class="bk-lifecycle-flow-svg" viewBox="0 0 ${c} 172" role="img" aria-label="${i(n.title??`Lifecycle flow`)}"><defs><marker id="bk-lifecycle-flow-arrow" markerWidth="10" markerHeight="10" refX="9" refY="5" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" fill="var(--dt-border-default)" /></marker></defs><g class="bk-lifecycle-flow-edges">${s.map(e=>wn(e,o)).join(``)}</g><g class="bk-lifecycle-flow-nodes">${a.map(e=>Cn(e)).join(``)}</g></svg></div></figure>`}var On=`
|
|
1593
2183
|
.bk-list {
|
|
1594
2184
|
display: grid;
|
|
1595
2185
|
gap: var(--dt-space-2);
|
|
@@ -1618,16 +2208,16 @@
|
|
|
1618
2208
|
box-shadow: 0 0 0 3px var(--dt-accent-subtle);
|
|
1619
2209
|
transform: translateY(-50%);
|
|
1620
2210
|
}
|
|
1621
|
-
`;function
|
|
1622
|
-
${
|
|
2211
|
+
`;function kn(e,t){return`<ul class="bk-list">${(Array.isArray(e.value)?e.value:[]).map(e=>`<li class="bk-list-item">${l(String(e??``))}</li>`).join(``)}</ul>`}var An=`
|
|
2212
|
+
${cn}
|
|
1623
2213
|
.bk-markdown {
|
|
1624
2214
|
color: var(--dt-text-primary);
|
|
1625
2215
|
font-size: var(--dt-font-size-base);
|
|
1626
2216
|
line-height: 1.7;
|
|
1627
2217
|
}
|
|
1628
|
-
`,
|
|
1629
|
-
`))}</code></pre>`),o=!1,s=[],c=``}continue}if(o){s.push(e);continue}if(!t){l();continue}let n=t.match(
|
|
1630
|
-
`))}</code></pre>`)}return`<div class="bk-markdown">${r.join(``)}</div>`}var
|
|
2218
|
+
`,jn=/^(#{1,6})\s+(.+)$/,Mn=/^(?:(?:-\s*){3,}|(?:\*\s*){3,}|(?:_\s*){3,})$/;function Nn(e){return e.length?`<p>${e.map(e=>l(e)).join(`<br>`)}</p>`:``}function Pn(e,t){let n=String(e.value??``);if(n.trimStart().startsWith(`<`))return`<div class="bk-markdown">${n}</div>`;let r=[],a=[],o=!1,s=[],c=``,l=()=>{let e=Nn(a);e&&(r.push(e),a.length=0)};for(let e of n.split(/\r?\n/)){let t=e.trim();if(t.startsWith("```")){if(!o)l(),o=!0,c=t.slice(3).trim(),s=[];else{let e=c?` class="${i(c)}"`:``,t=s.join(`
|
|
2219
|
+
`),n=(c?tt(t,c):``)||i(t);r.push(`<pre class="bk-code"><code${e}>${n}</code></pre>`),o=!1,s=[],c=``}continue}if(o){s.push(e);continue}if(!t){l();continue}let n=t.match(jn);if(n){l();let[,e,t]=n,a=e.length;r.push(`<h${a} class="bk-heading bk-heading--${a}">${i(t)}</h${a}>`);continue}if(Mn.test(t)){l(),r.push(`<hr>`);continue}a.push(e)}if(l(),o&&s.length>0){let e=c?` class="${i(c)}"`:``,t=s.join(`
|
|
2220
|
+
`),n=(c?tt(t,c):``)||i(t);r.push(`<pre class="bk-code"><code${e}>${n}</code></pre>`)}return`<div class="bk-markdown">${r.join(``)}</div>`}var Fn=`
|
|
1631
2221
|
.bk-mermaid {
|
|
1632
2222
|
margin: 0;
|
|
1633
2223
|
padding: var(--dt-space-4);
|
|
@@ -1656,7 +2246,20 @@ ${zt}
|
|
|
1656
2246
|
max-width: 100%;
|
|
1657
2247
|
height: auto;
|
|
1658
2248
|
}
|
|
1659
|
-
|
|
2249
|
+
|
|
2250
|
+
@media (max-width: 480px) {
|
|
2251
|
+
.bk-mermaid {
|
|
2252
|
+
padding: var(--dt-space-3);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
@media (max-width: 320px) {
|
|
2257
|
+
.bk-mermaid {
|
|
2258
|
+
padding: var(--dt-space-2);
|
|
2259
|
+
font-size: 0.75rem;
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
`;function In(e,t){return`<pre class="bk-mermaid mermaid">${i(String(e.value??``))}</pre>`}function Ln(e){if(e==null||e===``)return``;let t=s(e);if(/^[↑↓→]/.test(t))return`<span class="bk-metric-trend">${i(t)}</span>`;let n=Number(String(e).replace(/[^0-9.-]/g,``));return`<span class="bk-metric-trend">${Number.isNaN(n)?``:n>0?`↑ `:n<0?`↓ `:`→ `}${i(t)}</span>`}var Rn=`
|
|
1660
2263
|
.bk-metrics {
|
|
1661
2264
|
display: grid;
|
|
1662
2265
|
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
|
|
@@ -1672,6 +2275,8 @@ ${zt}
|
|
|
1672
2275
|
background: var(--dt-bg-secondary);
|
|
1673
2276
|
box-shadow: var(--dt-shadow-sm);
|
|
1674
2277
|
transition: transform var(--dt-transition-normal), box-shadow var(--dt-transition-normal), border-color var(--dt-transition-normal);
|
|
2278
|
+
animation: aikit-enter-fade 400ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
2279
|
+
animation-delay: calc(var(--i, 0) * 80ms);
|
|
1675
2280
|
}
|
|
1676
2281
|
|
|
1677
2282
|
.bk-metric:hover {
|
|
@@ -1699,14 +2304,45 @@ ${zt}
|
|
|
1699
2304
|
color: var(--dt-text-tertiary);
|
|
1700
2305
|
font-size: var(--dt-font-size-sm);
|
|
1701
2306
|
}
|
|
1702
|
-
|
|
2307
|
+
|
|
2308
|
+
/* ── Compact metrics on mobile ── */
|
|
2309
|
+
@media (max-width: 480px) {
|
|
2310
|
+
.bk-metrics {
|
|
2311
|
+
gap: var(--dt-space-3);
|
|
2312
|
+
}
|
|
2313
|
+
.bk-metric {
|
|
2314
|
+
padding: var(--dt-space-4);
|
|
2315
|
+
}
|
|
2316
|
+
.bk-metric-value {
|
|
2317
|
+
font-size: var(--dt-font-size-2xl);
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
@media (max-width: 320px) {
|
|
2322
|
+
.bk-metric {
|
|
2323
|
+
padding: var(--dt-space-3);
|
|
2324
|
+
}
|
|
2325
|
+
.bk-metric-value {
|
|
2326
|
+
font-size: var(--dt-font-size-xl);
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
`;function zn(e,t){return`<div class="bk-metrics">${p(e).map((e,t)=>`<article class="bk-metric" data-tone="${f(e.status)}" style="--i: ${t}"><div class="bk-metric-label">${i(e.label)}</div><div class="bk-metric-value">${i(s(e.value))}</div>${Ln(e.trend)}</article>`).join(``)}</div>`}var Bn=`
|
|
1703
2330
|
.bk-paragraph {
|
|
1704
2331
|
margin: 0;
|
|
1705
2332
|
color: var(--dt-text-primary);
|
|
1706
2333
|
font-size: var(--dt-font-size-base);
|
|
1707
2334
|
line-height: 1.7;
|
|
1708
2335
|
}
|
|
1709
|
-
`;function
|
|
2336
|
+
`;function Vn(e,t){return`<p class="bk-paragraph">${i(String(e.value??e.text??``))}</p>`}function Hn(e){let t=c(e);if(Array.isArray(t))return t;if(t&&typeof t==`object`){if(Array.isArray(t.items))return t.items;if(`value`in t)return[t]}return[]}var Un=`
|
|
2337
|
+
@keyframes glow-pulse {
|
|
2338
|
+
0%, 100% {
|
|
2339
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 12px var(--bar-glow);
|
|
2340
|
+
}
|
|
2341
|
+
50% {
|
|
2342
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 22px var(--bar-glow);
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
|
|
1710
2346
|
.bk-progress {
|
|
1711
2347
|
display: grid;
|
|
1712
2348
|
gap: var(--dt-space-4);
|
|
@@ -1740,10 +2376,18 @@ ${zt}
|
|
|
1740
2376
|
min-width: 0;
|
|
1741
2377
|
border-radius: inherit;
|
|
1742
2378
|
background: var(--dt-accent-emphasis);
|
|
1743
|
-
box-shadow: inset 0 1px 0 rgba(255,
|
|
1744
|
-
|
|
2379
|
+
box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 12px var(--bar-glow, transparent);
|
|
2380
|
+
animation:
|
|
2381
|
+
aikit-progress-fill 800ms cubic-bezier(0.16,1,0.3,1) forwards,
|
|
2382
|
+
glow-pulse 2s ease-in-out infinite;
|
|
2383
|
+
animation-delay: calc(var(--i, 0) * 100ms), calc(var(--i, 0) * 100ms + 800ms);
|
|
1745
2384
|
}
|
|
1746
|
-
|
|
2385
|
+
|
|
2386
|
+
/* Cap at 10 items to avoid excessive delays */
|
|
2387
|
+
.bk-progress-item:nth-child(n+11) .bk-progress-bar {
|
|
2388
|
+
animation-delay: 0ms, 800ms;
|
|
2389
|
+
}
|
|
2390
|
+
`;function Wn(e,t){return`<div class="bk-progress">${Hn(e.value).map((e,t)=>{let n=Math.max(1,Number(e.max)||100),r=Math.max(0,Number(e.value)||0),a=Math.round(Math.min(r/n*100,100)),o=f(e.color);return`<div class="bk-progress-item" style="--i: ${t}"><div class="bk-progress-meta"><span>${i(e.label)}</span><span>${a}%</span></div><div class="bk-progress-track"><span class="bk-progress-bar" role="progressbar" aria-valuenow="${r}" aria-valuemin="0" aria-valuemax="${n}" aria-label="${i(e.label)}" style="width:${a}%;background:var(--dt-${o}-emphasis);--bar-glow:var(--dt-glow-${o});"></span></div></div>`}).join(``)}</div>`}function Gn(e){if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)}catch{return String(e??``)}}var Kn=`
|
|
1747
2391
|
.bk-prompt {
|
|
1748
2392
|
margin: 0;
|
|
1749
2393
|
padding: var(--dt-space-4);
|
|
@@ -1757,13 +2401,13 @@ ${zt}
|
|
|
1757
2401
|
line-height: 1.6;
|
|
1758
2402
|
white-space: pre-wrap;
|
|
1759
2403
|
}
|
|
1760
|
-
`;function
|
|
2404
|
+
`;function qn(e,t){return`<pre class="bk-prompt">${i(Gn(e.value))}</pre>`}var Jn=`
|
|
1761
2405
|
.bk-separator {
|
|
1762
2406
|
margin: var(--dt-space-6) 0;
|
|
1763
2407
|
border: 0;
|
|
1764
2408
|
border-top: 1px solid var(--dt-border-default);
|
|
1765
2409
|
}
|
|
1766
|
-
`;function
|
|
2410
|
+
`;function Yn(e,t){return`<hr class="bk-separator">`}function Xn(e){let t=c(e);return Array.isArray(t)?t:t&&typeof t==`object`&&Array.isArray(t.items)?t.items:[]}var Zn=`
|
|
1767
2411
|
.bk-status-board {
|
|
1768
2412
|
display: grid;
|
|
1769
2413
|
gap: var(--dt-space-4);
|
|
@@ -1821,13 +2465,23 @@ ${zt}
|
|
|
1821
2465
|
.bk-status-description {
|
|
1822
2466
|
color: var(--dt-text-secondary);
|
|
1823
2467
|
}
|
|
1824
|
-
`;function
|
|
2468
|
+
`;function Qn(e,t){return`<div class="bk-status-board">${Xn(e.value).map(e=>{let t=e.items.map(e=>{let t=f(e.status),n=e.description?`<div class="bk-status-description">${i(e.description)}</div>`:``;return`<div class="bk-status-item"><span class="bk-status-pill" style="background:var(--dt-${t}-subtle);color:var(--dt-${t}-fg);">${i(e.status??`pending`)}</span><div class="bk-status-copy"><div class="bk-status-label">${i(e.label??e.name??``)}</div>${n}</div></div>`}).join(``);return`<section class="bk-status-category"><div class="bk-status-category-title">${i(e.category)}</div><div class="bk-status-items">${t}</div></section>`}).join(``)}</div>`}function $n(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function er(e){let t=(e??[]).map(e=>{if($n(e)){let t=typeof e.key==`string`?e.key:String(e.label??``);return{key:t,label:typeof e.label==`string`?e.label:t}}let t=String(e);return{key:t,label:t}});return{headers:t.map(e=>e.label),keys:t.map(e=>e.key)}}function tr(e){if(Array.isArray(e.columns)){let{headers:t,keys:n}=er(e.columns),r=Array.isArray(e.rows)?e.rows:[];return r.length>0&&Array.isArray(r[0])?{headers:t,keys:n,rows:r.map(e=>Object.fromEntries(n.map((t,n)=>[t,e[n]??``])))}:r.length>0&&typeof r[0]==`object`&&r[0]!==null?{headers:t,keys:n,rows:r}:{headers:t,keys:n,rows:[]}}let t=c(e.value);if(Array.isArray(t)){if(t.length>0&&typeof t[0]==`object`&&t[0]!==null&&!Array.isArray(t[0])){let n=t,r=Array.isArray(e.headers)?e.headers.map(String):Object.keys(n[0]??{});return{headers:r,keys:r,rows:n}}if(t.length>0&&Array.isArray(t[0])){let[n,...r]=t,i=Array.isArray(e.headers)?e.headers.map(String):n.map(String);return{headers:i,keys:i,rows:r.map(e=>Object.fromEntries(i.map((t,n)=>[t,e[n]])))}}}if(t&&typeof t==`object`){let n=Array.isArray(e.headers)?e.headers.map(String):Array.isArray(t.headers)?t.headers.map(String):[],r=Array.isArray(t.rows)?t.rows:[];if(r.length>0&&Array.isArray(r[0]))return{headers:n,keys:n,rows:r.map(e=>Object.fromEntries(n.map((t,n)=>[t,e[n]])))};if(r.length>0&&typeof r[0]==`object`&&r[0]!==null)return{headers:n,keys:n,rows:r}}if(Array.isArray(e.headers)){let t=e.headers.map(String);return{headers:t,keys:t,rows:[]}}if(Array.isArray(e.columns)){let{headers:t,keys:n}=er(e.columns);return{headers:t,keys:n,rows:[]}}return{headers:[],keys:[],rows:[]}}var nr=`
|
|
2469
|
+
/* ── Scroll fade mask (indicates overflow) ── */
|
|
1825
2470
|
.bk-table-wrap {
|
|
1826
2471
|
overflow-x: auto;
|
|
1827
2472
|
border: 1px solid var(--dt-border-default);
|
|
1828
2473
|
border-radius: var(--dt-radius-lg);
|
|
1829
2474
|
background: var(--dt-bg-secondary);
|
|
1830
2475
|
box-shadow: var(--dt-shadow-sm);
|
|
2476
|
+
/* Fade at right edge when content overflows */
|
|
2477
|
+
mask-image: linear-gradient(to right, black 85%, transparent 98%);
|
|
2478
|
+
-webkit-mask-image: linear-gradient(to right, black 85%, transparent 98%);
|
|
2479
|
+
mask-mode: alpha;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
.bk-table-wrap:not([data-scrollable]) {
|
|
2483
|
+
mask-image: none;
|
|
2484
|
+
-webkit-mask-image: none;
|
|
1831
2485
|
}
|
|
1832
2486
|
|
|
1833
2487
|
.bk-table {
|
|
@@ -1859,8 +2513,30 @@ ${zt}
|
|
|
1859
2513
|
text-transform: uppercase;
|
|
1860
2514
|
font-size: var(--dt-font-size-xs);
|
|
1861
2515
|
color: var(--dt-text-secondary);
|
|
2516
|
+
user-select: none;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
/* ── Sort indicator span ── */
|
|
2520
|
+
.bk-table-sort-icon {
|
|
2521
|
+
display: inline-block;
|
|
2522
|
+
margin-left: var(--dt-space-1);
|
|
2523
|
+
font-size: 0.6rem;
|
|
2524
|
+
opacity: 0.3;
|
|
2525
|
+
vertical-align: middle;
|
|
2526
|
+
transition: opacity var(--dt-transition-fast);
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
th:hover .bk-table-sort-icon {
|
|
2530
|
+
opacity: 0.8;
|
|
1862
2531
|
}
|
|
1863
2532
|
|
|
2533
|
+
th[aria-sort="ascending"] .bk-table-sort-icon,
|
|
2534
|
+
th[aria-sort="descending"] .bk-table-sort-icon {
|
|
2535
|
+
opacity: 1;
|
|
2536
|
+
color: var(--dt-accent-fg);
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
/* ── Row hover + even-row styling ── */
|
|
1864
2540
|
.bk-table tbody tr {
|
|
1865
2541
|
transition: background var(--dt-transition-fast);
|
|
1866
2542
|
}
|
|
@@ -1880,7 +2556,72 @@ ${zt}
|
|
|
1880
2556
|
.bk-table tbody tr:last-child td {
|
|
1881
2557
|
border-bottom: none;
|
|
1882
2558
|
}
|
|
1883
|
-
|
|
2559
|
+
|
|
2560
|
+
/* ── Sticky first column (tablet) ── */
|
|
2561
|
+
@media (max-width: 768px) {
|
|
2562
|
+
.bk-table th:first-child,
|
|
2563
|
+
.bk-table td:first-child {
|
|
2564
|
+
position: sticky;
|
|
2565
|
+
left: 0;
|
|
2566
|
+
z-index: 2;
|
|
2567
|
+
background: inherit;
|
|
2568
|
+
}
|
|
2569
|
+
.bk-table thead th:first-child {
|
|
2570
|
+
z-index: 3;
|
|
2571
|
+
background: var(--dt-bg-tertiary);
|
|
2572
|
+
}
|
|
2573
|
+
.bk-table tbody tr td:first-child {
|
|
2574
|
+
box-shadow: inset -6px 0 6px -6px rgba(0,0,0,0.1);
|
|
2575
|
+
}
|
|
2576
|
+
.bk-table-wrap[data-scrolled-past-first] tbody tr td:first-child {
|
|
2577
|
+
box-shadow: inset -8px 0 8px -8px rgba(0,0,0,0.15);
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
/* ── Compact table on mobile ── */
|
|
2582
|
+
@media (max-width: 480px) {
|
|
2583
|
+
.bk-table {
|
|
2584
|
+
font-size: var(--dt-font-size-xs);
|
|
2585
|
+
}
|
|
2586
|
+
.bk-table th,
|
|
2587
|
+
.bk-table td {
|
|
2588
|
+
padding: var(--dt-space-2) var(--dt-space-3);
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
/* ── Ultra-compact table on 320px ── */
|
|
2593
|
+
@media (max-width: 320px) {
|
|
2594
|
+
.bk-table thead th {
|
|
2595
|
+
white-space: normal;
|
|
2596
|
+
word-break: break-word;
|
|
2597
|
+
}
|
|
2598
|
+
.bk-table th,
|
|
2599
|
+
.bk-table td {
|
|
2600
|
+
padding: var(--dt-space-1) var(--dt-space-2);
|
|
2601
|
+
}
|
|
2602
|
+
.bk-table th {
|
|
2603
|
+
font-size: 0.625rem;
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
/* ── Empty state ── */
|
|
2608
|
+
.bk-table-empty {
|
|
2609
|
+
display: flex;
|
|
2610
|
+
flex-direction: column;
|
|
2611
|
+
align-items: center;
|
|
2612
|
+
justify-content: center;
|
|
2613
|
+
padding: var(--dt-space-10) var(--dt-space-4);
|
|
2614
|
+
color: var(--dt-text-tertiary);
|
|
2615
|
+
font-size: var(--dt-font-size-sm);
|
|
2616
|
+
font-style: italic;
|
|
2617
|
+
gap: var(--dt-space-2);
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
.bk-table-empty-icon {
|
|
2621
|
+
font-size: 1.5rem;
|
|
2622
|
+
opacity: 0.5;
|
|
2623
|
+
}
|
|
2624
|
+
`;function rr(e,t){let{headers:n,keys:r,rows:a}=tr(e);if(n.length===0)return`<div class="bk-table-wrap"><table class="bk-table"><tbody></tbody></table></div>`;let o=t=>{let n=e.sorted===t,r=n&&e.sortDir!==`desc`,a=r?`▲`:n?`▼`:`⇅`;return`<th${n?` aria-sort="${r?`ascending`:`descending`}"`:``}>${i(t)}<span class="bk-table-sort-icon">${a}</span></th>`},c=`<thead><tr>${n.map(e=>o(e)).join(``)}</tr></thead>`,l=a.length>0&&r.length>2?` data-scrollable="true"`:``,u;return u=a.length===0?`<tr><td colspan="${n.length}"><div class="bk-table-empty"><span class="bk-table-empty-icon" aria-hidden="true">📋</span>No data</div></td></tr>`:a.map(e=>`<tr>${r.map(t=>`<td>${i(s(e[t]))}</td>`).join(``)}</tr>`).join(``),`<div class="bk-table-wrap"${l}><table class="bk-table">${c}<tbody>${u}</tbody></table></div>`}function ir(e){let t=c(e);return Array.isArray(t)?t:t&&typeof t==`object`&&Array.isArray(t.items)?t.items:[]}var ar=`
|
|
1884
2625
|
.bk-tags {
|
|
1885
2626
|
display: flex;
|
|
1886
2627
|
flex-wrap: wrap;
|
|
@@ -1898,13 +2639,13 @@ ${zt}
|
|
|
1898
2639
|
font-weight: 600;
|
|
1899
2640
|
letter-spacing: 0.02em;
|
|
1900
2641
|
}
|
|
1901
|
-
`;function
|
|
2642
|
+
`;function or(e,t){return`<div class="bk-tags">${ir(e.value).map(e=>{let t=typeof e==`string`?e:String(e.text??e.label??``),n=f(typeof e==`string`?void 0:e.status??e.tone??e.color);return`<span class="bk-tag" style="background:var(--dt-${n}-subtle);color:var(--dt-${n}-fg);">${i(t)}</span>`}).join(``)}</div>`}var sr=`
|
|
1902
2643
|
.bk-text {
|
|
1903
2644
|
color: var(--dt-text-primary);
|
|
1904
2645
|
font-size: var(--dt-font-size-base);
|
|
1905
2646
|
line-height: 1.7;
|
|
1906
2647
|
}
|
|
1907
|
-
`;function
|
|
2648
|
+
`;function cr(e,t){return`<div class="bk-text">${l(String(e.value??``)).replace(/\n/g,`<br>`)}</div>`}var lr=`
|
|
1908
2649
|
.bk-timeline {
|
|
1909
2650
|
display: grid;
|
|
1910
2651
|
gap: var(--dt-space-4);
|
|
@@ -1954,7 +2695,27 @@ ${zt}
|
|
|
1954
2695
|
font-size: var(--dt-font-size-xs);
|
|
1955
2696
|
line-height: 1.5;
|
|
1956
2697
|
}
|
|
1957
|
-
|
|
2698
|
+
|
|
2699
|
+
/* ── Compact timeline on mobile ── */
|
|
2700
|
+
@media (max-width: 480px) {
|
|
2701
|
+
.bk-timeline-item {
|
|
2702
|
+
padding-left: calc(var(--dt-space-5) + var(--dt-space-1));
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
@media (max-width: 320px) {
|
|
2707
|
+
.bk-timeline {
|
|
2708
|
+
gap: var(--dt-space-3);
|
|
2709
|
+
}
|
|
2710
|
+
.bk-timeline-item {
|
|
2711
|
+
padding-left: var(--dt-space-5);
|
|
2712
|
+
}
|
|
2713
|
+
.bk-timeline-dot {
|
|
2714
|
+
width: 0.5rem;
|
|
2715
|
+
height: 0.5rem;
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
`;function ur(e,t){return`<div class="bk-timeline">${p(e).map(e=>{let t=f(e.status),n=e.description?`<div class="bk-timeline-description">${i(e.description)}</div>`:``,r=e.timestamp?`<div class="bk-timeline-timestamp">${i(e.timestamp)}</div>`:``;return`<article class="bk-timeline-item" data-tone="${t}"><span class="bk-timeline-dot" style="background:${`var(--dt-${t}-emphasis)`};box-shadow:0 0 0 6px var(--dt-glow-${t});"></span><div class="bk-timeline-title">${i(e.title)}</div>${n}${r}</article>`}).join(``)}</div>`}function dr(e,t){if(Array.isArray(e)){let n=e.map(e=>dr(e)).join(``);return t?`<details class="bk-tree-node" open><summary>${i(t)}</summary><div class="bk-tree-children">${n}</div></details>`:`<div class="bk-tree-children">${n}</div>`}if(e&&typeof e==`object`){let n=e,r=typeof n.name==`string`?n.name:typeof n.label==`string`?n.label:typeof n.title==`string`?n.title:void 0;if(r!==void 0)return dr(n.children??[],r);let a=Object.entries(n).map(([e,t])=>dr(t,e)).join(``);return t?`<details class="bk-tree-node" open><summary>${i(t)}</summary><div class="bk-tree-children">${a}</div></details>`:`<div class="bk-tree-children">${a}</div>`}let n=i(s(e));return t?`<div class="bk-tree-leaf"><span class="bk-tree-key">${i(t)}</span><span class="bk-tree-value">${n}</span></div>`:`<div class="bk-tree-leaf">${n}</div>`}var fr=`
|
|
1958
2719
|
.bk-tree {
|
|
1959
2720
|
display: grid;
|
|
1960
2721
|
gap: var(--dt-space-2);
|
|
@@ -1986,7 +2747,8 @@ ${zt}
|
|
|
1986
2747
|
.bk-tree-key {
|
|
1987
2748
|
color: var(--dt-text-primary);
|
|
1988
2749
|
}
|
|
1989
|
-
`;function
|
|
2750
|
+
`;function pr(e,t){return`<div class="bk-tree">${dr(c(e.value))}</div>`}var mr={actions:te,cards:ie,chart:pe,checklist:Ke,code:nt,"architecture-diagram":wt,"workflow-diagram":wt,"sequence-diagram":wt,"dataflow-diagram":wt,"lifecycle-diagram":wt,diff:It,comparison:ct,"component-detail":gt,"data-table-schema":St,"docs-browser":Ht,"docs-hub":qt,finding:Xt,"flame-graph":nn,graph:on,heading:cn,kv:dn,"lifecycle-flow":En,list:On,markdown:An,mermaid:Fn,metrics:Rn,paragraph:Bn,progress:Un,prompt:Kn,separator:Jn,"status-board":Zn,table:nr,tags:ar,text:sr,timeline:lr,tree:fr},hr=`
|
|
2751
|
+
${re}
|
|
1990
2752
|
.bk-section {
|
|
1991
2753
|
display: grid;
|
|
1992
2754
|
gap: var(--dt-space-3);
|
|
@@ -2004,6 +2766,27 @@ ${zt}
|
|
|
2004
2766
|
line-height: 1.3;
|
|
2005
2767
|
}
|
|
2006
2768
|
|
|
2769
|
+
/* ── Responsive section titles ── */
|
|
2770
|
+
@media (max-width: 480px) {
|
|
2771
|
+
.bk-section-title {
|
|
2772
|
+
font-size: var(--dt-font-size-lg);
|
|
2773
|
+
}
|
|
2774
|
+
.bk-section {
|
|
2775
|
+
gap: var(--dt-space-2);
|
|
2776
|
+
margin: 0 0 var(--dt-space-4);
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
@media (max-width: 320px) {
|
|
2781
|
+
.bk-section-title {
|
|
2782
|
+
font-size: var(--dt-font-size-base);
|
|
2783
|
+
}
|
|
2784
|
+
.bk-section {
|
|
2785
|
+
gap: var(--dt-space-1);
|
|
2786
|
+
margin: 0 0 var(--dt-space-3);
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2007
2790
|
.bk-text,
|
|
2008
2791
|
.bk-markdown,
|
|
2009
2792
|
.bk-paragraph,
|
|
@@ -2110,8 +2893,42 @@ blockquote {
|
|
|
2110
2893
|
border-radius: 0 var(--dt-radius-sm) var(--dt-radius-sm) 0;
|
|
2111
2894
|
color: var(--dt-text-secondary);
|
|
2112
2895
|
}
|
|
2113
|
-
|
|
2114
|
-
|
|
2896
|
+
`,gr=`
|
|
2897
|
+
@media print {
|
|
2898
|
+
.aikit-header,.aikit-footer,.aikit-toolbox,.aikit-toolbox-toggle,.aikit-toolbox-menu,
|
|
2899
|
+
.aikit-theme-toggle,.aikit-copy-status,.aikit-glow-primary,.aikit-glow-secondary {
|
|
2900
|
+
display: none !important;
|
|
2901
|
+
}
|
|
2902
|
+
html,body { background: #fff !important; color: #000 !important; }
|
|
2903
|
+
main,.bk-section,.bk-section-title,.bk-text,.bk-markdown,.bk-paragraph,.bk-fallback,
|
|
2904
|
+
.bk-prompt,.bk-heading,.bk-kv,.bk-list,.bk-table-wrap,.bk-table,.bk-data-table-schema,
|
|
2905
|
+
.bk-docs-browser,.bk-docs-hub,.bk-actions,.bk-comparison,.bk-component-detail,
|
|
2906
|
+
.bk-status-board,.bk-progress,.bk-lifecycle-flow,.bk-timeline,.bk-tree,.bk-flame,
|
|
2907
|
+
.bk-tags,.bk-cards,.bk-metrics,.bk-chart,.bk-code,.bk-mermaid,.bk-graph,.bk-checklist,
|
|
2908
|
+
.bk-finding,.aikit-glass,.aikit-glass-solid {
|
|
2909
|
+
background: #fff !important; color: #000 !important; border-color: #ccc !important;
|
|
2910
|
+
}
|
|
2911
|
+
.bk-table thead th { background: #f5f5f5 !important; color: #000 !important; border-bottom: 2px solid #ccc !important; }
|
|
2912
|
+
.bk-table td { border-bottom: 1px solid #ddd !important; }
|
|
2913
|
+
.bk-code { page-break-inside: avoid; break-inside: avoid; }
|
|
2914
|
+
.bk-code code { white-space: pre-wrap !important; word-break: break-all !important; }
|
|
2915
|
+
table { page-break-inside: auto; }
|
|
2916
|
+
thead { display: table-header-group; }
|
|
2917
|
+
tbody tr { page-break-inside: avoid; }
|
|
2918
|
+
.bk-mermaid { overflow: visible !important; page-break-inside: avoid; }
|
|
2919
|
+
.bk-mermaid svg { max-width: 100% !important; height: auto !important; overflow: visible !important; }
|
|
2920
|
+
*,*::before,*::after { box-shadow: none !important; text-shadow: none !important; animation: none !important; animation-duration: 0s !important; transition: none !important; }
|
|
2921
|
+
a { color: #000 !important; text-decoration: underline; }
|
|
2922
|
+
blockquote { border-left-color: #000 !important; background: #fafafa !important; }
|
|
2923
|
+
hr { border: none !important; border-top: 1px solid #ccc !important; background: none !important; }
|
|
2924
|
+
a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; font-weight: normal; color: #555 !important; text-decoration: none; }
|
|
2925
|
+
a[href^="#"]::after, a[href^="javascript:"]::after { content: none !important; }
|
|
2926
|
+
html, body { page-break-before: auto; page-break-after: auto; }
|
|
2927
|
+
.bk-text,.bk-markdown,.bk-paragraph,.bk-finding { widows: 3; orphans: 3; }
|
|
2928
|
+
::selection { background: #ccc !important; color: #000 !important; }
|
|
2929
|
+
}
|
|
2930
|
+
`;function _r(e){let t=[hr,gr],n=new Set;for(let r of e)!n.has(r)&&mr[r]&&(n.add(r),t.push(mr[r]));return t.join(`
|
|
2931
|
+
`)}var h={header:`aikit-header`,brand:`aikit-header-brand`,title:`aikit-header-title`,titleText:`aikit-header-title-text`,subtitle:`aikit-header-subtitle`,actions:`aikit-header-actions`,themeToggle:`aikit-theme-toggle`,themeToggleIcon:`aikit-theme-toggle-icon`,themeToggleIconSun:`aikit-theme-toggle-icon--sun`,themeToggleIconMoon:`aikit-theme-toggle-icon--moon`,toolbox:`aikit-toolbox`,toolboxToggle:`aikit-toolbox-toggle`,toolboxMenu:`aikit-toolbox-menu`,toolboxItem:`aikit-toolbox-item`,footer:`aikit-footer`,footerMeta:`aikit-footer-meta`,footerText:`aikit-footer-text`,footerBrand:`aikit-footer-brand`,footerTimestamp:`aikit-footer-timestamp`,footerSlot:`aikit-footer-slot`,footerBadge:`aikit-footer-badge`},vr=`
|
|
2115
2932
|
.aikit-header,
|
|
2116
2933
|
.aikit-toolbox-menu,
|
|
2117
2934
|
.aikit-copy-status,
|
|
@@ -2487,13 +3304,13 @@ html[data-theme='dark'] .aikit-theme-toggle-icon--moon {
|
|
|
2487
3304
|
box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
|
|
2488
3305
|
}
|
|
2489
3306
|
}
|
|
2490
|
-
`;function
|
|
3307
|
+
`;function yr(e){let t={COMMENT:[],DELETION:[],GLOBAL_COMMENT:[]};for(let n of e)t[n.type in t?n.type:`COMMENT`].push(n);return t}function br(e){let t=o(e.id),n=[];return e.author&&n.push(`<span class="bk-annotation-author">${i(e.author)}</span>`),e.createdAt&&n.push(`<time class="bk-annotation-time">${i(e.createdAt)}</time>`),`<li class="bk-annotation-item" data-block-id="${t}" data-annotation-type="${e.type}">
|
|
2491
3308
|
<p class="bk-annotation-body">${i(e.body)}</p>
|
|
2492
3309
|
${n.length>0?`<div class="bk-annotation-meta">${n.join(``)}</div>`:``}
|
|
2493
|
-
</li>`}function
|
|
2494
|
-
<h4 class="bk-annotation-group-title">${i(
|
|
2495
|
-
<ol class="bk-annotation-list">${t.map(
|
|
2496
|
-
</div>`).join(``)||`<p class="bk-text-secondary">No annotations</p>`}</div>`}function
|
|
3310
|
+
</li>`}function xr(e){switch(e){case`COMMENT`:return`Comments`;case`DELETION`:return`Deletions`;case`GLOBAL_COMMENT`:return`General Notes`;default:return e}}function Sr(e,t){let n=yr(Array.isArray(e.value)?e.value:[]);return`<div class="bk-annotations">${Object.entries(n).filter(([,e])=>e.length>0).map(([e,t])=>`<div class="bk-annotation-group">
|
|
3311
|
+
<h4 class="bk-annotation-group-title">${i(xr(e))}</h4>
|
|
3312
|
+
<ol class="bk-annotation-list">${t.map(br).join(``)}</ol>
|
|
3313
|
+
</div>`).join(``)||`<p class="bk-text-secondary">No annotations</p>`}</div>`}function Cr(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.prompt==`string`&&Array.isArray(t.options)}function wr(e,t){let n=e.blockId?o(e.blockId):void 0,r=Cr(e.value)?e.value:{prompt:``,options:[]},a=r.prompt?`<p class="bk-approval-prompt">${i(r.prompt)}</p>`:``,s=r.options.map(e=>`<label class="bk-approval-option" data-option-id="${o(e.id)}">
|
|
2497
3314
|
<input type="radio" name="approval" value="${o(e.id)}" role="radio" />
|
|
2498
3315
|
<span class="bk-approval-option-label">${i(e.label)}</span>
|
|
2499
3316
|
${e.description?`<span class="bk-approval-option-desc">${i(e.description)}</span>`:``}
|
|
@@ -2504,12 +3321,12 @@ ${e.description?`<span class="bk-approval-option-desc">${i(e.description)}</span
|
|
|
2504
3321
|
${a}
|
|
2505
3322
|
<fieldset class="bk-approval-options">${s}</fieldset>
|
|
2506
3323
|
${c}
|
|
2507
|
-
</div>`}var
|
|
2508
|
-
`)}function
|
|
2509
|
-
`);return[{type:`heading`,value:e.path},{type:`paragraph`,value:`${e.status} | +${e.additions} / -${e.deletions}`},{type:`code`,language:`diff`,value:t}]}var Tr={id:`diff-view@1`,label:`Diff View`,description:`Static diff summary rendered as per-file diff code blocks.`,inputSchema:{type:`object`,properties:{files:{type:`array`,items:{type:`object`,required:[`path`,`status`,`additions`,`deletions`,`hunks`],properties:{path:{type:`string`},status:{type:`string`},additions:{type:`number`},deletions:{type:`number`},hunks:{type:`array`,items:{type:`object`,required:[`header`,`changes`],properties:{header:{type:`string`},changes:{type:`array`,items:{type:`object`,required:[`type`,`content`],properties:{type:{type:`string`},content:{type:`string`}},additionalProperties:!1}}},additionalProperties:!1}}},additionalProperties:!1}}},required:[`files`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>Sr(e).flatMap(wr),hydration:[],supportedTransports:vr},Er=[`mcp-app`,`browser`,`export`];function Dr(e){return typeof e==`object`&&!!e}function Or(e){return Dr(e)&&typeof e.type==`string`}function kr(e){return Array.isArray(e)&&e.every(Or)}function Ar(e){if(!Dr(e))return{sections:[]};let t=Array.isArray(e.sections)?e.sections.flatMap(e=>{if(!Dr(e)||typeof e.heading!=`string`)return[];let t=typeof e.content==`string`||kr(e.content)?e.content:``;return[{heading:e.heading,content:t}]}):[];return{title:typeof e.title==`string`?e.title:void 0,sections:t}}function jr(e){let t=[{type:`heading`,value:e.heading}];return typeof e.content==`string`?(t.push({type:`paragraph`,value:e.content}),t):(t.push(...e.content),t)}var Mr={id:`document@1`,label:`Document`,description:`Structured document with optional title and section content blocks.`,inputSchema:{type:`object`,properties:{title:{type:`string`},sections:{type:`array`,items:{type:`object`,additionalProperties:!1,required:[`heading`,`content`],properties:{heading:{type:`string`},content:{oneOf:[{type:`string`},{type:`array`,items:{type:`object`}}]}}}}},required:[`sections`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=Ar(e),n=[];t.title&&n.push({type:`heading`,value:t.title});for(let e of t.sections)n.push(...jr(e));return n},hydration:[],supportedTransports:Er},Nr=[`mcp-app`,`browser`,`export`];function Pr(e){return typeof e==`object`&&!!e}function Fr(e){return Pr(e)?{code:typeof e.code==`string`?e.code:`ERROR`,message:typeof e.message==`string`?e.message:`Unknown error`,details:typeof e.details==`string`?e.details:void 0,stack:typeof e.stack==`string`?e.stack:void 0}:{code:`ERROR`,message:`Unknown error`}}var Ir={id:`error@1`,label:`Error`,description:`Static error view with message and optional stack trace.`,inputSchema:{type:`object`,properties:{code:{type:`string`},message:{type:`string`},details:{type:`string`},stack:{type:`string`}},required:[`code`,`message`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=Fr(e),n=[{type:`heading`,value:`Error`},{type:`code`,title:t.code,language:`text`,value:t.details?`${t.message}\n\n${t.details}`:t.message}];return t.stack&&n.push({type:`code`,title:`Stack Trace`,language:`text`,value:t.stack}),n},hydration:[],supportedTransports:Nr};function Lr(e){return typeof e==`object`&&!!e}function Rr(e){return Array.isArray(e)?e.flatMap(e=>!Lr(e)||typeof e.name!=`string`||typeof e.label!=`string`?[]:[{name:e.name,label:e.label,type:typeof e.type==`string`?e.type:void 0,required:typeof e.required==`boolean`?e.required:void 0,placeholder:typeof e.placeholder==`string`?e.placeholder:void 0,default:typeof e.default==`string`?e.default:void 0,options:Array.isArray(e.options)?e.options.filter(e=>typeof e==`string`||Lr(e)&&typeof e.label==`string`&&typeof e.value==`string`):void 0,value:typeof e.value==`string`||typeof e.value==`boolean`?e.value:void 0}]):[]}var zr={id:`form@1`,label:`Form`,description:`Browser-only form template rendered as a heading and table of field metadata.`,inputSchema:{type:`object`,properties:{title:{type:`string`},fields:{type:`array`,items:{type:`object`,required:[`name`,`label`],properties:{name:{type:`string`},label:{type:`string`},type:{type:`string`},required:{type:`boolean`},placeholder:{type:`string`},default:{type:`string`},options:{type:`array`,items:{anyOf:[{type:`string`},{type:`object`,required:[`label`,`value`],properties:{label:{type:`string`},value:{type:`string`}},additionalProperties:!1}]}},value:{type:[`string`,`boolean`]}},additionalProperties:!1}}},required:[`fields`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t={title:Lr(e)&&typeof e.title==`string`?e.title:`Form`,fields:Lr(e)?Rr(e.fields):[]};return[{type:`heading`,value:t.title},{type:`table`,value:{headers:[`Label`,`Name`,`Type`,`Required`,`Default/Placeholder`],rows:t.fields.map(e=>[e.label||e.name,e.name,e.type||`text`,e.required?`Yes`:`No`,e.placeholder||e.default||``])}}]},hydration:[`form`],supportedTransports:[`browser`]},Br=[`mcp-app`,`browser`];function Vr(e){return typeof e==`object`&&!!e}function Hr(e){if(!Array.isArray(e))return;let t=e.flatMap(e=>!Vr(e)||typeof e.id!=`string`||typeof e.label!=`string`?[]:[{id:e.id,label:e.label}]);return t.length>0?t:void 0}function Ur(e){return Array.isArray(e)?e.flatMap(e=>!Vr(e)||typeof e.id!=`string`||typeof e.label!=`string`?[]:[{id:e.id,label:e.label,category:typeof e.category==`string`?e.category:void 0,tags:Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):void 0}]):[]}function Wr(e){return Vr(e)?{categories:Hr(e.categories),items:Ur(e.items)}:{items:[]}}function Gr(e){return{title:e.label,body:e.id,description:e.tags&&e.tags.length>0?e.tags.join(`, `):void 0}}function Kr(e,t){return t.length===0?[]:[{type:`heading`,value:e},{type:`cards`,value:t.map(Gr)}]}var qr={id:`picker@1`,label:`Picker`,description:`Grouped item picker rendered as cards with picker hydration metadata.`,inputSchema:{type:`object`,properties:{categories:{type:`array`,items:{type:`object`,required:[`id`,`label`],properties:{id:{type:`string`},label:{type:`string`}},additionalProperties:!1}},items:{type:`array`,items:{type:`object`,required:[`id`,`label`],properties:{id:{type:`string`},label:{type:`string`},category:{type:`string`},tags:{type:`array`,items:{type:`string`}}},additionalProperties:!1}}},required:[`items`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=Wr(e),n=[];if(t.categories&&t.categories.length>0){let e=new Set(t.categories.map(e=>e.id)),r=[];for(let e of t.categories){let n=Kr(e.label,t.items.filter(t=>t.category===e.id));n.length>0&&r.push(n)}let i=Kr(`Other`,t.items.filter(t=>!t.category||!e.has(t.category)));return i.length>0&&r.push(i),n.push(...r.flatMap((e,t)=>t>0?[{type:`separator`},...e]:e)),n}return t.items.length>0&&n.push({type:`cards`,value:t.items.map(Gr)}),n},hydration:[`picker`],supportedTransports:Br},Jr=[`mcp-app`,`browser`,`export`];function Yr(e){return typeof e==`object`&&!!e}function Xr(e){return Yr(e)&&typeof e.type==`string`}function Zr(e){return Array.isArray(e)&&e.every(Xr)}function Qr(e){return Yr(e)&&typeof e.label==`string`&&(typeof e.value==`string`||typeof e.value==`number`)}function $r(e){return Array.isArray(e)?e.flatMap(e=>{if(!Yr(e)||typeof e.heading!=`string`)return[];let t=typeof e.content==`string`||Zr(e.content)?e.content:``;return[{heading:e.heading,content:t}]}):[]}function ei(e){return Array.isArray(e)?e.flatMap(e=>Yr(e)?[{title:typeof e.title==`string`?e.title:void 0,value:e.value,headers:Array.isArray(e.headers)?e.headers.filter(e=>typeof e==`string`):void 0,rows:Array.isArray(e.rows)?e.rows.filter(e=>Array.isArray(e)):void 0}]:[]):[]}function ti(e){let t=[{type:`heading`,value:e.heading}];return typeof e.content==`string`?(t.push({type:`paragraph`,value:e.content}),t):(t.push(...e.content),t)}function ni(e){let t={type:`table`};return e.title&&(t.title=e.title),e.value!==void 0&&(t.value=e.value),e.headers&&(t.headers=e.headers),e.rows&&(t.rows=e.rows),t}var ri={id:`report@1`,label:`Report`,description:`Static report with title, optional metrics, narrative sections, and tables.`,inputSchema:{type:`object`,properties:{title:{type:`string`},metrics:{type:`array`,items:{type:`object`,required:[`label`,`value`],properties:{label:{type:`string`},value:{type:[`string`,`number`]},trend:{type:[`string`,`number`]},status:{type:`string`}},additionalProperties:!1}},sections:{type:`array`,items:{type:`object`,required:[`heading`,`content`],properties:{heading:{type:`string`},content:{oneOf:[{type:`string`},{type:`array`,items:{type:`object`}}]}},additionalProperties:!1}},tables:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},value:{},headers:{type:`array`,items:{type:`string`}},rows:{type:`array`,items:{type:`array`,items:{}}}},additionalProperties:!1}}},required:[`title`,`sections`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t={title:Yr(e)&&typeof e.title==`string`?e.title:`Report`,metrics:Yr(e)&&Array.isArray(e.metrics)?e.metrics.filter(Qr):void 0,sections:Yr(e)?$r(e.sections):[],tables:Yr(e)?ei(e.tables):void 0},n=[{type:`heading`,value:t.title}];t.metrics&&t.metrics.length>0&&n.push({type:`metrics`,value:t.metrics});for(let e of t.sections)n.push(...ti(e));for(let e of t.tables??[])n.push(ni(e));return n},hydration:[],supportedTransports:Jr},ii=[`mcp-app`,`browser`];function ai(e){return typeof e==`object`&&!!e}function oi(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function si(e){return Array.isArray(e)?e.flatMap(e=>{if(!ai(e)||typeof e.id!=`string`||typeof e.body!=`string`)return[];let t=e.type;if(t!==`COMMENT`&&t!==`DELETION`&&t!==`GLOBAL_COMMENT`)return[];let n=ai(e.anchor)?e.anchor:{};return[{id:e.id,type:t,body:e.body,anchor:{blockId:n.blockId},author:typeof e.author==`string`?e.author:void 0,createdAt:typeof e.createdAt==`string`?e.createdAt:void 0}]}):[]}function ci(e){return Array.isArray(e)?e.flatMap(e=>{if(!ai(e)||typeof e.id!=`string`||typeof e.label!=`string`)return[];let t=e.outcome;return t!==`approved`&&t!==`rejected`&&t!==`changes-requested`&&t!==`deferred`?[]:[{id:e.id,label:e.label,outcome:t,description:typeof e.description==`string`?e.description:void 0}]}):[]}var li={id:`review@1`,label:`Review`,description:`Review surface with criteria checklist, annotation items, and approval controls.`,inputSchema:{type:`object`,properties:{title:{type:`string`},criteria:{type:`array`,items:{type:`string`}},annotations:{type:`array`,items:{type:`object`,required:[`id`,`body`,`type`,`anchor`],properties:{id:{type:`string`},type:{type:`string`,enum:[`COMMENT`,`DELETION`,`GLOBAL_COMMENT`]},body:{type:`string`},anchor:{type:`object`,properties:{blockId:{type:`string`},contextHash:{type:`string`}}},author:{type:`string`},createdAt:{type:`string`}},additionalProperties:!1}},approval:{type:`object`,properties:{prompt:{type:`string`},options:{type:`array`,items:{type:`object`,required:[`id`,`label`,`outcome`],properties:{id:{type:`string`},label:{type:`string`},outcome:{type:`string`,enum:[`approved`,`rejected`,`changes-requested`,`deferred`]},description:{type:`string`}},additionalProperties:!1}},requireComment:{type:`boolean`}},required:[`prompt`,`options`]},comment:{type:`string`}},required:[`title`,`criteria`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=[];if(!ai(e))return t;let n=typeof e.title==`string`?e.title:`Review`;t.push({type:`heading`,value:n});let r=oi(e.criteria);r.length>0&&t.push({type:`checklist`,value:r.map(e=>({label:e,checked:!1}))});let i=si(e.annotations);i.length>0&&t.push({type:`annotation`,value:i});let a=e.approval;if(ai(a)){let e=ci(a.options);e.length>0&&t.push({type:`approval`,value:{prompt:typeof a.prompt==`string`?a.prompt:``,options:e,requireComment:typeof a.requireComment==`boolean`?a.requireComment:!1}})}let o=typeof e.comment==`string`?e.comment:void 0;return o&&t.push({type:`markdown`,value:o}),t},hydration:[`checklist`],supportedTransports:ii},ui=[`mcp-app`,`browser`,`export`];function di(e){return typeof e==`object`&&!!e}function fi(e){return Array.isArray(e)?e.flatMap(e=>{if(!di(e)||typeof e.category!=`string`||!Array.isArray(e.items))return[];let t=e.items.flatMap(e=>!di(e)||typeof e.label!=`string`||typeof e.status!=`string`?[]:[{label:e.label,status:e.status,badge:typeof e.badge==`string`?e.badge:void 0}]);return[{category:e.category,items:t}]}):[]}function pi(e){return e.map(e=>({title:e.label,status:e.status,badge:e.badge}))}var mi={id:`status-board@1`,label:`Status Board`,description:`Static status board grouped into category headings and card collections.`,inputSchema:{type:`object`,properties:{categories:{type:`array`,items:{type:`object`,required:[`category`,`items`],properties:{category:{type:`string`},items:{type:`array`,items:{type:`object`,required:[`label`,`status`],properties:{label:{type:`string`},status:{type:`string`},badge:{type:`string`}},additionalProperties:!1}}},additionalProperties:!1}}},required:[`categories`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=di(e)?fi(e.categories):[],n=[];for(let e of t)n.push({type:`heading`,value:e.category}),n.push({type:`cards`,value:pi(e.items)});return n},hydration:[],supportedTransports:ui},hi=[`mcp-app`,`browser`,`export`];function gi(e){return typeof e==`object`&&!!e}function _i(e){return Array.isArray(e)?e.flatMap(e=>!gi(e)||typeof e.title!=`string`?[]:[{title:e.title,description:typeof e.description==`string`?e.description:void 0,timestamp:typeof e.timestamp==`string`?e.timestamp:void 0,status:typeof e.status==`string`?e.status:void 0}]):[]}function vi(e){return Array.isArray(e)?{entries:_i(e)}:gi(e)?{entries:_i(e.entries??e.events??e.items),title:typeof e.title==`string`?e.title:void 0}:{entries:[]}}var yi={type:`array`,items:{type:`object`,required:[`title`],properties:{title:{type:`string`},description:{type:`string`},timestamp:{type:`string`},status:{type:`string`}},additionalProperties:!1}},bi={id:`timeline@1`,label:`Timeline`,description:`Static timeline events rendered as a timeline block.`,inputSchema:{oneOf:[yi,{type:`object`,properties:{title:{type:`string`},entries:yi,events:yi,items:yi},anyOf:[{required:[`entries`]},{required:[`events`]},{required:[`items`]}],additionalProperties:!1}]},defaultLayout:{},blocksFromData:e=>{let{entries:t,title:n}=vi(e),r=[];return n&&r.push({type:`heading`,value:n}),r.push({type:`timeline`,value:t}),r},hydration:[],supportedTransports:hi},xi=[`mcp-app`,`browser`,`export`];function Si(e){return typeof e==`object`&&!!e}function Ci(e){return Si(e)&&typeof e.label==`string`}function wi(e){return{name:e.label,children:Array.isArray(e.children)?e.children.filter(Ci).map(wi):[]}}function Ti(e){if(!Si(e))return{};let t=e.root;return Ci(t)?wi(t):Si(t)?t:e}var Ei={id:`tree@1`,label:`Tree`,description:`Static tree view data with optional tree hydration metadata.`,inputSchema:{oneOf:[{type:`object`,properties:{root:{type:`object`}},required:[`root`],additionalProperties:!0},{type:`object`,additionalProperties:!0}]},defaultLayout:{},blocksFromData:e=>[{type:`tree`,value:Ti(e)}],hydration:[`tree`],supportedTransports:xi},Di=new or;Di.register(li),Di.register(ur),Di.register(Tr),Di.register(Mr),Di.register(qr),Di.register(ri),Di.register(bi),Di.register(Ei),Di.register(_r),Di.register(Ir),Di.register(zr),Di.register(mi);var Oi=0;function ki(){return Oi=(Oi+1)%(2**53-1),`${Date.now().toString(16).padStart(12,`0`).slice(-12)}${Oi.toString(16).padStart(4,`0`).slice(-4)}${Array.from({length:8},()=>Math.floor(Math.random()*256).toString(16).padStart(2,`0`)).join(``)}`}function Ai(e){return{id:e,version:1,entry:`@aikit/blocks-interactive/dist/islands/${e}.mjs`,selector:`[data-island="${e}"]`,needsData:!0}}function ji(e,t){let n=new TextEncoder;return n.encode(e).byteLength+t.reduce((e,t)=>e+n.encode(t).byteLength,0)}function Mi(e,t){let n=[],r=t.registry??Di,i={colorScheme:e.colorScheme??t.colorScheme??`auto`,transport:t.transport,lang:e.lang,dir:e.dir},a=[...e.blocks??[]],o=[...a],s=[],c=[...e.actions??[]];if(e.template){let t=r.get(e.template);if(t)try{o=t.blocksFromData(e.data,i),o.length===0&&e.data!==void 0&&(n.push({level:`warn`,message:`Template "${e.template}" produced no blocks from provided data`}),o=[{type:`markdown`,value:`> ⚠️ Template \`${e.template}\` received data but produced no content. Verify the data structure matches the template schema.`}]),t.actionsFromData&&(c=[...c,...t.actionsFromData(e.data)]),s=t.hydration.map(e=>Ai(e))}catch(t){let r=t instanceof Error?t.message:String(t);n.push({level:`error`,message:`Template ${e.template} failed: ${r}`}),o=a.length===0?Ir.blocksFromData({code:`TEMPLATE_RENDER_ERROR`,message:`Failed to render template ${e.template}`,details:r},i):[...a]}else n.push({level:`warn`,message:`Template not found: ${e.template}`})}let l=ir(o,i),u=[Jn(o.map(e=>e.type))],d=t.nonce??ki(),f=e.metadata?.surfaceId??`surface-${d}`,p=s.length>0?JSON.stringify({data:e.data,blocks:o}):void 0,ee=t.blockVendorScripts?[...new Set(o.flatMap(e=>t.blockVendorScripts?.[e.type]??[]))]:void 0;return{surfaceId:f,nonce:d,html:l,css:u,vendorScripts:ee&&ee.length>0?ee:void 0,islands:s,actions:c,payload:p,estimatedBytes:ji(l,u),exportPolicy:s.length>0?`local-interactive`:`static-only`,diagnostics:n.length>0?n:void 0}}var Ni={blockedClipboardMessage:`Image clipboard is blocked by this host or browser. Open in a browser that allows clipboard-write, then try again.`,clipboardSuccessMessage:`Copied image to clipboard.`,fallbackToServerCaptureMessage:`Client Copy as Image capture failed`};function Pi(){return Ni}function g(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function _(e){return e&&Object.assign(Bi,e),Bi}var Fi,Ii,Li,Ri,zi,Bi,Vi=t((()=>{Ii=Object.freeze({status:`aborted`}),Li=Symbol(`zod_brand`),Ri=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},zi=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(Fi=globalThis).__zod_globalConfig??(Fi.__zod_globalConfig={}),Bi=globalThis.__zod_globalConfig})),Hi=n({BIGINT_FORMAT_RANGES:()=>Ka,Class:()=>qa,NUMBER_FORMAT_RANGES:()=>Ga,aborted:()=>wa,allowsEval:()=>Va,assert:()=>qi,assertEqual:()=>Ui,assertIs:()=>Gi,assertNever:()=>Ki,assertNotEqual:()=>Wi,assignProp:()=>ta,base64ToUint8Array:()=>Na,base64urlToUint8Array:()=>Fa,cached:()=>Xi,captureStackTrace:()=>Ba,cleanEnum:()=>Ma,cleanRegex:()=>Qi,clone:()=>ma,cloneDef:()=>ra,createTransparentProxy:()=>ha,defineLazy:()=>y,esc:()=>sa,escapeRegex:()=>pa,explicitlyAborted:()=>Ta,extend:()=>ya,finalizeIssue:()=>Oa,floatSafeRemainder:()=>$i,getElementAtPath:()=>ia,getEnumValues:()=>Ji,getLengthableOrigin:()=>Aa,getParsedType:()=>Ha,getSizableOrigin:()=>ka,hexToUint8Array:()=>La,isObject:()=>la,isPlainObject:()=>ua,issue:()=>ja,joinValues:()=>v,jsonStringifyReplacer:()=>Yi,merge:()=>xa,mergeDefs:()=>na,normalizeParams:()=>b,nullish:()=>Zi,numKeys:()=>fa,objectClone:()=>ea,omit:()=>va,optionalKeys:()=>ga,parsedType:()=>S,partial:()=>Sa,pick:()=>_a,prefixIssues:()=>Ea,primitiveTypes:()=>Wa,promiseAllObject:()=>aa,propertyKeyTypes:()=>Ua,randomString:()=>oa,required:()=>Ca,safeExtend:()=>ba,shallowClone:()=>da,slugify:()=>ca,stringifyPrimitive:()=>x,uint8ArrayToBase64:()=>Pa,uint8ArrayToBase64url:()=>Ia,uint8ArrayToHex:()=>Ra,unwrapMessage:()=>Da});function Ui(e){return e}function Wi(e){return e}function Gi(e){}function Ki(e){throw Error(`Unexpected value in exhaustive check`)}function qi(e){}function Ji(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function v(e,t=`|`){return e.map(e=>x(e)).join(t)}function Yi(e,t){return typeof t==`bigint`?t.toString():t}function Xi(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function Zi(e){return e==null}function Qi(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function $i(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==za)return r===void 0&&(r=za,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ea(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ta(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function na(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function ra(e){return na(e._zod.def)}function ia(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function aa(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function oa(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function sa(e){return JSON.stringify(e)}function ca(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function la(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ua(e){if(la(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(la(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function da(e){return ua(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function fa(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function pa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function ma(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function b(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ha(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function x(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ga(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function _a(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return ma(e,na(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return ta(this,`shape`,e),e},checks:[]}))}function va(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return ma(e,na(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return ta(this,`shape`,r),r},checks:[]}))}function ya(e,t){if(!ua(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ma(e,na(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ta(this,`shape`,n),n}}))}function ba(e,t){if(!ua(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return ma(e,na(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ta(this,`shape`,n),n}}))}function xa(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return ma(e,na(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return ta(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Sa(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return ma(t,na(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return ta(this,`shape`,i),i},checks:[]}))}function Ca(e,t,n){return ma(t,na(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return ta(this,`shape`,i),i}}))}function wa(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ta(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ea(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Da(e){return typeof e==`string`?e:e?.message}function Oa(e,t,n){let r=e.message?e.message:Da(e.inst?._zod.def?.error?.(e))??Da(t?.error?.(e))??Da(n.customError?.(e))??Da(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function ka(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function Aa(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function S(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function ja(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ma(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Na(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Pa(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Fa(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return Na(t+`=`.repeat((4-t.length%4)%4))}function Ia(e){return Pa(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function La(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function Ra(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var za,Ba,Va,Ha,Ua,Wa,Ga,Ka,qa,C=t((()=>{Vi(),za=Symbol(`evaluating`),Ba=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Va=Xi(()=>{if(Bi.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Ha=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},Ua=new Set([`string`,`number`,`symbol`]),Wa=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),Ga={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ka={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},qa=class{constructor(...e){}}}));function Ja(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ya(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}function Xa(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},[...i,...s.path]));else if(s.code===`invalid_key`)r({issues:s.issues},[...i,...s.path]);else if(s.code===`invalid_element`)r({issues:s.issues},[...i,...s.path]);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??={},(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??=[],(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function Za(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Qa(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Za(e.path)}`);return t.join(`
|
|
2510
|
-
`)}var $a,eo,to,no=t((()=>{Vi(),C(),$a=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Yi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},eo=g(`$ZodError`,$a),to=g(`$ZodError`,$a,{Parent:Error})})),ro,io,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo=t((()=>{Vi(),no(),C(),ro=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new Ri;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Oa(e,a,_())));throw Ba(t,i?.callee),t}return o.value},io=ro(to),ao=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Oa(e,a,_())));throw Ba(t,i?.callee),t}return o.value},oo=ao(to),so=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Ri;return a.issues.length?{success:!1,error:new(e??eo)(a.issues.map(e=>Oa(e,i,_())))}:{success:!0,data:a.value}},co=so(to),lo=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Oa(e,i,_())))}:{success:!0,data:a.value}},uo=lo(to),fo=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ro(e)(t,n,i)},po=fo(to),mo=e=>(t,n,r)=>ro(e)(t,n,r),ho=mo(to),go=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ao(e)(t,n,i)},_o=go(to),vo=e=>async(t,n,r)=>ao(e)(t,n,r),yo=vo(to),bo=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return so(e)(t,n,i)},xo=bo(to),So=e=>(t,n,r)=>so(e)(t,n,r),Co=So(to),wo=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lo(e)(t,n,i)},To=wo(to),Eo=e=>async(t,n,r)=>lo(e)(t,n,r),Do=Eo(to)})),ko=n({base64:()=>ss,base64url:()=>cs,bigint:()=>gs,boolean:()=>ys,browserEmail:()=>es,cidrv4:()=>as,cidrv6:()=>os,cuid:()=>Io,cuid2:()=>Lo,date:()=>ms,datetime:()=>No,domain:()=>us,duration:()=>Ho,e164:()=>fs,email:()=>Yo,emoji:()=>Ao,extendedDuration:()=>Uo,guid:()=>Wo,hex:()=>ws,hostname:()=>ls,html5Email:()=>Xo,httpProtocol:()=>ds,idnEmail:()=>$o,integer:()=>_s,ipv4:()=>ns,ipv6:()=>rs,ksuid:()=>Bo,lowercase:()=>Ss,mac:()=>is,md5_base64:()=>Es,md5_base64url:()=>Ds,md5_hex:()=>Ts,nanoid:()=>Vo,null:()=>bs,number:()=>vs,rfc5322Email:()=>Zo,sha1_base64:()=>ks,sha1_base64url:()=>As,sha1_hex:()=>Os,sha256_base64:()=>Ms,sha256_base64url:()=>Ns,sha256_hex:()=>js,sha384_base64:()=>Fs,sha384_base64url:()=>Is,sha384_hex:()=>Ps,sha512_base64:()=>Rs,sha512_base64url:()=>zs,sha512_hex:()=>Ls,string:()=>hs,time:()=>Mo,ulid:()=>Ro,undefined:()=>xs,unicodeEmail:()=>Qo,uppercase:()=>Cs,uuid:()=>Go,uuid4:()=>Ko,uuid6:()=>qo,uuid7:()=>Jo,xid:()=>zo});function Ao(){return new RegExp(ts,`u`)}function jo(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Mo(e){return RegExp(`^${jo(e)}$`)}function No(e){let t=jo({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${ps}T(?:${r})$`)}function Po(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Fo(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs=t((()=>{C(),Io=/^[cC][0-9a-z]{6,}$/,Lo=/^[0-9a-z]+$/,Ro=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zo=/^[0-9a-vA-V]{20}$/,Bo=/^[A-Za-z0-9]{27}$/,Vo=/^[a-zA-Z0-9_-]{21}$/,Ho=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Uo=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Wo=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Go=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ko=Go(4),qo=Go(6),Jo=Go(7),Yo=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xo=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Zo=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Qo=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,$o=Qo,es=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ts=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,ns=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,rs=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,is=e=>{let t=pa(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},as=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,os=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ss=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,cs=/^[A-Za-z0-9_-]*$/,ls=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,us=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ds=/^https?$/,fs=/^\+[1-9]\d{6,14}$/,ps=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,ms=RegExp(`^${ps}$`),hs=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},gs=/^-?\d+n?$/,_s=/^-?\d+$/,vs=/^-?\d+(?:\.\d+)?$/,ys=/^(?:true|false)$/i,bs=/^null$/i,xs=/^undefined$/i,Ss=/^[^A-Z]*$/,Cs=/^[^a-z]*$/,ws=/^[0-9a-fA-F]*$/,Ts=/^[0-9a-fA-F]{32}$/,Es=Po(22,`==`),Ds=Fo(22),Os=/^[0-9a-fA-F]{40}$/,ks=Po(27,`=`),As=Fo(27),js=/^[0-9a-fA-F]{64}$/,Ms=Po(43,`=`),Ns=Fo(43),Ps=/^[0-9a-fA-F]{96}$/,Fs=Po(64,``),Is=Fo(64),Ls=/^[0-9a-fA-F]{128}$/,Rs=Po(86,`==`),zs=Fo(86)}));function Vs(e,t,n){e.issues.length&&t.issues.push(...Ea(n,e.issues))}var w,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc,uc=t((()=>{Vi(),Bs(),C(),w=g(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Hs={number:`number`,bigint:`bigint`,object:`date`},Us=g(`$ZodCheckLessThan`,(e,t)=>{w.init(e,t);let n=Hs[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ws=g(`$ZodCheckGreaterThan`,(e,t)=>{w.init(e,t);let n=Hs[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gs=g(`$ZodCheckMultipleOf`,(e,t)=>{w.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):$i(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ks=g(`$ZodCheckNumberFormat`,(e,t)=>{w.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ga[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=_s)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),qs=g(`$ZodCheckBigIntFormat`,(e,t)=>{w.init(e,t);let[n,r]=Ka[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Js=g(`$ZodCheckMaxSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Zi(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:ka(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ys=g(`$ZodCheckMinSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Zi(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:ka(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xs=g(`$ZodCheckSizeEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Zi(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:ka(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Zs=g(`$ZodCheckMaxLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Zi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Aa(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Qs=g(`$ZodCheckMinLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Zi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Aa(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$s=g(`$ZodCheckLengthEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!Zi(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Aa(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ec=g(`$ZodCheckStringFormat`,(e,t)=>{var n,r;w.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),tc=g(`$ZodCheckRegex`,(e,t)=>{ec.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),nc=g(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ss,ec.init(e,t)}),rc=g(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Cs,ec.init(e,t)}),ic=g(`$ZodCheckIncludes`,(e,t)=>{w.init(e,t);let n=pa(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ac=g(`$ZodCheckStartsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`^${pa(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),oc=g(`$ZodCheckEndsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`.*${pa(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),sc=g(`$ZodCheckProperty`,(e,t)=>{w.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Vs(n,e,t.property));Vs(n,e,t.property)}}),cc=g(`$ZodCheckMimeType`,(e,t)=>{w.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),lc=g(`$ZodCheckOverwrite`,(e,t)=>{w.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),dc,fc=t((()=>{dc=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
3324
|
+
</div>`}var Tr={actions:ne,annotation:Sr,approval:wr,cards:ae,chart:me,checklist:qe,code:rt,comparison:lt,"architecture-diagram":Pt,"workflow-diagram":Pt,"sequence-diagram":Pt,"dataflow-diagram":Pt,"lifecycle-diagram":Pt,diff:Bt,"component-detail":_t,"data-table-schema":Ct,"docs-browser":Ut,"docs-hub":Jt,"flame-graph":rn,finding:Zt,graph:sn,heading:ln,kv:fn,"lifecycle-flow":Dn,list:kn,markdown:Pn,mermaid:In,metrics:zn,paragraph:Vn,progress:Wn,prompt:qn,separator:Yn,"status-board":Qn,table:rr,tags:or,text:cr,timeline:ur,tree:pr};function Er(e,t,n){let r={...e,value:c(e.value)},a=Tr[r.type],s=a?a(r,t):Or(r);return r.title&&![`heading`,`finding`].includes(r.type)&&(s=`<section class="bk-section bk-section--${i(r.type)}"><h3 class="bk-section-title">${i(r.title)}</h3>${s}</section>`),`<div data-block-id="${o(r.blockId??`block-${n??0}`)}">${s}</div>`}function Dr(e,t){return e.map((e,n)=>Er(e,t,n)).join(`
|
|
3325
|
+
`)}function Or(e){if(e.value===void 0||e.value===null)return``;if(typeof e.value==`string`)return`<p class="bk-paragraph">${i(e.value)}</p>`;try{return`<pre class="bk-fallback">${i(JSON.stringify(e.value,null,2))}</pre>`}catch{return`<pre class="bk-fallback">${i(String(e.value))}</pre>`}}var kr=class{templates=new Map;register(e){this.templates.set(e.id,e)}get(e){let t=this.templates.get(e);if(t)return t;let n=e.includes(`@`)?e:`${e}@`,r,i=-1;for(let[e,t]of this.templates){if(!e.startsWith(n))continue;let a=Number.parseInt(e.split(`@`)[1]??`0`,10);a>i&&(i=a,r=t)}return r}has(e){return this.get(e)!==void 0}list(){return[...this.templates.values()]}},Ar=[`mcp-app`,`browser`];function jr(e){return typeof e==`object`&&!!e}function Mr(e){return Array.isArray(e)?e.flatMap(e=>!jr(e)||typeof e.label!=`string`?[]:[{label:e.label,checked:!!e.checked}]):[]}var Nr={id:`checklist@1`,label:`Checklist`,description:`Checklist with optional title and checklist hydration metadata.`,inputSchema:{type:`object`,properties:{title:{type:`string`},items:{type:`array`,items:{type:`object`,required:[`label`,`checked`],properties:{label:{type:`string`},checked:{type:`boolean`}},additionalProperties:!1}}},required:[`items`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=[],n=jr(e)&&typeof e.title==`string`?e.title:void 0,r=jr(e)?Mr(e.items):[];return n&&t.push({type:`heading`,value:n}),t.push({type:`checklist`,value:r}),t},hydration:[`checklist`],supportedTransports:Ar},Pr=[`mcp-app`,`browser`,`export`];function Fr(e){return typeof e==`object`&&!!e}function Ir(e){return Fr(e)&&typeof e.label==`string`&&(typeof e.value==`string`||typeof e.value==`number`)}function Lr(e){return Fr(e)&&typeof e.key==`string`&&typeof e.label==`string`}function Rr(e){return Array.isArray(e)?e.filter(Fr):[]}function zr(e,t){if(Array.isArray(e)){let t=e.filter(Lr);if(t.length>0)return t}return Object.keys(t[0]??{}).map(e=>({key:e,label:e}))}var Br={id:`data-table@1`,label:`Data Table`,description:`Static data table with optional metrics and sortable table hydration.`,inputSchema:{type:`object`,properties:{columns:{type:`array`,items:{type:`object`,required:[`key`,`label`],properties:{key:{type:`string`},label:{type:`string`}},additionalProperties:!1}},rows:{type:`array`,items:{type:`object`}},stats:{type:`array`,items:{type:`object`,required:[`label`,`value`],properties:{label:{type:`string`},value:{type:[`string`,`number`]},trend:{type:[`string`,`number`]},status:{type:`string`}},additionalProperties:!1}}},required:[`rows`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=Fr(e)?Rr(e.rows):[],n=Fr(e)?zr(e.columns,t):[],r=n.map(e=>e.label),i=t.map(e=>n.map(t=>e[t.key])),a=[];if(Fr(e)&&Array.isArray(e.stats)){let t=e.stats.filter(Ir);t.length>0&&a.push({type:`metrics`,value:t})}return a.push({type:`table`,columns:n,headers:r,rows:i,value:{headers:r,rows:i}}),a},hydration:[`table`],supportedTransports:Pr},Vr=[`mcp-app`,`browser`,`export`];function Hr(e){return typeof e==`object`&&!!e}function Ur(e){return Array.isArray(e)?e.flatMap(e=>!Hr(e)||typeof e.type!=`string`||typeof e.content!=`string`?[]:[{type:e.type,content:e.content}]):[]}function Wr(e){return Array.isArray(e)?e.flatMap(e=>!Hr(e)||typeof e.header!=`string`?[]:[{header:e.header,changes:Ur(e.changes)}]):[]}function Gr(e){return!Hr(e)||!Array.isArray(e.files)?[]:e.files.flatMap(e=>!Hr(e)||typeof e.path!=`string`||typeof e.status!=`string`?[]:[{path:e.path,status:e.status,additions:typeof e.additions==`number`?e.additions:0,deletions:typeof e.deletions==`number`?e.deletions:0,hunks:Wr(e.hunks)}])}function Kr(e){return e===`add`?`+`:e===`delete`?`-`:` `}function qr(e){let t=e.hunks.flatMap(e=>[e.header,...e.changes.map(e=>`${Kr(e.type)}${e.content}`)]).join(`
|
|
3326
|
+
`);return[{type:`heading`,value:e.path},{type:`paragraph`,value:`${e.status} | +${e.additions} / -${e.deletions}`},{type:`code`,language:`diff`,value:t}]}var Jr={id:`diff-view@1`,label:`Diff View`,description:`Static diff summary rendered as per-file diff code blocks.`,inputSchema:{type:`object`,properties:{files:{type:`array`,items:{type:`object`,required:[`path`,`status`,`additions`,`deletions`,`hunks`],properties:{path:{type:`string`},status:{type:`string`},additions:{type:`number`},deletions:{type:`number`},hunks:{type:`array`,items:{type:`object`,required:[`header`,`changes`],properties:{header:{type:`string`},changes:{type:`array`,items:{type:`object`,required:[`type`,`content`],properties:{type:{type:`string`},content:{type:`string`}},additionalProperties:!1}}},additionalProperties:!1}}},additionalProperties:!1}}},required:[`files`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>Gr(e).flatMap(qr),hydration:[],supportedTransports:Vr},Yr=[`mcp-app`,`browser`,`export`];function Xr(e){return typeof e==`object`&&!!e}function Zr(e){return Xr(e)&&typeof e.type==`string`}function Qr(e){return Array.isArray(e)&&e.every(Zr)}function $r(e){if(!Xr(e))return{sections:[]};let t=Array.isArray(e.sections)?e.sections.flatMap(e=>{if(!Xr(e)||typeof e.heading!=`string`)return[];let t=typeof e.content==`string`||Qr(e.content)?e.content:``;return[{heading:e.heading,content:t}]}):[];return{title:typeof e.title==`string`?e.title:void 0,sections:t}}function ei(e){let t=[{type:`heading`,value:e.heading}];return typeof e.content==`string`?(t.push({type:`paragraph`,value:e.content}),t):(t.push(...e.content),t)}var ti={id:`document@1`,label:`Document`,description:`Structured document with optional title and section content blocks.`,inputSchema:{type:`object`,properties:{title:{type:`string`},sections:{type:`array`,items:{type:`object`,additionalProperties:!1,required:[`heading`,`content`],properties:{heading:{type:`string`},content:{oneOf:[{type:`string`},{type:`array`,items:{type:`object`}}]}}}}},required:[`sections`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=$r(e),n=[];t.title&&n.push({type:`heading`,value:t.title});for(let e of t.sections)n.push(...ei(e));return n},hydration:[],supportedTransports:Yr},ni=[`mcp-app`,`browser`,`export`];function ri(e){return typeof e==`object`&&!!e}function ii(e){return ri(e)?{code:typeof e.code==`string`?e.code:`ERROR`,message:typeof e.message==`string`?e.message:`Unknown error`,details:typeof e.details==`string`?e.details:void 0,stack:typeof e.stack==`string`?e.stack:void 0}:{code:`ERROR`,message:`Unknown error`}}var ai={id:`error@1`,label:`Error`,description:`Static error view with message and optional stack trace.`,inputSchema:{type:`object`,properties:{code:{type:`string`},message:{type:`string`},details:{type:`string`},stack:{type:`string`}},required:[`code`,`message`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=ii(e),n=[{type:`heading`,value:`Error`},{type:`code`,title:t.code,language:`text`,value:t.details?`${t.message}\n\n${t.details}`:t.message}];return t.stack&&n.push({type:`code`,title:`Stack Trace`,language:`text`,value:t.stack}),n},hydration:[],supportedTransports:ni};function oi(e){return typeof e==`object`&&!!e}function si(e){return Array.isArray(e)?e.flatMap(e=>!oi(e)||typeof e.name!=`string`||typeof e.label!=`string`?[]:[{name:e.name,label:e.label,type:typeof e.type==`string`?e.type:void 0,required:typeof e.required==`boolean`?e.required:void 0,placeholder:typeof e.placeholder==`string`?e.placeholder:void 0,default:typeof e.default==`string`?e.default:void 0,options:Array.isArray(e.options)?e.options.filter(e=>typeof e==`string`||oi(e)&&typeof e.label==`string`&&typeof e.value==`string`):void 0,value:typeof e.value==`string`||typeof e.value==`boolean`?e.value:void 0}]):[]}var ci={id:`form@1`,label:`Form`,description:`Browser-only form template rendered as a heading and table of field metadata.`,inputSchema:{type:`object`,properties:{title:{type:`string`},fields:{type:`array`,items:{type:`object`,required:[`name`,`label`],properties:{name:{type:`string`},label:{type:`string`},type:{type:`string`},required:{type:`boolean`},placeholder:{type:`string`},default:{type:`string`},options:{type:`array`,items:{anyOf:[{type:`string`},{type:`object`,required:[`label`,`value`],properties:{label:{type:`string`},value:{type:`string`}},additionalProperties:!1}]}},value:{type:[`string`,`boolean`]}},additionalProperties:!1}}},required:[`fields`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t={title:oi(e)&&typeof e.title==`string`?e.title:`Form`,fields:oi(e)?si(e.fields):[]};return[{type:`heading`,value:t.title},{type:`table`,value:{headers:[`Label`,`Name`,`Type`,`Required`,`Default/Placeholder`],rows:t.fields.map(e=>[e.label||e.name,e.name,e.type||`text`,e.required?`Yes`:`No`,e.placeholder||e.default||``])}}]},hydration:[`form`],supportedTransports:[`browser`]},li=[`mcp-app`,`browser`];function ui(e){return typeof e==`object`&&!!e}function di(e){if(!Array.isArray(e))return;let t=e.flatMap(e=>!ui(e)||typeof e.id!=`string`||typeof e.label!=`string`?[]:[{id:e.id,label:e.label}]);return t.length>0?t:void 0}function fi(e){return Array.isArray(e)?e.flatMap(e=>!ui(e)||typeof e.id!=`string`||typeof e.label!=`string`?[]:[{id:e.id,label:e.label,category:typeof e.category==`string`?e.category:void 0,tags:Array.isArray(e.tags)?e.tags.filter(e=>typeof e==`string`):void 0}]):[]}function pi(e){return ui(e)?{categories:di(e.categories),items:fi(e.items)}:{items:[]}}function mi(e){return{title:e.label,body:e.id,description:e.tags&&e.tags.length>0?e.tags.join(`, `):void 0}}function hi(e,t){return t.length===0?[]:[{type:`heading`,value:e},{type:`cards`,value:t.map(mi)}]}var gi={id:`picker@1`,label:`Picker`,description:`Grouped item picker rendered as cards with picker hydration metadata.`,inputSchema:{type:`object`,properties:{categories:{type:`array`,items:{type:`object`,required:[`id`,`label`],properties:{id:{type:`string`},label:{type:`string`}},additionalProperties:!1}},items:{type:`array`,items:{type:`object`,required:[`id`,`label`],properties:{id:{type:`string`},label:{type:`string`},category:{type:`string`},tags:{type:`array`,items:{type:`string`}}},additionalProperties:!1}}},required:[`items`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=pi(e),n=[];if(t.categories&&t.categories.length>0){let e=new Set(t.categories.map(e=>e.id)),r=[];for(let e of t.categories){let n=hi(e.label,t.items.filter(t=>t.category===e.id));n.length>0&&r.push(n)}let i=hi(`Other`,t.items.filter(t=>!t.category||!e.has(t.category)));return i.length>0&&r.push(i),n.push(...r.flatMap((e,t)=>t>0?[{type:`separator`},...e]:e)),n}return t.items.length>0&&n.push({type:`cards`,value:t.items.map(mi)}),n},hydration:[`picker`],supportedTransports:li},_i=[`mcp-app`,`browser`,`export`];function vi(e){return typeof e==`object`&&!!e}function yi(e){return vi(e)&&typeof e.type==`string`}function bi(e){return Array.isArray(e)&&e.every(yi)}function xi(e){return vi(e)&&typeof e.label==`string`&&(typeof e.value==`string`||typeof e.value==`number`)}function Si(e){return Array.isArray(e)?e.flatMap(e=>{if(!vi(e)||typeof e.heading!=`string`)return[];let t=typeof e.content==`string`||bi(e.content)?e.content:``;return[{heading:e.heading,content:t}]}):[]}function Ci(e){return Array.isArray(e)?e.flatMap(e=>vi(e)?[{title:typeof e.title==`string`?e.title:void 0,value:e.value,headers:Array.isArray(e.headers)?e.headers.filter(e=>typeof e==`string`):void 0,rows:Array.isArray(e.rows)?e.rows.filter(e=>Array.isArray(e)):void 0}]:[]):[]}function wi(e){let t=[{type:`heading`,value:e.heading}];return typeof e.content==`string`?(t.push({type:`paragraph`,value:e.content}),t):(t.push(...e.content),t)}function Ti(e){let t={type:`table`};if(e.title&&(t.title=e.title),e.value!==void 0)t.value=e.value;else if(e.headers||e.rows){let n={};e.headers&&(n.headers=e.headers),e.rows&&(n.rows=e.rows),t.value=n}return t}var Ei={id:`report@1`,label:`Report`,description:`Static report with title, optional metrics, narrative sections, and tables.`,inputSchema:{type:`object`,properties:{title:{type:`string`},metrics:{type:`array`,items:{type:`object`,required:[`label`,`value`],properties:{label:{type:`string`},value:{type:[`string`,`number`]},trend:{type:[`string`,`number`]},status:{type:`string`}},additionalProperties:!1}},sections:{type:`array`,items:{type:`object`,required:[`heading`,`content`],properties:{heading:{type:`string`},content:{oneOf:[{type:`string`},{type:`array`,items:{type:`object`}}]}},additionalProperties:!1}},tables:{type:`array`,items:{type:`object`,properties:{title:{type:`string`},value:{},headers:{type:`array`,items:{type:`string`}},rows:{type:`array`,items:{type:`array`,items:{}}}},additionalProperties:!1}}},required:[`title`,`sections`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t={title:vi(e)&&typeof e.title==`string`?e.title:`Report`,metrics:vi(e)&&Array.isArray(e.metrics)?e.metrics.filter(xi):void 0,sections:vi(e)?Si(e.sections):[],tables:vi(e)?Ci(e.tables):void 0},n=[{type:`heading`,value:t.title}];t.metrics&&t.metrics.length>0&&n.push({type:`metrics`,value:t.metrics});for(let e of t.sections)n.push(...wi(e));for(let e of t.tables??[])n.push(Ti(e));return n},hydration:[],supportedTransports:_i},Di=[`mcp-app`,`browser`];function Oi(e){return typeof e==`object`&&!!e}function ki(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Ai(e){return Array.isArray(e)?e.flatMap(e=>{if(!Oi(e)||typeof e.id!=`string`||typeof e.body!=`string`)return[];let t=e.type;if(t!==`COMMENT`&&t!==`DELETION`&&t!==`GLOBAL_COMMENT`)return[];let n=Oi(e.anchor)?e.anchor:{};return[{id:e.id,type:t,body:e.body,anchor:{blockId:n.blockId},author:typeof e.author==`string`?e.author:void 0,createdAt:typeof e.createdAt==`string`?e.createdAt:void 0}]}):[]}function ji(e){return Array.isArray(e)?e.flatMap(e=>{if(!Oi(e)||typeof e.id!=`string`||typeof e.label!=`string`)return[];let t=e.outcome;return t!==`approved`&&t!==`rejected`&&t!==`changes-requested`&&t!==`deferred`?[]:[{id:e.id,label:e.label,outcome:t,description:typeof e.description==`string`?e.description:void 0}]}):[]}var Mi={id:`review@1`,label:`Review`,description:`Review surface with criteria checklist, annotation items, and approval controls.`,inputSchema:{type:`object`,properties:{title:{type:`string`},criteria:{type:`array`,items:{type:`string`}},annotations:{type:`array`,items:{type:`object`,required:[`id`,`body`,`type`,`anchor`],properties:{id:{type:`string`},type:{type:`string`,enum:[`COMMENT`,`DELETION`,`GLOBAL_COMMENT`]},body:{type:`string`},anchor:{type:`object`,properties:{blockId:{type:`string`},contextHash:{type:`string`}}},author:{type:`string`},createdAt:{type:`string`}},additionalProperties:!1}},approval:{type:`object`,properties:{prompt:{type:`string`},options:{type:`array`,items:{type:`object`,required:[`id`,`label`,`outcome`],properties:{id:{type:`string`},label:{type:`string`},outcome:{type:`string`,enum:[`approved`,`rejected`,`changes-requested`,`deferred`]},description:{type:`string`}},additionalProperties:!1}},requireComment:{type:`boolean`}},required:[`prompt`,`options`]},comment:{type:`string`}},required:[`title`,`criteria`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=[];if(!Oi(e))return t;let n=typeof e.title==`string`?e.title:`Review`;t.push({type:`heading`,value:n});let r=ki(e.criteria);r.length>0&&t.push({type:`checklist`,value:r.map(e=>({label:e,checked:!1}))});let i=Ai(e.annotations);i.length>0&&t.push({type:`annotation`,value:i});let a=e.approval;if(Oi(a)){let e=ji(a.options);e.length>0&&t.push({type:`approval`,value:{prompt:typeof a.prompt==`string`?a.prompt:``,options:e,requireComment:typeof a.requireComment==`boolean`?a.requireComment:!1}})}let o=typeof e.comment==`string`?e.comment:void 0;return o&&t.push({type:`markdown`,value:o}),t},hydration:[`checklist`],supportedTransports:Di},Ni=[`mcp-app`,`browser`,`export`];function Pi(e){return typeof e==`object`&&!!e}function Fi(e){return Array.isArray(e)?e.flatMap(e=>{if(!Pi(e)||typeof e.category!=`string`||!Array.isArray(e.items))return[];let t=e.items.flatMap(e=>!Pi(e)||typeof e.label!=`string`||typeof e.status!=`string`?[]:[{label:e.label,status:e.status,badge:typeof e.badge==`string`?e.badge:void 0}]);return[{category:e.category,items:t}]}):[]}function Ii(e){return e.map(e=>({title:e.label,status:e.status,badge:e.badge}))}var Li={id:`status-board@1`,label:`Status Board`,description:`Static status board grouped into category headings and card collections.`,inputSchema:{type:`object`,properties:{categories:{type:`array`,items:{type:`object`,required:[`category`,`items`],properties:{category:{type:`string`},items:{type:`array`,items:{type:`object`,required:[`label`,`status`],properties:{label:{type:`string`},status:{type:`string`},badge:{type:`string`}},additionalProperties:!1}}},additionalProperties:!1}}},required:[`categories`],additionalProperties:!1},defaultLayout:{},blocksFromData:e=>{let t=Pi(e)?Fi(e.categories):[],n=[];for(let e of t)n.push({type:`heading`,value:e.category}),n.push({type:`cards`,value:Ii(e.items)});return n},hydration:[],supportedTransports:Ni},Ri=[`mcp-app`,`browser`,`export`];function zi(e){return typeof e==`object`&&!!e}function Bi(e){return Array.isArray(e)?e.flatMap(e=>!zi(e)||typeof e.title!=`string`?[]:[{title:e.title,description:typeof e.description==`string`?e.description:void 0,timestamp:typeof e.timestamp==`string`?e.timestamp:void 0,status:typeof e.status==`string`?e.status:void 0}]):[]}function Vi(e){return Array.isArray(e)?{entries:Bi(e)}:zi(e)?{entries:Bi(e.entries??e.events??e.items),title:typeof e.title==`string`?e.title:void 0}:{entries:[]}}var Hi={type:`array`,items:{type:`object`,required:[`title`],properties:{title:{type:`string`},description:{type:`string`},timestamp:{type:`string`},status:{type:`string`}},additionalProperties:!1}},Ui={id:`timeline@1`,label:`Timeline`,description:`Static timeline events rendered as a timeline block.`,inputSchema:{oneOf:[Hi,{type:`object`,properties:{title:{type:`string`},entries:Hi,events:Hi,items:Hi},anyOf:[{required:[`entries`]},{required:[`events`]},{required:[`items`]}],additionalProperties:!1}]},defaultLayout:{},blocksFromData:e=>{let{entries:t,title:n}=Vi(e),r=[];return n&&r.push({type:`heading`,value:n}),r.push({type:`timeline`,value:t}),r},hydration:[],supportedTransports:Ri},Wi=[`mcp-app`,`browser`,`export`];function Gi(e){return typeof e==`object`&&!!e}function Ki(e){return Gi(e)&&typeof e.label==`string`}function qi(e){return{name:e.label,children:Array.isArray(e.children)?e.children.filter(Ki).map(qi):[]}}function Ji(e){if(!Gi(e))return{};let t=e.root;return Ki(t)?qi(t):Gi(t)?t:e}var Yi={id:`tree@1`,label:`Tree`,description:`Static tree view data with optional tree hydration metadata.`,inputSchema:{oneOf:[{type:`object`,properties:{root:{type:`object`}},required:[`root`],additionalProperties:!0},{type:`object`,additionalProperties:!0}]},defaultLayout:{},blocksFromData:e=>[{type:`tree`,value:Ji(e)}],hydration:[`tree`],supportedTransports:Wi},Xi=new kr;Xi.register(Mi),Xi.register(Nr),Xi.register(Jr),Xi.register(ti),Xi.register(gi),Xi.register(Ei),Xi.register(Ui),Xi.register(Yi),Xi.register(Br),Xi.register(ai),Xi.register(ci),Xi.register(Li);var Zi=0;function Qi(){return Zi=(Zi+1)%(2**53-1),`${Date.now().toString(16).padStart(12,`0`).slice(-12)}${Zi.toString(16).padStart(4,`0`).slice(-4)}${Array.from({length:8},()=>Math.floor(Math.random()*256).toString(16).padStart(2,`0`)).join(``)}`}function $i(e){return{id:e,version:1,entry:`@aikit/blocks-interactive/dist/islands/${e}.mjs`,selector:`[data-island="${e}"]`,needsData:!0}}function ea(e,t){let n=new TextEncoder;return n.encode(e).byteLength+t.reduce((e,t)=>e+n.encode(t).byteLength,0)}function ta(e,t){let n=[],r=t.registry??Xi,i={colorScheme:e.colorScheme??t.colorScheme??`auto`,transport:t.transport,lang:e.lang,dir:e.dir},a=[...e.blocks??[]],o=[...a],s=[],c=[...e.actions??[]];if(e.template){let t=r.get(e.template);if(t)try{o=t.blocksFromData(e.data,i),o.length===0&&e.data!==void 0&&(n.push({level:`warn`,message:`Template "${e.template}" produced no blocks from provided data`}),o=[{type:`markdown`,value:`> ⚠️ Template \`${e.template}\` received data but produced no content. Verify the data structure matches the template schema.`}]),t.actionsFromData&&(c=[...c,...t.actionsFromData(e.data)]),s=t.hydration.map(e=>$i(e))}catch(t){let r=t instanceof Error?t.message:String(t);n.push({level:`error`,message:`Template ${e.template} failed: ${r}`}),o=a.length===0?ai.blocksFromData({code:`TEMPLATE_RENDER_ERROR`,message:`Failed to render template ${e.template}`,details:r},i):[...a]}else n.push({level:`warn`,message:`Template not found: ${e.template}`})}let l=Dr(o,i),u=[_r(o.map(e=>e.type))],d=t.nonce??Qi(),f=e.metadata?.surfaceId??`surface-${d}`,p=s.length>0?JSON.stringify({data:e.data,blocks:o}):void 0,ee=t.blockVendorScripts?[...new Set(o.flatMap(e=>t.blockVendorScripts?.[e.type]??[]))]:void 0;return{surfaceId:f,nonce:d,html:l,css:u,vendorScripts:ee&&ee.length>0?ee:void 0,islands:s,actions:c,payload:p,estimatedBytes:ea(l,u),exportPolicy:s.length>0?`local-interactive`:`static-only`,diagnostics:n.length>0?n:void 0}}var na={blockedClipboardMessage:`Image clipboard is blocked by this host or browser. Open in a browser that allows clipboard-write, then try again.`,clipboardSuccessMessage:`Copied image to clipboard.`,fallbackToServerCaptureMessage:`Client Copy as Image capture failed`};function ra(){return na}function g(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}function _(e){return e&&Object.assign(la,e),la}var ia,aa,oa,sa,ca,la,ua=t((()=>{aa=Object.freeze({status:`aborted`}),oa=Symbol(`zod_brand`),sa=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},ca=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(ia=globalThis).__zod_globalConfig??(ia.__zod_globalConfig={}),la=globalThis.__zod_globalConfig})),da=n({BIGINT_FORMAT_RANGES:()=>go,Class:()=>_o,NUMBER_FORMAT_RANGES:()=>ho,aborted:()=>qa,allowsEval:()=>uo,assert:()=>ga,assertEqual:()=>fa,assertIs:()=>ma,assertNever:()=>ha,assertNotEqual:()=>pa,assignProp:()=>wa,base64ToUint8Array:()=>no,base64urlToUint8Array:()=>io,cached:()=>ya,captureStackTrace:()=>lo,cleanEnum:()=>to,cleanRegex:()=>xa,clone:()=>La,cloneDef:()=>Ea,createTransparentProxy:()=>Ra,defineLazy:()=>y,esc:()=>Aa,escapeRegex:()=>Ia,explicitlyAborted:()=>Ja,extend:()=>Ha,finalizeIssue:()=>Za,floatSafeRemainder:()=>Sa,getElementAtPath:()=>Da,getEnumValues:()=>_a,getLengthableOrigin:()=>$a,getParsedType:()=>fo,getSizableOrigin:()=>Qa,hexToUint8Array:()=>oo,isObject:()=>Ma,isPlainObject:()=>Na,issue:()=>eo,joinValues:()=>v,jsonStringifyReplacer:()=>va,merge:()=>Wa,mergeDefs:()=>Ta,normalizeParams:()=>b,nullish:()=>ba,numKeys:()=>Fa,objectClone:()=>Ca,omit:()=>Va,optionalKeys:()=>za,parsedType:()=>S,partial:()=>Ga,pick:()=>Ba,prefixIssues:()=>Ya,primitiveTypes:()=>mo,promiseAllObject:()=>Oa,propertyKeyTypes:()=>po,randomString:()=>ka,required:()=>Ka,safeExtend:()=>Ua,shallowClone:()=>Pa,slugify:()=>ja,stringifyPrimitive:()=>x,uint8ArrayToBase64:()=>ro,uint8ArrayToBase64url:()=>ao,uint8ArrayToHex:()=>so,unwrapMessage:()=>Xa});function fa(e){return e}function pa(e){return e}function ma(e){}function ha(e){throw Error(`Unexpected value in exhaustive check`)}function ga(e){}function _a(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function v(e,t=`|`){return e.map(e=>x(e)).join(t)}function va(e,t){return typeof t==`bigint`?t.toString():t}function ya(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function ba(e){return e==null}function xa(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Sa(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function y(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==co)return r===void 0&&(r=co,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ca(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function wa(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ta(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function Ea(e){return Ta(e._zod.def)}function Da(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function Oa(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function ka(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function Aa(e){return JSON.stringify(e)}function ja(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}function Ma(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Na(e){if(Ma(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(Ma(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Pa(e){return Na(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Fa(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Ia(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function La(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function b(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Ra(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function x(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function za(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}function Ba(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return La(e,Ta(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return wa(this,`shape`,e),e},checks:[]}))}function Va(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return La(e,Ta(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return wa(this,`shape`,r),r},checks:[]}))}function Ha(e,t){if(!Na(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return La(e,Ta(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return wa(this,`shape`,n),n}}))}function Ua(e,t){if(!Na(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return La(e,Ta(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return wa(this,`shape`,n),n}}))}function Wa(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return La(e,Ta(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return wa(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Ga(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return La(t,Ta(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return wa(this,`shape`,i),i},checks:[]}))}function Ka(e,t,n){return La(t,Ta(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return wa(this,`shape`,i),i}}))}function qa(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ja(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ya(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Xa(e){return typeof e==`string`?e:e?.message}function Za(e,t,n){let r=e.message?e.message:Xa(e.inst?._zod.def?.error?.(e))??Xa(t?.error?.(e))??Xa(n.customError?.(e))??Xa(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Qa(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function $a(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function S(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function eo(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function to(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function no(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function ro(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function io(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return no(t+`=`.repeat((4-t.length%4)%4))}function ao(e){return ro(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function oo(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function so(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var co,lo,uo,fo,po,mo,ho,go,_o,C=t((()=>{ua(),co=Symbol(`evaluating`),lo=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},uo=ya(()=>{if(la.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),fo=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},po=new Set([`string`,`number`,`symbol`]),mo=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),ho={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},go={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},_o=class{constructor(...e){}}}));function vo(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function yo(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}function bo(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},[...i,...s.path]));else if(s.code===`invalid_key`)r({issues:s.issues},[...i,...s.path]);else if(s.code===`invalid_element`)r({issues:s.issues},[...i,...s.path]);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??={},(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??=[],(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function xo(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function So(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${xo(e.path)}`);return t.join(`
|
|
3327
|
+
`)}var Co,wo,To,Eo=t((()=>{ua(),C(),Co=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,va,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},wo=g(`$ZodError`,Co),To=g(`$ZodError`,Co,{Parent:Error})})),Do,Oo,ko,Ao,jo,Mo,No,Po,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo=t((()=>{ua(),Eo(),C(),Do=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new sa;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Za(e,a,_())));throw lo(t,i?.callee),t}return o.value},Oo=Do(To),ko=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>Za(e,a,_())));throw lo(t,i?.callee),t}return o.value},Ao=ko(To),jo=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new sa;return a.issues.length?{success:!1,error:new(e??wo)(a.issues.map(e=>Za(e,i,_())))}:{success:!0,data:a.value}},Mo=jo(To),No=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Za(e,i,_())))}:{success:!0,data:a.value}},Po=No(To),Fo=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Do(e)(t,n,i)},Io=Fo(To),Lo=e=>(t,n,r)=>Do(e)(t,n,r),Ro=Lo(To),zo=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return ko(e)(t,n,i)},Bo=zo(To),Vo=e=>async(t,n,r)=>ko(e)(t,n,r),Ho=Vo(To),Uo=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return jo(e)(t,n,i)},Wo=Uo(To),Go=e=>(t,n,r)=>jo(e)(t,n,r),Ko=Go(To),qo=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return No(e)(t,n,i)},Jo=qo(To),Yo=e=>async(t,n,r)=>No(e)(t,n,r),Xo=Yo(To)})),Qo=n({base64:()=>As,base64url:()=>js,bigint:()=>zs,boolean:()=>Hs,browserEmail:()=>Cs,cidrv4:()=>Os,cidrv6:()=>ks,cuid:()=>as,cuid2:()=>os,date:()=>Ls,datetime:()=>ns,domain:()=>Ns,duration:()=>ds,e164:()=>Fs,email:()=>vs,emoji:()=>$o,extendedDuration:()=>fs,guid:()=>ps,hex:()=>qs,hostname:()=>Ms,html5Email:()=>ys,httpProtocol:()=>Ps,idnEmail:()=>Ss,integer:()=>Bs,ipv4:()=>Ts,ipv6:()=>Es,ksuid:()=>ls,lowercase:()=>Gs,mac:()=>Ds,md5_base64:()=>Ys,md5_base64url:()=>Xs,md5_hex:()=>Js,nanoid:()=>us,null:()=>Us,number:()=>Vs,rfc5322Email:()=>bs,sha1_base64:()=>Qs,sha1_base64url:()=>$s,sha1_hex:()=>Zs,sha256_base64:()=>tc,sha256_base64url:()=>nc,sha256_hex:()=>ec,sha384_base64:()=>ic,sha384_base64url:()=>ac,sha384_hex:()=>rc,sha512_base64:()=>sc,sha512_base64url:()=>cc,sha512_hex:()=>oc,string:()=>Rs,time:()=>ts,ulid:()=>ss,undefined:()=>Ws,unicodeEmail:()=>xs,uppercase:()=>Ks,uuid:()=>ms,uuid4:()=>hs,uuid6:()=>gs,uuid7:()=>_s,xid:()=>cs});function $o(){return new RegExp(ws,`u`)}function es(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ts(e){return RegExp(`^${es(e)}$`)}function ns(e){let t=es({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${Is}T(?:${r})$`)}function rs(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function is(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc,lc=t((()=>{C(),as=/^[cC][0-9a-z]{6,}$/,os=/^[0-9a-z]+$/,ss=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,cs=/^[0-9a-vA-V]{20}$/,ls=/^[A-Za-z0-9]{27}$/,us=/^[a-zA-Z0-9_-]{21}$/,ds=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,fs=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ps=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ms=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,hs=ms(4),gs=ms(6),_s=ms(7),vs=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ys=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,bs=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,xs=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Ss=xs,Cs=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ws=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Ts=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Es=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ds=e=>{let t=Ia(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Os=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,ks=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,As=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,js=/^[A-Za-z0-9_-]*$/,Ms=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Ns=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Ps=/^https?$/,Fs=/^\+[1-9]\d{6,14}$/,Is=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Ls=RegExp(`^${Is}$`),Rs=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},zs=/^-?\d+n?$/,Bs=/^-?\d+$/,Vs=/^-?\d+(?:\.\d+)?$/,Hs=/^(?:true|false)$/i,Us=/^null$/i,Ws=/^undefined$/i,Gs=/^[^A-Z]*$/,Ks=/^[^a-z]*$/,qs=/^[0-9a-fA-F]*$/,Js=/^[0-9a-fA-F]{32}$/,Ys=rs(22,`==`),Xs=is(22),Zs=/^[0-9a-fA-F]{40}$/,Qs=rs(27,`=`),$s=is(27),ec=/^[0-9a-fA-F]{64}$/,tc=rs(43,`=`),nc=is(43),rc=/^[0-9a-fA-F]{96}$/,ic=rs(64,``),ac=is(64),oc=/^[0-9a-fA-F]{128}$/,sc=rs(86,`==`),cc=is(86)}));function uc(e,t,n){e.issues.length&&t.issues.push(...Ya(n,e.issues))}var w,dc,fc,pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc=t((()=>{ua(),lc(),C(),w=g(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),dc={number:`number`,bigint:`bigint`,object:`date`},fc=g(`$ZodCheckLessThan`,(e,t)=>{w.init(e,t);let n=dc[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),pc=g(`$ZodCheckGreaterThan`,(e,t)=>{w.init(e,t);let n=dc[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mc=g(`$ZodCheckMultipleOf`,(e,t)=>{w.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):Sa(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),hc=g(`$ZodCheckNumberFormat`,(e,t)=>{w.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ho[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Bs)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),gc=g(`$ZodCheckBigIntFormat`,(e,t)=>{w.init(e,t);let[n,r]=go[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),_c=g(`$ZodCheckMaxSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ba(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Qa(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vc=g(`$ZodCheckMinSize`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ba(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Qa(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yc=g(`$ZodCheckSizeEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ba(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Qa(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),bc=g(`$ZodCheckMaxLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ba(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=$a(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xc=g(`$ZodCheckMinLength`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ba(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=$a(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sc=g(`$ZodCheckLengthEquals`,(e,t)=>{var n;w.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!ba(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=$a(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Cc=g(`$ZodCheckStringFormat`,(e,t)=>{var n,r;w.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),wc=g(`$ZodCheckRegex`,(e,t)=>{Cc.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Tc=g(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Gs,Cc.init(e,t)}),Ec=g(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Ks,Cc.init(e,t)}),Dc=g(`$ZodCheckIncludes`,(e,t)=>{w.init(e,t);let n=Ia(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Oc=g(`$ZodCheckStartsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`^${Ia(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),kc=g(`$ZodCheckEndsWith`,(e,t)=>{w.init(e,t);let n=RegExp(`.*${Ia(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ac=g(`$ZodCheckProperty`,(e,t)=>{w.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>uc(n,e,t.property));uc(n,e,t.property)}}),jc=g(`$ZodCheckMimeType`,(e,t)=>{w.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Mc=g(`$ZodCheckOverwrite`,(e,t)=>{w.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),Pc,Fc=t((()=>{Pc=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2511
3328
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
2512
|
-
`))}}})),pc,mc=t((()=>{pc={major:4,minor:4,patch:3}}));function hc(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function gc(e){if(!cs.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return hc(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function _c(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function vc(e,t,n){e.issues.length&&t.issues.push(...Ea(n,e.issues)),t.value[n]=e.value}function yc(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Ea(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function bc(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ga(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function xc(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>yc(e,n,i,t,u,d))):yc(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function Sc(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!wa(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Oa(e,r,_())))}),t)}function Cc(e,t,n,r){let i=e.filter(e=>e.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Oa(e,r,_())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1}),t)}function wc(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ua(e)&&ua(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=wc(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=wc(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Tc(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),wa(e))return e;let o=wc(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function Ec(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==`optional`)return n+1;return 0}function Dc(e,t,n){e.issues.length&&t.issues.push(...Ea(n,e.issues)),t.value[n]=e.value}function Oc(e,t,n,r,i){for(let a=0;a<n.length;a++){let n=e[a],o=a<r.length;if(n.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...Ea(a,n.issues))}t.value[a]=n.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function kc(e,t,n,r,i,a,o){e.issues.length&&(Ua.has(typeof r)?n.issues.push(...Ea(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>Oa(e,o,_()))})),t.issues.length&&(Ua.has(typeof r)?n.issues.push(...Ea(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>Oa(e,o,_()))})),n.value.set(e.value,t.value)}function Ac(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function jc(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function Mc(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Nc(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Pc(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function Fc(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>Ic(e,r,t.out,n)):Ic(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>Ic(e,r,t.in,n)):Ic(e,r,t.in,n)}}function Ic(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function Lc(e){return e.value=Object.freeze(e.value),e}function Rc(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(ja(e))}}var T,zc,E,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Yc,Xc,Zc,Qc,$c,el,tl,nl,rl,il,al,ol,sl,cl,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru=t((()=>{uc(),Vi(),fc(),Oo(),Bs(),C(),mc(),T=g(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pc;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=wa(e),i;for(let a of t){if(a._zod.def.when){if(Ta(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new Ri;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=wa(e,t))});else{if(e.issues.length===t)continue;r||=wa(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(wa(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new Ri;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new Ri;return o.then(e=>t(e,r,a))}return t(o,r,a)}}y(e,`~standard`,()=>({validate:t=>{try{let n=co(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return uo(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),zc=g(`$ZodString`,(e,t)=>{T.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hs(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),E=g(`$ZodStringFormat`,(e,t)=>{ec.init(e,t),zc.init(e,t)}),Bc=g(`$ZodGUID`,(e,t)=>{t.pattern??=Wo,E.init(e,t)}),Vc=g(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Go(e)}else t.pattern??=Go();E.init(e,t)}),Hc=g(`$ZodEmail`,(e,t)=>{t.pattern??=Yo,E.init(e,t)}),Uc=g(`$ZodURL`,(e,t)=>{E.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===ds.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Wc=g(`$ZodEmoji`,(e,t)=>{t.pattern??=Ao(),E.init(e,t)}),Gc=g(`$ZodNanoID`,(e,t)=>{t.pattern??=Vo,E.init(e,t)}),Kc=g(`$ZodCUID`,(e,t)=>{t.pattern??=Io,E.init(e,t)}),qc=g(`$ZodCUID2`,(e,t)=>{t.pattern??=Lo,E.init(e,t)}),Jc=g(`$ZodULID`,(e,t)=>{t.pattern??=Ro,E.init(e,t)}),Yc=g(`$ZodXID`,(e,t)=>{t.pattern??=zo,E.init(e,t)}),Xc=g(`$ZodKSUID`,(e,t)=>{t.pattern??=Bo,E.init(e,t)}),Zc=g(`$ZodISODateTime`,(e,t)=>{t.pattern??=No(t),E.init(e,t)}),Qc=g(`$ZodISODate`,(e,t)=>{t.pattern??=ms,E.init(e,t)}),$c=g(`$ZodISOTime`,(e,t)=>{t.pattern??=Mo(t),E.init(e,t)}),el=g(`$ZodISODuration`,(e,t)=>{t.pattern??=Ho,E.init(e,t)}),tl=g(`$ZodIPv4`,(e,t)=>{t.pattern??=ns,E.init(e,t),e._zod.bag.format=`ipv4`}),nl=g(`$ZodIPv6`,(e,t)=>{t.pattern??=rs,E.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),rl=g(`$ZodMAC`,(e,t)=>{t.pattern??=is(t.delimiter),E.init(e,t),e._zod.bag.format=`mac`}),il=g(`$ZodCIDRv4`,(e,t)=>{t.pattern??=as,E.init(e,t)}),al=g(`$ZodCIDRv6`,(e,t)=>{t.pattern??=os,E.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),ol=g(`$ZodBase64`,(e,t)=>{t.pattern??=ss,E.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{hc(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),sl=g(`$ZodBase64URL`,(e,t)=>{t.pattern??=cs,E.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{gc(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),cl=g(`$ZodE164`,(e,t)=>{t.pattern??=fs,E.init(e,t)}),ll=g(`$ZodJWT`,(e,t)=>{E.init(e,t),e._zod.check=n=>{_c(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ul=g(`$ZodCustomStringFormat`,(e,t)=>{E.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),dl=g(`$ZodNumber`,(e,t)=>{T.init(e,t),e._zod.pattern=e._zod.bag.pattern??vs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),fl=g(`$ZodNumberFormat`,(e,t)=>{Ks.init(e,t),dl.init(e,t)}),pl=g(`$ZodBoolean`,(e,t)=>{T.init(e,t),e._zod.pattern=ys,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ml=g(`$ZodBigInt`,(e,t)=>{T.init(e,t),e._zod.pattern=gs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),hl=g(`$ZodBigIntFormat`,(e,t)=>{qs.init(e,t),ml.init(e,t)}),gl=g(`$ZodSymbol`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),_l=g(`$ZodUndefined`,(e,t)=>{T.init(e,t),e._zod.pattern=xs,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),vl=g(`$ZodNull`,(e,t)=>{T.init(e,t),e._zod.pattern=bs,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),yl=g(`$ZodAny`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),bl=g(`$ZodUnknown`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),xl=g(`$ZodNever`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Sl=g(`$ZodVoid`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Cl=g(`$ZodDate`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),wl=g(`$ZodArray`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>vc(t,n,e))):vc(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),Tl=g(`$ZodObject`,(e,t)=>{if(T.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=Xi(()=>bc(t));y(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=la,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>yc(n,t,e,s,r,i))):yc(a,t,e,s,r,i)}return i?xc(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),El=g(`$ZodObjectJIT`,(e,t)=>{Tl.init(e,t);let n=e._zod.parse,r=Xi(()=>bc(t)),i=e=>{let t=new dc([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=sa(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=sa(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
3329
|
+
`))}}})),Ic,Lc=t((()=>{Ic={major:4,minor:4,patch:3}}));function Rc(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function zc(e){if(!js.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Rc(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Bc(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Vc(e,t,n){e.issues.length&&t.issues.push(...Ya(n,e.issues)),t.value[n]=e.value}function Hc(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...Ya(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function Uc(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=za(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Wc(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Hc(e,n,i,t,u,d))):Hc(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}function Gc(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!qa(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Za(e,r,_())))}),t)}function Kc(e,t,n,r){let i=e.filter(e=>e.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Za(e,r,_())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1}),t)}function qc(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Na(e)&&Na(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=qc(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=qc(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Jc(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),qa(e))return e;let o=qc(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}function Yc(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==`optional`)return n+1;return 0}function Xc(e,t,n){e.issues.length&&t.issues.push(...Ya(n,e.issues)),t.value[n]=e.value}function Zc(e,t,n,r,i){for(let a=0;a<n.length;a++){let n=e[a],o=a<r.length;if(n.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...Ya(a,n.issues))}t.value[a]=n.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function Qc(e,t,n,r,i,a,o){e.issues.length&&(po.has(typeof r)?n.issues.push(...Ya(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>Za(e,o,_()))})),t.issues.length&&(po.has(typeof r)?n.issues.push(...Ya(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>Za(e,o,_()))})),n.value.set(e.value,t.value)}function $c(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function el(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function tl(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function nl(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function rl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function il(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>al(e,r,t.out,n)):al(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>al(e,r,t.in,n)):al(e,r,t.in,n)}}function al(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function ol(e){return e.value=Object.freeze(e.value),e}function sl(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(eo(e))}}var T,cl,E,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru,iu,au,ou,su,cu,lu,uu,du,fu,pu,mu,hu,gu,_u,vu,yu,bu,xu,Su,Cu,wu,Tu,Eu=t((()=>{Nc(),ua(),Fc(),Zo(),lc(),C(),Lc(),T=g(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ic;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=qa(e),i;for(let a of t){if(a._zod.def.when){if(Ja(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new sa;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=qa(e,t))});else{if(e.issues.length===t)continue;r||=qa(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(qa(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new sa;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new sa;return o.then(e=>t(e,r,a))}return t(o,r,a)}}y(e,`~standard`,()=>({validate:t=>{try{let n=Mo(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Po(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),cl=g(`$ZodString`,(e,t)=>{T.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Rs(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),E=g(`$ZodStringFormat`,(e,t)=>{Cc.init(e,t),cl.init(e,t)}),ll=g(`$ZodGUID`,(e,t)=>{t.pattern??=ps,E.init(e,t)}),ul=g(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ms(e)}else t.pattern??=ms();E.init(e,t)}),dl=g(`$ZodEmail`,(e,t)=>{t.pattern??=vs,E.init(e,t)}),fl=g(`$ZodURL`,(e,t)=>{E.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Ps.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),pl=g(`$ZodEmoji`,(e,t)=>{t.pattern??=$o(),E.init(e,t)}),ml=g(`$ZodNanoID`,(e,t)=>{t.pattern??=us,E.init(e,t)}),hl=g(`$ZodCUID`,(e,t)=>{t.pattern??=as,E.init(e,t)}),gl=g(`$ZodCUID2`,(e,t)=>{t.pattern??=os,E.init(e,t)}),_l=g(`$ZodULID`,(e,t)=>{t.pattern??=ss,E.init(e,t)}),vl=g(`$ZodXID`,(e,t)=>{t.pattern??=cs,E.init(e,t)}),yl=g(`$ZodKSUID`,(e,t)=>{t.pattern??=ls,E.init(e,t)}),bl=g(`$ZodISODateTime`,(e,t)=>{t.pattern??=ns(t),E.init(e,t)}),xl=g(`$ZodISODate`,(e,t)=>{t.pattern??=Ls,E.init(e,t)}),Sl=g(`$ZodISOTime`,(e,t)=>{t.pattern??=ts(t),E.init(e,t)}),Cl=g(`$ZodISODuration`,(e,t)=>{t.pattern??=ds,E.init(e,t)}),wl=g(`$ZodIPv4`,(e,t)=>{t.pattern??=Ts,E.init(e,t),e._zod.bag.format=`ipv4`}),Tl=g(`$ZodIPv6`,(e,t)=>{t.pattern??=Es,E.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),El=g(`$ZodMAC`,(e,t)=>{t.pattern??=Ds(t.delimiter),E.init(e,t),e._zod.bag.format=`mac`}),Dl=g(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Os,E.init(e,t)}),Ol=g(`$ZodCIDRv6`,(e,t)=>{t.pattern??=ks,E.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}}),kl=g(`$ZodBase64`,(e,t)=>{t.pattern??=As,E.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Rc(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Al=g(`$ZodBase64URL`,(e,t)=>{t.pattern??=js,E.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{zc(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),jl=g(`$ZodE164`,(e,t)=>{t.pattern??=Fs,E.init(e,t)}),Ml=g(`$ZodJWT`,(e,t)=>{E.init(e,t),e._zod.check=n=>{Bc(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Nl=g(`$ZodCustomStringFormat`,(e,t)=>{E.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Pl=g(`$ZodNumber`,(e,t)=>{T.init(e,t),e._zod.pattern=e._zod.bag.pattern??Vs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Fl=g(`$ZodNumberFormat`,(e,t)=>{hc.init(e,t),Pl.init(e,t)}),Il=g(`$ZodBoolean`,(e,t)=>{T.init(e,t),e._zod.pattern=Hs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Ll=g(`$ZodBigInt`,(e,t)=>{T.init(e,t),e._zod.pattern=zs,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Rl=g(`$ZodBigIntFormat`,(e,t)=>{gc.init(e,t),Ll.init(e,t)}),zl=g(`$ZodSymbol`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),Bl=g(`$ZodUndefined`,(e,t)=>{T.init(e,t),e._zod.pattern=Ws,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Vl=g(`$ZodNull`,(e,t)=>{T.init(e,t),e._zod.pattern=Us,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Hl=g(`$ZodAny`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),Ul=g(`$ZodUnknown`,(e,t)=>{T.init(e,t),e._zod.parse=e=>e}),Wl=g(`$ZodNever`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Gl=g(`$ZodVoid`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Kl=g(`$ZodDate`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),ql=g(`$ZodArray`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Vc(t,n,e))):Vc(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}}),Jl=g(`$ZodObject`,(e,t)=>{if(T.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),n}})}let n=ya(()=>Uc(t));y(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=Ma,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Hc(n,t,e,s,r,i))):Hc(a,t,e,s,r,i)}return i?Wc(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),Yl=g(`$ZodObjectJIT`,(e,t)=>{Jl.init(e,t);let n=e._zod.parse,r=ya(()=>Uc(t)),i=e=>{let t=new Pc([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=Aa(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=Aa(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
|
|
2513
3330
|
if (${n}.issues.length) {
|
|
2514
3331
|
if (${o} in input) {
|
|
2515
3332
|
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
@@ -2568,15 +3385,15 @@ ${c}
|
|
|
2568
3385
|
}
|
|
2569
3386
|
}
|
|
2570
3387
|
|
|
2571
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=la,s=!Bi.jitless,c=s&&Va.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?xc([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),Dl=g(`$ZodUnion`,(e,t)=>{T.init(e,t),y(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),y(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),y(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),y(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Qi(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Sc(t,r,e,i)):Sc(o,r,e,i)}}),Ol=g(`$ZodXor`,(e,t)=>{Dl.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Cc(t,r,e,i)):Cc(o,r,e,i)}}),kl=g(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Dl.init(e,t);let n=e._zod.parse;y(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Xi(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!la(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Al=g(`$ZodIntersection`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Tc(e,t,n)):Tc(e,i,a)}}),jl=g(`$ZodTuple`,(e,t)=>{T.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=Ec(n,`optin`),c=Ec(n,`optout`);if(!t.rest){if(a.length<s)return r.issues.push({code:`too_small`,minimum:s,inclusive:!0,input:a,inst:e,origin:`array`}),r;a.length>n.length&&r.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:a,inst:e,origin:`array`})}let l=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=n.length-1,s=a.slice(n.length);for(let n of s){e++;let a=t.rest._zod.run({value:n,issues:[]},i);a instanceof Promise?o.push(a.then(t=>Dc(t,r,e))):Dc(a,r,e)}}return o.length?Promise.all(o).then(()=>Oc(l,r,n,a,c)):Oc(l,r,n,a,c)}}),Ml=g(`$ZodRecord`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!ua(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Oa(e,r,_())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Ea(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Ea(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&vs.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Oa(e,r,_())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Ea(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Ea(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Nl=g(`$ZodMap`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{kc(t,a,n,o,i,e,r)})):kc(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}}),Pl=g(`$ZodSet`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>Ac(e,n))):Ac(i,n)}return a.length?Promise.all(a).then(()=>n):n}}),Fl=g(`$ZodEnum`,(e,t)=>{T.init(e,t);let n=Ji(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Ua.has(typeof e)).map(e=>typeof e==`string`?pa(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Il=g(`$ZodLiteral`,(e,t)=>{if(T.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?pa(e):e?pa(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Ll=g(`$ZodFile`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),Rl=g(`$ZodTransform`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zi(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new Ri;return n.value=i,n.fallback=!0,n}}),zl=g(`$ZodOptional`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Qi(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>jc(e,r)):jc(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Bl=g(`$ZodExactOptional`,(e,t)=>{zl.init(e,t),y(e._zod,`values`,()=>t.innerType._zod.values),y(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Vl=g(`$ZodNullable`,(e,t)=>{T.init(e,t),y(e._zod,`optin`,()=>t.innerType._zod.optin),y(e._zod,`optout`,()=>t.innerType._zod.optout),y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Qi(e.source)}|null)$`):void 0}),y(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Hl=g(`$ZodDefault`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Mc(e,t)):Mc(r,t)}}),Ul=g(`$ZodPrefault`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Wl=g(`$ZodNonOptional`,(e,t)=>{T.init(e,t),y(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Nc(t,e)):Nc(i,e)}}),Gl=g(`$ZodSuccess`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new zi(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),Kl=g(`$ZodCatch`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,y(e._zod,`optout`,()=>t.innerType._zod.optout),y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Oa(e,n,_()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Oa(e,n,_()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),ql=g(`$ZodNaN`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),Jl=g(`$ZodPipe`,(e,t)=>{T.init(e,t),y(e._zod,`values`,()=>t.in._zod.values),y(e._zod,`optin`,()=>t.in._zod.optin),y(e._zod,`optout`,()=>t.out._zod.optout),y(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Pc(e,t.in,n)):Pc(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Pc(e,t.out,n)):Pc(r,t.out,n)}}),Yl=g(`$ZodCodec`,(e,t)=>{T.init(e,t),y(e._zod,`values`,()=>t.in._zod.values),y(e._zod,`optin`,()=>t.in._zod.optin),y(e._zod,`optout`,()=>t.out._zod.optout),y(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Fc(e,t,n)):Fc(r,t,n)}else{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Fc(e,t,n)):Fc(r,t,n)}}}),Xl=g(`$ZodPreprocess`,(e,t)=>{Jl.init(e,t)}),Zl=g(`$ZodReadonly`,(e,t)=>{T.init(e,t),y(e._zod,`propValues`,()=>t.innerType._zod.propValues),y(e._zod,`values`,()=>t.innerType._zod.values),y(e._zod,`optin`,()=>t.innerType?._zod?.optin),y(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Lc):Lc(r)}}),Ql=g(`$ZodTemplateLiteral`,(e,t)=>{T.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||Wa.has(typeof e))n.push(pa(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),$l=g(`$ZodFunction`,(e,t)=>(T.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return function(...n){let r=e._def.input?io(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?io(e._def.output,i):i}},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return async function(...n){let r=e._def.input?await oo(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await oo(e._def.output,i):i}},e._zod.parse=(t,n)=>typeof t.value==`function`?(e._def.output&&e._def.output._zod.def.type===`promise`?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new jl({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),eu=g(`$ZodPromise`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),tu=g(`$ZodLazy`,(e,t)=>{T.init(e,t),y(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),y(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),y(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),y(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),y(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),nu=g(`$ZodCustom`,(e,t)=>{w.init(e,t),T.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Rc(t,n,r,e));Rc(i,n,r,e)}})}));function iu(){return{localeError:au()}}var au,ou=t((()=>{C(),au=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${x(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${v(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function su(){return{localeError:cu()}}var cu,lu=t((()=>{C(),cu=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${x(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function uu(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function du(){return{localeError:fu()}}var fu,pu=t((()=>{C(),fu=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${x(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=uu(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=uu(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function mu(){return{localeError:hu()}}var hu,gu=t((()=>{C(),hu=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${x(e.values[0])}`:`Невалидна опция: очаквано едно от ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function _u(){return{localeError:vu()}}var vu,yu=t((()=>{C(),vu=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${x(e.values[0])}`:`Opció invàlida: s'esperava una de ${v(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function bu(){return{localeError:xu()}}var xu,Su=t((()=>{C(),xu=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${x(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${v(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function Cu(){return{localeError:wu()}}var wu,Tu=t((()=>{C(),wu=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-område`,ipv6:`IPv6-område`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${x(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function Eu(){return{localeError:Du()}}var Du,Ou=t((()=>{C(),Du=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${x(e.values[0])}`:`Ungültige Option: erwartet eine von ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function ku(){return{localeError:Au()}}var Au,ju=t((()=>{C(),Au=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${x(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function Mu(){return{localeError:Nu()}}var Nu,Pu=t((()=>{C(),Nu=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${x(e.values[0])}`:`Invalid option: expected one of ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function Fu(){return{localeError:Iu()}}var Iu,Lu=t((()=>{C(),Iu=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${x(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function Ru(){return{localeError:zu()}}var zu,Bu=t((()=>{C(),zu=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${x(e.values[0])}`:`Opción inválida: se esperaba una de ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function Vu(){return{localeError:Hu()}}var Hu,Uu=t((()=>{C(),Hu=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${i} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: میبایست ${x(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${v(e.values,`|`)} میبود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${v(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function Wu(){return{localeError:Gu()}}var Gu,Ku=t((()=>{C(),Gu=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${x(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function qu(){return{localeError:Ju()}}var Ju,Yu=t((()=>{C(),Ju=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`enregistrement`,map:`carte`,set:`ensemble`,file:`fichier`,nonoptional:`non-optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${x(e.values[0])} attendu`:`Option invalide : une valeur parmi ${v(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${v(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Xu(){return{localeError:Zu()}}var Zu,Qu=t((()=>{C(),Zu=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${x(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${v(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function $u(){return{localeError:ed()}}var ed,td=t((()=>{C(),ed=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},jwt:{label:`JWT`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=S(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${x(t.values[0])}`;let e=t.values.map(e=>x(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${v(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function nd(){return{localeError:rd()}}var rd,id=t((()=>{C(),rd=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${x(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function ad(){return{localeError:od()}}var od,sd=t((()=>{C(),od=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${x(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function cd(e,t,n){return Math.abs(e)===1?t:n}function ld(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function ud(){return{localeError:dd()}}var dd,fd=t((()=>{C(),dd=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${x(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=cd(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ld(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ld(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=cd(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ld(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ld(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${v(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${ld(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${ld(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function pd(){return{localeError:md()}}var md,hd=t((()=>{C(),md=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${x(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function gd(){return{localeError:_d()}}var _d,vd=t((()=>{C(),_d=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${x(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function yd(){return{localeError:bd()}}var bd,xd=t((()=>{C(),bd=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${x(e.values[0])}`:`Opzione non valida: atteso uno tra ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function Sd(){return{localeError:Cd()}}var Cd,wd=t((()=>{C(),Cd=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${x(e.values[0])}が期待されました`:`無効な選択: ${v(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${v(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function Td(){return{localeError:Ed()}}var Ed,Dd=t((()=>{C(),Ed=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${x(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${v(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function Od(){return{localeError:kd()}}var kd,Ad=t((()=>{C(),kd=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${x(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${v(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function jd(){return Od()}var Md=t((()=>{Ad()}));function Nd(){return{localeError:Pd()}}var Pd,Fd=t((()=>{C(),Pd=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${x(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${v(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${v(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function Id(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function Ld(){return{localeError:zd()}}var Rd,zd,Bd=t((()=>{C(),Rd=e=>e.charAt(0).toUpperCase()+e.slice(1),zd=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${x(e.values[0])}`:`Privalo būti vienas iš ${v(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,Id(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${Rd(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${Rd(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,Id(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${Rd(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${Rd(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:return`${Rd(r[e.origin]??e.origin??e.origin??`reikšmė`)} turi klaidingą įvestį`;default:return`Klaidinga įvestis`}}}}));function Vd(){return{localeError:Hd()}}var Hd,Ud=t((()=>{C(),Hd=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${x(e.values[0])}`:`Грешана опција: се очекува една ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function Wd(){return{localeError:Gd()}}var Gd,Kd=t((()=>{C(),Gd=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${x(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${v(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function qd(){return{localeError:Jd()}}var Jd,Yd=t((()=>{C(),Jd=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${x(e.values[0])}`:`Ongeldige optie: verwacht één van ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function Xd(){return{localeError:Zd()}}var Zd,Qd=t((()=>{C(),Zd=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-område`,ipv6:`IPv6-område`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${x(e.values[0])}`:`Ugyldig valg: forventet en av ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function $d(){return{localeError:ef()}}var ef,tf=t((()=>{C(),ef=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${x(e.values[0])}`:`Fâsit tercih: mûteberler ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function nf(){return{localeError:rf()}}var rf,af=t((()=>{C(),rf=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${x(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${v(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function of(){return{localeError:sf()}}var sf,cf=t((()=>{C(),sf=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${x(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function lf(){return{localeError:uf()}}var uf,df=t((()=>{C(),uf=()=>{let e={string:{unit:`caracteres`,verb:`ter`},file:{unit:`bytes`,verb:`ter`},array:{unit:`itens`,verb:`ter`},set:{unit:`itens`,verb:`ter`}};function t(t){return e[t]??null}let n={regex:`padrão`,email:`endereço de e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`duração ISO`,ipv4:`endereço IPv4`,ipv6:`endereço IPv6`,cidrv4:`faixa de IPv4`,cidrv6:`faixa de IPv6`,base64:`texto codificado em base64`,base64url:`URL codificada em base64`,json_string:`texto JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,number:`número`,null:`nulo`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${i}`:`Tipo inválido: esperado ${t}, recebido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: esperado ${x(e.values[0])}`:`Opção inválida: esperada uma das ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Muito grande: esperado que ${e.origin??`valor`} tivesse ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Muito grande: esperado que ${e.origin??`valor`} fosse ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Chave${e.keys.length>1?`s`:``} desconhecida${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Chave inválida em ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido em ${e.origin}`;default:return`Campo inválido`}}}}));function ff(){return{localeError:pf()}}var pf,mf=t((()=>{C(),pf=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${x(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${v(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function hf(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function gf(){return{localeError:_f()}}var _f,vf=t((()=>{C(),_f=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${x(e.values[0])}`:`Неверный вариант: ожидалось одно из ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=hf(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=hf(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function yf(){return{localeError:bf()}}var bf,xf=t((()=>{C(),bf=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${x(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function Sf(){return{localeError:Cf()}}var Cf,wf=t((()=>{C(),Cf=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-intervall`,ipv6:`IPv6-intervall`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${x(e.values[0])}`:`Ogiltigt val: förväntade en av ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function Tf(){return{localeError:Ef()}}var Ef,Df=t((()=>{C(),Ef=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${x(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${v(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function Of(){return{localeError:kf()}}var kf,Af=t((()=>{C(),kf=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${x(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${v(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function jf(){return{localeError:Mf()}}var Mf,Nf=t((()=>{C(),Mf=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${x(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function Pf(){return{localeError:Ff()}}var Ff,If=t((()=>{C(),Ff=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${x(e.values[0])}`:`Неправильна опція: очікується одне з ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function Lf(){return Pf()}var Rf=t((()=>{If()}));function zf(){return{localeError:Bf()}}var Bf,Vf=t((()=>{C(),Bf=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${x(e.values[0])} متوقع تھا`:`غلط آپشن: ${v(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${v(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function Hf(){return{localeError:Uf()}}var Uf,Wf=t((()=>{C(),Uf=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${x(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function Gf(){return{localeError:Kf()}}var Kf,qf=t((()=>{C(),Kf=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${x(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${v(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function Jf(){return{localeError:Yf()}}var Yf,Xf=t((()=>{C(),Yf=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${x(e.values[0])}`:`无效选项:期望以下之一 ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function Zf(){return{localeError:Qf()}}var Qf,$f=t((()=>{C(),Qf=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${x(e.values[0])}`:`無效的選項:預期為以下其中之一 ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${v(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function ep(){return{localeError:tp()}}var tp,np=t((()=>{C(),tp=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${x(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${v(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),rp=n({ar:()=>iu,az:()=>su,be:()=>du,bg:()=>mu,ca:()=>_u,cs:()=>bu,da:()=>Cu,de:()=>Eu,el:()=>ku,en:()=>Mu,eo:()=>Fu,es:()=>Ru,fa:()=>Vu,fi:()=>Wu,fr:()=>qu,frCA:()=>Xu,he:()=>$u,hr:()=>nd,hu:()=>ad,hy:()=>ud,id:()=>pd,is:()=>gd,it:()=>yd,ja:()=>Sd,ka:()=>Td,kh:()=>jd,km:()=>Od,ko:()=>Nd,lt:()=>Ld,mk:()=>Vd,ms:()=>Wd,nl:()=>qd,no:()=>Xd,ota:()=>$d,pl:()=>of,ps:()=>nf,pt:()=>lf,ro:()=>ff,ru:()=>gf,sl:()=>yf,sv:()=>Sf,ta:()=>Tf,th:()=>Of,tr:()=>jf,ua:()=>Lf,uk:()=>Pf,ur:()=>zf,uz:()=>Hf,vi:()=>Gf,yo:()=>ep,zhCN:()=>Jf,zhTW:()=>Zf}),ip=t((()=>{ou(),lu(),pu(),gu(),yu(),Su(),Tu(),Ou(),ju(),Pu(),Lu(),Bu(),Uu(),Ku(),Yu(),Qu(),td(),id(),sd(),fd(),hd(),vd(),xd(),wd(),Dd(),Md(),Ad(),Fd(),Bd(),Ud(),Kd(),Yd(),Qd(),tf(),af(),cf(),df(),mf(),vf(),xf(),wf(),Df(),Af(),Nf(),Rf(),If(),Vf(),Wf(),qf(),Xf(),$f(),np()}));function ap(){return new lp}var op,sp,cp,lp,up,dp=t((()=>{sp=Symbol(`ZodOutput`),cp=Symbol(`ZodInput`),lp=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(op=globalThis).__zod_globalRegistry??(op.__zod_globalRegistry=ap()),up=globalThis.__zod_globalRegistry}));function fp(e,t){return new e({type:`string`,...b(t)})}function pp(e,t){return new e({type:`string`,coerce:!0,...b(t)})}function mp(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...b(t)})}function hp(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...b(t)})}function gp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...b(t)})}function _p(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...b(t)})}function vp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...b(t)})}function yp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...b(t)})}function bp(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...b(t)})}function xp(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...b(t)})}function Sp(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...b(t)})}function Cp(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...b(t)})}function wp(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...b(t)})}function Tp(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...b(t)})}function Ep(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...b(t)})}function Dp(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...b(t)})}function Op(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...b(t)})}function kp(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...b(t)})}function Ap(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...b(t)})}function jp(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...b(t)})}function Mp(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...b(t)})}function Np(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...b(t)})}function Pp(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...b(t)})}function Fp(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...b(t)})}function Ip(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...b(t)})}function Lp(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...b(t)})}function Rp(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...b(t)})}function zp(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...b(t)})}function Bp(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...b(t)})}function Vp(e,t){return new e({type:`number`,checks:[],...b(t)})}function Hp(e,t){return new e({type:`number`,coerce:!0,checks:[],...b(t)})}function Up(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...b(t)})}function Wp(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...b(t)})}function Gp(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...b(t)})}function Kp(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...b(t)})}function qp(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...b(t)})}function Jp(e,t){return new e({type:`boolean`,...b(t)})}function Yp(e,t){return new e({type:`boolean`,coerce:!0,...b(t)})}function Xp(e,t){return new e({type:`bigint`,...b(t)})}function Zp(e,t){return new e({type:`bigint`,coerce:!0,...b(t)})}function Qp(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...b(t)})}function $p(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...b(t)})}function em(e,t){return new e({type:`symbol`,...b(t)})}function tm(e,t){return new e({type:`undefined`,...b(t)})}function nm(e,t){return new e({type:`null`,...b(t)})}function rm(e){return new e({type:`any`})}function im(e){return new e({type:`unknown`})}function am(e,t){return new e({type:`never`,...b(t)})}function om(e,t){return new e({type:`void`,...b(t)})}function sm(e,t){return new e({type:`date`,...b(t)})}function cm(e,t){return new e({type:`date`,coerce:!0,...b(t)})}function lm(e,t){return new e({type:`nan`,...b(t)})}function um(e,t){return new Us({check:`less_than`,...b(t),value:e,inclusive:!1})}function dm(e,t){return new Us({check:`less_than`,...b(t),value:e,inclusive:!0})}function fm(e,t){return new Ws({check:`greater_than`,...b(t),value:e,inclusive:!1})}function D(e,t){return new Ws({check:`greater_than`,...b(t),value:e,inclusive:!0})}function pm(e){return fm(0,e)}function mm(e){return um(0,e)}function hm(e){return dm(0,e)}function gm(e){return D(0,e)}function _m(e,t){return new Gs({check:`multiple_of`,...b(t),value:e})}function vm(e,t){return new Js({check:`max_size`,...b(t),maximum:e})}function ym(e,t){return new Ys({check:`min_size`,...b(t),minimum:e})}function bm(e,t){return new Xs({check:`size_equals`,...b(t),size:e})}function xm(e,t){return new Zs({check:`max_length`,...b(t),maximum:e})}function Sm(e,t){return new Qs({check:`min_length`,...b(t),minimum:e})}function Cm(e,t){return new $s({check:`length_equals`,...b(t),length:e})}function wm(e,t){return new tc({check:`string_format`,format:`regex`,...b(t),pattern:e})}function Tm(e){return new nc({check:`string_format`,format:`lowercase`,...b(e)})}function Em(e){return new rc({check:`string_format`,format:`uppercase`,...b(e)})}function Dm(e,t){return new ic({check:`string_format`,format:`includes`,...b(t),includes:e})}function Om(e,t){return new ac({check:`string_format`,format:`starts_with`,...b(t),prefix:e})}function km(e,t){return new oc({check:`string_format`,format:`ends_with`,...b(t),suffix:e})}function Am(e,t,n){return new sc({check:`property`,property:e,schema:t,...b(n)})}function jm(e,t){return new cc({check:`mime_type`,mime:e,...b(t)})}function Mm(e){return new lc({check:`overwrite`,tx:e})}function Nm(e){return Mm(t=>t.normalize(e))}function Pm(){return Mm(e=>e.trim())}function Fm(){return Mm(e=>e.toLowerCase())}function Im(){return Mm(e=>e.toUpperCase())}function Lm(){return Mm(e=>ca(e))}function Rm(e,t,n){return new e({type:`array`,element:t,...b(n)})}function zm(e,t,n){return new e({type:`union`,options:t,...b(n)})}function Bm(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...b(n)})}function Vm(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...b(r)})}function Hm(e,t,n){return new e({type:`intersection`,left:t,right:n})}function Um(e,t,n,r){let i=n instanceof T;return new e({type:`tuple`,items:t,rest:i?n:null,...b(i?r:n)})}function Wm(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...b(r)})}function Gm(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...b(r)})}function Km(e,t,n){return new e({type:`set`,valueType:t,...b(n)})}function qm(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...b(n)})}function Jm(e,t,n){return new e({type:`enum`,entries:t,...b(n)})}function Ym(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...b(n)})}function Xm(e,t){return new e({type:`file`,...b(t)})}function Zm(e,t){return new e({type:`transform`,transform:t})}function Qm(e,t){return new e({type:`optional`,innerType:t})}function $m(e,t){return new e({type:`nullable`,innerType:t})}function eh(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():da(n)}})}function th(e,t,n){return new e({type:`nonoptional`,innerType:t,...b(n)})}function nh(e,t){return new e({type:`success`,innerType:t})}function rh(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:()=>n})}function ih(e,t,n){return new e({type:`pipe`,in:t,out:n})}function ah(e,t){return new e({type:`readonly`,innerType:t})}function oh(e,t,n){return new e({type:`template_literal`,parts:t,...b(n)})}function sh(e,t){return new e({type:`lazy`,getter:t})}function ch(e,t){return new e({type:`promise`,innerType:t})}function lh(e,t,n){let r=b(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function uh(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...b(n)})}function dh(e,t){let n=fh(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ja(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(ja(r))}},e(t.value,t)),t);return n}function fh(e,t){let n=new w({check:`custom`,...b(t)});return n._zod.check=e,n}function ph(e){let t=new w({check:`describe`});return t._zod.onattach=[t=>{let n=up.get(t)??{};up.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function mh(e){let t=new w({check:`meta`});return t._zod.onattach=[t=>{let n=up.get(t)??{};up.add(t,{...n,...e})}],t._zod.check=()=>{},t}function hh(e,t){let n=b(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??Yl,c=e.Boolean??pl,l=new s({type:`pipe`,in:new(e.String??zc)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:o.has(r)?!1:(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l}function gh(e,t,n,r={}){let i=b(r),a={...b(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var _h,vh=t((()=>{uc(),dp(),ru(),C(),_h={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function yh(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??up,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function O(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,O(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&k(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function bh(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
3388
|
+
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Ma,s=!la.jitless,c=s&&uo.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Wc([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}}),Xl=g(`$ZodUnion`,(e,t)=>{T.init(e,t),y(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),y(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),y(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),y(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>xa(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Gc(t,r,e,i)):Gc(o,r,e,i)}}),Zl=g(`$ZodXor`,(e,t)=>{Xl.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Kc(t,r,e,i)):Kc(o,r,e,i)}}),Ql=g(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Xl.init(e,t);let n=e._zod.parse;y(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=ya(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Ma(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),$l=g(`$ZodIntersection`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Jc(e,t,n)):Jc(e,i,a)}}),eu=g(`$ZodTuple`,(e,t)=>{T.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=Yc(n,`optin`),c=Yc(n,`optout`);if(!t.rest){if(a.length<s)return r.issues.push({code:`too_small`,minimum:s,inclusive:!0,input:a,inst:e,origin:`array`}),r;a.length>n.length&&r.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:a,inst:e,origin:`array`})}let l=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=n.length-1,s=a.slice(n.length);for(let n of s){e++;let a=t.rest._zod.run({value:n,issues:[]},i);a instanceof Promise?o.push(a.then(t=>Xc(t,r,e))):Xc(a,r,e)}}return o.length?Promise.all(o).then(()=>Zc(l,r,n,a,c)):Zc(l,r,n,a,c)}}),tu=g(`$ZodRecord`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Na(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>Za(e,r,_())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...Ya(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...Ya(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&Vs.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Za(e,r,_())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...Ya(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...Ya(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),nu=g(`$ZodMap`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:`map`,code:`invalid_type`,input:i,inst:e}),n;let a=[];n.value=new Map;for(let[o,s]of i){let c=t.keyType._zod.run({value:o,issues:[]},r),l=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise||l instanceof Promise?a.push(Promise.all([c,l]).then(([t,a])=>{Qc(t,a,n,o,i,e,r)})):Qc(c,l,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}}),ru=g(`$ZodSet`,(e,t)=>{T.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:`set`,code:`invalid_type`}),n;let a=[];n.value=new Set;for(let e of i){let i=t.valueType._zod.run({value:e,issues:[]},r);i instanceof Promise?a.push(i.then(e=>$c(e,n))):$c(i,n)}return a.length?Promise.all(a).then(()=>n):n}}),iu=g(`$ZodEnum`,(e,t)=>{T.init(e,t);let n=_a(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>po.has(typeof e)).map(e=>typeof e==`string`?Ia(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),au=g(`$ZodLiteral`,(e,t)=>{if(T.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Ia(e):e?Ia(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),ou=g(`$ZodFile`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),su=g(`$ZodTransform`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ca(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new sa;return n.value=i,n.fallback=!0,n}}),cu=g(`$ZodOptional`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${xa(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>el(e,r)):el(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),lu=g(`$ZodExactOptional`,(e,t)=>{cu.init(e,t),y(e._zod,`values`,()=>t.innerType._zod.values),y(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),uu=g(`$ZodNullable`,(e,t)=>{T.init(e,t),y(e._zod,`optin`,()=>t.innerType._zod.optin),y(e._zod,`optout`,()=>t.innerType._zod.optout),y(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${xa(e.source)}|null)$`):void 0}),y(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),du=g(`$ZodDefault`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>tl(e,t)):tl(r,t)}}),fu=g(`$ZodPrefault`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),pu=g(`$ZodNonOptional`,(e,t)=>{T.init(e,t),y(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>nl(t,e)):nl(i,e)}}),mu=g(`$ZodSuccess`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new ca(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),hu=g(`$ZodCatch`,(e,t)=>{T.init(e,t),e._zod.optin=`optional`,y(e._zod,`optout`,()=>t.innerType._zod.optout),y(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Za(e,n,_()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>Za(e,n,_()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),gu=g(`$ZodNaN`,(e,t)=>{T.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),_u=g(`$ZodPipe`,(e,t)=>{T.init(e,t),y(e._zod,`values`,()=>t.in._zod.values),y(e._zod,`optin`,()=>t.in._zod.optin),y(e._zod,`optout`,()=>t.out._zod.optout),y(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>rl(e,t.in,n)):rl(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>rl(e,t.out,n)):rl(r,t.out,n)}}),vu=g(`$ZodCodec`,(e,t)=>{T.init(e,t),y(e._zod,`values`,()=>t.in._zod.values),y(e._zod,`optin`,()=>t.in._zod.optin),y(e._zod,`optout`,()=>t.out._zod.optout),y(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>il(e,t,n)):il(r,t,n)}else{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>il(e,t,n)):il(r,t,n)}}}),yu=g(`$ZodPreprocess`,(e,t)=>{_u.init(e,t)}),bu=g(`$ZodReadonly`,(e,t)=>{T.init(e,t),y(e._zod,`propValues`,()=>t.innerType._zod.propValues),y(e._zod,`values`,()=>t.innerType._zod.values),y(e._zod,`optin`,()=>t.innerType?._zod?.optin),y(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ol):ol(r)}}),xu=g(`$ZodTemplateLiteral`,(e,t)=>{T.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||mo.has(typeof e))n.push(Ia(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),Su=g(`$ZodFunction`,(e,t)=>(T.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return function(...n){let r=e._def.input?Oo(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?Oo(e._def.output,i):i}},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return async function(...n){let r=e._def.input?await Ao(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await Ao(e._def.output,i):i}},e._zod.parse=(t,n)=>typeof t.value==`function`?(e._def.output&&e._def.output._zod.def.type===`promise`?t.value=e.implementAsync(t.value):t.value=e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new eu({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),Cu=g(`$ZodPromise`,(e,t)=>{T.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),wu=g(`$ZodLazy`,(e,t)=>{T.init(e,t),y(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),y(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),y(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),y(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),y(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Tu=g(`$ZodCustom`,(e,t)=>{w.init(e,t),T.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>sl(t,n,r,e));sl(i,n,r,e)}})}));function Du(){return{localeError:Ou()}}var Ou,ku=t((()=>{C(),Ou=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${x(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${v(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function Au(){return{localeError:ju()}}var ju,Mu=t((()=>{C(),ju=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${x(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function Nu(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function Pu(){return{localeError:Fu()}}var Fu,Iu=t((()=>{C(),Fu=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${x(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Nu(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Nu(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function Lu(){return{localeError:Ru()}}var Ru,zu=t((()=>{C(),Ru=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${x(e.values[0])}`:`Невалидна опция: очаквано едно от ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function Bu(){return{localeError:Vu()}}var Vu,Hu=t((()=>{C(),Vu=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${x(e.values[0])}`:`Opció invàlida: s'esperava una de ${v(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function Uu(){return{localeError:Wu()}}var Wu,Gu=t((()=>{C(),Wu=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${x(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${v(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function Ku(){return{localeError:qu()}}var qu,Ju=t((()=>{C(),qu=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-område`,ipv6:`IPv6-område`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${x(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function Yu(){return{localeError:Xu()}}var Xu,Zu=t((()=>{C(),Xu=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${x(e.values[0])}`:`Ungültige Option: erwartet eine von ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function Qu(){return{localeError:$u()}}var $u,ed=t((()=>{C(),$u=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${x(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function td(){return{localeError:nd()}}var nd,rd=t((()=>{C(),nd=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input);return`Invalid input: expected ${t}, received ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${x(e.values[0])}`:`Invalid option: expected one of ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function id(){return{localeError:ad()}}var ad,od=t((()=>{C(),ad=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${x(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function sd(){return{localeError:cd()}}var cd,ld=t((()=>{C(),cd=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${x(e.values[0])}`:`Opción inválida: se esperaba una de ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function ud(){return{localeError:dd()}}var dd,fd=t((()=>{C(),dd=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: میبایست instanceof ${e.expected} میبود، ${i} دریافت شد`:`ورودی نامعتبر: میبایست ${t} میبود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: میبایست ${x(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${v(e.values,`|`)} میبود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${v(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function pd(){return{localeError:md()}}var md,hd=t((()=>{C(),md=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${x(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function gd(){return{localeError:_d()}}var _d,vd=t((()=>{C(),_d=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`enregistrement`,map:`carte`,set:`ensemble`,file:`fichier`,nonoptional:`non-optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${x(e.values[0])} attendu`:`Option invalide : une valeur parmi ${v(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${v(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function yd(){return{localeError:bd()}}var bd,xd=t((()=>{C(),bd=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${x(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${v(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Sd(){return{localeError:Cd()}}var Cd,wd=t((()=>{C(),Cd=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},jwt:{label:`JWT`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=S(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${x(t.values[0])}`;let e=t.values.map(e=>x(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${v(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function Td(){return{localeError:Ed()}}var Ed,Dd=t((()=>{C(),Ed=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${x(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function Od(){return{localeError:kd()}}var kd,Ad=t((()=>{C(),kd=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${x(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function jd(e,t,n){return Math.abs(e)===1?t:n}function Md(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function Nd(){return{localeError:Pd()}}var Pd,Fd=t((()=>{C(),Pd=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${x(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=jd(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Md(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Md(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=jd(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Md(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Md(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${v(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${Md(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${Md(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function Id(){return{localeError:Ld()}}var Ld,Rd=t((()=>{C(),Ld=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${x(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function zd(){return{localeError:Bd()}}var Bd,Vd=t((()=>{C(),Bd=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${x(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function Hd(){return{localeError:Ud()}}var Ud,Wd=t((()=>{C(),Ud=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${x(e.values[0])}`:`Opzione non valida: atteso uno tra ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function Gd(){return{localeError:Kd()}}var Kd,qd=t((()=>{C(),Kd=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${x(e.values[0])}が期待されました`:`無効な選択: ${v(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${v(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function Jd(){return{localeError:Yd()}}var Yd,Xd=t((()=>{C(),Yd=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${x(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${v(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function Zd(){return{localeError:Qd()}}var Qd,$d=t((()=>{C(),Qd=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${x(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${v(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function ef(){return Zd()}var tf=t((()=>{$d()}));function nf(){return{localeError:rf()}}var rf,af=t((()=>{C(),rf=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${x(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${v(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${v(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function of(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function sf(){return{localeError:lf()}}var cf,lf,uf=t((()=>{C(),cf=e=>e.charAt(0).toUpperCase()+e.slice(1),lf=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${x(e.values[0])}`:`Privalo būti vienas iš ${v(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,of(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${cf(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${cf(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,of(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${cf(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${cf(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:return`${cf(r[e.origin]??e.origin??e.origin??`reikšmė`)} turi klaidingą įvestį`;default:return`Klaidinga įvestis`}}}}));function df(){return{localeError:ff()}}var ff,pf=t((()=>{C(),ff=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${x(e.values[0])}`:`Грешана опција: се очекува една ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function mf(){return{localeError:hf()}}var hf,gf=t((()=>{C(),hf=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${x(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${v(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function _f(){return{localeError:vf()}}var vf,yf=t((()=>{C(),vf=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${x(e.values[0])}`:`Ongeldige optie: verwacht één van ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function bf(){return{localeError:xf()}}var xf,Sf=t((()=>{C(),xf=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-område`,ipv6:`IPv6-område`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${x(e.values[0])}`:`Ugyldig valg: forventet en av ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function Cf(){return{localeError:wf()}}var wf,Tf=t((()=>{C(),wf=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${x(e.values[0])}`:`Fâsit tercih: mûteberler ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function Ef(){return{localeError:Df()}}var Df,Of=t((()=>{C(),Df=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${x(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${v(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function kf(){return{localeError:Af()}}var Af,jf=t((()=>{C(),Af=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${x(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function Mf(){return{localeError:Nf()}}var Nf,Pf=t((()=>{C(),Nf=()=>{let e={string:{unit:`caracteres`,verb:`ter`},file:{unit:`bytes`,verb:`ter`},array:{unit:`itens`,verb:`ter`},set:{unit:`itens`,verb:`ter`}};function t(t){return e[t]??null}let n={regex:`padrão`,email:`endereço de e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`duração ISO`,ipv4:`endereço IPv4`,ipv6:`endereço IPv6`,cidrv4:`faixa de IPv4`,cidrv6:`faixa de IPv6`,base64:`texto codificado em base64`,base64url:`URL codificada em base64`,json_string:`texto JSON`,e164:`número E.164`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,number:`número`,null:`nulo`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipo inválido: esperado instanceof ${e.expected}, recebido ${i}`:`Tipo inválido: esperado ${t}, recebido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: esperado ${x(e.values[0])}`:`Opção inválida: esperada uma das ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Muito grande: esperado que ${e.origin??`valor`} tivesse ${n}${e.maximum.toString()} ${r.unit??`elementos`}`:`Muito grande: esperado que ${e.origin??`valor`} fosse ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Chave${e.keys.length>1?`s`:``} desconhecida${e.keys.length>1?`s`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Chave inválida em ${e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido em ${e.origin}`;default:return`Campo inválido`}}}}));function Ff(){return{localeError:If()}}var If,Lf=t((()=>{C(),If=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${x(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${v(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function Rf(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function zf(){return{localeError:Bf()}}var Bf,Vf=t((()=>{C(),Bf=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${x(e.values[0])}`:`Неверный вариант: ожидалось одно из ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Rf(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Rf(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function Hf(){return{localeError:Uf()}}var Uf,Wf=t((()=>{C(),Uf=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${x(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function Gf(){return{localeError:Kf()}}var Kf,qf=t((()=>{C(),Kf=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-intervall`,ipv6:`IPv6-intervall`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${x(e.values[0])}`:`Ogiltigt val: förväntade en av ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function Jf(){return{localeError:Yf()}}var Yf,Xf=t((()=>{C(),Yf=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${x(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${v(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function Zf(){return{localeError:Qf()}}var Qf,$f=t((()=>{C(),Qf=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${x(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${v(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function ep(){return{localeError:tp()}}var tp,np=t((()=>{C(),tp=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${x(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function rp(){return{localeError:ip()}}var ip,ap=t((()=>{C(),ip=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${x(e.values[0])}`:`Неправильна опція: очікується одне з ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function op(){return rp()}var sp=t((()=>{ap()}));function cp(){return{localeError:lp()}}var lp,up=t((()=>{C(),lp=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${x(e.values[0])} متوقع تھا`:`غلط آپشن: ${v(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${v(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function dp(){return{localeError:fp()}}var fp,pp=t((()=>{C(),fp=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${x(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function mp(){return{localeError:hp()}}var hp,gp=t((()=>{C(),hp=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${x(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${v(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function _p(){return{localeError:vp()}}var vp,yp=t((()=>{C(),vp=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${x(e.values[0])}`:`无效选项:期望以下之一 ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${v(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function bp(){return{localeError:xp()}}var xp,Sp=t((()=>{C(),xp=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${x(e.values[0])}`:`無效的選項:預期為以下其中之一 ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${v(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function Cp(){return{localeError:wp()}}var wp,Tp=t((()=>{C(),wp=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=S(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${x(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${v(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${v(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),Ep=n({ar:()=>Du,az:()=>Au,be:()=>Pu,bg:()=>Lu,ca:()=>Bu,cs:()=>Uu,da:()=>Ku,de:()=>Yu,el:()=>Qu,en:()=>td,eo:()=>id,es:()=>sd,fa:()=>ud,fi:()=>pd,fr:()=>gd,frCA:()=>yd,he:()=>Sd,hr:()=>Td,hu:()=>Od,hy:()=>Nd,id:()=>Id,is:()=>zd,it:()=>Hd,ja:()=>Gd,ka:()=>Jd,kh:()=>ef,km:()=>Zd,ko:()=>nf,lt:()=>sf,mk:()=>df,ms:()=>mf,nl:()=>_f,no:()=>bf,ota:()=>Cf,pl:()=>kf,ps:()=>Ef,pt:()=>Mf,ro:()=>Ff,ru:()=>zf,sl:()=>Hf,sv:()=>Gf,ta:()=>Jf,th:()=>Zf,tr:()=>ep,ua:()=>op,uk:()=>rp,ur:()=>cp,uz:()=>dp,vi:()=>mp,yo:()=>Cp,zhCN:()=>_p,zhTW:()=>bp}),Dp=t((()=>{ku(),Mu(),Iu(),zu(),Hu(),Gu(),Ju(),Zu(),ed(),rd(),od(),ld(),fd(),hd(),vd(),xd(),wd(),Dd(),Ad(),Fd(),Rd(),Vd(),Wd(),qd(),Xd(),tf(),$d(),af(),uf(),pf(),gf(),yf(),Sf(),Tf(),Of(),jf(),Pf(),Lf(),Vf(),Wf(),qf(),Xf(),$f(),np(),sp(),ap(),up(),pp(),gp(),yp(),Sp(),Tp()}));function Op(){return new Mp}var kp,Ap,jp,Mp,Np,Pp=t((()=>{Ap=Symbol(`ZodOutput`),jp=Symbol(`ZodInput`),Mp=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(kp=globalThis).__zod_globalRegistry??(kp.__zod_globalRegistry=Op()),Np=globalThis.__zod_globalRegistry}));function Fp(e,t){return new e({type:`string`,...b(t)})}function Ip(e,t){return new e({type:`string`,coerce:!0,...b(t)})}function Lp(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...b(t)})}function Rp(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...b(t)})}function zp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...b(t)})}function Bp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...b(t)})}function Vp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...b(t)})}function Hp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...b(t)})}function Up(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...b(t)})}function Wp(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...b(t)})}function Gp(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...b(t)})}function Kp(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...b(t)})}function qp(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...b(t)})}function Jp(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...b(t)})}function Yp(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...b(t)})}function Xp(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...b(t)})}function Zp(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...b(t)})}function Qp(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...b(t)})}function $p(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...b(t)})}function em(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...b(t)})}function tm(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...b(t)})}function nm(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...b(t)})}function rm(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...b(t)})}function im(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...b(t)})}function am(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...b(t)})}function om(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...b(t)})}function sm(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...b(t)})}function cm(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...b(t)})}function lm(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...b(t)})}function um(e,t){return new e({type:`number`,checks:[],...b(t)})}function dm(e,t){return new e({type:`number`,coerce:!0,checks:[],...b(t)})}function fm(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...b(t)})}function pm(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...b(t)})}function mm(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...b(t)})}function hm(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...b(t)})}function gm(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...b(t)})}function _m(e,t){return new e({type:`boolean`,...b(t)})}function vm(e,t){return new e({type:`boolean`,coerce:!0,...b(t)})}function ym(e,t){return new e({type:`bigint`,...b(t)})}function bm(e,t){return new e({type:`bigint`,coerce:!0,...b(t)})}function xm(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...b(t)})}function Sm(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...b(t)})}function Cm(e,t){return new e({type:`symbol`,...b(t)})}function wm(e,t){return new e({type:`undefined`,...b(t)})}function Tm(e,t){return new e({type:`null`,...b(t)})}function Em(e){return new e({type:`any`})}function Dm(e){return new e({type:`unknown`})}function Om(e,t){return new e({type:`never`,...b(t)})}function km(e,t){return new e({type:`void`,...b(t)})}function Am(e,t){return new e({type:`date`,...b(t)})}function jm(e,t){return new e({type:`date`,coerce:!0,...b(t)})}function Mm(e,t){return new e({type:`nan`,...b(t)})}function Nm(e,t){return new fc({check:`less_than`,...b(t),value:e,inclusive:!1})}function Pm(e,t){return new fc({check:`less_than`,...b(t),value:e,inclusive:!0})}function Fm(e,t){return new pc({check:`greater_than`,...b(t),value:e,inclusive:!1})}function D(e,t){return new pc({check:`greater_than`,...b(t),value:e,inclusive:!0})}function Im(e){return Fm(0,e)}function Lm(e){return Nm(0,e)}function Rm(e){return Pm(0,e)}function zm(e){return D(0,e)}function Bm(e,t){return new mc({check:`multiple_of`,...b(t),value:e})}function Vm(e,t){return new _c({check:`max_size`,...b(t),maximum:e})}function Hm(e,t){return new vc({check:`min_size`,...b(t),minimum:e})}function Um(e,t){return new yc({check:`size_equals`,...b(t),size:e})}function Wm(e,t){return new bc({check:`max_length`,...b(t),maximum:e})}function Gm(e,t){return new xc({check:`min_length`,...b(t),minimum:e})}function Km(e,t){return new Sc({check:`length_equals`,...b(t),length:e})}function qm(e,t){return new wc({check:`string_format`,format:`regex`,...b(t),pattern:e})}function Jm(e){return new Tc({check:`string_format`,format:`lowercase`,...b(e)})}function Ym(e){return new Ec({check:`string_format`,format:`uppercase`,...b(e)})}function Xm(e,t){return new Dc({check:`string_format`,format:`includes`,...b(t),includes:e})}function Zm(e,t){return new Oc({check:`string_format`,format:`starts_with`,...b(t),prefix:e})}function Qm(e,t){return new kc({check:`string_format`,format:`ends_with`,...b(t),suffix:e})}function $m(e,t,n){return new Ac({check:`property`,property:e,schema:t,...b(n)})}function eh(e,t){return new jc({check:`mime_type`,mime:e,...b(t)})}function th(e){return new Mc({check:`overwrite`,tx:e})}function nh(e){return th(t=>t.normalize(e))}function rh(){return th(e=>e.trim())}function ih(){return th(e=>e.toLowerCase())}function ah(){return th(e=>e.toUpperCase())}function oh(){return th(e=>ja(e))}function sh(e,t,n){return new e({type:`array`,element:t,...b(n)})}function ch(e,t,n){return new e({type:`union`,options:t,...b(n)})}function lh(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...b(n)})}function uh(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...b(r)})}function dh(e,t,n){return new e({type:`intersection`,left:t,right:n})}function fh(e,t,n,r){let i=n instanceof T;return new e({type:`tuple`,items:t,rest:i?n:null,...b(i?r:n)})}function ph(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...b(r)})}function mh(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...b(r)})}function hh(e,t,n){return new e({type:`set`,valueType:t,...b(n)})}function gh(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...b(n)})}function _h(e,t,n){return new e({type:`enum`,entries:t,...b(n)})}function vh(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...b(n)})}function yh(e,t){return new e({type:`file`,...b(t)})}function bh(e,t){return new e({type:`transform`,transform:t})}function xh(e,t){return new e({type:`optional`,innerType:t})}function Sh(e,t){return new e({type:`nullable`,innerType:t})}function Ch(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():Pa(n)}})}function wh(e,t,n){return new e({type:`nonoptional`,innerType:t,...b(n)})}function Th(e,t){return new e({type:`success`,innerType:t})}function Eh(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:()=>n})}function Dh(e,t,n){return new e({type:`pipe`,in:t,out:n})}function Oh(e,t){return new e({type:`readonly`,innerType:t})}function kh(e,t,n){return new e({type:`template_literal`,parts:t,...b(n)})}function Ah(e,t){return new e({type:`lazy`,getter:t})}function jh(e,t){return new e({type:`promise`,innerType:t})}function Mh(e,t,n){let r=b(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Nh(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...b(n)})}function Ph(e,t){let n=Fh(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(eo(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(eo(r))}},e(t.value,t)),t);return n}function Fh(e,t){let n=new w({check:`custom`,...b(t)});return n._zod.check=e,n}function Ih(e){let t=new w({check:`describe`});return t._zod.onattach=[t=>{let n=Np.get(t)??{};Np.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Lh(e){let t=new w({check:`meta`});return t._zod.onattach=[t=>{let n=Np.get(t)??{};Np.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Rh(e,t){let n=b(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??vu,c=e.Boolean??Il,l=new s({type:`pipe`,in:new(e.String??cl)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:o.has(r)?!1:(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l}function zh(e,t,n,r={}){let i=b(r),a={...b(r),check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var Bh,Vh=t((()=>{Nc(),Pp(),Eu(),C(),Bh={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function Hh(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Np,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function O(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,O(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&k(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Uh(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
2572
3389
|
|
|
2573
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function xh(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Ch(t,`input`,e.processors),output:Ch(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function k(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return k(r.element,n);if(r.type===`set`)return k(r.valueType,n);if(r.type===`lazy`)return k(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return k(r.innerType,n);if(r.type===`intersection`)return k(r.left,n)||k(r.right,n);if(r.type===`record`||r.type===`map`)return k(r.keyType,n)||k(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:k(r.in,n)||k(r.out,n);if(r.type===`object`){for(let e in r.shape)if(k(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(k(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(k(e,n))return!0;return!!(r.rest&&k(r.rest,n))}return!1}var Sh,Ch,wh=t((()=>{dp(),Sh=(e,t={})=>n=>{let r=yh({...n,processors:t});return O(e,r),bh(r,e),xh(r,e)},Ch=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=yh({...i??{},target:a,io:t,processors:n});return O(e,o),bh(o,e),xh(o,e)}}));function Th(e,t){if(`_idmap`in e){let n=e,r=yh({...t,processors:fg}),i={};for(let e of n._idmap.entries()){let[t,n]=e;O(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;bh(r,n),a[t]=xh(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=yh({...t,processors:fg});return O(e,n),bh(n,e),xh(n,e)}var Eh,Dh,Oh,kh,Ah,jh,Mh,Nh,Ph,Fh,Ih,Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg=t((()=>{wh(),C(),Eh={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Dh=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Eh[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Oh=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},kh=(e,t,n,r)=>{n.type=`boolean`},Ah=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},jh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},Mh=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Nh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},Ph=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},Fh=(e,t,n,r)=>{n.not={}},Ih=(e,t,n,r)=>{},Lh=(e,t,n,r)=>{},Rh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},zh=(e,t,n,r)=>{let i=e._zod.def,a=Ji(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Bh=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Vh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Hh=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Uh=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Wh=(e,t,n,r)=>{n.type=`boolean`},Gh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Kh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},qh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Jh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Yh=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},Xh=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=O(a.element,t,{...r,path:[...r.path,`items`]})},Zh=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=O(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=O(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Qh=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>O(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},$h=(e,t,n,r)=>{let i=e._zod.def,a=O(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=O(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},eg=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>O(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?O(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},tg=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=O(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=O(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=O(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},ng=(e,t,n,r)=>{let i=e._zod.def,a=O(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},rg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ig=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},ag=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},og=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},sg=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;O(o,t,r);let s=t.seen.get(e);s.ref=o},cg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},lg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ug=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},dg=(e,t,n,r)=>{let i=e._zod.innerType;O(i,t,r);let a=t.seen.get(e);a.ref=i},fg={string:Dh,number:Oh,boolean:kh,bigint:Ah,symbol:jh,null:Mh,undefined:Nh,void:Ph,never:Fh,any:Ih,unknown:Lh,date:Rh,enum:zh,literal:Bh,nan:Vh,template_literal:Hh,file:Uh,success:Wh,custom:Gh,function:Kh,transform:qh,map:Jh,set:Yh,array:Xh,object:Zh,union:Qh,intersection:$h,tuple:eg,record:tg,nullable:ng,nonoptional:rg,default:ig,prefault:ag,catch:og,pipe:sg,readonly:cg,promise:lg,optional:ug,lazy:dg}})),mg,hg=t((()=>{pg(),wh(),mg=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=yh({processors:fg,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return O(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),bh(this.ctx,e);let{"~standard":n,...r}=xh(this.ctx,e);return r}}})),gg=n({}),_g=t((()=>{})),vg=n({$ZodAny:()=>yl,$ZodArray:()=>wl,$ZodAsyncError:()=>Ri,$ZodBase64:()=>ol,$ZodBase64URL:()=>sl,$ZodBigInt:()=>ml,$ZodBigIntFormat:()=>hl,$ZodBoolean:()=>pl,$ZodCIDRv4:()=>il,$ZodCIDRv6:()=>al,$ZodCUID:()=>Kc,$ZodCUID2:()=>qc,$ZodCatch:()=>Kl,$ZodCheck:()=>w,$ZodCheckBigIntFormat:()=>qs,$ZodCheckEndsWith:()=>oc,$ZodCheckGreaterThan:()=>Ws,$ZodCheckIncludes:()=>ic,$ZodCheckLengthEquals:()=>$s,$ZodCheckLessThan:()=>Us,$ZodCheckLowerCase:()=>nc,$ZodCheckMaxLength:()=>Zs,$ZodCheckMaxSize:()=>Js,$ZodCheckMimeType:()=>cc,$ZodCheckMinLength:()=>Qs,$ZodCheckMinSize:()=>Ys,$ZodCheckMultipleOf:()=>Gs,$ZodCheckNumberFormat:()=>Ks,$ZodCheckOverwrite:()=>lc,$ZodCheckProperty:()=>sc,$ZodCheckRegex:()=>tc,$ZodCheckSizeEquals:()=>Xs,$ZodCheckStartsWith:()=>ac,$ZodCheckStringFormat:()=>ec,$ZodCheckUpperCase:()=>rc,$ZodCodec:()=>Yl,$ZodCustom:()=>nu,$ZodCustomStringFormat:()=>ul,$ZodDate:()=>Cl,$ZodDefault:()=>Hl,$ZodDiscriminatedUnion:()=>kl,$ZodE164:()=>cl,$ZodEmail:()=>Hc,$ZodEmoji:()=>Wc,$ZodEncodeError:()=>zi,$ZodEnum:()=>Fl,$ZodError:()=>eo,$ZodExactOptional:()=>Bl,$ZodFile:()=>Ll,$ZodFunction:()=>$l,$ZodGUID:()=>Bc,$ZodIPv4:()=>tl,$ZodIPv6:()=>nl,$ZodISODate:()=>Qc,$ZodISODateTime:()=>Zc,$ZodISODuration:()=>el,$ZodISOTime:()=>$c,$ZodIntersection:()=>Al,$ZodJWT:()=>ll,$ZodKSUID:()=>Xc,$ZodLazy:()=>tu,$ZodLiteral:()=>Il,$ZodMAC:()=>rl,$ZodMap:()=>Nl,$ZodNaN:()=>ql,$ZodNanoID:()=>Gc,$ZodNever:()=>xl,$ZodNonOptional:()=>Wl,$ZodNull:()=>vl,$ZodNullable:()=>Vl,$ZodNumber:()=>dl,$ZodNumberFormat:()=>fl,$ZodObject:()=>Tl,$ZodObjectJIT:()=>El,$ZodOptional:()=>zl,$ZodPipe:()=>Jl,$ZodPrefault:()=>Ul,$ZodPreprocess:()=>Xl,$ZodPromise:()=>eu,$ZodReadonly:()=>Zl,$ZodRealError:()=>to,$ZodRecord:()=>Ml,$ZodRegistry:()=>lp,$ZodSet:()=>Pl,$ZodString:()=>zc,$ZodStringFormat:()=>E,$ZodSuccess:()=>Gl,$ZodSymbol:()=>gl,$ZodTemplateLiteral:()=>Ql,$ZodTransform:()=>Rl,$ZodTuple:()=>jl,$ZodType:()=>T,$ZodULID:()=>Jc,$ZodURL:()=>Uc,$ZodUUID:()=>Vc,$ZodUndefined:()=>_l,$ZodUnion:()=>Dl,$ZodUnknown:()=>bl,$ZodVoid:()=>Sl,$ZodXID:()=>Yc,$ZodXor:()=>Ol,$brand:()=>Li,$constructor:()=>g,$input:()=>cp,$output:()=>sp,Doc:()=>dc,JSONSchema:()=>gg,JSONSchemaGenerator:()=>mg,NEVER:()=>Ii,TimePrecision:()=>_h,_any:()=>rm,_array:()=>Rm,_base64:()=>Np,_base64url:()=>Pp,_bigint:()=>Xp,_boolean:()=>Jp,_catch:()=>rh,_check:()=>fh,_cidrv4:()=>jp,_cidrv6:()=>Mp,_coercedBigint:()=>Zp,_coercedBoolean:()=>Yp,_coercedDate:()=>cm,_coercedNumber:()=>Hp,_coercedString:()=>pp,_cuid:()=>Cp,_cuid2:()=>wp,_custom:()=>lh,_date:()=>sm,_decode:()=>mo,_decodeAsync:()=>vo,_default:()=>eh,_discriminatedUnion:()=>Vm,_e164:()=>Fp,_email:()=>mp,_emoji:()=>xp,_encode:()=>fo,_encodeAsync:()=>go,_endsWith:()=>km,_enum:()=>qm,_file:()=>Xm,_float32:()=>Wp,_float64:()=>Gp,_gt:()=>fm,_gte:()=>D,_guid:()=>hp,_includes:()=>Dm,_int:()=>Up,_int32:()=>Kp,_int64:()=>Qp,_intersection:()=>Hm,_ipv4:()=>Op,_ipv6:()=>kp,_isoDate:()=>Rp,_isoDateTime:()=>Lp,_isoDuration:()=>Bp,_isoTime:()=>zp,_jwt:()=>Ip,_ksuid:()=>Dp,_lazy:()=>sh,_length:()=>Cm,_literal:()=>Ym,_lowercase:()=>Tm,_lt:()=>um,_lte:()=>dm,_mac:()=>Ap,_map:()=>Gm,_max:()=>dm,_maxLength:()=>xm,_maxSize:()=>vm,_mime:()=>jm,_min:()=>D,_minLength:()=>Sm,_minSize:()=>ym,_multipleOf:()=>_m,_nan:()=>lm,_nanoid:()=>Sp,_nativeEnum:()=>Jm,_negative:()=>mm,_never:()=>am,_nonnegative:()=>gm,_nonoptional:()=>th,_nonpositive:()=>hm,_normalize:()=>Nm,_null:()=>nm,_nullable:()=>$m,_number:()=>Vp,_optional:()=>Qm,_overwrite:()=>Mm,_parse:()=>ro,_parseAsync:()=>ao,_pipe:()=>ih,_positive:()=>pm,_promise:()=>ch,_property:()=>Am,_readonly:()=>ah,_record:()=>Wm,_refine:()=>uh,_regex:()=>wm,_safeDecode:()=>So,_safeDecodeAsync:()=>Eo,_safeEncode:()=>bo,_safeEncodeAsync:()=>wo,_safeParse:()=>so,_safeParseAsync:()=>lo,_set:()=>Km,_size:()=>bm,_slugify:()=>Lm,_startsWith:()=>Om,_string:()=>fp,_stringFormat:()=>gh,_stringbool:()=>hh,_success:()=>nh,_superRefine:()=>dh,_symbol:()=>em,_templateLiteral:()=>oh,_toLowerCase:()=>Fm,_toUpperCase:()=>Im,_transform:()=>Zm,_trim:()=>Pm,_tuple:()=>Um,_uint32:()=>qp,_uint64:()=>$p,_ulid:()=>Tp,_undefined:()=>tm,_union:()=>zm,_unknown:()=>im,_uppercase:()=>Em,_url:()=>bp,_uuid:()=>gp,_uuidv4:()=>_p,_uuidv6:()=>vp,_uuidv7:()=>yp,_void:()=>om,_xid:()=>Ep,_xor:()=>Bm,clone:()=>ma,config:()=>_,createStandardJSONSchemaMethod:()=>Ch,createToJSONSchemaMethod:()=>Sh,decode:()=>ho,decodeAsync:()=>yo,describe:()=>ph,encode:()=>po,encodeAsync:()=>_o,extractDefs:()=>bh,finalize:()=>xh,flattenError:()=>Ja,formatError:()=>Ya,globalConfig:()=>Bi,globalRegistry:()=>up,initializeContext:()=>yh,isValidBase64:()=>hc,isValidBase64URL:()=>gc,isValidJWT:()=>_c,locales:()=>rp,meta:()=>mh,parse:()=>io,parseAsync:()=>oo,prettifyError:()=>Qa,process:()=>O,regexes:()=>ko,registry:()=>ap,safeDecode:()=>Co,safeDecodeAsync:()=>Do,safeEncode:()=>xo,safeEncodeAsync:()=>To,safeParse:()=>co,safeParseAsync:()=>uo,toDotPath:()=>Za,toJSONSchema:()=>Th,treeifyError:()=>Xa,util:()=>Hi,version:()=>pc}),yg=t((()=>{Vi(),Oo(),no(),ru(),uc(),mc(),C(),Bs(),ip(),dp(),fc(),vh(),wh(),pg(),hg(),_g()}));vh(),C(),Bs(),Vi(),Oo(),pg(),no(),ip(),yg(),dp();function bg(e){return!!e._zod}function xg(e,t){return bg(e)?co(e,t):e.safeParse(t)}function Sg(e){if(!e)return;let t;if(t=bg(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Cg(e){if(bg(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var wg=n({endsWith:()=>km,gt:()=>fm,gte:()=>D,includes:()=>Dm,length:()=>Cm,lowercase:()=>Tm,lt:()=>um,lte:()=>dm,maxLength:()=>xm,maxSize:()=>vm,mime:()=>jm,minLength:()=>Sm,minSize:()=>ym,multipleOf:()=>_m,negative:()=>mm,nonnegative:()=>gm,nonpositive:()=>hm,normalize:()=>Nm,overwrite:()=>Mm,positive:()=>pm,property:()=>Am,regex:()=>wm,size:()=>bm,slugify:()=>Lm,startsWith:()=>Om,toLowerCase:()=>Fm,toUpperCase:()=>Im,trim:()=>Pm,uppercase:()=>Em}),Tg=t((()=>{yg()})),Eg=n({ZodISODate:()=>Mg,ZodISODateTime:()=>jg,ZodISODuration:()=>Pg,ZodISOTime:()=>Ng,date:()=>Og,datetime:()=>Dg,duration:()=>Ag,time:()=>kg});function Dg(e){return Lp(jg,e)}function Og(e){return Rp(Mg,e)}function kg(e){return zp(Ng,e)}function Ag(e){return Bp(Pg,e)}var jg,Mg,Ng,Pg,Fg=t((()=>{yg(),Wy(),jg=g(`ZodISODateTime`,(e,t)=>{Zc.init(e,t),W.init(e,t)}),Mg=g(`ZodISODate`,(e,t)=>{Qc.init(e,t),W.init(e,t)}),Ng=g(`ZodISOTime`,(e,t)=>{$c.init(e,t),W.init(e,t)}),Pg=g(`ZodISODuration`,(e,t)=>{el.init(e,t),W.init(e,t)})})),Ig,Lg,A,Rg=t((()=>{yg(),C(),Ig=(e,t)=>{eo.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Ya(e,t)},flatten:{value:t=>Ja(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Yi,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Yi,2)}},isEmpty:{get(){return e.issues.length===0}}})},Lg=g(`ZodError`,Ig),A=g(`ZodError`,Ig,{Parent:Error})})),zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg=t((()=>{yg(),Rg(),zg=ro(A),Bg=ao(A),Vg=so(A),Hg=lo(A),Ug=fo(A),Wg=mo(A),Gg=go(A),Kg=vo(A),qg=bo(A),Jg=So(A),Yg=wo(A),Xg=Eo(A)})),Qg=n({ZodAny:()=>iy,ZodArray:()=>ly,ZodBase64:()=>Gv,ZodBase64URL:()=>Kv,ZodBigInt:()=>$v,ZodBigIntFormat:()=>ey,ZodBoolean:()=>Qv,ZodCIDRv4:()=>Uv,ZodCIDRv6:()=>Wv,ZodCUID:()=>Fv,ZodCUID2:()=>Iv,ZodCatch:()=>Ay,ZodCodec:()=>Ny,ZodCustom:()=>By,ZodCustomStringFormat:()=>Yv,ZodDate:()=>cy,ZodDefault:()=>Ey,ZodDiscriminatedUnion:()=>py,ZodE164:()=>qv,ZodEmail:()=>kv,ZodEmoji:()=>Nv,ZodEnum:()=>yy,ZodExactOptional:()=>wy,ZodFile:()=>xy,ZodFunction:()=>zy,ZodGUID:()=>Av,ZodIPv4:()=>Bv,ZodIPv6:()=>Hv,ZodIntersection:()=>my,ZodJWT:()=>Jv,ZodKSUID:()=>zv,ZodLazy:()=>Ly,ZodLiteral:()=>by,ZodMAC:()=>Vv,ZodMap:()=>_y,ZodNaN:()=>jy,ZodNanoID:()=>Pv,ZodNever:()=>oy,ZodNonOptional:()=>Oy,ZodNull:()=>ry,ZodNullable:()=>Ty,ZodNumber:()=>Xv,ZodNumberFormat:()=>Zv,ZodObject:()=>uy,ZodOptional:()=>Cy,ZodPipe:()=>My,ZodPrefault:()=>Dy,ZodPreprocess:()=>Py,ZodPromise:()=>Ry,ZodReadonly:()=>Fy,ZodRecord:()=>gy,ZodSet:()=>vy,ZodString:()=>Ov,ZodStringFormat:()=>W,ZodSuccess:()=>ky,ZodSymbol:()=>ty,ZodTemplateLiteral:()=>Iy,ZodTransform:()=>Sy,ZodTuple:()=>hy,ZodType:()=>U,ZodULID:()=>Lv,ZodURL:()=>Mv,ZodUUID:()=>jv,ZodUndefined:()=>ny,ZodUnion:()=>dy,ZodUnknown:()=>ay,ZodVoid:()=>sy,ZodXID:()=>Rv,ZodXor:()=>fy,_ZodString:()=>Dv,_default:()=>av,_function:()=>vv,any:()=>z_,array:()=>F,base64:()=>b_,base64url:()=>x_,bigint:()=>N_,boolean:()=>N,catch:()=>lv,check:()=>yv,cidrv4:()=>v_,cidrv6:()=>y_,codec:()=>fv,cuid:()=>u_,cuid2:()=>d_,custom:()=>bv,date:()=>H_,describe:()=>Vy,discriminatedUnion:()=>K_,e164:()=>S_,email:()=>e_,emoji:()=>c_,enum:()=>B,exactOptional:()=>nv,file:()=>ev,float32:()=>k_,float64:()=>A_,function:()=>vv,guid:()=>t_,hash:()=>D_,hex:()=>E_,hostname:()=>T_,httpUrl:()=>s_,instanceof:()=>Cv,int:()=>O_,int32:()=>j_,int64:()=>P_,intersection:()=>q_,invertCodec:()=>pv,ipv4:()=>h_,ipv6:()=>__,json:()=>wv,jwt:()=>C_,keyof:()=>U_,ksuid:()=>m_,lazy:()=>gv,literal:()=>V,looseObject:()=>L,looseRecord:()=>X_,mac:()=>g_,map:()=>Z_,meta:()=>Hy,nan:()=>uv,nanoid:()=>l_,nativeEnum:()=>$_,never:()=>B_,nonoptional:()=>sv,null:()=>R_,nullable:()=>rv,nullish:()=>iv,number:()=>M,object:()=>I,optional:()=>H,partialRecord:()=>Y_,pipe:()=>dv,prefault:()=>ov,preprocess:()=>Tv,promise:()=>_v,readonly:()=>mv,record:()=>z,refine:()=>xv,set:()=>Q_,strictObject:()=>W_,string:()=>j,stringFormat:()=>w_,stringbool:()=>Uy,success:()=>cv,superRefine:()=>Sv,symbol:()=>I_,templateLiteral:()=>hv,transform:()=>tv,tuple:()=>J_,uint32:()=>M_,uint64:()=>F_,ulid:()=>f_,undefined:()=>L_,union:()=>R,unknown:()=>P,url:()=>o_,uuid:()=>n_,uuidv4:()=>r_,uuidv6:()=>i_,uuidv7:()=>a_,void:()=>V_,xid:()=>p_,xor:()=>G_});function $g(e,t,n){let r=Object.getPrototypeOf(e),i=Ev.get(r);if(i||(i=new Set,Ev.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function j(e){return fp(Ov,e)}function e_(e){return mp(kv,e)}function t_(e){return hp(Av,e)}function n_(e){return gp(jv,e)}function r_(e){return _p(jv,e)}function i_(e){return vp(jv,e)}function a_(e){return yp(jv,e)}function o_(e){return bp(Mv,e)}function s_(e){return bp(Mv,{protocol:ds,hostname:us,...b(e)})}function c_(e){return xp(Nv,e)}function l_(e){return Sp(Pv,e)}function u_(e){return Cp(Fv,e)}function d_(e){return wp(Iv,e)}function f_(e){return Tp(Lv,e)}function p_(e){return Ep(Rv,e)}function m_(e){return Dp(zv,e)}function h_(e){return Op(Bv,e)}function g_(e){return Ap(Vv,e)}function __(e){return kp(Hv,e)}function v_(e){return jp(Uv,e)}function y_(e){return Mp(Wv,e)}function b_(e){return Np(Gv,e)}function x_(e){return Pp(Kv,e)}function S_(e){return Fp(qv,e)}function C_(e){return Ip(Jv,e)}function w_(e,t,n={}){return gh(Yv,e,t,n)}function T_(e){return gh(Yv,`hostname`,ls,e)}function E_(e){return gh(Yv,`hex`,ws,e)}function D_(e,t){let n=`${e}_${t?.enc??`hex`}`,r=ko[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return gh(Yv,n,r,t)}function M(e){return Vp(Xv,e)}function O_(e){return Up(Zv,e)}function k_(e){return Wp(Zv,e)}function A_(e){return Gp(Zv,e)}function j_(e){return Kp(Zv,e)}function M_(e){return qp(Zv,e)}function N(e){return Jp(Qv,e)}function N_(e){return Xp($v,e)}function P_(e){return Qp(ey,e)}function F_(e){return $p(ey,e)}function I_(e){return em(ty,e)}function L_(e){return tm(ny,e)}function R_(e){return nm(ry,e)}function z_(){return rm(iy)}function P(){return im(ay)}function B_(e){return am(oy,e)}function V_(e){return om(sy,e)}function H_(e){return sm(cy,e)}function F(e,t){return Rm(ly,e,t)}function U_(e){let t=e._zod.def.shape;return B(Object.keys(t))}function I(e,t){return new uy({type:`object`,shape:e??{},...b(t)})}function W_(e,t){return new uy({type:`object`,shape:e,catchall:B_(),...b(t)})}function L(e,t){return new uy({type:`object`,shape:e,catchall:P(),...b(t)})}function R(e,t){return new dy({type:`union`,options:e,...b(t)})}function G_(e,t){return new fy({type:`union`,options:e,inclusive:!1,...b(t)})}function K_(e,t,n){return new py({type:`union`,options:t,discriminator:e,...b(n)})}function q_(e,t){return new my({type:`intersection`,left:e,right:t})}function J_(e,t,n){let r=t instanceof T;return new hy({type:`tuple`,items:e,rest:r?t:null,...b(r?n:t)})}function z(e,t,n){return!t||!t._zod?new gy({type:`record`,keyType:j(),valueType:e,...b(t)}):new gy({type:`record`,keyType:e,valueType:t,...b(n)})}function Y_(e,t,n){let r=ma(e);return r._zod.values=void 0,new gy({type:`record`,keyType:r,valueType:t,...b(n)})}function X_(e,t,n){return new gy({type:`record`,keyType:e,valueType:t,mode:`loose`,...b(n)})}function Z_(e,t,n){return new _y({type:`map`,keyType:e,valueType:t,...b(n)})}function Q_(e,t){return new vy({type:`set`,valueType:e,...b(t)})}function B(e,t){return new yy({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...b(t)})}function $_(e,t){return new yy({type:`enum`,entries:e,...b(t)})}function V(e,t){return new by({type:`literal`,values:Array.isArray(e)?e:[e],...b(t)})}function ev(e){return Xm(xy,e)}function tv(e){return new Sy({type:`transform`,transform:e})}function H(e){return new Cy({type:`optional`,innerType:e})}function nv(e){return new wy({type:`optional`,innerType:e})}function rv(e){return new Ty({type:`nullable`,innerType:e})}function iv(e){return H(rv(e))}function av(e,t){return new Ey({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():da(t)}})}function ov(e,t){return new Dy({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():da(t)}})}function sv(e,t){return new Oy({type:`nonoptional`,innerType:e,...b(t)})}function cv(e){return new ky({type:`success`,innerType:e})}function lv(e,t){return new Ay({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function uv(e){return lm(jy,e)}function dv(e,t){return new My({type:`pipe`,in:e,out:t})}function fv(e,t,n){return new Ny({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function pv(e){let t=e._zod.def;return new Ny({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function mv(e){return new Fy({type:`readonly`,innerType:e})}function hv(e,t){return new Iy({type:`template_literal`,parts:e,...b(t)})}function gv(e){return new Ly({type:`lazy`,getter:e})}function _v(e){return new Ry({type:`promise`,innerType:e})}function vv(e){return new zy({type:`function`,input:Array.isArray(e?.input)?J_(e?.input):e?.input??F(P()),output:e?.output??P()})}function yv(e){let t=new w({check:`custom`});return t._zod.check=e,t}function bv(e,t){return lh(By,e??(()=>!0),t)}function xv(e,t={}){return uh(By,e,t)}function Sv(e,t){return dh(e,t)}function Cv(e,t={}){let n=new By({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...b(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function wv(e){let t=gv(()=>R([j(e),M(),N(),R_(),F(t),z(j(),t)]));return t}function Tv(e,t){return new Py({type:`pipe`,in:tv(e),out:t})}var Ev,U,Dv,Ov,W,kv,Av,jv,Mv,Nv,Pv,Fv,Iv,Lv,Rv,zv,Bv,Vv,Hv,Uv,Wv,Gv,Kv,qv,Jv,Yv,Xv,Zv,Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy,gy,_y,vy,yy,by,xy,Sy,Cy,wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy=t((()=>{yg(),pg(),wh(),Tg(),Fg(),Zg(),Ev=new WeakMap,U=g(`ZodType`,(e,t)=>(T.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Ch(e,`input`),output:Ch(e,`output`)}}),e.toJSONSchema=Sh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>zg(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Vg(e,t,n),e.parseAsync=async(t,n)=>Bg(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Hg(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ug(e,t,n),e.decode=(t,n)=>Wg(e,t,n),e.encodeAsync=async(t,n)=>Gg(e,t,n),e.decodeAsync=async(t,n)=>Kg(e,t,n),e.safeEncode=(t,n)=>qg(e,t,n),e.safeDecode=(t,n)=>Jg(e,t,n),e.safeEncodeAsync=async(t,n)=>Yg(e,t,n),e.safeDecodeAsync=async(t,n)=>Xg(e,t,n),$g(e,`ZodType`,{check(...e){let t=this.def;return this.clone(na(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return ma(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(xv(e,t))},superRefine(e,t){return this.check(Sv(e,t))},overwrite(e){return this.check(Mm(e))},optional(){return H(this)},exactOptional(){return nv(this)},nullable(){return rv(this)},nullish(){return H(rv(this))},nonoptional(e){return sv(this,e)},array(){return F(this)},or(e){return R([this,e])},and(e){return q_(this,e)},transform(e){return dv(this,tv(e))},default(e){return av(this,e)},prefault(e){return ov(this,e)},catch(e){return lv(this,e)},pipe(e){return dv(this,e)},readonly(){return mv(this)},describe(e){let t=this.clone();return up.add(t,{description:e}),t},meta(...e){if(e.length===0)return up.get(this);let t=this.clone();return up.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return up.get(e)?.description},configurable:!0}),e)),Dv=g(`_ZodString`,(e,t)=>{zc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dh(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,$g(e,`_ZodString`,{regex(...e){return this.check(wm(...e))},includes(...e){return this.check(Dm(...e))},startsWith(...e){return this.check(Om(...e))},endsWith(...e){return this.check(km(...e))},min(...e){return this.check(Sm(...e))},max(...e){return this.check(xm(...e))},length(...e){return this.check(Cm(...e))},nonempty(...e){return this.check(Sm(1,...e))},lowercase(e){return this.check(Tm(e))},uppercase(e){return this.check(Em(e))},trim(){return this.check(Pm())},normalize(...e){return this.check(Nm(...e))},toLowerCase(){return this.check(Fm())},toUpperCase(){return this.check(Im())},slugify(){return this.check(Lm())}})}),Ov=g(`ZodString`,(e,t)=>{zc.init(e,t),Dv.init(e,t),e.email=t=>e.check(mp(kv,t)),e.url=t=>e.check(bp(Mv,t)),e.jwt=t=>e.check(Ip(Jv,t)),e.emoji=t=>e.check(xp(Nv,t)),e.guid=t=>e.check(hp(Av,t)),e.uuid=t=>e.check(gp(jv,t)),e.uuidv4=t=>e.check(_p(jv,t)),e.uuidv6=t=>e.check(vp(jv,t)),e.uuidv7=t=>e.check(yp(jv,t)),e.nanoid=t=>e.check(Sp(Pv,t)),e.guid=t=>e.check(hp(Av,t)),e.cuid=t=>e.check(Cp(Fv,t)),e.cuid2=t=>e.check(wp(Iv,t)),e.ulid=t=>e.check(Tp(Lv,t)),e.base64=t=>e.check(Np(Gv,t)),e.base64url=t=>e.check(Pp(Kv,t)),e.xid=t=>e.check(Ep(Rv,t)),e.ksuid=t=>e.check(Dp(zv,t)),e.ipv4=t=>e.check(Op(Bv,t)),e.ipv6=t=>e.check(kp(Hv,t)),e.cidrv4=t=>e.check(jp(Uv,t)),e.cidrv6=t=>e.check(Mp(Wv,t)),e.e164=t=>e.check(Fp(qv,t)),e.datetime=t=>e.check(Dg(t)),e.date=t=>e.check(Og(t)),e.time=t=>e.check(kg(t)),e.duration=t=>e.check(Ag(t))}),W=g(`ZodStringFormat`,(e,t)=>{E.init(e,t),Dv.init(e,t)}),kv=g(`ZodEmail`,(e,t)=>{Hc.init(e,t),W.init(e,t)}),Av=g(`ZodGUID`,(e,t)=>{Bc.init(e,t),W.init(e,t)}),jv=g(`ZodUUID`,(e,t)=>{Vc.init(e,t),W.init(e,t)}),Mv=g(`ZodURL`,(e,t)=>{Uc.init(e,t),W.init(e,t)}),Nv=g(`ZodEmoji`,(e,t)=>{Wc.init(e,t),W.init(e,t)}),Pv=g(`ZodNanoID`,(e,t)=>{Gc.init(e,t),W.init(e,t)}),Fv=g(`ZodCUID`,(e,t)=>{Kc.init(e,t),W.init(e,t)}),Iv=g(`ZodCUID2`,(e,t)=>{qc.init(e,t),W.init(e,t)}),Lv=g(`ZodULID`,(e,t)=>{Jc.init(e,t),W.init(e,t)}),Rv=g(`ZodXID`,(e,t)=>{Yc.init(e,t),W.init(e,t)}),zv=g(`ZodKSUID`,(e,t)=>{Xc.init(e,t),W.init(e,t)}),Bv=g(`ZodIPv4`,(e,t)=>{tl.init(e,t),W.init(e,t)}),Vv=g(`ZodMAC`,(e,t)=>{rl.init(e,t),W.init(e,t)}),Hv=g(`ZodIPv6`,(e,t)=>{nl.init(e,t),W.init(e,t)}),Uv=g(`ZodCIDRv4`,(e,t)=>{il.init(e,t),W.init(e,t)}),Wv=g(`ZodCIDRv6`,(e,t)=>{al.init(e,t),W.init(e,t)}),Gv=g(`ZodBase64`,(e,t)=>{ol.init(e,t),W.init(e,t)}),Kv=g(`ZodBase64URL`,(e,t)=>{sl.init(e,t),W.init(e,t)}),qv=g(`ZodE164`,(e,t)=>{cl.init(e,t),W.init(e,t)}),Jv=g(`ZodJWT`,(e,t)=>{ll.init(e,t),W.init(e,t)}),Yv=g(`ZodCustomStringFormat`,(e,t)=>{ul.init(e,t),W.init(e,t)}),Xv=g(`ZodNumber`,(e,t)=>{dl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oh(e,t,n,r),$g(e,`ZodNumber`,{gt(e,t){return this.check(fm(e,t))},gte(e,t){return this.check(D(e,t))},min(e,t){return this.check(D(e,t))},lt(e,t){return this.check(um(e,t))},lte(e,t){return this.check(dm(e,t))},max(e,t){return this.check(dm(e,t))},int(e){return this.check(O_(e))},safe(e){return this.check(O_(e))},positive(e){return this.check(fm(0,e))},nonnegative(e){return this.check(D(0,e))},negative(e){return this.check(um(0,e))},nonpositive(e){return this.check(dm(0,e))},multipleOf(e,t){return this.check(_m(e,t))},step(e,t){return this.check(_m(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),Zv=g(`ZodNumberFormat`,(e,t)=>{fl.init(e,t),Xv.init(e,t)}),Qv=g(`ZodBoolean`,(e,t)=>{pl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kh(e,t,n,r)}),$v=g(`ZodBigInt`,(e,t)=>{ml.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ah(e,t,n,r),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.gt=(t,n)=>e.check(fm(t,n)),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.lt=(t,n)=>e.check(um(t,n)),e.lte=(t,n)=>e.check(dm(t,n)),e.max=(t,n)=>e.check(dm(t,n)),e.positive=t=>e.check(fm(BigInt(0),t)),e.negative=t=>e.check(um(BigInt(0),t)),e.nonpositive=t=>e.check(dm(BigInt(0),t)),e.nonnegative=t=>e.check(D(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(_m(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null}),ey=g(`ZodBigIntFormat`,(e,t)=>{hl.init(e,t),$v.init(e,t)}),ty=g(`ZodSymbol`,(e,t)=>{gl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jh(e,t,n,r)}),ny=g(`ZodUndefined`,(e,t)=>{_l.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nh(e,t,n,r)}),ry=g(`ZodNull`,(e,t)=>{vl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mh(e,t,n,r)}),iy=g(`ZodAny`,(e,t)=>{yl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ih(e,t,n,r)}),ay=g(`ZodUnknown`,(e,t)=>{bl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lh(e,t,n,r)}),oy=g(`ZodNever`,(e,t)=>{xl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fh(e,t,n,r)}),sy=g(`ZodVoid`,(e,t)=>{Sl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ph(e,t,n,r)}),cy=g(`ZodDate`,(e,t)=>{Cl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rh(e,t,n,r),e.min=(t,n)=>e.check(D(t,n)),e.max=(t,n)=>e.check(dm(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),ly=g(`ZodArray`,(e,t)=>{wl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xh(e,t,n,r),e.element=t.element,$g(e,`ZodArray`,{min(e,t){return this.check(Sm(e,t))},nonempty(e){return this.check(Sm(1,e))},max(e,t){return this.check(xm(e,t))},length(e,t){return this.check(Cm(e,t))},unwrap(){return this.element}})}),uy=g(`ZodObject`,(e,t)=>{El.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zh(e,t,n,r),y(e,`shape`,()=>t.shape),$g(e,`ZodObject`,{keyof(){return B(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:P()})},loose(){return this.clone({...this._zod.def,catchall:P()})},strict(){return this.clone({...this._zod.def,catchall:B_()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return ya(this,e)},safeExtend(e){return ba(this,e)},merge(e){return xa(this,e)},pick(e){return _a(this,e)},omit(e){return va(this,e)},partial(...e){return Sa(Cy,this,e[0])},required(...e){return Ca(Oy,this,e[0])}})}),dy=g(`ZodUnion`,(e,t)=>{Dl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qh(e,t,n,r),e.options=t.options}),fy=g(`ZodXor`,(e,t)=>{dy.init(e,t),Ol.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qh(e,t,n,r),e.options=t.options}),py=g(`ZodDiscriminatedUnion`,(e,t)=>{dy.init(e,t),kl.init(e,t)}),my=g(`ZodIntersection`,(e,t)=>{Al.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$h(e,t,n,r)}),hy=g(`ZodTuple`,(e,t)=>{jl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eg(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})}),gy=g(`ZodRecord`,(e,t)=>{Ml.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tg(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),_y=g(`ZodMap`,(e,t)=>{Nl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jh(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(ym(...t)),e.nonempty=t=>e.check(ym(1,t)),e.max=(...t)=>e.check(vm(...t)),e.size=(...t)=>e.check(bm(...t))}),vy=g(`ZodSet`,(e,t)=>{Pl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yh(e,t,n,r),e.min=(...t)=>e.check(ym(...t)),e.nonempty=t=>e.check(ym(1,t)),e.max=(...t)=>e.check(vm(...t)),e.size=(...t)=>e.check(bm(...t))}),yy=g(`ZodEnum`,(e,t)=>{Fl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zh(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new yy({...t,checks:[],...b(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new yy({...t,checks:[],...b(r),entries:i})}}),by=g(`ZodLiteral`,(e,t)=>{Il.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bh(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),xy=g(`ZodFile`,(e,t)=>{Ll.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uh(e,t,n,r),e.min=(t,n)=>e.check(ym(t,n)),e.max=(t,n)=>e.check(vm(t,n)),e.mime=(t,n)=>e.check(jm(Array.isArray(t)?t:[t],n))}),Sy=g(`ZodTransform`,(e,t)=>{Rl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qh(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zi(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ja(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(ja(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),Cy=g(`ZodOptional`,(e,t)=>{zl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ug(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),wy=g(`ZodExactOptional`,(e,t)=>{Bl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ug(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Ty=g(`ZodNullable`,(e,t)=>{Vl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ng(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Ey=g(`ZodDefault`,(e,t)=>{Hl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ig(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Dy=g(`ZodPrefault`,(e,t)=>{Ul.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ag(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Oy=g(`ZodNonOptional`,(e,t)=>{Wl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ky=g(`ZodSuccess`,(e,t)=>{Gl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Ay=g(`ZodCatch`,(e,t)=>{Kl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>og(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),jy=g(`ZodNaN`,(e,t)=>{ql.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vh(e,t,n,r)}),My=g(`ZodPipe`,(e,t)=>{Jl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sg(e,t,n,r),e.in=t.in,e.out=t.out}),Ny=g(`ZodCodec`,(e,t)=>{My.init(e,t),Yl.init(e,t)}),Py=g(`ZodPreprocess`,(e,t)=>{My.init(e,t),Xl.init(e,t)}),Fy=g(`ZodReadonly`,(e,t)=>{Zl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Iy=g(`ZodTemplateLiteral`,(e,t)=>{Ql.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hh(e,t,n,r)}),Ly=g(`ZodLazy`,(e,t)=>{tu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dg(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),Ry=g(`ZodPromise`,(e,t)=>{eu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),zy=g(`ZodFunction`,(e,t)=>{$l.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Kh(e,t,n,r)}),By=g(`ZodCustom`,(e,t)=>{nu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gh(e,t,n,r)}),Vy=ph,Hy=mh,Uy=(...e)=>hh({Codec:Ny,Boolean:Qv,String:Ov},...e)}));function Gy(e){_({customError:e})}function Ky(){return _().customError}var qy,Jy,Yy=t((()=>{yg(),qy={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`},Jy||={}}));function Xy(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function Zy(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function Qy(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return K.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return K.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=G(Zy(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return K.null();if(n.length===0)return K.never();if(n.length===1)return K.literal(n[0]);if(n.every(e=>typeof e==`string`))return K.enum(n);let r=n.map(e=>K.literal(e));return r.length<2?r[0]:K.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return K.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>Qy({...e,type:n},t));return r.length===0?K.never():r.length===1?r[0]:K.union(r)}if(!n)return K.any();let r;switch(n){case`string`:{let t=K.string();if(e.format){let n=e.format;n===`email`?t=t.check(K.email()):n===`uri`||n===`uri-reference`?t=t.check(K.url()):n===`uuid`||n===`guid`?t=t.check(K.uuid()):n===`date-time`?t=t.check(K.iso.datetime()):n===`date`?t=t.check(K.iso.date()):n===`time`?t=t.check(K.iso.time()):n===`duration`?t=t.check(K.iso.duration()):n===`ipv4`?t=t.check(K.ipv4()):n===`ipv6`?t=t.check(K.ipv6()):n===`mac`?t=t.check(K.mac()):n===`cidr`?t=t.check(K.cidrv4()):n===`cidr-v6`?t=t.check(K.cidrv6()):n===`base64`?t=t.check(K.base64()):n===`base64url`?t=t.check(K.base64url()):n===`e164`?t=t.check(K.e164()):n===`jwt`?t=t.check(K.jwt()):n===`emoji`?t=t.check(K.emoji()):n===`nanoid`?t=t.check(K.nanoid()):n===`cuid`?t=t.check(K.cuid()):n===`cuid2`?t=t.check(K.cuid2()):n===`ulid`?t=t.check(K.ulid()):n===`xid`?t=t.check(K.xid()):n===`ksuid`&&(t=t.check(K.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?K.number().int():K.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=K.boolean();break;case`null`:r=K.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=G(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=G(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?G(e.additionalProperties,t):K.any();if(Object.keys(n).length===0){r=K.record(i,a);break}let o=K.object(n).passthrough(),s=K.looseRecord(i,a);r=K.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=G(i[e],t),r=K.string().regex(new RegExp(e));o.push(K.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(K.object(n).passthrough()),s.push(...o),s.length===0)r=K.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=K.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=K.intersection(e,s[t]);r=e}break}let o=K.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(G(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>G(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?G(i,t):void 0;r=o?K.tuple(a).rest(o):K.tuple(a),typeof e.minItems==`number`&&(r=r.check(K.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(K.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>G(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?G(e.additionalItems,t):void 0;r=a?K.tuple(n).rest(a):K.tuple(n),typeof e.minItems==`number`&&(r=r.check(K.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(K.maxLength(e.maxItems)))}else if(i!==void 0){let n=G(i,t),a=K.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=K.array(K.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function G(e,t){if(typeof e==`boolean`)return e?K.any():K.never();let n=Qy(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>G(e,t)),a=K.union(i);n=r?K.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>G(e,t)),a=K.xor(i);n=r?K.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:K.any();else{let i=r?n:G(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=K.intersection(i,G(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=K.nullable(n)),e.readOnly===!0&&(n=K.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))eb.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function $y(e,t){if(typeof e==`boolean`)return e?K.any():K.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Xy(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??up};return G(n,r)}var K,eb,tb=t((()=>{dp(),Tg(),Fg(),Wy(),K={...Qg,...wg,iso:Eg},eb=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(`.`))})),nb=n({bigint:()=>ob,boolean:()=>ab,date:()=>sb,number:()=>ib,string:()=>rb});function rb(e){return pp(Ov,e)}function ib(e){return Hp(Xv,e)}function ab(e){return Yp(Qv,e)}function ob(e){return Zp($v,e)}function sb(e){return cm(cy,e)}var cb=t((()=>{yg(),Wy()})),lb=n({$brand:()=>Li,$input:()=>cp,$output:()=>sp,NEVER:()=>Ii,TimePrecision:()=>_h,ZodAny:()=>iy,ZodArray:()=>ly,ZodBase64:()=>Gv,ZodBase64URL:()=>Kv,ZodBigInt:()=>$v,ZodBigIntFormat:()=>ey,ZodBoolean:()=>Qv,ZodCIDRv4:()=>Uv,ZodCIDRv6:()=>Wv,ZodCUID:()=>Fv,ZodCUID2:()=>Iv,ZodCatch:()=>Ay,ZodCodec:()=>Ny,ZodCustom:()=>By,ZodCustomStringFormat:()=>Yv,ZodDate:()=>cy,ZodDefault:()=>Ey,ZodDiscriminatedUnion:()=>py,ZodE164:()=>qv,ZodEmail:()=>kv,ZodEmoji:()=>Nv,ZodEnum:()=>yy,ZodError:()=>Lg,ZodExactOptional:()=>wy,ZodFile:()=>xy,ZodFirstPartyTypeKind:()=>Jy,ZodFunction:()=>zy,ZodGUID:()=>Av,ZodIPv4:()=>Bv,ZodIPv6:()=>Hv,ZodISODate:()=>Mg,ZodISODateTime:()=>jg,ZodISODuration:()=>Pg,ZodISOTime:()=>Ng,ZodIntersection:()=>my,ZodIssueCode:()=>qy,ZodJWT:()=>Jv,ZodKSUID:()=>zv,ZodLazy:()=>Ly,ZodLiteral:()=>by,ZodMAC:()=>Vv,ZodMap:()=>_y,ZodNaN:()=>jy,ZodNanoID:()=>Pv,ZodNever:()=>oy,ZodNonOptional:()=>Oy,ZodNull:()=>ry,ZodNullable:()=>Ty,ZodNumber:()=>Xv,ZodNumberFormat:()=>Zv,ZodObject:()=>uy,ZodOptional:()=>Cy,ZodPipe:()=>My,ZodPrefault:()=>Dy,ZodPreprocess:()=>Py,ZodPromise:()=>Ry,ZodReadonly:()=>Fy,ZodRealError:()=>A,ZodRecord:()=>gy,ZodSet:()=>vy,ZodString:()=>Ov,ZodStringFormat:()=>W,ZodSuccess:()=>ky,ZodSymbol:()=>ty,ZodTemplateLiteral:()=>Iy,ZodTransform:()=>Sy,ZodTuple:()=>hy,ZodType:()=>U,ZodULID:()=>Lv,ZodURL:()=>Mv,ZodUUID:()=>jv,ZodUndefined:()=>ny,ZodUnion:()=>dy,ZodUnknown:()=>ay,ZodVoid:()=>sy,ZodXID:()=>Rv,ZodXor:()=>fy,_ZodString:()=>Dv,_default:()=>av,_function:()=>vv,any:()=>z_,array:()=>F,base64:()=>b_,base64url:()=>x_,bigint:()=>N_,boolean:()=>N,catch:()=>lv,check:()=>yv,cidrv4:()=>v_,cidrv6:()=>y_,clone:()=>ma,codec:()=>fv,coerce:()=>nb,config:()=>_,core:()=>vg,cuid:()=>u_,cuid2:()=>d_,custom:()=>bv,date:()=>H_,decode:()=>Wg,decodeAsync:()=>Kg,describe:()=>Vy,discriminatedUnion:()=>K_,e164:()=>S_,email:()=>e_,emoji:()=>c_,encode:()=>Ug,encodeAsync:()=>Gg,endsWith:()=>km,enum:()=>B,exactOptional:()=>nv,file:()=>ev,flattenError:()=>Ja,float32:()=>k_,float64:()=>A_,formatError:()=>Ya,fromJSONSchema:()=>$y,function:()=>vv,getErrorMap:()=>Ky,globalRegistry:()=>up,gt:()=>fm,gte:()=>D,guid:()=>t_,hash:()=>D_,hex:()=>E_,hostname:()=>T_,httpUrl:()=>s_,includes:()=>Dm,instanceof:()=>Cv,int:()=>O_,int32:()=>j_,int64:()=>P_,intersection:()=>q_,invertCodec:()=>pv,ipv4:()=>h_,ipv6:()=>__,iso:()=>Eg,json:()=>wv,jwt:()=>C_,keyof:()=>U_,ksuid:()=>m_,lazy:()=>gv,length:()=>Cm,literal:()=>V,locales:()=>rp,looseObject:()=>L,looseRecord:()=>X_,lowercase:()=>Tm,lt:()=>um,lte:()=>dm,mac:()=>g_,map:()=>Z_,maxLength:()=>xm,maxSize:()=>vm,meta:()=>Hy,mime:()=>jm,minLength:()=>Sm,minSize:()=>ym,multipleOf:()=>_m,nan:()=>uv,nanoid:()=>l_,nativeEnum:()=>$_,negative:()=>mm,never:()=>B_,nonnegative:()=>gm,nonoptional:()=>sv,nonpositive:()=>hm,normalize:()=>Nm,null:()=>R_,nullable:()=>rv,nullish:()=>iv,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>Mm,parse:()=>zg,parseAsync:()=>Bg,partialRecord:()=>Y_,pipe:()=>dv,positive:()=>pm,prefault:()=>ov,preprocess:()=>Tv,prettifyError:()=>Qa,promise:()=>_v,property:()=>Am,readonly:()=>mv,record:()=>z,refine:()=>xv,regex:()=>wm,regexes:()=>ko,registry:()=>ap,safeDecode:()=>Jg,safeDecodeAsync:()=>Xg,safeEncode:()=>qg,safeEncodeAsync:()=>Yg,safeParse:()=>Vg,safeParseAsync:()=>Hg,set:()=>Q_,setErrorMap:()=>Gy,size:()=>bm,slugify:()=>Lm,startsWith:()=>Om,strictObject:()=>W_,string:()=>j,stringFormat:()=>w_,stringbool:()=>Uy,success:()=>cv,superRefine:()=>Sv,symbol:()=>I_,templateLiteral:()=>hv,toJSONSchema:()=>Th,toLowerCase:()=>Fm,toUpperCase:()=>Im,transform:()=>tv,treeifyError:()=>Xa,trim:()=>Pm,tuple:()=>J_,uint32:()=>M_,uint64:()=>F_,ulid:()=>f_,undefined:()=>L_,union:()=>R,unknown:()=>P,uppercase:()=>Em,url:()=>o_,util:()=>Hi,uuid:()=>n_,uuidv4:()=>r_,uuidv6:()=>i_,uuidv7:()=>a_,void:()=>V_,xid:()=>p_,xor:()=>G_}),ub=t((()=>{yg(),Wy(),Tg(),Rg(),Zg(),Yy(),Pu(),pg(),tb(),ip(),Fg(),cb(),_(Mu())})),db,fb=t((()=>{ub(),ub(),db=lb})),pb=n({$brand:()=>Li,$input:()=>cp,$output:()=>sp,NEVER:()=>Ii,TimePrecision:()=>_h,ZodAny:()=>iy,ZodArray:()=>ly,ZodBase64:()=>Gv,ZodBase64URL:()=>Kv,ZodBigInt:()=>$v,ZodBigIntFormat:()=>ey,ZodBoolean:()=>Qv,ZodCIDRv4:()=>Uv,ZodCIDRv6:()=>Wv,ZodCUID:()=>Fv,ZodCUID2:()=>Iv,ZodCatch:()=>Ay,ZodCodec:()=>Ny,ZodCustom:()=>By,ZodCustomStringFormat:()=>Yv,ZodDate:()=>cy,ZodDefault:()=>Ey,ZodDiscriminatedUnion:()=>py,ZodE164:()=>qv,ZodEmail:()=>kv,ZodEmoji:()=>Nv,ZodEnum:()=>yy,ZodError:()=>Lg,ZodExactOptional:()=>wy,ZodFile:()=>xy,ZodFirstPartyTypeKind:()=>Jy,ZodFunction:()=>zy,ZodGUID:()=>Av,ZodIPv4:()=>Bv,ZodIPv6:()=>Hv,ZodISODate:()=>Mg,ZodISODateTime:()=>jg,ZodISODuration:()=>Pg,ZodISOTime:()=>Ng,ZodIntersection:()=>my,ZodIssueCode:()=>qy,ZodJWT:()=>Jv,ZodKSUID:()=>zv,ZodLazy:()=>Ly,ZodLiteral:()=>by,ZodMAC:()=>Vv,ZodMap:()=>_y,ZodNaN:()=>jy,ZodNanoID:()=>Pv,ZodNever:()=>oy,ZodNonOptional:()=>Oy,ZodNull:()=>ry,ZodNullable:()=>Ty,ZodNumber:()=>Xv,ZodNumberFormat:()=>Zv,ZodObject:()=>uy,ZodOptional:()=>Cy,ZodPipe:()=>My,ZodPrefault:()=>Dy,ZodPreprocess:()=>Py,ZodPromise:()=>Ry,ZodReadonly:()=>Fy,ZodRealError:()=>A,ZodRecord:()=>gy,ZodSet:()=>vy,ZodString:()=>Ov,ZodStringFormat:()=>W,ZodSuccess:()=>ky,ZodSymbol:()=>ty,ZodTemplateLiteral:()=>Iy,ZodTransform:()=>Sy,ZodTuple:()=>hy,ZodType:()=>U,ZodULID:()=>Lv,ZodURL:()=>Mv,ZodUUID:()=>jv,ZodUndefined:()=>ny,ZodUnion:()=>dy,ZodUnknown:()=>ay,ZodVoid:()=>sy,ZodXID:()=>Rv,ZodXor:()=>fy,_ZodString:()=>Dv,_default:()=>av,_function:()=>vv,any:()=>z_,array:()=>F,base64:()=>b_,base64url:()=>x_,bigint:()=>N_,boolean:()=>N,catch:()=>lv,check:()=>yv,cidrv4:()=>v_,cidrv6:()=>y_,clone:()=>ma,codec:()=>fv,coerce:()=>nb,config:()=>_,core:()=>vg,cuid:()=>u_,cuid2:()=>d_,custom:()=>bv,date:()=>H_,decode:()=>Wg,decodeAsync:()=>Kg,default:()=>mb,describe:()=>Vy,discriminatedUnion:()=>K_,e164:()=>S_,email:()=>e_,emoji:()=>c_,encode:()=>Ug,encodeAsync:()=>Gg,endsWith:()=>km,enum:()=>B,exactOptional:()=>nv,file:()=>ev,flattenError:()=>Ja,float32:()=>k_,float64:()=>A_,formatError:()=>Ya,fromJSONSchema:()=>$y,function:()=>vv,getErrorMap:()=>Ky,globalRegistry:()=>up,gt:()=>fm,gte:()=>D,guid:()=>t_,hash:()=>D_,hex:()=>E_,hostname:()=>T_,httpUrl:()=>s_,includes:()=>Dm,instanceof:()=>Cv,int:()=>O_,int32:()=>j_,int64:()=>P_,intersection:()=>q_,invertCodec:()=>pv,ipv4:()=>h_,ipv6:()=>__,iso:()=>Eg,json:()=>wv,jwt:()=>C_,keyof:()=>U_,ksuid:()=>m_,lazy:()=>gv,length:()=>Cm,literal:()=>V,locales:()=>rp,looseObject:()=>L,looseRecord:()=>X_,lowercase:()=>Tm,lt:()=>um,lte:()=>dm,mac:()=>g_,map:()=>Z_,maxLength:()=>xm,maxSize:()=>vm,meta:()=>Hy,mime:()=>jm,minLength:()=>Sm,minSize:()=>ym,multipleOf:()=>_m,nan:()=>uv,nanoid:()=>l_,nativeEnum:()=>$_,negative:()=>mm,never:()=>B_,nonnegative:()=>gm,nonoptional:()=>sv,nonpositive:()=>hm,normalize:()=>Nm,null:()=>R_,nullable:()=>rv,nullish:()=>iv,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>Mm,parse:()=>zg,parseAsync:()=>Bg,partialRecord:()=>Y_,pipe:()=>dv,positive:()=>pm,prefault:()=>ov,preprocess:()=>Tv,prettifyError:()=>Qa,promise:()=>_v,property:()=>Am,readonly:()=>mv,record:()=>z,refine:()=>xv,regex:()=>wm,regexes:()=>ko,registry:()=>ap,safeDecode:()=>Jg,safeDecodeAsync:()=>Xg,safeEncode:()=>qg,safeEncodeAsync:()=>Yg,safeParse:()=>Vg,safeParseAsync:()=>Hg,set:()=>Q_,setErrorMap:()=>Gy,size:()=>bm,slugify:()=>Lm,startsWith:()=>Om,strictObject:()=>W_,string:()=>j,stringFormat:()=>w_,stringbool:()=>Uy,success:()=>cv,superRefine:()=>Sv,symbol:()=>I_,templateLiteral:()=>hv,toJSONSchema:()=>Th,toLowerCase:()=>Fm,toUpperCase:()=>Im,transform:()=>tv,treeifyError:()=>Xa,trim:()=>Pm,tuple:()=>J_,uint32:()=>M_,uint64:()=>F_,ulid:()=>f_,undefined:()=>L_,union:()=>R,unknown:()=>P,uppercase:()=>Em,url:()=>o_,util:()=>Hi,uuid:()=>n_,uuidv4:()=>r_,uuidv6:()=>i_,uuidv7:()=>a_,void:()=>V_,xid:()=>p_,xor:()=>G_,z:()=>lb}),mb,hb=t((()=>{fb(),fb(),mb=db}));hb();var gb=`io.modelcontextprotocol/related-task`,q=bv(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),_b=R([j(),M().int()]),vb=j();L({ttl:M().optional(),pollInterval:M().optional()});var yb=I({ttl:M().optional()}),bb=I({taskId:j()}),xb=L({progressToken:_b.optional(),[gb]:bb.optional()}),Sb=I({_meta:xb.optional()}),Cb=Sb.extend({task:yb.optional()}),wb=e=>Cb.safeParse(e).success,J=I({method:j(),params:Sb.loose().optional()}),Tb=I({_meta:xb.optional()}),Eb=I({method:j(),params:Tb.loose().optional()}),Y=L({_meta:xb.optional()}),Db=R([j(),M().int()]),Ob=I({jsonrpc:V(`2.0`),id:Db,...J.shape}).strict(),kb=e=>Ob.safeParse(e).success,Ab=I({jsonrpc:V(`2.0`),...Eb.shape}).strict(),jb=e=>Ab.safeParse(e).success,Mb=I({jsonrpc:V(`2.0`),id:Db,result:Y}).strict(),Nb=e=>Mb.safeParse(e).success,X;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(X||={});var Pb=I({jsonrpc:V(`2.0`),id:Db.optional(),error:I({code:M().int(),message:j(),data:P().optional()})}).strict(),Fb=e=>Pb.safeParse(e).success,Ib=R([Ob,Ab,Mb,Pb]);R([Mb,Pb]);var Lb=Y.strict(),Rb=Tb.extend({requestId:Db.optional(),reason:j().optional()}),zb=Eb.extend({method:V(`notifications/cancelled`),params:Rb}),Bb=I({icons:F(I({src:j(),mimeType:j().optional(),sizes:F(j()).optional(),theme:B([`light`,`dark`]).optional()})).optional()}),Vb=I({name:j(),title:j().optional()}),Hb=Vb.extend({...Vb.shape,...Bb.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),Ub=Tv(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,q_(I({form:q_(I({applyDefaults:N().optional()}),z(j(),P())).optional(),url:q.optional()}),z(j(),P()).optional())),Wb=L({list:q.optional(),cancel:q.optional(),requests:L({sampling:L({createMessage:q.optional()}).optional(),elicitation:L({create:q.optional()}).optional()}).optional()}),Gb=L({list:q.optional(),cancel:q.optional(),requests:L({tools:L({call:q.optional()}).optional()}).optional()}),Kb=I({experimental:z(j(),q).optional(),sampling:I({context:q.optional(),tools:q.optional()}).optional(),elicitation:Ub.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:Wb.optional(),extensions:z(j(),q).optional()}),qb=Sb.extend({protocolVersion:j(),capabilities:Kb,clientInfo:Hb}),Jb=J.extend({method:V(`initialize`),params:qb}),Yb=I({experimental:z(j(),q).optional(),logging:q.optional(),completions:q.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:Gb.optional(),extensions:z(j(),q).optional()}),Xb=Y.extend({protocolVersion:j(),capabilities:Yb,serverInfo:Hb,instructions:j().optional()}),Zb=Eb.extend({method:V(`notifications/initialized`),params:Tb.optional()}),Qb=J.extend({method:V(`ping`),params:Sb.optional()}),$b=I({progress:M(),total:H(M()),message:H(j())}),ex=I({...Tb.shape,...$b.shape,progressToken:_b}),tx=Eb.extend({method:V(`notifications/progress`),params:ex}),nx=Sb.extend({cursor:vb.optional()}),rx=J.extend({params:nx.optional()}),ix=Y.extend({nextCursor:vb.optional()}),ax=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),ox=I({taskId:j(),status:ax,ttl:R([M(),R_()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:H(M()),statusMessage:H(j())}),sx=Y.extend({task:ox}),cx=Tb.merge(ox),lx=Eb.extend({method:V(`notifications/tasks/status`),params:cx}),ux=J.extend({method:V(`tasks/get`),params:Sb.extend({taskId:j()})}),dx=Y.merge(ox),fx=J.extend({method:V(`tasks/result`),params:Sb.extend({taskId:j()})});Y.loose();var px=rx.extend({method:V(`tasks/list`)}),mx=ix.extend({tasks:F(ox)}),hx=J.extend({method:V(`tasks/cancel`),params:Sb.extend({taskId:j()})}),gx=Y.merge(ox),_x=I({uri:j(),mimeType:H(j()),_meta:z(j(),P()).optional()}),vx=_x.extend({text:j()}),yx=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),bx=_x.extend({blob:yx}),xx=B([`user`,`assistant`]),Sx=I({audience:F(xx).optional(),priority:M().min(0).max(1).optional(),lastModified:Dg({offset:!0}).optional()}),Cx=I({...Vb.shape,...Bb.shape,uri:j(),description:H(j()),mimeType:H(j()),size:H(M()),annotations:Sx.optional(),_meta:H(L({}))}),wx=I({...Vb.shape,...Bb.shape,uriTemplate:j(),description:H(j()),mimeType:H(j()),annotations:Sx.optional(),_meta:H(L({}))}),Tx=rx.extend({method:V(`resources/list`)}),Ex=ix.extend({resources:F(Cx)}),Dx=rx.extend({method:V(`resources/templates/list`)}),Ox=ix.extend({resourceTemplates:F(wx)}),kx=Sb.extend({uri:j()}),Ax=kx,jx=J.extend({method:V(`resources/read`),params:Ax}),Mx=Y.extend({contents:F(R([vx,bx]))}),Nx=Eb.extend({method:V(`notifications/resources/list_changed`),params:Tb.optional()}),Px=kx,Fx=J.extend({method:V(`resources/subscribe`),params:Px}),Ix=kx,Lx=J.extend({method:V(`resources/unsubscribe`),params:Ix}),Rx=Tb.extend({uri:j()}),zx=Eb.extend({method:V(`notifications/resources/updated`),params:Rx}),Bx=I({name:j(),description:H(j()),required:H(N())}),Vx=I({...Vb.shape,...Bb.shape,description:H(j()),arguments:H(F(Bx)),_meta:H(L({}))}),Hx=rx.extend({method:V(`prompts/list`)}),Ux=ix.extend({prompts:F(Vx)}),Wx=Sb.extend({name:j(),arguments:z(j(),j()).optional()}),Gx=J.extend({method:V(`prompts/get`),params:Wx}),Kx=I({type:V(`text`),text:j(),annotations:Sx.optional(),_meta:z(j(),P()).optional()}),qx=I({type:V(`image`),data:yx,mimeType:j(),annotations:Sx.optional(),_meta:z(j(),P()).optional()}),Jx=I({type:V(`audio`),data:yx,mimeType:j(),annotations:Sx.optional(),_meta:z(j(),P()).optional()}),Yx=I({type:V(`tool_use`),name:j(),id:j(),input:z(j(),P()),_meta:z(j(),P()).optional()}),Xx=I({type:V(`resource`),resource:R([vx,bx]),annotations:Sx.optional(),_meta:z(j(),P()).optional()}),Zx=Cx.extend({type:V(`resource_link`)}),Qx=R([Kx,qx,Jx,Zx,Xx]),$x=I({role:xx,content:Qx}),eS=Y.extend({description:j().optional(),messages:F($x)}),tS=Eb.extend({method:V(`notifications/prompts/list_changed`),params:Tb.optional()}),nS=I({title:j().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),rS=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),iS=I({...Vb.shape,...Bb.shape,description:j().optional(),inputSchema:I({type:V(`object`),properties:z(j(),q).optional(),required:F(j()).optional()}).catchall(P()),outputSchema:I({type:V(`object`),properties:z(j(),q).optional(),required:F(j()).optional()}).catchall(P()).optional(),annotations:nS.optional(),execution:rS.optional(),_meta:z(j(),P()).optional()}),aS=rx.extend({method:V(`tools/list`)}),oS=ix.extend({tools:F(iS)}),sS=Y.extend({content:F(Qx).default([]),structuredContent:z(j(),P()).optional(),isError:N().optional()});sS.or(Y.extend({toolResult:P()}));var cS=Cb.extend({name:j(),arguments:z(j(),P()).optional()}),lS=J.extend({method:V(`tools/call`),params:cS}),uS=Eb.extend({method:V(`notifications/tools/list_changed`),params:Tb.optional()});I({autoRefresh:N().default(!0),debounceMs:M().int().nonnegative().default(300)});var dS=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),fS=Sb.extend({level:dS}),pS=J.extend({method:V(`logging/setLevel`),params:fS}),mS=Tb.extend({level:dS,logger:j().optional(),data:P()}),hS=Eb.extend({method:V(`notifications/message`),params:mS}),gS=I({hints:F(I({name:j().optional()})).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),_S=I({mode:B([`auto`,`required`,`none`]).optional()}),vS=I({type:V(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:F(Qx).default([]),structuredContent:I({}).loose().optional(),isError:N().optional(),_meta:z(j(),P()).optional()}),yS=K_(`type`,[Kx,qx,Jx]),bS=K_(`type`,[Kx,qx,Jx,Yx,vS]),xS=I({role:xx,content:R([bS,F(bS)]),_meta:z(j(),P()).optional()}),SS=Cb.extend({messages:F(xS),modelPreferences:gS.optional(),systemPrompt:j().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(j()).optional(),metadata:q.optional(),tools:F(iS).optional(),toolChoice:_S.optional()}),CS=J.extend({method:V(`sampling/createMessage`),params:SS}),wS=Y.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:xx,content:yS}),TS=Y.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:xx,content:R([bS,F(bS)])}),ES=I({type:V(`boolean`),title:j().optional(),description:j().optional(),default:N().optional()}),DS=I({type:V(`string`),title:j().optional(),description:j().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),OS=I({type:B([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),kS=I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),default:j().optional()}),AS=I({type:V(`string`),title:j().optional(),description:j().optional(),oneOf:F(I({const:j(),title:j()})),default:j().optional()}),jS=R([R([I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),enumNames:F(j()).optional(),default:j().optional()}),R([kS,AS]),R([I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(j())}),default:F(j()).optional()}),I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:j(),title:j()}))}),default:F(j()).optional()})])]),ES,DS,OS]),MS=R([Cb.extend({mode:V(`form`).optional(),message:j(),requestedSchema:I({type:V(`object`),properties:z(j(),jS),required:F(j()).optional()})}),Cb.extend({mode:V(`url`),message:j(),elicitationId:j(),url:j().url()})]),NS=J.extend({method:V(`elicitation/create`),params:MS}),PS=Tb.extend({elicitationId:j()}),FS=Eb.extend({method:V(`notifications/elicitation/complete`),params:PS}),IS=Y.extend({action:B([`accept`,`decline`,`cancel`]),content:Tv(e=>e===null?void 0:e,z(j(),R([j(),M(),N(),F(j())])).optional())}),LS=I({type:V(`ref/resource`),uri:j()}),RS=I({type:V(`ref/prompt`),name:j()}),zS=Sb.extend({ref:R([RS,LS]),argument:I({name:j(),value:j()}),context:I({arguments:z(j(),j()).optional()}).optional()}),BS=J.extend({method:V(`completion/complete`),params:zS}),VS=Y.extend({completion:L({values:F(j()).max(100),total:H(M().int()),hasMore:H(N())})}),HS=I({uri:j().startsWith(`file://`),name:j().optional(),_meta:z(j(),P()).optional()}),US=J.extend({method:V(`roots/list`),params:Sb.optional()}),WS=Y.extend({roots:F(HS)}),GS=Eb.extend({method:V(`notifications/roots/list_changed`),params:Tb.optional()});R([Qb,Jb,BS,pS,Gx,Hx,Tx,Dx,jx,Fx,Lx,lS,aS,ux,fx,px,hx]),R([zb,tx,Zb,GS,lx]),R([Lb,wS,TS,IS,WS,dx,mx,sx]),R([Qb,CS,NS,US,ux,fx,px,hx]),R([zb,tx,hS,zx,Nx,uS,tS,lx,FS]),R([Lb,Xb,VS,eS,Ux,Ex,Ox,Mx,sS,oS,dx,mx,sx]);var Z=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new KS(e.elicitations,n)}return new e(t,n,r)}},KS=class extends Z{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function qS(e){return e===`completed`||e===`failed`||e===`cancelled`}function JS(e){let t=Sg(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Cg(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function YS(e,t){let n=xg(e,t);if(!n.success)throw n.error;return n.data}var XS=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(zb,e=>{this._oncancel(e)}),this.setNotificationHandler(tx,e=>{this._onprogress(e)}),this.setRequestHandler(Qb,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ux,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Z(X.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(fx,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r)if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new Z(e.error.code,e.error.message,e.error.data))}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new Z(X.InvalidParams,`Task not found: ${r}`);if(!qS(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(qS(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[gb]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(px,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new Z(X.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(hx,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Z(X.InvalidParams,`Task not found: ${e.params.taskId}`);if(qS(n.status))throw new Z(X.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new Z(X.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof Z?e:new Z(X.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),Z.fromError(X.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Nb(e)||Fb(e)?this._onresponse(e):kb(e)?this._onrequest(e,t):jb(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=Z.fromError(X.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[gb]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:X.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=wb(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new Z(X.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:X.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),Nb(e)?n(e):n(new Z(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(Nb(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),Nb(e)?r(e):r(Z.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof Z?e:new Z(X.InternalError,String(e))}}return}let i;try{let r=await this.request(e,sx,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new Z(X.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},qS(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new Z(X.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new Z(X.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof Z?e:new Z(X.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[gb]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof Z?e:new Z(X.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=xg(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let ee=n?.timeout??6e4;this._setupTimeout(d,ee,n?.maxTotalTimeout,()=>p(Z.fromError(X.RequestTimeout,`Request timed out`,{timeout:ee})),n?.resetTimeoutOnProgress??!1);let te=s?.taskId;te?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(te,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},dx,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},mx,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},gx,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[gb]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[gb]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[gb]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=JS(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=YS(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=JS(e);this._notificationHandlers.set(n,n=>{let r=YS(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&kb(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new Z(X.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new Z(X.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new Z(X.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new Z(X.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=lx.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),qS(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new Z(X.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(qS(a.status))throw new Z(X.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=lx.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),qS(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function ZS(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function QS(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];ZS(a)&&ZS(i)?n[r]={...a,...i}:n[r]=i}return n}var $S=`modulepreload`,eC=function(e,t){return new URL(e,t).href},tC={},nC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=eC(t,n),t in tC)return;tC[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:$S,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};hb(),(e=>typeof r<`u`?r:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof r<`u`?r:e)[t]}):e)(function(e){if(typeof r<`u`)return r.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var rC=class extends XS{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},iC=`2026-01-26`,aC=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Ib.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},oC=R([V(`light`),V(`dark`)]).describe(`Color theme preference for the host environment.`),sC=R([V(`inline`),V(`fullscreen`),V(`pip`)]).describe(`Display mode for UI presentation.`),cC=z(R([V(`--color-background-primary`),V(`--color-background-secondary`),V(`--color-background-tertiary`),V(`--color-background-inverse`),V(`--color-background-ghost`),V(`--color-background-info`),V(`--color-background-danger`),V(`--color-background-success`),V(`--color-background-warning`),V(`--color-background-disabled`),V(`--color-text-primary`),V(`--color-text-secondary`),V(`--color-text-tertiary`),V(`--color-text-inverse`),V(`--color-text-ghost`),V(`--color-text-info`),V(`--color-text-danger`),V(`--color-text-success`),V(`--color-text-warning`),V(`--color-text-disabled`),V(`--color-border-primary`),V(`--color-border-secondary`),V(`--color-border-tertiary`),V(`--color-border-inverse`),V(`--color-border-ghost`),V(`--color-border-info`),V(`--color-border-danger`),V(`--color-border-success`),V(`--color-border-warning`),V(`--color-border-disabled`),V(`--color-ring-primary`),V(`--color-ring-secondary`),V(`--color-ring-inverse`),V(`--color-ring-info`),V(`--color-ring-danger`),V(`--color-ring-success`),V(`--color-ring-warning`),V(`--font-sans`),V(`--font-mono`),V(`--font-weight-normal`),V(`--font-weight-medium`),V(`--font-weight-semibold`),V(`--font-weight-bold`),V(`--font-text-xs-size`),V(`--font-text-sm-size`),V(`--font-text-md-size`),V(`--font-text-lg-size`),V(`--font-heading-xs-size`),V(`--font-heading-sm-size`),V(`--font-heading-md-size`),V(`--font-heading-lg-size`),V(`--font-heading-xl-size`),V(`--font-heading-2xl-size`),V(`--font-heading-3xl-size`),V(`--font-text-xs-line-height`),V(`--font-text-sm-line-height`),V(`--font-text-md-line-height`),V(`--font-text-lg-line-height`),V(`--font-heading-xs-line-height`),V(`--font-heading-sm-line-height`),V(`--font-heading-md-line-height`),V(`--font-heading-lg-line-height`),V(`--font-heading-xl-line-height`),V(`--font-heading-2xl-line-height`),V(`--font-heading-3xl-line-height`),V(`--border-radius-xs`),V(`--border-radius-sm`),V(`--border-radius-md`),V(`--border-radius-lg`),V(`--border-radius-xl`),V(`--border-radius-full`),V(`--border-width-regular`),V(`--shadow-hairline`),V(`--shadow-sm`),V(`--shadow-md`),V(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
|
|
3390
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function Wh(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Kh(t,`input`,e.processors),output:Kh(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function k(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return k(r.element,n);if(r.type===`set`)return k(r.valueType,n);if(r.type===`lazy`)return k(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return k(r.innerType,n);if(r.type===`intersection`)return k(r.left,n)||k(r.right,n);if(r.type===`record`||r.type===`map`)return k(r.keyType,n)||k(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:k(r.in,n)||k(r.out,n);if(r.type===`object`){for(let e in r.shape)if(k(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(k(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(k(e,n))return!0;return!!(r.rest&&k(r.rest,n))}return!1}var Gh,Kh,qh=t((()=>{Pp(),Gh=(e,t={})=>n=>{let r=Hh({...n,processors:t});return O(e,r),Uh(r,e),Wh(r,e)},Kh=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Hh({...i??{},target:a,io:t,processors:n});return O(e,o),Uh(o,e),Wh(o,e)}}));function Jh(e,t){if(`_idmap`in e){let n=e,r=Hh({...t,processors:Fg}),i={};for(let e of n._idmap.entries()){let[t,n]=e;O(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Uh(r,n),a[t]=Wh(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Hh({...t,processors:Fg});return O(e,n),Uh(n,e),Wh(n,e)}var Yh,Xh,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig=t((()=>{qh(),C(),Yh={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Xh=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Yh[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Zh=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},Qh=(e,t,n,r)=>{n.type=`boolean`},$h=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},eg=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},tg=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},ng=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},rg=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},ig=(e,t,n,r)=>{n.not={}},ag=(e,t,n,r)=>{},og=(e,t,n,r)=>{},sg=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},cg=(e,t,n,r)=>{let i=e._zod.def,a=_a(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},lg=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ug=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},dg=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},fg=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},pg=(e,t,n,r)=>{n.type=`boolean`},mg=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},hg=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},gg=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},_g=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},vg=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},yg=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=O(a.element,t,{...r,path:[...r.path,`items`]})},bg=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=O(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=O(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},xg=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>O(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Sg=(e,t,n,r)=>{let i=e._zod.def,a=O(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=O(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Cg=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>O(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?O(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},wg=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=O(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=O(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=O(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Tg=(e,t,n,r)=>{let i=e._zod.def,a=O(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Eg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Dg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Og=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},kg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Ag=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;O(o,t,r);let s=t.seen.get(e);s.ref=o},jg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Mg=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ng=(e,t,n,r)=>{let i=e._zod.def;O(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pg=(e,t,n,r)=>{let i=e._zod.innerType;O(i,t,r);let a=t.seen.get(e);a.ref=i},Fg={string:Xh,number:Zh,boolean:Qh,bigint:$h,symbol:eg,null:tg,undefined:ng,void:rg,never:ig,any:ag,unknown:og,date:sg,enum:cg,literal:lg,nan:ug,template_literal:dg,file:fg,success:pg,custom:mg,function:hg,transform:gg,map:_g,set:vg,array:yg,object:bg,union:xg,intersection:Sg,tuple:Cg,record:wg,nullable:Tg,nonoptional:Eg,default:Dg,prefault:Og,catch:kg,pipe:Ag,readonly:jg,promise:Mg,optional:Ng,lazy:Pg}})),Lg,Rg=t((()=>{Ig(),qh(),Lg=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=Hh({processors:Fg,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return O(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),Uh(this.ctx,e);let{"~standard":n,...r}=Wh(this.ctx,e);return r}}})),zg=n({}),Bg=t((()=>{})),Vg=n({$ZodAny:()=>Hl,$ZodArray:()=>ql,$ZodAsyncError:()=>sa,$ZodBase64:()=>kl,$ZodBase64URL:()=>Al,$ZodBigInt:()=>Ll,$ZodBigIntFormat:()=>Rl,$ZodBoolean:()=>Il,$ZodCIDRv4:()=>Dl,$ZodCIDRv6:()=>Ol,$ZodCUID:()=>hl,$ZodCUID2:()=>gl,$ZodCatch:()=>hu,$ZodCheck:()=>w,$ZodCheckBigIntFormat:()=>gc,$ZodCheckEndsWith:()=>kc,$ZodCheckGreaterThan:()=>pc,$ZodCheckIncludes:()=>Dc,$ZodCheckLengthEquals:()=>Sc,$ZodCheckLessThan:()=>fc,$ZodCheckLowerCase:()=>Tc,$ZodCheckMaxLength:()=>bc,$ZodCheckMaxSize:()=>_c,$ZodCheckMimeType:()=>jc,$ZodCheckMinLength:()=>xc,$ZodCheckMinSize:()=>vc,$ZodCheckMultipleOf:()=>mc,$ZodCheckNumberFormat:()=>hc,$ZodCheckOverwrite:()=>Mc,$ZodCheckProperty:()=>Ac,$ZodCheckRegex:()=>wc,$ZodCheckSizeEquals:()=>yc,$ZodCheckStartsWith:()=>Oc,$ZodCheckStringFormat:()=>Cc,$ZodCheckUpperCase:()=>Ec,$ZodCodec:()=>vu,$ZodCustom:()=>Tu,$ZodCustomStringFormat:()=>Nl,$ZodDate:()=>Kl,$ZodDefault:()=>du,$ZodDiscriminatedUnion:()=>Ql,$ZodE164:()=>jl,$ZodEmail:()=>dl,$ZodEmoji:()=>pl,$ZodEncodeError:()=>ca,$ZodEnum:()=>iu,$ZodError:()=>wo,$ZodExactOptional:()=>lu,$ZodFile:()=>ou,$ZodFunction:()=>Su,$ZodGUID:()=>ll,$ZodIPv4:()=>wl,$ZodIPv6:()=>Tl,$ZodISODate:()=>xl,$ZodISODateTime:()=>bl,$ZodISODuration:()=>Cl,$ZodISOTime:()=>Sl,$ZodIntersection:()=>$l,$ZodJWT:()=>Ml,$ZodKSUID:()=>yl,$ZodLazy:()=>wu,$ZodLiteral:()=>au,$ZodMAC:()=>El,$ZodMap:()=>nu,$ZodNaN:()=>gu,$ZodNanoID:()=>ml,$ZodNever:()=>Wl,$ZodNonOptional:()=>pu,$ZodNull:()=>Vl,$ZodNullable:()=>uu,$ZodNumber:()=>Pl,$ZodNumberFormat:()=>Fl,$ZodObject:()=>Jl,$ZodObjectJIT:()=>Yl,$ZodOptional:()=>cu,$ZodPipe:()=>_u,$ZodPrefault:()=>fu,$ZodPreprocess:()=>yu,$ZodPromise:()=>Cu,$ZodReadonly:()=>bu,$ZodRealError:()=>To,$ZodRecord:()=>tu,$ZodRegistry:()=>Mp,$ZodSet:()=>ru,$ZodString:()=>cl,$ZodStringFormat:()=>E,$ZodSuccess:()=>mu,$ZodSymbol:()=>zl,$ZodTemplateLiteral:()=>xu,$ZodTransform:()=>su,$ZodTuple:()=>eu,$ZodType:()=>T,$ZodULID:()=>_l,$ZodURL:()=>fl,$ZodUUID:()=>ul,$ZodUndefined:()=>Bl,$ZodUnion:()=>Xl,$ZodUnknown:()=>Ul,$ZodVoid:()=>Gl,$ZodXID:()=>vl,$ZodXor:()=>Zl,$brand:()=>oa,$constructor:()=>g,$input:()=>jp,$output:()=>Ap,Doc:()=>Pc,JSONSchema:()=>zg,JSONSchemaGenerator:()=>Lg,NEVER:()=>aa,TimePrecision:()=>Bh,_any:()=>Em,_array:()=>sh,_base64:()=>nm,_base64url:()=>rm,_bigint:()=>ym,_boolean:()=>_m,_catch:()=>Eh,_check:()=>Fh,_cidrv4:()=>em,_cidrv6:()=>tm,_coercedBigint:()=>bm,_coercedBoolean:()=>vm,_coercedDate:()=>jm,_coercedNumber:()=>dm,_coercedString:()=>Ip,_cuid:()=>Kp,_cuid2:()=>qp,_custom:()=>Mh,_date:()=>Am,_decode:()=>Lo,_decodeAsync:()=>Vo,_default:()=>Ch,_discriminatedUnion:()=>uh,_e164:()=>im,_email:()=>Lp,_emoji:()=>Wp,_encode:()=>Fo,_encodeAsync:()=>zo,_endsWith:()=>Qm,_enum:()=>gh,_file:()=>yh,_float32:()=>pm,_float64:()=>mm,_gt:()=>Fm,_gte:()=>D,_guid:()=>Rp,_includes:()=>Xm,_int:()=>fm,_int32:()=>hm,_int64:()=>xm,_intersection:()=>dh,_ipv4:()=>Zp,_ipv6:()=>Qp,_isoDate:()=>sm,_isoDateTime:()=>om,_isoDuration:()=>lm,_isoTime:()=>cm,_jwt:()=>am,_ksuid:()=>Xp,_lazy:()=>Ah,_length:()=>Km,_literal:()=>vh,_lowercase:()=>Jm,_lt:()=>Nm,_lte:()=>Pm,_mac:()=>$p,_map:()=>mh,_max:()=>Pm,_maxLength:()=>Wm,_maxSize:()=>Vm,_mime:()=>eh,_min:()=>D,_minLength:()=>Gm,_minSize:()=>Hm,_multipleOf:()=>Bm,_nan:()=>Mm,_nanoid:()=>Gp,_nativeEnum:()=>_h,_negative:()=>Lm,_never:()=>Om,_nonnegative:()=>zm,_nonoptional:()=>wh,_nonpositive:()=>Rm,_normalize:()=>nh,_null:()=>Tm,_nullable:()=>Sh,_number:()=>um,_optional:()=>xh,_overwrite:()=>th,_parse:()=>Do,_parseAsync:()=>ko,_pipe:()=>Dh,_positive:()=>Im,_promise:()=>jh,_property:()=>$m,_readonly:()=>Oh,_record:()=>ph,_refine:()=>Nh,_regex:()=>qm,_safeDecode:()=>Go,_safeDecodeAsync:()=>Yo,_safeEncode:()=>Uo,_safeEncodeAsync:()=>qo,_safeParse:()=>jo,_safeParseAsync:()=>No,_set:()=>hh,_size:()=>Um,_slugify:()=>oh,_startsWith:()=>Zm,_string:()=>Fp,_stringFormat:()=>zh,_stringbool:()=>Rh,_success:()=>Th,_superRefine:()=>Ph,_symbol:()=>Cm,_templateLiteral:()=>kh,_toLowerCase:()=>ih,_toUpperCase:()=>ah,_transform:()=>bh,_trim:()=>rh,_tuple:()=>fh,_uint32:()=>gm,_uint64:()=>Sm,_ulid:()=>Jp,_undefined:()=>wm,_union:()=>ch,_unknown:()=>Dm,_uppercase:()=>Ym,_url:()=>Up,_uuid:()=>zp,_uuidv4:()=>Bp,_uuidv6:()=>Vp,_uuidv7:()=>Hp,_void:()=>km,_xid:()=>Yp,_xor:()=>lh,clone:()=>La,config:()=>_,createStandardJSONSchemaMethod:()=>Kh,createToJSONSchemaMethod:()=>Gh,decode:()=>Ro,decodeAsync:()=>Ho,describe:()=>Ih,encode:()=>Io,encodeAsync:()=>Bo,extractDefs:()=>Uh,finalize:()=>Wh,flattenError:()=>vo,formatError:()=>yo,globalConfig:()=>la,globalRegistry:()=>Np,initializeContext:()=>Hh,isValidBase64:()=>Rc,isValidBase64URL:()=>zc,isValidJWT:()=>Bc,locales:()=>Ep,meta:()=>Lh,parse:()=>Oo,parseAsync:()=>Ao,prettifyError:()=>So,process:()=>O,regexes:()=>Qo,registry:()=>Op,safeDecode:()=>Ko,safeDecodeAsync:()=>Xo,safeEncode:()=>Wo,safeEncodeAsync:()=>Jo,safeParse:()=>Mo,safeParseAsync:()=>Po,toDotPath:()=>xo,toJSONSchema:()=>Jh,treeifyError:()=>bo,util:()=>da,version:()=>Ic}),Hg=t((()=>{ua(),Zo(),Eo(),Eu(),Nc(),Lc(),C(),lc(),Dp(),Pp(),Fc(),Vh(),qh(),Ig(),Rg(),Bg()}));Vh(),C(),lc(),ua(),Zo(),Ig(),Eo(),Dp(),Hg(),Pp();function Ug(e){return!!e._zod}function Wg(e,t){return Ug(e)?Mo(e,t):e.safeParse(t)}function Gg(e){if(!e)return;let t;if(t=Ug(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Kg(e){if(Ug(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var qg=n({endsWith:()=>Qm,gt:()=>Fm,gte:()=>D,includes:()=>Xm,length:()=>Km,lowercase:()=>Jm,lt:()=>Nm,lte:()=>Pm,maxLength:()=>Wm,maxSize:()=>Vm,mime:()=>eh,minLength:()=>Gm,minSize:()=>Hm,multipleOf:()=>Bm,negative:()=>Lm,nonnegative:()=>zm,nonpositive:()=>Rm,normalize:()=>nh,overwrite:()=>th,positive:()=>Im,property:()=>$m,regex:()=>qm,size:()=>Um,slugify:()=>oh,startsWith:()=>Zm,toLowerCase:()=>ih,toUpperCase:()=>ah,trim:()=>rh,uppercase:()=>Ym}),Jg=t((()=>{Hg()})),Yg=n({ZodISODate:()=>t_,ZodISODateTime:()=>e_,ZodISODuration:()=>r_,ZodISOTime:()=>n_,date:()=>Zg,datetime:()=>Xg,duration:()=>$g,time:()=>Qg});function Xg(e){return om(e_,e)}function Zg(e){return sm(t_,e)}function Qg(e){return cm(n_,e)}function $g(e){return lm(r_,e)}var e_,t_,n_,r_,i_=t((()=>{Hg(),pb(),e_=g(`ZodISODateTime`,(e,t)=>{bl.init(e,t),W.init(e,t)}),t_=g(`ZodISODate`,(e,t)=>{xl.init(e,t),W.init(e,t)}),n_=g(`ZodISOTime`,(e,t)=>{Sl.init(e,t),W.init(e,t)}),r_=g(`ZodISODuration`,(e,t)=>{Cl.init(e,t),W.init(e,t)})})),a_,o_,A,s_=t((()=>{Hg(),C(),a_=(e,t)=>{wo.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>yo(e,t)},flatten:{value:t=>vo(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,va,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,va,2)}},isEmpty:{get(){return e.issues.length===0}}})},o_=g(`ZodError`,a_),A=g(`ZodError`,a_,{Parent:Error})})),c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_=t((()=>{Hg(),s_(),c_=Do(A),l_=ko(A),u_=jo(A),d_=No(A),f_=Fo(A),p_=Lo(A),m_=zo(A),h_=Vo(A),g_=Uo(A),__=Go(A),v_=qo(A),y_=Yo(A)})),x_=n({ZodAny:()=>Dy,ZodArray:()=>My,ZodBase64:()=>my,ZodBase64URL:()=>hy,ZodBigInt:()=>Sy,ZodBigIntFormat:()=>Cy,ZodBoolean:()=>xy,ZodCIDRv4:()=>fy,ZodCIDRv6:()=>py,ZodCUID:()=>iy,ZodCUID2:()=>ay,ZodCatch:()=>$y,ZodCodec:()=>nb,ZodCustom:()=>lb,ZodCustomStringFormat:()=>vy,ZodDate:()=>jy,ZodDefault:()=>Yy,ZodDiscriminatedUnion:()=>Iy,ZodE164:()=>gy,ZodEmail:()=>Qv,ZodEmoji:()=>ny,ZodEnum:()=>Hy,ZodExactOptional:()=>qy,ZodFile:()=>Wy,ZodFunction:()=>cb,ZodGUID:()=>$v,ZodIPv4:()=>ly,ZodIPv6:()=>dy,ZodIntersection:()=>Ly,ZodJWT:()=>_y,ZodKSUID:()=>cy,ZodLazy:()=>ob,ZodLiteral:()=>Uy,ZodMAC:()=>uy,ZodMap:()=>By,ZodNaN:()=>eb,ZodNanoID:()=>ry,ZodNever:()=>ky,ZodNonOptional:()=>Zy,ZodNull:()=>Ey,ZodNullable:()=>Jy,ZodNumber:()=>yy,ZodNumberFormat:()=>by,ZodObject:()=>Ny,ZodOptional:()=>Ky,ZodPipe:()=>tb,ZodPrefault:()=>Xy,ZodPreprocess:()=>rb,ZodPromise:()=>sb,ZodReadonly:()=>ib,ZodRecord:()=>zy,ZodSet:()=>Vy,ZodString:()=>Zv,ZodStringFormat:()=>W,ZodSuccess:()=>Qy,ZodSymbol:()=>wy,ZodTemplateLiteral:()=>ab,ZodTransform:()=>Gy,ZodTuple:()=>Ry,ZodType:()=>U,ZodULID:()=>oy,ZodURL:()=>ty,ZodUUID:()=>ey,ZodUndefined:()=>Ty,ZodUnion:()=>Py,ZodUnknown:()=>Oy,ZodVoid:()=>Ay,ZodXID:()=>sy,ZodXor:()=>Fy,_ZodString:()=>Xv,_default:()=>Ov,_function:()=>Vv,any:()=>cv,array:()=>F,base64:()=>U_,base64url:()=>W_,bigint:()=>nv,boolean:()=>N,catch:()=>Mv,check:()=>Hv,cidrv4:()=>V_,cidrv6:()=>H_,codec:()=>Fv,cuid:()=>N_,cuid2:()=>P_,custom:()=>Uv,date:()=>dv,describe:()=>ub,discriminatedUnion:()=>hv,e164:()=>G_,email:()=>C_,emoji:()=>j_,enum:()=>B,exactOptional:()=>Tv,file:()=>Cv,float32:()=>Q_,float64:()=>$_,function:()=>Vv,guid:()=>w_,hash:()=>X_,hex:()=>Y_,hostname:()=>J_,httpUrl:()=>A_,instanceof:()=>Kv,int:()=>Z_,int32:()=>ev,int64:()=>rv,intersection:()=>gv,invertCodec:()=>Iv,ipv4:()=>R_,ipv6:()=>B_,json:()=>qv,jwt:()=>K_,keyof:()=>fv,ksuid:()=>L_,lazy:()=>zv,literal:()=>V,looseObject:()=>L,looseRecord:()=>yv,mac:()=>z_,map:()=>bv,meta:()=>db,nan:()=>Nv,nanoid:()=>M_,nativeEnum:()=>Sv,never:()=>lv,nonoptional:()=>Av,null:()=>sv,nullable:()=>Ev,nullish:()=>Dv,number:()=>M,object:()=>I,optional:()=>H,partialRecord:()=>vv,pipe:()=>Pv,prefault:()=>kv,preprocess:()=>Jv,promise:()=>Bv,readonly:()=>Lv,record:()=>z,refine:()=>Wv,set:()=>xv,strictObject:()=>pv,string:()=>j,stringFormat:()=>q_,stringbool:()=>fb,success:()=>jv,superRefine:()=>Gv,symbol:()=>av,templateLiteral:()=>Rv,transform:()=>wv,tuple:()=>_v,uint32:()=>tv,uint64:()=>iv,ulid:()=>F_,undefined:()=>ov,union:()=>R,unknown:()=>P,url:()=>k_,uuid:()=>T_,uuidv4:()=>E_,uuidv6:()=>D_,uuidv7:()=>O_,void:()=>uv,xid:()=>I_,xor:()=>mv});function S_(e,t,n){let r=Object.getPrototypeOf(e),i=Yv.get(r);if(i||(i=new Set,Yv.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}function j(e){return Fp(Zv,e)}function C_(e){return Lp(Qv,e)}function w_(e){return Rp($v,e)}function T_(e){return zp(ey,e)}function E_(e){return Bp(ey,e)}function D_(e){return Vp(ey,e)}function O_(e){return Hp(ey,e)}function k_(e){return Up(ty,e)}function A_(e){return Up(ty,{protocol:Ps,hostname:Ns,...b(e)})}function j_(e){return Wp(ny,e)}function M_(e){return Gp(ry,e)}function N_(e){return Kp(iy,e)}function P_(e){return qp(ay,e)}function F_(e){return Jp(oy,e)}function I_(e){return Yp(sy,e)}function L_(e){return Xp(cy,e)}function R_(e){return Zp(ly,e)}function z_(e){return $p(uy,e)}function B_(e){return Qp(dy,e)}function V_(e){return em(fy,e)}function H_(e){return tm(py,e)}function U_(e){return nm(my,e)}function W_(e){return rm(hy,e)}function G_(e){return im(gy,e)}function K_(e){return am(_y,e)}function q_(e,t,n={}){return zh(vy,e,t,n)}function J_(e){return zh(vy,`hostname`,Ms,e)}function Y_(e){return zh(vy,`hex`,qs,e)}function X_(e,t){let n=`${e}_${t?.enc??`hex`}`,r=Qo[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return zh(vy,n,r,t)}function M(e){return um(yy,e)}function Z_(e){return fm(by,e)}function Q_(e){return pm(by,e)}function $_(e){return mm(by,e)}function ev(e){return hm(by,e)}function tv(e){return gm(by,e)}function N(e){return _m(xy,e)}function nv(e){return ym(Sy,e)}function rv(e){return xm(Cy,e)}function iv(e){return Sm(Cy,e)}function av(e){return Cm(wy,e)}function ov(e){return wm(Ty,e)}function sv(e){return Tm(Ey,e)}function cv(){return Em(Dy)}function P(){return Dm(Oy)}function lv(e){return Om(ky,e)}function uv(e){return km(Ay,e)}function dv(e){return Am(jy,e)}function F(e,t){return sh(My,e,t)}function fv(e){let t=e._zod.def.shape;return B(Object.keys(t))}function I(e,t){return new Ny({type:`object`,shape:e??{},...b(t)})}function pv(e,t){return new Ny({type:`object`,shape:e,catchall:lv(),...b(t)})}function L(e,t){return new Ny({type:`object`,shape:e,catchall:P(),...b(t)})}function R(e,t){return new Py({type:`union`,options:e,...b(t)})}function mv(e,t){return new Fy({type:`union`,options:e,inclusive:!1,...b(t)})}function hv(e,t,n){return new Iy({type:`union`,options:t,discriminator:e,...b(n)})}function gv(e,t){return new Ly({type:`intersection`,left:e,right:t})}function _v(e,t,n){let r=t instanceof T;return new Ry({type:`tuple`,items:e,rest:r?t:null,...b(r?n:t)})}function z(e,t,n){return!t||!t._zod?new zy({type:`record`,keyType:j(),valueType:e,...b(t)}):new zy({type:`record`,keyType:e,valueType:t,...b(n)})}function vv(e,t,n){let r=La(e);return r._zod.values=void 0,new zy({type:`record`,keyType:r,valueType:t,...b(n)})}function yv(e,t,n){return new zy({type:`record`,keyType:e,valueType:t,mode:`loose`,...b(n)})}function bv(e,t,n){return new By({type:`map`,keyType:e,valueType:t,...b(n)})}function xv(e,t){return new Vy({type:`set`,valueType:e,...b(t)})}function B(e,t){return new Hy({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...b(t)})}function Sv(e,t){return new Hy({type:`enum`,entries:e,...b(t)})}function V(e,t){return new Uy({type:`literal`,values:Array.isArray(e)?e:[e],...b(t)})}function Cv(e){return yh(Wy,e)}function wv(e){return new Gy({type:`transform`,transform:e})}function H(e){return new Ky({type:`optional`,innerType:e})}function Tv(e){return new qy({type:`optional`,innerType:e})}function Ev(e){return new Jy({type:`nullable`,innerType:e})}function Dv(e){return H(Ev(e))}function Ov(e,t){return new Yy({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Pa(t)}})}function kv(e,t){return new Xy({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Pa(t)}})}function Av(e,t){return new Zy({type:`nonoptional`,innerType:e,...b(t)})}function jv(e){return new Qy({type:`success`,innerType:e})}function Mv(e,t){return new $y({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}function Nv(e){return Mm(eb,e)}function Pv(e,t){return new tb({type:`pipe`,in:e,out:t})}function Fv(e,t,n){return new nb({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Iv(e){let t=e._zod.def;return new nb({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Lv(e){return new ib({type:`readonly`,innerType:e})}function Rv(e,t){return new ab({type:`template_literal`,parts:e,...b(t)})}function zv(e){return new ob({type:`lazy`,getter:e})}function Bv(e){return new sb({type:`promise`,innerType:e})}function Vv(e){return new cb({type:`function`,input:Array.isArray(e?.input)?_v(e?.input):e?.input??F(P()),output:e?.output??P()})}function Hv(e){let t=new w({check:`custom`});return t._zod.check=e,t}function Uv(e,t){return Mh(lb,e??(()=>!0),t)}function Wv(e,t={}){return Nh(lb,e,t)}function Gv(e,t){return Ph(e,t)}function Kv(e,t={}){let n=new lb({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...b(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function qv(e){let t=zv(()=>R([j(e),M(),N(),sv(),F(t),z(j(),t)]));return t}function Jv(e,t){return new rb({type:`pipe`,in:wv(e),out:t})}var Yv,U,Xv,Zv,W,Qv,$v,ey,ty,ny,ry,iy,ay,oy,sy,cy,ly,uy,dy,fy,py,my,hy,gy,_y,vy,yy,by,xy,Sy,Cy,wy,Ty,Ey,Dy,Oy,ky,Ay,jy,My,Ny,Py,Fy,Iy,Ly,Ry,zy,By,Vy,Hy,Uy,Wy,Gy,Ky,qy,Jy,Yy,Xy,Zy,Qy,$y,eb,tb,nb,rb,ib,ab,ob,sb,cb,lb,ub,db,fb,pb=t((()=>{Hg(),Ig(),qh(),Jg(),i_(),b_(),Yv=new WeakMap,U=g(`ZodType`,(e,t)=>(T.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:Kh(e,`input`),output:Kh(e,`output`)}}),e.toJSONSchema=Gh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>c_(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>u_(e,t,n),e.parseAsync=async(t,n)=>l_(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>d_(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>f_(e,t,n),e.decode=(t,n)=>p_(e,t,n),e.encodeAsync=async(t,n)=>m_(e,t,n),e.decodeAsync=async(t,n)=>h_(e,t,n),e.safeEncode=(t,n)=>g_(e,t,n),e.safeDecode=(t,n)=>__(e,t,n),e.safeEncodeAsync=async(t,n)=>v_(e,t,n),e.safeDecodeAsync=async(t,n)=>y_(e,t,n),S_(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Ta(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return La(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Wv(e,t))},superRefine(e,t){return this.check(Gv(e,t))},overwrite(e){return this.check(th(e))},optional(){return H(this)},exactOptional(){return Tv(this)},nullable(){return Ev(this)},nullish(){return H(Ev(this))},nonoptional(e){return Av(this,e)},array(){return F(this)},or(e){return R([this,e])},and(e){return gv(this,e)},transform(e){return Pv(this,wv(e))},default(e){return Ov(this,e)},prefault(e){return kv(this,e)},catch(e){return Mv(this,e)},pipe(e){return Pv(this,e)},readonly(){return Lv(this)},describe(e){let t=this.clone();return Np.add(t,{description:e}),t},meta(...e){if(e.length===0)return Np.get(this);let t=this.clone();return Np.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Np.get(e)?.description},configurable:!0}),e)),Xv=g(`_ZodString`,(e,t)=>{cl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xh(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,S_(e,`_ZodString`,{regex(...e){return this.check(qm(...e))},includes(...e){return this.check(Xm(...e))},startsWith(...e){return this.check(Zm(...e))},endsWith(...e){return this.check(Qm(...e))},min(...e){return this.check(Gm(...e))},max(...e){return this.check(Wm(...e))},length(...e){return this.check(Km(...e))},nonempty(...e){return this.check(Gm(1,...e))},lowercase(e){return this.check(Jm(e))},uppercase(e){return this.check(Ym(e))},trim(){return this.check(rh())},normalize(...e){return this.check(nh(...e))},toLowerCase(){return this.check(ih())},toUpperCase(){return this.check(ah())},slugify(){return this.check(oh())}})}),Zv=g(`ZodString`,(e,t)=>{cl.init(e,t),Xv.init(e,t),e.email=t=>e.check(Lp(Qv,t)),e.url=t=>e.check(Up(ty,t)),e.jwt=t=>e.check(am(_y,t)),e.emoji=t=>e.check(Wp(ny,t)),e.guid=t=>e.check(Rp($v,t)),e.uuid=t=>e.check(zp(ey,t)),e.uuidv4=t=>e.check(Bp(ey,t)),e.uuidv6=t=>e.check(Vp(ey,t)),e.uuidv7=t=>e.check(Hp(ey,t)),e.nanoid=t=>e.check(Gp(ry,t)),e.guid=t=>e.check(Rp($v,t)),e.cuid=t=>e.check(Kp(iy,t)),e.cuid2=t=>e.check(qp(ay,t)),e.ulid=t=>e.check(Jp(oy,t)),e.base64=t=>e.check(nm(my,t)),e.base64url=t=>e.check(rm(hy,t)),e.xid=t=>e.check(Yp(sy,t)),e.ksuid=t=>e.check(Xp(cy,t)),e.ipv4=t=>e.check(Zp(ly,t)),e.ipv6=t=>e.check(Qp(dy,t)),e.cidrv4=t=>e.check(em(fy,t)),e.cidrv6=t=>e.check(tm(py,t)),e.e164=t=>e.check(im(gy,t)),e.datetime=t=>e.check(Xg(t)),e.date=t=>e.check(Zg(t)),e.time=t=>e.check(Qg(t)),e.duration=t=>e.check($g(t))}),W=g(`ZodStringFormat`,(e,t)=>{E.init(e,t),Xv.init(e,t)}),Qv=g(`ZodEmail`,(e,t)=>{dl.init(e,t),W.init(e,t)}),$v=g(`ZodGUID`,(e,t)=>{ll.init(e,t),W.init(e,t)}),ey=g(`ZodUUID`,(e,t)=>{ul.init(e,t),W.init(e,t)}),ty=g(`ZodURL`,(e,t)=>{fl.init(e,t),W.init(e,t)}),ny=g(`ZodEmoji`,(e,t)=>{pl.init(e,t),W.init(e,t)}),ry=g(`ZodNanoID`,(e,t)=>{ml.init(e,t),W.init(e,t)}),iy=g(`ZodCUID`,(e,t)=>{hl.init(e,t),W.init(e,t)}),ay=g(`ZodCUID2`,(e,t)=>{gl.init(e,t),W.init(e,t)}),oy=g(`ZodULID`,(e,t)=>{_l.init(e,t),W.init(e,t)}),sy=g(`ZodXID`,(e,t)=>{vl.init(e,t),W.init(e,t)}),cy=g(`ZodKSUID`,(e,t)=>{yl.init(e,t),W.init(e,t)}),ly=g(`ZodIPv4`,(e,t)=>{wl.init(e,t),W.init(e,t)}),uy=g(`ZodMAC`,(e,t)=>{El.init(e,t),W.init(e,t)}),dy=g(`ZodIPv6`,(e,t)=>{Tl.init(e,t),W.init(e,t)}),fy=g(`ZodCIDRv4`,(e,t)=>{Dl.init(e,t),W.init(e,t)}),py=g(`ZodCIDRv6`,(e,t)=>{Ol.init(e,t),W.init(e,t)}),my=g(`ZodBase64`,(e,t)=>{kl.init(e,t),W.init(e,t)}),hy=g(`ZodBase64URL`,(e,t)=>{Al.init(e,t),W.init(e,t)}),gy=g(`ZodE164`,(e,t)=>{jl.init(e,t),W.init(e,t)}),_y=g(`ZodJWT`,(e,t)=>{Ml.init(e,t),W.init(e,t)}),vy=g(`ZodCustomStringFormat`,(e,t)=>{Nl.init(e,t),W.init(e,t)}),yy=g(`ZodNumber`,(e,t)=>{Pl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zh(e,t,n,r),S_(e,`ZodNumber`,{gt(e,t){return this.check(Fm(e,t))},gte(e,t){return this.check(D(e,t))},min(e,t){return this.check(D(e,t))},lt(e,t){return this.check(Nm(e,t))},lte(e,t){return this.check(Pm(e,t))},max(e,t){return this.check(Pm(e,t))},int(e){return this.check(Z_(e))},safe(e){return this.check(Z_(e))},positive(e){return this.check(Fm(0,e))},nonnegative(e){return this.check(D(0,e))},negative(e){return this.check(Nm(0,e))},nonpositive(e){return this.check(Pm(0,e))},multipleOf(e,t){return this.check(Bm(e,t))},step(e,t){return this.check(Bm(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}),by=g(`ZodNumberFormat`,(e,t)=>{Fl.init(e,t),yy.init(e,t)}),xy=g(`ZodBoolean`,(e,t)=>{Il.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qh(e,t,n,r)}),Sy=g(`ZodBigInt`,(e,t)=>{Ll.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$h(e,t,n,r),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.gt=(t,n)=>e.check(Fm(t,n)),e.gte=(t,n)=>e.check(D(t,n)),e.min=(t,n)=>e.check(D(t,n)),e.lt=(t,n)=>e.check(Nm(t,n)),e.lte=(t,n)=>e.check(Pm(t,n)),e.max=(t,n)=>e.check(Pm(t,n)),e.positive=t=>e.check(Fm(BigInt(0),t)),e.negative=t=>e.check(Nm(BigInt(0),t)),e.nonpositive=t=>e.check(Pm(BigInt(0),t)),e.nonnegative=t=>e.check(D(BigInt(0),t)),e.multipleOf=(t,n)=>e.check(Bm(t,n));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null}),Cy=g(`ZodBigIntFormat`,(e,t)=>{Rl.init(e,t),Sy.init(e,t)}),wy=g(`ZodSymbol`,(e,t)=>{zl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eg(e,t,n,r)}),Ty=g(`ZodUndefined`,(e,t)=>{Bl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ng(e,t,n,r)}),Ey=g(`ZodNull`,(e,t)=>{Vl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tg(e,t,n,r)}),Dy=g(`ZodAny`,(e,t)=>{Hl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ag(e,t,n,r)}),Oy=g(`ZodUnknown`,(e,t)=>{Ul.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>og(e,t,n,r)}),ky=g(`ZodNever`,(e,t)=>{Wl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ig(e,t,n,r)}),Ay=g(`ZodVoid`,(e,t)=>{Gl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rg(e,t,n,r)}),jy=g(`ZodDate`,(e,t)=>{Kl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sg(e,t,n,r),e.min=(t,n)=>e.check(D(t,n)),e.max=(t,n)=>e.check(Pm(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),My=g(`ZodArray`,(e,t)=>{ql.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yg(e,t,n,r),e.element=t.element,S_(e,`ZodArray`,{min(e,t){return this.check(Gm(e,t))},nonempty(e){return this.check(Gm(1,e))},max(e,t){return this.check(Wm(e,t))},length(e,t){return this.check(Km(e,t))},unwrap(){return this.element}})}),Ny=g(`ZodObject`,(e,t)=>{Yl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bg(e,t,n,r),y(e,`shape`,()=>t.shape),S_(e,`ZodObject`,{keyof(){return B(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:P()})},loose(){return this.clone({...this._zod.def,catchall:P()})},strict(){return this.clone({...this._zod.def,catchall:lv()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Ha(this,e)},safeExtend(e){return Ua(this,e)},merge(e){return Wa(this,e)},pick(e){return Ba(this,e)},omit(e){return Va(this,e)},partial(...e){return Ga(Ky,this,e[0])},required(...e){return Ka(Zy,this,e[0])}})}),Py=g(`ZodUnion`,(e,t)=>{Xl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xg(e,t,n,r),e.options=t.options}),Fy=g(`ZodXor`,(e,t)=>{Py.init(e,t),Zl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xg(e,t,n,r),e.options=t.options}),Iy=g(`ZodDiscriminatedUnion`,(e,t)=>{Py.init(e,t),Ql.init(e,t)}),Ly=g(`ZodIntersection`,(e,t)=>{$l.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sg(e,t,n,r)}),Ry=g(`ZodTuple`,(e,t)=>{eu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cg(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})}),zy=g(`ZodRecord`,(e,t)=>{tu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wg(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),By=g(`ZodMap`,(e,t)=>{nu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_g(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(Hm(...t)),e.nonempty=t=>e.check(Hm(1,t)),e.max=(...t)=>e.check(Vm(...t)),e.size=(...t)=>e.check(Um(...t))}),Vy=g(`ZodSet`,(e,t)=>{ru.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vg(e,t,n,r),e.min=(...t)=>e.check(Hm(...t)),e.nonempty=t=>e.check(Hm(1,t)),e.max=(...t)=>e.check(Vm(...t)),e.size=(...t)=>e.check(Um(...t))}),Hy=g(`ZodEnum`,(e,t)=>{iu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cg(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Hy({...t,checks:[],...b(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Hy({...t,checks:[],...b(r),entries:i})}}),Uy=g(`ZodLiteral`,(e,t)=>{au.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lg(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),Wy=g(`ZodFile`,(e,t)=>{ou.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fg(e,t,n,r),e.min=(t,n)=>e.check(Hm(t,n)),e.max=(t,n)=>e.check(Vm(t,n)),e.mime=(t,n)=>e.check(eh(Array.isArray(t)?t:[t],n))}),Gy=g(`ZodTransform`,(e,t)=>{su.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gg(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new ca(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(eo(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(eo(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}}),Ky=g(`ZodOptional`,(e,t)=>{cu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ng(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),qy=g(`ZodExactOptional`,(e,t)=>{lu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ng(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Jy=g(`ZodNullable`,(e,t)=>{uu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Yy=g(`ZodDefault`,(e,t)=>{du.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Xy=g(`ZodPrefault`,(e,t)=>{fu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Og(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Zy=g(`ZodNonOptional`,(e,t)=>{pu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Qy=g(`ZodSuccess`,(e,t)=>{mu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),$y=g(`ZodCatch`,(e,t)=>{hu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),eb=g(`ZodNaN`,(e,t)=>{gu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ug(e,t,n,r)}),tb=g(`ZodPipe`,(e,t)=>{_u.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ag(e,t,n,r),e.in=t.in,e.out=t.out}),nb=g(`ZodCodec`,(e,t)=>{tb.init(e,t),vu.init(e,t)}),rb=g(`ZodPreprocess`,(e,t)=>{tb.init(e,t),yu.init(e,t)}),ib=g(`ZodReadonly`,(e,t)=>{bu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),ab=g(`ZodTemplateLiteral`,(e,t)=>{xu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dg(e,t,n,r)}),ob=g(`ZodLazy`,(e,t)=>{wu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pg(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),sb=g(`ZodPromise`,(e,t)=>{Cu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mg(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),cb=g(`ZodFunction`,(e,t)=>{Su.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hg(e,t,n,r)}),lb=g(`ZodCustom`,(e,t)=>{Tu.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mg(e,t,n,r)}),ub=Ih,db=Lh,fb=(...e)=>Rh({Codec:nb,Boolean:xy,String:Zv},...e)}));function mb(e){_({customError:e})}function hb(){return _().customError}var gb,_b,vb=t((()=>{Hg(),gb={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`},_b||={}}));function yb(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function bb(e,t){if(!e.startsWith(`#`))throw Error(`External $ref is not supported, only local refs (#/...) are allowed`);let n=e.slice(1).split(`/`).filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version===`draft-2020-12`?`$defs`:`definitions`;if(n[0]===r){let r=n[1];if(!r||!t.defs[r])throw Error(`Reference not found: ${e}`);return t.defs[r]}throw Error(`Reference not found: ${e}`)}function xb(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return K.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return K.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=G(bb(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return K.null();if(n.length===0)return K.never();if(n.length===1)return K.literal(n[0]);if(n.every(e=>typeof e==`string`))return K.enum(n);let r=n.map(e=>K.literal(e));return r.length<2?r[0]:K.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return K.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>xb({...e,type:n},t));return r.length===0?K.never():r.length===1?r[0]:K.union(r)}if(!n)return K.any();let r;switch(n){case`string`:{let t=K.string();if(e.format){let n=e.format;n===`email`?t=t.check(K.email()):n===`uri`||n===`uri-reference`?t=t.check(K.url()):n===`uuid`||n===`guid`?t=t.check(K.uuid()):n===`date-time`?t=t.check(K.iso.datetime()):n===`date`?t=t.check(K.iso.date()):n===`time`?t=t.check(K.iso.time()):n===`duration`?t=t.check(K.iso.duration()):n===`ipv4`?t=t.check(K.ipv4()):n===`ipv6`?t=t.check(K.ipv6()):n===`mac`?t=t.check(K.mac()):n===`cidr`?t=t.check(K.cidrv4()):n===`cidr-v6`?t=t.check(K.cidrv6()):n===`base64`?t=t.check(K.base64()):n===`base64url`?t=t.check(K.base64url()):n===`e164`?t=t.check(K.e164()):n===`jwt`?t=t.check(K.jwt()):n===`emoji`?t=t.check(K.emoji()):n===`nanoid`?t=t.check(K.nanoid()):n===`cuid`?t=t.check(K.cuid()):n===`cuid2`?t=t.check(K.cuid2()):n===`ulid`?t=t.check(K.ulid()):n===`xid`?t=t.check(K.xid()):n===`ksuid`&&(t=t.check(K.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?K.number().int():K.number();typeof e.minimum==`number`&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=K.boolean();break;case`null`:r=K.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[e,r]of Object.entries(i)){let i=G(r,t);n[e]=a.has(e)?i:i.optional()}if(e.propertyNames){let i=G(e.propertyNames,t),a=e.additionalProperties&&typeof e.additionalProperties==`object`?G(e.additionalProperties,t):K.any();if(Object.keys(n).length===0){r=K.record(i,a);break}let o=K.object(n).passthrough(),s=K.looseRecord(i,a);r=K.intersection(o,s);break}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=G(i[e],t),r=K.string().regex(new RegExp(e));o.push(K.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push(K.object(n).passthrough()),s.push(...o),s.length===0)r=K.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=K.intersection(s[0],s[1]);for(let t=2;t<s.length;t++)e=K.intersection(e,s[t]);r=e}break}let o=K.object(n);r=e.additionalProperties===!1?o.strict():typeof e.additionalProperties==`object`?o.catchall(G(e.additionalProperties,t)):o.passthrough();break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(e=>G(e,t)),o=i&&typeof i==`object`&&!Array.isArray(i)?G(i,t):void 0;r=o?K.tuple(a).rest(o):K.tuple(a),typeof e.minItems==`number`&&(r=r.check(K.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(K.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=i.map(e=>G(e,t)),a=e.additionalItems&&typeof e.additionalItems==`object`?G(e.additionalItems,t):void 0;r=a?K.tuple(n).rest(a):K.tuple(n),typeof e.minItems==`number`&&(r=r.check(K.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check(K.maxLength(e.maxItems)))}else if(i!==void 0){let n=G(i,t),a=K.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=K.array(K.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function G(e,t){if(typeof e==`boolean`)return e?K.any():K.never();let n=xb(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>G(e,t)),a=K.union(i);n=r?K.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>G(e,t)),a=K.xor(i);n=r?K.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:K.any();else{let i=r?n:G(e.allOf[0],t),a=+!r;for(let n=a;n<e.allOf.length;n++)i=K.intersection(i,G(e.allOf[n],t));n=i}e.nullable===!0&&t.version===`openapi-3.0`&&(n=K.nullable(n)),e.readOnly===!0&&(n=K.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={};for(let t of[`$id`,`id`,`$comment`,`$anchor`,`$vocabulary`,`$dynamicRef`,`$dynamicAnchor`])t in e&&(i[t]=e[t]);for(let t of[`contentEncoding`,`contentMediaType`,`contentSchema`])t in e&&(i[t]=e[t]);for(let t of Object.keys(e))Cb.has(t)||(i[t]=e[t]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function Sb(e,t){if(typeof e==`boolean`)return e?K.any():K.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:yb(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Np};return G(n,r)}var K,Cb,wb=t((()=>{Pp(),Jg(),i_(),pb(),K={...x_,...qg,iso:Yg},Cb=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(`.`))})),Tb=n({bigint:()=>kb,boolean:()=>Ob,date:()=>Ab,number:()=>Db,string:()=>Eb});function Eb(e){return Ip(Zv,e)}function Db(e){return dm(yy,e)}function Ob(e){return vm(xy,e)}function kb(e){return bm(Sy,e)}function Ab(e){return jm(jy,e)}var jb=t((()=>{Hg(),pb()})),Mb=n({$brand:()=>oa,$input:()=>jp,$output:()=>Ap,NEVER:()=>aa,TimePrecision:()=>Bh,ZodAny:()=>Dy,ZodArray:()=>My,ZodBase64:()=>my,ZodBase64URL:()=>hy,ZodBigInt:()=>Sy,ZodBigIntFormat:()=>Cy,ZodBoolean:()=>xy,ZodCIDRv4:()=>fy,ZodCIDRv6:()=>py,ZodCUID:()=>iy,ZodCUID2:()=>ay,ZodCatch:()=>$y,ZodCodec:()=>nb,ZodCustom:()=>lb,ZodCustomStringFormat:()=>vy,ZodDate:()=>jy,ZodDefault:()=>Yy,ZodDiscriminatedUnion:()=>Iy,ZodE164:()=>gy,ZodEmail:()=>Qv,ZodEmoji:()=>ny,ZodEnum:()=>Hy,ZodError:()=>o_,ZodExactOptional:()=>qy,ZodFile:()=>Wy,ZodFirstPartyTypeKind:()=>_b,ZodFunction:()=>cb,ZodGUID:()=>$v,ZodIPv4:()=>ly,ZodIPv6:()=>dy,ZodISODate:()=>t_,ZodISODateTime:()=>e_,ZodISODuration:()=>r_,ZodISOTime:()=>n_,ZodIntersection:()=>Ly,ZodIssueCode:()=>gb,ZodJWT:()=>_y,ZodKSUID:()=>cy,ZodLazy:()=>ob,ZodLiteral:()=>Uy,ZodMAC:()=>uy,ZodMap:()=>By,ZodNaN:()=>eb,ZodNanoID:()=>ry,ZodNever:()=>ky,ZodNonOptional:()=>Zy,ZodNull:()=>Ey,ZodNullable:()=>Jy,ZodNumber:()=>yy,ZodNumberFormat:()=>by,ZodObject:()=>Ny,ZodOptional:()=>Ky,ZodPipe:()=>tb,ZodPrefault:()=>Xy,ZodPreprocess:()=>rb,ZodPromise:()=>sb,ZodReadonly:()=>ib,ZodRealError:()=>A,ZodRecord:()=>zy,ZodSet:()=>Vy,ZodString:()=>Zv,ZodStringFormat:()=>W,ZodSuccess:()=>Qy,ZodSymbol:()=>wy,ZodTemplateLiteral:()=>ab,ZodTransform:()=>Gy,ZodTuple:()=>Ry,ZodType:()=>U,ZodULID:()=>oy,ZodURL:()=>ty,ZodUUID:()=>ey,ZodUndefined:()=>Ty,ZodUnion:()=>Py,ZodUnknown:()=>Oy,ZodVoid:()=>Ay,ZodXID:()=>sy,ZodXor:()=>Fy,_ZodString:()=>Xv,_default:()=>Ov,_function:()=>Vv,any:()=>cv,array:()=>F,base64:()=>U_,base64url:()=>W_,bigint:()=>nv,boolean:()=>N,catch:()=>Mv,check:()=>Hv,cidrv4:()=>V_,cidrv6:()=>H_,clone:()=>La,codec:()=>Fv,coerce:()=>Tb,config:()=>_,core:()=>Vg,cuid:()=>N_,cuid2:()=>P_,custom:()=>Uv,date:()=>dv,decode:()=>p_,decodeAsync:()=>h_,describe:()=>ub,discriminatedUnion:()=>hv,e164:()=>G_,email:()=>C_,emoji:()=>j_,encode:()=>f_,encodeAsync:()=>m_,endsWith:()=>Qm,enum:()=>B,exactOptional:()=>Tv,file:()=>Cv,flattenError:()=>vo,float32:()=>Q_,float64:()=>$_,formatError:()=>yo,fromJSONSchema:()=>Sb,function:()=>Vv,getErrorMap:()=>hb,globalRegistry:()=>Np,gt:()=>Fm,gte:()=>D,guid:()=>w_,hash:()=>X_,hex:()=>Y_,hostname:()=>J_,httpUrl:()=>A_,includes:()=>Xm,instanceof:()=>Kv,int:()=>Z_,int32:()=>ev,int64:()=>rv,intersection:()=>gv,invertCodec:()=>Iv,ipv4:()=>R_,ipv6:()=>B_,iso:()=>Yg,json:()=>qv,jwt:()=>K_,keyof:()=>fv,ksuid:()=>L_,lazy:()=>zv,length:()=>Km,literal:()=>V,locales:()=>Ep,looseObject:()=>L,looseRecord:()=>yv,lowercase:()=>Jm,lt:()=>Nm,lte:()=>Pm,mac:()=>z_,map:()=>bv,maxLength:()=>Wm,maxSize:()=>Vm,meta:()=>db,mime:()=>eh,minLength:()=>Gm,minSize:()=>Hm,multipleOf:()=>Bm,nan:()=>Nv,nanoid:()=>M_,nativeEnum:()=>Sv,negative:()=>Lm,never:()=>lv,nonnegative:()=>zm,nonoptional:()=>Av,nonpositive:()=>Rm,normalize:()=>nh,null:()=>sv,nullable:()=>Ev,nullish:()=>Dv,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>th,parse:()=>c_,parseAsync:()=>l_,partialRecord:()=>vv,pipe:()=>Pv,positive:()=>Im,prefault:()=>kv,preprocess:()=>Jv,prettifyError:()=>So,promise:()=>Bv,property:()=>$m,readonly:()=>Lv,record:()=>z,refine:()=>Wv,regex:()=>qm,regexes:()=>Qo,registry:()=>Op,safeDecode:()=>__,safeDecodeAsync:()=>y_,safeEncode:()=>g_,safeEncodeAsync:()=>v_,safeParse:()=>u_,safeParseAsync:()=>d_,set:()=>xv,setErrorMap:()=>mb,size:()=>Um,slugify:()=>oh,startsWith:()=>Zm,strictObject:()=>pv,string:()=>j,stringFormat:()=>q_,stringbool:()=>fb,success:()=>jv,superRefine:()=>Gv,symbol:()=>av,templateLiteral:()=>Rv,toJSONSchema:()=>Jh,toLowerCase:()=>ih,toUpperCase:()=>ah,transform:()=>wv,treeifyError:()=>bo,trim:()=>rh,tuple:()=>_v,uint32:()=>tv,uint64:()=>iv,ulid:()=>F_,undefined:()=>ov,union:()=>R,unknown:()=>P,uppercase:()=>Ym,url:()=>k_,util:()=>da,uuid:()=>T_,uuidv4:()=>E_,uuidv6:()=>D_,uuidv7:()=>O_,void:()=>uv,xid:()=>I_,xor:()=>mv}),Nb=t((()=>{Hg(),pb(),Jg(),s_(),b_(),vb(),rd(),Ig(),wb(),Dp(),i_(),jb(),_(td())})),Pb,Fb=t((()=>{Nb(),Nb(),Pb=Mb})),Ib=n({$brand:()=>oa,$input:()=>jp,$output:()=>Ap,NEVER:()=>aa,TimePrecision:()=>Bh,ZodAny:()=>Dy,ZodArray:()=>My,ZodBase64:()=>my,ZodBase64URL:()=>hy,ZodBigInt:()=>Sy,ZodBigIntFormat:()=>Cy,ZodBoolean:()=>xy,ZodCIDRv4:()=>fy,ZodCIDRv6:()=>py,ZodCUID:()=>iy,ZodCUID2:()=>ay,ZodCatch:()=>$y,ZodCodec:()=>nb,ZodCustom:()=>lb,ZodCustomStringFormat:()=>vy,ZodDate:()=>jy,ZodDefault:()=>Yy,ZodDiscriminatedUnion:()=>Iy,ZodE164:()=>gy,ZodEmail:()=>Qv,ZodEmoji:()=>ny,ZodEnum:()=>Hy,ZodError:()=>o_,ZodExactOptional:()=>qy,ZodFile:()=>Wy,ZodFirstPartyTypeKind:()=>_b,ZodFunction:()=>cb,ZodGUID:()=>$v,ZodIPv4:()=>ly,ZodIPv6:()=>dy,ZodISODate:()=>t_,ZodISODateTime:()=>e_,ZodISODuration:()=>r_,ZodISOTime:()=>n_,ZodIntersection:()=>Ly,ZodIssueCode:()=>gb,ZodJWT:()=>_y,ZodKSUID:()=>cy,ZodLazy:()=>ob,ZodLiteral:()=>Uy,ZodMAC:()=>uy,ZodMap:()=>By,ZodNaN:()=>eb,ZodNanoID:()=>ry,ZodNever:()=>ky,ZodNonOptional:()=>Zy,ZodNull:()=>Ey,ZodNullable:()=>Jy,ZodNumber:()=>yy,ZodNumberFormat:()=>by,ZodObject:()=>Ny,ZodOptional:()=>Ky,ZodPipe:()=>tb,ZodPrefault:()=>Xy,ZodPreprocess:()=>rb,ZodPromise:()=>sb,ZodReadonly:()=>ib,ZodRealError:()=>A,ZodRecord:()=>zy,ZodSet:()=>Vy,ZodString:()=>Zv,ZodStringFormat:()=>W,ZodSuccess:()=>Qy,ZodSymbol:()=>wy,ZodTemplateLiteral:()=>ab,ZodTransform:()=>Gy,ZodTuple:()=>Ry,ZodType:()=>U,ZodULID:()=>oy,ZodURL:()=>ty,ZodUUID:()=>ey,ZodUndefined:()=>Ty,ZodUnion:()=>Py,ZodUnknown:()=>Oy,ZodVoid:()=>Ay,ZodXID:()=>sy,ZodXor:()=>Fy,_ZodString:()=>Xv,_default:()=>Ov,_function:()=>Vv,any:()=>cv,array:()=>F,base64:()=>U_,base64url:()=>W_,bigint:()=>nv,boolean:()=>N,catch:()=>Mv,check:()=>Hv,cidrv4:()=>V_,cidrv6:()=>H_,clone:()=>La,codec:()=>Fv,coerce:()=>Tb,config:()=>_,core:()=>Vg,cuid:()=>N_,cuid2:()=>P_,custom:()=>Uv,date:()=>dv,decode:()=>p_,decodeAsync:()=>h_,default:()=>Lb,describe:()=>ub,discriminatedUnion:()=>hv,e164:()=>G_,email:()=>C_,emoji:()=>j_,encode:()=>f_,encodeAsync:()=>m_,endsWith:()=>Qm,enum:()=>B,exactOptional:()=>Tv,file:()=>Cv,flattenError:()=>vo,float32:()=>Q_,float64:()=>$_,formatError:()=>yo,fromJSONSchema:()=>Sb,function:()=>Vv,getErrorMap:()=>hb,globalRegistry:()=>Np,gt:()=>Fm,gte:()=>D,guid:()=>w_,hash:()=>X_,hex:()=>Y_,hostname:()=>J_,httpUrl:()=>A_,includes:()=>Xm,instanceof:()=>Kv,int:()=>Z_,int32:()=>ev,int64:()=>rv,intersection:()=>gv,invertCodec:()=>Iv,ipv4:()=>R_,ipv6:()=>B_,iso:()=>Yg,json:()=>qv,jwt:()=>K_,keyof:()=>fv,ksuid:()=>L_,lazy:()=>zv,length:()=>Km,literal:()=>V,locales:()=>Ep,looseObject:()=>L,looseRecord:()=>yv,lowercase:()=>Jm,lt:()=>Nm,lte:()=>Pm,mac:()=>z_,map:()=>bv,maxLength:()=>Wm,maxSize:()=>Vm,meta:()=>db,mime:()=>eh,minLength:()=>Gm,minSize:()=>Hm,multipleOf:()=>Bm,nan:()=>Nv,nanoid:()=>M_,nativeEnum:()=>Sv,negative:()=>Lm,never:()=>lv,nonnegative:()=>zm,nonoptional:()=>Av,nonpositive:()=>Rm,normalize:()=>nh,null:()=>sv,nullable:()=>Ev,nullish:()=>Dv,number:()=>M,object:()=>I,optional:()=>H,overwrite:()=>th,parse:()=>c_,parseAsync:()=>l_,partialRecord:()=>vv,pipe:()=>Pv,positive:()=>Im,prefault:()=>kv,preprocess:()=>Jv,prettifyError:()=>So,promise:()=>Bv,property:()=>$m,readonly:()=>Lv,record:()=>z,refine:()=>Wv,regex:()=>qm,regexes:()=>Qo,registry:()=>Op,safeDecode:()=>__,safeDecodeAsync:()=>y_,safeEncode:()=>g_,safeEncodeAsync:()=>v_,safeParse:()=>u_,safeParseAsync:()=>d_,set:()=>xv,setErrorMap:()=>mb,size:()=>Um,slugify:()=>oh,startsWith:()=>Zm,strictObject:()=>pv,string:()=>j,stringFormat:()=>q_,stringbool:()=>fb,success:()=>jv,superRefine:()=>Gv,symbol:()=>av,templateLiteral:()=>Rv,toJSONSchema:()=>Jh,toLowerCase:()=>ih,toUpperCase:()=>ah,transform:()=>wv,treeifyError:()=>bo,trim:()=>rh,tuple:()=>_v,uint32:()=>tv,uint64:()=>iv,ulid:()=>F_,undefined:()=>ov,union:()=>R,unknown:()=>P,uppercase:()=>Ym,url:()=>k_,util:()=>da,uuid:()=>T_,uuidv4:()=>E_,uuidv6:()=>D_,uuidv7:()=>O_,void:()=>uv,xid:()=>I_,xor:()=>mv,z:()=>Mb}),Lb,Rb=t((()=>{Fb(),Fb(),Lb=Pb}));Rb();var zb=`io.modelcontextprotocol/related-task`,q=Uv(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),Bb=R([j(),M().int()]),Vb=j();L({ttl:M().optional(),pollInterval:M().optional()});var Hb=I({ttl:M().optional()}),Ub=I({taskId:j()}),Wb=L({progressToken:Bb.optional(),[zb]:Ub.optional()}),Gb=I({_meta:Wb.optional()}),Kb=Gb.extend({task:Hb.optional()}),qb=e=>Kb.safeParse(e).success,J=I({method:j(),params:Gb.loose().optional()}),Jb=I({_meta:Wb.optional()}),Yb=I({method:j(),params:Jb.loose().optional()}),Y=L({_meta:Wb.optional()}),Xb=R([j(),M().int()]),Zb=I({jsonrpc:V(`2.0`),id:Xb,...J.shape}).strict(),Qb=e=>Zb.safeParse(e).success,$b=I({jsonrpc:V(`2.0`),...Yb.shape}).strict(),ex=e=>$b.safeParse(e).success,tx=I({jsonrpc:V(`2.0`),id:Xb,result:Y}).strict(),nx=e=>tx.safeParse(e).success,X;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(X||={});var rx=I({jsonrpc:V(`2.0`),id:Xb.optional(),error:I({code:M().int(),message:j(),data:P().optional()})}).strict(),ix=e=>rx.safeParse(e).success,ax=R([Zb,$b,tx,rx]);R([tx,rx]);var ox=Y.strict(),sx=Jb.extend({requestId:Xb.optional(),reason:j().optional()}),cx=Yb.extend({method:V(`notifications/cancelled`),params:sx}),lx=I({icons:F(I({src:j(),mimeType:j().optional(),sizes:F(j()).optional(),theme:B([`light`,`dark`]).optional()})).optional()}),ux=I({name:j(),title:j().optional()}),dx=ux.extend({...ux.shape,...lx.shape,version:j(),websiteUrl:j().optional(),description:j().optional()}),fx=Jv(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,gv(I({form:gv(I({applyDefaults:N().optional()}),z(j(),P())).optional(),url:q.optional()}),z(j(),P()).optional())),px=L({list:q.optional(),cancel:q.optional(),requests:L({sampling:L({createMessage:q.optional()}).optional(),elicitation:L({create:q.optional()}).optional()}).optional()}),mx=L({list:q.optional(),cancel:q.optional(),requests:L({tools:L({call:q.optional()}).optional()}).optional()}),hx=I({experimental:z(j(),q).optional(),sampling:I({context:q.optional(),tools:q.optional()}).optional(),elicitation:fx.optional(),roots:I({listChanged:N().optional()}).optional(),tasks:px.optional(),extensions:z(j(),q).optional()}),gx=Gb.extend({protocolVersion:j(),capabilities:hx,clientInfo:dx}),_x=J.extend({method:V(`initialize`),params:gx}),vx=I({experimental:z(j(),q).optional(),logging:q.optional(),completions:q.optional(),prompts:I({listChanged:N().optional()}).optional(),resources:I({subscribe:N().optional(),listChanged:N().optional()}).optional(),tools:I({listChanged:N().optional()}).optional(),tasks:mx.optional(),extensions:z(j(),q).optional()}),yx=Y.extend({protocolVersion:j(),capabilities:vx,serverInfo:dx,instructions:j().optional()}),bx=Yb.extend({method:V(`notifications/initialized`),params:Jb.optional()}),xx=J.extend({method:V(`ping`),params:Gb.optional()}),Sx=I({progress:M(),total:H(M()),message:H(j())}),Cx=I({...Jb.shape,...Sx.shape,progressToken:Bb}),wx=Yb.extend({method:V(`notifications/progress`),params:Cx}),Tx=Gb.extend({cursor:Vb.optional()}),Ex=J.extend({params:Tx.optional()}),Dx=Y.extend({nextCursor:Vb.optional()}),Ox=B([`working`,`input_required`,`completed`,`failed`,`cancelled`]),kx=I({taskId:j(),status:Ox,ttl:R([M(),sv()]),createdAt:j(),lastUpdatedAt:j(),pollInterval:H(M()),statusMessage:H(j())}),Ax=Y.extend({task:kx}),jx=Jb.merge(kx),Mx=Yb.extend({method:V(`notifications/tasks/status`),params:jx}),Nx=J.extend({method:V(`tasks/get`),params:Gb.extend({taskId:j()})}),Px=Y.merge(kx),Fx=J.extend({method:V(`tasks/result`),params:Gb.extend({taskId:j()})});Y.loose();var Ix=Ex.extend({method:V(`tasks/list`)}),Lx=Dx.extend({tasks:F(kx)}),Rx=J.extend({method:V(`tasks/cancel`),params:Gb.extend({taskId:j()})}),zx=Y.merge(kx),Bx=I({uri:j(),mimeType:H(j()),_meta:z(j(),P()).optional()}),Vx=Bx.extend({text:j()}),Hx=j().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Ux=Bx.extend({blob:Hx}),Wx=B([`user`,`assistant`]),Gx=I({audience:F(Wx).optional(),priority:M().min(0).max(1).optional(),lastModified:Xg({offset:!0}).optional()}),Kx=I({...ux.shape,...lx.shape,uri:j(),description:H(j()),mimeType:H(j()),size:H(M()),annotations:Gx.optional(),_meta:H(L({}))}),qx=I({...ux.shape,...lx.shape,uriTemplate:j(),description:H(j()),mimeType:H(j()),annotations:Gx.optional(),_meta:H(L({}))}),Jx=Ex.extend({method:V(`resources/list`)}),Yx=Dx.extend({resources:F(Kx)}),Xx=Ex.extend({method:V(`resources/templates/list`)}),Zx=Dx.extend({resourceTemplates:F(qx)}),Qx=Gb.extend({uri:j()}),$x=Qx,eS=J.extend({method:V(`resources/read`),params:$x}),tS=Y.extend({contents:F(R([Vx,Ux]))}),nS=Yb.extend({method:V(`notifications/resources/list_changed`),params:Jb.optional()}),rS=Qx,iS=J.extend({method:V(`resources/subscribe`),params:rS}),aS=Qx,oS=J.extend({method:V(`resources/unsubscribe`),params:aS}),sS=Jb.extend({uri:j()}),cS=Yb.extend({method:V(`notifications/resources/updated`),params:sS}),lS=I({name:j(),description:H(j()),required:H(N())}),uS=I({...ux.shape,...lx.shape,description:H(j()),arguments:H(F(lS)),_meta:H(L({}))}),dS=Ex.extend({method:V(`prompts/list`)}),fS=Dx.extend({prompts:F(uS)}),pS=Gb.extend({name:j(),arguments:z(j(),j()).optional()}),mS=J.extend({method:V(`prompts/get`),params:pS}),hS=I({type:V(`text`),text:j(),annotations:Gx.optional(),_meta:z(j(),P()).optional()}),gS=I({type:V(`image`),data:Hx,mimeType:j(),annotations:Gx.optional(),_meta:z(j(),P()).optional()}),_S=I({type:V(`audio`),data:Hx,mimeType:j(),annotations:Gx.optional(),_meta:z(j(),P()).optional()}),vS=I({type:V(`tool_use`),name:j(),id:j(),input:z(j(),P()),_meta:z(j(),P()).optional()}),yS=I({type:V(`resource`),resource:R([Vx,Ux]),annotations:Gx.optional(),_meta:z(j(),P()).optional()}),bS=Kx.extend({type:V(`resource_link`)}),xS=R([hS,gS,_S,bS,yS]),SS=I({role:Wx,content:xS}),CS=Y.extend({description:j().optional(),messages:F(SS)}),wS=Yb.extend({method:V(`notifications/prompts/list_changed`),params:Jb.optional()}),TS=I({title:j().optional(),readOnlyHint:N().optional(),destructiveHint:N().optional(),idempotentHint:N().optional(),openWorldHint:N().optional()}),ES=I({taskSupport:B([`required`,`optional`,`forbidden`]).optional()}),DS=I({...ux.shape,...lx.shape,description:j().optional(),inputSchema:I({type:V(`object`),properties:z(j(),q).optional(),required:F(j()).optional()}).catchall(P()),outputSchema:I({type:V(`object`),properties:z(j(),q).optional(),required:F(j()).optional()}).catchall(P()).optional(),annotations:TS.optional(),execution:ES.optional(),_meta:z(j(),P()).optional()}),OS=Ex.extend({method:V(`tools/list`)}),kS=Dx.extend({tools:F(DS)}),AS=Y.extend({content:F(xS).default([]),structuredContent:z(j(),P()).optional(),isError:N().optional()});AS.or(Y.extend({toolResult:P()}));var jS=Kb.extend({name:j(),arguments:z(j(),P()).optional()}),MS=J.extend({method:V(`tools/call`),params:jS}),NS=Yb.extend({method:V(`notifications/tools/list_changed`),params:Jb.optional()});I({autoRefresh:N().default(!0),debounceMs:M().int().nonnegative().default(300)});var PS=B([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),FS=Gb.extend({level:PS}),IS=J.extend({method:V(`logging/setLevel`),params:FS}),LS=Jb.extend({level:PS,logger:j().optional(),data:P()}),RS=Yb.extend({method:V(`notifications/message`),params:LS}),zS=I({hints:F(I({name:j().optional()})).optional(),costPriority:M().min(0).max(1).optional(),speedPriority:M().min(0).max(1).optional(),intelligencePriority:M().min(0).max(1).optional()}),BS=I({mode:B([`auto`,`required`,`none`]).optional()}),VS=I({type:V(`tool_result`),toolUseId:j().describe(`The unique identifier for the corresponding tool call.`),content:F(xS).default([]),structuredContent:I({}).loose().optional(),isError:N().optional(),_meta:z(j(),P()).optional()}),HS=hv(`type`,[hS,gS,_S]),US=hv(`type`,[hS,gS,_S,vS,VS]),WS=I({role:Wx,content:R([US,F(US)]),_meta:z(j(),P()).optional()}),GS=Kb.extend({messages:F(WS),modelPreferences:zS.optional(),systemPrompt:j().optional(),includeContext:B([`none`,`thisServer`,`allServers`]).optional(),temperature:M().optional(),maxTokens:M().int(),stopSequences:F(j()).optional(),metadata:q.optional(),tools:F(DS).optional(),toolChoice:BS.optional()}),KS=J.extend({method:V(`sampling/createMessage`),params:GS}),qS=Y.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`]).or(j())),role:Wx,content:HS}),JS=Y.extend({model:j(),stopReason:H(B([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(j())),role:Wx,content:R([US,F(US)])}),YS=I({type:V(`boolean`),title:j().optional(),description:j().optional(),default:N().optional()}),XS=I({type:V(`string`),title:j().optional(),description:j().optional(),minLength:M().optional(),maxLength:M().optional(),format:B([`email`,`uri`,`date`,`date-time`]).optional(),default:j().optional()}),ZS=I({type:B([`number`,`integer`]),title:j().optional(),description:j().optional(),minimum:M().optional(),maximum:M().optional(),default:M().optional()}),QS=I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),default:j().optional()}),$S=I({type:V(`string`),title:j().optional(),description:j().optional(),oneOf:F(I({const:j(),title:j()})),default:j().optional()}),eC=R([R([I({type:V(`string`),title:j().optional(),description:j().optional(),enum:F(j()),enumNames:F(j()).optional(),default:j().optional()}),R([QS,$S]),R([I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({type:V(`string`),enum:F(j())}),default:F(j()).optional()}),I({type:V(`array`),title:j().optional(),description:j().optional(),minItems:M().optional(),maxItems:M().optional(),items:I({anyOf:F(I({const:j(),title:j()}))}),default:F(j()).optional()})])]),YS,XS,ZS]),tC=R([Kb.extend({mode:V(`form`).optional(),message:j(),requestedSchema:I({type:V(`object`),properties:z(j(),eC),required:F(j()).optional()})}),Kb.extend({mode:V(`url`),message:j(),elicitationId:j(),url:j().url()})]),nC=J.extend({method:V(`elicitation/create`),params:tC}),rC=Jb.extend({elicitationId:j()}),iC=Yb.extend({method:V(`notifications/elicitation/complete`),params:rC}),aC=Y.extend({action:B([`accept`,`decline`,`cancel`]),content:Jv(e=>e===null?void 0:e,z(j(),R([j(),M(),N(),F(j())])).optional())}),oC=I({type:V(`ref/resource`),uri:j()}),sC=I({type:V(`ref/prompt`),name:j()}),cC=Gb.extend({ref:R([sC,oC]),argument:I({name:j(),value:j()}),context:I({arguments:z(j(),j()).optional()}).optional()}),lC=J.extend({method:V(`completion/complete`),params:cC}),uC=Y.extend({completion:L({values:F(j()).max(100),total:H(M().int()),hasMore:H(N())})}),dC=I({uri:j().startsWith(`file://`),name:j().optional(),_meta:z(j(),P()).optional()}),fC=J.extend({method:V(`roots/list`),params:Gb.optional()}),pC=Y.extend({roots:F(dC)}),mC=Yb.extend({method:V(`notifications/roots/list_changed`),params:Jb.optional()});R([xx,_x,lC,IS,mS,dS,Jx,Xx,eS,iS,oS,MS,OS,Nx,Fx,Ix,Rx]),R([cx,wx,bx,mC,Mx]),R([ox,qS,JS,aC,pC,Px,Lx,Ax]),R([xx,KS,nC,fC,Nx,Fx,Ix,Rx]),R([cx,wx,RS,cS,nS,NS,wS,Mx,iC]),R([ox,yx,uC,CS,fS,Yx,Zx,tS,AS,kS,Px,Lx,Ax]);var Z=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new hC(e.elicitations,n)}return new e(t,n,r)}},hC=class extends Z{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function gC(e){return e===`completed`||e===`failed`||e===`cancelled`}function _C(e){let t=Gg(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Kg(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function vC(e,t){let n=Wg(e,t);if(!n.success)throw n.error;return n.data}var yC=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(cx,e=>{this._oncancel(e)}),this.setNotificationHandler(wx,e=>{this._onprogress(e)}),this.setRequestHandler(xx,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Nx,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Z(X.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(Fx,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r)if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new Z(e.error.code,e.error.message,e.error.data))}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new Z(X.InvalidParams,`Task not found: ${r}`);if(!gC(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(gC(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[zb]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Ix,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new Z(X.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Rx,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new Z(X.InvalidParams,`Task not found: ${e.params.taskId}`);if(gC(n.status))throw new Z(X.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new Z(X.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof Z?e:new Z(X.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),Z.fromError(X.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),nx(e)||ix(e)?this._onresponse(e):Qb(e)?this._onrequest(e,t):ex(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=Z.fromError(X.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[zb]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:X.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=qb(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new Z(X.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:X.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),nx(e)?n(e):n(new Z(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(nx(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),nx(e)?r(e):r(Z.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof Z?e:new Z(X.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Ax,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new Z(X.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},gC(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new Z(X.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new Z(X.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof Z?e:new Z(X.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[zb]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof Z?e:new Z(X.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=Wg(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let ee=n?.timeout??6e4;this._setupTimeout(d,ee,n?.maxTotalTimeout,()=>p(Z.fromError(X.RequestTimeout,`Request timed out`,{timeout:ee})),n?.resetTimeoutOnProgress??!1);let te=s?.taskId;te?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(te,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Px,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Lx,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},zx,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[zb]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[zb]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[zb]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=_C(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=vC(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=_C(e);this._notificationHandlers.set(n,n=>{let r=vC(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&Qb(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new Z(X.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new Z(X.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new Z(X.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new Z(X.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Mx.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),gC(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new Z(X.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(gC(a.status))throw new Z(X.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Mx.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),gC(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function bC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xC(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];bC(a)&&bC(i)?n[r]={...a,...i}:n[r]=i}return n}var SC=`modulepreload`,CC=function(e,t){return new URL(e,t).href},wC={},TC=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=CC(t,n),t in wC)return;wC[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:SC,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};Rb(),(e=>typeof r<`u`?r:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof r<`u`?r:e)[t]}):e)(function(e){if(typeof r<`u`)return r.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var EC=class extends yC{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},DC=`2026-01-26`,OC=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=ax.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},kC=R([V(`light`),V(`dark`)]).describe(`Color theme preference for the host environment.`),AC=R([V(`inline`),V(`fullscreen`),V(`pip`)]).describe(`Display mode for UI presentation.`),jC=z(R([V(`--color-background-primary`),V(`--color-background-secondary`),V(`--color-background-tertiary`),V(`--color-background-inverse`),V(`--color-background-ghost`),V(`--color-background-info`),V(`--color-background-danger`),V(`--color-background-success`),V(`--color-background-warning`),V(`--color-background-disabled`),V(`--color-text-primary`),V(`--color-text-secondary`),V(`--color-text-tertiary`),V(`--color-text-inverse`),V(`--color-text-ghost`),V(`--color-text-info`),V(`--color-text-danger`),V(`--color-text-success`),V(`--color-text-warning`),V(`--color-text-disabled`),V(`--color-border-primary`),V(`--color-border-secondary`),V(`--color-border-tertiary`),V(`--color-border-inverse`),V(`--color-border-ghost`),V(`--color-border-info`),V(`--color-border-danger`),V(`--color-border-success`),V(`--color-border-warning`),V(`--color-border-disabled`),V(`--color-ring-primary`),V(`--color-ring-secondary`),V(`--color-ring-inverse`),V(`--color-ring-info`),V(`--color-ring-danger`),V(`--color-ring-success`),V(`--color-ring-warning`),V(`--font-sans`),V(`--font-mono`),V(`--font-weight-normal`),V(`--font-weight-medium`),V(`--font-weight-semibold`),V(`--font-weight-bold`),V(`--font-text-xs-size`),V(`--font-text-sm-size`),V(`--font-text-md-size`),V(`--font-text-lg-size`),V(`--font-heading-xs-size`),V(`--font-heading-sm-size`),V(`--font-heading-md-size`),V(`--font-heading-lg-size`),V(`--font-heading-xl-size`),V(`--font-heading-2xl-size`),V(`--font-heading-3xl-size`),V(`--font-text-xs-line-height`),V(`--font-text-sm-line-height`),V(`--font-text-md-line-height`),V(`--font-text-lg-line-height`),V(`--font-heading-xs-line-height`),V(`--font-heading-sm-line-height`),V(`--font-heading-md-line-height`),V(`--font-heading-lg-line-height`),V(`--font-heading-xl-line-height`),V(`--font-heading-2xl-line-height`),V(`--font-heading-3xl-line-height`),V(`--border-radius-xs`),V(`--border-radius-sm`),V(`--border-radius-md`),V(`--border-radius-lg`),V(`--border-radius-xl`),V(`--border-radius-full`),V(`--border-width-regular`),V(`--shadow-hairline`),V(`--shadow-sm`),V(`--shadow-md`),V(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.
|
|
2574
3391
|
|
|
2575
3392
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
2576
3393
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
2577
3394
|
|
|
2578
3395
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
2579
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),R([j(),
|
|
3396
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),R([j(),ov()]).describe(`Style variables for theming MCP apps.
|
|
2580
3397
|
|
|
2581
3398
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
2582
3399
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -2588,10 +3405,10 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
2588
3405
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
2589
3406
|
|
|
2590
3407
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
2591
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);I({method:V(`ui/open-link`),params:I({url:j().describe(`URL to open in the host's browser`)})});var
|
|
3408
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);I({method:V(`ui/open-link`),params:I({url:j().describe(`URL to open in the host's browser`)})});var MC=I({isError:N().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),NC=I({isError:N().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),PC=I({isError:N().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();I({method:V(`ui/notifications/sandbox-proxy-ready`),params:I({})});var FC=I({connectDomains:F(j()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
2592
3409
|
|
|
2593
3410
|
- Maps to CSP \`connect-src\` directive
|
|
2594
|
-
- Empty or omitted → no network connections (secure default)`),resourceDomains:F(j()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:F(j()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:F(j()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),
|
|
3411
|
+
- Empty or omitted → no network connections (secure default)`),resourceDomains:F(j()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:F(j()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:F(j()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),IC=I({camera:I({}).optional().describe(`Request camera access.
|
|
2595
3412
|
|
|
2596
3413
|
Maps to Permission Policy \`camera\` feature.`),microphone:I({}).optional().describe(`Request microphone access.
|
|
2597
3414
|
|
|
@@ -2599,7 +3416,7 @@ Maps to Permission Policy \`microphone\` feature.`),geolocation:I({}).optional()
|
|
|
2599
3416
|
|
|
2600
3417
|
Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:I({}).optional().describe(`Request clipboard write access.
|
|
2601
3418
|
|
|
2602
|
-
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var
|
|
3419
|
+
Maps to Permission Policy \`clipboard-write\` feature.`)});I({method:V(`ui/notifications/size-changed`),params:I({width:M().optional().describe(`New width in pixels.`),height:M().optional().describe(`New height in pixels.`)})});var LC=I({method:V(`ui/notifications/tool-input`),params:I({arguments:z(j(),P().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),RC=I({method:V(`ui/notifications/tool-input-partial`),params:I({arguments:z(j(),P().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),zC=I({method:V(`ui/notifications/tool-cancelled`),params:I({reason:j().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),BC=I({fonts:j().optional()}),VC=I({variables:jC.optional().describe(`CSS variables for theming the app.`),css:BC.optional().describe(`CSS blocks that apps can inject.`)}),HC=I({method:V(`ui/resource-teardown`),params:I({})});z(j(),P());var UC=I({text:I({}).optional().describe(`Host supports text content blocks.`),image:I({}).optional().describe(`Host supports image content blocks.`),audio:I({}).optional().describe(`Host supports audio content blocks.`),resource:I({}).optional().describe(`Host supports resource content blocks.`),resourceLink:I({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:I({}).optional().describe(`Host supports structured content.`)});I({method:V(`ui/notifications/request-teardown`),params:I({}).optional()});var WC=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),openLinks:I({}).optional().describe(`Host supports opening external URLs.`),downloadFile:I({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:I({listChanged:N().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:I({listChanged:N().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:I({}).optional().describe(`Host accepts log messages.`),sandbox:I({permissions:IC.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:FC.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:UC.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:UC.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:I({tools:I({}).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.")}),GC=I({experimental:I({}).optional().describe(`Experimental features (structure TBD).`),tools:I({listChanged:N().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:F(AC).optional().describe(`Display modes the app supports.`)});I({method:V(`ui/notifications/initialized`),params:I({}).optional()}),I({csp:FC.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:IC.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:j().optional().describe(`Dedicated origin for view sandbox.
|
|
2603
3420
|
|
|
2604
3421
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
2605
3422
|
|
|
@@ -2613,10 +3430,10 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
2613
3430
|
|
|
2614
3431
|
- \`true\`: request visible border + background
|
|
2615
3432
|
- \`false\`: request no visible border + background
|
|
2616
|
-
- omitted: host decides border`)}),I({method:V(`ui/request-display-mode`),params:I({mode:
|
|
3433
|
+
- omitted: host decides border`)}),I({method:V(`ui/request-display-mode`),params:I({mode:AC.describe(`The display mode being requested.`)})});var KC=I({mode:AC.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),qC=R([V(`model`),V(`app`)]).describe(`Tool visibility scope - who can access the tool.`);I({resourceUri:j().optional(),visibility:F(qC).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
2617
3434
|
- "model": Tool visible to and callable by the agent
|
|
2618
|
-
- "app": Tool callable by the app from this server only`),csp:
|
|
2619
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:j().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:j().optional().describe(`User's timezone in IANA format.`),userAgent:j().optional().describe(`Host application identifier.`),platform:R([V(`web`),V(`desktop`),V(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:I({touch:N().optional().describe(`Whether the device supports touch input.`),hover:N().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:I({top:M().describe(`Top safe area inset in pixels.`),right:M().describe(`Right safe area inset in pixels.`),bottom:M().describe(`Bottom safe area inset in pixels.`),left:M().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),DC=I({method:V(`ui/notifications/host-context-changed`),params:EC.describe(`Partial context update containing only changed fields.`)});I({method:V(`ui/update-model-context`),params:I({content:F(Qx).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:z(j(),P().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),I({method:V(`ui/initialize`),params:I({appInfo:Hb.describe(`App identification (name and version).`),appCapabilities:SC.describe(`Features and capabilities this app provides.`),protocolVersion:j().describe(`Protocol version this app supports.`)})});var OC=I({protocolVersion:j().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Hb.describe(`Host application identification and version.`),hostCapabilities:xC.describe(`Features and capabilities provided by the host.`),hostContext:EC.describe(`Rich context about the host environment.`)}).passthrough(),kC={target:`draft-2020-12`};async function AC(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](kC);if(n.vendor===`zod`){let{z:n}=await nC(async()=>{let{z:e}=await Promise.resolve().then(()=>(hb(),pb));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function jC(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function MC(){let e=document.documentElement.getAttribute(`data-theme`);return e===`dark`||e===`light`?e:document.documentElement.classList.contains(`dark`)?`dark`:`light`}function NC(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function PC(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}var FC=class e extends rC{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:mC,toolinputpartial:hC,toolresult:TC,toolcancelled:gC,hostcontextchanged:DC};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||_({jitless:!0}),this.setRequestHandler(Qb,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=QS(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await jC(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await jC(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await AC(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await AC(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(yC,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(lS,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(aS,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},sS,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},Mx,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},Ex,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?TS:wS;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},dC,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Lb,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},lC,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},uC,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},CC,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new aC(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:iC}},OC,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function IC(e,t){if(document.getElementById(e))return;let n=document.createElement(`style`);n.id=e,n.textContent=t,document.head.appendChild(n)}var LC=document.createElement(`div`);function RC(e){return LC.textContent=e,LC.innerHTML}var zC=`aikit-annotation-popover`,BC=`
|
|
3435
|
+
- "app": Tool callable by the app from this server only`),csp:lv().optional(),permissions:lv().optional()}),I({mimeTypes:F(j()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),I({method:V(`ui/download-file`),params:I({contents:F(R([yS,bS])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),I({method:V(`ui/message`),params:I({role:V(`user`).describe(`Message role, currently only "user" is supported.`),content:F(xS).describe(`Message content blocks (text, image, etc.).`)})}),I({method:V(`ui/notifications/sandbox-resource-ready`),params:I({html:j().describe(`HTML content to load into the inner iframe.`),sandbox:j().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:FC.optional().describe(`CSP configuration from resource metadata.`),permissions:IC.optional().describe(`Sandbox permissions from resource metadata.`)})});var JC=I({method:V(`ui/notifications/tool-result`),params:AS.describe(`Standard MCP tool execution result.`)}),YC=I({toolInfo:I({id:Xb.optional().describe(`JSON-RPC id of the tools/call request.`),tool:DS.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:kC.optional().describe(`Current color theme preference.`),styles:VC.optional().describe(`Style configuration for theming the app.`),displayMode:AC.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:F(AC).optional().describe(`Display modes the host supports.`),containerDimensions:R([I({height:M().describe(`Fixed container height in pixels.`)}),I({maxHeight:R([M(),ov()]).optional().describe(`Maximum container height in pixels.`)})]).and(R([I({width:M().describe(`Fixed container width in pixels.`)}),I({maxWidth:R([M(),ov()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
3436
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:j().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:j().optional().describe(`User's timezone in IANA format.`),userAgent:j().optional().describe(`Host application identifier.`),platform:R([V(`web`),V(`desktop`),V(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:I({touch:N().optional().describe(`Whether the device supports touch input.`),hover:N().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:I({top:M().describe(`Top safe area inset in pixels.`),right:M().describe(`Right safe area inset in pixels.`),bottom:M().describe(`Bottom safe area inset in pixels.`),left:M().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),XC=I({method:V(`ui/notifications/host-context-changed`),params:YC.describe(`Partial context update containing only changed fields.`)});I({method:V(`ui/update-model-context`),params:I({content:F(xS).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:z(j(),P().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),I({method:V(`ui/initialize`),params:I({appInfo:dx.describe(`App identification (name and version).`),appCapabilities:GC.describe(`Features and capabilities this app provides.`),protocolVersion:j().describe(`Protocol version this app supports.`)})});var ZC=I({protocolVersion:j().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:dx.describe(`Host application identification and version.`),hostCapabilities:WC.describe(`Features and capabilities provided by the host.`),hostContext:YC.describe(`Rich context about the host environment.`)}).passthrough(),QC={target:`draft-2020-12`};async function $C(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](QC);if(n.vendor===`zod`){let{z:n}=await TC(async()=>{let{z:e}=await Promise.resolve().then(()=>(Rb(),Ib));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function ew(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function tw(){let e=document.documentElement.getAttribute(`data-theme`);return e===`dark`||e===`light`?e:document.documentElement.classList.contains(`dark`)?`dark`:`light`}function nw(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function rw(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}var iw=class e extends EC{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:LC,toolinputpartial:RC,toolresult:JC,toolcancelled:zC,hostcontextchanged:XC};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||_({jitless:!0}),this.setRequestHandler(xx,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=xC(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await ew(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await ew(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await $C(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await $C(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(HC,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(MS,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(OS,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},AS,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},tS,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},Yx,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?JS:qS;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},PC,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},ox,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},MC,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},NC,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},KC,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new OC(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:DC}},ZC,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function aw(e,t){if(document.getElementById(e))return;let n=document.createElement(`style`);n.id=e,n.textContent=t,document.head.appendChild(n)}var ow=document.createElement(`div`);function sw(e){return ow.textContent=e,ow.innerHTML}var cw=`aikit-annotation-popover`,lw=`
|
|
2620
3437
|
.cp-backdrop {
|
|
2621
3438
|
position: fixed;
|
|
2622
3439
|
top: 0;
|
|
@@ -2714,7 +3531,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
2714
3531
|
.cp-btn--remove:hover {
|
|
2715
3532
|
background: var(--dt-annotation-deletion-bg);
|
|
2716
3533
|
}
|
|
2717
|
-
`,
|
|
3534
|
+
`,uw=class{el;textarea;result;backdrop;options;constructor(e,t){this.result=e,this.options=t,aw(cw,lw),this.backdrop=document.createElement(`div`),this.backdrop.className=`cp-backdrop`,this.el=document.createElement(`div`),this.el.className=`cp-popover`,this.el.setAttribute(`role`,`dialog`),this.el.setAttribute(`aria-label`,`Feedback on selection`),this.el.innerHTML=`
|
|
2718
3535
|
<div class="cp-header">Feedback</div>
|
|
2719
3536
|
<div class="cp-excerpt">${this.escapeText(e.text)}</div>
|
|
2720
3537
|
<textarea class="cp-textarea" placeholder="Add a comment (optional)..." aria-label="Comment text"></textarea>
|
|
@@ -2723,8 +3540,8 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
2723
3540
|
<button class="cp-btn cp-btn--remove" aria-label="Remove selection without comment">Remove</button>
|
|
2724
3541
|
<button class="cp-btn cp-btn--comment" aria-label="Submit comment">Comment</button>
|
|
2725
3542
|
</div>
|
|
2726
|
-
`,this.textarea=this.el.querySelector(`.cp-textarea`);let n=this.el.querySelector(`.cp-btn--comment`),r=this.el.querySelector(`.cp-btn--remove`),i=this.el.querySelector(`.cp-btn--cancel`);this.backdrop.addEventListener(`click`,()=>this.handleCancel()),n.addEventListener(`click`,()=>this.handleComment()),r.addEventListener(`click`,()=>this.handleRemove()),i.addEventListener(`click`,()=>this.handleCancel()),this.textarea.addEventListener(`keydown`,e=>this.handleKeyDown(e)),document.body.appendChild(this.backdrop),document.body.appendChild(this.el),this.positionNearSelection(),this.textarea.focus(),this.el.addEventListener(`keydown`,e=>{if(e.key!==`Tab`)return;let t=this.el.querySelectorAll(`button, textarea, [tabindex]:not([tabindex="-1"])`);if(t.length===0)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())})}destroy(){this.backdrop.remove(),this.el.remove()}escapeText(e){let t=document.createElement(`div`);return t.textContent=e,t.innerHTML}positionNearSelection(){let e=this.result.range.getBoundingClientRect(),t=window.scrollX,n=window.scrollY,r=this.el.offsetWidth||320,i=this.el.offsetHeight||260,a=e.left+t+e.width/2-r/2;a=Math.max(8,a),a=Math.min(a,window.innerWidth+t-r-8);let o=window.innerHeight+n,s=e.bottom+n+8,c;s+i<=o?c=s:(c=e.top+n-i-8,c=Math.max(8,c)),this.el.style.left=`${a}px`,this.el.style.top=`${c}px`}handleComment(){let e=this.textarea.value.trim();this.options.onSubmit(this.result,e)}handleRemove(){let e=this.textarea.value.trim();this.options.onRemove(this.result,e)}handleCancel(){this.options.onDismiss()}handleKeyDown(e){e.key===`Escape`?(e.preventDefault(),this.handleCancel()):(e.ctrlKey||e.metaKey)&&e.key===`Enter`&&(e.preventDefault(),this.handleComment())}},
|
|
2727
|
-
`).trimEnd()}exportJSON(){let e=[...this.store.getState().annotations].sort((e,t)=>e.createdAt-t.createdAt);return JSON.stringify(e,null,2)}submitFeedback(e){let t=this.exportMarkdown(),n=this.exportJSON();e(`annotations`,t===`No feedback provided.`?t:`${t}\n\n\`\`\`json\n${n}\n\`\`\``)}getTotalCount(){let e=this.store.getState();return{comments:e.annotations.filter(e=>e.type===`COMMENT`).length,deletions:e.annotations.filter(e=>e.type===`DELETION`).length,total:e.annotations.length}}},
|
|
3543
|
+
`,this.textarea=this.el.querySelector(`.cp-textarea`);let n=this.el.querySelector(`.cp-btn--comment`),r=this.el.querySelector(`.cp-btn--remove`),i=this.el.querySelector(`.cp-btn--cancel`);this.backdrop.addEventListener(`click`,()=>this.handleCancel()),n.addEventListener(`click`,()=>this.handleComment()),r.addEventListener(`click`,()=>this.handleRemove()),i.addEventListener(`click`,()=>this.handleCancel()),this.textarea.addEventListener(`keydown`,e=>this.handleKeyDown(e)),document.body.appendChild(this.backdrop),document.body.appendChild(this.el),this.positionNearSelection(),this.textarea.focus(),this.el.addEventListener(`keydown`,e=>{if(e.key!==`Tab`)return;let t=this.el.querySelectorAll(`button, textarea, [tabindex]:not([tabindex="-1"])`);if(t.length===0)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())})}destroy(){this.backdrop.remove(),this.el.remove()}escapeText(e){let t=document.createElement(`div`);return t.textContent=e,t.innerHTML}positionNearSelection(){let e=this.result.range.getBoundingClientRect(),t=window.scrollX,n=window.scrollY,r=this.el.offsetWidth||320,i=this.el.offsetHeight||260,a=e.left+t+e.width/2-r/2;a=Math.max(8,a),a=Math.min(a,window.innerWidth+t-r-8);let o=window.innerHeight+n,s=e.bottom+n+8,c;s+i<=o?c=s:(c=e.top+n-i-8,c=Math.max(8,c)),this.el.style.left=`${a}px`,this.el.style.top=`${c}px`}handleComment(){let e=this.textarea.value.trim();this.options.onSubmit(this.result,e)}handleRemove(){let e=this.textarea.value.trim();this.options.onRemove(this.result,e)}handleCancel(){this.options.onDismiss()}handleKeyDown(e){e.key===`Escape`?(e.preventDefault(),this.handleCancel()):(e.ctrlKey||e.metaKey)&&e.key===`Enter`&&(e.preventDefault(),this.handleComment())}},dw=class{store;constructor(e){this.store=e}exportMarkdown(){let e=[...this.store.getState().annotations].sort((e,t)=>e.createdAt-t.createdAt);if(e.length===0)return`No feedback provided.`;let t=e.filter(e=>e.type===`COMMENT`),n=e.filter(e=>e.type===`DELETION`),r=[`## Reviewer Feedback`,``];if(t.length>0){r.push(`### Comments`,``);for(let e of t){let t=e.originalText.length>80?`${e.originalText.slice(0,80)}\u2026`:e.originalText;r.push(`- **${e.comment}**`),r.push(` > "${t}"`),r.push(``)}}if(n.length>0){r.push(`### Deletions`,``);for(let e of n){let t=e.originalText.length>80?`${e.originalText.slice(0,80)}\u2026`:e.originalText;r.push(`- Remove this`),r.push(` > "${t}"`),r.push(``)}}return r.join(`
|
|
3544
|
+
`).trimEnd()}exportJSON(){let e=[...this.store.getState().annotations].sort((e,t)=>e.createdAt-t.createdAt);return JSON.stringify(e,null,2)}submitFeedback(e){let t=this.exportMarkdown(),n=this.exportJSON();e(`annotations`,t===`No feedback provided.`?t:`${t}\n\n\`\`\`json\n${n}\n\`\`\``)}getTotalCount(){let e=this.store.getState();return{comments:e.annotations.filter(e=>e.type===`COMMENT`).length,deletions:e.annotations.filter(e=>e.type===`DELETION`).length,total:e.annotations.length}}},fw=`aikit-annotation-highlight`;function pw(){if(document.getElementById(fw))return;let e=document.createElement(`style`);e.id=fw,e.textContent=`
|
|
2728
3545
|
mark.hl-COMMENT {
|
|
2729
3546
|
background: var(--dt-annotation-comment-bg, rgba(88, 166, 255, 0.15));
|
|
2730
3547
|
border-bottom: 2px solid var(--dt-annotation-comment, #58a6ff);
|
|
@@ -2765,7 +3582,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
2765
3582
|
50% { transform: scale(1.05); }
|
|
2766
3583
|
100% { transform: scale(1); }
|
|
2767
3584
|
}
|
|
2768
|
-
`,document.head.appendChild(e)}var
|
|
3585
|
+
`,document.head.appendChild(e)}var mw=class{container;store;unsubscribe=null;constructor(e,t){this.container=e,this.store=t}start(){pw(),this.unsubscribe=this.store.subscribe(e=>{switch(e.type){case`annotation-added`:this.createHighlight(e.annotation);break;case`annotation-removed`:this.removeHighlight(e.id);break;case`selection-changed`:this.updateSelection(e.id),e.id!==null&&this.scrollToAnnotation(e.id);break}})}stop(){this.unsubscribe?.(),this.unsubscribe=null,this.clearAll()}findTextNodeRange(e,t,n){let r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),i=0,a=null,o=0,s=null,c=0,l=r.nextNode();for(;l;){let e=(l.textContent||``).length,u=i+e;if(a===null&&u>t&&(a=l,o=t-i),u>=n){s=l,c=n-i;break}i=u,l=r.nextNode()}if(!a||!s)return null;let u=document.createRange();return u.setStart(a,Math.min(o,(a.textContent||``).length)),u.setEnd(s,Math.min(c,(s.textContent||``).length)),u}createHighlight(e){let t=this.container.querySelector(`[data-block-id="${e.blockId}"]`);if(!t){console.warn(`[HighlightManager] Block not found for annotation ${e.id}: ${e.blockId}`);return}let n=this.findTextNodeRange(t,e.startOffset,e.endOffset);if(!n){console.warn(`[HighlightManager] Could not resolve text range for annotation ${e.id}`);return}let r=document.createElement(`mark`);r.className=`hl-${e.type}`,r.dataset.annotationId=e.id,r.addEventListener(`click`,()=>{this.store.select(e.id)});try{n.surroundContents(r)}catch{try{if(n.endContainer.nodeType===Node.TEXT_NODE&&n.endContainer.splitText(n.endOffset),n.startContainer.nodeType===Node.TEXT_NODE){let e=n.startContainer;n.startOffset>0&&e.splitText(n.startOffset);let t=document.createRange();t.setStart(e.nextSibling||e,0),t.setEnd(n.endContainer.nodeType===Node.TEXT_NODE&&n.endContainer.previousSibling||n.endContainer,n.endOffset),t.surroundContents(r)}else throw Error(`Non-text range`)}catch{let e=n.extractContents();r.append(e),n.insertNode(r)}}}removeHighlight(e){let t=this.container.querySelector(`mark[data-annotation-id="${e}"]`);if(!t)return;let n=t.parentNode;if(n){for(;t.firstChild;)n.insertBefore(t.firstChild,t);n.removeChild(t),n.nodeType===Node.ELEMENT_NODE&&n.normalize()}}updateSelection(e){let t=this.container.querySelectorAll(`mark[data-annotation-id]`);for(let n of t)n.classList.toggle(`hl-selected`,n.dataset.annotationId===e)}scrollToAnnotation(e){let t=this.container.querySelector(`mark[data-annotation-id="${e}"]`);t&&(t.scrollIntoView({behavior:`smooth`,block:`center`}),t.classList.add(`annotation-pulse`),setTimeout(()=>{t.classList.remove(`annotation-pulse`)},600))}clearAll(){let e=this.container.querySelectorAll(`mark[data-annotation-id]`);for(let t of e){let e=t.parentNode;if(e){for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t),e.nodeType===Node.ELEMENT_NODE&&e.normalize()}}}},hw=new Set([`button`,`input`,`textarea`,`select`]),gw=class{options;boundHandleMouseUp;constructor(e){this.options=e,this.boundHandleMouseUp=this.handleMouseUp.bind(this),this.options.container.addEventListener(`mouseup`,this.boundHandleMouseUp,{passive:!0})}destroy(){this.options.container.removeEventListener(`mouseup`,this.boundHandleMouseUp)}handleMouseUp(e){if(this.options.mode()===`selection`)return;let t=e.target;if(!t||this.isExcludedElement(t))return;let n=this.getSelectionRange();if(!n)return;let r=this.findBlockId(n.startContainer);if(!r||this.findBlockContainer(n.startContainer)!==this.findBlockContainer(n.endContainer))return;let i=this.computeBlockOffset(n.startContainer,n.startOffset),a=this.computeBlockOffset(n.endContainer,n.endOffset);if(i===null||a===null)return;let o={blockId:r,startOffset:i,endOffset:a,text:n.toString(),range:n};this.options.onSelection(o),this.clearSelection()}getSelectionRange(){let e=window.getSelection();return!e||e.isCollapsed||e.rangeCount===0?null:e.getRangeAt(0)}findBlockId(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute(`data-block-id`))return t.getAttribute(`data-block-id`);t=t.parentNode}return null}computeBlockOffset(e,t){let n=this.findBlockContainer(e);if(!n)return null;let r=document.createTreeWalker(n,NodeFilter.SHOW_TEXT,null),i=0,a=r.nextNode();for(;a;){if(a===e)return i+t;i+=(a.textContent||``).length,a=r.nextNode()}return null}findBlockContainer(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute(`data-block-id`))return t;t=t.parentNode}return null}clearSelection(){let e=window.getSelection();e&&e.removeAllRanges()}isExcludedElement(e){let t=e;for(;t&&!(t instanceof HTMLElement);)t=t.parentNode;return t?hw.has(t.tagName.toLowerCase()):!1}},_w=`aikit-annotation-sidebar`,vw=`
|
|
2769
3586
|
.as-sidebar {
|
|
2770
3587
|
width: var(--dt-annotation-sidebar-width, 300px);
|
|
2771
3588
|
background: var(--dt-bg-secondary);
|
|
@@ -2947,21 +3764,21 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
2947
3764
|
font-size: var(--dt-font-size-sm);
|
|
2948
3765
|
padding: var(--dt-space-6) var(--dt-space-2);
|
|
2949
3766
|
}
|
|
2950
|
-
`,
|
|
3767
|
+
`,yw=`<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"/></svg>`,bw=class{el;store;exporter;unsubscribe=null;listEl;modeToggleBtn;constructor(e){this.store=e.store,this.exporter=e.exporter,this.el=this.render(),this.listEl=this.el.querySelector(`.as-list`),this.modeToggleBtn=this.el.querySelector(`.as-mode-toggle`),this.unsubscribe=this.store.subscribe(e=>{switch(e.type){case`annotation-added`:case`annotation-removed`:case`annotation-updated`:this.renderList(),this.updateHeader();break;case`selection-changed`:this.updateCardSelection(e.id);break;case`sidebar-toggled`:this.updateVisibility();break;case`mode-changed`:this.updateModeToggle();break}}),(e.mountTarget??document.body).appendChild(this.el),this.updateVisibility(),this.updateModeToggle()}destroy(){this.unsubscribe?.(),this.el.remove()}render(){aw(_w,vw);let e=document.createElement(`div`);return e.className=`as-sidebar`,e.setAttribute(`role`,`complementary`),e.setAttribute(`aria-label`,`Annotations`),e.innerHTML=`
|
|
2951
3768
|
<div class="as-header">
|
|
2952
3769
|
<span class="as-header-title">Annotations</span>
|
|
2953
3770
|
<span class="as-count-badge" aria-live="polite">${this.exporter.getTotalCount().total}</span>
|
|
2954
3771
|
<span class="as-header-spacer"></span>
|
|
2955
|
-
<button class="as-mode-toggle" aria-label="Toggle annotation mode">${
|
|
3772
|
+
<button class="as-mode-toggle" aria-label="Toggle annotation mode">${yw} Feedback</button>
|
|
2956
3773
|
<button class="as-close-btn" aria-label="Close sidebar">×</button>
|
|
2957
3774
|
</div>
|
|
2958
3775
|
<div class="as-list" role="list" aria-label="Annotation list"></div>
|
|
2959
3776
|
`,e.querySelector(`.as-close-btn`).addEventListener(`click`,e=>{e.stopPropagation(),this.store.toggleSidebar(!1)}),e.querySelector(`.as-mode-toggle`).addEventListener(`click`,e=>{e.stopPropagation();let t=this.store.getState().mode===`feedback`?`selection`:`feedback`;this.store.setMode(t)}),e}renderList(){let e=this.store.getState().annotations;if(this.listEl.innerHTML=``,e.length===0){let e=document.createElement(`div`);e.className=`as-empty`,e.textContent=`No annotations yet. Select text in Feedback mode.`,this.listEl.appendChild(e);return}let t=[...e].sort((e,t)=>t.createdAt-e.createdAt);for(let e of t)this.listEl.appendChild(this.renderAnnotationItem(e))}renderAnnotationItem(e){let t=document.createElement(`div`);return t.className=`as-card as-card--${e.type}`,t.dataset.annotationId=e.id,this.store.getState().selectedId===e.id&&t.classList.add(`as-card--selected`),t.innerHTML=`
|
|
2960
|
-
<div class="as-card-excerpt">${
|
|
2961
|
-
${e.comment?`<div class="as-card-comment">${
|
|
2962
|
-
<div class="as-card-comment-detail">${e.comment?
|
|
3777
|
+
<div class="as-card-excerpt">${sw(e.originalText.length>60?`${e.originalText.slice(0,60)}\u2026`:e.originalText)}</div>
|
|
3778
|
+
${e.comment?`<div class="as-card-comment">${sw(e.comment)}</div>`:``}
|
|
3779
|
+
<div class="as-card-comment-detail">${e.comment?sw(e.comment):`<em style="color:var(--dt-text-tertiary)">No comment — marked text only</em>`}</div>
|
|
2963
3780
|
<button class="as-delete-btn" aria-label="Delete annotation">×</button>
|
|
2964
|
-
`,t.addEventListener(`click`,()=>{this.store.select(e.id);let n=t.querySelector(`.as-card-comment-detail`);if(n){n.classList.toggle(`as-card-comment-detail--open`);let e=this.listEl.querySelectorAll(`.as-card-comment-detail--open`);for(let t of e)t!==n&&t.classList.remove(`as-card-comment-detail--open`)}}),t.querySelector(`.as-delete-btn`).addEventListener(`click`,t=>{t.stopPropagation(),this.handleDelete(e.id)}),t}handleDelete(e){this.store.remove(e)}updateVisibility(){let e=this.store.getState();this.el.style.display=e.isSidebarOpen?`flex`:`none`}updateHeader(){let e=this.el.querySelector(`.as-count-badge`);if(e){let t=this.exporter.getTotalCount();e.textContent=String(t.total)}}updateModeToggle(){let e=this.store.getState().mode===`feedback`;this.modeToggleBtn.classList.toggle(`as-mode-toggle--active`,e),this.modeToggleBtn.setAttribute(`aria-pressed`,String(e)),this.modeToggleBtn.setAttribute(`aria-label`,e?`Disable annotation mode`:`Enable annotation mode`)}updateCardSelection(e){let t=this.el.querySelectorAll(`.as-card`);for(let n of t){let t=n.dataset.annotationId;n.classList.toggle(`as-card--selected`,t!==void 0&&t===e)}}},
|
|
3781
|
+
`,t.addEventListener(`click`,()=>{this.store.select(e.id);let n=t.querySelector(`.as-card-comment-detail`);if(n){n.classList.toggle(`as-card-comment-detail--open`);let e=this.listEl.querySelectorAll(`.as-card-comment-detail--open`);for(let t of e)t!==n&&t.classList.remove(`as-card-comment-detail--open`)}}),t.querySelector(`.as-delete-btn`).addEventListener(`click`,t=>{t.stopPropagation(),this.handleDelete(e.id)}),t}handleDelete(e){this.store.remove(e)}updateVisibility(){let e=this.store.getState();this.el.style.display=e.isSidebarOpen?`flex`:`none`}updateHeader(){let e=this.el.querySelector(`.as-count-badge`);if(e){let t=this.exporter.getTotalCount();e.textContent=String(t.total)}}updateModeToggle(){let e=this.store.getState().mode===`feedback`;this.modeToggleBtn.classList.toggle(`as-mode-toggle--active`,e),this.modeToggleBtn.setAttribute(`aria-pressed`,String(e)),this.modeToggleBtn.setAttribute(`aria-label`,e?`Disable annotation mode`:`Enable annotation mode`)}updateCardSelection(e){let t=this.el.querySelectorAll(`.as-card`);for(let n of t){let t=n.dataset.annotationId;n.classList.toggle(`as-card--selected`,t!==void 0&&t===e)}}},xw=class{annotations=[];selectedId=null;mode=`selection`;isSidebarOpen=!1;subscribers=new Set;idCounter=0;subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}notify(e){for(let t of this.subscribers)t(e)}generateId(){return this.idCounter+=1,`ann-${this.idCounter}`}openSidebar(){this.isSidebarOpen=!0,this.notify({type:`sidebar-toggled`,open:!0})}add(e,t,n,r,i,a,o,s,c){let l={id:this.generateId(),type:e,blockId:t,startOffset:n,endOffset:r,originalText:i,comment:a,section:o,contextBefore:s,contextAfter:c,createdAt:Date.now()};return this.annotations.push(l),this.annotations.length===1&&(this.isSidebarOpen=!0,this.notify({type:`sidebar-toggled`,open:!0})),this.notify({type:`annotation-added`,annotation:l}),l}update(e,t){let n=this.annotations.find(t=>t.id===e);n&&(Object.assign(n,t),this.notify({type:`annotation-updated`,id:e,changes:t}))}remove(e){let t=this.annotations.findIndex(t=>t.id===e);t!==-1&&(this.annotations.splice(t,1),this.notify({type:`annotation-removed`,id:e}))}select(e){this.selectedId=e,this.notify({type:`selection-changed`,id:e})}setMode(e){e!==this.mode&&(this.mode=e,this.notify({type:`mode-changed`,mode:e}))}toggleSidebar(e){this.isSidebarOpen=e===void 0?!this.isSidebarOpen:e,this.notify({type:`sidebar-toggled`,open:this.isSidebarOpen})}getState(){return{annotations:[...this.annotations],selectedId:this.selectedId,mode:this.mode,isSidebarOpen:this.isSidebarOpen}}destroy(){this.subscribers.clear(),this.annotations=[],this.selectedId=null,this.mode=`selection`,this.isSidebarOpen=!1,this.idCounter=0}},Sw=25,Cw=`aikit-annotation-guide`,ww=`
|
|
2965
3782
|
.as-guide {
|
|
2966
3783
|
margin: 0 0 var(--dt-space-3) 0;
|
|
2967
3784
|
padding: var(--dt-space-2) var(--dt-space-3);
|
|
@@ -2978,7 +3795,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
2978
3795
|
.as-guide--visible {
|
|
2979
3796
|
display: block;
|
|
2980
3797
|
}
|
|
2981
|
-
`;function
|
|
3798
|
+
`;function Tw(e){let{range:t}=e,n,r=t.startContainer;for(;r;){if(r instanceof HTMLElement&&r.tagName.toLowerCase().match(/^h[1-6]$/)){n=r.textContent?.trim()||void 0;break}r=r.parentNode}let i,a;try{if(t.startContainer.nodeType===Node.TEXT_NODE&&t.startOffset>0){let e=t.startContainer.textContent||``,n=Math.max(0,t.startOffset-Sw);i=e.slice(n,t.startOffset)}if(t.endContainer.nodeType===Node.TEXT_NODE&&t.endOffset<(t.endContainer.textContent?.length||0)){let e=t.endContainer.textContent||``,n=Math.min(e.length,t.endOffset+Sw);a=e.slice(t.endOffset,n)}}catch{}return{section:n,contextBefore:i,contextAfter:a}}function Ew(e){let{container:t,mountTarget:n}=e,r=null,i=new xw;i.setMode(`feedback`);let a=new dw(i);aw(Cw,ww);let o=document.createElement(`div`);o.className=`as-guide`,o.textContent=`➳ Ready. Select text to annotate or disable Feedback in the sidebar.`,t.prepend(o);let s=()=>{let e=i.getState();o.classList.toggle(`as-guide--visible`,e.mode===`feedback`&&e.annotations.length===0)};s(),i.subscribe(()=>s());let c=new mw(t,i);c.start();let l=new gw({container:t,mode:()=>i.getState().mode,onSelection:e=>{let t=Tw(e);r?.destroy();let n=new uw(e,{onSubmit:(e,a)=>{i.add(`COMMENT`,e.blockId,e.startOffset,e.endOffset,e.text,a||void 0,t.section,t.contextBefore,t.contextAfter),n.destroy(),r===n&&(r=null)},onRemove:(e,a)=>{i.add(`DELETION`,e.blockId,e.startOffset,e.endOffset,e.text,a||void 0,t.section,t.contextBefore,t.contextAfter),n.destroy(),r===n&&(r=null)},onDismiss:()=>{n.destroy(),r===n&&(r=null)}});r=n}}),u=new bw({store:i,exporter:a,mountTarget:n});return i.openSidebar(),{destroy(){r?.destroy(),r=null,o.remove(),l.destroy(),c.stop(),u.destroy(),i.destroy()},getStore(){return i},getExporter(){return a}}}var Dw=3e3,Ow=2e3;function kw(e){let t=e.querySelector(`.bk-action-feedback`);t&&(t.style.display=`block`,t.setAttribute(`data-feedback-state`,`sent`),setTimeout(()=>{t.style.display=`none`},Dw));let n=e.querySelectorAll(`button.bk-action`);for(let e of n)e.disabled=!0;setTimeout(()=>{for(let e of n)e.disabled=!1},Ow)}function Aw(e,t){let n=[],r=new WeakSet;for(let i of Array.from(e.querySelectorAll(`.bk-text-submit`))){let a=i.getAttribute(`data-action-id`);if(!a)continue;r.add(i);let o=i.querySelector(`.bk-input`),s=i.querySelector(`.bk-action--primary`);if(!o||!s)continue;r.add(o),r.add(s);let c=()=>{t(a,o.value),kw(e)};s.addEventListener(`click`,c),n.push(()=>s.removeEventListener(`click`,c))}for(let i of Array.from(e.querySelectorAll(`.bk-form`))){let a=i.getAttribute(`data-action-id`);if(!a)continue;r.add(i);for(let e of i.querySelectorAll(`[data-action-id]`))r.add(e);let o=n=>{n.preventDefault();let r=new FormData(i),o={};r.forEach((e,t)=>{o[t]=String(e)}),t(a,JSON.stringify(o)),kw(e)};i.addEventListener(`submit`,o),n.push(()=>i.removeEventListener(`submit`,o))}for(let i of Array.from(e.querySelectorAll(`[data-action-id]`))){if(r.has(i))continue;let a=i.getAttribute(`data-action-id`);if(!a)continue;if(i.tagName===`SELECT`){let r=i,o=()=>{t(a,r.value),kw(e)};r.addEventListener(`change`,o),n.push(()=>r.removeEventListener(`change`,o));continue}let o=()=>{t(a),kw(e)};i.addEventListener(`click`,o),n.push(()=>i.removeEventListener(`click`,o))}return()=>{for(let e of n)e()}}var jw=`
|
|
2982
3799
|
.bk-checklist-progress {
|
|
2983
3800
|
margin-bottom: var(--dt-space-3);
|
|
2984
3801
|
color: var(--dt-text-secondary);
|
|
@@ -2992,9 +3809,43 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
2992
3809
|
margin: 0;
|
|
2993
3810
|
accent-color: var(--dt-accent-fg);
|
|
2994
3811
|
}
|
|
2995
|
-
`;function
|
|
2996
|
-
`)}function
|
|
2997
|
-
|
|
3812
|
+
`;function Mw(e){let t=e.createElement(`style`);return t.textContent=jw,t}function Nw(e,t){let n=t.filter(e=>e.getAttribute(`data-checked`)===`true`).length,r=t.length;return e.textContent=`${n}/${r} complete`,{complete:n,total:r}}function Pw(e,t={}){let n=Array.from(e.querySelectorAll(`.bk-checklist-item`));if(n.length===0)return()=>{};let r=e.ownerDocument,i=Mw(r),a=r.createElement(`div`);a.className=`bk-checklist-progress`,e.parentElement?.insertBefore(a,e),r.head?.appendChild(i);let o=[];for(let[e,i]of n.entries()){let s=i.querySelector(`.bk-checklist-icon`),c=i.querySelector(`.bk-checklist-label`)?.textContent?.trim()??``,l=r.createElement(`input`);l.type=`checkbox`,l.className=`bk-checklist-box`,l.checked=i.getAttribute(`data-checked`)===`true`;let u=()=>{i.setAttribute(`data-checked`,String(l.checked));let r=Nw(a,n);t.onAction?.(`checklist`,JSON.stringify({index:e,label:c,checked:l.checked,complete:r.complete,total:r.total}))};l.addEventListener(`change`,u),o.push(()=>{l.removeEventListener(`change`,u)}),s?s.replaceWith(l):i.insertBefore(l,i.firstChild)}return Nw(a,n),()=>{for(let e of o)e();a.remove(),i.remove();for(let e of n){let t=e.querySelector(`.bk-checklist-box`);if(!t)continue;let n=r.createElement(`span`);n.className=`bk-checklist-icon`,n.textContent=e.getAttribute(`data-checked`)===`true`?`✓`:`×`,t.replaceWith(n)}}}var Fw=`data-sort-label`,Iw=`data-sort-dir`,Lw=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`});function Rw(e){let t=e.getAttribute(Fw);if(t!==null)return t;let n=e.textContent?.trim()??``;return e.setAttribute(Fw,n),n}function zw(e,t,n){for(let[r,i]of e.entries())i.textContent=Rw(i),r===t?(i.setAttribute(Iw,n),i.append(` ${n===`asc`?`▲`:`▼`}`)):i.removeAttribute(Iw)}function Bw(e,t){return e.querySelectorAll(`td`)[t]?.textContent?.trim()??``}function Vw(e){let t=Array.from(e.querySelectorAll(`thead th`)),n=e.querySelector(`tbody`);if(!n||t.length===0)return()=>{};let r=Array.from(n.querySelectorAll(`tr`)),i=e.parentElement,a=null,o=`asc`,s=``,c=null,l=[],u=()=>{let e=[...r];if(a!==null){let t=a;e.sort((e,n)=>{let r=Lw.compare(Bw(e,t),Bw(n,t));return o===`asc`?r:-r})}for(let t of e){n.appendChild(t);let e=t.textContent?.toLowerCase()??``;t.hidden=s.length>0&&!e.includes(s)}zw(t,a,o)};for(let[e,n]of t.entries()){Rw(n);let t=()=>{a===e?o=o===`asc`?`desc`:`asc`:(a=e,o=`asc`),u()};n.style.cursor=`pointer`,n.addEventListener(`click`,t),l.push(()=>{n.removeEventListener(`click`,t)})}if(r.length>5&&i){c=i.ownerDocument.createElement(`input`),c.className=`bk-table-filter`,c.placeholder=`Filter...`;let t=()=>{s=c?.value.toLowerCase().trim()??``,u()};i.insertBefore(c,e),c.addEventListener(`input`,t),l.push(()=>{c?.removeEventListener(`input`,t),c?.remove(),c=null})}return u(),()=>{for(let e of l)e();for(let e of t)e.textContent=Rw(e),e.removeAttribute(Iw),e.removeAttribute(Fw),e.style.removeProperty(`cursor`);for(let e of r)e.hidden=!1}}function Hw(e){for(let t of Array.from(e.children))if(t.tagName===`SUMMARY`)return t;return null}function Uw(e){let t=e.closest(`details`);if(!t)return null;let n=t.parentElement;for(;n;){if(n.tagName===`DETAILS`)return Hw(n);n=n.parentElement}return null}function Ww(e){return Array.from(e.querySelectorAll(`summary`))}function Gw(e){return e.open||e.hasAttribute(`open`)}function Kw(e,t){e.open=t,t?e.setAttribute(`open`,``):e.removeAttribute(`open`)}function qw(e,t){e.textContent=t.every(e=>Gw(e))?`Collapse all`:`Expand all`}function Jw(e){let t=Array.from(e.querySelectorAll(`details`));if(t.length===0)return()=>{};let n=e.ownerDocument.createElement(`button`);n.type=`button`,n.className=`bk-tree-toggle-all`,e.insertBefore(n,e.firstChild);let r=()=>{let e=t.some(e=>!Gw(e));for(let n of t)Kw(n,e);qw(n,t)},i=()=>{r()};n.addEventListener(`click`,i);let a=t.map(e=>{let r=()=>{qw(n,t)};return e.addEventListener(`toggle`,r),()=>{e.removeEventListener(`toggle`,r)}}),o=Ww(e).map(t=>{t.tabIndex=0;let n=n=>{let r=Ww(e),i=r.indexOf(t);if(i===-1)return;let a=t.closest(`details`);if(n.key===`ArrowDown`){r[i+1]?.focus(),n.preventDefault();return}if(n.key===`ArrowUp`){r[i-1]?.focus(),n.preventDefault();return}if(n.key===`ArrowRight`){if(a&&!Gw(a))Kw(a,!0);else{let e=r[i+1];e&&a?.contains(e)&&e.focus()}n.preventDefault();return}n.key===`ArrowLeft`&&(a&&Gw(a)?Kw(a,!1):Uw(t)?.focus(),n.preventDefault())};return t.addEventListener(`keydown`,n),()=>{t.removeEventListener(`keydown`,n)}});return qw(n,t),()=>{n.removeEventListener(`click`,i);for(let e of a)e();for(let e of o)e();n.remove()}}var Yw=`data-hydrated`;function Xw(e,t){let n=[];return e.matches(t)&&n.push(e),n.push(...Array.from(e.querySelectorAll(t))),n}function Zw(e,t,n){e.push(()=>{n(),t.removeAttribute(Yw)})}function Qw(e={}){let t=e.container??document.body,n=[];for(let e of Xw(t,`.bk-table`))e.hasAttribute(Yw)||(e.setAttribute(Yw,``),Zw(n,e,Vw(e)));for(let e of Xw(t,`.bk-tree`))e.hasAttribute(Yw)||(e.setAttribute(Yw,``),Zw(n,e,Jw(e)));for(let r of Xw(t,`.bk-checklist`))r.hasAttribute(Yw)||(r.setAttribute(Yw,``),Zw(n,r,Pw(r,e)));for(let r of Xw(t,`.bk-actions`))if(!r.hasAttribute(Yw)){if(r.setAttribute(Yw,``),e.onAction){Zw(n,r,Aw(r,e.onAction));continue}n.push(()=>{r.removeAttribute(Yw)})}return()=>{for(let e of n)e();n.length=0}}var $w=`bk-styles`,eT=new Set;function tT(e){for(let t of e.css)t.trim().length>0&&eT.add(t);return[...eT].join(`
|
|
3813
|
+
`)}function nT(e){return ta(e,{transport:`browser`})}function rT(e,t=document){let n=tT(e),r=t.getElementById($w);r||(r=t.createElement(`style`),r.id=$w,t.head.appendChild(r)),r.textContent=n}function iT(e,t){let n=nT(t);return rT(n,e.ownerDocument),e.innerHTML=n.html,n}function aT(e,t,n){return iT(e,{schemaVersion:1,title:`AI Kit Present`,blocks:t}),Qw({container:e,onAction:n})}var oT=`
|
|
3814
|
+
.action-bar {
|
|
3815
|
+
flex-shrink: 0;
|
|
3816
|
+
position: sticky;
|
|
3817
|
+
bottom: 0;
|
|
3818
|
+
display: flex;
|
|
3819
|
+
flex-wrap: nowrap;
|
|
3820
|
+
align-items: center;
|
|
3821
|
+
gap: var(--dt-space-2);
|
|
3822
|
+
padding: var(--dt-space-3) var(--dt-space-4);
|
|
3823
|
+
border-top: 1px solid var(--dt-border-default);
|
|
3824
|
+
background: color-mix(in srgb, var(--dt-bg-primary, #0c0c0c) 92%, transparent);
|
|
3825
|
+
backdrop-filter: blur(12px);
|
|
3826
|
+
-webkit-backdrop-filter: blur(12px);
|
|
3827
|
+
z-index: 10;
|
|
3828
|
+
overflow-x: auto;
|
|
3829
|
+
}
|
|
3830
|
+
.action-bar:empty {
|
|
3831
|
+
display: none;
|
|
3832
|
+
}
|
|
3833
|
+
/* Compact controls — single-row inline layout */
|
|
3834
|
+
.action-bar .bk-action,
|
|
3835
|
+
.action-bar .bk-select {
|
|
3836
|
+
font-size: var(--dt-font-size-sm);
|
|
3837
|
+
min-height: 2rem;
|
|
3838
|
+
flex-shrink: 0;
|
|
3839
|
+
}
|
|
3840
|
+
.action-bar .bk-select {
|
|
3841
|
+
max-width: 10rem;
|
|
3842
|
+
padding: 0 0.5rem;
|
|
3843
|
+
}
|
|
3844
|
+
.action-bar .bk-multi-select {
|
|
3845
|
+
max-width: 10rem;
|
|
3846
|
+
}
|
|
3847
|
+
`;function sT(e){return function(t,n){let r=n??t.label;if(!e){fetch(`/callback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({actionId:t.id,value:r})});return}e.updateModelContext({content:[{type:`text`,text:`Latest UI action: ${t.label}${n?` → ${n}`:``}`}],structuredContent:{actionId:t.id,actionType:t.type,label:t.label,value:r,timestamp:new Date().toISOString()}}),e.sendMessage({role:`user`,content:[{type:`text`,text:`User selected: ${t.label}${n?` → ${n}`:``}`}]})}}function cT(e){return typeof e==`object`&&!!e}function lT(e,t){let n=e.id.split(`@`)[0];return n===`timeline`&&cT(t)&&Array.isArray(t.events)?t.events:n===`tree`&&Array.isArray(t)?{root:{label:`Root`,children:t}}:t}function uT(e,t,n){let r=Xi.get(e);if(!r?.supportedTransports.includes(`browser`))return null;let i=lT(r,t);return{blocks:r.blocksFromData(i,{colorScheme:n.colorScheme,transport:`browser`,lang:n.lang,dir:n.dir}),actions:r.actionsFromData?.(i)??[]}}var dT=`present-data`;function fT(e=document,t=dT){let n=e.getElementById(t);return n?.textContent?JSON.parse(n.textContent):null}function pT(e){return e?{callTool:(t,n)=>e.callServerTool({name:t,arguments:n}),sendMessage:async t=>{await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})},updateContext:async t=>{await e.updateModelContext({content:[{type:`text`,text:t}]})}}:{callTool:async()=>{throw Error(`callTool is not available in browser mode`)},sendMessage:async()=>{},updateContext:async()=>{}}}var mT=class{app;currentMode=`inline`;availableModes=[];toolbar=null;constructor(e){this.app=e}apply(e){e.displayMode&&(this.currentMode=e.displayMode),e.availableDisplayModes&&(this.availableModes=e.availableDisplayModes),this.updateToolbar()}async requestMode(e){try{let t=await this.app.requestDisplayMode({mode:e});return this.currentMode=t.mode,document.documentElement.dataset.display=t.mode,this.updateToolbar(),t.mode}catch{return this.currentMode}}updateToolbar(){if(this.availableModes.length<=1){this.toolbar?.remove(),this.toolbar=null;return}this.toolbar||=this.createToolbar(),this.renderButtons()}createToolbar(){let e=document.createElement(`div`);return e.className=`display-mode-toolbar`,document.body.appendChild(e),e}renderButtons(){if(!this.toolbar)return;this.toolbar.innerHTML=``;let e={inline:`▣`,fullscreen:`⛶`,pip:`◱`};for(let t of this.availableModes){let n=document.createElement(`button`);n.className=`dm-btn${t===this.currentMode?` dm-active`:``}`,n.textContent=e[t]??t,n.title=t,n.addEventListener(`click`,()=>this.requestMode(t)),this.toolbar.appendChild(n)}}},hT=new Set;function gT(e,t){if(hT.has(e))return;hT.add(e);let n=document.createElement(`style`);n.textContent=t,document.head.appendChild(n)}function Q(e,t,n){let r=document.createElement(e);return t&&(r.className=t),n&&(r.textContent=n),r}function _T(e){return e==null?`null`:Array.isArray(e)?`[${e.map(_T).join(`, `)}]`:String(e)}function vT(e){return typeof e==`object`&&!!e&&`type`in e}var yT=[[400,`compact`],[800,`comfortable`]],bT=class{root;displayMode=`inline`;sizeClass=`comfortable`;constructor(e){this.root=e??document.documentElement}apply(e){this.applyDisplayMode(e),this.applyContainerDimensions(e),this.applySafeArea(e),this.applyPlatform(e),this.applyDeviceCapabilities(e)}getDisplayMode(){return this.displayMode}getSize(){return this.sizeClass}applyDisplayMode(e){e.displayMode&&(this.displayMode=e.displayMode,this.root.dataset.display=e.displayMode)}applyContainerDimensions(e){let t=e.containerDimensions;if(!t)return;let n=this.root.style,r=`width`in t?t.width:`maxWidth`in t?t.maxWidth:void 0,i=`height`in t?t.height:`maxHeight`in t?t.maxHeight:void 0;r!==void 0&&(n.setProperty(`--aikit-container-w`,`${r}px`),this.sizeClass=this.deriveSizeClass(r),this.root.dataset.size=this.sizeClass,n.setProperty(`--aikit-content-max-width`,this.deriveMaxWidth(r)),n.setProperty(`--aikit-body-pad-x`,this.derivePadX()),n.setProperty(`--aikit-grid-cols`,this.deriveGridCols()),n.setProperty(`--aikit-card-min`,this.deriveCardMin()),n.setProperty(`--aikit-metric-min`,this.deriveMetricMin())),i!==void 0&&(n.setProperty(`--aikit-container-h`,`${i}px`),n.setProperty(`--aikit-body-pad-y`,this.derivePadY()))}applySafeArea(e){let t=e.safeAreaInsets;if(!t)return;let n=this.root.style;n.setProperty(`--aikit-safe-top`,`${t.top}px`),n.setProperty(`--aikit-safe-right`,`${t.right}px`),n.setProperty(`--aikit-safe-bottom`,`${t.bottom}px`),n.setProperty(`--aikit-safe-left`,`${t.left}px`)}applyPlatform(e){e.platform&&(this.root.dataset.platform=e.platform)}applyDeviceCapabilities(e){let t=e.deviceCapabilities;t&&(t.touch!==void 0&&(this.root.dataset.touch=String(t.touch)),t.hover!==void 0&&(this.root.dataset.hover=String(t.hover)))}deriveSizeClass(e){for(let[t,n]of yT)if(e<t)return n;return`full`}deriveMaxWidth(e){return this.displayMode===`pip`?`100%`:this.displayMode===`fullscreen`?`none`:e<960?`100%`:`900px`}derivePadX(){return this.sizeClass===`compact`?`8px`:`16px`}derivePadY(){return this.sizeClass===`compact`?`8px`:`16px`}deriveGridCols(){switch(this.sizeClass){case`compact`:return`1`;case`comfortable`:return`2`;case`full`:return`3`}}deriveCardMin(){return this.sizeClass===`compact`?`100%`:`250px`}deriveMetricMin(){return this.sizeClass===`compact`?`100px`:`150px`}},xT=`AI Kit Present`;function ST(e){return e.schemaVersion===1}function CT(e){if(!Array.isArray(e)&&typeof e==`object`&&e){let t=e;if(Array.isArray(t.blocks)&&t.blocks.length>0)return t.blocks}return e}function wT(e){if(Array.isArray(e))return e.length===0?[{type:`markdown`,value:`*Empty array*`}]:vT(e[0])?e.filter(vT):typeof e[0]==`object`&&e[0]!==null?[{type:`table`,value:e}]:[{type:`markdown`,value:e.map(e=>`- ${String(e)}`).join(`
|
|
3848
|
+
`)}];if(typeof e==`string`)return[{type:`markdown`,value:e}];if(typeof e==`object`&&e){let t=e;return Array.isArray(t.nodes)&&Array.isArray(t.edges)?[{type:`graph`,value:t}]:Array.isArray(t.metrics)?[{type:`metrics`,value:t.metrics}]:[{type:`json`,value:t}]}return[{type:`text`,value:String(e??``)}]}function TT(e){return{...e,options:e.options?.map(e=>typeof e==`string`?{label:e,value:e}:e)}}function ET(e){if(ST(e)){let t=e.data??e.content??e.blocks;return{schemaVersion:1,title:e.title??xT,description:e.description,template:e.template,data:t,blocks:e.blocks??wT(t),actions:e.actions?.map(TT),colorScheme:e.colorScheme,lang:e.lang,dir:e.dir}}let t=CT(e.content);return{schemaVersion:1,title:e.title??xT,template:e.template,data:t,blocks:wT(t),actions:e.actions?.map(TT)}}var DT=class{templates=new Map;register(e){this.templates.set(e.name,e)}get(e){return this.templates.get(e)}detect(e){let t,n=0;for(let r of this.templates.values()){let i=r.detect(e);i>n&&(n=i,t=r)}return n>0?t:void 0}getAll(){return[...this.templates.values()]}},OT={"--color-background-primary":`--aikit-bg`,"--color-background-secondary":`--aikit-surface`,"--color-background-tertiary":`--aikit-surface2`,"--color-text-primary":`--aikit-text`,"--color-text-secondary":`--aikit-muted`,"--color-border-primary":`--aikit-border`,"--color-ring-primary":`--aikit-accent`,"--color-text-success":`--aikit-success`,"--color-text-danger":`--aikit-error`,"--color-text-warning":`--aikit-warning`,"--color-text-info":`--aikit-info`,"--font-sans":`--aikit-font-sans`,"--font-mono":`--aikit-font-mono`,"--border-radius-md":`--aikit-radius`,"--shadow-sm":`--aikit-shadow`},kT={"--aikit-bg":`--bg`,"--aikit-text":`--fg`,"--aikit-surface":`--surface`,"--aikit-border":`--border`,"--aikit-accent":`--accent`,"--aikit-success":`--success`,"--aikit-warning":`--warning`,"--aikit-error":`--error`,"--aikit-font-sans":`--font-sans`,"--aikit-font-mono":`--font-mono`,"--aikit-radius":`--radius`,"--aikit-shadow":`--shadow`},AT=`aikit-design-token-bridge`,jT={light:{"--bg":`#f8f9fa`,"--fg":`#111111`,"--surface":`#f1f3f5`,"--border":`#e5e7eb`,"--accent":`#147d74`,"--accent-light":`#49a897`,"--success":`#10b981`,"--warning":`#f59e0b`,"--error":`#ef4444`,"--code-bg":`#f1f3f5`,"--code-fg":`#111111`,"--radius":`8px`,"--shadow":`0 1px 2px rgba(0,0,0,0.06)`,"--font-sans":`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif`,"--font-mono":`'JetBrains Mono', 'Geist Mono', 'Fira Code', 'SF Mono', Consolas, monospace`,"--aikit-bg":`#f8f9fa`,"--aikit-surface":`#f1f3f5`,"--aikit-surface2":`#ffffff`,"--aikit-text":`#111111`,"--aikit-muted":`#4b5563`,"--aikit-border":`#e5e7eb`,"--aikit-accent":`#147d74`,"--aikit-accent-light":`#49a897`,"--aikit-success":`#10b981`,"--aikit-warning":`#f59e0b`,"--aikit-error":`#ef4444`,"--aikit-info":`#3b82f6`,"--aikit-code-bg":`#f1f3f5`,"--aikit-code-fg":`#111111`,"--aikit-font-sans":`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif`,"--aikit-font-mono":`'JetBrains Mono', 'Geist Mono', 'Fira Code', 'SF Mono', Consolas, monospace`,"--aikit-radius":`8px`,"--aikit-shadow":`0 1px 3px rgba(0,0,0,0.06)`,"--aikit-hover-bg":`color-mix(in srgb, #147d74 10%, transparent)`},dark:{"--bg":`#0c0c0c`,"--fg":`#ffffff`,"--surface":`#161616`,"--border":`#24282d`,"--accent":`#5db8a6`,"--accent-light":`#8bdbc9`,"--success":`#10b981`,"--warning":`#f59e0b`,"--error":`#ef4444`,"--code-bg":`#101010`,"--code-fg":`#f3f4f6`,"--radius":`8px`,"--shadow":`0 1px 3px rgba(0,0,0,0.35)`,"--font-sans":`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif`,"--font-mono":`'JetBrains Mono', 'Geist Mono', 'Fira Code', 'SF Mono', Consolas, monospace`,"--aikit-bg":`#0c0c0c`,"--aikit-surface":`#161616`,"--aikit-surface2":`#232323`,"--aikit-text":`#ffffff`,"--aikit-muted":`#a0a4ab`,"--aikit-border":`#24282d`,"--aikit-accent":`#5db8a6`,"--aikit-accent-light":`#8bdbc9`,"--aikit-success":`#10b981`,"--aikit-warning":`#f59e0b`,"--aikit-error":`#ef4444`,"--aikit-info":`#60a5fa`,"--aikit-code-bg":`#101010`,"--aikit-code-fg":`#f3f4f6`,"--aikit-font-sans":`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif`,"--aikit-font-mono":`'JetBrains Mono', 'Geist Mono', 'Fira Code', 'SF Mono', Consolas, monospace`,"--aikit-radius":`8px`,"--aikit-shadow":`0 1px 3px rgba(0,0,0,0.35)`,"--aikit-hover-bg":`color-mix(in srgb, #5db8a6 10%, transparent)`}},MT={"--chart-1":`#79c0ff`,"--chart-2":`#38bdf8`,"--chart-3":`#34d399`,"--chart-4":`#fbbf24`,"--chart-5":`#f87171`,"--chart-6":`#a78bfa`,"--chart-7":`#f472b6`,"--chart-8":`#2dd4bf`,"--chart-9":`#fb923c`,"--chart-10":`#22d3ee`,"--chart-11":`#c084fc`,"--chart-12":`#a3e635`,"--chart-others":`#a8a29e`},NT=`
|
|
2998
3849
|
:root {
|
|
2999
3850
|
--dt-bg-primary: var(--aikit-bg, #0c0c0c);
|
|
3000
3851
|
--dt-bg-secondary: var(--aikit-surface, #161616);
|
|
@@ -3075,7 +3926,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
3075
3926
|
[data-theme='light'] {
|
|
3076
3927
|
color-scheme: light;
|
|
3077
3928
|
}
|
|
3078
|
-
`,
|
|
3929
|
+
`,PT=class{root;constructor(e){this.root=e??document.documentElement,this.applyFallbackVariables(),this.ensureDesignTokenBridge()}apply(e){e.theme&&nw(e.theme),this.applyFallbackVariables(e.theme),e.styles?.variables&&(rw(e.styles.variables),this.mapTokens(e.styles.variables)),e.styles?.css?.fonts&&this.injectFonts(e.styles.css.fonts)}getTheme(){return tw()}resolveFallbackTheme(e){if(e)return e;let t=this.root.dataset.theme;return t===`light`||t===`dark`?t:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}applyFallbackVariables(e){let t=this.resolveFallbackTheme(e),n=this.root.style;for(let[e,r]of Object.entries(jT[t]))n.setProperty(e,r);for(let[e,t]of Object.entries(MT))n.setProperty(e,t);n.colorScheme=t}mapTokens(e){let t=this.root.style;for(let[n,r]of Object.entries(OT)){let i=e[n];if(i){t.setProperty(r,i);let e=kT[r];e&&t.setProperty(e,i)}}this.getTheme()===`dark`?(t.setProperty(`--code-bg`,e[`--color-background-tertiary`]??`#0f0f1a`),t.setProperty(`--code-fg`,`#cdd6f4`)):(t.setProperty(`--code-bg`,`#f0f0f5`),t.setProperty(`--code-fg`,`#1a1a2e`)),t.setProperty(`--aikit-code-bg`,t.getPropertyValue(`--code-bg`)),t.setProperty(`--aikit-code-fg`,t.getPropertyValue(`--code-fg`));let n=e[`--color-ring-primary`];n&&(t.setProperty(`--aikit-accent-light`,n),t.setProperty(`--accent-light`,n),t.setProperty(`--aikit-hover-bg`,`color-mix(in srgb, ${n} 10%, transparent)`))}injectFonts(e){let t=`aikit-host-fonts`;if(document.getElementById(t))return;let n=document.createElement(`style`);n.id=t,n.textContent=e,document.head.appendChild(n)}ensureDesignTokenBridge(){if(document.getElementById(AT))return;let e=document.createElement(`style`);e.id=AT,e.textContent=NT,document.head.appendChild(e)}},FT=`
|
|
3079
3930
|
.tpl-dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
|
|
3080
3931
|
.db-card { min-height: 136px; padding: 14px; border: 1px solid var(--aikit-border, #3c3c3c);
|
|
3081
3932
|
border-left-width: 4px; border-radius: var(--aikit-radius, 10px); background: var(--aikit-surface, #252526);
|
|
@@ -3101,7 +3952,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
3101
3952
|
.db-list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--aikit-text, #e5e7eb);
|
|
3102
3953
|
font: 500 13px var(--aikit-font-sans, Inter, sans-serif); }
|
|
3103
3954
|
.db-list-item span:last-child { color: var(--aikit-muted, #9ca3af); font-family: var(--aikit-font-mono, Consolas, monospace); }
|
|
3104
|
-
`,
|
|
3955
|
+
`,IT={name:`dashboard`,label:`Dashboard`,detect(e){if(typeof e!=`object`||!e||Array.isArray(e))return 0;let t=e,n=Array.isArray(t.metrics)?t.metrics[0]:void 0;return n&&typeof n.label==`string`&&`value`in n?.85:0},render(e,t,n){gT(`tpl-dashboard`,FT);let r=t,i=Q(`div`,`block tpl-dashboard`);for(let e of r.metrics){let t=Q(`article`,`db-card status-${e.status??`info`}`),n=Q(`div`,`db-header`);if(n.appendChild(Q(`div`,`db-label`,e.label)),e.trend){let t=e.trend.direction===`up`?`▲`:e.trend.direction===`down`?`▼`:`—`;n.appendChild(Q(`div`,`db-trend ${e.trend.direction}`,`${t} ${e.trend.value}`))}if(t.appendChild(n),t.appendChild(Q(`div`,`db-value`,_T(e.value))),e.type===`progress`){let n=Q(`div`,`db-progress-track`),r=Q(`div`,`db-progress-fill`);r.style.width=`${Math.max(0,Math.min(100,e.progress??0))}%`,n.appendChild(r),t.appendChild(n),t.appendChild(Q(`div`,`db-progress-meta`,`${Math.max(0,Math.min(100,e.progress??0))}% complete`))}if(e.type===`list`&&e.items?.length){let n=Q(`ul`,`db-list`);for(let t of e.items){let e=Q(`li`,`db-list-item`);e.appendChild(Q(`span`,``,t.label)),e.appendChild(Q(`span`,``,t.value)),n.appendChild(e)}t.appendChild(n)}i.appendChild(t)}e.appendChild(i)},styles(){return FT}},LT=`
|
|
3105
3956
|
.fg-breadcrumb { display: flex; align-items: center; gap: 4px; padding: 8px 0; flex-wrap: wrap; }
|
|
3106
3957
|
.fg-crumb { background: var(--aikit-surface, #252526); border: 1px solid var(--aikit-border, #3c3c3c);
|
|
3107
3958
|
color: var(--aikit-text, #ccc); padding: 3px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; }
|
|
@@ -3120,7 +3971,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
3120
3971
|
.fg-label-muted { opacity: 0.55; }
|
|
3121
3972
|
.fg-info { font-size: 12px; color: var(--aikit-muted, #858585); padding: 8px 0;
|
|
3122
3973
|
border-top: 1px solid var(--aikit-border, #3c3c3c); margin-top: 8px; }
|
|
3123
|
-
`;function
|
|
3974
|
+
`;function RT(e){return{name:String(e.name??``),total:typeof e.total==`number`?e.total:typeof e.value==`number`?e.value:0,self:typeof e.self==`number`?e.self:void 0,children:Array.isArray(e.children)?e.children.map(e=>RT(e)):void 0}}function zT(e){let t=[],n=[{node:e,depth:0}];for(;n.length>0;){let e=n.shift();if(!e)continue;let{node:r,depth:i}=e;if(t[i]||(t[i]=[]),t[i].push(r),r.children)for(let e of r.children)n.push({node:e,depth:i+1})}return t}var BT={name:`flame-graph`,label:`Flame Graph`,detect(e){if(typeof e!=`object`||!e||Array.isArray(e))return 0;let t=e.profile;return t&&typeof t==`object`&&t.children?.9:0},render(e,t,n){let r=t,i=Q(`div`,`block tpl-flame-graph`),a=RT(r.profile),o=a,s=[a],c=Q(`div`,`fg-breadcrumb`);i.appendChild(c);let l=Q(`div`,`fg-canvas`);i.appendChild(l);let u=Q(`div`,`fg-info`);i.appendChild(u);function d(){c.innerHTML=``;for(let e=0;e<s.length;e++){let t=s[e],n=document.createElement(`button`);n.className=`fg-crumb`,n.textContent=t.name,n.addEventListener(`click`,()=>{s.splice(e+1),o=t,d()}),c.appendChild(n),e<s.length-1&&c.appendChild(Q(`span`,`fg-sep`,`›`))}l.innerHTML=``;let e=zT(o);for(let t=0;t<e.length;t++){let n=Q(`div`,`fg-row`);f(n,e[t],t,o.total),l.appendChild(n)}u.textContent=`${o.name} — total: ${o.total}${o.self==null?``:`, self: ${o.self}`}`}function f(e,t,r,i){for(let a of t){let t=a.total/i*100,c=Q(`div`,`fg-bar`);c.style.width=`${Math.max(.5,t)}%`,c.style.background=p(r),c.title=`${a.name}: ${a.total}${a.self==null?``:` (self: ${a.self})`}`;let l=Q(`span`,`fg-bar-label`,`${a.name} (${a.total})`);t<10&&l.classList.add(`fg-label-muted`),c.appendChild(l),a.children?.length&&c.addEventListener(`click`,e=>{e.stopPropagation(),o=a,s.push(a),d(),n.emitAction({type:`button`,id:`zoom`,label:`Zoom`},JSON.stringify({name:a.name,total:a.total}))}),c.addEventListener(`mouseenter`,()=>{u.textContent=`${a.name} — total: ${a.total}${a.self==null?``:`, self: ${a.self}`}`}),e.appendChild(c)}}function p(e){let t=getComputedStyle(document.documentElement),n=[t.getPropertyValue(`--chart-5`).trim()||`#e24d28`,t.getPropertyValue(`--chart-9`).trim()||`#e8602a`,t.getPropertyValue(`--chart-4`).trim()||`#edad2a`,t.getPropertyValue(`--chart-1`).trim()||`#f5c842`,t.getPropertyValue(`--chart-3`).trim()||`#fce94f`,t.getPropertyValue(`--chart-6`).trim()||`#c4a000`,t.getPropertyValue(`--chart-7`).trim()||`#e07028`,t.getPropertyValue(`--chart-8`).trim()||`#d45500`];return n[e%n.length]}d(),gT(`tpl-flame-graph`,LT),e.appendChild(i)},styles(){return LT}},VT=`
|
|
3124
3975
|
.tpl-kanban { overflow-x: auto; }
|
|
3125
3976
|
.kbn-board { display: flex; gap: 14px; align-items: flex-start; min-width: min-content; padding-bottom: 4px; }
|
|
3126
3977
|
.kbn-column { width: 280px; flex: 0 0 280px; border: 1px solid var(--aikit-border, #3c3c3c); border-radius: var(--aikit-radius, 10px);
|
|
@@ -3146,7 +3997,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
3146
3997
|
.kbn-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
|
|
3147
3998
|
.kbn-tag { padding: 2px 8px; border-radius: 999px; background: var(--aikit-surface, #252526); color: var(--aikit-muted, #9ca3af);
|
|
3148
3999
|
font: 500 11px var(--aikit-font-sans, Inter, sans-serif); }
|
|
3149
|
-
`,
|
|
4000
|
+
`,HT={name:`kanban`,label:`Kanban`,detect(e){if(typeof e!=`object`||!e||Array.isArray(e))return 0;let t=e,n=Array.isArray(t.cards)?t.cards[0]:void 0;return Array.isArray(t.columns)&&Array.isArray(t.cards)&&typeof n?.column==`string`?.85:0},render(e,t,n){gT(`tpl-kanban`,VT);let r=t,i=r.cards.map(e=>({...e,tags:e.tags?[...e.tags]:void 0})),a=new Set,o=``,s=Q(`div`,`block tpl-kanban`),c=Q(`div`,`kbn-board`);s.appendChild(c);let l=()=>{c.innerHTML=``;for(let e of r.columns){let t=Q(`section`,`kbn-column`),r=Q(`div`,`kbn-column-header`),s=Q(`div`,`kbn-column-title`),u=Q(`span`,`kbn-column-swatch`);e.color&&(u.style.background=e.color),s.appendChild(u),s.appendChild(Q(`span`,``,e.label)),r.appendChild(s);let d=i.filter(t=>t.column===e.id);r.appendChild(Q(`span`,`kbn-column-count`,String(d.length))),t.appendChild(r);let f=Q(`div`,`kbn-cards`);t.addEventListener(`dragover`,e=>{e.preventDefault(),t.classList.add(`drop-target`)}),t.addEventListener(`dragleave`,()=>{t.classList.remove(`drop-target`)}),t.addEventListener(`drop`,r=>{if(r.preventDefault(),t.classList.remove(`drop-target`),!o)return;let a=i.find(e=>e.id===o);!a||a.column===e.id||(a.column=e.id,l(),n.emitAction({type:`button`,id:`move-card`,label:`Move Card`},JSON.stringify({id:a.id,column:e.id})))});for(let e of d){let t=Q(`article`,`kbn-card priority-${e.priority??`low`}`);if(t.draggable=!0,t.appendChild(Q(`div`,`kbn-card-title`,e.title)),e.description){let n=Q(`div`,`kbn-card-description`,e.description);n.hidden=!a.has(e.id),t.appendChild(n),t.addEventListener(`click`,()=>{a.has(e.id)?a.delete(e.id):a.add(e.id),n.hidden=!a.has(e.id)})}else t.addEventListener(`click`,()=>{a.has(e.id)?a.delete(e.id):a.add(e.id)});if(e.tags?.length){let n=Q(`div`,`kbn-tags`);for(let t of e.tags)n.appendChild(Q(`span`,`kbn-tag`,t));t.appendChild(n)}t.addEventListener(`dragstart`,()=>{o=e.id,t.classList.add(`dragging`)}),t.addEventListener(`dragend`,()=>{t.classList.remove(`dragging`),o=``}),f.appendChild(t)}t.appendChild(f),c.appendChild(t)}};l(),e.appendChild(s)},styles(){return VT}},UT=`
|
|
3150
4001
|
.sort-list { list-style: none; padding: 0; margin: 0; }
|
|
3151
4002
|
.sort-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin: 4px 0;
|
|
3152
4003
|
background: var(--aikit-surface, #252526); border: 1px solid var(--aikit-border, #3c3c3c);
|
|
@@ -3157,7 +4008,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
3157
4008
|
.drag-handle { font-size: 18px; color: var(--aikit-muted, #858585); cursor: grab; user-select: none; }
|
|
3158
4009
|
.sort-label { flex: 1; color: var(--aikit-text, #ccc); }
|
|
3159
4010
|
.sort-pos { font-size: 12px; color: var(--aikit-muted, #858585); font-variant-numeric: tabular-nums; }
|
|
3160
|
-
`,
|
|
4011
|
+
`,WT={name:`list-sort`,label:`Sortable List`,detect(e){if(typeof e!=`object`||!e||Array.isArray(e))return 0;let t=e;return t.items&&Array.isArray(t.items)&&!t.categories?.8:0},render(e,t,n){let r=t,i=Q(`div`,`block tpl-list-sort`);gT(`tpl-list-sort`,UT);function a(e){i.innerHTML=``;let t=Q(`ul`,`sort-list`),r=-1;for(let i=0;i<e.length;i++){let o=e[i],s=document.createElement(`li`);s.className=`sort-item`,s.draggable=!0,s.dataset.idx=String(i);let c=Q(`span`,`drag-handle`,`⠿`),l=Q(`span`,`sort-label`,o.label),u=Q(`span`,`sort-pos`,`#${i+1}`);s.appendChild(c),s.appendChild(l),s.appendChild(u),s.addEventListener(`dragstart`,()=>{r=Number(s.dataset.idx),s.classList.add(`dragging`)}),s.addEventListener(`dragend`,()=>{s.classList.remove(`dragging`)}),s.addEventListener(`dragenter`,e=>{e.preventDefault()}),s.addEventListener(`dragover`,e=>{e.preventDefault(),s.classList.add(`drag-over`)}),s.addEventListener(`dragleave`,()=>{s.classList.remove(`drag-over`)}),s.addEventListener(`drop`,t=>{t.preventDefault(),s.classList.remove(`drag-over`);let i=Number(s.dataset.idx);if(r>=0&&r!==i){let t=[...e],[o]=t.splice(r,1);t.splice(i,0,o),a(t),n.emitAction({type:`button`,id:`reorder`,label:`Reorder`},JSON.stringify(t.map(e=>e.id)))}}),t.appendChild(s)}i.appendChild(t)}a([...r.items??[]]),e.appendChild(i)},styles(){return UT}},GT=document.getElementById(`app`);if(!GT)throw Error(`Missing #app element`);var $=GT,KT=fT(),qT=KT?void 0:new iw({name:`AI Kit Present`,version:`1.0.0`}),JT=new DT;JT.register(WT),JT.register(BT),JT.register(IT),JT.register(HT);var YT=sT(qT),XT={app:qT,data:pT(qT),emitAction:YT},ZT=new PT,QT=new bT,$T=qT?new mT(qT):void 0,eE=null,tE=!!KT,nE,rE=null;gT(`aikit-shared-header`,vr),gT(`aikit-spa-shell`,`
|
|
3161
4012
|
body {
|
|
3162
4013
|
margin: 0;
|
|
3163
4014
|
display: flex;
|
|
@@ -3217,34 +4068,7 @@ body {
|
|
|
3217
4068
|
background: var(--dt-border-muted);
|
|
3218
4069
|
}
|
|
3219
4070
|
|
|
3220
|
-
.action-bar {
|
|
3221
|
-
flex-shrink: 0;
|
|
3222
|
-
position: sticky;
|
|
3223
|
-
bottom: 0;
|
|
3224
|
-
display: flex;
|
|
3225
|
-
flex-wrap: wrap;
|
|
3226
|
-
align-items: center;
|
|
3227
|
-
gap: var(--dt-space-2);
|
|
3228
|
-
padding: var(--dt-space-3) var(--dt-space-4);
|
|
3229
|
-
border-top: 1px solid var(--dt-border-default);
|
|
3230
|
-
background: color-mix(in srgb, var(--dt-bg-primary) 92%, transparent);
|
|
3231
|
-
backdrop-filter: blur(12px);
|
|
3232
|
-
}
|
|
3233
|
-
.action-bar:empty {
|
|
3234
|
-
display: none;
|
|
3235
|
-
}
|
|
3236
|
-
.action-bar .bk-actions {
|
|
3237
|
-
display: flex;
|
|
3238
|
-
flex-wrap: wrap;
|
|
3239
|
-
align-items: center;
|
|
3240
|
-
gap: var(--dt-space-2);
|
|
3241
|
-
margin: 0;
|
|
3242
|
-
padding: 0;
|
|
3243
|
-
border: none;
|
|
3244
|
-
background: none;
|
|
3245
|
-
}
|
|
3246
|
-
|
|
3247
|
-
`);var PT=`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>`,FT=`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>`,IT=Pi(),LT={kind:`shared-chrome-action`,id:`copy-image`,label:`Copy as Image`,icon:PT,onclick:`screenshotPage()`};function RT(){return typeof navigator<`u`&&typeof document<`u`&&!!navigator.clipboard?.write&&typeof window<`u`&&`ClipboardItem`in window}function zT(){return RT()?[LT]:[]}var BT=null,VT=!1;function HT(e,t={}){if(!BT)return;let{button:n,menu:r}=BT;r.hidden=!e,n.setAttribute(`aria-expanded`,String(e)),e&&t.focusItem?r.querySelector(`.${h.toolboxItem}`)?.focus():!e&&t.restoreFocus&&n.focus()}function UT(){VT||(VT=!0,document.addEventListener(`click`,e=>{if(!BT)return;let t=e.target;t instanceof Node&&BT.container.contains(t)||HT(!1)}),document.addEventListener(`keydown`,e=>{if(BT){if(e.key===`Escape`){HT(!1,{restoreFocus:!0});return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&e.target===BT.button&&(e.preventDefault(),HT(!0,{focusItem:!0}))}}))}function WT(e){if(UT(),e.length===0)return null;let t=Q(`div`,h.toolbox),n=Q(`button`,h.toolboxToggle),r=Q(`div`,h.toolboxMenu);n.type=`button`,n.setAttribute(`aria-label`,`Open tools menu`),n.setAttribute(`aria-haspopup`,`menu`),n.setAttribute(`aria-expanded`,`false`),n.setAttribute(`aria-controls`,`aikit-toolbox-menu`),n.innerHTML=FT,n.addEventListener(`click`,()=>{HT(!!r.hidden,{focusItem:!!r.hidden})}),r.id=`aikit-toolbox-menu`,r.setAttribute(`role`,`menu`),r.hidden=!0;for(let t of e){if(t.id!==`copy-image`)continue;let e=Q(`button`,h.toolboxItem);e.type=`button`,e.setAttribute(`role`,`menuitem`),e.setAttribute(`aria-label`,t.label),e.dataset.sharedChromeAction=t.id,e.innerHTML=`<span aria-hidden="true">${t.icon}</span><span>${t.label}</span>`,e.addEventListener(`click`,()=>{HT(!1),QT()}),r.appendChild(e)}return r.childElementCount===0?null:(t.appendChild(n),t.appendChild(r),BT={button:n,container:t,menu:r},t)}function GT(e,t){let n=Q(`header`,h.header);n.appendChild(Q(`div`,h.brand,`AI KIT`));let r=Q(`div`,h.title);r.appendChild(Q(`span`,h.titleText,e)),t&&r.appendChild(Q(`span`,h.subtitle,t));let i=Q(`div`,h.actions),a=WT(zT());a&&i.appendChild(a),n.appendChild(r),n.appendChild(i),$.appendChild(n)}function KT(){if(NT){let e=NT.getStore().getState().annotations.length;e>0&&console.warn(`[Annotation] ${e} annotation(s) discarded on view reset. Submit feedback before the view refreshes to preserve your work.`),NT.destroy()}NT=null,AT?.(),AT=null,uE?.destroy&&uE.destroy(),uE=null}function qT(e,t){let n=new Map,r=e=>{n.set(o(e.id),e)};for(let e of t??[])r(e);for(let t of e)if(!(t.type!==`actions`||!Array.isArray(t.value)))for(let e of t.value)e&&typeof e==`object`&&`id`in e&&r(e);return n}function JT(e,t,n){let r=qT(t,n);AT=Iw(e,t,(e,t)=>{let n=r.get(e)??{type:t===void 0?`button`:`select`,id:e,label:e};if(NT){let e=NT.getExporter().exportJSON(),r=JSON.parse(e);if(r.length>0){TT(n,t===void 0?e:JSON.stringify({value:t,annotations:r}));return}}TT(n,t)})}function YT(e,t,n){let r=document.documentElement.dir,i=Bw(e,t,{colorScheme:DT.getTheme(),lang:document.documentElement.lang||void 0,dir:r===`ltr`||r===`rtl`||r===`auto`?r:void 0});return i?{blocks:i.blocks,actions:n.actions}:null}var XT;function ZT(e){KT(),$.innerHTML=``;let t=nT(e);e.title&>(e.title,`Streaming`);let n=Q(`div`,`content`);JT(n,t.blocks??[]),$.appendChild(n)}async function QT(){let e;try{e=await oE()}catch(t){console.warn(`Copy as Image capture failed`,t);try{e=await iE()}catch(e){console.warn(`Document capture also failed`,e),cE(`Screenshot capture failed. Try using your browser's screenshot tool.`,`error`);return}}try{await tE(e),cE(IT.clipboardSuccessMessage)}catch(t){console.warn(`Async Clipboard image write failed`,t);try{await eE(e),cE(`Async clipboard write blocked. Copied via legacy clipboard path.`)}catch(t){console.warn(`Legacy clipboard image write failed`,t);try{await nE(e),cE(`Copied image to clipboard via server-side clipboard.`)}catch(t){console.warn(`Server clipboard write failed`,t);try{await rE(e),cE(`Clipboard blocked — downloading PNG instead.`)}catch(e){console.warn(`Copy as Image download fallback failed`,e),cE(IT.blockedClipboardMessage,`error`)}}}}}function $T(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result)),r.onerror=()=>n(r.error||Error(`Image conversion failed`)),r.readAsDataURL(e)})}async function eE(e){let t=await $T(e),n=!1,r=!1,i=i=>{let a=i.clipboardData;if(a){i.preventDefault();try{a.items&&typeof File<`u`&&(a.items.add(new File([e],`aikit-present.png`,{type:`image/png`})),r=!0,n=!0)}catch{}a.setData(`text/html`,`<img alt="AI Kit Present" src="${t}">`),r||a.setData(`text/plain`,t),n=!0}};document.addEventListener(`copy`,i,{once:!0});try{n=document.execCommand(`copy`)||n}finally{document.removeEventListener(`copy`,i)}if(!n)throw Error(`Legacy clipboard copy unavailable`)}async function tE(e){if(!navigator.clipboard?.write||!(`ClipboardItem`in window))throw Error(`Async image clipboard is unavailable in this host.`);await navigator.clipboard.write([new ClipboardItem({"image/png":e})])}async function nE(e){let t=await fetch(`/__aikit_system_clipboard`,{method:`POST`,body:e});if(!t.ok){let e=await t.text().catch(()=>`Unknown server error`);throw Error(`Server clipboard write failed: ${e}`)}}async function rE(e){let t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`aikit-present.png`,n.rel=`noopener`,document.body.appendChild(n);try{n.click()}finally{n.remove(),URL.revokeObjectURL(t)}}async function iE(){let e=Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth,document.body?document.body.scrollWidth:0),t=Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight,document.body?document.body.scrollHeight:0),n=window.devicePixelRatio||1,r=document.createElement(`canvas`);r.width=Math.max(1,Math.ceil(e*n)),r.height=Math.max(1,Math.ceil(t*n));let i=r.getContext(`2d`);if(!i)throw Error(`Canvas context unavailable`);i.scale(n,n);let a=document.documentElement.cloneNode(!0);if(!(a instanceof Element))throw Error(`Document clone failed`);a.setAttribute(`xmlns`,`http://www.w3.org/1999/xhtml`),a.querySelectorAll(`script`).forEach(e=>{e.remove()}),sE(document.documentElement,a);let o=[`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${t}" viewBox="0 0 ${e} ${t}">`,`<foreignObject width="100%" height="100%">${new XMLSerializer().serializeToString(a)}</foreignObject>`,`</svg>`].join(``),s=new Blob([o],{type:`image/svg+xml;charset=utf-8`}),c=URL.createObjectURL(s);try{await new Promise((n,r)=>{let a=new Image;a.onload=()=>{i.drawImage(a,0,0,e,t),n(void 0)},a.onerror=()=>r(Error(`ForeignObject render failed`)),a.src=c})}finally{URL.revokeObjectURL(c)}let l=await new Promise(e=>r.toBlob(e,`image/png`));if(l?.type!==`image/png`)throw Error(`PNG export failed`);return l}async function aE(){let e=await fetch(`/__aikit_screenshot.png`,{cache:`no-store`});if(!e.ok)throw Error(`Server PNG capture unavailable`);let t=await e.blob();if(t?.type!==`image/png`)throw Error(`Server PNG capture failed`);return t}async function oE(){try{return await aE()}catch{return iE()}}function sE(e,t){let n=window.getComputedStyle(e),r=Array.from(n).map(e=>`${e}:${n.getPropertyValue(e)}${n.getPropertyPriority(e)?` !important`:``};`).join(``);t.setAttribute(`style`,r);for(let n=0;n<e.children.length;n+=1){let r=e.children[n],i=t.children[n];r&&i&&sE(r,i)}}function cE(e,t=`info`){let n=$.querySelector(`.host-message`);n||(n=Q(`div`,`host-message`),$.prepend(n)),n.dataset.tone=t,n.replaceChildren(),n.appendChild(Q(`span`,``,e)),clearTimeout(MT),MT=setTimeout(()=>{n?.remove()},4e3)}function lE(){if(!jT)return;let e=window;e.toggleToolbox=()=>{if(BT){HT(!!BT.menu.hidden);return}let e=document.getElementById(`aikit-toolbox-menu`);e&&(e.hidden=!e.hidden)},e.screenshotPage||=QT}var uE=null;function dE(e,t){$.innerHTML=``;let n=Q(`div`,`error-panel`);n.appendChild(Q(`h3`,``,`⚠ ${e}`)),n.appendChild(Q(`pre`,``,t instanceof Error?t.message:String(t))),$.appendChild(n)}function fE(e){KT(),$.innerHTML=``;let t=nT(e),n=t.data;if(n==null){$.innerHTML=`<p class="no-data">No content data received.</p>`;return}e.title&&!jT&>(e.title);let r=t.template?wT.get(t.template):wT.detect(n),i=Q(`div`,`main-content`);if(r)uE=r,r.render(i,n,ET);else if(t.template){let r=YT(t.template,n,e);r?JT(i,r.blocks,r.actions):JT(i,t.blocks??[],e.actions)}else JT(i,t.blocks??[],e.actions);if(e.actions?.length&&!r&&!t.template){let t=i.querySelectorAll(`.bk-actions`),n=new Set;for(let e of t)for(let t of e.querySelectorAll(`[data-action-id]`))n.add(t.dataset.actionId??``);let r=e.actions.filter(e=>!n.has(o(e.id)));if(r.length>0){let t=Q(`div`,``),n=Iw(t,[{type:`actions`,value:r}],(t,n)=>{let r=e.actions?.find(e=>o(e.id)===t)??{type:n===void 0?`button`:`select`,id:t,label:t};if(NT){let e=NT.getExporter().exportJSON(),t=JSON.parse(e);if(t.length>0){TT(r,n===void 0?e:JSON.stringify({value:n,annotations:t}));return}}TT(r,n)}),a=AT;AT=()=>{a?.(),n()},i.appendChild(t)}}let a=Q(`div`,`main-layout`),s=Q(`div`,`content-column`);s.appendChild(i),a.appendChild(s),$.appendChild(a),NT=rw({container:i,mountTarget:a});{let e=NT.getStore();e.subscribe(e=>{e.type===`sidebar-toggled`&&(e.open?$.style.setProperty(`--aikit-content-max-width`,`none`):$.style.removeProperty(`--aikit-content-max-width`))}),e.getState().isSidebarOpen&&$.style.setProperty(`--aikit-content-max-width`,`none`)}{let e=i.querySelectorAll(`.bk-actions`);if(e.length>0){let t=Q(`div`,`action-bar`),n=!1;for(let r of e)if(!r.querySelector(`input[type="text"], input:not([type]), textarea`)){for(;r.firstChild;)t.appendChild(r.firstChild);r.remove(),n=!0}n&&(i.appendChild(t),i.style.paddingBottom=`0`)}}let c=document.createElement(`footer`);c.className=h.footer,c.innerHTML=`<div class="${h.footerMeta}"><span class="${h.footerText}">Generated by <span class="${h.footerBrand}">AI KIT</span></span></div>`,$.appendChild(c)}CT?(CT.connect().then(()=>{let e=CT.getHostContext();e&&(DT.apply(e),OT.apply(e),kT?.apply(e))}),CT.onhostcontextchanged=e=>{DT.apply(e),OT.apply(e),kT?.apply(e),uE?.onThemeChange&&uE.onThemeChange(DT.getTheme())},CT.ontoolinputpartial=e=>{let t=e.arguments;t&&($.dataset.streaming=`true`,clearTimeout(XT),XT=setTimeout(()=>{try{let e=t.content??t.data??t.blocks;if(e==null)return;ZT({schemaVersion:t.schemaVersion===1?1:void 0,title:t.title,template:t.template,content:e,data:t.data,blocks:Array.isArray(t.blocks)?t.blocks:void 0})}catch{}},80))},CT.ontoolinput=()=>{clearTimeout(XT),delete $.dataset.streaming},CT.ontoolresult=e=>{if(clearTimeout(XT),delete $.dataset.streaming,e.structuredContent)try{fE(e.structuredContent);return}catch(e){dE(`Render error`,e);return}let t=e.content?.find(e=>e.type===`text`)?.text;if(!t){$.innerHTML=`<p>No data received.</p>`;return}try{fE(JSON.parse(t))}catch{fE({content:t})}}):ST&&(document.documentElement.dataset.theme=`dark`,lE(),fE(ST));</script>
|
|
4071
|
+
`),gT(`aikit-action-bar`,oT);var iE=`<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>`,aE=`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/></svg>`,oE=ra(),sE={kind:`shared-chrome-action`,id:`copy-image`,label:`Copy as Image`,icon:iE,onclick:`screenshotPage()`};function cE(){return typeof navigator<`u`&&typeof document<`u`&&!!navigator.clipboard?.write&&typeof window<`u`&&`ClipboardItem`in window}function lE(){return cE()?[sE]:[]}var uE=null,dE=!1;function fE(e,t={}){if(!uE)return;let{button:n,menu:r}=uE;r.hidden=!e,n.setAttribute(`aria-expanded`,String(e)),e&&t.focusItem?r.querySelector(`.${h.toolboxItem}`)?.focus():!e&&t.restoreFocus&&n.focus()}function pE(){dE||(dE=!0,document.addEventListener(`click`,e=>{if(!uE)return;let t=e.target;t instanceof Node&&uE.container.contains(t)||fE(!1)}),document.addEventListener(`keydown`,e=>{if(uE){if(e.key===`Escape`){fE(!1,{restoreFocus:!0});return}(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&e.target===uE.button&&(e.preventDefault(),fE(!0,{focusItem:!0}))}}))}function mE(e){if(pE(),e.length===0)return null;let t=Q(`div`,h.toolbox),n=Q(`button`,h.toolboxToggle),r=Q(`div`,h.toolboxMenu);n.type=`button`,n.setAttribute(`aria-label`,`Open tools menu`),n.setAttribute(`aria-haspopup`,`menu`),n.setAttribute(`aria-expanded`,`false`),n.setAttribute(`aria-controls`,`aikit-toolbox-menu`),n.innerHTML=aE,n.addEventListener(`click`,()=>{fE(!!r.hidden,{focusItem:!!r.hidden})}),r.id=`aikit-toolbox-menu`,r.setAttribute(`role`,`menu`),r.hidden=!0;for(let t of e){if(t.id!==`copy-image`)continue;let e=Q(`button`,h.toolboxItem);e.type=`button`,e.setAttribute(`role`,`menuitem`),e.setAttribute(`aria-label`,t.label),e.dataset.sharedChromeAction=t.id,e.innerHTML=`<span aria-hidden="true">${t.icon}</span><span>${t.label}</span>`,e.addEventListener(`click`,()=>{fE(!1),SE()}),r.appendChild(e)}return r.childElementCount===0?null:(t.appendChild(n),t.appendChild(r),uE={button:n,container:t,menu:r},t)}function hE(e,t){let n=Q(`header`,h.header);n.appendChild(Q(`div`,h.brand,`AI KIT`));let r=Q(`div`,h.title);r.appendChild(Q(`span`,h.titleText,e)),t&&r.appendChild(Q(`span`,h.subtitle,t));let i=Q(`div`,h.actions),a=mE(lE());a&&i.appendChild(a),n.appendChild(r),n.appendChild(i),$.appendChild(n)}function gE(){if(rE){let e=rE.getStore().getState().annotations.length;e>0&&console.warn(`[Annotation] ${e} annotation(s) discarded on view reset. Submit feedback before the view refreshes to preserve your work.`),rE.destroy()}rE=null,eE?.(),eE=null,PE?.destroy&&PE.destroy(),PE=null}function _E(e,t){let n=new Map,r=e=>{n.set(o(e.id),e)};for(let e of t??[])r(e);for(let t of e)if(!(t.type!==`actions`||!Array.isArray(t.value)))for(let e of t.value)e&&typeof e==`object`&&`id`in e&&r(e);return n}function vE(e,t,n){let r=_E(t,n);eE=aT(e,t,(e,t)=>{let n=r.get(e)??{type:t===void 0?`button`:`select`,id:e,label:e};if(rE){let e=rE.getExporter().exportJSON(),r=JSON.parse(e);if(r.length>0){YT(n,t===void 0?e:JSON.stringify({value:t,annotations:r}));return}}YT(n,t)})}function yE(e,t,n){let r=document.documentElement.dir,i=uT(e,t,{colorScheme:ZT.getTheme(),lang:document.documentElement.lang||void 0,dir:r===`ltr`||r===`rtl`||r===`auto`?r:void 0});return i?{blocks:i.blocks,actions:n.actions}:null}var bE;function xE(e){gE(),$.innerHTML=``;let t=ET(e);e.title&&hE(e.title,`Streaming`);let n=Q(`div`,`content`);vE(n,t.blocks??[]),$.appendChild(n)}async function SE(){let e;try{e=await AE()}catch(t){console.warn(`Copy as Image capture failed`,t);try{e=await OE()}catch(e){console.warn(`Document capture also failed`,e),ME(`Screenshot capture failed. Try using your browser's screenshot tool.`,`error`);return}}try{await TE(e),ME(oE.clipboardSuccessMessage)}catch(t){console.warn(`Async Clipboard image write failed`,t);try{await wE(e),ME(`Async clipboard write blocked. Copied via legacy clipboard path.`)}catch(t){console.warn(`Legacy clipboard image write failed`,t);try{await EE(e),ME(`Copied image to clipboard via server-side clipboard.`)}catch(t){console.warn(`Server clipboard write failed`,t);try{await DE(e),ME(`Clipboard blocked — downloading PNG instead.`)}catch(e){console.warn(`Copy as Image download fallback failed`,e),ME(oE.blockedClipboardMessage,`error`)}}}}}function CE(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result)),r.onerror=()=>n(r.error||Error(`Image conversion failed`)),r.readAsDataURL(e)})}async function wE(e){let t=await CE(e),n=!1,r=!1,i=i=>{let a=i.clipboardData;if(a){i.preventDefault();try{a.items&&typeof File<`u`&&(a.items.add(new File([e],`aikit-present.png`,{type:`image/png`})),r=!0,n=!0)}catch{}a.setData(`text/html`,`<img alt="AI Kit Present" src="${t}">`),r||a.setData(`text/plain`,t),n=!0}};document.addEventListener(`copy`,i,{once:!0});try{n=document.execCommand(`copy`)||n}finally{document.removeEventListener(`copy`,i)}if(!n)throw Error(`Legacy clipboard copy unavailable`)}async function TE(e){if(!navigator.clipboard?.write||!(`ClipboardItem`in window))throw Error(`Async image clipboard is unavailable in this host.`);await navigator.clipboard.write([new ClipboardItem({"image/png":e})])}async function EE(e){let t=await fetch(`/__aikit_system_clipboard`,{method:`POST`,body:e});if(!t.ok){let e=await t.text().catch(()=>`Unknown server error`);throw Error(`Server clipboard write failed: ${e}`)}}async function DE(e){let t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`aikit-present.png`,n.rel=`noopener`,document.body.appendChild(n);try{n.click()}finally{n.remove(),URL.revokeObjectURL(t)}}async function OE(){let e=Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth,document.body?document.body.scrollWidth:0),t=Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight,document.body?document.body.scrollHeight:0),n=window.devicePixelRatio||1,r=document.createElement(`canvas`);r.width=Math.max(1,Math.ceil(e*n)),r.height=Math.max(1,Math.ceil(t*n));let i=r.getContext(`2d`);if(!i)throw Error(`Canvas context unavailable`);i.scale(n,n);let a=document.documentElement.cloneNode(!0);if(!(a instanceof Element))throw Error(`Document clone failed`);a.setAttribute(`xmlns`,`http://www.w3.org/1999/xhtml`),a.querySelectorAll(`script`).forEach(e=>{e.remove()}),jE(document.documentElement,a);let o=[`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${t}" viewBox="0 0 ${e} ${t}">`,`<foreignObject width="100%" height="100%">${new XMLSerializer().serializeToString(a)}</foreignObject>`,`</svg>`].join(``),s=new Blob([o],{type:`image/svg+xml;charset=utf-8`}),c=URL.createObjectURL(s);try{await new Promise((n,r)=>{let a=new Image;a.onload=()=>{i.drawImage(a,0,0,e,t),n(void 0)},a.onerror=()=>r(Error(`ForeignObject render failed`)),a.src=c})}finally{URL.revokeObjectURL(c)}let l=await new Promise(e=>r.toBlob(e,`image/png`));if(l?.type!==`image/png`)throw Error(`PNG export failed`);return l}async function kE(){let e=await fetch(`/__aikit_screenshot.png`,{cache:`no-store`});if(!e.ok)throw Error(`Server PNG capture unavailable`);let t=await e.blob();if(t?.type!==`image/png`)throw Error(`Server PNG capture failed`);return t}async function AE(){try{return await kE()}catch{return OE()}}function jE(e,t){let n=window.getComputedStyle(e),r=Array.from(n).map(e=>`${e}:${n.getPropertyValue(e)}${n.getPropertyPriority(e)?` !important`:``};`).join(``);t.setAttribute(`style`,r);for(let n=0;n<e.children.length;n+=1){let r=e.children[n],i=t.children[n];r&&i&&jE(r,i)}}function ME(e,t=`info`){let n=$.querySelector(`.host-message`);n||(n=Q(`div`,`host-message`),$.prepend(n)),n.dataset.tone=t,n.replaceChildren(),n.appendChild(Q(`span`,``,e)),clearTimeout(nE),nE=setTimeout(()=>{n?.remove()},4e3)}function NE(){if(!tE)return;let e=window;e.toggleToolbox=()=>{if(uE){fE(!!uE.menu.hidden);return}let e=document.getElementById(`aikit-toolbox-menu`);e&&(e.hidden=!e.hidden)},e.screenshotPage||=SE}var PE=null;function FE(e,t){$.innerHTML=``;let n=Q(`div`,`error-panel`);n.appendChild(Q(`h3`,``,`⚠ ${e}`)),n.appendChild(Q(`pre`,``,t instanceof Error?t.message:String(t))),$.appendChild(n)}function IE(e){gE(),$.innerHTML=``;let t=ET(e),n=t.data;if(n==null){$.innerHTML=`<p class="no-data">No content data received.</p>`;return}e.title&&!tE&&hE(e.title);let r=t.template?JT.get(t.template):JT.detect(n),i=Q(`div`,`main-content`);if(r)PE=r,r.render(i,n,XT);else if(t.template){let r=yE(t.template,n,e);r?vE(i,r.blocks,r.actions):vE(i,t.blocks??[],e.actions)}else vE(i,t.blocks??[],e.actions);if(e.actions?.length&&!r&&!t.template){let t=i.querySelectorAll(`.bk-actions`),n=new Set;for(let e of t)for(let t of e.querySelectorAll(`[data-action-id]`))n.add(t.dataset.actionId??``);let r=e.actions.filter(e=>!n.has(o(e.id)));if(r.length>0){let t=Q(`div`,``),n=aT(t,[{type:`actions`,value:r}],(t,n)=>{let r=e.actions?.find(e=>o(e.id)===t)??{type:n===void 0?`button`:`select`,id:t,label:t};if(rE){let e=rE.getExporter().exportJSON(),t=JSON.parse(e);if(t.length>0){YT(r,n===void 0?e:JSON.stringify({value:n,annotations:t}));return}}YT(r,n)}),a=eE;eE=()=>{a?.(),n()},i.appendChild(t)}}let a=Q(`div`,`main-layout`),s=Q(`div`,`content-column`);if(s.appendChild(i),a.appendChild(s),$.appendChild(a),(e.actions?.length||t.blocks?.some(e=>e.type===`actions`&&Array.isArray(e.value)&&e.value.length>0))&&(rE=Ew({container:i,mountTarget:a})),rE){let e=rE.getStore();e.subscribe(e=>{e.type===`sidebar-toggled`&&(e.open?$.style.setProperty(`--aikit-content-max-width`,`none`):$.style.removeProperty(`--aikit-content-max-width`))}),e.getState().isSidebarOpen&&$.style.setProperty(`--aikit-content-max-width`,`none`)}{let e=i.querySelectorAll(`.bk-actions`);if(e.length>0){let t=Q(`div`,`action-bar`),n=!1;for(let r of e)if(!r.querySelector(`[data-action-row="multi"]`)){for(;r.firstChild;)t.appendChild(r.firstChild);r.remove(),n=!0}n&&(i.appendChild(t),i.style.paddingBottom=`0`)}}let c=document.createElement(`footer`);c.className=h.footer,c.innerHTML=`<div class="${h.footerMeta}"><span class="${h.footerText}">Generated by <span class="${h.footerBrand}">AI KIT</span></span></div>`,$.appendChild(c)}qT?(qT.connect().then(()=>{let e=qT.getHostContext();e&&(ZT.apply(e),QT.apply(e),$T?.apply(e))}),qT.onhostcontextchanged=e=>{ZT.apply(e),QT.apply(e),$T?.apply(e),PE?.onThemeChange&&PE.onThemeChange(ZT.getTheme())},qT.ontoolinputpartial=e=>{let t=e.arguments;t&&($.dataset.streaming=`true`,clearTimeout(bE),bE=setTimeout(()=>{try{let e=t.content??t.data??t.blocks;if(e==null)return;xE({schemaVersion:t.schemaVersion===1?1:void 0,title:t.title,template:t.template,content:e,data:t.data,blocks:Array.isArray(t.blocks)?t.blocks:void 0})}catch{}},80))},qT.ontoolinput=()=>{clearTimeout(bE),delete $.dataset.streaming},qT.ontoolresult=e=>{if(clearTimeout(bE),delete $.dataset.streaming,e.structuredContent)try{IE(e.structuredContent);return}catch(e){FE(`Render error`,e);return}let t=e.content?.find(e=>e.type===`text`)?.text;if(!t){$.innerHTML=`<p>No data received.</p>`;return}try{IE(JSON.parse(t))}catch{IE({content:t})}}):KT&&(document.documentElement.dataset.theme=`dark`,NE(),IE(KT));</script>
|
|
3248
4072
|
</head>
|
|
3249
4073
|
<body>
|
|
3250
4074
|
<div id="app">
|