@hollware/admin 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/_headers +4 -0
- package/dist/client/admin/assets/Account-OgCmRh3p.js +1 -0
- package/dist/client/admin/assets/Activity-DnrBfUzH.js +1 -0
- package/dist/client/admin/assets/{Callback-Dd2wMBlz.js → Callback-Bd_E2MOu.js} +1 -1
- package/dist/client/admin/assets/Checkbox-CpedbrFs.js +1 -0
- package/dist/client/admin/assets/Collection-C_M05-IT.js +55 -0
- package/dist/client/admin/assets/Collections-CIQEDb4n.js +1 -0
- package/dist/client/admin/assets/{CommandPalette-CuiA12JU.js → CommandPalette-CaudxyDO.js} +1 -1
- package/dist/client/admin/assets/{columns-Cj8eM0qD.js → DataTable-C8PKpqDk.js} +2 -2
- package/dist/client/admin/assets/{Drawer-C-hDTnMm.js → Drawer-QZ2e5Qu-.js} +1 -1
- package/dist/client/admin/assets/Entries-sKXmTRAY.js +1 -0
- package/dist/client/admin/assets/{Entry-D79SZHg4.js → Entry-IEK4600_.js} +11 -5
- package/dist/client/admin/assets/FormField-CJVUVtJp.js +1 -0
- package/dist/client/admin/assets/{Home-CF2H9PD1.js → Home-x722ZbaS.js} +1 -1
- package/dist/client/admin/assets/InputNumber-vGsLft_d.js +1 -0
- package/dist/client/admin/assets/{InputTags-vGbxuKpC.js → InputTags-uNIV-i75.js} +1 -1
- package/dist/client/admin/assets/Label-CLk3TC5c.js +1 -0
- package/dist/client/admin/assets/{Modal-CHkapwWL.js → Modal-xlafxc7H.js} +1 -1
- package/dist/client/admin/assets/{NewEntry-nYIALrke.js → NewEntry-7yN63Li5.js} +2 -2
- package/dist/client/admin/assets/{Page-DmKZE2KT.js → Page-Df9k6j3N.js} +1 -1
- package/dist/client/admin/assets/People-DFve2iFx.js +1 -0
- package/dist/client/admin/assets/{Reviews-OSta1XxW.js → Reviews-DcdEUKKq.js} +1 -1
- package/dist/client/admin/assets/{RovingFocusItem-BDpWJACo.js → RovingFocusItem-CBC6orXI.js} +1 -1
- package/dist/client/admin/assets/Select-BEIL7CCt.js +1 -0
- package/dist/client/admin/assets/Site-uqRpNNzC.js +1 -0
- package/dist/client/admin/assets/{Slideover-C3OsTcOD.js → Slideover-DHJp1Wu-.js} +1 -1
- package/dist/client/admin/assets/StructureDialogs-C8A5_Uip.js +1 -0
- package/dist/client/admin/assets/{Toast-B5vXvO3R.js → Toast-CLwIR0jw.js} +1 -1
- package/dist/client/admin/assets/Tokens-CR-FpiFx.js +1 -0
- package/dist/client/admin/assets/{VerdictList-D_NZ0OYy.js → VerdictList-CdJJwTAW.js} +1 -1
- package/dist/client/admin/assets/{VisuallyHiddenInput-CljPtaJu.js → VisuallyHiddenInput-BcwRP4QN.js} +1 -1
- package/dist/client/admin/assets/activity-CZNjJw1n.js +1 -0
- package/dist/client/admin/assets/audit-EPBIwE5q.js +1 -0
- package/dist/client/admin/assets/{bulk-report-DJ9HZ9wj.js → bulk-report-DtFEguVY.js} +1 -1
- package/dist/client/admin/assets/columns-C2eOHLOF.js +1 -0
- package/dist/client/admin/assets/index-CETy3pwO.css +2 -0
- package/dist/client/admin/assets/{index-y3aDwEoE.js → index-CU4FewUB.js} +3 -3
- package/dist/client/admin/assets/{me-Bv56H6vV.js → me-BI4DxQI4.js} +1 -1
- package/dist/client/admin/assets/{presets-DJm-7Lm5.js → presets-DKXSNivp.js} +1 -1
- package/dist/client/admin/assets/session-DxiGrAK0.js +1 -0
- package/dist/client/admin/assets/{virtualizer-Cbz_mmfW.js → virtualizer-T_z5T3jP.js} +1 -1
- package/dist/client/admin/index.html +4 -4
- package/package.json +2 -2
- package/dist/client/admin/assets/Checkbox-Cyt4RO0O.js +0 -1
- package/dist/client/admin/assets/Collection-CHIpkgQG.js +0 -1
- package/dist/client/admin/assets/Collections-Dp7Kise2.js +0 -1
- package/dist/client/admin/assets/Entries-Y9VLTF7I.js +0 -1
- package/dist/client/admin/assets/FormField-UakqhMeR.js +0 -1
- package/dist/client/admin/assets/InputNumber-CUV4YGiS.js +0 -1
- package/dist/client/admin/assets/People-BPTILLjC.js +0 -1
- package/dist/client/admin/assets/Select-Cw7U6_Cu.js +0 -1
- package/dist/client/admin/assets/Site-BTtlUaLP.js +0 -1
- package/dist/client/admin/assets/Tokens-DI3fOtE3.js +0 -1
- package/dist/client/admin/assets/index-DgBlmql9.css +0 -2
- package/dist/client/admin/assets/session-9fRFbks9.js +0 -1
- package/dist/client/admin/assets/src-D89rdOFw.js +0 -55
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as e,Ur as t,Vt as n,j as r}from"./Button-CLo6xV_j.js";var i=e({name:`Español`,code:`es`,messages:{alert:{close:`Cerrar`},authForm:{hidePassword:`Ocultar contraseña`,showPassword:`Mostrar contraseña`,submit:`Continuar`},banner:{close:`Cerrar`},breadcrumb:{label:`ruta de navegación`},calendar:{label:`Fecha del evento`,monthPicker:`Selector de mes`,nextMonth:`Mes siguiente`,nextYear:`Año siguiente`,prevMonth:`Mes anterior`,prevYear:`Año anterior`,yearPicker:`Selector de año`},carousel:{dots:`Elegir diapositiva a mostrar`,goto:`Ir a la diapositiva {slide}`,next:`Siguiente`,prev:`Anterior`,roledescription:`carrusel`,slide:`diapositiva`},chatMessages:{autoScroll:`Desplazarse hacia abajo`},chatPrompt:{placeholder:`Escribe tu mensaje aquí…`},chatPromptSubmit:{label:`Enviar`,reload:`Reintentar`,stop:`Detener generación`},chatReasoning:{thinking:`Pensando…`,thought:`Pensó`,thoughtFor:`Pensó durante {duration}`},colorMode:{dark:`Oscuro`,light:`Claro`,switchToDark:`Cambiar a modo oscuro`,switchToLight:`Cambiar a modo claro`,system:`Sistema`},commandPalette:{back:`Atrás`,close:`Cerrar`,noData:`Sin datos`,noMatch:`No hay datos coincidentes`,placeholder:`Escribe un comando o busca…`,results:`Resultados`},contentSearch:{links:`Enlaces`,search:`Resultados`,theme:`Tema`},contentSearchButton:{label:`Buscar…`},contentToc:{title:`En esta página`},dropdownMenu:{noMatch:`No hay datos coincidentes`,search:`Buscar…`},dashboardSearch:{theme:`Tema`},dashboardSearchButton:{label:`Buscar…`},dashboardSidebarCollapse:{collapse:`Colapsar barra lateral`,expand:`Expandir barra lateral`},dashboardSidebarToggle:{close:`Cerrar barra lateral`,open:`Abrir barra lateral`},drawer:{close:`Cerrar`},error:{clear:`Volver al inicio`},fileUpload:{removeFile:`Eliminar {filename}`},header:{close:`Cerrar menú`,open:`Abrir menú`},inputDate:{day:`día`,dayPeriod:`AM/PM`,era:`era`,hour:`hora`,minute:`minuto`,month:`mes`,second:`segundo`,timeZoneName:`zona horaria`,year:`año`},inputMenu:{create:`Crear "{label}"`,noData:`Sin datos`,noMatch:`No hay datos coincidentes`,trigger:`Mostrar opciones`},inputNumber:{decrement:`Decrementar`,increment:`Incrementar`,roledescription:`campo numérico`},inputRating:{rate:`Valorar {value} de {length}`},inputTime:{dayPeriod:`AM/PM`,hour:`hora`,minute:`minuto`,second:`segundo`,timeZoneName:`zona horaria`},listbox:{noData:`Sin datos`,noMatch:`No hay datos coincidentes`,search:`Buscar…`},modal:{close:`Cerrar`},pagination:{first:`Primera página`,last:`Última página`,next:`Página siguiente`,page:`Página {page}`,prev:`Página anterior`},pinInput:{input:`código PIN, carácter {index} de {length}`},pricingTable:{caption:`Comparación de planes de precios`},prose:{codeCollapse:{closeText:`Colapsar`,name:`código`,openText:`Expandir`},collapsible:{closeText:`Ocultar`,name:`propiedades`,openText:`Mostrar`},pre:{copy:`Copiar código al portapapeles`},prompt:{copy:`Copiar prompt`,openIn:`Abrir en {name}`}},sidebar:{close:`Cerrar`,toggle:`Alternar`},selectMenu:{create:`Crear "{label}"`,noData:`Sin datos`,noMatch:`No hay datos coincidentes`,search:`Buscar…`},skeleton:{label:`cargando`},slideover:{close:`Cerrar`},slider:{max:`Máximo`,min:`Mínimo`,thumb:`Control deslizante`,value:`Valor {index} de {total}`},stepper:{label:`progreso`},table:{noData:`Sin datos`},toast:{close:`Cerrar`},toaster:{label:`Notificación`,viewport:`Notificaciones ({hotkey})`}}}),a={common:{loading:`Loading…`,cancel:`Cancel`,keepIt:`Keep it`,copy:`Copy`,done:`Done`,save:`Save`,remove:`Remove`,name:`Name`,startFrom:`Start from`,none:`(none)`,nothingWaits:`Nothing waits for review.`,savedApplies:`Saved: it applies at once`,nothingChanged:`Nothing changed`,notCreated:`Not created`,sortBy:e=>`Sort by ${e.toLowerCase()}`},status:{draft:`draft`,scheduled:`scheduled`,published:`published`},roles:{owner:`owner`,editor:`editor`,author:`author`},severity:{error:`error`,warning:`warning`},nav:{siteOfPage:e=>`Site ${e}: switch to another`,site:`Site`,newSite:`New site`,home:`Home`,entries:`Entries`,reviews:`Reviews`,structure:`Structure`,collections:`Collections`,allCollections:`All collections`,settings:`Settings`,people:`People`,tokens:`Tokens`},person:{you:`You`,roleOf:(e,t)=>`${e} of ${t}`,language:`Language`},search:{placeholder:`Search entries, or go anywhere…`,published:`Published`,drafts:`Drafts`,waiting:`Waiting for review`,askedBy:e=>`asked by ${e}`,goTo:`Go to`,collection:e=>`Collection ${e}`,create:`Create`,newEntry:`New entry`,newCollection:`New collection`,newSite:`New site`,invite:`Invite someone`,newToken:`New token`,switchSite:`Switch site`},table:{filter:`Filter`,empty:`Nothing here yet.`,count:(e,t)=>`${e} of ${t}`,selectPage:`Select the rows of this page`,selectRow:e=>`Select ${e}`,bulk:`Actions on the selected rows`,selected:e=>`${e} selected`,clear:`Clear the selection`},bulk:{done:`Done`,partly:`Done, with exceptions`,outcomes:{published:e=>`${e} published`,scheduled:e=>`${e} scheduled`,pending_review:e=>`${e} sent for review`,needs_acknowledgement:e=>`${e} with warnings to accept`,blocked:e=>`${e} blocked by their contracts`,conflict:e=>`${e} changed meanwhile`,not_found:e=>`${e} no longer there`,not_pending:e=>`${e} already closed`,unpublished:e=>`${e} unpublished`,changes_requested:e=>`${e} sent back with the note`,revoked:e=>`${e} revoked`,removed:e=>`${e} removed`,changed:e=>`${e} changed`,trashed:e=>`${e} moved to the trash`,restored:e=>`${e} restored`,not_draft:e=>`${e} published or scheduled: unpublish them first`,not_trashed:e=>`${e} not in the trash`,failed:e=>`${e} failed`},publish:e=>`Publish ${e}`,schedule:e=>`Schedule ${e}`,unpublish:e=>`Unpublish ${e}`,approve:e=>`Approve ${e}`,askChanges:e=>`Ask for changes on ${e}`,revoke:e=>`Revoke ${e}`,remove:e=>`Remove ${e}`,trash:e=>`Move ${e} to the trash`,restore:e=>`Restore ${e}`,setRole:`Change the role`,unpublishTitle:e=>`Unpublish ${e} entries?`,unpublishBody:`They leave the public site: their pages answer 404 and they drop out of lists and search. They stay here as drafts, with every revision, and a scheduled one is no longer scheduled.`,scheduleTitle:e=>`Schedule ${e} entries`,trashTitle:e=>`Move ${e} drafts to the trash?`,trashBody:`They leave every list and every agent, and a pending review of theirs is cancelled. Nothing is deleted: restore them from the trash, with every revision.`,acknowledgeTitle:e=>`Publish ${e} entries with these warnings?`,approveTitle:e=>`Approve ${e} reviews with these warnings?`,askChangesTitle:e=>`Ask for changes on ${e} reviews`,askChangesHelp:`The same note goes to each of them.`,revokeTitle:e=>`Revoke ${e} tokens?`,revokeBody:`They stop working on their next request. A revoked token cannot be brought back.`,removeTitle:e=>`Remove ${e} people from this site?`,removeBody:`They leave this site at once, with every token and app they had of it. Their entries and revisions stay. A site always keeps one owner.`,selectReviews:`Select every review that waits`},home:{title:`Home`,mostRead:`Most read, last 30 days`,views:e=>`${e} views`,noAnalytics:`This deployment has no analytics. Bind Analytics Engine and add the beacon to the site to see what readers read.`,noViews:`No page views yet.`,waiting:`Waiting for review`,allReviews:`All reviews`,askedBy:(e,t)=>`asked by ${e} · ${t}`,unpublished:`Unpublished work`,allEntries:`All entries`,allPublished:`Everything written is published.`,changes:`changes`,lastAudit:`Last audit`,noAudit:`No audit report yet. The auditor of @hollware/agents writes one a week.`,written:e=>`Written ${e}`},entries:{title:`Entries`,newEntry:`New entry`,filter:`Filter by title, slug or tag`,empty:`No entries here yet.`,collection:`Collection`,locale:`Locale`,status:`Status`,columns:{title:`Title`,locale:`Locale`,status:`Status`,updated:`Updated`},anyStatus:`Any status`,draft:`Draft`,scheduled:`Scheduled`,published:`Published`,trash:`In the trash`,restore:`Restore`,restoreOne:e=>`Restore ${e}`,restored:`Restored`,restoredBody:`The entry is a draft again, with all its revisions.`,notRestored:`Not restored`,anyLocale:`Any locale`,changes:`changes`,onSite:e=>`${e} on the site`,truncated:e=>`The first ${e} entries: narrow the list by locale or status to see the others.`},newEntry:{title:`New entry`,translation:`New translation`,joins:`It joins the translations of `,collection:`Collection`,locale:`Locale`,entryTitle:`Title`,slug:`Slug`,slugHelp:`Lowercase letters and digits joined by hyphens, such as edge-caching-guide.`,notSlug:`Not a slug.`,create:`Create the draft`,notCreated:`Not created`,inTrash:`An entry in the trash holds this slug or this translation. Restore it from the trash of the entries.`},entry:{title:`Entry`,viewOnSite:`View on site`,validate:`Validate`,save:`Save`,publish:`Publish`,schedule:`Schedule`,cancelSchedule:`Cancel schedule`,unpublish:`Unpublish`,missing:`There is no such entry.`,unpublishedChanges:`unpublished changes`,publishes:e=>`publishes ${e}`,version:e=>`v${e}`,unsaved:`unsaved`,translations:`Translations`,translateTo:e=>`Translate to ${e}`,tabs:{fields:`Fields`,checks:`Checks`,preview:`Preview`,related:`Related`},preview:`Preview of the saved revision`,noRelated:`Nothing related yet. Related entries come from the semantic search of the deployment, for published entries.`,conflictTitle:`Someone changed this entry`,conflictBody:`The entry is at a newer version than the one you edited. Copy what you wrote if you need it, then load the newer version.`,keepEditing:`Keep editing`,loadNewer:`Load the newer version`,acknowledgeTitle:`Publish with these warnings?`,publishAnyway:`Publish anyway`,scheduleAnyway:`Schedule anyway`,cancelScheduleTitle:`Cancel the schedule?`,unpublishTitle:`Unpublish this entry?`,notPublishedAt:e=>`The entry stays a draft and is not published at ${e}.`,unpublishBody:`The entry leaves the public site: its page answers 404 and it drops out of listings and search. It stays here as a draft, with all its revisions, and can be published again.`,cancelTheSchedule:`Cancel the schedule`,scheduleTitle:`Schedule the publication`,publishAt:`Publish at`,publishAtHelp:`In your time zone. It is published within a minute of the time, unless it changes first.`,allPass:`Every contract passes`,counts:(e,t)=>`${e} errors, ${t} warnings`,notChecked:`Not checked`,saved:`Saved`,nothingChanged:`Nothing changed`,notSaved:`Not saved`,seeContracts:`See what the contracts say.`,published:`Published`,scheduled:`Scheduled`,publishedAt:e=>`It is published at ${e}.`,sentForReview:`Sent for review`,reviewNext:`A person who may publish will approve it, or ask for changes.`,blocked:`Blocked`,fixErrors:`Fix the errors first.`,notPublished:`Not published`,notScheduled:`Not scheduled`,pickDateTime:`Pick a date and a time.`,pickFuture:`Pick a time in the future.`,scheduleCancelled:`Schedule cancelled`,unpublished:`Unpublished`,draftAgain:`The entry is a draft again, with all its revisions.`,notCancelled:`Not cancelled`,notUnpublished:`Not unpublished`,moveToTrash:`Move to trash`,trashTitle:`Move this draft to the trash?`,trashBody:`It leaves every list and every agent, and its pending review is cancelled. Nothing is deleted: restore it from the trash of the entries, with every revision.`,trashed:`Moved to the trash`,trashedBody:`Restore it from the trash, in the list of entries.`,notTrashed:`Not moved to the trash`},reviews:{title:`Reviews`,pending:`Pending reviews`,requested:(e,t,n)=>`${e} · asked by ${t} · ${n}`,review:`The review`,sides:e=>`On the left what is live (${e?`the published revision`:`nothing yet`}), on the right the revision asked for.`,comments:`Comments`,noComments:`No comments yet.`,comment:`Comment`,approve:`Approve and publish`,whatToChange:`What to change`,askChanges:`Ask for changes`,approveTitle:`Approve with these warnings?`,approveAnyway:`Approve anyway`,approved:`Approved and published`,blocked:`Blocked`,errorsNow:`The contracts report errors now.`,closed:`This review is closed`,notApproved:`Not approved`,notSent:`Not sent`,changesRequested:`Changes requested`},collections:{title:`Collections`,description:`The kinds of entry of this site, with their fields and rules. A change applies at once.`,filter:`Filter by name or path`,empty:`No collections yet.`,columns:{name:`Name`,fields:`Fields`,rules:`Rules`,path:`Path`},newCollection:`New collection`,nameHelp:`Lowercase letters, digits and hyphens, such as talks.`,notFree:`Not a free name.`,create:`Create the collection`,created:e=>`The collection ${e} is there`,presets:{blog:`A blog: title, description, date, tags`,docs:`Docs: title, description, order`,empty:`Empty: a title alone`}},collection:{description:`A change applies at once to every new save and publish; nothing is deployed.`,missing:e=>`There is no collection "${e}".`,fixToSave:`Fix these to save`,notJson:`The components are not a JSON object.`,fields:`Fields of the frontmatter`,addField:`Add a field`,fieldDescription:`Description`,fewestCharacters:`Fewest characters`,fewestItems:`Fewest items`,least:`Least`,mostCharacters:`Most characters`,mostItems:`Most items`,most:`Most`,values:`Values`,kind:`Kind`,required:`Required`,moveUp:e=>`Move ${e} up`,moveDown:e=>`Move ${e} down`,removeField:e=>`Remove ${e}`,pages:`Pages on the site`,pathIn:e=>`Path in ${e}`,pathHelp:`With :slug where the entry's slug goes.`,translationsShare:`Translations share`,translationsShareHelp:`The field that the translations of an entry share.`,tags:`Tags`,tagsHelp:`A list of texts.`,newestFirst:`Newest first by`,newestFirstHelp:`A date; the first publication otherwise.`,rules:`Rules`,addRule:`Add a rule`,rulesNote:`Every write and publish is checked against them, besides the schema, the components and content safety. An error blocks publishing; a warning has to be acknowledged.`,noRules:`No rules.`,forWriters:`For whoever writes here`,styleGuide:`Style guide`,styleGuideHelp:`Markdown. Agents read it with describe_site before they write.`,components:`Components`,componentsHelp:`The components the body may use, as JSON: { name: { props, description, example } }.`,removeTitle:e=>`Remove the collection ${e}?`,removeBody:`Its entries are not deleted: they are out of reach until a collection of this name comes back.`,kinds:{text:`Text`,date:`Date`,datetime:`Date and time`,choice:`Choice`,list:`List of texts`,number:`Number`,integer:`Whole number`,switch:`Yes or no`,other:`Other (JSON Schema)`},problems:{notName:e=>`"${e}" is not a field name: letters, digits and _, not starting with a digit.`,twice:e=>`"${e}" is there twice.`,bounds:e=>`"${e}": the least is more than the most.`,choice:e=>`"${e}": a choice needs at least one value.`}},rule:{rule:`Rule`,severity:`Severity`,remove:e=>`Remove the rule ${e}`},structure:{notSaved:`Not saved`,fixFirst:`Not saved: fix these first`,conflictTitle:`Someone changed the structure since you opened it`,conflictBody:`Load it again and redo your change.`,loadAgain:`Load again`,impactTitle:`This change touches existing entries`,noDelete:`No entry is deleted.`,applyAnyway:`Apply anyway`,removedCollection:(e,t)=>`The collection "${e}" goes, and its ${t} entries are out of reach until it comes back.`,removedLocale:(e,t)=>`The locale "${e}" goes, and its ${t} entries are out of reach until it comes back.`,refused:(e,t,n)=>`The new schema of "${e}" refuses ${t} of its entries (${n}): they stay, and each is checked against it at its next save.`},site:{title:`Site`,version:e=>`version ${e} of its structure. A change applies at once; nothing is deployed.`,settings:`Settings`,locales:`Locales`,localesHelp:`Such as en or es-CL. Removing one keeps its entries, out of reach.`,defaultLocale:`Default locale`,publicUrl:`Public URL`,publicUrlHelp:`The origin of the site, such as https://example.com: links to entries start with it.`,urlPlaceholder:`https://example.com`,origins:`Origins that read from the browser`,originsHelp:`Pages of these origins may read published content with a read token.`,styleGuide:`Style guide of the site`,styleGuideHelp:`Markdown, for whoever writes anywhere in the site.`,saveSettings:`Save the settings`,webhooks:`Webhooks`,webhooksNote:`Every publish, update and unpublish is sent, signed, to each of them: a site that keeps its pages in a cache purges them, a newsletter drafts an issue.`,signedByHollware:`signed by Hollware's secret`,signedBy:e=>`signed by ${e}`,newSecret:`New secret`,removeWebhook:e=>`Remove the webhook ${e}`,secretShown:e=>`The secret of ${e}: give it to the receiver now, it is shown once`,hookPlaceholder:`site`,url:`URL`,hookUrlPlaceholder:`https://example.com/_hollware/webhook`,add:`Add`,yourSites:`Your sites`,thisOne:`this one`,switch:`Switch`,newSite:`New site`,key:`Key`,keyHelp:`Lowercase words joined by hyphens. It never changes.`,newLocalesHelp:`The first is the default.`,createSite:`Create the site`,inTrash:`In the trash`,since:e=>`since ${e}`,restore:`Restore`,dangerTitle:`Put this site in the trash`,dangerBody:`It is served no more and its tokens stop working. Nothing is deleted: restore it from another site you own.`,trashIt:`Put it in the trash`,trashTitle:e=>`Put ${e} in the trash?`,trashBody:e=>`It holds ${e} entries. Its pages stop being served, and its tokens stop working.`,noSecret:`No secret made`,noSealSecret:`This deployment has no HOLLWARE_SECRET to seal it with: hollware deploy makes one.`,ownSecret:`That webhook is signed by a Worker secret of its own.`,created:e=>`The site ${e} is there`,ownerNow:`You are its owner. Switch to it to fill it.`,switchToIt:`Switch to it`,keyTaken:`A site, or one in the trash, has that key.`,trashed:e=>`The site ${e} is in the trash`,notDeleted:`Not deleted`,restored:e=>`The site ${e} is back`,notRestored:`Not restored`,presets:{blog:`A blog`,docs:`Docs`,empty:`Pages with a title alone`}},people:{title:`People`,ownerOnly:`Only an owner invites people`,role:`Role`,roleHelp:`An editor publishes; an author's posts go through review.`,invite:`Invite`,linkShown:`Send this link to the person: it works once, for 7 days`,members:`Members`,filter:`Filter by name or role`,empty:`No members.`,roleOf:e=>`Role of ${e}`,remove:e=>`Remove ${e}`,invitations:`Invitations`,waiting:`Waiting invitations`,filterRole:`Filter by role`,removeTitle:e=>`Remove ${e}?`,removeBody:`They leave this site at once, with every token and app they had of it. Their entries and revisions stay. Invite them again to bring them back.`,keepThem:`Keep them`,columns:{name:`Name`,role:`Role`,since:`Since`,validUntil:`Valid until`},notInvited:`Not invited`,roleChanged:`Role changed`,notChanged:`Not changed`,out:e=>`${e} is out of this site`,notRemoved:`Not removed`},tokens:{title:`Tokens`,ownerOnly:`Only an owner manages tokens`,label:`Label`,labelPlaceholder:`What the token is for`,days:`Days`,read:`Read token`,readDescription:`Reads published content over the read API, and nothing else`,scopes:`Scopes`,make:`Make a token`,copyNow:`Copy the token now: it is not shown again`,filter:`Filter by label, person or scope`,empty:`No tokens yet.`,revoked:`revoked`,revoke:`Revoke`,columns:{label:`Label`,kind:`Kind`,person:`Person`,scopes:`Scopes`,expires:`Expires`,lastUsed:`Last used`},notMade:`Not made`,revokedToast:e=>`Revoked ${e}`,notRevoked:`Not revoked`},frontmatter:{notYamlBefore:`The frontmatter does not read as YAML between two `,notYamlAfter:` lines. Fix it in the Markdown, and its fields come back here.`,noFields:`The collection describes no field this form can show. Edit the frontmatter in the Markdown.`},verdict:{label:`Contracts`,allPass:`Every contract passes.`,line:e=>`line ${e}`},editor:{markdown:`Markdown of the entry`,live:`The Markdown that is live`,asked:`The Markdown asked for`},callback:{notSignedIn:`You are not signed in`,signInAgain:`Sign in again`,signingIn:`Signing in…`},auth:{noSettings:e=>`The admin could not read its settings (${e}).`,lost:`The sign-in did not come back as it left. Sign in again.`,refused:`The sign-in was refused. Sign in again.`},api:{answered:e=>`The server answered ${e}.`,tryAgain:`Try again.`}},o=e=>e===1?`1 entrada`:`${e} entradas`,s={common:{loading:`Cargando…`,cancel:`Cancelar`,keepIt:`Conservar`,copy:`Copiar`,done:`Listo`,save:`Guardar`,remove:`Eliminar`,name:`Nombre`,startFrom:`Partir de`,none:`(ninguno)`,nothingWaits:`Nada espera revisión.`,savedApplies:`Guardado: se aplica de inmediato`,nothingChanged:`Nada cambió`,notCreated:`No se creó`,sortBy:e=>`Ordenar por ${e.toLowerCase()}`},status:{draft:`borrador`,scheduled:`programada`,published:`publicada`},roles:{owner:`dueño`,editor:`editor`,author:`autor`},severity:{error:`error`,warning:`advertencia`},nav:{siteOfPage:e=>`Sitio ${e}: cambiar a otro`,site:`Sitio`,newSite:`Crear sitio`,home:`Inicio`,entries:`Entradas`,reviews:`Revisiones`,structure:`Estructura`,collections:`Colecciones`,allCollections:`Todas las colecciones`,settings:`Configuración`,people:`Personas`,tokens:`Tokens`},person:{you:`Tú`,roleOf:(e,t)=>`${e} de ${t}`,language:`Idioma`},search:{placeholder:`Busca entradas o ve a cualquier parte…`,published:`Publicadas`,drafts:`Borradores`,waiting:`Esperan revisión`,askedBy:e=>`pedida por ${e}`,goTo:`Ir a`,collection:e=>`Colección ${e}`,create:`Crear`,newEntry:`Crear entrada`,newCollection:`Crear colección`,newSite:`Crear sitio`,invite:`Invitar a alguien`,newToken:`Crear token`,switchSite:`Cambiar de sitio`},table:{filter:`Filtrar`,empty:`Todavía no hay nada aquí.`,count:(e,t)=>`${e} de ${t}`,selectPage:`Seleccionar las filas de esta página`,selectRow:e=>`Seleccionar ${e}`,bulk:`Acciones sobre las filas seleccionadas`,selected:e=>e===1?`1 seleccionada`:`${e} seleccionadas`,clear:`Quitar la selección`},bulk:{done:`Listo`,partly:`Listo, con excepciones`,outcomes:{published:e=>e===1?`1 publicada`:`${e} publicadas`,scheduled:e=>e===1?`1 programada`:`${e} programadas`,pending_review:e=>e===1?`1 enviada a revisión`:`${e} enviadas a revisión`,needs_acknowledgement:e=>e===1?`1 con advertencias por aceptar`:`${e} con advertencias por aceptar`,blocked:e=>e===1?`1 bloqueada por sus contratos`:`${e} bloqueadas por sus contratos`,conflict:e=>e===1?`1 cambió mientras tanto`:`${e} cambiaron mientras tanto`,not_found:e=>e===1?`1 ya no existe`:`${e} ya no existen`,not_pending:e=>e===1?`1 ya estaba cerrada`:`${e} ya estaban cerradas`,unpublished:e=>e===1?`1 despublicada`:`${e} despublicadas`,changes_requested:e=>e===1?`1 devuelta con la nota`:`${e} devueltas con la nota`,revoked:e=>e===1?`1 revocado`:`${e} revocados`,removed:e=>e===1?`1 quitada`:`${e} quitadas`,changed:e=>e===1?`1 cambiada`:`${e} cambiadas`,trashed:e=>e===1?`1 movida a la papelera`:`${e} movidas a la papelera`,restored:e=>e===1?`1 restaurada`:`${e} restauradas`,not_draft:e=>e===1?`1 publicada o programada: despublícala primero`:`${e} publicadas o programadas: despublícalas primero`,not_trashed:e=>e===1?`1 no estaba en la papelera`:`${e} no estaban en la papelera`,failed:e=>e===1?`1 falló`:`${e} fallaron`},publish:e=>`Publicar ${e}`,schedule:e=>`Programar ${e}`,unpublish:e=>`Despublicar ${e}`,approve:e=>`Aprobar ${e}`,askChanges:e=>`Pedir cambios en ${e}`,revoke:e=>`Revocar ${e}`,remove:e=>`Quitar ${e}`,trash:e=>`Mover ${e} a la papelera`,restore:e=>`Restaurar ${e}`,setRole:`Cambiar el rol`,unpublishTitle:e=>`¿Despublicar ${e} entradas?`,unpublishBody:`Salen del sitio público: sus páginas responden 404 y desaparecen de los listados y de la búsqueda. Siguen aquí como borradores, con todas sus revisiones, y una programada deja de estarlo.`,scheduleTitle:e=>`Programar ${e} entradas`,trashTitle:e=>`¿Mover ${e} borradores a la papelera?`,trashBody:`Salen de todas las listas y de los agentes, y su revisión pendiente se cancela. No se elimina nada: restáuralos desde la papelera, con todas sus revisiones.`,acknowledgeTitle:e=>`¿Publicar ${e} entradas con estas advertencias?`,approveTitle:e=>`¿Aprobar ${e} revisiones con estas advertencias?`,askChangesTitle:e=>`Pedir cambios en ${e} revisiones`,askChangesHelp:`La misma nota llega a cada una.`,revokeTitle:e=>`¿Revocar ${e} tokens?`,revokeBody:`Dejan de funcionar en su siguiente solicitud. Un token revocado no se puede recuperar.`,removeTitle:e=>`¿Quitar a ${e} personas de este sitio?`,removeBody:`Salen de este sitio de inmediato, con cada token y aplicación que tenían en él. Sus entradas y revisiones se conservan. Un sitio siempre conserva un dueño.`,selectReviews:`Seleccionar todas las revisiones pendientes`},home:{title:`Inicio`,mostRead:`Lo más leído, últimos 30 días`,views:e=>`${e} visitas`,noAnalytics:`Este despliegue no tiene analíticas. Vincula Analytics Engine y agrega la baliza al sitio para ver qué leen los lectores.`,noViews:`Todavía no hay visitas.`,waiting:`Esperan revisión`,allReviews:`Todas las revisiones`,askedBy:(e,t)=>`pedida por ${e} · ${t}`,unpublished:`Trabajo sin publicar`,allEntries:`Todas las entradas`,allPublished:`Todo lo escrito está publicado.`,changes:`cambios`,lastAudit:`Última auditoría`,noAudit:`Todavía no hay un informe de auditoría. El auditor de @hollware/agents escribe uno por semana.`,written:e=>`Escrito el ${e}`},entries:{title:`Entradas`,newEntry:`Crear entrada`,filter:`Filtrar por título, slug o etiqueta`,empty:`Todavía no hay entradas aquí.`,collection:`Colección`,locale:`Idioma`,status:`Estado`,columns:{title:`Título`,locale:`Idioma`,status:`Estado`,updated:`Actualizada`},anyStatus:`Cualquier estado`,draft:`Borrador`,scheduled:`Programada`,published:`Publicada`,trash:`En la papelera`,restore:`Restaurar`,restoreOne:e=>`Restaurar ${e}`,restored:`Restaurada`,restoredBody:`La entrada vuelve a ser un borrador, con todas sus revisiones.`,notRestored:`No se restauró`,anyLocale:`Cualquier idioma`,changes:`cambios`,onSite:e=>`${e} en el sitio`,truncated:e=>`Las primeras ${e} entradas: filtra la lista por idioma o estado para ver las demás.`},newEntry:{title:`Nueva entrada`,translation:`Nueva traducción`,joins:`Se suma a las traducciones de `,collection:`Colección`,locale:`Idioma`,entryTitle:`Título`,slug:`Slug`,slugHelp:`Letras minúsculas y dígitos unidos por guiones, como guia-de-cache-en-el-borde.`,notSlug:`No es un slug.`,create:`Crear el borrador`,notCreated:`No se creó`,inTrash:`Una entrada en la papelera tiene este slug o esta traducción: restáurala desde la papelera de las entradas.`},entry:{title:`Entrada`,viewOnSite:`Ver en el sitio`,validate:`Validar`,save:`Guardar`,publish:`Publicar`,schedule:`Programar`,cancelSchedule:`Cancelar la programación`,unpublish:`Despublicar`,missing:`Esa entrada no existe.`,unpublishedChanges:`cambios sin publicar`,publishes:e=>`se publica el ${e}`,version:e=>`v${e}`,unsaved:`sin guardar`,translations:`Traducciones`,translateTo:e=>`Traducir a ${e}`,tabs:{fields:`Campos`,checks:`Verificaciones`,preview:`Vista previa`,related:`Relacionadas`},preview:`Vista previa de la revisión guardada`,noRelated:`Todavía no hay nada relacionado. Las entradas relacionadas vienen de la búsqueda semántica del despliegue, para las entradas publicadas.`,conflictTitle:`Alguien cambió esta entrada`,conflictBody:`La entrada está en una versión más nueva que la que editaste. Copia lo que escribiste si lo necesitas y luego carga la versión más nueva.`,keepEditing:`Seguir editando`,loadNewer:`Cargar la versión más nueva`,acknowledgeTitle:`¿Publicar con estas advertencias?`,publishAnyway:`Publicar de todos modos`,scheduleAnyway:`Programar de todos modos`,cancelScheduleTitle:`¿Cancelar la programación?`,unpublishTitle:`¿Despublicar esta entrada?`,notPublishedAt:e=>`La entrada sigue como borrador y no se publica el ${e}.`,unpublishBody:`La entrada sale del sitio público: su página responde 404 y desaparece de los listados y de la búsqueda. Sigue aquí como borrador, con todas sus revisiones, y puede publicarse de nuevo.`,cancelTheSchedule:`Cancelar la programación`,scheduleTitle:`Programar la publicación`,publishAt:`Publicar el`,publishAtHelp:`En tu zona horaria. Se publica a menos de un minuto de esa hora, salvo que cambie antes.`,allPass:`Todos los contratos se cumplen`,counts:(e,t)=>`${e} ${e===1?`error`:`errores`}, ${t} ${t===1?`advertencia`:`advertencias`}`,notChecked:`No se revisó`,saved:`Guardado`,nothingChanged:`Nada cambió`,notSaved:`No se guardó`,seeContracts:`Revisa lo que dicen los contratos.`,published:`Publicada`,scheduled:`Programada`,publishedAt:e=>`Se publica el ${e}.`,sentForReview:`Enviada a revisión`,reviewNext:`Una persona que puede publicar la aprobará o pedirá cambios.`,blocked:`Bloqueada`,fixErrors:`Corrige primero los errores.`,notPublished:`No se publicó`,notScheduled:`No se programó`,pickDateTime:`Elige una fecha y una hora.`,pickFuture:`Elige una hora en el futuro.`,scheduleCancelled:`Programación cancelada`,unpublished:`Despublicada`,draftAgain:`La entrada vuelve a ser un borrador, con todas sus revisiones.`,notCancelled:`No se canceló`,notUnpublished:`No se despublicó`,moveToTrash:`Mover a la papelera`,trashTitle:`¿Mover este borrador a la papelera?`,trashBody:`Sale de todas las listas y de los agentes, y su revisión pendiente se cancela. No se elimina nada: puedes restaurarlo desde la papelera de las entradas, con todas sus revisiones.`,trashed:`Movida a la papelera`,trashedBody:`Restáurala desde la papelera, en la lista de entradas.`,notTrashed:`No se movió a la papelera`},reviews:{title:`Revisiones`,pending:`Revisiones pendientes`,requested:(e,t,n)=>`${e} · pedida por ${t} · ${n}`,review:`La revisión`,sides:e=>`A la izquierda lo que está publicado (${e?`la revisión publicada`:`nada todavía`}), a la derecha la revisión pedida.`,comments:`Comentarios`,noComments:`Todavía no hay comentarios.`,comment:`Comentar`,approve:`Aprobar y publicar`,whatToChange:`Qué cambiar`,askChanges:`Pedir cambios`,approveTitle:`¿Aprobar con estas advertencias?`,approveAnyway:`Aprobar de todos modos`,approved:`Aprobada y publicada`,blocked:`Bloqueada`,errorsNow:`Los contratos ahora informan errores.`,closed:`Esta revisión está cerrada`,notApproved:`No se aprobó`,notSent:`No se envió`,changesRequested:`Cambios pedidos`},collections:{title:`Colecciones`,description:`Los tipos de entrada de este sitio, con sus campos y reglas. Un cambio se aplica de inmediato.`,filter:`Filtrar por nombre o ruta`,empty:`Todavía no hay colecciones.`,columns:{name:`Nombre`,fields:`Campos`,rules:`Reglas`,path:`Ruta`},newCollection:`Nueva colección`,nameHelp:`Letras minúsculas, dígitos y guiones, como charlas.`,notFree:`Ese nombre no está libre.`,create:`Crear la colección`,created:e=>`La colección ${e} está lista`,presets:{blog:`Un blog: título, descripción, fecha, etiquetas`,docs:`Documentación: título, descripción, orden`,empty:`Vacía: solo un título`}},collection:{description:`Un cambio se aplica de inmediato a cada nuevo guardado y publicación; no se despliega nada.`,missing:e=>`No existe la colección "${e}".`,fixToSave:`Corrige esto para guardar`,notJson:`Los componentes no son un objeto JSON.`,fields:`Campos del frontmatter`,addField:`Agregar un campo`,fieldDescription:`Descripción`,fewestCharacters:`Mínimo de caracteres`,fewestItems:`Mínimo de elementos`,least:`Mínimo`,mostCharacters:`Máximo de caracteres`,mostItems:`Máximo de elementos`,most:`Máximo`,values:`Valores`,kind:`Tipo`,required:`Obligatorio`,moveUp:e=>`Subir ${e}`,moveDown:e=>`Bajar ${e}`,removeField:e=>`Eliminar ${e}`,pages:`Páginas en el sitio`,pathIn:e=>`Ruta en ${e}`,pathHelp:`Con :slug donde va el slug de la entrada.`,translationsShare:`Las traducciones comparten`,translationsShareHelp:`El campo que comparten las traducciones de una entrada.`,tags:`Etiquetas`,tagsHelp:`Una lista de textos.`,newestFirst:`Más nuevas primero según`,newestFirstHelp:`Una fecha; si no, la primera publicación.`,rules:`Reglas`,addRule:`Agregar una regla`,rulesNote:`Cada escritura y publicación se revisa contra ellas, además del esquema, los componentes y la seguridad del contenido. Un error bloquea la publicación; una advertencia debe aceptarse.`,noRules:`Sin reglas.`,forWriters:`Para quien escribe aquí`,styleGuide:`Guía de estilo`,styleGuideHelp:`Markdown. Los agentes la leen con describe_site antes de escribir.`,components:`Componentes`,componentsHelp:`Los componentes que puede usar el cuerpo, como JSON: { name: { props, description, example } }.`,removeTitle:e=>`¿Eliminar la colección ${e}?`,removeBody:`Sus entradas no se borran: quedan fuera de alcance hasta que vuelva una colección con este nombre.`,kinds:{text:`Texto`,date:`Fecha`,datetime:`Fecha y hora`,choice:`Opción`,list:`Lista de textos`,number:`Número`,integer:`Número entero`,switch:`Sí o no`,other:`Otro (JSON Schema)`},problems:{notName:e=>`"${e}" no es un nombre de campo: letras, dígitos y _, sin empezar por un dígito.`,twice:e=>`"${e}" está dos veces.`,bounds:e=>`"${e}": el mínimo es mayor que el máximo.`,choice:e=>`"${e}": una opción necesita al menos un valor.`}},rule:{rule:`Regla`,severity:`Gravedad`,remove:e=>`Eliminar la regla ${e}`},structure:{notSaved:`No se guardó`,fixFirst:`No se guardó: corrige esto primero`,conflictTitle:`Alguien cambió la estructura desde que la abriste`,conflictBody:`Cárgala de nuevo y vuelve a hacer tu cambio.`,loadAgain:`Cargar de nuevo`,impactTitle:`Este cambio afecta entradas existentes`,noDelete:`No se borra ninguna entrada.`,applyAnyway:`Aplicar de todos modos`,removedCollection:(e,t)=>`La colección "${e}" se va, y sus ${o(t)} quedan fuera de alcance hasta que vuelva.`,removedLocale:(e,t)=>`El idioma "${e}" se va, y sus ${o(t)} quedan fuera de alcance hasta que vuelva.`,refused:(e,t,n)=>`El nuevo esquema de "${e}" rechaza ${o(t)} de las suyas (${n}): se conservan, y cada una se revisa contra él en su próximo guardado.`},site:{title:`Sitio`,version:e=>`versión ${e} de su estructura. Un cambio se aplica de inmediato; no se despliega nada.`,settings:`Configuración`,locales:`Idiomas`,localesHelp:`Como en o es-CL. Quitar uno conserva sus entradas, fuera de alcance.`,defaultLocale:`Idioma predeterminado`,publicUrl:`URL pública`,publicUrlHelp:`El origen del sitio, como https://example.com: los enlaces a las entradas empiezan con él.`,urlPlaceholder:`https://example.com`,origins:`Orígenes que leen desde el navegador`,originsHelp:`Las páginas de estos orígenes pueden leer el contenido publicado con un token de lectura.`,styleGuide:`Guía de estilo del sitio`,styleGuideHelp:`Markdown, para quien escribe en cualquier parte del sitio.`,saveSettings:`Guardar la configuración`,webhooks:`Webhooks`,webhooksNote:`Cada publicación, actualización y despublicación se envía, firmada, a cada uno: un sitio que guarda sus páginas en caché las purga, un boletín prepara un número.`,signedByHollware:`firmado con el secreto de Hollware`,signedBy:e=>`firmado con ${e}`,newSecret:`Crear secreto`,removeWebhook:e=>`Eliminar el webhook ${e}`,secretShown:e=>`El secreto de ${e}: entrégalo ahora a quien lo recibe, se muestra una sola vez`,hookPlaceholder:`sitio`,url:`URL`,hookUrlPlaceholder:`https://example.com/_hollware/webhook`,add:`Agregar`,yourSites:`Tus sitios`,thisOne:`este`,switch:`Cambiar`,newSite:`Nuevo sitio`,key:`Clave`,keyHelp:`Palabras en minúsculas unidas por guiones. Nunca cambia.`,newLocalesHelp:`El primero es el predeterminado.`,createSite:`Crear el sitio`,inTrash:`En la papelera`,since:e=>`desde el ${e}`,restore:`Restaurar`,dangerTitle:`Mover este sitio a la papelera`,dangerBody:`Deja de servirse y sus tokens dejan de funcionar. No se borra nada: restáuralo desde otro sitio del que seas dueño.`,trashIt:`Mover a la papelera`,trashTitle:e=>`¿Mover ${e} a la papelera?`,trashBody:e=>`Tiene ${o(e)}. Sus páginas dejan de servirse y sus tokens dejan de funcionar.`,noSecret:`No se creó un secreto`,noSealSecret:`Este despliegue no tiene HOLLWARE_SECRET con el cual sellarlo: hollware deploy crea uno.`,ownSecret:`Ese webhook se firma con un secreto propio del Worker.`,created:e=>`El sitio ${e} está listo`,ownerNow:`Eres su dueño. Cambia a él para llenarlo.`,switchToIt:`Cambiar a él`,keyTaken:`Un sitio, o uno en la papelera, ya tiene esa clave.`,trashed:e=>`El sitio ${e} está en la papelera`,notDeleted:`No se borró`,restored:e=>`El sitio ${e} volvió`,notRestored:`No se restauró`,presets:{blog:`Un blog`,docs:`Documentación`,empty:`Páginas con solo un título`}},people:{title:`Personas`,ownerOnly:`Solo un dueño invita a personas`,role:`Rol`,roleHelp:`Un editor publica; lo que escribe un autor pasa por revisión.`,invite:`Invitar`,linkShown:`Envía este enlace a la persona: funciona una vez, durante 7 días`,members:`Miembros`,filter:`Filtrar por nombre o rol`,empty:`Sin miembros.`,roleOf:e=>`Rol de ${e}`,remove:e=>`Quitar a ${e}`,invitations:`Invitaciones`,waiting:`Invitaciones pendientes`,filterRole:`Filtrar por rol`,removeTitle:e=>`¿Quitar a ${e}?`,removeBody:`Sale de este sitio de inmediato, con cada token y aplicación que tenía en él. Sus entradas y revisiones se conservan. Invita de nuevo a esa persona para que vuelva.`,keepThem:`Conservar`,columns:{name:`Nombre`,role:`Rol`,since:`Desde`,validUntil:`Válida hasta`},notInvited:`No se invitó`,roleChanged:`Rol cambiado`,notChanged:`No se cambió`,out:e=>`${e} ya no está en este sitio`,notRemoved:`No se quitó`},tokens:{title:`Tokens`,ownerOnly:`Solo un dueño administra los tokens`,label:`Etiqueta`,labelPlaceholder:`Para qué es el token`,days:`Días`,read:`Token de lectura`,readDescription:`Lee el contenido publicado por la API de lectura, y nada más`,scopes:`Permisos`,make:`Crear un token`,copyNow:`Copia el token ahora: no se vuelve a mostrar`,filter:`Filtrar por etiqueta, persona o permiso`,empty:`Todavía no hay tokens.`,revoked:`revocado`,revoke:`Revocar`,columns:{label:`Etiqueta`,kind:`Tipo`,person:`Persona`,scopes:`Permisos`,expires:`Vence`,lastUsed:`Último uso`},notMade:`No se creó`,revokedToast:e=>`Se revocó ${e}`,notRevoked:`No se revocó`},frontmatter:{notYamlBefore:`El frontmatter no se lee como YAML entre dos líneas `,notYamlAfter:`. Corrígelo en el Markdown y sus campos volverán aquí.`,noFields:`La colección no describe ningún campo que este formulario pueda mostrar. Edita el frontmatter en el Markdown.`},verdict:{label:`Contratos`,allPass:`Todos los contratos se cumplen.`,line:e=>`línea ${e}`},editor:{markdown:`Markdown de la entrada`,live:`El Markdown publicado`,asked:`El Markdown pedido`},callback:{notSignedIn:`No iniciaste sesión`,signInAgain:`Iniciar sesión de nuevo`,signingIn:`Iniciando sesión…`},auth:{noSettings:e=>`El admin no pudo leer su configuración (${e}).`,lost:`El inicio de sesión no se completó. Inicia sesión de nuevo.`,refused:`Se rechazó el inicio de sesión. Inicia sesión de nuevo.`},api:{answered:e=>`El servidor respondió ${e}.`,tryAgain:`Inténtalo de nuevo.`}},c=[{locale:`en`,name:`English`},{locale:`es`,name:`Español`}],l=`hollware.locale`,u={en:a,es:s};function d(e){return e===`en`||e===`es`}function f(e,t){if(d(e))return e;for(let e of t){let t=e.toLowerCase().split(`-`)[0];if(d(t))return t}return`en`}function p(){try{return globalThis.localStorage?.getItem(l)??null}catch{return null}}var m=t(f(p(),globalThis.navigator?.languages??[globalThis.navigator?.language??``]));function h(e){typeof document<`u`&&(document.documentElement.lang=e)}h(m.value);var g=n(()=>u[m.value]);function _(){return g}var v=n(()=>m.value),y=n(()=>m.value===`es`?i:r);function b(e){m.value=e;try{globalThis.localStorage?.setItem(l,e)}catch{}h(e)}function x(e){return new Intl.DateTimeFormat(m.value,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(e))}function S(e){return new Intl.DateTimeFormat(m.value).format(new Date(e))}function C(e){return new Intl.NumberFormat(m.value).format(e)}var w=class extends Error{name=`ApiError`;code;fix;constructor(e,t,n){super(t),this.code=e,this.fix=n}};function T(e){let t=e.text??(()=>a.api);async function n(n,r){let i=await e.auth.token();if(i===null)return await e.auth.signIn(e.here()),new Promise(()=>{});let a=new Headers(r.headers);a.set(`authorization`,`Bearer ${i}`);let o=await e.fetch(n,{...r,headers:a});if(o.status===401)return e.auth.forget(),await e.auth.signIn(e.here()),new Promise(()=>{});let s=await o.json();if(!o.ok){let e=s??{};throw new w(e.code??`internal`,e.message??t().answered(o.status),e.fix??t().tryAgain)}return s}return{async call(e,t){return await n(`/v1/ops/${e}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)})},async admin(e,t){return await n(`/v1/admin/${e}`,t===void 0?{method:`GET`}:{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)})}}}function E(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function D(e=32){return E(crypto.getRandomValues(new Uint8Array(e)))}async function O(e){let t=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(e));return E(new Uint8Array(t))}var k=`hollware:sign-in`,A=`hollware:site`,j=6e4,M=class extends Error{name=`SignInError`};function N(e){let t=null,n=null,r=e.text??(()=>a.auth),i=()=>(t??=e.fetch(`/admin/config.json`).then(async e=>{if(!e.ok)throw new M(r().noSettings(e.status));return await e.json()}),t),o=t=>(n={access:t.access_token,refresh:t.refresh_token??null,expiresAt:e.now()+(t.expires_in??3600)*1e3},n.access),s=async t=>{let n=await i(),r=await e.fetch(`/oauth/token`,{method:`POST`,headers:{"content-type":`application/x-www-form-urlencoded`},body:new URLSearchParams({...t,client_id:n.clientId,resource:n.resource})});return r.ok?await r.json():null};return{async signIn(t){let n=await i(),r={verifier:D(),state:D(16),returnTo:t};e.storage.setItem(k,JSON.stringify(r));let a=new URLSearchParams({response_type:`code`,client_id:n.clientId,redirect_uri:n.redirectUri,scope:n.scope,state:r.state,code_challenge:await O(r.verifier),code_challenge_method:`S256`,resource:n.resource}),o=e.storage.getItem(A);o!==null&&a.set(`site`,o),e.navigate(`/authorize?${a.toString()}`)},async switchSite(t,r){e.storage.setItem(A,t),n=null,await this.signIn(r)},async complete(t){let n=e.storage.getItem(k);e.storage.removeItem(k);let a=n===null?null:JSON.parse(n),c=t.searchParams.get(`code`);if(a===null||c===null||t.searchParams.get(`state`)!==a.state)throw new M(t.searchParams.get(`error_description`)??r().lost);let l=await i(),u=await s({grant_type:`authorization_code`,code:c,redirect_uri:l.redirectUri,code_verifier:a.verifier});if(u===null)throw new M(r().refused);return o(u),a.returnTo},async token(){if(n===null)return null;if(n.expiresAt-e.now()>j)return n.access;if(n.refresh===null)return n=null,null;let t=await s({grant_type:`refresh_token`,refresh_token:n.refresh});return t===null?(n=null,null):o(t)},forget(){n=null}}}var P=N({fetch:(e,t)=>fetch(e,t),navigate:e=>{window.location.assign(e)},storage:window.sessionStorage,now:()=>Date.now(),text:()=>_().value.auth}),F=T({fetch:(e,t)=>fetch(e,t),auth:P,here:()=>`${window.location.pathname}${window.location.search}`,text:()=>_().value.api});export{v as a,C as c,_ as d,c as i,b as l,P as n,S as o,w as r,x as s,F as t,y as u};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import{$r as e,Ei as t,Gn as n,Gt as r,Ht as i,Qt as a,Ur as o,Ut as s,Vt as c,Wt as l,Zt as u,en as d,jt as f,t as p,vr as m,zn as h}from"./Button-CLo6xV_j.js";import{d as ee,r as te}from"./session-9fRFbks9.js";import{n as ne}from"./Modal-CHkapwWL.js";import{t as re}from"./Alert-Brj1D9qO.js";function ie(e){let t=o(!1),n=o(null),r=o([]),i=o(!1),a=o(null),s=null;async function c(o,c=!1){t.value=!0,r.value=[],a.value=null;try{let t=await o(c);switch(t.outcome){case`needs_confirmation`:s=o,n.value=t.impact??null;break;case`invalid`:r.value=t.problems??[];break;case`conflict`:i.value=!0;break;case`updated`:case`unchanged`:n.value=null,await e(t)}}catch(e){a.value=e instanceof te?`${e.message} ${e.fix}`:String(e)}finally{t.value=!1}}async function l(){let e=s;n.value=null,s=null,e!==null&&await c(e,!0)}function u(){n.value=null,s=null}return{busy:t,impact:n,problems:r,conflict:i,failure:a,run:c,confirmPending:l,cancel:u}}function ae(e,t){return[...e.removedCollections.map(e=>t.removedCollection(e.name,e.entries)),...e.removedLocales.map(e=>t.removedLocale(e.locale,e.entries)),...e.refused.map(e=>t.refused(e.collection,e.entries,e.examples.join(`, `)))]}var oe={class:`mt-1 space-y-1`},se={class:`font-mono text-xs`},ce={class:`list-disc space-y-2 pl-5 text-sm`},le={class:`mt-3 text-sm text-muted`},g=d({__name:`StructureDialogs`,props:{impact:{},problems:{},conflict:{type:Boolean},failure:{}},emits:[`confirm`,`cancel`,`reload`],setup(o,{emit:d}){let te=o,ie=d,g=ee(),ue=c(()=>te.impact===null?[]:ae(te.impact,g.value.structure)),de=c({get:()=>te.impact!==null,set:e=>{e||ie(`cancel`)}});return(c,d)=>{let ee=re,te=p,ae=ne;return h(),r(f,null,[o.failure===null?l(``,!0):(h(),s(ee,{key:0,color:`error`,title:e(g).structure.notSaved,description:o.failure},null,8,[`title`,`description`])),o.problems.length>0?(h(),s(ee,{key:1,color:`error`,title:e(g).structure.fixFirst},{description:m(()=>[i(`ul`,oe,[(h(!0),r(f,null,n(o.problems,(e,n)=>(h(),r(`li`,{key:n},[i(`span`,se,t(e.path),1),u(` — `+t(e.message)+`. `+t(e.fix),1)]))),128))])]),_:1},8,[`title`])):l(``,!0),o.conflict?(h(),s(ee,{key:2,color:`warning`,title:e(g).structure.conflictTitle,description:e(g).structure.conflictBody,actions:[{label:e(g).structure.loadAgain,onClick:()=>ie(`reload`)}]},null,8,[`title`,`description`,`actions`])):l(``,!0),a(ae,{open:de.value,"onUpdate:open":d[2]||=e=>de.value=e,title:e(g).structure.impactTitle},{body:m(()=>[i(`ul`,ce,[(h(!0),r(f,null,n(ue.value,e=>(h(),r(`li`,{key:e},t(e),1))),128))]),i(`p`,le,t(e(g).structure.noDelete),1)]),footer:m(()=>[a(te,{label:e(g).common.cancel,variant:`ghost`,onClick:d[0]||=e=>ie(`cancel`)},null,8,[`label`]),a(te,{label:e(g).structure.applyAnyway,color:`warning`,onClick:d[1]||=e=>ie(`confirm`)},null,8,[`label`])]),_:1},8,[`open`,`title`])],64)}}}),ue=new WeakMap;function de(e,t){return ue.set(e,t),e}var fe=new WeakMap;function pe(e,t){let n=fe.get(t);if(n===void 0)throw Error(`The built-in contract ${e} runs only through runContracts.`);return n}var me=80;function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function he(e,t=me){if(e.length<=t)return e;let n=e.slice(0,t),r=n.charCodeAt(t-1);return`${r>=55296&&r<=56319?n.slice(0,-1):n}…`}function v(e){return JSON.stringify(he(e))}function ge(e,t){return`${e} ${t}${e===1?``:`s`}`}var _e=20;function ve(e){return(e.path??[]).map(e=>String(typeof e==`object`?e.key:e))}function ye(e){return e.reduce((e,t)=>/^\d+$/.test(t)?`${e}[${t}]`:e===``?t:`${e}.${t}`,``)}function be(e,t){let n=e;for(let e of t){let t=n.properties;if(_(t)&&Object.hasOwn(t,e)){let r=t[e];if(!_(r))return;n=r}else if(/^\d+$/.test(e)&&_(n.items))n=n.items;else return}return n}function xe(e,t){let n=e;for(let e of t)if(Array.isArray(n)&&/^\d+$/.test(e))n=n[Number(e)];else if(_(n)&&Object.hasOwn(n,e))n=n[e];else return;return n}function Se(e){let t=e.slice(0,_e).map(e=>JSON.stringify(e)).join(`, `),n=e.length-_e;return n>0?`${t} and ${n} more`:t}function Ce(e,t,n){let r=typeof e==`number`?e:void 0,i=typeof t==`number`?t:void 0;if(r!==void 0&&i!==void 0)return r===i?`exactly ${ge(r,n)}`:`${r} to ${ge(i,n)}`;if(r!==void 0)return`at least ${ge(r,n)}`;if(i!==void 0)return`at most ${ge(i,n)}`}function we(e){let t=Ce(e.minLength,e.maxLength,`character`),n=``;return typeof e.format==`string`?n=` in the format ${JSON.stringify(e.format)}`:typeof e.pattern==`string`&&(n=` matching the pattern ${e.pattern}`),`a string${t===void 0?``:` of ${t}`}${n}`}function Te(e,t){let n=[typeof t.minimum==`number`?`at least ${t.minimum}`:void 0,typeof t.exclusiveMinimum==`number`?`greater than ${t.exclusiveMinimum}`:void 0,typeof t.maximum==`number`?`at most ${t.maximum}`:void 0,typeof t.exclusiveMaximum==`number`?`less than ${t.exclusiveMaximum}`:void 0].filter(e=>e!==void 0),r=e===`integer`?`an integer`:`a number`;return n.length===0?r:`${r} that is ${n.join(` and `)}`}function Ee(e){let t=Ce(e.minItems,e.maxItems,`item`),n=_(e.items)?ke(e.items):void 0;return`an array${t===void 0?``:` of ${t}`}${n===void 0?``:`, each ${n}`}`}function De(e){let t=_(e.properties)?Object.keys(e.properties):[];return t.length===0?`an object`:`an object with the keys ${t.join(`, `)}`}function Oe(e,t){switch(e){case`string`:return we(t);case`integer`:case`number`:return Te(e,t);case`boolean`:return`true or false`;case`null`:return`null`;case`array`:return Ee(t);case`object`:return De(t);default:return}}function ke(e){if(`const`in e)return`exactly ${JSON.stringify(e.const)}`;if(Array.isArray(e.enum))return`one of ${Se(e.enum)}`;let t=e.anyOf??e.oneOf,n=Array.isArray(t)?t.map(e=>_(e)?ke(e):void 0):(Array.isArray(e.type)?e.type:[e.type]).map(t=>Oe(t,e));return n.every(e=>e!==void 0)?n.join(` or `):void 0}function Ae(e,t){let{additionalProperties:n,properties:r}=e;return n!==!1||!_(r)||!_(t)?[]:Object.keys(t).filter(e=>!Object.hasOwn(r,e))}function je({subject:e,schema:t,input:n,segments:r,message:i}){let a=r.length===0?e.container:`the ${e.noun} ${v(ye(r))}`,o=t===null?void 0:be(t,r);if(o!==void 0){let t=Ae(o,xe(n,r));if(t.length>0){let n=_(o.properties)?Object.keys(o.properties):[],r=t.length===1?e.noun:`${e.noun}s`,i=n.length===0?`no ${e.noun}s are allowed there`:`the ${e.noun}s allowed there are: ${n.join(`, `)}`;return`Remove the ${r} ${t.map(e=>v(e)).join(`, `)} from ${a}; ${i}.`}}let s=o===void 0?void 0:ke(o);return s===void 0?`Change ${a} to a value that the schema of ${e.container} accepts: ${i}`:`Set ${a} to ${s}.`}var Me=new WeakMap;function Ne(e){try{return e[`~standard`].jsonSchema.input({target:`draft-2020-12`})}catch{return null}}function Pe(e){let t=Me.get(e);return t===void 0&&(t={frontmatter:Ne(e.schema),components:new Map([...e.components].map(([e,t])=>[e,Ne(t.props)]))},Me.set(e,t)),t}de({id:`components`,severity:`error`,description:`The props of every component in the body match the schema of that component.`,async check(e){let{collection:t}=pe(`components`,e),n=Pe(t).components,r=[];for(let i of e.markdown.extracted.components){let e=t.components.get(i.name);if(e===void 0)continue;let a=await e.props[`~standard`].validate(i.props);if(!a.issues)continue;let o={container:`the component ${v(i.name)}`,noun:`prop`};for(let e of a.issues){let t=ve(e),a=t.length===0?`The props`:`The prop ${v(ye(t))}`;r.push({path:`/body`,message:`${a} of the component ${v(i.name)} ${t.length===0?`are`:`is`} invalid: ${e.message}`,fix:je({subject:o,schema:n.get(i.name)??null,input:i.props,segments:t,message:e.message}),line:i.line})}}return r}},{readsFrontmatter:!1});function Fe(e){return[...e.components.keys()].toSorted()}function Ie(e,t,n){return de({id:e,severity:`error`,description:t,check(t){let{collection:r}=pe(e,t);return t.markdown.extracted.disallowed.filter(t=>t.kind===e).map(e=>({path:`/body`,...n(e,r),line:e.line}))}},{readsFrontmatter:!1})}Ie(`raw-html`,`The body holds Markdown and the components of the collection, never raw HTML.`,(e,t)=>{let n=Fe(t);return{message:`Raw HTML is not allowed: the body has a <${he(e.name)}> tag.`,fix:`Remove the HTML and use Markdown${n.length===0?``:` or one of the allowed components: ${n.join(`, `)}`}.`}}),Ie(`unknown-component`,`The body uses only the components that the collection declares.`,(e,t)=>{let n=Fe(t);return{message:`The component ${v(e.name)} does not exist in this collection.`,fix:n.length===0?`This collection allows no components: remove it and use Markdown.`:`Use one of the allowed components: ${n.join(`, `)}.`}}),Ie(`disallowed-attribute`,`Links, images and code carry only the attributes Markdown produces, and a component only the props its schema declares.`,e=>({message:`The attribute ${v(e.name)} is not allowed.`,fix:`Remove the attribute ${v(e.name)}. Links keep href and title, images keep src, alt, title, width and height, and a component takes only the props its schema declares.`})),Ie(`unsafe-url`,`Links and images use an https:, http: or mailto: URL, a path of the site or an anchor.`,e=>({message:`The URL ${v(e.name)} is not allowed.`,fix:`Use an https: or http: URL, a mailto: address, a path of this site that starts with /, or an anchor that starts with #.`}));var Le=[`schema`,`components`,`raw-html`,`unknown-component`,`disallowed-attribute`,`unsafe-url`,`translation-pair`,`internal-links-resolve`,`images-have-alt`,`size-limit`,`frontmatter-syntax`,`comark-parse`,`unique-slug`,`unique-translation`];function Re(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 ze(e,t=`|`){return e.map(e=>at(e)).join(t)}function Be(e,t){return typeof t==`bigint`?t.toString():t}var Ve=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function He(e){return new Ve(e)}function Ue(e){return e==null}function We(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ge(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function y(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ke(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function b(e){return Ke(e._zod.def)??e._zod.def.shape}function qe(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return y(this,t,e),e},enumerable:!0,configurable:!0})}function Je(e,t,n){t in e?y(e,t,n):e[t]=n}function x(e,t,n,r){let i=b(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?qe(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Je(e,a,r?r(n.value,a):n.value))}}function Ye(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?qe(e,n,()=>t[n]):Je(e,n,r.value))}}function S(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Xe(e){return JSON.stringify(e)}function Ze(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Qe=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function $e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var et=He(()=>{if(j.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function tt(e){if($e(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return $e(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function nt(e){return tt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var rt=new Set([`string`,`number`,`symbol`]);function it(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function C(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function w(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 at(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ot(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var st={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ct={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function lt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return x(i,e,ut(e,t)),C(e,S(n,{shape:i,checks:[]}))}function ut(e,t){let n=b(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function dt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(ut(e,t)),a={};return x(a,e,Reflect.ownKeys(b(e)).filter(e=>!i.has(e))),C(e,S(n,{shape:a,checks:[]}))}function ft(e,t){if(!tt(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=b(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return C(e,S(e._zod.def,{shape:pt(e,t)}))}function pt(e,t){let n={};return x(n,e,Reflect.ownKeys(b(e))),Ye(n,t),n}function mt(e,t){if(!tt(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return C(e,S(e._zod.def,{shape:pt(e,t)}))}function ht(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return x(n,e,Reflect.ownKeys(b(e))),x(n,t,Reflect.ownKeys(b(t))),C(e,S(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function gt(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(ut(t,n)):void 0,o={};return x(o,t,Reflect.ownKeys(b(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),C(t,S(t._zod.def,{shape:o,checks:[]}))}function _t(e,t,n){let r=n?new Set(ut(t,n)):void 0,i={};return x(i,t,Reflect.ownKeys(b(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),C(t,S(t._zod.def,{shape:i}))}function T(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 vt(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 yt(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function bt(e){return typeof e==`string`?e:e?.message}function xt(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function St(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function E(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:bt(e.inst?._zod.def?.error?.(e))??bt(a?.(e))??bt(t?.error?.(e))??bt(n.customError?.(e))??bt(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Ct=/[\uD800-\uDBFF]/;function wt(e){let t=e.length;if(!Ct.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Tt(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Et(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 Dt(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ot(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):jt(e,n,r.value)}}function D(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function kt(e,t,n){return D(e,t,n,!1)}function At(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return D(this,n,r(this))},set(e){D(this,n,e)}})}return t}function jt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:D(this,t,n.bind(this))},set(e){D(this,t,e)}})}function Mt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Nt,Pt=!1,Ft={configurable:!0,get(){Pt=!0}};function O(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&Nt!==e._zod?Nt=void 0:(Nt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ft);let e=Pt;Pt=!1;try{let r=n(this);return Pt?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Pt||=e,r}catch(n){throw delete this[t],Pt||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function It(e,t,n,r){let i=Mt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Lt=`~constantCatch`;function Rt(e){let t=()=>e;return t[Lt]=!0,t}var zt,Bt={value:void 0,enumerable:!1},Vt=`captureStackTrace`in Error?Error:null;function Ht(e){let t=Vt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Vt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function k(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Bt.value=new a(r);try{Object.defineProperty(n,"_zod",Bt)}finally{Bt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Ot(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Ht(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var A=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Ut=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(zt=globalThis).__zod_globalConfig??(zt.__zod_globalConfig={});var j=globalThis.__zod_globalConfig;function M(e){return e&&Object.assign(j,e),j}function Wt(){let e=this._zod;return e.message??=JSON.stringify(e.def,Be,2),e.message}function Gt(e){this._zod.message=e}var Kt={get:Wt,set:Gt,enumerable:!0,configurable:!0},qt={value:void 0,enumerable:!1},Jt=new WeakSet([Object.prototype,Error.prototype]),Yt=(e,t)=>{e.name=`$ZodError`,qt.value=t,Object.defineProperty(e,"issues",qt),qt.value=void 0,Object.defineProperty(e,"message",Kt);let n=Object.getPrototypeOf(e);Jt.has(n)||(Jt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Xt=k(`$ZodError`,Yt);k(`$ZodError`,Yt,void 0,{Parent:Error});function Zt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Qt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Zt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function $t(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function en(e,t){return{callee:t?.callee??e,Err:t?.Err}}var tn=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new A;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>E(e,o,M())));throw Qe(n,a?.callee??t),n}return s.value};return t},nn=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>E(e,o,M())));throw Qe(n,a?.callee??t),n}return s.value};return t},rn=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 A;return a.issues.length?an(e,a.issues,i):{success:!0,data:a.value}};function an(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>E(e,n,M()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var on=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?an(e,a.issues,i):{success:!0,data:a.value}},sn=Symbol.for(`zod.compile.invalid`),cn=Symbol.for(`zod.compile.fallback`),ln=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==sn)return!0;if(r.definite===!0&&n===void 0)return!1}return un(e,t,n)});function un(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[cn]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new A;return a.issues.length===0}var dn=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},fn=e=>{let t=tn(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,en(n,a))};return n},pn=e=>{let t=tn(e),n=(e,r,i,a)=>t(e,r,i,en(n,a));return n},mn=e=>{let t=nn(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,en(n,a))};return n},hn=e=>{let t=nn(e),n=async(e,r,i,a)=>await t(e,r,i,en(n,a));return n},gn=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return rn(e)(t,n,i)},_n=e=>(t,n,r)=>rn(e)(t,n,r),vn=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return on(e)(t,n,i)},yn=e=>async(t,n,r)=>on(e)(t,n,r),bn=/^[cC][0-9a-z]{6,}$/,xn=/^[0-9a-z]+$/,Sn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Cn=/^[0-9a-vA-V]{20}$/,wn=/^[A-Za-z0-9]{27}$/,Tn=/^[a-zA-Z0-9_-]{21}$/;function En(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Dn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,On=/^([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})$/,kn=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)$/,An=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,jn=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Mn(){return new RegExp(jn,`u`)}var Nn=/^(?:(?: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])$/,Pn=/^(([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}|:))$/,Fn=/^((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])$/,In=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ln=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Rn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,zn=/^https?$/,Bn=/^\+[1-9]\d{6,14}$/,Vn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function Hn(e){return RegExp(`^${e}$`)}var Un=Hn(Vn);function Wn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Gn(e){return RegExp(`^${Wn(e)}$`)}function Kn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Wn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Wn({precision:e.precision})}`:n;return RegExp(`^${Vn}T(?:${r})$`)}var qn=/^[\s\S]{0,}$/,Jn=/^-?\d+$/,Yn=/^-?\d+(?:\.\d+)?$/,Xn=/^(?:true|false)$/i,Zn=/^[^A-Z]*$/,Qn=/^[^a-z]*$/,N=k(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),$n=e=>{let t=e.value;return!Ue(t)&&t.length!==void 0},er={number:`number`,bigint:`bigint`,object:`date`},tr=k(`$ZodCheckLessThan`,(e,t)=>{N.init(e,t);let n=er[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:er[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),nr=k(`$ZodCheckGreaterThan`,(e,t)=>{N.init(e,t);let n=er[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:er[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rr=k(`$ZodCheckMultipleOf`,(e,t)=>{N.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ge(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})}}),ir=k(`$ZodCheckNumberFormat`,(e,t)=>{N.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=st[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ar=k(`$ZodCheckMaxLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=$n),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?wt(r):i)<=t.maximum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),or=k(`$ZodCheckMinLength`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=$n),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?wt(r):i)>=t.minimum)return;let a=Tt(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sr=k(`$ZodCheckLengthEquals`,(e,t)=>{var n;N.init(e,t),(n=e._zod.def).when??(n.when=$n),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?wt(r):i;if(a===t.length)return;let o=Tt(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),cr=k(`$ZodCheckStringFormat`,(e,t)=>{var n,r;N.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),lr=k(`$ZodCheckRegex`,(e,t)=>{cr.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})}}),ur=k(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Zn,cr.init(e,t)}),dr=k(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Qn,cr.init(e,t)}),fr=k(`$ZodCheckIncludes`,(e,t)=>{N.init(e,t);let n=it(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),pr=k(`$ZodCheckStartsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`^${it(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),mr=k(`$ZodCheckEndsWith`,(e,t)=>{N.init(e,t);let n=RegExp(`.*${it(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),hr=k(`$ZodCheckOverwrite`,(e,t)=>{N.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),gr=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
3
|
-
`)}\n};`)(...Object.values(this.closed))}},_r={major:4,minor:6,patch:7},P=k(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=_r;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=T(t),a;for(let o of n){if(o._zod.def.when){if(vt(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new A;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(St(t.issues,n,e),i||=T(t,n))});else{if(t.issues.length===n)continue;St(t.issues,n,e),i||=T(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(T(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new A;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return kt(this,`~standard`,br(this))},set"~standard"(e){D(this,`~standard`,e)}}),vr=(e,t)=>e.issues.length?{issues:e.issues.map(e=>E(e,t,M()))}:{value:e.value};async function yr(e,t){let n={async:!0};return vr(await e._zod.run({value:t,issues:[]},n),n)}function br(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return vr(r,n)}catch{}return yr(e,t)},vendor:`zod`,version:1}}var xr=k(`$ZodString`,(e,t)=>{P.init(e,t),e._zod.pattern=t.pattern??qn,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}}),F=k(`$ZodStringFormat`,(e,t)=>{cr.init(e,t),xr.init(e,t)}),Sr=k(`$ZodGUID`,(e,t)=>{t.pattern??=On,F.init(e,t)}),Cr=k(`$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??=kn(e)}else t.pattern??=kn();F.init(e,t)}),wr=k(`$ZodEmail`,(e,t)=>{t.pattern??=An,F.init(e,t)});function Tr(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Er(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Tr(e)||2:Dr(e,t)}function Dr(e,t){if(!t.normalize&&t.protocol?.source===zn.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Or=/[\t\n\r]/g;function kr(e){return e.replace(Or,``)}function Ar(e,t){return t.lastIndex=0,t.test(e.hostname)}function jr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Mr=k(`$ZodURL`,(e,t)=>{F.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Er(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=kr(r);return}t.hostname&&!Ar(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!jr(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:kr(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Nr=k(`$ZodEmoji`,(e,t)=>{t.pattern??=Mn(),F.init(e,t)}),Pr=k(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Tn:En(t.length),F.init(e,t)}),Fr=k(`$ZodCUID`,(e,t)=>{t.pattern??=bn,F.init(e,t)}),Ir=k(`$ZodCUID2`,(e,t)=>{t.pattern??=xn,F.init(e,t)}),Lr=k(`$ZodULID`,(e,t)=>{t.pattern??=Sn,F.init(e,t)}),Rr=k(`$ZodXID`,(e,t)=>{t.pattern??=Cn,F.init(e,t)}),zr=k(`$ZodKSUID`,(e,t)=>{t.pattern??=wn,F.init(e,t)}),Br=k(`$ZodISODateTime`,(e,t)=>{t.pattern??=Kn(t),F.init(e,t)}),Vr=k(`$ZodISODate`,(e,t)=>{t.pattern??=Un,F.init(e,t)}),Hr=k(`$ZodISOTime`,(e,t)=>{t.pattern??=Gn(t),F.init(e,t)}),Ur=k(`$ZodISODuration`,(e,t)=>{t.pattern??=Dn,F.init(e,t)}),Wr=k(`$ZodIPv4`,(e,t)=>{t.pattern??=Nn,F.init(e,t)}),Gr=/^[0-9a-fA-F:.]+$/;function Kr(e){return Gr.test(e)?Tr(`http://[${e}]`):!1}var qr=k(`$ZodIPv6`,(e,t)=>{t.pattern??=Pn,F.init(e,t),e._zod.check=n=>{Kr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Jr=k(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Fn,F.init(e,t)});function Yr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Kr(n)}var Xr=k(`$ZodCIDRv6`,(e,t)=>{t.pattern??=In,F.init(e,t),e._zod.check=n=>{Yr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Zr(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Qr=/^[0-9a-zA-Z+/]*={0,2}$/,$r=k(`$ZodBase64`,(e,t)=>{t.pattern??=Qr,F.init(e,t),e._zod.check=n=>{Zr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),ei=/^[A-Za-z0-9_-]*$/;function ti(e){if(!ei.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Zr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var ni=k(`$ZodBase64URL`,(e,t)=>{t.pattern??=ei,F.init(e,t),e._zod.check=n=>{ti(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),ri=k(`$ZodE164`,(e,t)=>{t.pattern??=Bn,F.init(e,t)});function ii(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ai=k(`$ZodJWT`,(e,t)=>{F.init(e,t),e._zod.check=n=>{ii(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),oi=k(`$ZodNumber`,(e,t)=>{P.init(e,t),e._zod.pattern=Yn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),si=k(`$ZodNumberFormat`,(e,t)=>{ir.init(e,t),oi.init(e,t)}),ci=k(`$ZodBoolean`,(e,t)=>{P.init(e,t),e._zod.pattern=Xn,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}}),li=k(`$ZodUnknown`,(e,t)=>{P.init(e,t),e._zod.parse=e=>e}),ui=k(`$ZodNever`,(e,t)=>{P.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function di(e,t){let n=xt(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of xt(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,St(n.issues,t,e),n}}return i(n,a)}}var fi=e=>Array.isArray(e)?e.length:-1;function pi(e,t,n){e.issues.length&&t.issues.push(...yt(n,e.issues)),t.value[n]=e.value}var mi=k(`$ZodArray`,(e,t)=>{P.init(e,t);let n=j.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>pi(t,r,e)));else if(pi(c,r,e),s&&c.issues.length!==0&&T(c))break}return o.length?Promise.all(o).then(()=>r):r},di(e,fi)});function hi(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...yt(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var gi=[];function _i(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:gi,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ot(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function vi(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(T(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>hi(e,n,i,t,d,f))):hi(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var yi=k(`$ZodObject`,(e,t)=>{P.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=He(()=>_i(t));O(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||y(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=$e,o=t.catchall,s,c=j.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(T(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>hi(n,t,e,r,a,o))):hi(s,t,e,r,a,o)}return o?vi(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),bi=k(`$ZodObjectJIT`,(e,t)=>{yi.init(e,t);let n=e._zod.parse,r=He(()=>_i(t)),i=j.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new gr([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
4
|
-
let ${e}_ab = false;
|
|
5
|
-
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
6
|
-
const iss = ${e}.issues[i];
|
|
7
|
-
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
8
|
-
payload.issues.push(iss);
|
|
9
|
-
if (iss.continue !== true) ${e}_ab = true;
|
|
10
|
-
}
|
|
11
|
-
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
12
|
-
payload.value = newResult;
|
|
13
|
-
return payload;
|
|
14
|
-
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Xe(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
15
|
-
const ${n}_present = ${i};
|
|
16
|
-
if (!${n}.issues.length || ${n}_present) {
|
|
17
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (${e}) {
|
|
21
|
-
newResult[${r}] = ${n}.value;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
`)}else f?(o.write(`
|
|
26
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
27
|
-
}
|
|
28
|
-
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
29
|
-
if (${n}.value !== undefined || ${i}) {
|
|
30
|
-
newResult[${r}] = ${n}.value;
|
|
31
|
-
}
|
|
32
|
-
`)):o.write(`
|
|
33
|
-
const ${n}_present = ${i};
|
|
34
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
35
|
-
}
|
|
36
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
37
|
-
payload.issues.push({
|
|
38
|
-
code: "invalid_type",
|
|
39
|
-
expected: "nonoptional",
|
|
40
|
-
input: undefined,
|
|
41
|
-
path: [${r}]
|
|
42
|
-
});
|
|
43
|
-
if (ctx && ctx.abortEarly) {
|
|
44
|
-
payload.value = newResult;
|
|
45
|
-
return payload;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (${n}_present) {
|
|
50
|
-
newResult[${r}] = ${n}.value;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=$e,c=!j.jitless,l=c&&et.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?vi([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function xi(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=>!T(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=>E(e,r,M())))}),t)}var Si=k(`$ZodUnion`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),O(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),O(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),O(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>We(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=>xi(t,r,e,i)):xi(o,r,e,i)}});function Ci(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var wi=k(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Si.init(e,t);let n=e._zod.parse;O(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||y(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=Ke(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=He(()=>Ci(t));e._zod.parse=(i,a)=>{let o=i.value;if(!$e(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Ti=k(`$ZodIntersection`,(e,t)=>{P.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])=>Di(e,t,n)):Di(e,i,a)}});function Ei(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(tt(e)&&tt(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Ei(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=Ei(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 Di(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Ei(t.value,n.value);if(!c.valid){if(T(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Oi=k(`$ZodRecord`,(e,t)=>{P.init(e,t);let n=j.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!tt(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>E(e,i,M())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...yt(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...yt(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Yn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>E(e,i,M())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...yt(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...yt(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),ki=k(`$ZodEnum`,(e,t)=>{P.init(e,t);let n=Re(t.entries),r=new Set(n);e._zod.values=r,O(e,`pattern`,e=>{let t=Re(e.def.entries).filter(e=>rt.has(typeof e));return RegExp(t.length?`^(${t.map(e=>it(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ai=k(`$ZodLiteral`,(e,t)=>{P.init(e,t);let n=new Set(t.values);e._zod.values=n,O(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?it(e):e?it(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),ji=k(`$ZodTransform`,(e,t)=>{P.init(e,t),e._zod.optin=`optional`,j.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ut(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new A;return n.value=i,n}});function Mi(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ni=k(`$ZodOptional`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${We(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Mi(e,t)):Mi(e,r)}return t.innerType._zod.run(e,n)}}),Pi=k(`$ZodExactOptional`,(e,t)=>{Ni.init(e,t),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Fi=k(`$ZodNullable`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${We(t.source)}|null)$`):void 0}),O(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Ii=k(`$ZodDefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Li(e,t)):Li(r,t)}});function Li(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Ri=k(`$ZodPrefault`,(e,t)=>{P.init(e,t),e._zod.optin=`defaulted`,O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),zi=k(`$ZodNonOptional`,(e,t)=>{P.init(e,t),O(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Bi(t,e)):Bi(i,e)}});function Bi(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 Vi(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>E(e,r,M()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Hi=k(`$ZodCatch`,(e,t)=>{P.init(e,t),O(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),O(e,`optout`,e=>e.def.innerType._zod.optout),O(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Vi(e,r,t,n)):Vi(e,r,t,n)}}),Ui=k(`$ZodPipe`,(e,t)=>{P.init(e,t),O(e,`values`,e=>e.def.in._zod.values),O(e,`optin`,e=>e.def.in._zod.optin),O(e,`optout`,e=>e.def.out._zod.optout),O(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Wi(e,t.in,n)):Wi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Wi(e,t.out,n)):Wi(r,t.out,n)}});function Wi(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Gi=k(`$ZodReadonly`,(e,t)=>{P.init(e,t),O(e,`propValues`,e=>e.def.innerType._zod.propValues),O(e,`values`,e=>e.def.innerType._zod.values),O(e,`optin`,e=>e.def.innerType?._zod?.optin),O(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ki):Ki(r)}});function Ki(e){return e.memo||(e.value=Object.freeze(e.value)),e}var qi=k(`$ZodCustom`,(e,t)=>{N.init(e,t),P.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=>Ji(t,n,r,e));Ji(i,n,r,e)}});function Ji(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(Dt(e))}}var Yi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Xi=`~memo`,Zi=[];function Qi(e){return typeof e==`object`&&!!e}function $i(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var ea=new WeakMap,ta=0,na=1,ra=2;function ia(e,t,n){let r=ea.get(e);if(r!==void 0)return r?ra:ta;if(t.has(e))return ra;t.add(e);let i=ta,a=e=>{if(i!==ra&&e?._zod){let r=ia(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=ta;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?na:o.value?._zod?ia(o.value,t,n):ta;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Ke(c);s(e?o(e,!0):na),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?ia(r,t,!1):na);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),aa(e,i)}function aa(e,t){return t!==na&&ea.set(e,t===ra),t}function oa(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var sa,ca=[],la={alloc(e,t,n){let r=sa;if(!r)return n;sa=void 0;let i={value:n,issues:null};return r.set(t.value,i),ca.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&da(n,e.value))throw new Yi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=ia(e,new Set,!1);if(i===ta)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===ra||r?n=!0:r=!0}let l=s.value;if(!Qi(l))return t(s,c);let u=c[Xi];u||(u={buckets:new WeakMap,backEdges:void 0},c[Xi]=u);let d;i===c?d=a:(d=oa(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...$i(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;sa=d;let p=ca.length,m=t(s,c);sa=void 0;let h=ca.length>p?ca.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?$i(e.issues):Zi),e)):(h&&(h.issues=m.issues.length?$i(m.issues):Zi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function ua(){return la}function da(e,t){let n=e[Xi]?.backEdges;return n!==void 0&&Qi(t)&&n.has(t)}var fa=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Et(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${at(e.values[0])}`:`Invalid option: expected one of ${ze(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ze(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function pa(){return{localeError:fa()}}var ma,ha=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ga(){return new ha}(ma=globalThis).__zod_globalRegistry??(ma.__zod_globalRegistry=ga());var _a=globalThis.__zod_globalRegistry;function va(e){return e.checks&&=[...e.checks],e}function ya(e,t){return new e(va({type:`string`,...w(t)}))}function ba(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...w(t)})}function xa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...w(t)})}function Sa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...w(t)})}function Ca(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...w(t)})}function wa(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...w(t)})}function Ta(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...w(t)})}function Ea(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...w(t)})}function Da(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...w(t)})}function Oa(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...w(t)})}function ka(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...w(t)})}function Aa(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...w(t)})}function ja(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...w(t)})}function Ma(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...w(t)})}function Na(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...w(t)})}function Pa(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...w(t)})}function Fa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...w(t)})}function Ia(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...w(t)})}function La(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...w(t)})}function Ra(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...w(t)})}function za(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...w(t)})}function Ba(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...w(t)})}function Va(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...w(t)})}function Ha(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...w(t)})}function Ua(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...w(t)})}function Wa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...w(t)})}function Ga(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...w(t)})}function Ka(e,t){return new e(va({type:`number`,checks:[],...w(t)}))}function qa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...w(t)})}function Ja(e,t){return new e({type:`boolean`,...w(t)})}function Ya(e){return new e({type:`unknown`})}function Xa(e,t){return new e({type:`never`,...w(t)})}function Za(e,t){return new tr({check:`less_than`,...w(t),value:e,inclusive:!1})}function Qa(e,t){return new tr({check:`less_than`,...w(t),value:e,inclusive:!0})}function $a(e,t){return new nr({check:`greater_than`,...w(t),value:e,inclusive:!1})}function eo(e,t){return new nr({check:`greater_than`,...w(t),value:e,inclusive:!0})}function to(e,t){return new rr({check:`multiple_of`,...w(t),value:e})}function no(e,t){return new ar({check:`max_length`,...w(t),maximum:e})}function ro(e,t){return new or({check:`min_length`,...w(t),minimum:e})}function io(e,t){return new sr({check:`length_equals`,...w(t),length:e})}function ao(e,t){return new lr({check:`string_format`,format:`regex`,...w(t),pattern:e})}function oo(e){return new ur({check:`string_format`,format:`lowercase`,...w(e)})}function so(e){return new dr({check:`string_format`,format:`uppercase`,...w(e)})}function co(e,t){return new fr({check:`string_format`,format:`includes`,...w(t),includes:e})}function lo(e,t){return new pr({check:`string_format`,format:`starts_with`,...w(t),prefix:e})}function uo(e,t){return new mr({check:`string_format`,format:`ends_with`,...w(t),suffix:e})}function fo(e){return new hr({check:`overwrite`,tx:e})}function po(e){return fo(t=>t.normalize(e))}function mo(){return fo(e=>e.trim())}function ho(){return fo(e=>e.toLowerCase())}function go(){return fo(e=>e.toUpperCase())}function _o(){return fo(e=>Ze(e))}function vo(e,t,n){return new e({type:`array`,element:t,...w(n)})}function yo(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...w(n)})}function bo(e,t){let n=xo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Dt(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Dt(r))}},e(t.value,t)),t);return n}function xo(e,t){let n=new N({check:`custom`,...w(t)});return n._zod.check=e,n}function So(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&y(e,t,n[t]);return e}function Co(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??_a,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function I(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function L(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,L(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&So(o.schema,c),t.io===`input`&&R(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 wo(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function To(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${wo(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+wo(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>
|
|
54
|
-
|
|
55
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function Eo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Eo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Do=new Set([`type`,`properties`,`required`,`additionalProperties`]),Oo=[`oneOf`,`anyOf`];function ko(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Ao(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Do.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ko(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}y(n,r,e.length===1?e[0]:Ao(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ko(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function jo(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Do)if(t in e)return;let n=t.filter(e=>Oo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Ao(t);else{let e=n[0],i=Oo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Ao([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,So(e,r))}function Mo(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)):So(i,s),So(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Eo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])jo(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}So(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,y(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Po(t,`input`,e.processors),output:Po(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function R(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 R(r.element,n);if(r.type===`set`)return R(r.valueType,n);if(r.type===`lazy`)return R(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return R(r.innerType,n);if(r.type===`intersection`)return R(r.left,n)||R(r.right,n);if(r.type===`record`||r.type===`map`)return R(r.keyType,n)||R(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:R(r.in,n)||R(r.out,n);if(r.type===`object`){for(let e in r.shape)if(R(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(R(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(R(e,n))return!0;return!!(r.rest&&R(r.rest,n))}return!1}var No=(e,t={})=>n=>{let r=Co({...n,processors:t});return L(e,r),To(r,e),Mo(r,e)},Po=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Co({...i??{},target:a,io:t,processors:n});return L(e,o),To(o,e),Mo(o,e)},Fo=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Io=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},Lo=(e,t)=>{Fo(e,`minimum`,t),Io(e,`maximum`,t)},Ro=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},zo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Bo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Vo=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Ho=(e,t)=>Fo(e,`minimum`,t.minimum),Uo=(e,t)=>Io(e,`maximum`,t.maximum),Wo=e=>(t,n)=>{Vo(t,n.format);let[r,i]=e[n.format];Fo(t,`minimum`,r),Io(t,`maximum`,i)},Go={greater_than:(e,t)=>Fo(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Io(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ro(e,t.value),number_format:Wo(st),bigint_format:Wo(ct),min_length:Ho,max_length:Uo,length_equals:(e,t)=>Lo(e,t.length),min_size:Ho,max_size:Uo,size_equals:(e,t)=>Lo(e,t.size),string_format:(e,t)=>{Vo(e,t.format),t.pattern&&zo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Bo(e,t.mime)};function z(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Go[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Fo(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Fo(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Io(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Io(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ro(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Bo(t,i.mime);for(let e of i.patterns??[])zo(t,e);return t}var Ko={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},qo=new Map([[Qr,Ln],[ei,Rn]]),Jo=e=>qo.get(e)??e,Yo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=z(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Ko[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Jo);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}))])}},Xo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=z(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):I(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Zo=(e,t,n,r)=>{n.type=`boolean`},Qo=(e,t,n,r)=>{n.not={}},$o=(e,t,n,r)=>{let i=e._zod.def,a=Re(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},es=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(I(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(I(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},ts=(e,t,n,r)=>{I(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ns=(e,t,n,r)=>{I(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},rs=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=z(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=L(a.element,t,{...r,path:[...r.path,`items`]})};function is(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?is(t.out):t.type===`catch`?is(t.innerType):e._zod.optin}var as=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&I(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)y(i.properties,e,L(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?is(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=L(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},os=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>L(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},ss=(e,t,n,r)=>{let i=e._zod.def,a=L(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=L(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function cs(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=cs(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>cs(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Yn:Jn).source)),p}var ls=new WeakMap;function us(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of ls.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=cs(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var ds=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=z(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=L(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)y(i.patternProperties,Jo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=L(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=ls.get(t);n||(n=[],ls.set(t,n),t.deferred.push(()=>us(t))),n.push(e)}i.additionalProperties=L(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&is(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},fs=(e,t,n,r)=>{let i=e._zod.def,a=L(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`}]},ps=(e,t,n,r)=>{let i=e._zod.def;L(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ms=Symbol();function hs(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(I(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),ms):JSON.parse(o)}var gs=(e,t,n,r)=>{let i=e._zod.def;L(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=hs(i.defaultValue,e,t,n,r);o!==ms&&(n.default=o)},_s=(e,t,n,r)=>{let i=e._zod.def;L(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=hs(i.defaultValue,e,t,n,r);o!==ms&&(n._prefault=o)},vs=(e,t,n,r)=>{let i=e._zod.def;L(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{I(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},ys=(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;L(o,t,r);let s=t.seen.get(e);s.ref=o},bs=(e,t,n,r)=>{let i=e._zod.def;L(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},xs=(e,t,n,r)=>{let i=e._zod.def;L(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ss=new WeakSet([Object.prototype,Error.prototype]);function Cs(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var B=k(`ZodError`,(e,t)=>{Xt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Ss.has(n)||(Ss.add(n),Cs(n,`format`,e=>t=>$t(e,t)),Cs(n,`flatten`,e=>t=>Qt(e,t)),Cs(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Be,2)}),Cs(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Be,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),ws=tn(B),Ts=nn(B),Es=rn(B),Ds=on(B),Os=fn(B),ks=pn(B),As=mn(B),js=hn(B),Ms=gn(B),Ns=_n(B),Ps=vn(B),Fs=yn(B);function Is(){j.localeError||M(pa())}function Ls(){j.memoizer||M({memoizer:ua()})}var V=k(`ZodType`,(e,t)=>(Is(),P.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(S(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 C(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Xc(e,t))},superRefine(e,t){return this.check(Zc(e,t))},overwrite(e){return this.check(fo(e))},optional(){return Mc(this)},exactOptional(){return Pc(this)},nullable(){return Ic(this)},nullish(){return Mc(Ic(this))},nonoptional(e){return Hc(this,e)},array(){return K(this)},or(e){return bc([this,e])},and(e){return wc(this,e)},transform(e){return Kc(this,Ac(e))},default(e){return Rc(this,e)},prefault(e){return Bc(this,e)},catch(e){return Wc(this,e)},pipe(e){return Kc(this,e)},readonly(){return Jc(this)},describe(e){let t=this.clone();return _a.add(t,{description:e}),t},meta(...e){if(e.length===0)return _a.get(this);let t=this.clone();return _a.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return kt(this,`~standard`,{...br(this),jsonSchema:{input:Po(this,`input`),output:Po(this,`output`)}})},set"~standard"(e){D(this,`~standard`,e)},parse:function e(t,n){return ws(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Ts(this,t,n,{callee:e})},safeParse(e,t){return Es(this,e,t)},async safeParseAsync(e,t){return Ds(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){D(this,`spa`,e)},validate(e,t){return ln(this,e,t)},validateAsync(e,t){return dn(this,e,t)},encode:function e(t,n){return Os(this,t,n,{callee:e})},decode:function e(t,n){return ks(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await As(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await js(this,t,n,{callee:e})},safeEncode(e,t){return Ms(this,e,t)},safeDecode(e,t){return Ns(this,e,t)},async safeEncodeAsync(e,t){return Ps(this,e,t)},async safeDecodeAsync(e,t){return Fs(this,e,t)},toJSONSchema(e){return No(this,{})(e)},get description(){return _a.get(this)?.description},get _def(){return this._zod.def}}),Rs=k(`_ZodString`,(e,t)=>{xr.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r)},At({format:e=>z(e).format??null,minLength:e=>z(e).minimum??null,maxLength:e=>z(e).maximum??null},{regex(...e){return this.check(ao(...e))},includes(...e){return this.check(co(...e))},startsWith(...e){return this.check(lo(...e))},endsWith(...e){return this.check(uo(...e))},min(...e){return this.check(ro(...e))},max(...e){return this.check(no(...e))},length(...e){return this.check(io(...e))},nonempty(...e){return this.check(ro(1,...e))},lowercase(e){return this.check(oo(e))},uppercase(e){return this.check(so(e))},trim(){return this.check(mo())},normalize(...e){return this.check(po(...e))},toLowerCase(){return this.check(ho())},toUpperCase(){return this.check(go())},slugify(){return this.check(_o())}})),zs=k(`ZodString`,(e,t)=>{xr.init(e,t),Rs.init(e,t)},{email(e){return this.check(ba(Ws,e))},url(e){return this.check(Ea(qs,e))},jwt(e){return this.check(Va(cc,e))},emoji(e){return this.check(Da(Js,e))},guid(e){return this.check(xa(Gs,e))},uuid(e){return this.check(Sa(Ks,e))},uuidv4(e){return this.check(Ca(Ks,e))},uuidv6(e){return this.check(wa(Ks,e))},uuidv7(e){return this.check(Ta(Ks,e))},nanoid(e){return this.check(Oa(Ys,e))},cuid(e){return this.check(ka(Xs,e))},cuid2(e){return this.check(Aa(Zs,e))},ulid(e){return this.check(ja(Qs,e))},base64(e){return this.check(Ra(ac,e))},base64url(e){return this.check(za(oc,e))},xid(e){return this.check(Ma($s,e))},ksuid(e){return this.check(Na(ec,e))},ipv4(e){return this.check(Pa(tc,e))},ipv6(e){return this.check(Fa(nc,e))},cidrv4(e){return this.check(Ia(rc,e))},cidrv6(e){return this.check(La(ic,e))},e164(e){return this.check(Ba(sc,e))},datetime(e){return this.check(Ha(Bs,e))},date(e){return this.check(Ua(Vs,e))},time(e){return this.check(Wa(Hs,e))},duration(e){return this.check(Ga(Us,e))}});function H(e){return ya(zs,e)}var U=k(`ZodStringFormat`,(e,t)=>{F.init(e,t),Rs.init(e,t)}),Bs=k(`ZodISODateTime`,(e,t)=>{Br.init(e,t),U.init(e,t)}),Vs=k(`ZodISODate`,(e,t)=>{Vr.init(e,t),U.init(e,t)}),Hs=k(`ZodISOTime`,(e,t)=>{Hr.init(e,t),U.init(e,t)}),Us=k(`ZodISODuration`,(e,t)=>{Ur.init(e,t),U.init(e,t)}),Ws=k(`ZodEmail`,(e,t)=>{wr.init(e,t),U.init(e,t)}),Gs=k(`ZodGUID`,(e,t)=>{Sr.init(e,t),U.init(e,t)}),Ks=k(`ZodUUID`,(e,t)=>{Cr.init(e,t),U.init(e,t)}),qs=k(`ZodURL`,(e,t)=>{Mr.init(e,t),U.init(e,t)}),Js=k(`ZodEmoji`,(e,t)=>{Nr.init(e,t),U.init(e,t)}),Ys=k(`ZodNanoID`,(e,t)=>{Pr.init(e,t),U.init(e,t)}),Xs=k(`ZodCUID`,(e,t)=>{Fr.init(e,t),U.init(e,t)}),Zs=k(`ZodCUID2`,(e,t)=>{Ir.init(e,t),U.init(e,t)}),Qs=k(`ZodULID`,(e,t)=>{Lr.init(e,t),U.init(e,t)}),$s=k(`ZodXID`,(e,t)=>{Rr.init(e,t),U.init(e,t)}),ec=k(`ZodKSUID`,(e,t)=>{zr.init(e,t),U.init(e,t)}),tc=k(`ZodIPv4`,(e,t)=>{Wr.init(e,t),U.init(e,t)}),nc=k(`ZodIPv6`,(e,t)=>{qr.init(e,t),U.init(e,t)}),rc=k(`ZodCIDRv4`,(e,t)=>{Jr.init(e,t),U.init(e,t)}),ic=k(`ZodCIDRv6`,(e,t)=>{Xr.init(e,t),U.init(e,t)}),ac=k(`ZodBase64`,(e,t)=>{$r.init(e,t),U.init(e,t)}),oc=k(`ZodBase64URL`,(e,t)=>{ni.init(e,t),U.init(e,t)}),sc=k(`ZodE164`,(e,t)=>{ri.init(e,t),U.init(e,t)}),cc=k(`ZodJWT`,(e,t)=>{ai.init(e,t),U.init(e,t)}),lc=k(`ZodNumber`,(e,t)=>{oi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e.isFinite=!0},At({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=z(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=z(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=z(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>z(e).format??null},{gt(e,t){return this.check($a(e,t))},gte(e,t){return this.check(eo(e,t))},min(e,t){return this.check(eo(e,t))},lt(e,t){return this.check(Za(e,t))},lte(e,t){return this.check(Qa(e,t))},max(e,t){return this.check(Qa(e,t))},int(e){return this.check(dc(e))},safe(e){return this.check(dc(e))},positive(e){return this.check($a(0,e))},nonnegative(e){return this.check(eo(0,e))},negative(e){return this.check(Za(0,e))},nonpositive(e){return this.check(Qa(0,e))},multipleOf(e,t){return this.check(to(e,t))},step(e,t){return this.check(to(e,t))},finite(){return this}}));function W(e){return Ka(lc,e)}var uc=k(`ZodNumberFormat`,(e,t)=>{si.init(e,t),lc.init(e,t)});function dc(e){return qa(uc,e)}var fc=k(`ZodBoolean`,(e,t)=>{ci.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r)});function pc(e){return Ja(fc,e)}var mc=k(`ZodUnknown`,(e,t)=>{li.init(e,t),V.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function G(){return Ya(mc)}var hc=k(`ZodNever`,(e,t)=>{ui.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qo(e,t,n,r)});function gc(e){return Xa(hc,e)}var _c=k(`ZodArray`,(e,t)=>{Ls(),mi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rs(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ro(e,t))},nonempty(e){return this.check(ro(1,e))},max(e,t){return this.check(no(e,t))},length(e,t){return this.check(io(e,t))},unwrap(){return this.element}});function K(e,t){return vo(_c,e,t)}var vc=k(`ZodObject`,(e,t)=>{Ls(),bi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>as(e,t,n,r),It(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return X(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(S(this._zod.def,{catchall:e}))},passthrough(){return this.clone(S(this._zod.def,{catchall:G()}))},loose(){return this.clone(S(this._zod.def,{catchall:G()}))},strict(){return this.clone(S(this._zod.def,{catchall:gc()}))},strip(){return this.clone(S(this._zod.def,{catchall:void 0}))},extend(e){return ft(this,e)},safeExtend(e){return mt(this,e)},merge(e){return ht(this,e)},pick(e){return lt(this,e)},omit(e){return dt(this,e)},partial(...e){return gt(jc,this,e[0])},exactPartial(...e){return gt(Nc,this,e[0],`exactPartial`)},required(...e){return _t(Vc,this,e[0])}});function q(e,t){return new vc({type:`object`,shape:e??{},...w(t)})}function J(e,t){return new vc({type:`object`,shape:e,catchall:gc(),...w(t)})}var yc=k(`ZodUnion`,(e,t)=>{Si.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r),e.options=t.options});function bc(e,t){return new yc({type:`union`,options:e,...w(t)})}var xc=k(`ZodDiscriminatedUnion`,(e,t)=>{yc.init(e,t),wi.init(e,t)});function Sc(e,t,n){return new xc({type:`union`,options:t,discriminator:e,...w(n)})}var Cc=k(`ZodIntersection`,(e,t)=>{Ti.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r)});function wc(e,t){return new Cc({type:`intersection`,left:e,right:t})}var Tc=k(`ZodRecord`,(e,t)=>{Ls(),Oi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Y(e,t,n){return!t||!t._zod?new Tc({type:`record`,keyType:H(),valueType:e,...w(t)}):new Tc({type:`record`,keyType:e,valueType:t,...w(n)})}var Ec=k(`ZodEnum`,(e,t)=>{ki.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$o(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ec({...t,checks:[],...w(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ec({...t,checks:[],...w(r),entries:i})}});function X(e,t){return new Ec({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...w(t)})}var Dc=k(`ZodLiteral`,(e,t)=>{Ai.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Oc(e,t){return new Dc({type:`literal`,values:Array.isArray(e)?e:[e],...w(t)})}var kc=k(`ZodTransform`,(e,t)=>{Ls(),ji.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ns(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Ut(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Dt(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Dt(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Ac(e){return new kc({type:`transform`,transform:e})}var jc=k(`ZodOptional`,(e,t)=>{Ni.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mc(e){return new jc({type:`optional`,innerType:e})}var Nc=k(`ZodExactOptional`,(e,t)=>{Pi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Pc(e){return new Nc({type:`optional`,innerType:e})}var Fc=k(`ZodNullable`,(e,t)=>{Fi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ic(e){return new Fc({type:`nullable`,innerType:e})}var Lc=k(`ZodDefault`,(e,t)=>{Ii.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Rc(e,t){return new Lc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():nt(t)}})}var zc=k(`ZodPrefault`,(e,t)=>{Ri.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_s(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bc(e,t){return new zc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():nt(t)}})}var Vc=k(`ZodNonOptional`,(e,t)=>{zi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Hc(e,t){return new Vc({type:`nonoptional`,innerType:e,...w(t)})}var Uc=k(`ZodCatch`,(e,t)=>{Hi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Wc(e,t){return new Uc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Rt(t)})}var Gc=k(`ZodPipe`,(e,t)=>{Ui.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ys(e,t,n,r),e.in=t.in,e.out=t.out});function Kc(e,t){return new Gc({type:`pipe`,in:e,out:t})}var qc=k(`ZodReadonly`,(e,t)=>{Gi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Jc(e){return new qc({type:`readonly`,innerType:e})}var Yc=k(`ZodCustom`,(e,t)=>{qi.init(e,t),V.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r)});function Xc(e,t={}){return yo(Yc,e,t)}function Zc(e,t){return bo(e,t)}function Qc(e){return Ha(Bs,e)}new Intl.Segmenter(void 0,{granularity:`grapheme`});var $c=H().min(1).describe(`A field of the frontmatter, by its name.`);J({});function el(e){try{return new RegExp(e,`u`),!0}catch{return!1}}J({words:K(H().min(1)).min(1).max(200),reason:H().min(1).max(200).optional().describe(`Why, for the fix.`)}),J({field:$c,min:W().int().min(0).optional(),max:W().int().min(0).optional(),unless:$c.optional()}).refine(e=>e.min!==void 0||e.max!==void 0,{message:`Give min, max or both.`}).refine(e=>e.min===void 0||e.max===void 0||e.min<=e.max,{message:`min is more than max.`}),J({field:$c,pattern:H().min(1).max(500).refine(el,{message:`Not a regular expression.`}),description:H().min(1).max(200).describe(`What the pattern asks for, in words.`)}),J({fields:K($c).min(1)}),new Set(Le);var tl=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function nl(e){return typeof e==`string`&&e.length<=64&&tl.test(e)}var rl=Y(H(),G()).describe(`A JSON Schema, draft 2020-12, of an object.`),il=X([`error`,`warning`]),al=J({rule:H().min(1).describe(`The name of a rule of the catalog that describe_site lists.`),severity:il.default(`error`),params:Y(H(),G()).default({}).describe(`The parameters of the rule, as the catalog describes them.`),id:H().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).optional().describe(`The id of the contract, when a collection lists one rule twice; its name otherwise.`)}),ol=J({props:rl.describe(`The JSON Schema of the props.`),description:H().min(1).optional(),example:H().min(1).optional()}),sl=J({schema:rl.describe(`The JSON Schema of the frontmatter.`),routes:Y(H(),H()).describe(`The public path of an entry in each locale, with :slug: { "en": "/blog/:slug/" }.`),translationGroupField:H().min(1).nullable().default(null),tagsField:H().min(1).nullable().default(null),sortByField:H().min(1).nullable().default(null),components:Y(H(),ol).default({}),rules:K(al).default([]),maxMarkdownBytes:W().int().positive().nullable().default(null),styleGuide:H().nullable().default(null)}),cl=J({name:H().min(1),url:H().min(1).describe(`The https URL that receives each event, signed.`),secret:H().min(1).optional().describe(`The Worker secret that signs the deliveries. Leave it out for Hollware to make one with make_webhook_secret and keep it sealed.`)}),ll=J({locales:K(H().min(1)).min(1),defaultLocale:H().min(1),url:H().min(1).nullable().default(null),styleGuide:H().nullable().default(null),cors:J({origins:K(H().min(1))}).default({origins:[]}),events:J({webhooks:K(cl).default([]),indexNow:J({key:H().min(1)}).nullable().default(null)}).default({webhooks:[],indexNow:null}),collections:Y(H(),sl)}),ul=H().min(1).describe(`A collection of the site, as describe_site lists it.`),dl=H().min(1).describe(`A locale of the site, as describe_site lists it.`),fl=H().max(200).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).describe(`The entry's path segment: lowercase letters and digits joined by hyphens, such as edge-caching-guide.`),Z=H().regex(/^ent_[0-9A-HJKMNP-TV-Z]{26}$/).describe(`The id of an entry (ent_…), as the other operations return it.`),pl=H().regex(/^rev_[0-9A-HJKMNP-TV-Z]{26}$/).describe(`The id of a revision (rev_…).`),ml=W().int().min(1).describe(`The version of the entry you read. A change against an older version answers conflict.`),hl=H().describe(`The whole Markdown file: the YAML frontmatter between two --- lines, then the body. The collection schema in describe_site says what the frontmatter needs.`),gl=X([`draft`,`scheduled`,`published`]),_l=X([`error`,`warning`]),vl=X([`write`,`publish`]),yl=q({contract:H().describe(`The id of the contract.`),severity:_l,path:H().describe(`A JSON Pointer into { frontmatter, body }: /frontmatter/title, or /body with a line.`),message:H(),fix:H().describe(`What to change so that the problem goes away.`),line:W().int().min(1).optional()}),Q=q({ok:pc().describe(`Whether there are no errors. Warnings do not count, but publish asks about them.`),phase:vl,errors:K(yl),warnings:K(yl),contractsHash:H().describe(`A hash of the rules the content was checked against.`)}),bl=q({contract:H(),path:H()}),$=q({id:Z,collection:H(),locale:H(),slug:H(),translationGroup:H().nullable(),status:gl,version:W().int().min(1),frontmatter:Y(H(),G()),tags:K(H()),hasUnpublishedChanges:pc().describe(`Whether the latest revision differs from the published one.`),publishedAt:H().nullable().describe(`When the entry was first published, or null.`),scheduledAt:H().nullable().describe(`When a scheduled entry will be published, or null for one that is not scheduled.`),deletedAt:H().nullable().describe(`When the entry went to the trash, or null for one that is not in the trash.`),updatedAt:H()}),xl=q({revision:pl,verdict:Q.describe(`The verdict of the publish phase.`),acknowledged:K(bl).describe(`The warnings acknowledged to publish.`),at:H()}),Sl=q({nodes:K(G()),frontmatter:Y(H(),G()),meta:Y(H(),G())}),Cl=$.extend({revision:pl.describe(`The revision this view shows.`),verdict:Q.describe(`The verdict of the contracts when this revision was written.`),lastPublication:xl.nullable(),markdown:H().optional(),document:Sl.optional(),html:H().optional()}),wl=H().regex(/^rvw_[0-9A-HJKMNP-TV-Z]{26}$/).describe(`The id of a review (rvw_…), as publish and list_reviews return it.`),Tl=X([`pending`,`approved`,`changes_requested`,`cancelled`]),El=q({id:wl,entryId:Z,revision:pl.describe(`The revision asked for.`),status:Tl.describe(`pending until someone decides; cancelled when a new revision of the entry is saved.`),requestedBy:H().describe(`The user who asked.`),requestedByName:H().nullable().describe(`The name of the user who asked, if they gave one.`),requestedAt:H(),decidedBy:H().nullable(),decidedAt:H().nullable(),note:H().nullable().describe(`What the reviewer asked to change, or null.`)}),Dl=q({id:H(),author:H().describe(`The user who wrote it, or whose token their agent used.`),authorName:H().nullable(),client:H().nullable().describe(`The name the client gave, such as hollware-agents for the agents; null for none.`),body:H(),at:H()}),Ol=q({currentVersion:W().int().min(1),headRevision:pl}),kl=X([`markdown`,`document`,`html`]),Al=X([`fulltext`,`semantic`,`hybrid`]),jl=q({name:H(),description:H().nullable(),example:H().nullable(),props:Y(H(),G()).describe(`The JSON Schema of the props.`)}),Ml=q({id:H(),severity:_l,phases:K(vl),description:H()}),Nl=q({name:H(),schema:Y(H(),G()).describe(`The JSON Schema of the frontmatter.`),routes:Y(H(),H()).describe(`The public path of an entry, per locale.`),translationGroupField:H().nullable().describe(`The frontmatter field that the translations of an entry share, or null.`),tagsField:H().nullable().describe(`The frontmatter field with the tags, or null.`),sortByField:H().nullable().describe(`The frontmatter field, a date, that orders published listings, newest first; null when they follow the date of first publication.`),components:K(jl),contracts:K(Ml),maxMarkdownBytes:W().int(),styleGuide:H().nullable()}),Pl=q({key:H(),locales:K(H()),defaultLocale:H(),url:H().nullable().describe(`The public origin of the site, which starts the URL of each entry, or null.`),styleGuide:H().nullable(),collections:K(Nl)});J({}),q({outcome:X([`ok`]),site:Pl}),J({collection:ul,locale:dl.optional(),tag:H().min(1).optional(),status:gl.optional(),trashed:pc().optional().describe(`true to list the entries in the trash, last trashed first, instead of the others.`),limit:W().int().min(1).max(100).default(20),cursor:H().min(1).optional()}),q({outcome:X([`ok`]),entries:K($),nextCursor:H().nullable().describe(`The cursor of the next page, or null.`)}),J({query:H().trim().min(1).max(200).describe(`The words to find, or a question; punctuation is ignored by full text.`),collection:ul.optional(),locale:dl.optional(),limit:W().int().min(1).max(50).default(10),mode:Al.optional().describe(`fulltext, semantic or hybrid; hybrid when not given. Semantic and hybrid need the semantic search of the deployment: without it the search is full text, and mode in the answer says so.`)}),q({outcome:X([`ok`]),mode:Al.describe(`How the search was made.`),results:K(q({entry:$,snippet:H().describe(`The words around the match, the words found between [ and ]; for a match by meaning, the start of the closest part.`),score:W().describe(`How well it matches: higher is better.`)}))}),J({collection:ul,locale:dl,slug:fl,formats:K(kl).min(1).default([`markdown`]).describe(`What to return of the revision: markdown, the Comark document, or html.`),published:pc().default(!1).describe(`Read the revision that is live instead of the latest one: not_found when the entry is not published.`),related:pc().default(!1).describe(`Also return the published entries closest to this one by meaning, in its collection and locale, closest first. Needs the semantic search of the deployment; empty without it.`)}),q({outcome:X([`ok`,`not_found`]),entry:Cl.optional(),related:K($).optional().describe(`When related was asked for.`)}),J({collection:ul,translationGroup:H().min(1)}),q({outcome:X([`ok`,`not_found`]),entries:K($).optional()}),J({collection:ul,locale:dl,slug:fl,markdown:hl}),q({outcome:X([`saved`,`refused`,`in_trash`]),entry:$.optional().describe(`With saved, the new draft; with in_trash, the entry in the trash that holds it.`),verdict:Q.optional()}),J({id:Z,version:ml,markdown:hl}),q({outcome:X([`saved`,`unchanged`,`conflict`,`not_found`,`refused`]),entry:$.optional(),verdict:Q.optional(),conflict:Ol.optional()}),J({collection:ul,locale:dl,slug:fl,markdown:hl}),q({outcome:X([`ok`]),verdict:Q}),J({id:Z,version:ml,acknowledgeWarnings:K(bl).default([]).describe(`The warnings you accept, as needs_acknowledgement listed them.`),group:K(J({id:Z,version:ml})).max(99).default([]).describe(`Other entries to publish in the same step, each with the version you read: all of them are published, or none. A link between two of them counts as published, and an acknowledged warning holds for every entry that reports it.`),publishAt:Qc({offset:!0}).optional().describe(`Publish at this time instead of now, as an ISO 8601 date and time: the entry is checked now and waits as scheduled, and it is published within a minute of the time, if nobody changes it before. One entry at a time, never with group.`)}),q({outcome:X([`published`,`scheduled`,`blocked`,`needs_acknowledgement`,`pending_review`,`conflict`,`not_found`]),entry:$.optional(),verdict:Q.optional(),conflict:Ol.optional(),review:El.optional().describe(`With pending_review: the request, as list_reviews shows it.`),failedEntry:Z.optional().describe(`In a group, the entry that kept the group from being published: blocked, stale, missing, or with a warning to acknowledge.`)}),J({id:Z}),q({outcome:X([`unpublished`,`not_found`]),entry:$.optional()}),J({id:Z,version:ml}),q({outcome:X([`trashed`,`published`,`conflict`,`not_found`]),entry:$.optional(),conflict:Ol.optional()}),J({id:Z}),q({outcome:X([`restored`,`not_trashed`,`not_found`]),entry:$.optional()}),J({status:Tl.default(`pending`),limit:W().int().min(1).max(100).default(50)}),q({outcome:X([`ok`]),reviews:K(El.extend({entry:$,comments:K(Dl).describe(`What was said about it, oldest first.`)}))}),J({id:wl,acknowledgeWarnings:K(bl).default([]).describe(`Warnings you accept besides those the request acknowledged.`)}),q({outcome:X([`published`,`blocked`,`needs_acknowledgement`,`not_pending`,`not_found`]),review:El.optional(),entry:$.optional(),verdict:Q.optional()}),J({id:Z,version:ml,acknowledgeWarnings:K(bl).default([]).describe(`The warnings you accept, as needs_acknowledgement listed them.`)}),q({outcome:X([`pending_review`,`blocked`,`needs_acknowledgement`,`conflict`,`not_found`]),entry:$.optional(),verdict:Q.optional(),conflict:Ol.optional(),review:El.optional().describe(`With pending_review: the request, as list_reviews shows it.`)}),J({id:wl,body:H().trim().min(1).max(4e3).describe(`The comment, in Markdown.`)}),q({outcome:X([`commented`,`not_pending`,`not_found`]),comment:Dl.optional()}),J({id:wl,note:H().trim().min(1).max(4e3).describe(`What to change, for the author.`)}),q({outcome:X([`changes_requested`,`not_pending`,`not_found`]),review:El.optional()}),J({days:W().int().min(1).max(90).default(30).describe(`How many days back to count.`),limit:W().int().min(1).max(50).default(10)}),q({outcome:X([`ok`,`unavailable`]),since:H().optional().describe(`The start of the count, in ISO 8601.`),pages:K(q({path:H(),views:W().describe(`Page views, sampling accounted for.`),entry:$.nullable().describe(`The published entry at that path, or null.`)})).optional()});var Fl=H().refine(nl,{message:`Not a site key: lowercase words joined by hyphens, such as my-site.`}).describe(`The key of a site: lowercase letters and digits joined by hyphens, such as my-site.`),Il=W().int().min(0).describe(`The version of the structure you read with get_structure. Another one answers conflict.`),Ll=pc().default(!1).describe(`true to go ahead when needs_confirmation listed what the change does to existing entries.`),Rl=q({path:H().describe(`Where, from the root: sites.<key>.collections.<name>.schema.`),message:H(),fix:H()}),zl=q({removedCollections:K(q({name:H(),entries:W().int()})).describe(`Collections the change removes, with how many entries each holds.`),removedLocales:K(q({locale:H(),entries:W().int()})).describe(`Locales the change removes, with how many entries each holds.`),refused:K(q({collection:H(),entries:W().int().describe(`Entries whose latest frontmatter the new schema refuses.`),examples:K(H()).describe(`A few of their slugs.`)})).describe(`Collections whose new schema refuses entries they hold; they stay, and their next write is checked against it.`)}),Bl=q({outcome:X([`updated`,`unchanged`,`invalid`,`needs_confirmation`,`conflict`]),version:W().int().optional().describe(`The version of the structure now.`),problems:K(Rl).optional().describe(`With invalid: every problem, each with its fix.`),impact:zl.optional().describe(`With needs_confirmation: what the change would do.`),currentVersion:W().int().optional().describe(`With conflict: the version to read again.`)});J({}),q({outcome:X([`ok`]),site:H(),version:W().int(),definition:ll,catalog:K(q({name:H(),description:H(),params:Y(H(),G()).describe(`The JSON Schema of its parameters.`)}))}),J({version:Il,definition:ll,confirm:Ll}),Bl.describe(`What became of the definition.`),J({version:Il,name:H().regex(/^[a-z][a-z0-9-]*$/).describe(`The name of the collection: lowercase letters, digits and hyphens, such as blog.`),collection:sl.nullable().describe(`The collection, or null to remove it.`),confirm:Ll}),Bl.describe(`What became of the collection.`),J({key:Fl,definition:ll}),q({outcome:X([`created`,`taken`,`invalid`]),version:W().int().optional(),problems:K(Rl).optional().describe(`With invalid: every problem, each with its fix.`)}),J({key:Fl,confirm:Ll}),q({outcome:X([`trashed`,`needs_confirmation`,`not_found`]),entries:W().int().optional().describe(`With needs_confirmation: the entries the site holds.`)}),J({key:Fl}),q({outcome:X([`restored`,`not_found`])}),J({webhook:H().min(1).describe(`The name of the webhook, as the definition of the site has it.`)}),q({outcome:X([`made`,`not_found`,`unavailable`]),secret:H().optional().describe(`With made: the secret, shown this once.`)}),new TextEncoder;var Vl={id:H(),site:H(),at:H(),cacheTags:K(H())};Sc(`kind`,[q({...Vl,kind:X([`entry.published`,`entry.unpublished`]),entry:q({id:H(),collection:H(),locale:H(),slug:H(),translationGroup:H().nullable()}),path:H().nullable(),url:H().nullable()}),q({...Vl,kind:Oc(`site.changed`)})]);export{g as n,ie as r,sl as t};
|