cueframe 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/README.md +41 -1
  2. package/dist/analyze-NKSULY3V.js +2 -0
  3. package/dist/chunk-CTELK3ZK.js +12 -0
  4. package/dist/chunk-MCQRX24V.js +2 -0
  5. package/dist/cueframe.js +109 -40
  6. package/{skills → dist/skills}/add-music-bed/SKILL.md +6 -16
  7. package/{skills → dist/skills}/brand-reel/SKILL.md +6 -16
  8. package/{skills → dist/skills}/clip-a-talking-head/SKILL.md +12 -17
  9. package/{skills → dist/skills}/composing-video/SKILL.md +20 -8
  10. package/{skills → dist/skills}/cueframe-brand-demo/SKILL.md +5 -0
  11. package/{skills → dist/skills}/cueframe-cli/SKILL.md +8 -2
  12. package/dist/skills/cueframe-component-authoring/SKILL.md +167 -0
  13. package/{skills → dist/skills}/cueframe-compose-loop/SKILL.md +38 -30
  14. package/dist/skills/cueframe-compose-loop/references/preview-workflow.md +37 -0
  15. package/dist/skills/cueframe-connect/SKILL.md +25 -0
  16. package/{skills → dist/skills}/cueframe-product-video/SKILL.md +11 -0
  17. package/dist/skills/cueframe-scene-shot/SKILL.md +66 -0
  18. package/{skills → dist/skills}/cueframe-storyboard/SKILL.md +6 -1
  19. package/{skills → dist/skills}/every-format-from-one-edit/SKILL.md +5 -16
  20. package/{skills → dist/skills}/extracting-brand-kits/SKILL.md +6 -3
  21. package/{skills → dist/skills}/launch-video/SKILL.md +5 -16
  22. package/{skills → dist/skills}/make-a-social-reel/SKILL.md +5 -15
  23. package/{skills → dist/skills}/rebrand-a-video/SKILL.md +5 -16
  24. package/{skills → dist/skills}/video-craft-standards/SKILL.md +6 -0
  25. package/dist/supportedAgents.js +1 -1
  26. package/package.json +18 -15
  27. package/dist/analyze-4EGOBMRV.js +0 -2
  28. package/dist/chunk-3QSA3EBY.js +0 -2
  29. package/dist/chunk-QKQNZIRI.js +0 -12
  30. package/skills/_connect.md +0 -12
  31. package/skills/cueframe-component-authoring/SKILL.md +0 -68
package/dist/cueframe.js CHANGED
@@ -1,30 +1,95 @@
1
1
  #!/usr/bin/env node
2
- import{A as J,B as R,C as Ot,a as Z,b as St,c as W,d as Ct,e as jt,f as Tt,g as $t,h as Ve,i as Be,j as oe,k as Se,l as Rt,m as Me,n as p,o as _,p as U,q as m,r as Ce,s as qe,t as T,u as O,v as P,w as h,x as $,y as x,z as A}from"./chunk-QKQNZIRI.js";import{a as qr}from"./chunk-3QSA3EBY.js";import{Command as Ss}from"commander";import{existsSync as ut,mkdirSync as Jr,readFileSync as Gr,writeFileSync as Hr,readdirSync as Kr,statSync as Yr}from"fs";import{homedir as Xr}from"os";import{dirname as At,join as Je}from"path";import{fileURLToPath as Qr}from"url";import{agents as en,detectGlobalAgents as It,upsertServer as tn}from"add-mcp";var Ge="cueframe";function rn(){let t=At(Qr(import.meta.url));for(let e=0;e<8;e++){let r=Je(t,"skills");if(ut(r)&&Yr(r).isDirectory())return r;let n=At(t);if(n===t)break;t=n}return null}function nn(t,e){let r=`> Installed ${e} by \`npx -y cueframe install\`. Skills and tools change often \u2014
3
- > if that date is more than a week old, run \`npx -y cueframe install\` to refresh.
4
- `,n=t.match(/^---\n[\s\S]*?\n---\n/);return n?`${n[0]}
5
- ${r}${t.slice(n[0].length)}`:`${r}
6
- ${t}`}function on(t){let e=rn();e||(x(t,"install",new Error("Bundled skills/ directory not found"),p.UserError),m(p.UserError));let r=new Date().toISOString().slice(0,10),n=[],o=[];for(let s of Kr(e)){let i=Je(e,s,"SKILL.md");if(!ut(i))continue;let a=Je(Xr(),".claude","skills",s),u=Je(a,"SKILL.md");if(ut(u)&&!t.force){o.push(u);continue}Jr(a,{recursive:!0}),Hr(u,nn(Gr(i,"utf8"),r),"utf8"),n.push(u)}return{installed:n,skipped:o}}function sn(t){return(en[t]?.supportedTransports??[]).includes("http")}async function an(t){return(await It()).map(r=>{if(!sn(r))return{agent:r,wired:!1,error:"speaks stdio only \u2014 CueFrame\u2019s MCP server is remote HTTP"};try{let n=tn(r,Ge,{type:"http",url:t});return{agent:r,wired:n.success,path:n.path,error:n.error}}catch(n){return{agent:r,wired:!1,error:n instanceof Error?n.message:String(n)}}})}async function Pt(t){let e=`${Ce(t.target)}/v1/mcp`;if(t.dryRun){let s=await It();$(t,{ok:!0,dryRun:!0,mcpUrl:e,wouldWire:s,serverName:Ge},()=>{console.log(`Would wire MCP server "${Ge}" \u2192 ${e} into:`),s.length===0&&console.log(" (no agents detected on this machine)");for(let i of s)console.log(` \u2192 ${i}`);console.log("Would install the CueFrame agent skills into ~/.claude/skills"),console.log("Dry run \u2014 nothing was written.")});return}let r=await an(e),{installed:n,skipped:o}=on(t);n.length===0&&o.length===0&&r.length===0&&(x(t,"install",new Error("No agents detected and no skills found \u2014 nothing to install"),p.UserError),m(p.UserError)),$(t,{ok:!0,mcpUrl:e,agents:r,skills:n,skipped:o},()=>{if(console.log(`\u2713 CueFrame MCP server (${e})`),r.length===0)console.log(" No agents detected on this machine. Add it manually:"),console.log(` claude mcp add --transport http ${Ge} ${e}`),console.log(` \u2026or add the MCP server ${e} as a custom connector.`);else for(let s of r)console.log(s.wired?` \u2192 wired ${s.agent}`:` \u2717 ${s.agent}: ${s.error??"failed"}`);console.log(`\u2713 Installed ${n.length} CueFrame skill(s) into ~/.claude/skills`),o.length>0&&console.log(` ${o.length} skipped (already present \u2014 rerun with --force)`),r.some(s=>s.wired&&s.agent==="claude-code")||(console.log(" Note: only Claude Code reads that directory. Your other agents get the"),console.log(" same verbs as MCP tools from the server above \u2014 nothing else to install.")),console.log(""),console.log("Next: ask your agent to make a video \u2014 it opens a browser to authorize on"),console.log("first call. No API key needed."),console.log("Restart your agent session to load the MCP server and skills."),console.log(""),console.log("This installed no `cueframe` binary \u2014 npx leaves nothing on your PATH."),console.log("Prefer the terminal? Every command runs as `npx -y cueframe \u2026`:"),console.log(" npx -y cueframe login")})}import{existsSync as lt,mkdirSync as cn,readFileSync as Mt,writeFileSync as mt}from"fs";import{join as ft}from"path";var Nt="cueframe.json",dn="cueframe/components",He=".cueframe/";function un(t,e){let r=ft(t,".gitignore");if(lt(r)){let n=Mt(r,"utf8"),o=n.split(`
7
- `).map(s=>s.trim());if(o.includes(He)||o.includes(".cueframe"))return!1;if(!e){let s=n.endsWith(`
2
+ import{A as G,B as Ce,C as at,D as we,E as $h,a as We,b as yh,c as rt,d as bh,e as Sh,f as zh,g as vh,h as wh,i as Ot,j as Pn,k as Rt,l as fo,m as Ih,n as yr,o as j,p as K,q as je,r as L,s as go,t as kh,u as Cn,v as ae,w as ze,x as Me,y as B,z as pe}from"./chunk-CTELK3ZK.js";import{a as Tz,b as It,c as Pz}from"./chunk-MCQRX24V.js";var YS=Tz(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});function Sae(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.indexOf(n)!==-1)continue;t[n]=r[n]}return t}var wt=class{constructor(e,t,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=n}},ur=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function qe(r,e){let{line:t,column:n,index:o}=r;return new wt(t,n+e,o+e)}var wS="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",zae={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:wS},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:wS}},IS={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},ra=r=>r.type==="UpdateExpression"?IS.UpdateExpression[`${r.prefix}`]:IS[r.type],vae={AccessorIsGenerator:({kind:r})=>`A ${r}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:r})=>`Missing initializer in ${r} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:r})=>`\`${r}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:r,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
3
+ - Did you mean \`export { '${r}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:r})=>`'${r==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:r})=>`Unsyntactic ${r==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:r})=>`A string literal cannot be used as an imported binding.
4
+ - Did you mean \`import { "${r}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:r})=>`Expected number in radix ${r}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:r})=>`Escape sequence in keyword ${r}.`,InvalidIdentifier:({identifierName:r})=>`Invalid identifier ${r}.`,InvalidLhs:({ancestor:r})=>`Invalid left-hand side in ${ra(r)}.`,InvalidLhsBinding:({ancestor:r})=>`Binding invalid left-hand side in ${ra(r)}.`,InvalidLhsOptionalChaining:({ancestor:r})=>`Invalid optional chaining in the left-hand side of ${ra(r)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:r})=>`Unexpected character '${r}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:r})=>`Private name #${r} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:r})=>`Label '${r}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:r})=>`This experimental syntax requires enabling the parser plugin: ${r.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:r})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:r})=>`Duplicate key "${r}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:r})=>`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`,ModuleExportUndefined:({localName:r})=>`Export '${r}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:r})=>`Private names are only allowed in property accesses (\`obj.#${r}\`) or in \`in\` expressions (\`#${r} in obj\`).`,PrivateNameRedeclaration:({identifierName:r})=>`Duplicate private name #${r}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:r})=>`Unexpected keyword '${r}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:r})=>`Unexpected reserved word '${r}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:r,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${r?`, expected "${r}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:r,onlyValidPropertyName:e})=>`The only valid meta property for ${r} is ${r}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:r})=>`Identifier '${r}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},wae={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:r})=>`Assigning to '${r}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:r})=>`Binding '${r}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},Iae={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:r})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(r)}\`.`},kae=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),$ae=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:r})=>`Invalid topic token ${r}. In order to use ${r} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${r}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:r})=>`Hack-style pipe body cannot be an unparenthesized ${ra({type:r})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),Tae={UnsupportedBind:"Binding should be performed on object property.",UnsupportedBindRHS:"The right-hand side of binding can not be super or import."},Pae=["message"];function kS(r,e,t){Object.defineProperty(r,e,{enumerable:!1,configurable:!0,value:t})}function Cae({toMessage:r,code:e,reasonCode:t,syntaxPlugin:n}){let o=t==="MissingPlugin"||t==="MissingOneOfPlugins",i={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return i[t]&&(t=i[t]),function s(c,u){let m=new SyntaxError;return m.code=e,m.reasonCode=t,m.loc=c,m.pos=c.index,m.syntaxPlugin=n,o&&(m.missingPlugin=u.missingPlugin),kS(m,"clone",function(g={}){var y;let{line:S,column:w,index:T}=(y=g.loc)!=null?y:c;return s(new wt(S,w,T),Object.assign({},u,g.details))}),kS(m,"details",u),Object.defineProperty(m,"message",{configurable:!0,get(){let h=`${r(u)} (${c.line}:${c.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),m}}function ut(r,e){if(Array.isArray(r))return n=>ut(n,r[0]);let t={};for(let n of Object.keys(r)){let o=r[n],i=typeof o=="string"?{message:()=>o}:typeof o=="function"?{message:o}:o,{message:s}=i,c=Sae(i,Pae),u=typeof s=="string"?()=>s:s;t[n]=Cae(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:u},e?{syntaxPlugin:e}:{},c))}return t}var $=Object.assign({},ut(zae),ut(vae),ut(wae),ut(Iae),ut`pipelineOperator`($ae),ut`functionBind`(Tae));function Oae(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function Rae(r){let e=Oae();if(r==null)return e;if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let t of Object.keys(e))r[t]!=null&&(e[t]=r[t]);if(e.startLine===1)r.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:r.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((r.startColumn==null||r.startIndex==null)&&r.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(e.sourceType==="commonjs"){if(r.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(r.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(r.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}var{defineProperty:Mae}=Object,$S=(r,e)=>{r&&Mae(r,e,{enumerable:!1,value:r[e]})};function gn(r){return $S(r.loc.start,"index"),$S(r.loc.end,"index"),r}var Eae=r=>class extends r{parse(){let t=gn(super.parse());return this.optionFlags&256&&(t.tokens=t.tokens.map(gn)),t}parseRegExpLiteral({pattern:t,flags:n}){let o=null;try{o=new RegExp(t,n)}catch{}let i=this.estreeParseLiteral(o);return i.regex={pattern:t,flags:n},i}parseBigIntLiteral(t){let n;try{n=BigInt(t)}catch{n=null}let o=this.estreeParseLiteral(n);return o.bigint=String(o.value||t),o}parseDecimalLiteral(t){let o=this.estreeParseLiteral(null);return o.decimal=String(o.value||t),o}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}estreeParseChainExpression(t,n){let o=this.startNodeAtNode(t);return o.expression=t,this.finishNodeAt(o,"ChainExpression",n)}directiveToStmt(t){let n=t.value;delete t.value,this.castNodeTo(n,"Literal"),n.raw=n.extra.raw,n.value=n.extra.expressionValue;let o=this.castNodeTo(t,"ExpressionStatement");return o.expression=n,o.directive=n.extra.rawValue,delete n.extra,o}fillOptionalPropertiesForTSESLint(t){}cloneEstreeStringLiteral(t){let{start:n,end:o,loc:i,range:s,raw:c,value:u}=t,m=Object.create(t.constructor.prototype);return m.type="Literal",m.start=n,m.end=o,m.loc=i,m.range=s,m.raw=c,m.value=u,m}initFunction(t,n){super.initFunction(t,n),t.expression=!1}checkDeclaration(t){t!=null&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){var n;return t.type==="ExpressionStatement"&&t.expression.type==="Literal"&&typeof t.expression.value=="string"&&!((n=t.expression.extra)!=null&&n.parenthesized)}parseBlockBody(t,n,o,i,s){super.parseBlockBody(t,n,o,i,s);let c=t.directives.map(u=>this.directiveToStmt(u));t.body=c.concat(t.body),delete t.directives}parsePrivateName(){let t=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(t):t}convertPrivateNameToPrivateIdentifier(t){let n=super.getPrivateNameSV(t);return delete t.id,t.name=n,this.castNodeTo(t,"PrivateIdentifier")}isPrivateName(t){return this.getPluginOption("estree","classFeatures")?t.type==="PrivateIdentifier":super.isPrivateName(t)}getPrivateNameSV(t){return this.getPluginOption("estree","classFeatures")?t.name:super.getPrivateNameSV(t)}parseLiteral(t,n){let o=super.parseLiteral(t,n);return o.raw=o.extra.raw,delete o.extra,o}parseFunctionBody(t,n,o=!1){super.parseFunctionBody(t,n,o),t.expression=t.body.type!=="BlockStatement"}parseMethod(t,n,o,i,s,c,u=!1){let m=this.startNode();m.kind=t.kind,m=super.parseMethod(m,n,o,i,s,c,u),delete m.kind;let{typeParameters:h}=t;h&&(delete t.typeParameters,m.typeParameters=h,this.resetStartLocationFromNode(m,h));let g=this.castNodeTo(m,"FunctionExpression");return t.value=g,c==="ClassPrivateMethod"&&(t.computed=!1),c==="ObjectMethod"?(t.kind==="method"&&(t.kind="init"),t.shorthand=!1,this.finishNode(t,"Property")):this.finishNode(t,"MethodDefinition")}nameIsConstructor(t){return t.type==="Literal"?t.value==="constructor":super.nameIsConstructor(t)}parseClassProperty(...t){let n=super.parseClassProperty(...t);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(n,"PropertyDefinition"),n}parseClassPrivateProperty(...t){let n=super.parseClassPrivateProperty(...t);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(n,"PropertyDefinition"),n.computed=!1),n}parseClassAccessorProperty(t){let n=super.parseClassAccessorProperty(t);return this.getPluginOption("estree","classFeatures")&&(n.abstract&&this.hasPlugin("typescript")?(delete n.abstract,this.castNodeTo(n,"TSAbstractAccessorProperty")):this.castNodeTo(n,"AccessorProperty")),n}parseObjectProperty(t,n,o,i){let s=super.parseObjectProperty(t,n,o,i);return s&&(s.kind="init",this.castNodeTo(s,"Property")),s}finishObjectProperty(t){return t.kind="init",this.finishNode(t,"Property")}isValidLVal(t,n,o,i){return t==="Property"?"value":super.isValidLVal(t,n,o,i)}isAssignable(t,n){return t!=null&&this.isObjectProperty(t)?this.isAssignable(t.value,n):super.isAssignable(t,n)}toAssignable(t,n=!1){if(t!=null&&this.isObjectProperty(t)){let{key:o,value:i}=t;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(i,n)}else super.toAssignable(t,n)}toAssignableObjectExpressionProp(t,n,o){t.type==="Property"&&(t.kind==="get"||t.kind==="set")?this.raise($.PatternHasAccessor,t.key):t.type==="Property"&&t.method?this.raise($.PatternHasMethod,t.key):super.toAssignableObjectExpressionProp(t,n,o)}finishCallExpression(t,n){let o=super.finishCallExpression(t,n);if(o.callee.type==="Import"){var i,s;this.castNodeTo(o,"ImportExpression"),o.source=o.arguments[0],o.options=(i=o.arguments[1])!=null?i:null,o.attributes=(s=o.arguments[1])!=null?s:null,delete o.arguments,delete o.callee}else o.type==="OptionalCallExpression"?this.castNodeTo(o,"CallExpression"):o.optional=!1;return o}toReferencedArguments(t){t.type!=="ImportExpression"&&super.toReferencedArguments(t)}parseExport(t,n){let o=this.state.lastTokStartLoc,i=super.parseExport(t,n);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":i.specifiers.length===1&&i.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(i,"ExportAllDeclaration"),i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var s;let{declaration:c}=i;c?.type==="ClassDeclaration"&&((s=c.decorators)==null?void 0:s.length)>0&&c.start===i.start&&this.resetStartLocation(i,o)}break}return i}stopParseSubscript(t,n){let o=super.stopParseSubscript(t,n);return n.optionalChainMember?this.estreeParseChainExpression(o,t.loc.end):o}parseMember(t,n,o,i,s){let c=super.parseMember(t,n,o,i,s);return c.type==="OptionalMemberExpression"?this.castNodeTo(c,"MemberExpression"):c.optional=!1,c}isOptionalMemberExpression(t){return t.type==="ChainExpression"?t.expression.type==="MemberExpression":super.isOptionalMemberExpression(t)}hasPropertyAsPrivateName(t){return t.type==="ChainExpression"&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isObjectProperty(t){return t.type==="Property"&&t.kind==="init"&&!t.method}isObjectMethod(t){return t.type==="Property"&&(t.method||t.kind==="get"||t.kind==="set")}castNodeTo(t,n){let o=super.castNodeTo(t,n);return this.fillOptionalPropertiesForTSESLint(o),o}cloneIdentifier(t){let n=super.cloneIdentifier(t);return this.fillOptionalPropertiesForTSESLint(n),n}cloneStringLiteral(t){return t.type==="Literal"?this.cloneEstreeStringLiteral(t):super.cloneStringLiteral(t)}finishNodeAt(t,n,o){return gn(super.finishNodeAt(t,n,o))}finishNode(t,n){let o=super.finishNode(t,n);return this.fillOptionalPropertiesForTSESLint(o),o}resetStartLocation(t,n){super.resetStartLocation(t,n),gn(t)}resetEndLocation(t,n=this.state.lastTokEndLoc){super.resetEndLocation(t,n),gn(t)}},uo=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}},ue={brace:new uo("{"),j_oTag:new uo("<tag"),j_cTag:new uo("</tag"),j_expr:new uo("<tag>...</tag>",!0)};ue.template=new uo("`",!0);var ne=!0,q=!0,lm=!0,xn=!0,Zt=!0,Dae=!0,sa=class{constructor(e,t={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop!=null?t.binop:null,this.updateContext=null}},jm=new Map;function le(r,e={}){e.keyword=r;let t=X(r,e);return jm.set(r,t),t}function Be(r,e){return X(r,{beforeExpr:ne,binop:e})}var zn=-1,Pt=[],Fm=[],Nm=[],Vm=[],Um=[],Bm=[];function X(r,e={}){var t,n,o,i;return++zn,Fm.push(r),Nm.push((t=e.binop)!=null?t:-1),Vm.push((n=e.beforeExpr)!=null?n:!1),Um.push((o=e.startsExpr)!=null?o:!1),Bm.push((i=e.prefix)!=null?i:!1),Pt.push(new sa(r,e)),zn}function se(r,e={}){var t,n,o,i;return++zn,jm.set(r,zn),Fm.push(r),Nm.push((t=e.binop)!=null?t:-1),Vm.push((n=e.beforeExpr)!=null?n:!1),Um.push((o=e.startsExpr)!=null?o:!1),Bm.push((i=e.prefix)!=null?i:!1),Pt.push(new sa("name",e)),zn}var Aae={bracketL:X("[",{beforeExpr:ne,startsExpr:q}),bracketHashL:X("#[",{beforeExpr:ne,startsExpr:q}),bracketBarL:X("[|",{beforeExpr:ne,startsExpr:q}),bracketR:X("]"),bracketBarR:X("|]"),braceL:X("{",{beforeExpr:ne,startsExpr:q}),braceBarL:X("{|",{beforeExpr:ne,startsExpr:q}),braceHashL:X("#{",{beforeExpr:ne,startsExpr:q}),braceR:X("}"),braceBarR:X("|}"),parenL:X("(",{beforeExpr:ne,startsExpr:q}),parenR:X(")"),comma:X(",",{beforeExpr:ne}),semi:X(";",{beforeExpr:ne}),colon:X(":",{beforeExpr:ne}),doubleColon:X("::",{beforeExpr:ne}),dot:X("."),question:X("?",{beforeExpr:ne}),questionDot:X("?."),arrow:X("=>",{beforeExpr:ne}),template:X("template"),ellipsis:X("...",{beforeExpr:ne}),backQuote:X("`",{startsExpr:q}),dollarBraceL:X("${",{beforeExpr:ne,startsExpr:q}),templateTail:X("...`",{startsExpr:q}),templateNonTail:X("...${",{beforeExpr:ne,startsExpr:q}),at:X("@"),hash:X("#",{startsExpr:q}),interpreterDirective:X("#!..."),eq:X("=",{beforeExpr:ne,isAssign:xn}),assign:X("_=",{beforeExpr:ne,isAssign:xn}),slashAssign:X("_=",{beforeExpr:ne,isAssign:xn}),xorAssign:X("_=",{beforeExpr:ne,isAssign:xn}),moduloAssign:X("_=",{beforeExpr:ne,isAssign:xn}),incDec:X("++/--",{prefix:Zt,postfix:Dae,startsExpr:q}),bang:X("!",{beforeExpr:ne,prefix:Zt,startsExpr:q}),tilde:X("~",{beforeExpr:ne,prefix:Zt,startsExpr:q}),doubleCaret:X("^^",{startsExpr:q}),doubleAt:X("@@",{startsExpr:q}),pipeline:Be("|>",0),nullishCoalescing:Be("??",1),logicalOR:Be("||",1),logicalAND:Be("&&",2),bitwiseOR:Be("|",3),bitwiseXOR:Be("^",4),bitwiseAND:Be("&",5),equality:Be("==/!=/===/!==",6),lt:Be("</>/<=/>=",7),gt:Be("</>/<=/>=",7),relational:Be("</>/<=/>=",7),bitShift:Be("<</>>/>>>",8),bitShiftL:Be("<</>>/>>>",8),bitShiftR:Be("<</>>/>>>",8),plusMin:X("+/-",{beforeExpr:ne,binop:9,prefix:Zt,startsExpr:q}),modulo:X("%",{binop:10,startsExpr:q}),star:X("*",{binop:10}),slash:Be("/",10),exponent:X("**",{beforeExpr:ne,binop:11,rightAssociative:!0}),_in:le("in",{beforeExpr:ne,binop:7}),_instanceof:le("instanceof",{beforeExpr:ne,binop:7}),_break:le("break"),_case:le("case",{beforeExpr:ne}),_catch:le("catch"),_continue:le("continue"),_debugger:le("debugger"),_default:le("default",{beforeExpr:ne}),_else:le("else",{beforeExpr:ne}),_finally:le("finally"),_function:le("function",{startsExpr:q}),_if:le("if"),_return:le("return",{beforeExpr:ne}),_switch:le("switch"),_throw:le("throw",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_try:le("try"),_var:le("var"),_const:le("const"),_with:le("with"),_new:le("new",{beforeExpr:ne,startsExpr:q}),_this:le("this",{startsExpr:q}),_super:le("super",{startsExpr:q}),_class:le("class",{startsExpr:q}),_extends:le("extends",{beforeExpr:ne}),_export:le("export"),_import:le("import",{startsExpr:q}),_null:le("null",{startsExpr:q}),_true:le("true",{startsExpr:q}),_false:le("false",{startsExpr:q}),_typeof:le("typeof",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_void:le("void",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_delete:le("delete",{beforeExpr:ne,prefix:Zt,startsExpr:q}),_do:le("do",{isLoop:lm,beforeExpr:ne}),_for:le("for",{isLoop:lm}),_while:le("while",{isLoop:lm}),_as:se("as",{startsExpr:q}),_assert:se("assert",{startsExpr:q}),_async:se("async",{startsExpr:q}),_await:se("await",{startsExpr:q}),_defer:se("defer",{startsExpr:q}),_from:se("from",{startsExpr:q}),_get:se("get",{startsExpr:q}),_let:se("let",{startsExpr:q}),_meta:se("meta",{startsExpr:q}),_of:se("of",{startsExpr:q}),_sent:se("sent",{startsExpr:q}),_set:se("set",{startsExpr:q}),_source:se("source",{startsExpr:q}),_static:se("static",{startsExpr:q}),_using:se("using",{startsExpr:q}),_yield:se("yield",{startsExpr:q}),_asserts:se("asserts",{startsExpr:q}),_checks:se("checks",{startsExpr:q}),_exports:se("exports",{startsExpr:q}),_global:se("global",{startsExpr:q}),_implements:se("implements",{startsExpr:q}),_intrinsic:se("intrinsic",{startsExpr:q}),_infer:se("infer",{startsExpr:q}),_is:se("is",{startsExpr:q}),_mixins:se("mixins",{startsExpr:q}),_proto:se("proto",{startsExpr:q}),_require:se("require",{startsExpr:q}),_satisfies:se("satisfies",{startsExpr:q}),_keyof:se("keyof",{startsExpr:q}),_readonly:se("readonly",{startsExpr:q}),_unique:se("unique",{startsExpr:q}),_abstract:se("abstract",{startsExpr:q}),_declare:se("declare",{startsExpr:q}),_enum:se("enum",{startsExpr:q}),_module:se("module",{startsExpr:q}),_namespace:se("namespace",{startsExpr:q}),_interface:se("interface",{startsExpr:q}),_type:se("type",{startsExpr:q}),_opaque:se("opaque",{startsExpr:q}),name:X("name",{startsExpr:q}),placeholder:X("%%",{startsExpr:q}),string:X("string",{startsExpr:q}),num:X("num",{startsExpr:q}),bigint:X("bigint",{startsExpr:q}),decimal:X("decimal",{startsExpr:q}),regexp:X("regexp",{startsExpr:q}),privateName:X("#name",{startsExpr:q}),eof:X("eof"),jsxName:X("jsxName"),jsxText:X("jsxText",{beforeExpr:ne}),jsxTagStart:X("jsxTagStart",{startsExpr:q}),jsxTagEnd:X("jsxTagEnd")};function me(r){return r>=93&&r<=133}function _ae(r){return r<=92}function mt(r){return r>=58&&r<=133}function jS(r){return r>=58&&r<=137}function Lae(r){return Vm[r]}function bn(r){return Um[r]}function jae(r){return r>=29&&r<=33}function TS(r){return r>=129&&r<=131}function Fae(r){return r>=90&&r<=92}function qm(r){return r>=58&&r<=92}function Nae(r){return r>=39&&r<=59}function Vae(r){return r===34}function Uae(r){return Bm[r]}function Bae(r){return r>=121&&r<=123}function qae(r){return r>=124&&r<=130}function Kt(r){return Fm[r]}function na(r){return Nm[r]}function Wae(r){return r===57}function aa(r){return r>=24&&r<=25}function Tt(r){return Pt[r]}Pt[8].updateContext=r=>{r.pop()};Pt[5].updateContext=Pt[7].updateContext=Pt[23].updateContext=r=>{r.push(ue.brace)};Pt[22].updateContext=r=>{r[r.length-1]===ue.template?r.pop():r.push(ue.template)};Pt[143].updateContext=r=>{r.push(ue.j_expr,ue.j_oTag)};var Wm="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",FS="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",Zae=new RegExp("["+Wm+"]"),Gae=new RegExp("["+Wm+FS+"]");Wm=FS=null;var NS=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Kae=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function xm(r,e){let t=65536;for(let n=0,o=e.length;n<o;n+=2){if(t+=e[n],t>r)return!1;if(t+=e[n+1],t>=r)return!0}return!1}function vt(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&Zae.test(String.fromCharCode(r)):xm(r,NS)}function mo(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&Gae.test(String.fromCharCode(r)):xm(r,NS)||xm(r,Kae)}var Zm={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},Jae=new Set(Zm.keyword),Hae=new Set(Zm.strict),Xae=new Set(Zm.strictBind);function VS(r,e){return e&&r==="await"||r==="enum"}function US(r,e){return VS(r,e)||Hae.has(r)}function BS(r){return Xae.has(r)}function qS(r,e){return US(r,e)||BS(r)}function Yae(r){return Jae.has(r)}function Qae(r,e,t){return r===64&&e===64&&vt(t)}var ece=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function tce(r){return ece.has(r)}var vn=class{constructor(e){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=e}},wn=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&64)>0&&(e&2)===0}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&128)return!0;if(t&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new vn(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(e.flags&130||!this.parser.inModule&&e.flags&1)}declareName(e,t,n){let o=this.currentScope();if(t&8||t&16){this.checkRedeclarationInScope(o,e,t,n);let i=o.names.get(e)||0;t&16?i=i|4:(o.firstLexicalName||(o.firstLexicalName=e),i=i|2),o.names.set(e,i),t&8&&this.maybeExportDefined(o,e)}else if(t&4)for(let i=this.scopeStack.length-1;i>=0&&(o=this.scopeStack[i],this.checkRedeclarationInScope(o,e,t,n),o.names.set(e,(o.names.get(e)||0)|1),this.maybeExportDefined(o,e),!(o.flags&1667));--i);this.parser.inModule&&o.flags&1&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&e.flags&1&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,n,o){this.isRedeclaredInScope(e,t,n)&&this.parser.raise($.VarRedeclaration,o,{identifierName:t})}isRedeclaredInScope(e,t,n){if(!(n&1))return!1;if(n&8)return e.names.has(t);let o=e.names.get(t)||0;return n&16?(o&2)>0||!this.treatFunctionsAsVarInScope(e)&&(o&1)>0:(o&2)>0&&!(e.flags&8&&e.firstLexicalName===t)||!this.treatFunctionsAsVarInScope(e)&&(o&4)>0}checkLocalExport(e){let{name:t}=e;this.scopeStack[0].names.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1667)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&1731&&!(t&4))return t}}},ym=class extends vn{constructor(...e){super(...e),this.declareFunctions=new Set}},bm=class extends wn{createScope(e){return new ym(e)}declareName(e,t,n){let o=this.currentScope();if(t&2048){this.checkRedeclarationInScope(o,e,t,n),this.maybeExportDefined(o,e),o.declareFunctions.add(e);return}super.declareName(e,t,n)}isRedeclaredInScope(e,t,n){if(super.isRedeclaredInScope(e,t,n))return!0;if(n&2048&&!e.declareFunctions.has(t)){let o=e.names.get(t);return(o&4)>0||(o&2)>0}return!1}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},oce=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),Y=ut`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:r})=>`Cannot overwrite reserved type ${r}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:r,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:r,enumName:e})=>`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:r})=>`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:r,enumName:e})=>`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:r})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:r,memberName:e,explicitType:t})=>`Enum \`${r}\` has type \`${t}\`, so the initializer of \`${e}\` needs to be a ${t} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:r,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${r}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:r,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`,EnumInvalidMemberName:({enumName:r,memberName:e,suggestion:t})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${t}\`, in enum \`${r}\`.`,EnumNumberMemberNotInitialized:({enumName:r,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${r}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:r})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:r})=>`Unexpected reserved type ${r}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:r,suggestion:e})=>`\`declare export ${r}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function rce(r){return r.type==="DeclareExportAllDeclaration"||r.type==="DeclareExportDeclaration"&&(!r.declaration||r.declaration.type!=="TypeAlias"&&r.declaration.type!=="InterfaceDeclaration")}function PS(r){return r.importKind==="type"||r.importKind==="typeof"}var nce={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ice(r,e){let t=[],n=[];for(let o=0;o<r.length;o++)(e(r[o],o,r)?t:n).push(r[o]);return[t,n]}var sce=/\*?\s*@((?:no)?flow)\b/,ace=r=>class extends r{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return bm}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(t,n){t!==134&&t!==13&&t!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(t,n)}addComment(t){if(this.flowPragma===void 0){let n=sce.exec(t.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(t)}flowParseTypeInitialiser(t){let n=this.state.inType;this.state.inType=!0,this.expect(t||14);let o=this.flowParseType();return this.state.inType=n,o}flowParsePredicate(){let t=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(Y.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(t.value=super.parseExpression(),this.expect(11),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let t=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,o=null;return this.match(54)?(this.state.inType=t,o=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=t,this.match(54)&&(o=this.flowParsePredicate())),[n,o]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();let n=t.id=this.parseIdentifier(),o=this.startNode(),i=this.startNode();this.match(47)?o.typeParameters=this.flowParseTypeParameterDeclaration():o.typeParameters=null,this.expect(10);let s=this.flowParseFunctionTypeParams();return o.params=s.params,o.rest=s.rest,o.this=s._this,this.expect(11),[o.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(o,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.loc.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,n){if(this.match(80))return this.flowParseDeclareClass(t);if(this.match(68))return this.flowParseDeclareFunction(t);if(this.match(74))return this.flowParseDeclareVariable(t);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(t):(n&&this.raise(Y.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(129))return this.flowParseDeclareInterface(t);if(this.match(82))return this.flowParseDeclareExportDeclaration(t,n);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(t.id.name,5,t.id.loc.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(134)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();let n=t.body=this.startNode(),o=n.body=[];for(this.expect(5);!this.match(8);){let c=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(Y.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),o.push(super.parseImport(c))):(this.expectContextual(125,Y.UnsupportedStatementInDeclareModule),o.push(this.flowParseDeclare(c,!0)))}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let i=null,s=!1;return o.forEach(c=>{rce(c)?(i==="CommonJS"&&this.raise(Y.AmbiguousDeclareModuleKind,c),i="ES"):c.type==="DeclareModuleExports"&&(s&&this.raise(Y.DuplicateDeclareModuleExports,c),i==="ES"&&this.raise(Y.AmbiguousDeclareModuleKind,c),i="CommonJS",s=!0)}),t.kind=i||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let o=this.state.value;throw this.raise(Y.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:o,suggestion:nce[o]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return t=this.parseExport(t,null),t.type==="ExportNamedDeclaration"?(t.default=!1,delete t.exportKind,this.castNodeTo(t,"DeclareExportDeclaration")):this.castNodeTo(t,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(111),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();let n=this.flowParseTypeAlias(t);return this.castNodeTo(n,"DeclareTypeAlias"),n}flowParseDeclareOpaqueType(t){this.next();let n=this.flowParseOpaqueType(t,!0);return this.castNodeTo(n,"DeclareOpaqueType"),n}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,n){if(t.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(t.id.name,n?17:8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(t.implements=[],t.mixins=[],this.eatContextual(117))do t.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do t.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}t.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){t==="_"&&this.raise(Y.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,n,o){oce.has(t)&&this.raise(o?Y.AssignReservedType:Y.UnexpectedReservedType,n,{reservedType:t})}flowParseRestrictedIdentifierName(t,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifierName(t)}flowParseRestrictedIdentifier(t,n){let o=this.startNode(),i=this.flowParseRestrictedIdentifierName(t,n);return this.createIdentifier(o,i)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,n){return this.expectContextual(130),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(14)&&(t.supertype=this.flowParseTypeInitialiser(14)),t.impltype=null,n||(t.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameterBound(){if(this.match(14)||this.isContextual(81)){let t=this.startNode();return this.next(),t.typeAnnotation=this.flowParseType(),this.finishNode(t,"TypeAnnotation")}}flowParseTypeParameter(t=!1){let n=this.state.startLoc,o=this.startNode(),i=this.flowParseVariance();return o.name=this.flowParseRestrictedIdentifierName(),o.variance=i,o.bound=this.flowParseTypeParameterBound(),this.match(29)?(this.eat(29),o.default=this.flowParseType()):t&&this.raise(Y.MissingTypeParamDefault,n),this.finishNode(o,"TypeParameter")}flowParseTypeParameterDeclaration(){let t=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let o=!1;do{let i=this.flowParseTypeParameter(o);n.params.push(i),i.default&&(o=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=t,this.finishNode(n,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()!==ue.brace){let n=this.state.context;this.state.context=[n[0]];try{return t()}finally{this.state.context=n}}else return t()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let t=this.startNode(),n=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let o=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)t.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=o}),this.state.inType=n,!this.state.inType&&this.curContext()===ue.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let t=this.startNode(),n=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){let t=this.startNode();if(this.expectContextual(129),t.extends=[],this.eat(81))do t.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,n,o){return t.static=n,this.lookahead().type===14?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(3),t.value=this.flowParseTypeInitialiser(),t.variance=o,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,n){return t.static=n,t.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start))):(t.method=!1,this.eat(17)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,n){let o=this.startNode();return t.static=n,t.value=this.flowParseObjectTypeMethodish(o),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:n,allowSpread:o,allowProto:i,allowInexact:s}){let c=this.state.inType;this.state.inType=!0;let u=this.startNode();u.callProperties=[],u.properties=[],u.indexers=[],u.internalSlots=[];let m,h,g=!1;for(n&&this.match(6)?(this.expect(6),m=9,h=!0):(this.expect(5),m=8,h=!1),u.exact=h;!this.match(m);){let S=!1,w=null,T=null,M=this.startNode();if(i&&this.isContextual(118)){let F=this.lookahead();F.type!==14&&F.type!==17&&(this.next(),w=this.state.startLoc,t=!1)}if(t&&this.isContextual(106)){let F=this.lookahead();F.type!==14&&F.type!==17&&(this.next(),S=!0)}let V=this.flowParseVariance();if(this.eat(0))w!=null&&this.unexpected(w),this.eat(0)?(V&&this.unexpected(V.loc.start),u.internalSlots.push(this.flowParseObjectTypeInternalSlot(M,S))):u.indexers.push(this.flowParseObjectTypeIndexer(M,S,V));else if(this.match(10)||this.match(47))w!=null&&this.unexpected(w),V&&this.unexpected(V.loc.start),u.callProperties.push(this.flowParseObjectTypeCallProperty(M,S));else{let F="init";if(this.isContextual(99)||this.isContextual(104)){let re=this.lookahead();jS(re.type)&&(F=this.state.value,this.next())}let H=this.flowParseObjectTypeProperty(M,S,w,V,F,o,s??!h);H===null?(g=!0,T=this.state.lastTokStartLoc):u.properties.push(H)}this.flowObjectTypeSemicolon(),T&&!this.match(8)&&!this.match(9)&&this.raise(Y.UnexpectedExplicitInexactInObject,T)}this.expect(m),o&&(u.inexact=g);let y=this.finishNode(u,"ObjectTypeAnnotation");return this.state.inType=c,y}flowParseObjectTypeProperty(t,n,o,i,s,c,u){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(c?u||this.raise(Y.InexactInsideExact,this.state.lastTokStartLoc):this.raise(Y.InexactInsideNonObject,this.state.lastTokStartLoc),i&&this.raise(Y.InexactVariance,i),null):(c||this.raise(Y.UnexpectedSpreadType,this.state.lastTokStartLoc),o!=null&&this.unexpected(o),i&&this.raise(Y.SpreadVariance,i),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=n,t.proto=o!=null,t.kind=s;let m=!1;return this.match(47)||this.match(10)?(t.method=!0,o!=null&&this.unexpected(o),i&&this.unexpected(i.loc.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start)),(s==="get"||s==="set")&&this.flowCheckGetterSetterParams(t),!c&&t.key.name==="constructor"&&t.value.this&&this.raise(Y.ThisParamBannedInConstructor,t.value.this)):(s!=="init"&&this.unexpected(),t.method=!1,this.eat(17)&&(m=!0),t.value=this.flowParseTypeInitialiser(),t.variance=i),t.optional=m,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){let n=t.kind==="get"?0:1,o=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise(t.kind==="get"?Y.GetterMayNotHaveThisParam:Y.SetterMayNotHaveThisParam,t.value.this),o!==n&&this.raise(t.kind==="get"?$.BadGetterArity:$.BadSetterArity,t),t.kind==="set"&&t.value.rest&&this.raise($.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(t,n){t??(t=this.state.startLoc);let o=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let i=this.startNodeAt(t);i.qualification=o,i.id=this.flowParseRestrictedIdentifier(!0),o=this.finishNode(i,"QualifiedTypeIdentifier")}return o}flowParseGenericType(t,n){let o=this.startNodeAt(t);return o.typeParameters=null,o.id=this.flowParseQualifiedTypeIdentifier(t,n),this.match(47)&&(o.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(o,"GenericTypeAnnotation")}flowParseTypeofType(){let t=this.startNode();return this.expect(87),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){let t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(t.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let n=null,o=!1,i=null,s=this.startNode(),c=this.lookahead(),u=this.state.type===78;return c.type===14||c.type===17?(u&&!t&&this.raise(Y.ThisParamMustBeFirst,s),n=this.parseIdentifier(u),this.eat(17)&&(o=!0,u&&this.raise(Y.ThisParamMayNotBeOptional,s)),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),s.name=n,s.optional=o,s.typeAnnotation=i,this.finishNode(s,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){let n=this.startNodeAt(t.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=t,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let n=null,o=null;for(this.match(78)&&(o=this.flowParseFunctionTypeParam(!0),o.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:t,rest:n,_this:o}}flowIdentToTypeAnnotation(t,n,o){switch(o.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(o.name),this.flowParseGenericType(t,o)}}flowParsePrimaryType(){let t=this.state.startLoc,n=this.startNode(),o,i,s=!1,c=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,i=this.flowParseTupleType(),this.state.noAnonFunctionType=c,i;case 47:{let u=this.startNode();return u.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),o=this.flowParseFunctionTypeParams(),u.params=o.params,u.rest=o.rest,u.this=o._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),this.finishNode(u,"FunctionTypeAnnotation")}case 10:{let u=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(me(this.state.type)||this.match(78)){let m=this.lookahead().type;s=m!==17&&m!==14}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=c,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),i;this.eat(12)}return i?o=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):o=this.flowParseFunctionTypeParams(),u.params=o.params,u.rest=o.rest,u.this=o._this,this.expect(11),this.expect(19),u.returnType=this.flowParseType(),u.typeParameters=null,this.finishNode(u,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(Y.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(qm(this.state.type)){let u=Kt(this.state.type);return this.next(),super.createIdentifier(n,u)}else if(me(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,n,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let t=this.state.startLoc,n=this.flowParsePrimaryType(),o=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let i=this.startNodeAt(t),s=this.eat(18);o=o||s,this.expect(0),!s&&this.match(3)?(i.elementType=n,this.next(),n=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=n,i.indexType=this.flowParseType(),this.expect(3),o?(i.optional=s,n=this.finishNode(i,"OptionalIndexedAccessType")):n=this.finishNode(i,"IndexedAccessType"))}return n}flowParsePrefixType(){let t=this.startNode();return this.eat(17)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(t.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(t)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){let t=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(t.types=[n];this.eat(45);)t.types.push(this.flowParseAnonFunctionWithoutParens());return t.types.length===1?n:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){let t=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(t.types=[n];this.eat(43);)t.types.push(this.flowParseIntersectionType());return t.types.length===1?n:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){let t=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=t,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let t=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(t,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let t=this.startNode(),n=this.parseIdentifierName();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(t,n)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(53)?(t=this.startNode(),this.state.value==="+"?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")):t}parseFunctionBody(t,n,o=!1){if(n){this.forwardNoArrowParamsConversionAt(t,()=>super.parseFunctionBody(t,!0,o));return}super.parseFunctionBody(t,!1,o)}parseFunctionBodyAndFinish(t,n,o=!1){if(this.match(14)){let i=this.startNode();[i.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=i.typeAnnotation?this.finishNode(i,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,n,o)}parseStatementLike(t){if(this.state.strict&&this.isContextual(129)){let o=this.lookahead();if(mt(o.type)){let i=this.startNode();return this.next(),this.flowParseInterface(i)}}else if(this.isContextual(126)){let o=this.startNode();return this.next(),this.flowParseEnumDeclaration(o)}let n=super.parseStatementLike(t);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(t,n,o){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||me(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(t)}else if(me(this.state.type)){if(n.name==="interface")return this.flowParseInterface(t);if(n.name==="type")return this.flowParseTypeAlias(t);if(n.name==="opaque")return this.flowParseOpaqueType(t,!1)}}return super.parseExpressionStatement(t,n,o)}shouldParseExportDeclaration(){let{type:t}=this.state;return t===126||TS(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:t}=this.state;return t===126||TS(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,n,o){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let y=this.lookaheadCharCode();if(y===44||y===61||y===58||y===41)return this.setOptionalParametersError(o),t}this.expect(17);let i=this.state.clone(),s=this.state.noArrowAt,c=this.startNodeAt(n),{consequent:u,failed:m}=this.tryParseConditionalConsequent(),[h,g]=this.getArrowLikeExpressions(u);if(m||g.length>0){let y=[...s];if(g.length>0){this.state=i,this.state.noArrowAt=y;for(let S=0;S<g.length;S++)y.push(g[S].start);({consequent:u,failed:m}=this.tryParseConditionalConsequent()),[h,g]=this.getArrowLikeExpressions(u)}m&&h.length>1&&this.raise(Y.AmbiguousConditionalArrow,i.startLoc),m&&h.length===1&&(this.state=i,y.push(h[0].start),this.state.noArrowAt=y,{consequent:u,failed:m}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(u,!0),this.state.noArrowAt=s,this.expect(14),c.test=t,c.consequent=u,c.alternate=this.forwardNoArrowParamsConversionAt(c,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(c,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let t=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:n}}getArrowLikeExpressions(t,n){let o=[t],i=[];for(;o.length!==0;){let s=o.pop();s.type==="ArrowFunctionExpression"&&s.body.type!=="BlockStatement"?(s.typeParameters||!s.returnType?this.finishArrowValidation(s):i.push(s),o.push(s.body)):s.type==="ConditionalExpression"&&(o.push(s.consequent),o.push(s.alternate))}return n?(i.forEach(s=>this.finishArrowValidation(s)),[i,[]]):ice(i,s=>s.params.every(c=>this.isAssignable(c,!0)))}finishArrowValidation(t){var n;this.toAssignableList(t.params,(n=t.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,n){let o;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),o=n(),this.state.noArrowParamsConversionAt.pop()):o=n(),o}parseParenItem(t,n){let o=super.parseParenItem(t,n);if(this.eat(17)&&(o.optional=!0,this.resetEndLocation(t)),this.match(14)){let i=this.startNodeAt(n);return i.expression=o,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return o}assertModuleNodeAllowed(t){t.type==="ImportDeclaration"&&(t.importKind==="type"||t.importKind==="typeof")||t.type==="ExportNamedDeclaration"&&t.exportKind==="type"||t.type==="ExportAllDeclaration"&&t.exportKind==="type"||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(130)){t.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){t.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){t.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.isContextual(126)){t.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(t)}eatExportStar(t){return super.eatExportStar(t)?!0:this.isContextual(130)&&this.lookahead().type===55?(t.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(t){let{startLoc:n}=this.state,o=super.maybeParseExportNamespaceSpecifier(t);return o&&t.exportKind==="type"&&this.unexpected(n),o}parseClassId(t,n,o){super.parseClassId(t,n,o),this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,n,o){let{startLoc:i}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(t,n))return;n.declare=!0}super.parseClassMember(t,n,o),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(Y.DeclareClassElement,i):n.value&&this.raise(Y.DeclareClassFieldInitializer,n.value))}isIterator(t){return t==="iterator"||t==="asyncIterator"}readIterator(){let t=super.readWord1(),n="@@"+t;(!this.isIterator(t)||!this.state.inType)&&this.raise($.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(t){let n=this.input.charCodeAt(this.state.pos+1);t===123&&n===124?this.finishOp(6,2):this.state.inType&&(t===62||t===60)?this.finishOp(t===62?48:47,1):this.state.inType&&t===63?n===46?this.finishOp(18,2):this.finishOp(17,1):Qae(t,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t)}isAssignable(t,n){return t.type==="TypeCastExpression"?this.isAssignable(t.expression,n):super.isAssignable(t,n)}toAssignable(t,n=!1){!n&&t.type==="AssignmentExpression"&&t.left.type==="TypeCastExpression"&&(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,n)}toAssignableList(t,n,o){for(let i=0;i<t.length;i++){let s=t[i];s?.type==="TypeCastExpression"&&(t[i]=this.typeCastToParameter(s))}super.toAssignableList(t,n,o)}toReferencedList(t,n){for(let i=0;i<t.length;i++){var o;let s=t[i];s&&s.type==="TypeCastExpression"&&!((o=s.extra)!=null&&o.parenthesized)&&(t.length>1||!n)&&this.raise(Y.TypeCastInPattern,s.typeAnnotation)}return t}parseArrayLike(t,n,o){let i=super.parseArrayLike(t,n,o);return o!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(t,n,o,i){return t==="TypeCastExpression"||super.isValidLVal(t,n,o,i)}parseClassProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(14)&&super.isNonstaticConstructor(t)}pushClassMethod(t,n,o,i,s,c){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,n,o,i,s,c),n.params&&s){let u=n.params;u.length>0&&this.isThisParam(u[0])&&this.raise(Y.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&s&&n.value.params){let u=n.value.params;u.length>0&&this.isThisParam(u[0])&&this.raise(Y.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(t,n,o,i){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,n,o,i)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let n=t.implements=[];do{let o=this.startNode();o.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?o.typeParameters=this.flowParseTypeParameterInstantiation():o.typeParameters=null,n.push(this.finishNode(o,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);let n=this.getObjectOrClassMethodParams(t);if(n.length>0){let o=n[0];this.isThisParam(o)&&t.kind==="get"?this.raise(Y.GetterMayNotHaveThisParam,o):this.isThisParam(o)&&this.raise(Y.SetterMayNotHaveThisParam,o)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,n,o,i,s,c,u){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance;let m;this.match(47)&&!c&&(m=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let h=super.parseObjPropValue(t,n,o,i,s,c,u);return m&&((h.value||h).typeParameters=m),h}parseFunctionParamType(t){return this.eat(17)&&(t.type!=="Identifier"&&this.raise(Y.PatternIsOptional,t),this.isThisParam(t)&&this.raise(Y.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(14)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(Y.ThisParamAnnotationRequired,t),this.match(29)&&this.isThisParam(t)&&this.raise(Y.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,n){let o=super.parseMaybeDefault(t,n);return o.type==="AssignmentPattern"&&o.typeAnnotation&&o.right.start<o.typeAnnotation.start&&this.raise(Y.TypeBeforeInitializer,o.typeAnnotation),o}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(Y.ImportReflectionHasImportType,t.specifiers[0].loc.start)}parseImportSpecifierLocal(t,n,o){n.local=PS(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(n,o))}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){if(!t)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!t&&this.isContextual(87)}applyImportPhase(t,n,o,i){if(super.applyImportPhase(t,n,o,i),n){if(!o&&this.match(65))return;t.exportKind=o==="type"?o:"value"}else o==="type"&&this.match(55)&&this.unexpected(),t.importKind=o==="type"||o==="typeof"?o:"value"}parseImportSpecifier(t,n,o,i,s){let c=t.imported,u=null;c.type==="Identifier"&&(c.name==="type"?u="type":c.name==="typeof"&&(u="typeof"));let m=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let g=this.parseIdentifier(!0);u!==null&&!mt(this.state.type)?(t.imported=g,t.importKind=u,t.local=this.cloneIdentifier(g)):(t.imported=c,t.importKind=null,t.local=this.parseIdentifier())}else{if(u!==null&&mt(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=u;else{if(n)throw this.raise($.ImportBindingIsString,t,{importName:c.value});t.imported=c,t.importKind=null}this.eatContextual(93)?t.local=this.parseIdentifier():(m=!0,t.local=this.cloneIdentifier(t.imported))}let h=PS(t);return o&&h&&this.raise(Y.ImportTypeShorthandOnlyInPureImport,t),(o||h)&&this.checkReservedType(t.local.name,t.local.loc.start,!0),m&&!o&&!h&&this.checkReservedWord(t.local.name,t.loc.start,!0,!0),this.finishImportSpecifier(t,"ImportSpecifier")}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(t,n){let o=t.kind;o!=="get"&&o!=="set"&&this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,n)}parseVarId(t,n){super.parseVarId(t,n),this.match(14)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,n){if(this.match(14)){let o=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=o}return super.parseAsyncArrowFromCallExpression(t,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,n){var o;let i=null,s;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),s=this.tryParse(()=>super.parseMaybeAssign(t,n),i),!s.error)return s.node;let{context:m}=this.state,h=m[m.length-1];(h===ue.j_oTag||h===ue.j_expr)&&m.pop()}if((o=s)!=null&&o.error||this.match(47)){var c,u;i=i||this.state.clone();let m,h=this.tryParse(y=>{var S;m=this.flowParseTypeParameterDeclaration();let w=this.forwardNoArrowParamsConversionAt(m,()=>{let M=super.parseMaybeAssign(t,n);return this.resetStartLocationFromNode(M,m),M});(S=w.extra)!=null&&S.parenthesized&&y();let T=this.maybeUnwrapTypeCastExpression(w);return T.type!=="ArrowFunctionExpression"&&y(),T.typeParameters=m,this.resetStartLocationFromNode(T,m),w},i),g=null;if(h.node&&this.maybeUnwrapTypeCastExpression(h.node).type==="ArrowFunctionExpression"){if(!h.error&&!h.aborted)return h.node.async&&this.raise(Y.UnexpectedTypeParameterBeforeAsyncArrowFunction,m),h.node;g=h.node}if((c=s)!=null&&c.node)return this.state=s.failState,s.node;if(g)return this.state=h.failState,g;throw(u=s)!=null&&u.thrown?s.error:h.thrown?h.error:this.raise(Y.UnexpectedTokenAfterTypeParameter,m)}return super.parseMaybeAssign(t,n)}parseArrow(t){if(this.match(14)){let n=this.tryParse(()=>{let o=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let i=this.startNode();return[i.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=o,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),i});if(n.thrown)return null;n.error&&(this.state=n.failState),t.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(14)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,n){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=n:super.setArrowFunctionParameters(t,n)}checkParams(t,n,o,i=!0){if(!(o&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start)))){for(let s=0;s<t.params.length;s++)this.isThisParam(t.params[s])&&s>0&&this.raise(Y.ThisParamMustBeFirst,t.params[s]);super.checkParams(t,n,o,i)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,n,o){if(t.type==="Identifier"&&t.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let i=this.startNodeAt(n);i.callee=t,i.arguments=super.parseCallExpressionArguments(),t=this.finishNode(i,"CallExpression")}else if(t.type==="Identifier"&&t.name==="async"&&this.match(47)){let i=this.state.clone(),s=this.tryParse(u=>this.parseAsyncArrowWithTypeParameters(n)||u(),i);if(!s.error&&!s.aborted)return s.node;let c=this.tryParse(()=>super.parseSubscripts(t,n,o),i);if(c.node&&!c.error)return c.node;if(s.node)return this.state=s.failState,s.node;if(c.node)return this.state=c.failState,c.node;throw s.error||c.error}return super.parseSubscripts(t,n,o)}parseSubscript(t,n,o,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,o)return i.stop=!0,t;this.next();let s=this.startNodeAt(n);return s.callee=t,s.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),s.arguments=this.parseCallExpressionArguments(),s.optional=!0,this.finishCallExpression(s,!0)}else if(!o&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let s=this.startNodeAt(n);s.callee=t;let c=this.tryParse(()=>(s.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),s.arguments=super.parseCallExpressionArguments(),i.optionalChainMember&&(s.optional=!1),this.finishCallExpression(s,i.optionalChainMember)));if(c.node)return c.error&&(this.state=c.failState),c.node}return super.parseSubscript(t,n,o,i)}parseNewCallee(t){super.parseNewCallee(t);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),t.typeArguments=n}parseAsyncArrowWithTypeParameters(t){let n=this.startNodeAt(t);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(t){let n=this.input.charCodeAt(this.state.pos+1);if(t===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(t)}readToken_pipe_amp(t){let n=this.input.charCodeAt(this.state.pos+1);if(t===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(t)}parseTopLevel(t,n){let o=super.parseTopLevel(t,n);return this.state.hasFlowComment&&this.raise(Y.UnterminatedFlowComment,this.state.curPosition()),o}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(Y.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:t}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(t+n));)n++;let o=this.input.charCodeAt(n+t),i=this.input.charCodeAt(n+t+1);return o===58&&i===58?n+2:this.input.slice(n+t,n+t+12)==="flow-include"?n+12:o===58&&i!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise($.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:n,memberName:o}){this.raise(Y.EnumBooleanMemberNotInitialized,t,{memberName:o,enumName:n})}flowEnumErrorInvalidMemberInitializer(t,n){return this.raise(n.explicitType?n.explicitType==="symbol"?Y.EnumInvalidMemberInitializerSymbolType:Y.EnumInvalidMemberInitializerPrimaryType:Y.EnumInvalidMemberInitializerUnknownType,t,n)}flowEnumErrorNumberMemberNotInitialized(t,n){this.raise(Y.EnumNumberMemberNotInitialized,t,n)}flowEnumErrorStringMemberInconsistentlyInitialized(t,n){this.raise(Y.EnumStringMemberInconsistentlyInitialized,t,n)}flowEnumMemberInit(){let t=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{let o=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:o.loc.start,value:o}:{type:"invalid",loc:t}}case 134:{let o=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:o.loc.start,value:o}:{type:"invalid",loc:t}}case 85:case 86:{let o=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:o.loc.start,value:o}:{type:"invalid",loc:t}}default:return{type:"invalid",loc:t}}}flowEnumMemberRaw(){let t=this.state.startLoc,n=this.parseIdentifier(!0),o=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:t};return{id:n,init:o}}flowEnumCheckExplicitTypeMismatch(t,n,o){let{explicitType:i}=n;i!==null&&i!==o&&this.flowEnumErrorInvalidMemberInitializer(t,n)}flowEnumMembers({enumName:t,explicitType:n}){let o=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},s=!1;for(;!this.match(8);){if(this.eat(21)){s=!0;break}let c=this.startNode(),{id:u,init:m}=this.flowEnumMemberRaw(),h=u.name;if(h==="")continue;/^[a-z]/.test(h)&&this.raise(Y.EnumInvalidMemberName,u,{memberName:h,suggestion:h[0].toUpperCase()+h.slice(1),enumName:t}),o.has(h)&&this.raise(Y.EnumDuplicateMemberName,u,{memberName:h,enumName:t}),o.add(h);let g={enumName:t,explicitType:n,memberName:h};switch(c.id=u,m.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"boolean"),c.init=m.value,i.booleanMembers.push(this.finishNode(c,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"number"),c.init=m.value,i.numberMembers.push(this.finishNode(c,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(m.loc,g,"string"),c.init=m.value,i.stringMembers.push(this.finishNode(c,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(m.loc,g);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(m.loc,g);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(m.loc,g);break;default:i.defaultedMembers.push(this.finishNode(c,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:s}}flowEnumStringMembers(t,n,{enumName:o}){if(t.length===0)return n;if(n.length===0)return t;if(n.length>t.length){for(let i of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:o});return n}else{for(let i of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(i,{enumName:o});return t}}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(102))return null;if(!me(this.state.type))throw this.raise(Y.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(Y.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:n}),n}flowEnumBody(t,n){let o=n.name,i=n.loc.start,s=this.flowEnumParseExplicitType({enumName:o});this.expect(5);let{members:c,hasUnknownMembers:u}=this.flowEnumMembers({enumName:o,explicitType:s});switch(t.hasUnknownMembers=u,s){case"boolean":return t.explicitType=!0,t.members=c.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=c.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(c.stringMembers,c.defaultedMembers,{enumName:o}),this.expect(8),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=c.defaultedMembers,this.expect(8),this.finishNode(t,"EnumSymbolBody");default:{let m=()=>(t.members=[],this.expect(8),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;let h=c.booleanMembers.length,g=c.numberMembers.length,y=c.stringMembers.length,S=c.defaultedMembers.length;if(!h&&!g&&!y&&!S)return m();if(!h&&!g)return t.members=this.flowEnumStringMembers(c.stringMembers,c.defaultedMembers,{enumName:o}),this.expect(8),this.finishNode(t,"EnumStringBody");if(!g&&!y&&h>=S){for(let w of c.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(w.loc.start,{enumName:o,memberName:w.id.name});return t.members=c.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody")}else if(!h&&!y&&g>=S){for(let w of c.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(w.loc.start,{enumName:o,memberName:w.id.name});return t.members=c.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody")}else return this.raise(Y.EnumInconsistentMemberValues,i,{enumName:o}),m()}}}flowParseEnumDeclaration(t){let n=this.parseIdentifier();return t.id=n,t.body=this.flowEnumBody(this.startNode(),n),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){let t=this.nextTokenStart();if(this.input.charCodeAt(t)===60){let n=this.input.charCodeAt(t+1);return n!==60&&n!==61}return!1}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}maybeUnwrapTypeCastExpression(t){return t.type==="TypeCastExpression"?t.expression:t}},cce={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},pce=/\r\n|[\r\n\u2028\u2029]/,ta=new RegExp(pce.source,"g");function dr(r){switch(r){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function CS(r,e,t){for(let n=e;n<t;n++)if(dr(r.charCodeAt(n)))return!0;return!1}var um=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,mm=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function dce(r){switch(r){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var lo=ut`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:r})=>`Expected corresponding JSX closing tag for <${r}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:r,HTMLEntity:e})=>`Unexpected token \`${r}\`. Did you mean \`${e}\` or \`{'${r}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function Gt(r){return r?r.type==="JSXOpeningFragment"||r.type==="JSXClosingFragment":!1}function pr(r){if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return pr(r.object)+"."+pr(r.property);throw new Error("Node had unexpected type: "+r.type)}var lce=r=>class extends r{jsxReadToken(){let t="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(lo.UnterminatedJsxContent,this.state.startLoc);let o=this.input.charCodeAt(this.state.pos);switch(o){case 60:case 123:if(this.state.pos===this.state.start){o===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(o);return}t+=this.input.slice(n,this.state.pos),this.finishToken(142,t);return;case 38:t+=this.input.slice(n,this.state.pos),t+=this.jsxReadEntity(),n=this.state.pos;break;default:dr(o)?(t+=this.input.slice(n,this.state.pos),t+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){let n=this.input.charCodeAt(this.state.pos),o;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,o=t?`
5
+ `:`\r
6
+ `):o=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,o}jsxReadString(t){let n="",o=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise($.UnterminatedString,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);if(i===t)break;i===38?(n+=this.input.slice(o,this.state.pos),n+=this.jsxReadEntity(),o=this.state.pos):dr(i)?(n+=this.input.slice(o,this.state.pos),n+=this.jsxReadNewLine(!1),o=this.state.pos):++this.state.pos}n+=this.input.slice(o,this.state.pos++),this.finishToken(134,n)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let o=this.readInt(n,void 0,!1,"bail");if(o!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(o)}else{let n=0,o=!1;for(;n++<10&&this.state.pos<this.length&&!(o=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(o){let i=this.input.slice(t,this.state.pos),s=cce[i];if(++this.state.pos,s)return s}}return this.state.pos=t,"&"}jsxReadWord(){let t,n=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(mo(t)||t===45);this.finishToken(141,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(141)?t.name=this.state.value:qm(this.state.type)?t.name=Kt(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let o=this.startNodeAt(t);return o.namespace=n,o.name=this.jsxParseIdentifier(),this.finishNode(o,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let o=this.startNodeAt(t);o.object=n,o.property=this.jsxParseIdentifier(),n=this.finishNode(o,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let t;switch(this.state.type){case 5:return t=this.startNode(),this.setContext(ue.brace),this.next(),t=this.jsxParseExpressionContainer(t,ue.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(lo.AttributeIsEmpty,t),t;case 143:case 134:return this.parseExprAtom();default:throw this.raise(lo.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(ue.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,n){if(this.match(8))t.expression=this.jsxParseEmptyExpression();else{let o=this.parseExpression();t.expression=o}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){let t=this.startNode();return this.match(5)?(this.setContext(ue.brace),this.next(),this.expect(21),t.argument=this.parseMaybeAssignAllowIn(),this.setContext(ue.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t){let n=this.startNodeAt(t);return this.eat(144)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(t){let n=[];for(;!this.match(56)&&!this.match(144);)n.push(this.jsxParseAttribute());return t.attributes=n,t.selfClosing=this.eat(56),this.expect(144),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){let n=this.startNodeAt(t);return this.eat(144)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(144),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(t){let n=this.startNodeAt(t),o=[],i=this.jsxParseOpeningElementAt(t),s=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 143:if(t=this.state.startLoc,this.next(),this.eat(56)){s=this.jsxParseClosingElementAt(t);break e}o.push(this.jsxParseElementAt(t));break;case 142:o.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let c=this.startNode();this.setContext(ue.brace),this.next(),this.match(21)?o.push(this.jsxParseSpreadChild(c)):o.push(this.jsxParseExpressionContainer(c,ue.j_expr));break}default:this.unexpected()}Gt(i)&&!Gt(s)&&s!==null?this.raise(lo.MissingClosingTagFragment,s):!Gt(i)&&Gt(s)?this.raise(lo.MissingClosingTagElement,s,{openingTagName:pr(i.name)}):!Gt(i)&&!Gt(s)&&pr(s.name)!==pr(i.name)&&this.raise(lo.MissingClosingTagElement,s,{openingTagName:pr(i.name)})}if(Gt(i)?(n.openingFragment=i,n.closingFragment=s):(n.openingElement=i,n.closingElement=s),n.children=o,this.match(47))throw this.raise(lo.UnwrappedAdjacentJSXElements,this.state.startLoc);return Gt(i)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let t=this.state.startLoc;return this.next(),this.jsxParseElementAt(t)}setContext(t){let{context:n}=this.state;n[n.length-1]=t}parseExprAtom(t){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){let n=this.curContext();if(n===ue.j_expr){this.jsxReadToken();return}if(n===ue.j_oTag||n===ue.j_cTag){if(vt(t)){this.jsxReadWord();return}if(t===62){++this.state.pos,this.finishToken(144);return}if((t===34||t===39)&&n===ue.j_oTag){this.jsxReadString(t);return}}if(t===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(t)}updateContext(t){let{context:n,type:o}=this.state;if(o===56&&t===143)n.splice(-2,2,ue.j_cTag),this.state.canStartJSXElement=!1;else if(o===143)n.push(ue.j_oTag);else if(o===144){let i=n[n.length-1];i===ue.j_oTag&&t===56||i===ue.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===ue.j_expr):(this.setContext(ue.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Lae(o)}},Sm=class extends vn{constructor(...e){super(...e),this.tsNames=new Map}},zm=class extends wn{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new Sm(e)}enter(e){e===1024&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e===1024&&this.importsStack.pop(),e}hasImport(e,t){let n=this.importsStack.length;if(this.importsStack[n-1].has(e))return!0;if(!t&&n>1){for(let o=0;o<n-1;o++)if(this.importsStack[o].has(e))return!0}return!1}declareName(e,t,n){if(t&4096){this.hasImport(e,!0)&&this.parser.raise($.VarRedeclaration,n,{identifierName:e}),this.importsStack[this.importsStack.length-1].add(e);return}let o=this.currentScope(),i=o.tsNames.get(e)||0;if(t&1024){this.maybeExportDefined(o,e),o.tsNames.set(e,i|16);return}super.declareName(e,t,n),t&2&&(t&1||(this.checkRedeclarationInScope(o,e,t,n),this.maybeExportDefined(o,e)),i=i|1),t&256&&(i=i|2),t&512&&(i=i|4),t&128&&(i=i|8),i&&o.tsNames.set(e,i)}isRedeclaredInScope(e,t,n){let o=e.tsNames.get(t);if((o&2)>0){if(n&256){let i=!!(n&512),s=(o&4)>0;return i!==s}return!0}return n&128&&(o&8)>0?e.names.get(t)&2?!!(n&1):!1:n&2&&(o&1)>0?!0:super.isRedeclaredInScope(e,t,n)}checkLocalExport(e){let{name:t}=e;if(this.hasImport(t))return;let n=this.scopeStack.length;for(let o=n-1;o>=0;o--){let s=this.scopeStack[o].tsNames.get(t);if((s&1)>0||(s&16)>0)return}super.checkLocalExport(e)}},vm=class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function ia(r,e){return(r?2:0)|(e?1:0)}var wm=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(e){return e+this.startIndex}offsetToSourcePos(e){return e-this.startIndex}hasPlugin(e){if(typeof e=="string")return this.plugins.has(e);{let[t,n]=e;if(!this.hasPlugin(t))return!1;let o=this.plugins.get(t);for(let i of Object.keys(n))if(o?.[i]!==n[i])return!1;return!0}}getPluginOption(e,t){var n;return(n=this.plugins.get(e))==null?void 0:n[t]}};function WS(r,e){r.trailingComments===void 0?r.trailingComments=e:r.trailingComments.unshift(...e)}function uce(r,e){r.leadingComments===void 0?r.leadingComments=e:r.leadingComments.unshift(...e)}function In(r,e){r.innerComments===void 0?r.innerComments=e:r.innerComments.unshift(...e)}function lt(r,e,t){let n=null,o=e.length;for(;n===null&&o>0;)n=e[--o];n===null||n.start>t.start?In(r,t.comments):WS(n,t.comments)}var Im=class extends wm{addComment(e){this.filename&&(e.loc.filename=this.filename);let{commentsLen:t}=this.state;this.comments.length!==t&&(this.comments.length=t),this.comments.push(e),this.state.commentsLen++}processComment(e){let{commentStack:t}=this.state,n=t.length;if(n===0)return;let o=n-1,i=t[o];i.start===e.end&&(i.leadingNode=e,o--);let{start:s}=e;for(;o>=0;o--){let c=t[o],u=c.end;if(u>s)c.containingNode=e,this.finalizeComment(c),t.splice(o,1);else{u===s&&(c.trailingNode=e);break}}}finalizeComment(e){var t;let{comments:n}=e;if(e.leadingNode!==null||e.trailingNode!==null)e.leadingNode!==null&&WS(e.leadingNode,n),e.trailingNode!==null&&uce(e.trailingNode,n);else{let o=e.containingNode,i=e.start;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(o.type){case"ObjectExpression":case"ObjectPattern":lt(o,o.properties,e);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":lt(o,o.arguments,e);break;case"ImportExpression":lt(o,[o.source,(t=o.options)!=null?t:null],e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":lt(o,o.params,e);break;case"ArrayExpression":case"ArrayPattern":lt(o,o.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":lt(o,o.specifiers,e);break;case"TSEnumDeclaration":lt(o,o.members,e);break;case"TSEnumBody":lt(o,o.members,e);break;case"TSInterfaceBody":lt(o,o.body,e);break;default:{if(o.type==="RecordExpression"){lt(o,o.properties,e);break}if(o.type==="TupleExpression"){lt(o,o.elements,e);break}In(o,n)}}else In(o,n)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:n}=t;if(n===0)return;let o=t[n-1];o.leadingNode===e&&(o.leadingNode=null)}takeSurroundingComments(e,t,n){let{commentStack:o}=this.state,i=o.length;if(i===0)return;let s=i-1;for(;s>=0;s--){let c=o[s],u=c.end;if(c.start===n)c.leadingNode=e;else if(u===t)c.trailingNode=e;else if(u<t)break}}},km=class r{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[ue.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:t,startIndex:n,startLine:o,startColumn:i}){this.strict=e===!1?!1:e===!0?!0:t==="module",this.startIndex=n,this.curLine=o,this.lineStart=-i,this.startLoc=this.endLoc=new wt(o,i,n)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new wt(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new r;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},mce=function(e){return e>=48&&e<=57},OS={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},oa={bin:r=>r===48||r===49,oct:r=>r>=48&&r<=55,dec:r=>r>=48&&r<=57,hex:r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102};function RS(r,e,t,n,o,i){let s=t,c=n,u=o,m="",h=null,g=t,{length:y}=e;for(;;){if(t>=y){i.unterminated(s,c,u),m+=e.slice(g,t);break}let S=e.charCodeAt(t);if(hce(r,S,e,t)){m+=e.slice(g,t);break}if(S===92){m+=e.slice(g,t);let w=fce(e,t,n,o,r==="template",i);w.ch===null&&!h?h={pos:t,lineStart:n,curLine:o}:m+=w.ch,{pos:t,lineStart:n,curLine:o}=w,g=t}else S===8232||S===8233?(++t,++o,n=t):S===10||S===13?r==="template"?(m+=e.slice(g,t)+`
7
+ `,++t,S===13&&e.charCodeAt(t)===10&&++t,++o,g=n=t):i.unterminated(s,c,u):++t}return{pos:t,str:m,firstInvalidLoc:h,lineStart:n,curLine:o,containsInvalid:!!h}}function hce(r,e,t,n){return r==="template"?e===96||e===36&&t.charCodeAt(n+1)===123:e===(r==="double"?34:39)}function fce(r,e,t,n,o,i){let s=!o;e++;let c=m=>({pos:e,ch:m,lineStart:t,curLine:n}),u=r.charCodeAt(e++);switch(u){case 110:return c(`
8
+ `);case 114:return c("\r");case 120:{let m;return{code:m,pos:e}=$m(r,e,t,n,2,!1,s,i),c(m===null?null:String.fromCharCode(m))}case 117:{let m;return{code:m,pos:e}=GS(r,e,t,n,s,i),c(m===null?null:String.fromCodePoint(m))}case 116:return c(" ");case 98:return c("\b");case 118:return c("\v");case 102:return c("\f");case 13:r.charCodeAt(e)===10&&++e;case 10:t=e,++n;case 8232:case 8233:return c("");case 56:case 57:if(o)return c(null);i.strictNumericEscape(e-1,t,n);default:if(u>=48&&u<=55){let m=e-1,g=/^[0-7]+/.exec(r.slice(m,e+2))[0],y=parseInt(g,8);y>255&&(g=g.slice(0,-1),y=parseInt(g,8)),e+=g.length-1;let S=r.charCodeAt(e);if(g!=="0"||S===56||S===57){if(o)return c(null);i.strictNumericEscape(m,t,n)}return c(String.fromCharCode(y))}return c(String.fromCharCode(u))}}function $m(r,e,t,n,o,i,s,c){let u=e,m;return{n:m,pos:e}=ZS(r,e,t,n,16,o,i,!1,c,!s),m===null&&(s?c.invalidEscapeSequence(u,t,n):e=u-1),{code:m,pos:e}}function ZS(r,e,t,n,o,i,s,c,u,m){let h=e,g=o===16?OS.hex:OS.decBinOct,y=o===16?oa.hex:o===10?oa.dec:o===8?oa.oct:oa.bin,S=!1,w=0;for(let T=0,M=i??1/0;T<M;++T){let V=r.charCodeAt(e),F;if(V===95&&c!=="bail"){let H=r.charCodeAt(e-1),re=r.charCodeAt(e+1);if(c){if(Number.isNaN(re)||!y(re)||g.has(H)||g.has(re)){if(m)return{n:null,pos:e};u.unexpectedNumericSeparator(e,t,n)}}else{if(m)return{n:null,pos:e};u.numericSeparatorInEscapeSequence(e,t,n)}++e;continue}if(V>=97?F=V-97+10:V>=65?F=V-65+10:mce(V)?F=V-48:F=1/0,F>=o){if(F<=9&&m)return{n:null,pos:e};if(F<=9&&u.invalidDigit(e,t,n,o))F=0;else if(s)F=0,S=!0;else break}++e,w=w*o+F}return e===h||i!=null&&e-h!==i||S?{n:null,pos:e}:{n:w,pos:e}}function GS(r,e,t,n,o,i){let s=r.charCodeAt(e),c;if(s===123){if(++e,{code:c,pos:e}=$m(r,e,t,n,r.indexOf("}",e)-e,!0,o,i),++e,c!==null&&c>1114111)if(o)i.invalidCodePoint(e,t,n);else return{code:null,pos:e}}else({code:c,pos:e}=$m(r,e,t,n,4,!1,o,i));return{code:c,pos:e}}function yn(r,e,t){return new wt(t,r-e,r)}var gce=new Set([103,109,115,105,121,117,100,118]),zt=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new ur(e.startLoc,e.endLoc)}},Tm=class extends Im{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(n,o,i,s)=>this.optionFlags&2048?(this.raise($.InvalidDigit,yn(n,o,i),{radix:s}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder($.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder($.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder($.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder($.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(n,o,i)=>{this.recordStrictModeErrors($.StrictNumericEscape,yn(n,o,i))},unterminated:(n,o,i)=>{throw this.raise($.UnterminatedString,yn(n-1,o,i))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder($.StrictNumericEscape),unterminated:(n,o,i)=>{throw this.raise($.UnterminatedTemplate,yn(n,o,i))}}),this.state=new km,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new zt(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return um.lastIndex=e,um.test(this.input)?um.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return mm.lastIndex=e,mm.test(this.input)?mm.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let n=this.input.charCodeAt(e);(n&64512)===56320&&(t=65536+((t&1023)<<10)+(n&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,n])=>this.raise(t,n)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let n=this.state.pos,o=this.input.indexOf(e,n+2);if(o===-1)throw this.raise($.UnterminatedComment,this.state.curPosition());for(this.state.pos=o+e.length,ta.lastIndex=n+2;ta.test(this.input)&&ta.lastIndex<=o;)++this.state.curLine,this.state.lineStart=ta.lastIndex;if(this.isLookahead)return;let i={type:"CommentBlock",value:this.input.slice(n+2,o),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(o+e.length),loc:new ur(t,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(i),i}skipLineComment(e){let t=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let o=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!dr(o)&&++this.state.pos<this.length;)o=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let i=this.state.pos,c={type:"CommentLine",value:this.input.slice(t+e,i),start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(i),loc:new ur(n,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(c),c}skipSpace(){let e=this.state.pos,t=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let o=this.skipBlockComment("*/");o!==void 0&&(this.addComment(o),t?.push(o));break}case 47:{let o=this.skipLineComment(2);o!==void 0&&(this.addComment(o),t?.push(o));break}default:break e}break;default:if(dce(n))++this.state.pos;else if(n===45&&!this.inModule&&this.optionFlags&8192){let o=this.state.pos;if(this.input.charCodeAt(o+1)===45&&this.input.charCodeAt(o+2)===62&&(e===0||this.state.lineStart>e)){let i=this.skipLineComment(3);i!==void 0&&(this.addComment(i),t?.push(i))}else break e}else if(n===60&&!this.inModule&&this.optionFlags&8192){let o=this.state.pos;if(this.input.charCodeAt(o+1)===33&&this.input.charCodeAt(o+2)===45&&this.input.charCodeAt(o+3)===45){let i=this.skipLineComment(4);i!==void 0&&(this.addComment(i),t?.push(i))}else break e}else break e}}if(t?.length>0){let n=this.state.pos,o={start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(n),comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(o)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(n)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise($.UnexpectedDigitAfterHash,this.state.curPosition());if(t===123||t===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(t===123?$.RecordExpressionHashIncorrectStartSyntaxType:$.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,t===123?this.finishToken(7):this.finishToken(1)}else vt(t)?(++this.state.pos,this.finishToken(139,this.readWord1(t))):t===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57){this.readNumber(!0);return}e===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(e!==33)return!1;let t=this.state.pos;for(this.state.pos+=1;!dr(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let n=this.input.slice(t+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(e){let t=e===42?55:54,n=1,o=this.input.charCodeAt(this.state.pos+1);e===42&&o===42&&(n++,o=this.input.charCodeAt(this.state.pos+2),t=57),o===61&&!this.state.inType&&(n++,t=e===37?33:30),this.finishOp(t,n)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(e===124?41:42,2);return}if(e===124){if(t===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&t===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise($.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&t===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise($.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(t===61){this.finishOp(30,2);return}this.finishOp(e===124?43:45,1)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);e===61&&!this.state.inType?this.finishOp(32,2):e===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===e){this.finishOp(34,2);return}t===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===60){if(this.input.charCodeAt(e+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(t===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(t===62){let n=this.input.charCodeAt(e+2)===62?3:2;if(this.input.charCodeAt(e+n)===61){this.finishOp(30,n+1);return}this.finishOp(52,n);return}if(t===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(t===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(e===61&&t===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(e===61?29:35,1)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);e===63?t===61?this.finishOp(30,3):this.finishOp(40,2):e===46&&!(t>=48&&t<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(e){switch(e){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise($.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise($.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let t=this.input.charCodeAt(this.state.pos+1);if(t===120||t===88){this.readRadixNumber(16);return}if(t===111||t===79){this.readRadixNumber(8);return}if(t===98||t===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(e);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(e);return;case 124:case 38:this.readToken_pipe_amp(e);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(e);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(e);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(vt(e)){this.readWord(e);return}}throw this.raise($.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(e)})}finishOp(e,t){let n=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,n)}readRegexp(){let e=this.state.startLoc,t=this.state.start+1,n,o,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise($.UnterminatedRegExp,qe(e,1));let m=this.input.charCodeAt(i);if(dr(m))throw this.raise($.UnterminatedRegExp,qe(e,1));if(n)n=!1;else{if(m===91)o=!0;else if(m===93&&o)o=!1;else if(m===47&&!o)break;n=m===92}}let s=this.input.slice(t,i);++i;let c="",u=()=>qe(e,i+2-t);for(;i<this.length;){let m=this.codePointAtPos(i),h=String.fromCharCode(m);if(gce.has(m))m===118?c.includes("u")&&this.raise($.IncompatibleRegExpUVFlags,u()):m===117&&c.includes("v")&&this.raise($.IncompatibleRegExpUVFlags,u()),c.includes(h)&&this.raise($.DuplicateRegExpFlags,u());else if(mo(m)||m===92)this.raise($.MalformedRegExpFlags,u());else break;++i,c+=h}this.state.pos=i,this.finishToken(138,{pattern:s,flags:c})}readInt(e,t,n=!1,o=!0){let{n:i,pos:s}=ZS(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,n,o,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(e){let t=this.state.pos,n=this.state.curPosition(),o=!1;this.state.pos+=2;let i=this.readInt(e);i==null&&this.raise($.InvalidDigit,qe(n,2),{radix:e});let s=this.input.charCodeAt(this.state.pos);if(s===110)++this.state.pos,o=!0;else if(s===109)throw this.raise($.InvalidDecimal,n);if(vt(this.codePointAtPos(this.state.pos)))throw this.raise($.NumberIdentifier,this.state.curPosition());if(o){let c=this.input.slice(t,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,c);return}this.finishToken(135,i)}readNumber(e){let t=this.state.pos,n=this.state.curPosition(),o=!1,i=!1,s=!1,c=!1;!e&&this.readInt(10)===null&&this.raise($.InvalidNumber,this.state.curPosition());let u=this.state.pos-t>=2&&this.input.charCodeAt(t)===48;if(u){let S=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors($.StrictOctalLiteral,n),!this.state.strict){let w=S.indexOf("_");w>0&&this.raise($.ZeroDigitNumericSeparator,qe(n,w))}c=u&&!/[89]/.test(S)}let m=this.input.charCodeAt(this.state.pos);if(m===46&&!c&&(++this.state.pos,this.readInt(10),o=!0,m=this.input.charCodeAt(this.state.pos)),(m===69||m===101)&&!c&&(m=this.input.charCodeAt(++this.state.pos),(m===43||m===45)&&++this.state.pos,this.readInt(10)===null&&this.raise($.InvalidOrMissingExponent,n),o=!0,s=!0,m=this.input.charCodeAt(this.state.pos)),m===110&&((o||u)&&this.raise($.InvalidBigIntLiteral,n),++this.state.pos,i=!0),m===109){this.expectPlugin("decimal",this.state.curPosition()),(s||u)&&this.raise($.InvalidDecimal,n),++this.state.pos;var h=!0}if(vt(this.codePointAtPos(this.state.pos)))throw this.raise($.NumberIdentifier,this.state.curPosition());let g=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(i){this.finishToken(136,g);return}if(h){this.finishToken(137,g);return}let y=c?parseInt(g,8):parseFloat(g);this.finishToken(135,y)}readCodePoint(e){let{code:t,pos:n}=GS(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=n,t}readString(e){let{str:t,pos:n,curLine:o,lineStart:i}=RS(e===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=o,this.finishToken(134,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:o,curLine:i,lineStart:s}=RS("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=o+1,this.state.lineStart=s,this.state.curLine=i,n&&(this.state.firstInvalidTemplateEscapePos=new wt(n.curLine,n.pos-n.lineStart,this.sourceToOffsetPos(n.pos))),this.input.codePointAt(o)===96?this.finishToken(24,n?null:e+t+"`"):(this.state.pos++,this.finishToken(25,n?null:e+t+"${"))}recordStrictModeErrors(e,t){let n=t.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(e,t):this.state.strictErrors.set(n,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",n=this.state.pos,o=this.state.pos;for(e!==void 0&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let i=this.codePointAtPos(this.state.pos);if(mo(i))this.state.pos+=i<=65535?1:2;else if(i===92){this.state.containsEsc=!0,t+=this.input.slice(o,this.state.pos);let s=this.state.curPosition(),c=this.state.pos===n?vt:mo;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise($.MissingUnicodeEscape,this.state.curPosition()),o=this.state.pos-1;continue}++this.state.pos;let u=this.readCodePoint(!0);u!==null&&(c(u)||this.raise($.EscapedCharNotAnIdentifier,s),t+=String.fromCodePoint(u)),o=this.state.pos}else break}return t+this.input.slice(o,this.state.pos)}readWord(e){let t=this.readWord1(e),n=jm.get(t);n!==void 0?this.finishToken(n,Kt(n)):this.finishToken(132,t)}checkKeywordEscapes(){let{type:e}=this.state;qm(e)&&this.state.containsEsc&&this.raise($.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Kt(e)})}raise(e,t,n={}){let o=t instanceof wt?t:t.loc.start,i=e(o,n);if(!(this.optionFlags&2048))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(e,t,n={}){let o=t instanceof wt?t:t.loc.start,i=o.index,s=this.state.errors;for(let c=s.length-1;c>=0;c--){let u=s[c];if(u.loc.index===i)return s[c]=e(o,n);if(u.loc.index<i)break}return this.raise(e,t,n)}updateContext(e){}unexpected(e,t){throw this.raise($.UnexpectedToken,e??this.state.startLoc,{expected:t?Kt(t):null})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise($.MissingPlugin,t??this.state.startLoc,{missingPlugin:[e]})}expectOnePlugin(e){if(!e.some(t=>this.hasPlugin(t)))throw this.raise($.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:e})}errorBuilder(e){return(t,n,o)=>{this.raise(e,yn(t,n,o))}}},Pm=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Cm=class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Pm)}exit(){let e=this.stack.pop(),t=this.current();for(let[n,o]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(n)||t.undefinedPrivateNames.set(n,o):this.parser.raise($.InvalidPrivateFieldResolution,o,{identifierName:n})}declarePrivateName(e,t,n){let{privateNames:o,loneAccessors:i,undefinedPrivateNames:s}=this.current(),c=o.has(e);if(t&3){let u=c&&i.get(e);if(u){let m=u&4,h=t&4,g=u&3,y=t&3;c=g===y||m!==h,c||i.delete(e)}else c||i.set(e,t)}c&&this.parser.raise($.PrivateNameRedeclaration,n,{identifierName:e}),o.add(e),s.delete(e)}usePrivateName(e,t){let n;for(n of this.stack)if(n.privateNames.has(e))return;n?n.undefinedPrivateNames.set(e,t):this.parser.raise($.InvalidPrivateFieldResolution,t,{identifierName:e})}},mr=class{constructor(e=0){this.type=e}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},ca=class extends mr{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,t){let n=t.index;this.declarationErrors.set(n,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}},Om=class{constructor(e){this.parser=void 0,this.stack=[new mr],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,t){let n=t.loc.start,{stack:o}=this,i=o.length-1,s=o[i];for(;!s.isCertainlyParameterDeclaration();){if(s.canBeArrowParameterDeclaration())s.recordDeclarationError(e,n);else return;s=o[--i]}this.parser.raise(e,n)}recordArrowParameterBindingError(e,t){let{stack:n}=this,o=n[n.length-1],i=t.loc.start;if(o.isCertainlyParameterDeclaration())this.parser.raise(e,i);else if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(e,i);else return}recordAsyncArrowParametersError(e){let{stack:t}=this,n=t.length-1,o=t[n];for(;o.canBeArrowParameterDeclaration();)o.type===2&&o.recordDeclarationError($.AwaitBindingIdentifier,e),o=t[--n]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors(([n,o])=>{this.parser.raise(n,o);let i=e.length-2,s=e[i];for(;s.canBeArrowParameterDeclaration();)s.clearDeclarationError(o.index),s=e[--i]})}};function xce(){return new mr(3)}function yce(){return new ca(1)}function bce(){return new ca(2)}function KS(){return new mr}var Rm=class extends Tm{addExtra(e,t,n,o=!0){if(!e)return;let{extra:i}=e;i==null&&(i={},e.extra=i),o?i[t]=n:Object.defineProperty(i,t,{enumerable:o,value:n})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){if(this.input.startsWith(t,e)){let n=this.input.charCodeAt(e+t.length);return!(mo(n)||(n&64512)===55296)}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return this.isContextual(e)?(this.next(),!0):!1}expectContextual(e,t){if(!this.eatContextual(e)){if(t!=null)throw this.raise(t,this.state.startLoc);this.unexpected(null,e)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return CS(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return CS(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise($.MissingSemicolon,this.state.lastTokEndLoc)}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let n={node:null};try{let o=e((i=null)=>{throw n.node=i,n});if(this.state.errors.length>t.errors.length){let i=this.state;return this.state=t,this.state.tokensLength=i.tokensLength,{node:o,error:i.errors[t.errors.length],thrown:!1,aborted:!1,failState:i}}return{node:o,error:null,thrown:!1,aborted:!1,failState:null}}catch(o){let i=this.state;if(this.state=t,o instanceof SyntaxError)return{node:null,error:o,thrown:!0,aborted:!1,failState:i};if(o===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:i};throw o}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:o,privateKeyLoc:i,optionalParametersLoc:s,voidPatternLoc:c}=e,u=!!n||!!o||!!s||!!i||!!c;if(!t)return u;n!=null&&this.raise($.InvalidCoverInitializedName,n),o!=null&&this.raise($.DuplicateProto,o),i!=null&&this.raise($.UnexpectedPrivateField,i),s!=null&&this.unexpected(s),c!=null&&this.raise($.InvalidCoverDiscardElement,c)}isLiteralPropertyName(){return jS(this.state.type)}isPrivateName(e){return e.type==="PrivateName"}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return(e.type==="MemberExpression"||e.type==="OptionalMemberExpression")&&this.isPrivateName(e.property)}isObjectProperty(e){return e.type==="ObjectProperty"}isObjectMethod(e){return e.type==="ObjectMethod"}initializeScopes(e=this.options.sourceType==="module"){let t=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let o=this.inModule;this.inModule=e;let i=this.scope,s=this.getScopeHandler();this.scope=new s(this,e);let c=this.prodParam;this.prodParam=new vm;let u=this.classScope;this.classScope=new Cm(this);let m=this.expressionScope;return this.expressionScope=new Om(this),()=>{this.state.labels=t,this.exportedIdentifiers=n,this.inModule=o,this.scope=i,this.prodParam=c,this.classScope=u,this.expressionScope=m}}enterInitialScopes(){let e=0;(this.inModule||this.optionFlags&1)&&(e|=2),this.optionFlags&32&&(e|=1);let t=!this.inModule&&this.options.sourceType==="commonjs";(t||this.optionFlags&2)&&(e|=4),this.prodParam.enter(e);let n=t?514:1;this.optionFlags&4&&(n|=512),this.scope.enter(n)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;t!==null&&this.expectPlugin("destructuringPrivate",t)}},lr=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},hr=class{constructor(e,t,n){this.type="",this.start=t,this.end=0,this.loc=new ur(n),e?.optionFlags&128&&(this.range=[t,0]),e!=null&&e.filename&&(this.loc.filename=e.filename)}},Mm=hr.prototype;Mm.__clone=function(){let r=new hr(void 0,this.start,this.loc.start),e=Object.keys(this);for(let t=0,n=e.length;t<n;t++){let o=e[t];o!=="leadingComments"&&o!=="trailingComments"&&o!=="innerComments"&&(r[o]=this[o])}return r};var Em=class extends Rm{startNode(){let e=this.state.startLoc;return new hr(this,e.index,e)}startNodeAt(e){return new hr(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,n){return e.type=t,e.end=n.index,e.loc.end=n,this.optionFlags&128&&(e.range[1]=n.index),this.optionFlags&4096&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.optionFlags&128&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.optionFlags&128&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}castNodeTo(e,t){return e.type=t,e}cloneIdentifier(e){let{type:t,start:n,end:o,loc:i,range:s,name:c}=e,u=Object.create(Mm);return u.type=t,u.start=n,u.end=o,u.loc=i,u.range=s,u.name=c,e.extra&&(u.extra=e.extra),u}cloneStringLiteral(e){let{type:t,start:n,end:o,loc:i,range:s,extra:c}=e,u=Object.create(Mm);return u.type=t,u.start=n,u.end=o,u.loc=i,u.range=s,u.extra=c,u.value=e.value,u}},Dm=r=>r.type==="ParenthesizedExpression"?Dm(r.expression):r,Am=class extends Em{toAssignable(e,t=!1){var n,o;let i;switch((e.type==="ParenthesizedExpression"||(n=e.extra)!=null&&n.parenthesized)&&(i=Dm(e),t?i.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError($.InvalidParenthesizedAssignment,e):i.type!=="CallExpression"&&i.type!=="MemberExpression"&&!this.isOptionalMemberExpression(i)&&this.raise($.InvalidParenthesizedAssignment,e):this.raise($.InvalidParenthesizedAssignment,e)),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(e,"ObjectPattern");for(let c=0,u=e.properties.length,m=u-1;c<u;c++){var s;let h=e.properties[c],g=c===m;this.toAssignableObjectExpressionProp(h,g,t),g&&h.type==="RestElement"&&(s=e.extra)!=null&&s.trailingCommaLoc&&this.raise($.RestTrailingComma,e.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:c,value:u}=e;this.isPrivateName(c)&&this.classScope.usePrivateName(this.getPrivateNameSV(c),c.loc.start),this.toAssignable(u,t);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(e,"ArrayPattern"),this.toAssignableList(e.elements,(o=e.extra)==null?void 0:o.trailingCommaLoc,t);break;case"AssignmentExpression":e.operator!=="="&&this.raise($.MissingEqInAssignment,e.left.loc.end),this.castNodeTo(e,"AssignmentPattern"),delete e.operator,e.left.type==="VoidPattern"&&this.raise($.VoidPatternInitializer,e.left),this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t);break}}toAssignableObjectExpressionProp(e,t,n){if(e.type==="ObjectMethod")this.raise(e.kind==="get"||e.kind==="set"?$.PatternHasAccessor:$.PatternHasMethod,e.key);else if(e.type==="SpreadElement"){this.castNodeTo(e,"RestElement");let o=e.argument;this.checkToRestConversion(o,!1),this.toAssignable(o,n),t||this.raise($.RestTrailingComma,e)}else this.toAssignable(e,n)}toAssignableList(e,t,n){let o=e.length-1;for(let i=0;i<=o;i++){let s=e[i];s&&(this.toAssignableListItem(e,i,n),s.type==="RestElement"&&(i<o?this.raise($.RestTrailingComma,s):t&&this.raise($.RestTrailingComma,t)))}}toAssignableListItem(e,t,n){let o=e[t];if(o.type==="SpreadElement"){this.castNodeTo(o,"RestElement");let i=o.argument;this.checkToRestConversion(i,!0),this.toAssignable(i,n)}else this.toAssignable(o,n)}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let n=e.properties.length-1;return e.properties.every((o,i)=>o.type!=="ObjectMethod"&&(i===n||o.type!=="SpreadElement")&&this.isAssignable(o))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every(n=>n===null||this.isAssignable(n));case"AssignmentExpression":return e.operator==="=";case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let n of e)n?.type==="ArrayExpression"&&this.toReferencedListDeep(n.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();this.next();let t=this.parseBindingAtom();return t.type==="VoidPattern"&&this.raise($.UnexpectedVoidPattern,t),e.argument=t,this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(e,t,n){let o=n&1,i=[],s=!0;for(;!this.eat(e);)if(s?s=!1:this.expect(12),o&&this.match(12))i.push(null);else{if(this.eat(e))break;if(this.match(21)){let c=this.parseRestBinding();if((this.hasPlugin("flow")||n&2)&&(c=this.parseFunctionParamType(c)),i.push(c),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let c=[];if(n&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise($.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)c.push(this.parseDecorator());i.push(this.parseBindingElement(n,c))}}return i}parseBindingRestProperty(e){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(e.argument=this.parseVoidPattern(null),this.raise($.UnexpectedVoidPattern,e.argument)):e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let{type:e,startLoc:t}=this.state;if(e===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return e===139?(this.expectPlugin("destructuringPrivate",t),this.classScope.usePrivateName(this.state.value,t),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,t,!1,!1,!0,!1)}parseBindingElement(e,t){let n=this.parseMaybeDefault();return(this.hasPlugin("flow")||e&2)&&this.parseFunctionParamType(n),t.length&&(n.decorators=t,this.resetStartLocationFromNode(n,t[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(e){return e}parseMaybeDefault(e,t){if(e??(e=this.state.startLoc),t=t??this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return t.type==="VoidPattern"&&this.raise($.VoidPatternInitializer,t),n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(e,t,n,o){switch(e){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!t&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(e){return e.type==="OptionalMemberExpression"}checkLVal(e,t,n=64,o=!1,i=!1,s=!1,c=!1){var u;let m=e.type;if(this.isObjectMethod(e))return;let h=this.isOptionalMemberExpression(e);if(h||m==="MemberExpression"){h&&(this.expectPlugin("optionalChainingAssign",e.loc.start),t.type!=="AssignmentExpression"&&this.raise($.InvalidLhsOptionalChaining,e,{ancestor:t})),n!==64&&this.raise($.InvalidPropertyBindingPattern,e);return}if(m==="Identifier"){this.checkIdentifier(e,n,i);let{name:V}=e;o&&(o.has(V)?this.raise($.ParamDupe,e):o.add(V));return}else m==="VoidPattern"&&t.type==="CatchClause"&&this.raise($.VoidPatternCatchClauseParam,e);let g=Dm(e);c||(c=g.type==="CallExpression"&&(g.callee.type==="Import"||g.callee.type==="Super"));let y=this.isValidLVal(m,c,!(s||(u=e.extra)!=null&&u.parenthesized)&&t.type==="AssignmentExpression",n);if(y===!0)return;if(y===!1){let V=n===64?$.InvalidLhs:$.InvalidLhsBinding;this.raise(V,e,{ancestor:t});return}let S,w;typeof y=="string"?(S=y,w=m==="ParenthesizedExpression"):[S,w]=y;let T=m==="ArrayPattern"||m==="ObjectPattern"?{type:m}:t,M=e[S];if(Array.isArray(M))for(let V of M)V&&this.checkLVal(V,T,n,o,i,w,!0);else M&&this.checkLVal(M,T,n,o,i,w,c)}checkIdentifier(e,t,n=!1){this.state.strict&&(n?qS(e.name,this.inModule):BS(e.name))&&(t===64?this.raise($.StrictEvalArguments,e,{referenceName:e.name}):this.raise($.StrictEvalArgumentsBinding,e,{bindingName:e.name})),t&8192&&e.name==="let"&&this.raise($.LetInLexicalBinding,e),t&64||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise($.InvalidRestAssignmentPattern,e)}}checkCommaAfterRest(e){return this.match(12)?(this.raise(this.lookaheadCharCode()===e?$.RestTrailingComma:$.ElementAfterRest,this.state.startLoc),!0):!1}},hm=/in(?:stanceof)?|as|satisfies/y;function Sce(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}function MS(r){if(!r)throw new Error("Assert fail")}var Z=ut`typescript`({AbstractMethodHasImplementation:({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:r})=>`'declare' is not allowed in ${r}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:r})=>`Accessibility modifier already seen: '${r}'.`,DuplicateModifier:({modifier:r})=>`Duplicate modifier: '${r}'.`,EmptyHeritageClauseType:({token:r})=>`'${r}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:r})=>`'${r}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:r=>`'${r}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:r=>`'${r}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`,UsingDeclarationInAmbientContext:r=>`'${r}' declarations are not allowed in ambient contexts.`});function zce(r){switch(r){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function ES(r){return r==="private"||r==="public"||r==="protected"}function vce(r){return r==="in"||r==="out"}var wce=r=>class extends r{constructor(...t){super(...t),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:Z.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:Z.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:Z.InvalidModifierOnTypeParameter})}getScopeHandler(){return zm}tsIsIdentifier(){return me(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,n,o){if(!me(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(t.includes(i)){if(o&&this.match(106)||n&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:t,disallowedModifiers:n,stopOnStartOfClassStaticBlock:o,errorTemplate:i=Z.InvalidModifierOnTypeMember},s){let c=(m,h,g,y)=>{h===g&&s[y]&&this.raise(Z.InvalidModifiersOrder,m,{orderedModifiers:[g,y]})},u=(m,h,g,y)=>{(s[g]&&h===y||s[y]&&h===g)&&this.raise(Z.IncompatibleModifiers,m,{modifiers:[g,y]})};for(;;){let{startLoc:m}=this.state,h=this.tsParseModifier(t.concat(n??[]),o,s.static);if(!h)break;ES(h)?s.accessibility?this.raise(Z.DuplicateAccessibilityModifier,m,{modifier:h}):(c(m,h,h,"override"),c(m,h,h,"static"),c(m,h,h,"readonly"),s.accessibility=h):vce(h)?(s[h]&&this.raise(Z.DuplicateModifier,m,{modifier:h}),s[h]=!0,c(m,h,"in","out")):(hasOwnProperty.call(s,h)?this.raise(Z.DuplicateModifier,m,{modifier:h}):(c(m,h,"static","readonly"),c(m,h,"static","override"),c(m,h,"override","readonly"),c(m,h,"abstract","override"),u(m,h,"declare","override"),u(m,h,"static","abstract")),s[h]=!0),n!=null&&n.includes(h)&&this.raise(i,m,{modifier:h})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(t,n){let o=[];for(;!this.tsIsListTerminator(t);)o.push(n());return o}tsParseDelimitedList(t,n,o){return Sce(this.tsParseDelimitedListWorker(t,n,!0,o))}tsParseDelimitedListWorker(t,n,o,i){let s=[],c=-1;for(;!this.tsIsListTerminator(t);){c=-1;let u=n();if(u==null)return;if(s.push(u),this.eat(12)){c=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(t))break;o&&this.expect(12);return}return i&&(i.value=c),s}tsParseBracketedList(t,n,o,i,s){i||(o?this.expect(0):this.expect(47));let c=this.tsParseDelimitedList(t,n,s);return o?this.expect(3):this.expect(48),c}tsParseImportType(){let t=this.startNode();return this.expect(83),this.expect(10),this.match(134)?t.argument=this.parseStringLiteral(this.state.value):(this.raise(Z.UnsupportedImportTypeArgument,this.state.startLoc),t.argument=super.parseExprAtom()),this.eat(12)?t.options=this.tsParseImportTypeOptions():t.options=null,this.expect(11),this.eat(16)&&(t.qualifier=this.tsParseEntityName(3)),this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseImportTypeOptions(){let t=this.startNode();this.expect(5);let n=this.startNode();return this.isContextual(76)?(n.method=!1,n.key=this.parseIdentifier(!0),n.computed=!1,n.shorthand=!1):this.unexpected(null,76),this.expect(14),n.value=this.tsParseImportTypeWithPropertyValue(),t.properties=[this.finishObjectProperty(n)],this.eat(12),this.expect(8),this.finishNode(t,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let t=this.startNode(),n=[];for(this.expect(5);!this.match(8);){let o=this.state.type;me(o)||o===134?n.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return t.properties=n,this.next(),this.finishNode(t,"ObjectExpression")}tsParseEntityName(t){let n;if(t&1&&this.match(78))if(t&2)n=this.parseIdentifier(!0);else{let o=this.startNode();this.next(),n=this.finishNode(o,"ThisExpression")}else n=this.parseIdentifier(!!(t&1));for(;this.eat(16);){let o=this.startNodeAtNode(n);o.left=n,o.right=this.parseIdentifier(!!(t&1)),n=this.finishNode(o,"TSQualifiedName")}return n}tsParseTypeReference(){let t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();let n=this.startNodeAtNode(t);return n.parameterName=t,n.typeAnnotation=this.tsParseTypeAnnotation(!1),n.asserts=!1,this.finishNode(n,"TSTypePredicate")}tsParseThisTypeNode(){let t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){let t=this.startNode();return this.expect(87),this.match(83)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(t){let n=this.startNode();return t(n),n.name=this.tsParseTypeParameterName(),n.constraint=this.tsEatThenParseType(81),n.default=this.tsEatThenParseType(29),this.finishNode(n,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(47))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){let n=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let o={value:-1};return n.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,o),n.params.length===0&&this.raise(Z.EmptyTypeParameters,n),o.value!==-1&&this.addExtra(n,"trailingComma",o.value),this.finishNode(n,"TSTypeParameterDeclaration")}tsFillSignature(t,n){let o=t===19,i="parameters",s="typeAnnotation";n.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),n[i]=this.tsParseBindingListForSignature(),o?n[s]=this.tsParseTypeOrTypePredicateAnnotation(t):this.match(t)&&(n[s]=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){let t=super.parseBindingList(11,41,2);for(let n of t){let{type:o}=n;(o==="AssignmentPattern"||o==="TSParameterProperty")&&this.raise(Z.UnsupportedSignatureParameterKind,n,{type:o})}return t}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(t,n){return this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon(),this.finishNode(n,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),me(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(t){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let n=this.parseIdentifier();n.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(n),this.expect(3),t.parameters=[n];let o=this.tsTryParseTypeAnnotation();return o&&(t.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,n){if(this.eat(17)&&(t.optional=!0),this.match(10)||this.match(47)){n&&this.raise(Z.ReadonlyForMethodSignature,t);let o=t;o.kind&&this.match(47)&&this.raise(Z.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,o),this.tsParseTypeMemberSemicolon();let i="parameters",s="typeAnnotation";if(o.kind==="get")o[i].length>0&&(this.raise($.BadGetterArity,this.state.curPosition()),this.isThisParam(o[i][0])&&this.raise(Z.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(o.kind==="set"){if(o[i].length!==1)this.raise($.BadSetterArity,this.state.curPosition());else{let c=o[i][0];this.isThisParam(c)&&this.raise(Z.AccessorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(Z.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(Z.SetAccessorCannotHaveRestParameter,this.state.curPosition())}o[s]&&this.raise(Z.SetAccessorCannotHaveReturnType,o[s])}else o.kind="method";return this.finishNode(o,"TSMethodSignature")}else{let o=t;n&&(o.readonly=!0);let i=this.tsTryParseTypeAnnotation();return i&&(o.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(o,"TSPropertySignature")}}tsParseTypeMember(){let t=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(77)){let o=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(o,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},t);let n=this.tsTryParseIndexSignature(t);return n||(super.parsePropertyName(t),!t.computed&&t.key.type==="Identifier"&&(t.key.name==="get"||t.key.name==="set")&&this.tsTokenCanFollowModifier()&&(t.kind=t.key.name,super.parsePropertyName(t),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){let t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),t}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let t=this.startNode();this.expect(5),this.match(53)?(t.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(t.readonly=!0),this.expect(0);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),t.typeParameter=this.finishNode(n,"TSTypeParameter"),t.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(t.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(t,"TSMappedType")}tsParseTupleType(){let t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let n=!1;return t.elementTypes.forEach(o=>{let{type:i}=o;n&&i!=="TSRestType"&&i!=="TSOptionalType"&&!(i==="TSNamedTupleMember"&&o.optional)&&this.raise(Z.OptionalTypeBeforeRequired,o),n||(n=i==="TSNamedTupleMember"&&o.optional||i==="TSOptionalType")}),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){let t=this.state.startLoc,n=this.eat(21),{startLoc:o}=this.state,i,s,c,u,h=mt(this.state.type)?this.lookaheadCharCode():null;if(h===58)i=!0,c=!1,s=this.parseIdentifier(!0),this.expect(14),u=this.tsParseType();else if(h===63){c=!0;let g=this.state.value,y=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,s=this.createIdentifier(this.startNodeAt(o),g),this.expect(17),this.expect(14),u=this.tsParseType()):(i=!1,u=y,this.expect(17))}else u=this.tsParseType(),c=this.eat(17),i=this.eat(14);if(i){let g;s?(g=this.startNodeAt(o),g.optional=c,g.label=s,g.elementType=u,this.eat(17)&&(g.optional=!0,this.raise(Z.TupleOptionalAfterType,this.state.lastTokStartLoc))):(g=this.startNodeAt(o),g.optional=c,this.raise(Z.InvalidTupleMemberLabel,u),g.label=u,g.elementType=this.tsParseType()),u=this.finishNode(g,"TSNamedTupleMember")}else if(c){let g=this.startNodeAt(o);g.typeAnnotation=u,u=this.finishNode(g,"TSOptionalType")}if(n){let g=this.startNodeAt(t);g.typeAnnotation=u,u=this.finishNode(g,"TSRestType")}return u}tsParseParenthesizedType(){let t=this.startNode();return this.expect(10),t.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,n){let o=this.startNode();return t==="TSConstructorType"&&(o.abstract=!!n,n&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,o)),this.finishNode(o,t)}tsParseLiteralTypeNode(){let t=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){let t=this.startNode();return t.literal=super.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let t=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let t=this.startNode(),n=this.lookahead();return n.type!==135&&n.type!==136&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:t}=this.state;if(me(t)||t===88||t===84){let n=t===88?"TSVoidKeyword":t===84?"TSNullKeyword":zce(this.state.value);if(n!==void 0&&this.lookaheadCharCode()!==46){let o=this.startNode();return this.next(),this.finishNode(o,n)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:t}=this.state,n=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let o=this.startNodeAt(t);o.elementType=n,this.expect(3),n=this.finishNode(o,"TSArrayType")}else{let o=this.startNodeAt(t);o.objectType=n,o.indexType=this.tsParseType(),this.expect(3),n=this.finishNode(o,"TSIndexedAccessType")}return n}tsParseTypeOperator(){let t=this.startNode(),n=this.state.value;return this.next(),t.operator=n,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),n==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(Z.UnexpectedReadonly,t)}}tsParseInferType(){let t=this.startNode();this.expectContextual(115);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),t.typeParameter=this.finishNode(n,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let t=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return t}}tsParseTypeOperatorOrHigher(){return Bae(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(t,n,o){let i=this.startNode(),s=this.eat(o),c=[];do c.push(n());while(this.eat(o));return c.length===1&&!s?c[0]:(i.types=c,this.finishNode(i,t))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(me(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:t}=this.state,n=t.length;try{return this.parseObjectLike(8,!0),t.length===n}catch{return!1}}if(this.match(0)){this.next();let{errors:t}=this.state,n=t.length;try{return super.parseBindingList(3,93,1),t.length===n}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType(()=>{let n=this.startNode();this.expect(t);let o=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let u=this.tsParseThisTypeOrThisTypePredicate();return u.type==="TSThisType"?(o.parameterName=u,o.asserts=!0,o.typeAnnotation=null,u=this.finishNode(o,"TSTypePredicate")):(this.resetStartLocationFromNode(u,o),u.asserts=!0),n.typeAnnotation=u,this.finishNode(n,"TSTypeAnnotation")}let s=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!s)return i?(o.parameterName=this.parseIdentifier(),o.asserts=i,o.typeAnnotation=null,n.typeAnnotation=this.finishNode(o,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,n);let c=this.tsParseTypeAnnotation(!1);return o.parameterName=s,o.typeAnnotation=c,o.asserts=i,n.typeAnnotation=this.finishNode(o,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let t=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let t=this.state.containsEsc;return this.next(),!me(this.state.type)&&!this.match(78)?!1:(t&&this.raise($.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(t=!0,n=this.startNode()){return this.tsInType(()=>{t&&this.expect(14),n.typeAnnotation=this.tsParseType()}),this.finishNode(n,"TSTypeAnnotation")}tsParseType(){MS(this.state.inType);let t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return t;let n=this.startNodeAtNode(t);return n.checkType=t,n.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),n.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),n.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(n,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Z.ReservedTypeAssertion,this.state.startLoc);let t=this.startNode();return t.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){let n=this.state.startLoc,o=this.tsParseDelimitedList("HeritageClauseElement",()=>{let i=this.startNode();return i.expression=this.tsParseEntityName(3),this.match(47)&&(i.typeParameters=this.tsParseTypeArguments()),this.finishNode(i,"TSExpressionWithTypeArguments")});return o.length||this.raise(Z.EmptyHeritageClauseType,n,{token:t}),o}tsParseInterfaceDeclaration(t,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(t.declare=!0),me(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise(Z.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(t.extends=this.tsParseHeritageClause("extends"));let o=this.startNode();return o.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(o,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType(()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let n=this.startNode();return this.next(),this.finishNode(n,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()!==ue.brace){let n=this.state.context;this.state.context=[n[0]];try{return t()}finally{this.state.context=n}}else return t()}tsInType(t){let n=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=n}}tsInDisallowConditionalTypesContext(t){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=n}}tsInAllowConditionalTypesContext(t){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=n}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType(()=>(this.expect(t),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let t=this.startNode();return t.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,n={}){return n.const&&(t.const=!0),n.declare&&(t.declare=!0),this.expectContextual(126),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){let t=this.startNode();return this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(){let t=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,n=!1){if(t.id=this.parseIdentifier(),n||this.checkIdentifier(t.id,1024),this.eat(16)){let o=this.startNode();this.tsParseModuleOrNamespaceDeclaration(o,!0),t.body=o}else this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual(112)?(t.kind="global",t.global=!0,t.id=this.parseIdentifier()):this.match(134)?(t.kind="module",t.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,n,o){t.isExport=o||!1,t.id=n||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(29);let i=this.tsParseModuleReference();return t.importKind==="type"&&i.type!=="TSExternalModuleReference"&&this.raise(Z.ImportAliasHasImportType,i),t.moduleReference=i,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let t=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){let n=this.state.clone(),o=t();return this.state=n,o}tsTryParseAndCatch(t){let n=this.tryParse(o=>t()||o());if(!(n.aborted||!n.node))return n.error&&(this.state=n.failState),n.node}tsTryParse(t){let n=this.state.clone(),o=t();if(o!==void 0&&o!==!1)return o;this.state=n}tsTryParseDeclare(t){if(this.isLineTerminator())return;let n=this.state.type;return this.tsInAmbientContext(()=>{switch(n){case 68:return t.declare=!0,super.parseFunctionStatement(t,!1,!1);case 80:return t.declare=!0,this.parseClass(t,!0,!1);case 126:return this.tsParseEnumDeclaration(t,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(t);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(t.declare=!0,this.parseVarStatement(t,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(t,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(Z.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.parseVarStatement(t,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(Z.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.next(),this.parseVarStatement(t,"await using",!0);break;case 129:{let o=this.tsParseInterfaceDeclaration(t,{declare:!0});if(o)return o}default:if(me(n))return this.tsParseDeclaration(t,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(t,n,o,i){switch(n){case 124:if(this.tsCheckLineTerminator(o)&&(this.match(80)||me(this.state.type)))return this.tsParseAbstractDeclaration(t,i);break;case 127:if(this.tsCheckLineTerminator(o)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(t);if(me(this.state.type))return t.kind="module",this.tsParseModuleOrNamespaceDeclaration(t)}break;case 128:if(this.tsCheckLineTerminator(o)&&me(this.state.type))return t.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(t);break;case 130:if(this.tsCheckLineTerminator(o)&&me(this.state.type))return this.tsParseTypeAliasDeclaration(t);break}}tsCheckLineTerminator(t){return t?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(47))return;let n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let o=this.tsTryParseAndCatch(()=>{let i=this.startNodeAt(t);return i.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(i),i.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),i});if(this.state.maybeInArrowParameters=n,!!o)return super.parseArrowExpression(o,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let t=this.startNode();return t.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),t.params.length===0?this.raise(Z.EmptyTypeArguments,t):!this.state.inType&&this.curContext()===ue.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return qae(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(t,n){let o=n.length?n[0].loc.start:this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);let s=i.accessibility,c=i.override,u=i.readonly;!(t&4)&&(s||u||c)&&this.raise(Z.UnexpectedParameterModifier,o);let m=this.parseMaybeDefault();t&2&&this.parseFunctionParamType(m);let h=this.parseMaybeDefault(m.loc.start,m);if(s||u||c){let g=this.startNodeAt(o);return n.length&&(g.decorators=n),s&&(g.accessibility=s),u&&(g.readonly=u),c&&(g.override=c),h.type!=="Identifier"&&h.type!=="AssignmentPattern"&&this.raise(Z.UnsupportedParameterPropertyKind,g),g.parameter=h,this.finishNode(g,"TSParameterProperty")}return n.length&&(m.decorators=n),h}isSimpleParameter(t){return t.type==="TSParameterProperty"&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(let n of t.params)n.type!=="Identifier"&&n.optional&&!this.state.isAmbientContext&&this.raise(Z.PatternIsOptional,n)}setArrowFunctionParameters(t,n,o){super.setArrowFunctionParameters(t,n,o),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,n,o=!1){this.match(14)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let i=n==="FunctionDeclaration"?"TSDeclareFunction":n==="ClassMethod"||n==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(t,i):i==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(Z.DeclareFunctionHasImplementation,t),t.declare)?super.parseFunctionBodyAndFinish(t,i,o):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,n,o))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach(n=>{n?.type==="TSTypeCastExpression"&&this.raise(Z.UnexpectedTypeAnnotation,n.typeAnnotation)})}toReferencedList(t,n){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,n,o){let i=super.parseArrayLike(t,n,o);return i.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(t,n,o,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let c=this.startNodeAt(n);return c.expression=t,this.finishNode(c,"TSNonNullExpression")}let s=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(o)return i.stop=!0,t;i.optionalChainMember=s=!0,this.next()}if(this.match(47)||this.match(51)){let c,u=this.tsTryParseAndCatch(()=>{if(!o&&this.atPossibleAsyncArrow(t)){let y=this.tsTryParseGenericAsyncArrowFunction(n);if(y)return i.stop=!0,y}let m=this.tsParseTypeArgumentsInExpression();if(!m)return;if(s&&!this.match(10)){c=this.state.curPosition();return}if(aa(this.state.type)){let y=super.parseTaggedTemplateExpression(t,n,i);return y.typeParameters=m,y}if(!o&&this.eat(10)){let y=this.startNodeAt(n);return y.callee=t,y.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(y.arguments),y.typeParameters=m,i.optionalChainMember&&(y.optional=s),this.finishCallExpression(y,i.optionalChainMember)}let h=this.state.type;if(h===48||h===52||h!==10&&h!==93&&h!==120&&bn(h)&&!this.hasPrecedingLineBreak())return;let g=this.startNodeAt(n);return g.expression=t,g.typeParameters=m,this.finishNode(g,"TSInstantiationExpression")});if(c&&this.unexpected(c,10),u)return u.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(Z.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(u.expression=super.stopParseSubscript(t,i))),u}return super.parseSubscript(t,n,o,i)}parseNewCallee(t){var n;super.parseNewCallee(t);let{callee:o}=t;o.type==="TSInstantiationExpression"&&!((n=o.extra)!=null&&n.parenthesized)&&(t.typeParameters=o.typeParameters,t.callee=o.expression)}parseExprOp(t,n,o){let i;if(na(58)>o&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(120)))){let s=this.startNodeAt(n);return s.expression=t,s.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(i&&this.raise($.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(s,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(s,n,o)}return super.parseExprOp(t,n,o)}checkReservedWord(t,n,o,i){this.state.isAmbientContext||super.checkReservedWord(t,n,o,i)}checkImportReflection(t){super.checkImportReflection(t),t.module&&t.importKind!=="value"&&this.raise(Z.ImportReflectionHasImportType,t.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){let n=this.lookaheadCharCode();return t?n===123||n===42:n!==61}return!t&&this.isContextual(87)}applyImportPhase(t,n,o,i){super.applyImportPhase(t,n,o,i),n?t.exportKind=o==="type"?"type":"value":t.importKind=o==="type"||o==="typeof"?o:"value"}parseImport(t){if(this.match(134))return t.importKind="value",super.parseImport(t);let n;if(me(this.state.type)&&this.lookaheadCharCode()===61)return t.importKind="value",this.tsParseImportEqualsDeclaration(t);if(this.isContextual(130)){let o=this.parseMaybeImportPhase(t,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(t,o);n=super.parseImportSpecifiersAndAfter(t,o)}else n=super.parseImport(t);return n.importKind==="type"&&n.specifiers.length>1&&n.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(Z.TypeImportCannotSpecifyDefaultAndNamed,n),n}parseExport(t,n){if(this.match(83)){let o=t;this.next();let i=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?i=this.parseMaybeImportPhase(o,!1):o.importKind="value",this.tsParseImportEqualsDeclaration(o,i,!0)}else if(this.eat(29)){let o=t;return o.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(o,"TSExportAssignment")}else if(this.eatContextual(93)){let o=t;return this.expectContextual(128),o.id=this.parseIdentifier(),this.semicolon(),this.finishNode(o,"TSNamespaceExportDeclaration")}else return super.parseExport(t,n)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(129)){let t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,n,o=!1){let{isAmbientContext:i}=this.state,s=super.parseVarStatement(t,n,o||i);if(!i)return s;if(!t.declare&&(n==="using"||n==="await using"))return this.raiseOverwrite(Z.UsingDeclarationInAmbientContext,t,n),s;for(let{id:c,init:u}of s.declarations)u&&(n==="var"||n==="let"||c.typeAnnotation?this.raise(Z.InitializerNotAllowedInAmbientContext,u):kce(u,this.hasPlugin("estree"))||this.raise(Z.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,u));return s}parseStatementContent(t,n){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let o=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(o,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let o=this.state.type,i=this.startNode();this.next();let s=o===125?this.tsTryParseDeclare(i):this.tsParseAbstractDeclaration(i,n);return s?(o===125&&(s.declare=!0),s):(i.expression=this.createIdentifier(this.startNodeAt(i.loc.start),o===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(i,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let i=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(i)}break}case 129:{let o=this.tsParseInterfaceDeclaration(this.startNode());if(o)return o;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let o=this.startNode();return this.next(),this.tsParseDeclaration(o,127,!1,n)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let o=this.startNode();return this.next(),this.tsParseDeclaration(o,128,!1,n)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let o=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(o)}break}}return super.parseStatementContent(t,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,n){return n.some(o=>ES(o)?t.accessibility===o:!!t[o])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(t,n,o){let i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:Z.InvalidModifierOnTypeParameterPositions},n);let s=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,i)&&this.raise(Z.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,n)):this.parseClassMemberWithIsStatic(t,n,o,!!n.static)};n.declare?this.tsInAmbientContext(s):s()}parseClassMemberWithIsStatic(t,n,o,i){let s=this.tsTryParseIndexSignature(n);if(s){t.body.push(s),n.abstract&&this.raise(Z.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(Z.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(Z.IndexSignatureHasDeclare,n),n.override&&this.raise(Z.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(Z.NonAbstractClassHasAbstractMethod,n),n.override&&(o.hadSuperClass||this.raise(Z.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(t,n,o,i)}parsePostMemberNameModifiers(t){this.eat(17)&&(t.optional=!0),t.readonly&&this.match(10)&&this.raise(Z.ClassMethodHasReadonly,t),t.declare&&this.match(10)&&this.raise(Z.ClassMethodHasDeclare,t)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(t,n,o){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){let i=this.lookaheadCharCode();if(i===44||i===61||i===58||i===41)return this.setOptionalParametersError(o),t}return super.parseConditional(t,n,o)}parseParenItem(t,n){let o=super.parseParenItem(t,n);if(this.eat(17)&&(o.optional=!0,this.resetEndLocation(t)),this.match(14)){let i=this.startNodeAt(n);return i.expression=t,i.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(i,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(t));let n=this.state.startLoc,o=this.eatContextual(125);if(o&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(Z.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let s=me(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return s?((s.type==="TSInterfaceDeclaration"||s.type==="TSTypeAliasDeclaration"||o)&&(t.exportKind="type"),o&&s.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(s,n),s.declare=!0),s):null}parseClassId(t,n,o,i){if((!n||o)&&this.isContextual(113))return;super.parseClassId(t,n,o,t.declare?1024:8331);let s=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);s&&(t.typeParameters=s)}parseClassPropertyAnnotation(t){t.optional||(this.eat(35)?t.definite=!0:this.eat(17)&&(t.optional=!0));let n=this.tsTryParseTypeAnnotation();n&&(t.typeAnnotation=n)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&!(t.readonly&&!t.typeAnnotation)&&this.match(29)&&this.raise(Z.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(29)){let{key:n}=t;this.raise(Z.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:n.type==="Identifier"&&!t.computed?n.name:`[${this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end))}]`})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(Z.PrivateElementHasAbstract,t),t.accessibility&&this.raise(Z.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise(Z.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,n,o,i,s,c){let u=this.tsTryParseTypeParameters(this.tsParseConstModifier);u&&s&&this.raise(Z.ConstructorHasTypeParameters,u);let{declare:m=!1,kind:h}=n;m&&(h==="get"||h==="set")&&this.raise(Z.DeclareAccessor,n,{kind:h}),u&&(n.typeParameters=u),super.pushClassMethod(t,n,o,i,s,c)}pushClassPrivateMethod(t,n,o,i){let s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(n.typeParameters=s),super.pushClassPrivateMethod(t,n,o,i)}declareClassPrivateMethodInScope(t,n){t.type!=="TSDeclareMethod"&&(t.type==="MethodDefinition"&&t.value.body==null||super.declareClassPrivateMethodInScope(t,n))}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass)if(t.superClass.type==="TSInstantiationExpression"){let n=t.superClass,o=n.expression;this.takeSurroundingComments(o,o.start,o.end);let i=n.typeParameters;this.takeSurroundingComments(i,i.start,i.end),t.superClass=o,t.superTypeParameters=i}else(this.match(47)||this.match(51))&&(t.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,n,o,i,s,c,u){let m=this.tsTryParseTypeParameters(this.tsParseConstModifier);return m&&(t.typeParameters=m),super.parseObjPropValue(t,n,o,i,s,c,u)}parseFunctionParams(t,n){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(t.typeParameters=o),super.parseFunctionParams(t,n)}parseVarId(t,n){super.parseVarId(t,n),t.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(t.definite=!0);let o=this.tsTryParseTypeAnnotation();o&&(t.id.typeAnnotation=o,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,n){return this.match(14)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,n)}parseMaybeAssign(t,n){var o,i,s,c,u;let m,h,g;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(m=this.state.clone(),h=this.tryParse(()=>super.parseMaybeAssign(t,n),m),!h.error)return h.node;let{context:w}=this.state,T=w[w.length-1];(T===ue.j_oTag||T===ue.j_expr)&&w.pop()}if(!((o=h)!=null&&o.error)&&!this.match(47))return super.parseMaybeAssign(t,n);(!m||m===this.state)&&(m=this.state.clone());let y,S=this.tryParse(w=>{var T,M;y=this.tsParseTypeParameters(this.tsParseConstModifier);let V=super.parseMaybeAssign(t,n);return(V.type!=="ArrowFunctionExpression"||(T=V.extra)!=null&&T.parenthesized)&&w(),((M=y)==null?void 0:M.params.length)!==0&&this.resetStartLocationFromNode(V,y),V.typeParameters=y,V},m);if(!S.error&&!S.aborted)return y&&this.reportReservedArrowTypeParam(y),S.node;if(!h&&(MS(!this.hasPlugin("jsx")),g=this.tryParse(()=>super.parseMaybeAssign(t,n),m),!g.error))return g.node;if((i=h)!=null&&i.node)return this.state=h.failState,h.node;if(S.node)return this.state=S.failState,y&&this.reportReservedArrowTypeParam(y),S.node;if((s=g)!=null&&s.node)return this.state=g.failState,g.node;throw((c=h)==null?void 0:c.error)||S.error||((u=g)==null?void 0:u.error)}reportReservedArrowTypeParam(t){var n;t.params.length===1&&!t.params[0].constraint&&!((n=t.extra)!=null&&n.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(Z.ReservedArrowTypeParam,t)}parseMaybeUnary(t,n){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,n)}parseArrow(t){if(this.match(14)){let n=this.tryParse(o=>{let i=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&o(),i});if(n.aborted)return;n.thrown||(n.error&&(this.state=n.failState),t.returnType=n.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(17)&&(t.optional=!0);let n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n),this.resetEndLocation(t),t}isAssignable(t,n){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,n);case"TSParameterProperty":return!0;default:return super.isAssignable(t,n)}}toAssignable(t,n=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,n);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":n?this.expressionScope.recordArrowParameterBindingError(Z.UnexpectedTypeCastInParameter,t):this.raise(Z.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,n);break;case"AssignmentExpression":!n&&t.left.type==="TSTypeCastExpression"&&(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,n)}}toAssignableParenthesizedExpression(t,n){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,n);break;default:super.toAssignable(t,n)}}checkToRestConversion(t,n){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,n)}}isValidLVal(t,n,o,i){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!o)&&["expression",!0];default:return super.isValidLVal(t,n,o,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,n){if(this.match(47)||this.match(51)){let o=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(t,n);return i.typeParameters=o,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(t,n)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(t,n){let o=super.parseMaybeDefault(t,n);return o.type==="AssignmentPattern"&&o.typeAnnotation&&o.right.start<o.typeAnnotation.start&&this.raise(Z.TypeAnnotationAfterAssign,o.typeAnnotation),o}getTokenFromCode(t){if(this.state.inType){if(t===62){this.finishOp(48,1);return}if(t===60){this.finishOp(47,1);return}}super.getTokenFromCode(t)}reScan_lt_gt(){let{type:t}=this.state;t===47?(this.state.pos-=1,this.readToken_lt()):t===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:t}=this.state;return t===51?(this.state.pos-=2,this.finishOp(47,1),47):t}toAssignableListItem(t,n,o){let i=t[n];i.type==="TSTypeCastExpression"&&(t[n]=this.typeCastToParameter(i)),super.toAssignableListItem(t,n,o)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(t){return this.match(14)?t.every(n=>this.isAssignable(n,!0)):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(47)||this.match(51)){let n=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());n&&(t.typeParameters=n)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){let n=super.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t)[0];return i&&this.isThisParam(i)?n+1:n}parseCatchClauseParam(){let t=super.parseCatchClauseParam(),n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n,this.resetEndLocation(t)),t}tsInAmbientContext(t){let{isAmbientContext:n,strict:o}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=n,this.state.strict=o}}parseClass(t,n,o){let i=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,n,o)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(t,n){if(this.match(80))return t.abstract=!0,this.maybeTakeDecorators(n,this.parseClass(t,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(t.abstract=!0,this.raise(Z.NonClassMethodPropertyHasAbstractModifier,t),this.tsParseInterfaceDeclaration(t));throw this.unexpected(null,80)}parseMethod(t,n,o,i,s,c,u){let m=super.parseMethod(t,n,o,i,s,c,u);if((m.abstract||m.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?m.value:m).body){let{key:y}=m;this.raise(Z.AbstractMethodHasImplementation,m,{methodName:y.type==="Identifier"&&!m.computed?y.name:`[${this.input.slice(this.offsetToSourcePos(y.start),this.offsetToSourcePos(y.end))}]`})}return m}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,n,o,i){return!n&&i?(this.parseTypeOnlyImportExportSpecifier(t,!1,o),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,n,o,i))}parseImportSpecifier(t,n,o,i,s){return!n&&i?(this.parseTypeOnlyImportExportSpecifier(t,!0,o),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,n,o,i,o?4098:4096))}parseTypeOnlyImportExportSpecifier(t,n,o){let i=n?"imported":"local",s=n?"local":"exported",c=t[i],u,m=!1,h=!0,g=c.loc.start;if(this.isContextual(93)){let S=this.parseIdentifier();if(this.isContextual(93)){let w=this.parseIdentifier();mt(this.state.type)?(m=!0,c=S,u=n?this.parseIdentifier():this.parseModuleExportName(),h=!1):(u=w,h=!1)}else mt(this.state.type)?(h=!1,u=n?this.parseIdentifier():this.parseModuleExportName()):(m=!0,c=S)}else mt(this.state.type)&&(m=!0,n?(c=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(c.name,c.loc.start,!0,!0)):c=this.parseModuleExportName());m&&o&&this.raise(n?Z.TypeModifierIsUsedInTypeImports:Z.TypeModifierIsUsedInTypeExports,g),t[i]=c,t[s]=u;let y=n?"importKind":"exportKind";t[y]=m?"type":"value",h&&this.eatContextual(93)&&(t[s]=n?this.parseIdentifier():this.parseModuleExportName()),t[s]||(t[s]=this.cloneIdentifier(t[i])),n&&this.checkIdentifier(t[s],m?4098:4096)}fillOptionalPropertiesForTSESLint(t){var n,o,i,s,c,u,m,h,g,y,S,w,T,M,V,F,H,re,ye,ce,Re,Ct,fr,gr,xr,$n,Tn,Xm,Ym,Qm,eh,th,oh,rh,nh,ih,sh,ah,ch,ph,dh,lh,uh,mh,hh,fh,gh,xh;switch(t.type){case"ExpressionStatement":(n=t.directive)!=null||(t.directive=void 0);return;case"RestElement":t.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(o=t.decorators)!=null||(t.decorators=[]),(i=t.optional)!=null||(t.optional=!1),(s=t.typeAnnotation)!=null||(t.typeAnnotation=void 0);return;case"TSParameterProperty":(c=t.accessibility)!=null||(t.accessibility=void 0),(u=t.decorators)!=null||(t.decorators=[]),(m=t.override)!=null||(t.override=!1),(h=t.readonly)!=null||(t.readonly=!1),(g=t.static)!=null||(t.static=!1);return;case"TSEmptyBodyFunctionExpression":t.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(y=t.declare)!=null||(t.declare=!1),(S=t.returnType)!=null||(t.returnType=void 0),(w=t.typeParameters)!=null||(t.typeParameters=void 0);return;case"Property":(T=t.optional)!=null||(t.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(M=t.optional)!=null||(t.optional=!1);case"TSIndexSignature":(V=t.accessibility)!=null||(t.accessibility=void 0),(F=t.readonly)!=null||(t.readonly=!1),(H=t.static)!=null||(t.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(re=t.declare)!=null||(t.declare=!1),(ye=t.definite)!=null||(t.definite=!1),(ce=t.readonly)!=null||(t.readonly=!1),(Re=t.typeAnnotation)!=null||(t.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(Ct=t.accessibility)!=null||(t.accessibility=void 0),(fr=t.decorators)!=null||(t.decorators=[]),(gr=t.override)!=null||(t.override=!1),(xr=t.optional)!=null||(t.optional=!1);return;case"ClassExpression":($n=t.id)!=null||(t.id=null);case"ClassDeclaration":(Tn=t.abstract)!=null||(t.abstract=!1),(Xm=t.declare)!=null||(t.declare=!1),(Ym=t.decorators)!=null||(t.decorators=[]),(Qm=t.implements)!=null||(t.implements=[]),(eh=t.superTypeArguments)!=null||(t.superTypeArguments=void 0),(th=t.typeParameters)!=null||(t.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(oh=t.declare)!=null||(t.declare=!1);return;case"VariableDeclarator":(rh=t.definite)!=null||(t.definite=!1);return;case"TSEnumDeclaration":(nh=t.const)!=null||(t.const=!1),(ih=t.declare)!=null||(t.declare=!1);return;case"TSEnumMember":(sh=t.computed)!=null||(t.computed=!1);return;case"TSImportType":(ah=t.qualifier)!=null||(t.qualifier=null),(ch=t.options)!=null||(t.options=null);return;case"TSInterfaceDeclaration":(ph=t.declare)!=null||(t.declare=!1),(dh=t.extends)!=null||(t.extends=[]);return;case"TSMappedType":(lh=t.optional)!=null||(t.optional=!1),(uh=t.readonly)!=null||(t.readonly=void 0);return;case"TSModuleDeclaration":(mh=t.declare)!=null||(t.declare=!1),(hh=t.global)!=null||(t.global=t.kind==="global");return;case"TSTypeParameter":(fh=t.const)!=null||(t.const=!1),(gh=t.in)!=null||(t.in=!1),(xh=t.out)!=null||(t.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(t,n){if(vt(t)){if(hm.lastIndex=n,hm.test(this.input)){let o=this.codePointAtPos(hm.lastIndex);if(!mo(o)&&o!==92)return!1}return!0}else return t===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let t=this.nextTokenInLineStart(),n=this.codePointAtPos(t);return this.chStartsBindingIdentifierAndNotRelationalOperator(n,t)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let t=this.nextTokenInLineStart(),n=this.codePointAtPos(t);return this.chStartsBindingIdentifier(n,t)||n===34||n===39}};function Ice(r){if(r.type!=="MemberExpression")return!1;let{computed:e,property:t}=r;return e&&t.type!=="StringLiteral"&&(t.type!=="TemplateLiteral"||t.expressions.length>0)?!1:HS(r.object)}function kce(r,e){var t;let{type:n}=r;if((t=r.extra)!=null&&t.parenthesized)return!1;if(e){if(n==="Literal"){let{value:o}=r;if(typeof o=="string"||typeof o=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(JS(r,e)||$ce(r,e)||n==="TemplateLiteral"&&r.expressions.length===0||Ice(r))}function JS(r,e){return e?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}function $ce(r,e){if(r.type==="UnaryExpression"){let{operator:t,argument:n}=r;if(t==="-"&&JS(n,e))return!0}return!1}function HS(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:HS(r.object)}var DS=ut`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Tce=r=>class extends r{parsePlaceholder(t){if(this.match(133)){let n=this.startNode();return this.next(),this.assertNoSpace(),n.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(n,t)}}finishPlaceholder(t,n){let o=t;return(!o.expectedNode||!o.type)&&(o=this.finishNode(o,"Placeholder")),o.expectedNode=n,o}getTokenFromCode(t){t===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,n,o,i){t!==void 0&&super.checkReservedWord(t,n,o,i)}cloneIdentifier(t){let n=super.cloneIdentifier(t);return n.type==="Placeholder"&&(n.expectedNode=t.expectedNode),n}cloneStringLiteral(t){return t.type==="Placeholder"?this.cloneIdentifier(t):super.cloneStringLiteral(t)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,n,o,i){return t==="Placeholder"||super.isValidLVal(t,n,o,i)}toAssignable(t,n){t&&t.type==="Placeholder"&&t.expectedNode==="Expression"?t.expectedNode="Pattern":super.toAssignable(t,n)}chStartsBindingIdentifier(t,n){if(super.chStartsBindingIdentifier(t,n))return!0;let o=this.nextTokenStart();return this.input.charCodeAt(o)===37&&this.input.charCodeAt(o+1)===37}verifyBreakContinue(t,n){var o;((o=t.label)==null?void 0:o.type)!=="Placeholder"&&super.verifyBreakContinue(t,n)}parseExpressionStatement(t,n){var o;if(n.type!=="Placeholder"||(o=n.extra)!=null&&o.parenthesized)return super.parseExpressionStatement(t,n);if(this.match(14)){let s=t;return s.label=this.finishPlaceholder(n,"Identifier"),this.next(),s.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(s,"LabeledStatement")}this.semicolon();let i=t;return i.name=n.name,this.finishPlaceholder(i,"Statement")}parseBlock(t,n,o){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,n,o)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,n,o){let i=n?"ClassDeclaration":"ClassExpression";this.next();let s=this.state.strict,c=this.parsePlaceholder("Identifier");if(c)if(this.match(81)||this.match(133)||this.match(5))t.id=c;else{if(o||!n)return t.id=null,t.body=this.finishPlaceholder(c,"ClassBody"),this.finishNode(t,i);throw this.raise(DS.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(t,n,o);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,s),this.finishNode(t,i)}parseExport(t,n){let o=this.parsePlaceholder("Identifier");if(!o)return super.parseExport(t,n);let i=t;if(!this.isContextual(98)&&!this.match(12))return i.specifiers=[],i.source=null,i.declaration=this.finishPlaceholder(o,"Declaration"),this.finishNode(i,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let s=this.startNode();return s.exported=o,i.specifiers=[this.finishNode(s,"ExportDefaultSpecifier")],super.parseExport(i,n)}isExportDefaultSpecifier(){if(this.match(65)){let t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(Kt(133),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,n){var o;return(o=t.specifiers)!=null&&o.length?!0:super.maybeParseExportDefaultSpecifier(t,n)}checkExport(t){let{specifiers:n}=t;n!=null&&n.length&&(t.specifiers=n.filter(o=>o.exported.type==="Placeholder")),super.checkExport(t),t.specifiers=n}parseImport(t){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(98)&&!this.match(12))return t.source=this.finishPlaceholder(n,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");let o=this.startNodeAtNode(n);return o.local=n,t.specifiers.push(this.finishNode(o,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(98),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(DS.UnexpectedSpace,this.state.lastTokEndLoc)}},Pce=r=>class extends r{parseV8Intrinsic(){if(this.match(54)){let t=this.state.startLoc,n=this.startNode();if(this.next(),me(this.state.type)){let o=this.parseIdentifierName(),i=this.createIdentifier(n,o);if(this.castNodeTo(i,"V8IntrinsicIdentifier"),this.match(10))return i}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},AS=["minimal","fsharp","hack","smart"],_S=["^^","@@","^","%","#"];function Cce(r){if(r.has("decorators")){if(r.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let n=r.get("decorators").decoratorsBeforeExport;if(n!=null&&typeof n!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let o=r.get("decorators").allowCallParenthesized;if(o!=null&&typeof o!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(r.has("flow")&&r.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(r.has("placeholders")&&r.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(r.has("pipelineOperator")){var e;let n=r.get("pipelineOperator").proposal;if(!AS.includes(n)){let o=AS.map(i=>`"${i}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${o}.`)}if(n==="hack"){var t;if(r.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(r.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let o=r.get("pipelineOperator").topicToken;if(!_S.includes(o)){let i=_S.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${i}.`)}if(o==="#"&&((t=r.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}else if(n==="smart"&&((e=r.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}if(r.has("moduleAttributes")){if(r.has("deprecatedImportAssert")||r.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(r.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(r.has("importAssertions")&&r.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(r.has("deprecatedImportAssert")||r.has("importAttributes")&&r.get("importAttributes").deprecatedAssertSyntax&&r.set("deprecatedImportAssert",{}),r.has("recordAndTuple")){let n=r.get("recordAndTuple").syntaxType;if(n!=null){let o=["hash","bar"];if(!o.includes(n))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+o.map(i=>`'${i}'`).join(", "))}}if(r.has("asyncDoExpressions")&&!r.has("doExpressions")){let n=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw n.missingPlugins="doExpressions",n}if(r.has("optionalChainingAssign")&&r.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(r.has("discardBinding")&&r.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}var XS={estree:Eae,jsx:lce,flow:ace,typescript:wce,v8intrinsic:Pce,placeholders:Tce},Oce=Object.keys(XS),_m=class extends Am{checkProto(e,t,n,o){if(e.type==="SpreadElement"||this.isObjectMethod(e)||e.computed||e.shorthand)return n;let i=e.key;return(i.type==="Identifier"?i.name:i.value)==="__proto__"?t?(this.raise($.RecordNoProto,i),!0):(n&&(o?o.doubleProtoLoc===null&&(o.doubleProtoLoc=i.loc.start):this.raise($.DuplicateProto,i)),!0):n}shouldExitDescending(e,t){return e.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(e.start)===t}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise($.ParseExpressionEmptyInput,this.state.startLoc);let e=this.parseExpression();if(!this.match(140))throw this.raise($.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),e.comments=this.comments,e.errors=this.state.errors,this.optionFlags&256&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd(()=>this.parseExpressionBase(t)):this.allowInAnd(()=>this.parseExpressionBase(t))}parseExpressionBase(e){let t=this.state.startLoc,n=this.parseMaybeAssign(e);if(this.match(12)){let o=this.startNodeAt(t);for(o.expressions=[n];this.eat(12);)o.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(o.expressions),this.finishNode(o,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd(()=>this.parseMaybeAssign(e,t))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd(()=>this.parseMaybeAssign(e,t))}setOptionalParametersError(e){e.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(e,t){let n=this.state.startLoc,o=this.isContextual(108);if(o&&this.prodParam.hasYield){this.next();let u=this.parseYield(n);return t&&(u=t.call(this,u,n)),u}let i;e?i=!1:(e=new lr,i=!0);let{type:s}=this.state;(s===10||me(s))&&(this.state.potentialArrowAt=this.state.start);let c=this.parseMaybeConditional(e);if(t&&(c=t.call(this,c,n)),jae(this.state.type)){let u=this.startNodeAt(n),m=this.state.value;if(u.operator=m,this.match(29)){this.toAssignable(c,!0),u.left=c;let h=n.index;e.doubleProtoLoc!=null&&e.doubleProtoLoc.index>=h&&(e.doubleProtoLoc=null),e.shorthandAssignLoc!=null&&e.shorthandAssignLoc.index>=h&&(e.shorthandAssignLoc=null),e.privateKeyLoc!=null&&e.privateKeyLoc.index>=h&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null),e.voidPatternLoc!=null&&e.voidPatternLoc.index>=h&&(e.voidPatternLoc=null)}else u.left=c;return this.next(),u.right=this.parseMaybeAssign(),this.checkLVal(c,this.finishNode(u,"AssignmentExpression"),void 0,void 0,void 0,void 0,m==="||="||m==="&&="||m==="??="),u}else i&&this.checkExpressionErrors(e,!0);if(o){let{type:u}=this.state;if((this.hasPlugin("v8intrinsic")?bn(u):bn(u)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite($.YieldNotInGeneratorFunction,n),this.parseYield(n)}return c}parseMaybeConditional(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,o=this.parseExprOps(e);return this.shouldExitDescending(o,n)?o:this.parseConditional(o,t,e)}parseConditional(e,t,n){if(this.eat(17)){let o=this.startNodeAt(t);return o.test=e,o.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),o.alternate=this.parseMaybeAssign(),this.finishNode(o,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,o=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(o,n)?o:this.parseExprOp(o,t,-1)}parseExprOp(e,t,n){if(this.isPrivateName(e)){let i=this.getPrivateNameSV(e);(n>=na(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise($.PrivateInExpectedIn,e,{identifierName:i}),this.classScope.usePrivateName(i,e.loc.start)}let o=this.state.type;if(Nae(o)&&(this.prodParam.hasIn||!this.match(58))){let i=na(o);if(i>n){if(o===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let s=this.startNodeAt(t);s.left=e,s.operator=this.state.value;let c=o===41||o===42,u=o===40;if(u&&(i=na(42)),this.next(),o===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise($.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);s.right=this.parseExprOpRightExpr(o,i);let m=this.finishNode(s,c||u?"LogicalExpression":"BinaryExpression"),h=this.state.type;if(u&&(h===41||h===42)||c&&h===40)throw this.raise($.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(m,t,n)}}return e}parseExprOpRightExpr(e,t){let n=this.state.startLoc;switch(e){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(t))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise($.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),n)});default:return this.parseExprOpBaseRightExpr(e,t)}}parseExprOpBaseRightExpr(e,t){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,Wae(e)?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,n=this.parseMaybeAssign();return kae.has(n.type)&&!((e=n.extra)!=null&&e.parenthesized)&&this.raise($.PipeUnparenthesizedBody,t,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise($.PipeTopicUnused,t),n}checkExponentialAfterUnary(e){this.match(57)&&this.raise($.UnexpectedTokenUnaryExponentiation,e.argument)}parseMaybeUnary(e,t){let n=this.state.startLoc,o=this.isContextual(96);if(o&&this.recordAwaitIfAllowed()){this.next();let u=this.parseAwait(n);return t||this.checkExponentialAfterUnary(u),u}let i=this.match(34),s=this.startNode();if(Uae(this.state.type)){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let u=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&u){let m=s.argument;m.type==="Identifier"?this.raise($.StrictDelete,s):this.hasPropertyAsPrivateName(m)&&this.raise($.DeletePrivateField,s)}if(!i)return t||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}let c=this.parseUpdate(s,i,e);if(o){let{type:u}=this.state;if((this.hasPlugin("v8intrinsic")?bn(u):bn(u)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite($.AwaitNotInAsyncContext,n),this.parseAwait(n)}return c}parseUpdate(e,t,n){if(t){let s=e;return this.checkLVal(s.argument,this.finishNode(s,"UpdateExpression")),e}let o=this.state.startLoc,i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;Vae(this.state.type)&&!this.canInsertSemicolon();){let s=this.startNodeAt(o);s.operator=this.state.value,s.prefix=!1,s.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(s,"UpdateExpression"))}return i}parseExprSubscripts(e){let t=this.state.startLoc,n=this.state.potentialArrowAt,o=this.parseExprAtom(e);return this.shouldExitDescending(o,n)?o:this.parseSubscripts(o,t)}parseSubscripts(e,t,n){let o={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do e=this.parseSubscript(e,t,n,o),o.maybeAsyncArrow=!1;while(!o.stop);return e}parseSubscript(e,t,n,o){let{type:i}=this.state;if(!n&&i===15)return this.parseBind(e,t,o);if(aa(i))return this.parseTaggedTemplateExpression(e,t,o);let s=!1;if(i===18){if(n&&(this.raise($.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(e,o);o.optionalChainMember=s=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,o,s);{let c=this.eat(0);return c||s||this.eat(16)?this.parseMember(e,t,o,c,s):this.stopParseSubscript(e,o)}}stopParseSubscript(e,t){return t.stop=!0,e}parseMember(e,t,n,o,i){let s=this.startNodeAt(t);return s.object=e,s.computed=o,o?(s.property=this.parseExpression(),this.expect(3)):this.match(139)?(e.type==="Super"&&this.raise($.SuperPrivateField,t),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),n.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(e,t,n){let o=this.startNodeAt(t);o.object=e,this.next();let i=this.match(83),s=this.parseNoCallExpr();if(s.type==="Super"||i&&s.type==="ImportExpression"||s.type==="Import")throw this.raise($.UnsupportedBindRHS,s);return o.callee=s,n.stop=!0,this.parseSubscripts(this.finishNode(o,"BindExpression"),t,!1)}parseCoverCallAndAsyncArrowHead(e,t,n,o){let i=this.state.maybeInArrowParameters,s=null;this.state.maybeInArrowParameters=!0,this.next();let c=this.startNodeAt(t);c.callee=e;let{maybeAsyncArrow:u,optionalChainMember:m}=n;u&&(this.expressionScope.enter(bce()),s=new lr),m&&(c.optional=o),o?c.arguments=this.parseCallExpressionArguments():c.arguments=this.parseCallExpressionArguments(e.type!=="Super",c,s);let h=this.finishCallExpression(c,m);return u&&this.shouldParseAsyncArrow()&&!o?(n.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),h=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),h)):(u&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(h)),this.state.maybeInArrowParameters=i,h}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,n){let o=this.startNodeAt(t);return o.tag=e,o.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise($.OptionalChainingNoTemplate,t),this.finishNode(o,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return e.type==="Identifier"&&e.name==="async"&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.offsetToSourcePos(e.start)===this.state.potentialArrowAt}finishCallExpression(e,t){if(e.callee.type==="Import")if(e.arguments.length===0||e.arguments.length>2)this.raise($.ImportCallArity,e);else for(let n of e.arguments)n.type==="SpreadElement"&&this.raise($.ImportCallSpreadArgument,n);return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,n){let o=[],i=!0,s=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(i)i=!1;else if(this.expect(12),this.match(11)){t&&this.addTrailingCommaExtraToNode(t),this.next();break}o.push(this.parseExprListItem(11,!1,n,e))}return this.state.inFSharpPipelineDirectBody=s,o}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var n;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,(n=t.extra)==null?void 0:n.trailingCommaLoc),t.innerComments&&In(e,t.innerComments),t.callee.trailingComments&&In(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,n=null,{type:o}=this.state;switch(o){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(t):this.match(10)?this.optionFlags&512?this.parseImportCall(t):this.finishNode(t,"Import"):(this.raise($.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let i=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(i)}case 0:return this.parseArrayLike(3,!1,e);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let i=t.callee=this.parseNoCallExpr();if(i.type==="MemberExpression")return this.finishNode(t,"BindExpression");throw this.raise($.UnsupportedBind,i)}case 139:return this.raise($.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let i=this.getPluginOption("pipelineOperator","proposal");if(i)return this.parseTopicReference(i);throw this.unexpected()}case 47:{let i=this.input.codePointAt(this.nextTokenStart());throw vt(i)||i===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(o===137)return this.parseDecimalLiteral(this.state.value);if(o===2||o===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(o===6||o===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0);if(me(o)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let i=this.state.potentialArrowAt===this.state.start,s=this.state.containsEsc,c=this.parseIdentifier();if(!s&&c.name==="async"&&!this.canInsertSemicolon()){let{type:u}=this.state;if(u===68)return this.resetPreviousNodeTrailingComments(c),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(c));if(me(u))return i&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(c)):c;if(u===90)return this.resetPreviousNodeTrailingComments(c),this.parseDo(this.startNodeAtNode(c),!0)}return i&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(c),[c],!1)):c}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=qe(this.state.endLoc,-1),this.parseTopicReference(n);throw this.unexpected()}parseTopicReference(e){let t=this.startNode(),n=this.state.startLoc,o=this.state.type;return this.next(),this.finishTopicReference(t,n,e,o)}finishTopicReference(e,t,n,o){if(this.testTopicReferenceConfiguration(n,t,o))return n==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise($.PipeTopicUnbound,t),this.registerTopicReference(),this.finishNode(e,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise($.PrimaryTopicNotAllowed,t),this.registerTopicReference(),this.finishNode(e,"PipelinePrimaryTopicReference"));throw this.raise($.PipeTopicUnconfiguredToken,t,{token:Kt(o)})}testTopicReferenceConfiguration(e,t,n){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Kt(n)}]);case"smart":return n===27;default:throw this.raise($.PipeTopicRequiresHackPipes,t)}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(ia(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise($.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let n=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=n,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise($.SuperNotAllowed,e):this.scope.allowSuper||this.optionFlags&16||this.raise($.UnexpectedSuper,e),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise($.UnsupportedSuper,e),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(qe(this.state.startLoc,1)),n=this.state.value;return this.next(),e.id=this.createIdentifier(t,n),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,n){e.meta=t;let o=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==n||o)&&this.raise($.UnsupportedMetaProperty,e.property,{target:t.name,onlyValidPropertyName:n}),this.finishNode(e,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(e){if(this.next(),this.isContextual(105)||this.isContextual(97)){let t=this.isContextual(105);return this.expectPlugin(t?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),e.phase=t?"source":"defer",this.parseImportCall(e)}else{let t=this.createIdentifierAt(this.startNodeAtNode(e),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise($.ImportMetaOutsideModule,t),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}}parseLiteralAtNode(e,t,n){return this.addExtra(n,"rawValue",e),this.addExtra(n,"raw",this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=e,this.next(),this.finishNode(n,t)}parseLiteral(e,t){let n=this.startNode();return this.parseLiteralAtNode(e,t,n)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.startNode();return this.addExtra(t,"raw",this.input.slice(this.offsetToSourcePos(t.start),this.state.end)),t.pattern=e.pattern,t.flags=e.flags,this.next(),this.finishNode(t,"RegExpLiteral")}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t=this.state.startLoc,n;this.next(),this.expressionScope.enter(yce());let o=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let s=this.state.startLoc,c=[],u=new lr,m=!0,h,g;for(;!this.match(11);){if(m)m=!1;else if(this.expect(12,u.optionalParametersLoc===null?null:u.optionalParametersLoc),this.match(11)){g=this.state.startLoc;break}if(this.match(21)){let w=this.state.startLoc;if(h=this.state.startLoc,c.push(this.parseParenItem(this.parseRestBinding(),w)),!this.checkCommaAfterRest(41))break}else c.push(this.parseMaybeAssignAllowInOrVoidPattern(11,u,this.parseParenItem))}let y=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=o,this.state.inFSharpPipelineDirectBody=i;let S=this.startNodeAt(t);return e&&this.shouldParseArrow(c)&&(S=this.parseArrow(S))?(this.checkDestructuringPrivate(u),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(S,c,!1),S):(this.expressionScope.exit(),c.length||this.unexpected(this.state.lastTokStartLoc),g&&this.unexpected(g),h&&this.unexpected(h),this.checkExpressionErrors(u,!0),this.toReferencedListDeep(c,!0),c.length>1?(n=this.startNodeAt(s),n.expressions=c,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,y)):n=c[0],this.wrapParenthesis(t,n))}wrapParenthesis(e,t){if(!(this.optionFlags&1024))return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let n=this.startNodeAt(e);return n.expression=t,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let n=this.parseMetaProperty(e,t,"target");return this.scope.allowNewTarget||this.raise($.UnexpectedNewTarget,n),n}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){let t=this.match(83),n=this.parseNoCallExpr();e.callee=n,(t&&n.type==="ImportExpression"||n.type==="Import")&&this.raise($.ImportCallNotNewExpression,n),n.type==="Super"&&this.raise($.SuperCallNotNewExpression,n)}parseTemplateElement(e){let{start:t,startLoc:n,end:o,value:i}=this.state,s=t+1,c=this.startNodeAt(qe(n,1));i===null&&(e||this.raise($.InvalidEscapeSequenceTemplate,qe(this.state.firstInvalidTemplateEscapePos,1)));let u=this.match(24),m=u?-1:-2,h=o+m;c.value={raw:this.input.slice(s,h).replace(/\r\n?/g,`
9
+ `),cooked:i===null?null:i.slice(1,m)},c.tail=u,this.next();let g=this.finishNode(c,"TemplateElement");return this.resetEndLocation(g,qe(this.state.lastTokEndLoc,m)),g}parseTemplate(e){let t=this.startNode(),n=this.parseTemplateElement(e),o=[n],i=[];for(;!n.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),o.push(n=this.parseTemplateElement(e));return t.expressions=i,t.quasis=o,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,n,o){n&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=!1,c=!0,u=this.startNode();for(u.properties=[],this.next();!this.match(e);){if(c)c=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(u);break}let h;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(o),s=this.checkProto(h,n,s,o)),n&&!this.isObjectProperty(h)&&h.type!=="SpreadElement"&&this.raise($.InvalidRecordProperty,h),h.shorthand&&this.addExtra(h,"shorthand",!0),u.properties.push(h)}this.next(),this.state.inFSharpPipelineDirectBody=i;let m="ObjectExpression";return t?m="ObjectPattern":n&&(m="RecordExpression"),this.finishNode(u,m)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise($.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());let n=this.startNode(),o=!1,i=!1,s;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(s=this.state.startLoc);let c=this.eat(55);this.parsePropertyNamePrefixOperator(n);let u=this.state.containsEsc;if(this.parsePropertyName(n,e),!c&&!u&&this.maybeAsyncOrAccessorProp(n)){let{key:m}=n,h=m.name;h==="async"&&!this.hasPrecedingLineBreak()&&(o=!0,this.resetPreviousNodeTrailingComments(m),c=this.eat(55),this.parsePropertyName(n)),(h==="get"||h==="set")&&(i=!0,this.resetPreviousNodeTrailingComments(m),n.kind=h,this.match(55)&&(c=!0,this.raise($.AccessorIsGenerator,this.state.curPosition(),{kind:h}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,s,c,o,!1,i,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let n=this.getGetterSetterExpectedParamCount(e),o=this.getObjectOrClassMethodParams(e);o.length!==n&&this.raise(e.kind==="get"?$.BadGetterArity:$.BadSetterArity,e),e.kind==="set"&&((t=o[o.length-1])==null?void 0:t.type)==="RestElement"&&this.raise($.BadSetterRestParameter,e)}parseObjectMethod(e,t,n,o,i){if(i){let s=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(s),s}if(n||t||this.match(10))return o&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,n,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,n,o){if(e.shorthand=!1,this.eat(14))return e.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,o),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),n)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(29)){let i=this.state.startLoc;o!=null?o.shorthandAssignLoc===null&&(o.shorthandAssignLoc=i):this.raise($.InvalidCoverInitializedName,i),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,n,o,i,s,c){let u=this.parseObjectMethod(e,n,o,i,s)||this.parseObjectProperty(e,t,i,c);return u||this.unexpected(),u}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:o}=this.state,i;if(mt(n))i=this.parseIdentifier(!0);else switch(n){case 135:i=this.parseNumericLiteral(o);break;case 134:i=this.parseStringLiteral(o);break;case 136:i=this.parseBigIntLiteral(o);break;case 139:{let s=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=s):this.raise($.UnexpectedPrivateField,s),i=this.parsePrivateName();break}default:if(n===137){i=this.parseDecimalLiteral(o);break}this.unexpected()}e.key=i,n!==139&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,n,o,i,s,c=!1){this.initFunction(e,n),e.generator=t,this.scope.enter(530|(c?576:0)|(i?32:0)),this.prodParam.enter(ia(n,e.generator)),this.parseFunctionParams(e,o);let u=this.parseFunctionBodyAndFinish(e,s,!0);return this.prodParam.exit(),this.scope.exit(),u}parseArrayLike(e,t,n){t&&this.expectPlugin("recordAndTuple");let o=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let i=this.startNode();return this.next(),i.elements=this.parseExprList(e,!t,n,i),this.state.inFSharpPipelineDirectBody=o,this.finishNode(i,t?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,n,o){this.scope.enter(518);let i=ia(n,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,n);let s=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,o)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,n){this.toAssignableList(t,n,!1),e.params=t}parseFunctionBodyAndFinish(e,t,n=!1){return this.parseFunctionBody(e,!1,n),this.finishNode(e,t)}parseFunctionBody(e,t,n=!1){let o=t&&!this.match(5);if(this.expressionScope.enter(KS()),o)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let i=this.state.strict,s=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),e.body=this.parseBlock(!0,!1,c=>{let u=!this.isSimpleParamList(e.params);c&&u&&this.raise($.IllegalLanguageModeDirective,(e.kind==="method"||e.kind==="constructor")&&e.key?e.key.loc.end:e);let m=!i&&this.state.strict;this.checkParams(e,!this.state.strict&&!t&&!n&&!u,t,m),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,m)}),this.prodParam.exit(),this.state.labels=s}this.expressionScope.exit()}isSimpleParameter(e){return e.type==="Identifier"}isSimpleParamList(e){for(let t=0,n=e.length;t<n;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,n,o=!0){let i=!t&&new Set,s={type:"FormalParameters"};for(let c of e.params)this.checkLVal(c,s,5,i,o)}parseExprList(e,t,n,o){let i=[],s=!0;for(;!this.eat(e);){if(s)s=!1;else if(this.expect(12),this.match(e)){o&&this.addTrailingCommaExtraToNode(o),this.next();break}i.push(this.parseExprListItem(e,t,n))}return i}parseExprListItem(e,t,n,o){let i;if(this.match(12))t||this.raise($.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(n),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),o||this.raise($.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowInOrVoidPattern(e,n,this.parseParenItem);return i}parseIdentifier(e){let t=this.startNode(),n=this.parseIdentifierName(e);return this.createIdentifier(t,n)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}createIdentifierAt(e,t,n){return e.name=t,e.loc.identifierName=t,this.finishNodeAt(e,"Identifier",n)}parseIdentifierName(e){let t,{startLoc:n,type:o}=this.state;mt(o)?t=this.state.value:this.unexpected();let i=_ae(o);return e?i&&this.replaceToken(132):this.checkReservedWord(t,n,i,!1),this.next(),t}checkReservedWord(e,t,n,o){if(e.length>10||!tce(e))return;if(n&&Yae(e)){this.raise($.UnexpectedKeyword,t,{keyword:e});return}if((this.state.strict?o?qS:US:VS)(e,this.inModule)){this.raise($.UnexpectedReservedWord,t,{reservedWord:e});return}else if(e==="yield"){if(this.prodParam.hasYield){this.raise($.YieldBindingIdentifier,t);return}}else if(e==="await"){if(this.prodParam.hasAwait){this.raise($.AwaitBindingIdentifier,t);return}if(this.scope.inStaticBlock){this.raise($.AwaitBindingIdentifierInStaticBlock,t);return}this.expressionScope.recordAsyncArrowParametersError(t)}else if(e==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise($.ArgumentsInClass,t);return}}recordAwaitIfAllowed(){let e=this.prodParam.hasAwait;return e&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),e}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError($.AwaitExpressionFormalParameter,t),this.eat(55)&&this.raise($.ObsoleteAwaitStar,t),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return e===53||e===10||e===0||aa(e)||e===102&&!this.state.containsEsc||e===138||e===56||this.hasPlugin("v8intrinsic")&&e===54}parseYield(e){let t=this.startNodeAt(e);this.expressionScope.recordParameterInitializerError($.YieldInParameter,t);let n=!1,o=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!n)break;default:o=this.parseMaybeAssign()}return t.delegate=n,t.argument=o,this.finishNode(t,"YieldExpression")}parseImportCall(e){if(this.next(),e.source=this.parseMaybeAssignAllowIn(),e.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(e.source);else if(e.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(e.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise($.ImportCallArity,e)}}return this.expect(11),this.finishNode(e,"ImportExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&e.type==="SequenceExpression"&&this.raise($.PipelineHeadSequenceExpression,t)}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let n=this.startNodeAt(t);return n.callee=e,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),n.expression=e,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise($.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise($.PipelineTopicUnused,e)}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}else return e()}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(t|8);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(t&-9);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let o=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=n,o}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{n()}return this.finishNode(e,"ModuleExpression")}parseVoidPattern(e){this.expectPlugin("discardBinding");let t=this.startNode();return e!=null&&(e.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(t,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(e,t,n){if(t!=null&&this.match(88)){let o=this.lookaheadCharCode();if(o===44||o===(e===3?93:e===8?125:41)||o===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(t))}return this.parseMaybeAssignAllowIn(t,n)}parsePropertyNamePrefixOperator(e){}},fm={kind:1},Rce={kind:2},Mce=/[\uD800-\uDFFF]/u,gm=/in(?:stanceof)?/y;function Ece(r,e,t){for(let n=0;n<r.length;n++){let o=r[n],{type:i}=o;if(typeof i=="number"){if(i===139){let{loc:s,start:c,value:u,end:m}=o,h=c+1,g=qe(s.start,1);r.splice(n,1,new zt({type:Tt(27),value:"#",start:c,end:h,startLoc:s.start,endLoc:g}),new zt({type:Tt(132),value:u,start:h,end:m,startLoc:g,endLoc:s.end})),n++;continue}if(aa(i)){let{loc:s,start:c,value:u,end:m}=o,h=c+1,g=qe(s.start,1),y;e.charCodeAt(c-t)===96?y=new zt({type:Tt(22),value:"`",start:c,end:h,startLoc:s.start,endLoc:g}):y=new zt({type:Tt(8),value:"}",start:c,end:h,startLoc:s.start,endLoc:g});let S,w,T,M;i===24?(w=m-1,T=qe(s.end,-1),S=u===null?null:u.slice(1,-1),M=new zt({type:Tt(22),value:"`",start:w,end:m,startLoc:T,endLoc:s.end})):(w=m-2,T=qe(s.end,-2),S=u===null?null:u.slice(1,-2),M=new zt({type:Tt(23),value:"${",start:w,end:m,startLoc:T,endLoc:s.end})),r.splice(n,1,y,new zt({type:Tt(20),value:S,start:h,end:w,startLoc:g,endLoc:T}),M),n+=2;continue}o.type=Tt(i)}}return r}var Lm=class extends _m{parseTopLevel(e,t){return e.program=this.parseProgram(t,140,this.options.sourceType==="module"?"module":"script"),e.comments=this.comments,this.optionFlags&256&&(e.tokens=Ece(this.tokens,this.input,this.startIndex)),this.finishNode(e,"File")}parseProgram(e,t,n){if(e.sourceType=n,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[i,s]of Array.from(this.scope.undefinedExports))this.raise($.ModuleExportUndefined,s,{localName:i});this.addExtra(e,"topLevelAwait",this.state.hasTopLevelAwait)}let o;return t===140?o=this.finishNode(e,"Program"):o=this.finishNodeAt(e,"Program",qe(this.state.startLoc,-1)),o}stmtToDirective(e){let t=this.castNodeTo(e,"Directive"),n=this.castNodeTo(e.expression,"DirectiveLiteral"),o=n.value,i=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),s=n.value=i.slice(1,-1);return this.addExtra(n,"raw",i),this.addExtra(n,"rawValue",s),this.addExtra(n,"expressionValue",o),t.value=n,delete e.expression,t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);if(this.isUnparsedContextual(e,"of")){let n=this.lookaheadCharCodeSince(e+2);if(n!==61&&n!==58&&n!==59)return!1}return!!(this.chStartsBindingIdentifier(t,e)||this.isUnparsedContextual(e,"void"))}nextTokenIsIdentifierOnSameLine(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}isAwaitUsing(){if(!this.isContextual(96))return!1;let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return!0}return!1}chStartsBindingIdentifier(e,t){if(vt(e)){if(gm.lastIndex=t,gm.test(this.input)){let n=this.codePointAtPos(gm.lastIndex);if(!mo(n)&&n!==92)return!1}return!0}else return e===92}chStartsBindingPattern(e){return e===91||e===123}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifierOrBrace(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return t===123||this.chStartsBindingIdentifier(t,e)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let n=this.state.type,o=this.startNode(),i=!!(e&2),s=!!(e&4),c=e&1;switch(n){case 60:return this.parseBreakContinueStatement(o,!0);case 63:return this.parseBreakContinueStatement(o,!1);case 64:return this.parseDebuggerStatement(o);case 90:return this.parseDoWhileStatement(o);case 91:return this.parseForStatement(o);case 68:if(this.lookaheadCharCode()===46)break;return s||this.raise(this.state.strict?$.StrictFunction:this.options.annexB?$.SloppyFunctionAnnexB:$.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(o,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,o),!0);case 69:return this.parseIfStatement(o);case 70:return this.parseReturnStatement(o);case 71:return this.parseSwitchStatement(o);case 72:return this.parseThrowStatement(o);case 73:return this.parseTryStatement(o);case 96:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise($.AwaitUsingNotInAsyncContext,o):this.raise($.UnexpectedLexicalDeclaration,o):this.raise($.UnexpectedUsingDeclaration,o),this.next(),this.parseVarStatement(o,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise($.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise($.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(o,"using");case 100:{if(this.state.containsEsc)break;let h=this.nextTokenStart(),g=this.codePointAtPos(h);if(g!==91&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(g,h)&&g!==123))break}case 75:i||this.raise($.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let h=this.state.value;return this.parseVarStatement(o,h)}case 92:return this.parseWhileStatement(o);case 76:return this.parseWithStatement(o);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(o);case 83:{let h=this.lookaheadCharCode();if(h===40||h===46)break}case 82:{!(this.optionFlags&8)&&!c&&this.raise($.UnexpectedImportExport,this.state.startLoc),this.next();let h;return n===83?h=this.parseImport(o):h=this.parseExport(o,t),this.assertModuleNodeAllowed(h),h}default:if(this.isAsyncFunction())return i||this.raise($.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(o,!0,!i&&s)}let u=this.state.value,m=this.parseExpression();return me(n)&&m.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(o,u,m,e):this.parseExpressionStatement(o,m,t)}assertModuleNodeAllowed(e){!(this.optionFlags&8)&&!this.inModule&&this.raise($.ImportOutsideModule,e)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(e,t,n){if(e){var o;(o=t.decorators)!=null&&o.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise($.DecoratorsBeforeAfterExport,t.decorators[0]),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),n&&this.resetStartLocationFromNode(n,t)}return t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do t.push(this.parseDecorator());while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise($.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise($.UnexpectedLeadingDecorator,this.state.startLoc);return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t=this.state.startLoc,n;if(this.match(10)){let o=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(o,n);let i=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(n,o),this.getPluginOption("decorators","allowCallParenthesized")===!1&&e.expression!==n&&this.raise($.DecoratorArgumentsOutsideParentheses,i)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let o=this.startNodeAt(t);o.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),o.computed=!1,n=this.finishNode(o,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(n,t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e,t){if(this.eat(10)){let n=this.startNodeAt(t);return n.callee=e,n.arguments=this.parseCallExpressionArguments(),this.toReferencedList(n.arguments),this.finishNode(n,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let n;for(n=0;n<this.state.labels.length;++n){let o=this.state.labels[n];if((e.label==null||o.name===e.label.name)&&(o.kind!=null&&(t||o.kind===1)||e.label&&t))break}if(n===this.state.labels.length){let o=t?"BreakStatement":"ContinueStatement";this.raise($.IllegalBreakContinue,e,{type:o})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(fm),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(fm);let t=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(t=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return t!==null&&this.unexpected(t),this.parseFor(e,null);let n=this.isContextual(100);{let u=this.isAwaitUsing(),m=u||this.isForUsing(),h=n&&this.hasFollowingBindingAtom()||m;if(this.match(74)||this.match(75)||h){let g=this.startNode(),y;u?(y="await using",this.recordAwaitIfAllowed()||this.raise($.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):y=this.state.value,this.next(),this.parseVar(g,!0,y);let S=this.finishNode(g,"VariableDeclaration"),w=this.match(58);return w&&m&&this.raise($.ForInUsing,S),(w||this.isContextual(102))&&S.declarations.length===1?this.parseForIn(e,S,t):(t!==null&&this.unexpected(t),this.parseFor(e,S))}}let o=this.isContextual(95),i=new lr,s=this.parseExpression(!0,i),c=this.isContextual(102);if(c&&(n&&this.raise($.ForOfLet,s),t===null&&o&&s.type==="Identifier"&&this.raise($.ForOfAsync,s)),c||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);let u=c?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{type:u}),this.parseForIn(e,s,t)}else this.checkExpressionErrors(i,!0);return t!==null&&this.unexpected(t),this.parseFor(e,s)}parseFunctionStatement(e,t,n){return this.next(),this.parseFunction(e,1|(n?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.raise($.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t=e.cases=[];this.expect(5),this.state.labels.push(Rce),this.scope.enter(256);let n;for(let o;!this.match(8);)if(this.match(61)||this.match(65)){let i=this.match(61);n&&this.finishNode(n,"SwitchCase"),t.push(n=this.startNode()),n.consequent=[],this.next(),i?n.test=this.parseExpression():(o&&this.raise($.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),o=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise($.NewlineAfterThrow,this.state.lastTokEndLoc),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&e.type==="Identifier"?8:0),this.checkLVal(e,{type:"CatchClause"},9),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise($.NoCatchOrFinally,e),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,n=!1){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(fm),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise($.StrictWith,this.state.startLoc),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,n,o){for(let s of this.state.labels)s.name===t&&this.raise($.LabelRedeclaration,n,{labelName:t});let i=Fae(this.state.type)?1:this.match(71)?2:null;for(let s=this.state.labels.length-1;s>=0;s--){let c=this.state.labels[s];if(c.statementStart===e.start)c.statementStart=this.sourceToOffsetPos(this.state.start),c.kind=i;else break}return this.state.labels.push({name:t,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),e.body=o&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,n){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,n){let o=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(o,e,!1,8,n),t&&this.scope.exit(),this.finishNode(o,"BlockStatement")}isValidDirective(e){return e.type==="ExpressionStatement"&&e.expression.type==="StringLiteral"&&!e.expression.extra.parenthesized}parseBlockBody(e,t,n,o,i){let s=e.body=[],c=e.directives=[];this.parseBlockOrModuleBlockBody(s,t?c:void 0,n,o,i)}parseBlockOrModuleBlockBody(e,t,n,o,i){let s=this.state.strict,c=!1,u=!1;for(;!this.match(o);){let m=n?this.parseModuleItem():this.parseStatementListItem();if(t&&!u){if(this.isValidDirective(m)){let h=this.stmtToDirective(m);t.push(h),!c&&h.value.value==="use strict"&&(c=!0,this.setStrict(!0));continue}u=!0,this.state.strictErrors.clear()}e.push(m)}i?.call(this,c),s||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,n){let o=this.match(58);return this.next(),o?n!==null&&this.unexpected(n):e.await=n!==null,t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!o||!this.options.annexB||this.state.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise($.ForInOfLoopInitializer,t,{type:o?"ForInStatement":"ForOfStatement"}),t.type==="AssignmentPattern"&&this.raise($.InvalidLhs,t,{ancestor:{type:"ForStatement"}}),e.left=t,e.right=o?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,o?"ForInStatement":"ForOfStatement")}parseVar(e,t,n,o=!1){let i=e.declarations=[];for(e.kind=n;;){let s=this.startNode();if(this.parseVarId(s,n),s.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,s.init===null&&!o&&(s.id.type!=="Identifier"&&!(t&&(this.match(58)||this.isContextual(102)))?this.raise($.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise($.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),i.push(this.finishNode(s,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let n=this.parseBindingAtom();t==="using"||t==="await using"?(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise($.UsingDeclarationHasBindingPattern,n.loc.start):n.type==="VoidPattern"&&this.raise($.UnexpectedVoidPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},t==="var"?5:8201),e.id=n}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let n=t&2,o=!!(t&1),i=o&&!(t&4),s=!!(t&8);this.initFunction(e,s),this.match(55)&&(n&&this.raise($.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),e.generator=!0),o&&(e.id=this.parseFunctionId(i));let c=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(ia(s,e.generator)),o||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(e,o?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),o&&!n&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=c,e}parseFunctionId(e){return e||me(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(xce()),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:8201:17,e.id.loc.start)}parseClass(e,t,n){this.next();let o=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,n),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,o),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(e){return e.type==="Identifier"&&e.name==="constructor"||e.type==="StringLiteral"&&e.value==="constructor"}isNonstaticConstructor(e){return!e.computed&&!e.static&&this.nameIsConstructor(e.key)}parseClassBody(e,t){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:e},o=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(o.length>0)throw this.raise($.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){o.push(this.parseDecorator());continue}let s=this.startNode();o.length&&(s.decorators=o,this.resetStartLocationFromNode(s,o[0]),o=[]),this.parseClassMember(i,s,n),s.kind==="constructor"&&s.decorators&&s.decorators.length>0&&this.raise($.DecoratorConstructor,s)}}),this.state.strict=t,this.next(),o.length)throw this.raise($.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let o=t;return o.kind="method",o.computed=!1,o.key=n,o.static=!1,this.pushClassMethod(e,o,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let o=t;return o.computed=!1,o.key=n,o.static=!1,e.body.push(this.parseClassProperty(o)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(e,t,n){let o=this.isContextual(106);if(o){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5)){this.parseClassStaticBlock(e,t);return}}this.parseClassMemberWithIsStatic(e,t,n,o)}parseClassMemberWithIsStatic(e,t,n,o){let i=t,s=t,c=t,u=t,m=t,h=i,g=i;if(t.static=o,this.parsePropertyNamePrefixOperator(t),this.eat(55)){h.kind="method";let V=this.match(139);if(this.parseClassElementName(h),this.parsePostMemberNameModifiers(h),V){this.pushClassPrivateMethod(e,s,!0,!1);return}this.isNonstaticConstructor(i)&&this.raise($.ConstructorIsGenerator,i.key),this.pushClassMethod(e,i,!0,!1,!1,!1);return}let y=!this.state.containsEsc&&me(this.state.type),S=this.parseClassElementName(t),w=y?S.name:null,T=this.isPrivateName(S),M=this.state.startLoc;if(this.parsePostMemberNameModifiers(g),this.isClassMethod()){if(h.kind="method",T){this.pushClassPrivateMethod(e,s,!1,!1);return}let V=this.isNonstaticConstructor(i),F=!1;V&&(i.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise($.DuplicateConstructor,S),V&&this.hasPlugin("typescript")&&t.override&&this.raise($.OverrideOnConstructor,S),n.hadConstructor=!0,F=n.hadSuperClass),this.pushClassMethod(e,i,!1,!1,V,F)}else if(this.isClassProperty())T?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,c);else if(w==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(S);let V=this.eat(55);g.optional&&this.unexpected(M),h.kind="method";let F=this.match(139);this.parseClassElementName(h),this.parsePostMemberNameModifiers(g),F?this.pushClassPrivateMethod(e,s,V,!0):(this.isNonstaticConstructor(i)&&this.raise($.ConstructorIsAsync,i.key),this.pushClassMethod(e,i,V,!0,!1,!1))}else if((w==="get"||w==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(S),h.kind=w;let V=this.match(139);this.parseClassElementName(i),V?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise($.ConstructorIsAccessor,i.key),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else if(w==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(S);let V=this.match(139);this.parseClassElementName(c),this.pushClassAccessorProperty(e,m,V)}else this.isLineTerminator()?T?this.pushClassPrivateProperty(e,u):this.pushClassProperty(e,c):this.unexpected()}parseClassElementName(e){let{type:t,value:n}=this.state;if((t===132||t===134)&&e.static&&n==="prototype"&&this.raise($.StaticPrototype,this.state.startLoc),t===139){n==="constructor"&&this.raise($.ConstructorClassPrivateField,this.state.startLoc);let o=this.parsePrivateName();return e.key=o,o}return this.parsePropertyName(e),e.key}parseClassStaticBlock(e,t){var n;this.scope.enter(720);let o=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=o,e.body.push(this.finishNode(t,"StaticBlock")),(n=t.decorators)!=null&&n.length&&this.raise($.DecoratorStaticBlock,t)}pushClassProperty(e,t){!t.computed&&this.nameIsConstructor(t.key)&&this.raise($.ConstructorClassField,t.key),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let n=this.parseClassPrivateProperty(t);e.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(e,t,n){!n&&!t.computed&&this.nameIsConstructor(t.key)&&this.raise($.ConstructorClassField,t.key);let o=this.parseClassAccessorProperty(t);e.body.push(o),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(o.key),0,o.key.loc.start)}pushClassMethod(e,t,n,o,i,s){e.body.push(this.parseMethod(t,n,o,i,s,"ClassMethod",!0))}pushClassPrivateMethod(e,t,n,o){let i=this.parseMethod(t,n,o,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);let s=i.kind==="get"?i.static?6:2:i.kind==="set"?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(592),this.expressionScope.enter(KS()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,n,o=8331){if(me(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,o);else if(n||!t)e.id=null;else throw this.raise($.MissingClassName,this.state.startLoc)}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let n=this.parseMaybeImportPhase(e,!0),o=this.maybeParseExportDefaultSpecifier(e,n),i=!o||this.eat(12),s=i&&this.eatExportStar(e),c=s&&this.maybeParseExportNamespaceSpecifier(e),u=i&&(!c||this.eat(12)),m=o||s;if(s&&!c){if(o&&this.unexpected(),t)throw this.raise($.UnsupportedDecoratorExport,e);return this.parseExportFrom(e,!0),this.sawUnambiguousESM=!0,this.finishNode(e,"ExportAllDeclaration")}let h=this.maybeParseExportNamedSpecifiers(e);o&&i&&!s&&!h&&this.unexpected(null,5),c&&u&&this.unexpected(null,98);let g;if(m||h){if(g=!1,t)throw this.raise($.UnsupportedDecoratorExport,e);this.parseExportFrom(e,m)}else g=this.maybeParseExportDeclaration(e);if(m||h||g){var y;let S=e;if(this.checkExport(S,!0,!1,!!S.source),((y=S.declaration)==null?void 0:y.type)==="ClassDeclaration")this.maybeTakeDecorators(t,S.declaration,S);else if(t)throw this.raise($.UnsupportedDecoratorExport,e);return this.sawUnambiguousESM=!0,this.finishNode(S,"ExportNamedDeclaration")}if(this.eat(65)){let S=e,w=this.parseExportDefaultExpression();if(S.declaration=w,w.type==="ClassDeclaration")this.maybeTakeDecorators(t,w,S);else if(t)throw this.raise($.UnsupportedDecoratorExport,e);return this.checkExport(S,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(S,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",t?.loc.start);let n=t||this.parseIdentifier(!0),o=this.startNodeAtNode(n);return o.exported=n,e.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){var t,n;(n=(t=e).specifiers)!=null||(t.specifiers=[]);let o=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),o.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(o,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){let t=e;t.specifiers||(t.specifiers=[]);let n=t.exportKind==="type";return t.specifiers.push(...this.parseExportSpecifiers(n)),t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=null,!0}return!1}maybeParseExportDeclaration(e){return this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=this.parseExportDeclaration(e),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise($.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise($.UnsupportedDefaultExport,this.state.startLoc);let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(me(e)){if(e===95&&!this.state.containsEsc||e===100)return!1;if((e===130||e===129)&&!this.state.containsEsc){let o=this.nextTokenStart(),i=this.input.charCodeAt(o);if(i===123||this.chStartsBindingIdentifier(i,o)&&!this.input.startsWith("from",o))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),n=this.isUnparsedContextual(t,"from");if(this.input.charCodeAt(t)===44||me(this.state.type)&&n)return!0;if(this.match(65)&&n){let o=this.input.charCodeAt(this.nextTokenStartSince(t+4));return o===34||o===39}return!1}parseExportFrom(e,t){this.eatContextual(98)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return e===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise($.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise($.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise($.UsingDeclarationExport,this.state.startLoc),!0):e===74||e===75||e===68||e===80||this.isLet()||this.isAsyncFunction()}checkExport(e,t,n,o){if(t){var i;if(n){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var s;let c=e.declaration;c.type==="Identifier"&&c.name==="from"&&c.end-c.start===4&&!((s=c.extra)!=null&&s.parenthesized)&&this.raise($.ExportDefaultFromAsIdentifier,c)}}else if((i=e.specifiers)!=null&&i.length)for(let c of e.specifiers){let{exported:u}=c,m=u.type==="Identifier"?u.name:u.value;if(this.checkDuplicateExports(c,m),!o&&c.local){let{local:h}=c;h.type!=="Identifier"?this.raise($.ExportBindingIsString,c,{localName:h.value,exportName:m}):(this.checkReservedWord(h.name,h.loc.start,!0,!1),this.scope.checkLocalExport(h))}}else if(e.declaration){let c=e.declaration;if(c.type==="FunctionDeclaration"||c.type==="ClassDeclaration"){let{id:u}=c;if(!u)throw new Error("Assertion failure");this.checkDuplicateExports(e,u.name)}else if(c.type==="VariableDeclaration")for(let u of c.declarations)this.checkDeclaration(u.id)}}}checkDeclaration(e){if(e.type==="Identifier")this.checkDuplicateExports(e,e.name);else if(e.type==="ObjectPattern")for(let t of e.properties)this.checkDeclaration(t);else if(e.type==="ArrayPattern")for(let t of e.elements)t&&this.checkDeclaration(t);else e.type==="ObjectProperty"?this.checkDeclaration(e.value):e.type==="RestElement"?this.checkDeclaration(e.argument):e.type==="AssignmentPattern"&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&(t==="default"?this.raise($.DuplicateDefaultExport,e):this.raise($.DuplicateExport,e,{exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let o=this.isContextual(130),i=this.match(134),s=this.startNode();s.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(s,i,e,o))}return t}parseExportSpecifier(e,t,n,o){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=this.cloneStringLiteral(e.local):e.exported||(e.exported=this.cloneIdentifier(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let e=this.parseStringLiteral(this.state.value),t=Mce.exec(e.value);return t&&this.raise($.ModuleExportNameHasLoneSurrogate,e,{surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return e.assertions!=null?e.assertions.some(({key:t,value:n})=>n.value==="json"&&(t.type==="Identifier"?t.name==="type":t.value==="type")):!1}checkImportReflection(e){let{specifiers:t}=e,n=t.length===1?t[0].type:null;if(e.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise($.SourcePhaseImportRequiresDefault,t[0].loc.start);else if(e.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise($.DeferImportRequiresNamespace,t[0].loc.start);else if(e.module){var o;n!=="ImportDefaultSpecifier"&&this.raise($.ImportReflectionNotBinding,t[0].loc.start),((o=e.assertions)==null?void 0:o.length)>0&&this.raise($.ImportReflectionHasAssertion,t[0].loc.start)}}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&e.type!=="ExportAllDeclaration"){let{specifiers:t}=e;if(t!=null){let n=t.find(o=>{let i;if(o.type==="ExportSpecifier"?i=o.local:o.type==="ImportSpecifier"&&(i=o.imported),i!==void 0)return i.type==="Identifier"?i.name!=="default":i.value!=="default"});n!==void 0&&this.raise($.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(e){return e?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(e,t,n,o){t||(n==="module"?(this.expectPlugin("importReflection",o),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",o),e.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",o),e.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(e.phase=null))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let n=this.startNode(),o=this.parseIdentifierName(!0),{type:i}=this.state;return(mt(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.applyImportPhase(e,t,o,n.loc.start),null):(this.applyImportPhase(e,t,null),this.createIdentifier(n,o))}isPrecedingIdImportPhase(e){let{type:t}=this.state;return me(t)?t!==98||this.lookaheadCharCode()===102:t!==12}parseImport(e){return this.match(134)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let o=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),i=o&&this.maybeParseStarImportSpecifier(e);return o&&!i&&this.parseNamedImportSpecifiers(e),this.expectContextual(98),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){var t;return(t=e.specifiers)!=null||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,n){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,n))}finishImportSpecifier(e,t,n=8201){return this.checkLVal(e.local,{type:t},n),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let n=this.startNode(),o=this.state.value;if(t.has(o)&&this.raise($.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:o}),t.add(o),this.match(134)?n.key=this.parseStringLiteral(o):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise($.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise($.ModuleAttributeDifferentFromType,n.key),t.has(n.key.name)&&this.raise($.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),t.add(n.key.name),this.expect(14),!this.match(134))throw this.raise($.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(t=this.parseModuleAttributes(),this.addExtra(e,"deprecatedWithLegacySyntax",!0)):t=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise($.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(e,"deprecatedAssertSyntax",!0),this.next(),t=this.parseImportAttributes()):t=[];!n&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let n=this.startNodeAtNode(t);return n.local=t,e.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(mt(this.state.type))return this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise($.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),o=this.match(134),i=this.isContextual(130);n.imported=this.parseModuleExportName();let s=this.parseImportSpecifier(n,o,e.importKind==="type"||e.importKind==="typeof",i,void 0);e.specifiers.push(s)}}parseImportSpecifier(e,t,n,o,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:s}=e;if(t)throw this.raise($.ImportBindingIsString,e,{importName:s.value});this.checkReservedWord(s.name,e.loc.start,!0,!0),e.local||(e.local=this.cloneIdentifier(s))}return this.finishImportSpecifier(e,"ImportSpecifier",i)}isThisParam(e){return e.type==="Identifier"&&e.name==="this"}},pa=class extends Lm{constructor(e,t,n){let o=Rae(e);super(o,t),this.options=o,this.initializeScopes(),this.plugins=n,this.filename=o.sourceFilename,this.startIndex=o.startIndex;let i=0;o.allowAwaitOutsideFunction&&(i|=1),o.allowReturnOutsideFunction&&(i|=2),o.allowImportExportEverywhere&&(i|=8),o.allowSuperOutsideMethod&&(i|=16),o.allowUndeclaredExports&&(i|=64),o.allowNewTargetOutsideFunction&&(i|=4),o.allowYieldOutsideFunction&&(i|=32),o.ranges&&(i|=128),o.tokens&&(i|=256),o.createImportExpressions&&(i|=512),o.createParenthesizedExpressions&&(i|=1024),o.errorRecovery&&(i|=2048),o.attachComment&&(i|=4096),o.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return wn}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();this.nextToken(),e.errors=null;let n=this.parseTopLevel(e,t);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}};function Dce(r,e){var t;if(((t=e)==null?void 0:t.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let n=Sn(e,r),o=n.parse();if(n.sawUnambiguousESM)return o;if(n.ambiguousScriptDifferentAst)try{return e.sourceType="script",Sn(e,r).parse()}catch{}else o.program.sourceType="script";return o}catch(n){try{return e.sourceType="script",Sn(e,r).parse()}catch{}throw n}}else return Sn(e,r).parse()}function Ace(r,e){let t=Sn(e,r);return t.options.strictMode&&(t.state.strict=!0),t.getExpression()}function _ce(r){let e={};for(let t of Object.keys(r))e[t]=Tt(r[t]);return e}var Lce=_ce(Aae);function Sn(r,e){let t=pa,n=new Map;if(r!=null&&r.plugins){for(let o of r.plugins){let i,s;typeof o=="string"?i=o:[i,s]=o,n.has(i)||n.set(i,s||{})}Cce(n),t=jce(n)}return new t(r,e,n)}var LS=new Map;function jce(r){let e=[];for(let o of Oce)r.has(o)&&e.push(o);let t=e.join("|"),n=LS.get(t);if(!n){n=pa;for(let o of e)n=XS[o](n);LS.set(t,n)}return n}kn.parse=Dce;kn.parseExpression=Ace;kn.tokTypes=Lce});import{Command as ape}from"commander";import{existsSync as Az}from"fs";import{homedir as Dh}from"os";import{dirname as _z,join as fa}from"path";import{fileURLToPath as Lz}from"url";import{agents as jz,detectGlobalAgents as Ah,upsertServer as Fz}from"add-mcp";import{createHash as Cz,randomUUID as Th}from"crypto";import{chmodSync as Oz,existsSync as Rz,lstatSync as ma,mkdirSync as da,readFileSync as Oh,readdirSync as Rh,renameSync as la,writeFileSync as Ph}from"fs";import{dirname as On,join as ht}from"path";var ha=".cueframe-install.json";function Mh(r){return Cz("sha256").update(r).digest("hex")}function Ch(r){let e=new Map;function t(n){let o=ht(r,n),i=ma(o);if(i.isSymbolicLink())throw new Error(`Skill package contains a symbolic link: ${o}`);if(i.isDirectory())for(let s of Rh(o).sort())!n&&s===ha||t(n?`${n}/${s}`:s);else if(i.isFile())e.set(n,{bytes:Oh(o),mode:i.mode&511});else throw new Error(`Unsupported skill package entry: ${o}`)}return t(""),e}function ua(r){return Object.fromEntries([...r].map(([e,t])=>[e,`${t.mode}:${Mh(t.bytes)}`]))}function Mz(r,e){let t=Object.keys(r).sort();return JSON.stringify(t)===JSON.stringify(Object.keys(e).sort())&&t.every(n=>r[n]===e[n])}function Ez(r,e){try{let t=ht(r,ha);if(!ma(t).isFile())return;let n=JSON.parse(Oh(t,"utf8"));return n.version!==1||typeof n.sourceHash!="string"||!n.files||!Mz(n.files,ua(e))?void 0:n}catch{return}}function Dz(r,e){let t=`> Installed ${e} by \`npx -y cueframe install\`. Run it again to refresh
10
+ > unchanged managed skills. Locally edited or untracked packages are preserved;
11
+ > inspect reported conflicts before using \`--force\` (which makes a backup).
12
+ `,n=r.match(/^---\r?\n[\s\S]*?\r?\n---\r?\n/);return n?`${n[0]}
13
+ ${t}${r.slice(n[0].length)}`:`${t}
14
+ ${r}`}function Eh(r,e,t={}){let n={installed:[],unchanged:[],skipped:[],backups:[]},o=t.today??new Date().toISOString().slice(0,10),i=Rh(r).sort().flatMap(s=>{let c=ht(r,s);if(!Rz(ht(c,"SKILL.md")))return[];let u=Ch(c),m=Mh(JSON.stringify(ua(u))),h=u.get("SKILL.md");return u.set("SKILL.md",{...h,bytes:Buffer.from(Dz(h.bytes.toString("utf8"),o))}),[{name:s,files:u,sourceHash:m}]});for(let s of new Set(e))for(let{name:c,files:u,sourceHash:m}of i){let h=ht(s,c),g=ht(h,"SKILL.md"),y=!1;try{ma(h),y=!0}catch(M){if(M.code!=="ENOENT")throw M}if(y&&!t.force){let M;try{M=Ez(h,Ch(h))}catch{}if(!M){n.skipped.push(g);continue}if(M.sourceHash===m){n.unchanged.push(g);continue}}let S=ht(On(s),"cueframe-skill-staging",`${c}-${Th()}`);for(let[M,V]of u){let F=ht(S,M);da(On(F),{recursive:!0}),Ph(F,V.bytes),Oz(F,V.mode)}let w={version:1,sourceHash:m,files:ua(u)};Ph(ht(S,ha),JSON.stringify(w,null,2)+`
15
+ `),da(s,{recursive:!0});let T;y&&(T=ht(On(s),"cueframe-skill-backups",`${c}-${Th()}`),da(On(T),{recursive:!0}),la(h,T));try{la(S,h)}catch(M){throw T&&la(T,h),M}T&&n.backups.push({skill:g,path:T}),n.installed.push(g)}return n}var Rn="cueframe",Nz=fa(_z(Lz(import.meta.url)),"skills");function Vz(r){return(jz[r]?.supportedTransports??[]).includes("http")}async function Uz(r){return(await Ah()).map(t=>{if(!Vz(t))return{agent:t,wired:!1,error:"speaks stdio only \u2014 CueFrame\u2019s MCP server is remote HTTP"};try{let n=Fz(t,Rn,{type:"http",url:r});return{agent:t,wired:n.success,path:n.path,error:n.error}}catch(n){return{agent:t,wired:!1,error:n instanceof Error?n.message:String(n)}}})}async function _h(r,e=Nz){let t=`${go(r.target)}/v1/mcp`,n=[fa(Dh(),".agents","skills"),fa(Dh(),".claude","skills")];if(r.dryRun){let m=await Ah();pe(r,{ok:!0,dryRun:!0,mcpUrl:t,wouldWire:m,serverName:Rn,skillDirectories:n},()=>{console.log(`Would wire MCP server "${Rn}" \u2192 ${t} into:`),m.length===0&&console.log(" (no agents detected on this machine)");for(let h of m)console.log(` \u2192 ${h}`);console.log("Would install/refresh CueFrame skills in ~/.agents/skills and ~/.claude/skills"),console.log("Dry run \u2014 nothing was written.")});return}Az(e)||(G(r,"install",new Error("Bundled skills/ directory not found"),j.UserError),L(j.UserError));let o=await Uz(t),{installed:i,unchanged:s,skipped:c,backups:u}=Eh(e,n,r);i.length===0&&s.length===0&&c.length===0&&o.length===0&&(G(r,"install",new Error("No agents detected and no skills found \u2014 nothing to install"),j.UserError),L(j.UserError)),pe(r,{ok:!0,mcpUrl:t,agents:o,skills:i,unchanged:s,skipped:c,backups:u,skillDirectories:n},()=>{if(console.log(`\u2713 CueFrame MCP server (${t})`),o.length===0)console.log(" No agents detected on this machine. Add it manually:"),console.log(` claude mcp add --transport http ${Rn} ${t}`),console.log(` \u2026or add the MCP server ${t} as a custom connector.`);else for(let m of o)console.log(m.wired?` \u2192 wired ${m.agent}`:` \u2717 ${m.agent}: ${m.error??"failed"}`);if(console.log(`\u2713 Installed/refreshed ${i.length} CueFrame skill copies in ~/.agents/skills and ~/.claude/skills`),s.length>0&&console.log(` ${s.length} already current`),c.length>0){console.log(` ${c.length} preserved (locally changed or untracked; review before --force)`);for(let m of c)console.log(` ${m}`)}for(let m of u)console.log(` Backup: ${m.path}`);console.log(""),console.log("Next: ask your agent to make a video \u2014 it opens a browser to authorize on"),console.log("first call. No API key needed."),console.log("Restart your agent session to load the MCP server and skills."),console.log(""),console.log("This installed no `cueframe` binary \u2014 npx leaves nothing on your PATH."),console.log("Prefer the terminal? Every command runs as `npx -y cueframe \u2026`:"),console.log(" npx -y cueframe login")})}import{existsSync as ga,mkdirSync as Bz,readFileSync as jh,writeFileSync as xa}from"fs";import{join as ya}from"path";var Lh="cueframe.json",qz="cueframe/components",Mn=".cueframe/";function Wz(r,e){let t=ya(r,".gitignore");if(ga(t)){let n=jh(t,"utf8"),o=n.split(`
16
+ `).map(i=>i.trim());if(o.includes(Mn)||o.includes(".cueframe"))return!1;if(!e){let i=n.endsWith(`
8
17
  `)||n.length===0?"":`
9
- `;mt(r,`${n}${s}
18
+ `;xa(t,`${n}${i}
10
19
  # CueFrame derived render cache (regenerated; never authored)
11
- ${He}
12
- `)}return!0}return e||mt(r,`# CueFrame derived render cache (regenerated; never authored)
13
- ${He}
14
- `),!0}function Ut(t){let e=process.cwd(),r=t.dryRun??!1;h(t,"init_prepare",{cwd:e,dryRun:r});let n=ft(e,Nt),o=lt(n),s=dn;if(o)try{let d=JSON.parse(Mt(n,"utf8"));typeof d.componentsDir=="string"&&d.componentsDir.length>0&&(s=d.componentsDir)}catch{}else r||mt(n,`${JSON.stringify({componentsDir:s},null,2)}
15
- `);let i=ft(e,s),a=lt(i);!a&&!r&&cn(i,{recursive:!0});let u=un(e,r);$(t,{ok:!0,dryRun:r,root:e,manifest:{path:n,created:!o},componentsDir:s,componentsDirCreated:!a,gitignoreUpdated:u},()=>{console.log(`\u2713 ${r?"Would initialize":"Initialized"} CueFrame workspace at ${e}`),console.log(` ${o?"kept":"created"} ${Nt} (componentsDir: ${s})`),console.log(` ${a?"exists":"created"} ${s}/`),u&&console.log(` gitignored ${He}`),console.log("Next: cueframe eject <primitive> or cueframe new component <name>")})}import{existsSync as Ro,mkdirSync as Oo,readFileSync as Ao,readdirSync as Io,writeFileSync as Yt}from"fs";import{join as Xt}from"path";import{existsSync as tt,readFileSync as ko,readdirSync as bo,statSync as Eo}from"fs";import{dirname as So,join as Ne,parse as Co}from"path";var Le={};qr(Le,{BRAND:()=>Mn,DIRTY:()=>de,EMPTY_PATH:()=>pn,INVALID:()=>w,NEVER:()=>wo,OK:()=>F,ParseStatus:()=>M,Schema:()=>E,ZodAny:()=>ae,ZodArray:()=>re,ZodBigInt:()=>le,ZodBoolean:()=>me,ZodBranded:()=>Fe,ZodCatch:()=>be,ZodDate:()=>fe,ZodDefault:()=>ke,ZodDiscriminatedUnion:()=>Xe,ZodEffects:()=>q,ZodEnum:()=>xe,ZodError:()=>L,ZodFirstPartyTypeKind:()=>k,ZodFunction:()=>et,ZodIntersection:()=>ye,ZodIssueCode:()=>f,ZodLazy:()=>ve,ZodLiteral:()=>_e,ZodMap:()=>Ae,ZodNaN:()=>Pe,ZodNativeEnum:()=>we,ZodNever:()=>G,ZodNull:()=>ge,ZodNullable:()=>Y,ZodNumber:()=>ue,ZodObject:()=>z,ZodOptional:()=>V,ZodParsedType:()=>y,ZodPipeline:()=>De,ZodPromise:()=>ce,ZodReadonly:()=>Ee,ZodRecord:()=>Qe,ZodSchema:()=>E,ZodSet:()=>Ie,ZodString:()=>ie,ZodSymbol:()=>Re,ZodTransformer:()=>q,ZodTuple:()=>K,ZodType:()=>E,ZodUndefined:()=>pe,ZodUnion:()=>he,ZodUnknown:()=>te,ZodVoid:()=>Oe,addIssueToContext:()=>g,any:()=>Bn,array:()=>Hn,bigint:()=>Ln,boolean:()=>Gt,coerce:()=>xo,custom:()=>Bt,date:()=>zn,datetimeRegex:()=>Wt,defaultErrorMap:()=>Q,discriminatedUnion:()=>Qn,effect:()=>mo,enum:()=>co,function:()=>so,getErrorMap:()=>je,getParsedType:()=>H,instanceof:()=>Fn,intersection:()=>eo,isAborted:()=>Ke,isAsync:()=>Te,isDirty:()=>Ye,isValid:()=>se,late:()=>Un,lazy:()=>io,literal:()=>ao,makeIssue:()=>Ue,map:()=>no,nan:()=>Dn,nativeEnum:()=>uo,never:()=>Jn,null:()=>Vn,nullable:()=>po,number:()=>Jt,object:()=>Kn,objectUtil:()=>pt,oboolean:()=>_o,onumber:()=>vo,optional:()=>fo,ostring:()=>yo,pipeline:()=>ho,preprocess:()=>go,promise:()=>lo,quotelessJson:()=>ln,record:()=>ro,set:()=>oo,setErrorMap:()=>fn,strictObject:()=>Yn,string:()=>qt,symbol:()=>Zn,transformer:()=>mo,tuple:()=>to,undefined:()=>Wn,union:()=>Xn,unknown:()=>qn,util:()=>j,void:()=>Gn});var j;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function r(o){throw new Error}t.assertNever=r,t.arrayToEnum=o=>{let s={};for(let i of o)s[i]=i;return s},t.getValidEnumValues=o=>{let s=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),i={};for(let a of s)i[a]=o[a];return t.objectValues(i)},t.objectValues=o=>t.objectKeys(o).map(function(s){return o[s]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let s=[];for(let i in o)Object.prototype.hasOwnProperty.call(o,i)&&s.push(i);return s},t.find=(o,s)=>{for(let i of o)if(s(i))return i},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,s=" | "){return o.map(i=>typeof i=="string"?`'${i}'`:i).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(j||(j={}));var pt;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(pt||(pt={}));var y=j.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),H=t=>{switch(typeof t){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(t)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(t)?y.array:t===null?y.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?y.promise:typeof Map<"u"&&t instanceof Map?y.map:typeof Set<"u"&&t instanceof Set?y.set:typeof Date<"u"&&t instanceof Date?y.date:y.object;default:return y.unknown}};var f=j.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ln=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),L=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(s){return s.message},n={_errors:[]},o=s=>{for(let i of s.issues)if(i.code==="invalid_union")i.unionErrors.map(o);else if(i.code==="invalid_return_type")o(i.returnTypeError);else if(i.code==="invalid_arguments")o(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let a=n,u=0;for(;u<i.path.length;){let d=i.path[u];u===i.path.length-1?(a[d]=a[d]||{_errors:[]},a[d]._errors.push(r(i))):a[d]=a[d]||{_errors:[]},a=a[d],u++}}};return o(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,j.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let s=o.path[0];r[s]=r[s]||[],r[s].push(e(o))}else n.push(e(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};L.create=t=>new L(t);var mn=(t,e)=>{let r;switch(t.code){case f.invalid_type:t.received===y.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case f.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,j.jsonStringifyReplacer)}`;break;case f.unrecognized_keys:r=`Unrecognized key(s) in object: ${j.joinValues(t.keys,", ")}`;break;case f.invalid_union:r="Invalid input";break;case f.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${j.joinValues(t.options)}`;break;case f.invalid_enum_value:r=`Invalid enum value. Expected ${j.joinValues(t.options)}, received '${t.received}'`;break;case f.invalid_arguments:r="Invalid function arguments";break;case f.invalid_return_type:r="Invalid function return type";break;case f.invalid_date:r="Invalid date";break;case f.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:j.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case f.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case f.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case f.custom:r="Invalid input";break;case f.invalid_intersection_types:r="Intersection results could not be merged";break;case f.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case f.not_finite:r="Number must be finite";break;default:r=e.defaultError,j.assertNever(t)}return{message:r}},Q=mn;var Ft=Q;function fn(t){Ft=t}function je(){return Ft}var Ue=t=>{let{data:e,path:r,errorMaps:n,issueData:o}=t,s=[...r,...o.path||[]],i={...o,path:s};if(o.message!==void 0)return{...o,path:s,message:o.message};let a="",u=n.filter(d=>!!d).slice().reverse();for(let d of u)a=d(i,{data:e,defaultError:a}).message;return{...o,path:s,message:a}},pn=[];function g(t,e){let r=je(),n=Ue({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Q?void 0:Q].filter(o=>!!o)});t.common.issues.push(n)}var M=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let o of r){if(o.status==="aborted")return w;o.status==="dirty"&&e.dirty(),n.push(o.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let o of r){let s=await o.key,i=await o.value;n.push({key:s,value:i})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let o of r){let{key:s,value:i}=o;if(s.status==="aborted"||i.status==="aborted")return w;s.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof i.value<"u"||o.alwaysSet)&&(n[s.value]=i.value)}return{status:e.value,value:n}}},w=Object.freeze({status:"aborted"}),de=t=>({status:"dirty",value:t}),F=t=>({status:"valid",value:t}),Ke=t=>t.status==="aborted",Ye=t=>t.status==="dirty",se=t=>t.status==="valid",Te=t=>typeof Promise<"u"&&t instanceof Promise;var v;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(v||(v={}));var B=class{constructor(e,r,n,o){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Dt=(t,e)=>{if(se(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new L(t.common.issues);return this._error=r,this._error}}};function b(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:o}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(i,a)=>{let{message:u}=t;return i.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:u??r??a.defaultError}},description:o}}var E=class{get description(){return this._def.description}_getType(e){return H(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:H(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new M,ctx:{common:e.parent.common,data:e.data,parsedType:H(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Te(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:H(e)},o=this._parseSync({data:e,path:n.path,parent:n});return Dt(n,o)}"~validate"(e){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:H(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:r});return se(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>se(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:H(e)},o=this._parse({data:e,path:n.path,parent:n}),s=await(Te(o)?o:Promise.resolve(o));return Dt(n,s)}refine(e,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,s)=>{let i=e(o),a=()=>s.addIssue({code:f.custom,...n(o)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,r){return this._refinement((n,o)=>e(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(e){return new q({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return V.create(this,this._def)}nullable(){return Y.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return re.create(this)}promise(){return ce.create(this,this._def)}or(e){return he.create([this,e],this._def)}and(e){return ye.create(this,e,this._def)}transform(e){return new q({...b(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ke({...b(this._def),innerType:this,defaultValue:r,typeName:k.ZodDefault})}brand(){return new Fe({typeName:k.ZodBranded,type:this,...b(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new be({...b(this._def),innerType:this,catchValue:r,typeName:k.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return De.create(this,e)}readonly(){return Ee.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},gn=/^c[^\s-]{8,}$/i,hn=/^[0-9a-z]+$/,yn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,vn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_n=/^[a-z0-9_-]{21}$/i,xn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,wn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,kn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gt,En=/^(?:(?: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])$/,Sn=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,Cn=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,jn=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Tn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$n=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zt="((\\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])))",Rn=new RegExp(`^${zt}$`);function Zt(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function On(t){return new RegExp(`^${Zt(t)}$`)}function Wt(t){let e=`${zt}T${Zt(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function An(t,e){return!!((e==="v4"||!e)&&En.test(t)||(e==="v6"||!e)&&Cn.test(t))}function In(t,e){if(!xn.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function Pn(t,e){return!!((e==="v4"||!e)&&Sn.test(t)||(e==="v6"||!e)&&jn.test(t))}var ie=class t extends E{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_type,expected:y.string,received:s.parsedType}),w}let n=new M,o;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let i=e.data.length>s.value,a=e.data.length<s.value;(i||a)&&(o=this._getOrReturnCtx(e,o),i?g(o,{code:f.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):a&&g(o,{code:f.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")kn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"email",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")gt||(gt=new RegExp(bn,"u")),gt.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"emoji",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")vn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"uuid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")_n.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"nanoid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")gn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"cuid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")hn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"cuid2",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")yn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"ulid",code:f.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),g(o,{validation:"url",code:f.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"regex",code:f.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Wt(s).test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?Rn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?On(s).test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{code:f.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?wn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"duration",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?An(e.data,s.version)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"ip",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?In(e.data,s.alg)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"jwt",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?Pn(e.data,s.version)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"cidr",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Tn.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"base64",code:f.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?$n.test(e.data)||(o=this._getOrReturnCtx(e,o),g(o,{validation:"base64url",code:f.invalid_string,message:s.message}),n.dirty()):j.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(o=>e.test(o),{validation:r,code:f.invalid_string,...v.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...v.errToObj(e)})}url(e){return this._addCheck({kind:"url",...v.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...v.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...v.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...v.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...v.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...v.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...v.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...v.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...v.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...v.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...v.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...v.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...v.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...v.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...v.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...v.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...v.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...v.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...v.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...v.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...v.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...v.errToObj(r)})}nonempty(e){return this.min(1,v.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};ie.create=t=>new ie({checks:[],typeName:k.ZodString,coerce:t?.coerce??!1,...b(t)});function Nn(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,o=r>n?r:n,s=Number.parseInt(t.toFixed(o).replace(".","")),i=Number.parseInt(e.toFixed(o).replace(".",""));return s%i/10**o}var ue=class t extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_type,expected:y.number,received:s.parsedType}),w}let n,o=new M;for(let s of this._def.checks)s.kind==="int"?j.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:f.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?Nn(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),g(n,{code:f.not_finite,message:s.message}),o.dirty()):j.assertNever(s);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:v.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:v.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:v.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:v.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&j.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};ue.create=t=>new ue({checks:[],typeName:k.ZodNumber,coerce:t?.coerce||!1,...b(t)});var le=class t extends E{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let n,o=new M;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),g(n,{code:f.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):j.assertNever(s);return{status:o.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return g(r,{code:f.invalid_type,expected:y.bigint,received:r.parsedType}),w}gte(e,r){return this.setLimit("min",e,!0,v.toString(r))}gt(e,r){return this.setLimit("min",e,!1,v.toString(r))}lte(e,r){return this.setLimit("max",e,!0,v.toString(r))}lt(e,r){return this.setLimit("max",e,!1,v.toString(r))}setLimit(e,r,n,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:v.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:v.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:v.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:v.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:v.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:v.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};le.create=t=>new le({checks:[],typeName:k.ZodBigInt,coerce:t?.coerce??!1,...b(t)});var me=class extends E{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.boolean,received:n.parsedType}),w}return F(e.data)}};me.create=t=>new me({typeName:k.ZodBoolean,coerce:t?.coerce||!1,...b(t)});var fe=class t extends E{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_type,expected:y.date,received:s.parsedType}),w}if(Number.isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return g(s,{code:f.invalid_date}),w}let n=new M,o;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),g(o,{code:f.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):j.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:v.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:v.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};fe.create=t=>new fe({checks:[],coerce:t?.coerce||!1,typeName:k.ZodDate,...b(t)});var Re=class extends E{_parse(e){if(this._getType(e)!==y.symbol){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.symbol,received:n.parsedType}),w}return F(e.data)}};Re.create=t=>new Re({typeName:k.ZodSymbol,...b(t)});var pe=class extends E{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.undefined,received:n.parsedType}),w}return F(e.data)}};pe.create=t=>new pe({typeName:k.ZodUndefined,...b(t)});var ge=class extends E{_parse(e){if(this._getType(e)!==y.null){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.null,received:n.parsedType}),w}return F(e.data)}};ge.create=t=>new ge({typeName:k.ZodNull,...b(t)});var ae=class extends E{constructor(){super(...arguments),this._any=!0}_parse(e){return F(e.data)}};ae.create=t=>new ae({typeName:k.ZodAny,...b(t)});var te=class extends E{constructor(){super(...arguments),this._unknown=!0}_parse(e){return F(e.data)}};te.create=t=>new te({typeName:k.ZodUnknown,...b(t)});var G=class extends E{_parse(e){let r=this._getOrReturnCtx(e);return g(r,{code:f.invalid_type,expected:y.never,received:r.parsedType}),w}};G.create=t=>new G({typeName:k.ZodNever,...b(t)});var Oe=class extends E{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.void,received:n.parsedType}),w}return F(e.data)}};Oe.create=t=>new Oe({typeName:k.ZodVoid,...b(t)});var re=class t extends E{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),o=this._def;if(r.parsedType!==y.array)return g(r,{code:f.invalid_type,expected:y.array,received:r.parsedType}),w;if(o.exactLength!==null){let i=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(i||a)&&(g(r,{code:i?f.too_big:f.too_small,minimum:a?o.exactLength.value:void 0,maximum:i?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(g(r,{code:f.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(g(r,{code:f.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,a)=>o.type._parseAsync(new B(r,i,r.path,a)))).then(i=>M.mergeArray(n,i));let s=[...r.data].map((i,a)=>o.type._parseSync(new B(r,i,r.path,a)));return M.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:v.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:v.toString(r)}})}nonempty(e){return this.min(1,e)}};re.create=(t,e)=>new re({type:t,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...b(e)});function $e(t){if(t instanceof z){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=V.create($e(n))}return new z({...t._def,shape:()=>e})}else return t instanceof re?new re({...t._def,type:$e(t.element)}):t instanceof V?V.create($e(t.unwrap())):t instanceof Y?Y.create($e(t.unwrap())):t instanceof K?K.create(t.items.map(e=>$e(e))):t}var z=class t extends E{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=j.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==y.object){let d=this._getOrReturnCtx(e);return g(d,{code:f.invalid_type,expected:y.object,received:d.parsedType}),w}let{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof G&&this._def.unknownKeys==="strip"))for(let d in o.data)i.includes(d)||a.push(d);let u=[];for(let d of i){let c=s[d],l=o.data[d];u.push({key:{status:"valid",value:d},value:c._parse(new B(o,l,o.path,d)),alwaysSet:d in o.data})}if(this._def.catchall instanceof G){let d=this._def.unknownKeys;if(d==="passthrough")for(let c of a)u.push({key:{status:"valid",value:c},value:{status:"valid",value:o.data[c]}});else if(d==="strict")a.length>0&&(g(o,{code:f.unrecognized_keys,keys:a}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let c of a){let l=o.data[c];u.push({key:{status:"valid",value:c},value:d._parse(new B(o,l,o.path,c)),alwaysSet:c in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let d=[];for(let c of u){let l=await c.key,S=await c.value;d.push({key:l,value:S,alwaysSet:c.alwaysSet})}return d}).then(d=>M.mergeObjectSync(n,d)):M.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return v.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:v.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:k.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of j.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of j.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return $e(this)}partial(e){let r={};for(let n of j.objectKeys(this.shape)){let o=this.shape[n];e&&!e[n]?r[n]=o:r[n]=o.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of j.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof V;)s=s._def.innerType;r[n]=s}return new t({...this._def,shape:()=>r})}keyof(){return Vt(j.objectKeys(this.shape))}};z.create=(t,e)=>new z({shape:()=>t,unknownKeys:"strip",catchall:G.create(),typeName:k.ZodObject,...b(e)});z.strictCreate=(t,e)=>new z({shape:()=>t,unknownKeys:"strict",catchall:G.create(),typeName:k.ZodObject,...b(e)});z.lazycreate=(t,e)=>new z({shape:t,unknownKeys:"strip",catchall:G.create(),typeName:k.ZodObject,...b(e)});var he=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function o(s){for(let a of s)if(a.result.status==="valid")return a.result;for(let a of s)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let i=s.map(a=>new L(a.ctx.common.issues));return g(r,{code:f.invalid_union,unionErrors:i}),w}if(r.common.async)return Promise.all(n.map(async s=>{let i={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(o);{let s,i=[];for(let u of n){let d={...r,common:{...r.common,issues:[]},parent:null},c=u._parseSync({data:r.data,path:r.path,parent:d});if(c.status==="valid")return c;c.status==="dirty"&&!s&&(s={result:c,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(u=>new L(u));return g(r,{code:f.invalid_union,unionErrors:a}),w}}get options(){return this._def.options}};he.create=(t,e)=>new he({options:t,typeName:k.ZodUnion,...b(e)});var ee=t=>t instanceof ve?ee(t.schema):t instanceof q?ee(t.innerType()):t instanceof _e?[t.value]:t instanceof xe?t.options:t instanceof we?j.objectValues(t.enum):t instanceof ke?ee(t._def.innerType):t instanceof pe?[void 0]:t instanceof ge?[null]:t instanceof V?[void 0,...ee(t.unwrap())]:t instanceof Y?[null,...ee(t.unwrap())]:t instanceof Fe||t instanceof Ee?ee(t.unwrap()):t instanceof be?ee(t._def.innerType):[],Xe=class t extends E{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.object)return g(r,{code:f.invalid_type,expected:y.object,received:r.parsedType}),w;let n=this.discriminator,o=r.data[n],s=this.optionsMap.get(o);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(g(r,{code:f.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),w)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let o=new Map;for(let s of r){let i=ee(s.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of i){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,s)}}return new t({typeName:k.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:o,...b(n)})}};function ht(t,e){let r=H(t),n=H(e);if(t===e)return{valid:!0,data:t};if(r===y.object&&n===y.object){let o=j.objectKeys(e),s=j.objectKeys(t).filter(a=>o.indexOf(a)!==-1),i={...t,...e};for(let a of s){let u=ht(t[a],e[a]);if(!u.valid)return{valid:!1};i[a]=u.data}return{valid:!0,data:i}}else if(r===y.array&&n===y.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let s=0;s<t.length;s++){let i=t[s],a=e[s],u=ht(i,a);if(!u.valid)return{valid:!1};o.push(u.data)}return{valid:!0,data:o}}else return r===y.date&&n===y.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var ye=class extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=(s,i)=>{if(Ke(s)||Ke(i))return w;let a=ht(s.value,i.value);return a.valid?((Ye(s)||Ye(i))&&r.dirty(),{status:r.value,value:a.data}):(g(n,{code:f.invalid_intersection_types}),w)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,i])=>o(s,i)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};ye.create=(t,e,r)=>new ye({left:t,right:e,typeName:k.ZodIntersection,...b(r)});var K=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.array)return g(n,{code:f.invalid_type,expected:y.array,received:n.parsedType}),w;if(n.data.length<this._def.items.length)return g(n,{code:f.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),w;!this._def.rest&&n.data.length>this._def.items.length&&(g(n,{code:f.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((i,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new B(n,i,n.path,a)):null}).filter(i=>!!i);return n.common.async?Promise.all(s).then(i=>M.mergeArray(r,i)):M.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};K.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new K({items:t,typeName:k.ZodTuple,rest:null,...b(e)})};var Qe=class t extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.object)return g(n,{code:f.invalid_type,expected:y.object,received:n.parsedType}),w;let o=[],s=this._def.keyType,i=this._def.valueType;for(let a in n.data)o.push({key:s._parse(new B(n,a,n.path,a)),value:i._parse(new B(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?M.mergeObjectAsync(r,o):M.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof E?new t({keyType:e,valueType:r,typeName:k.ZodRecord,...b(n)}):new t({keyType:ie.create(),valueType:e,typeName:k.ZodRecord,...b(r)})}},Ae=class extends E{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.map)return g(n,{code:f.invalid_type,expected:y.map,received:n.parsedType}),w;let o=this._def.keyType,s=this._def.valueType,i=[...n.data.entries()].map(([a,u],d)=>({key:o._parse(new B(n,a,n.path,[d,"key"])),value:s._parse(new B(n,u,n.path,[d,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of i){let d=await u.key,c=await u.value;if(d.status==="aborted"||c.status==="aborted")return w;(d.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(d.value,c.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let u of i){let d=u.key,c=u.value;if(d.status==="aborted"||c.status==="aborted")return w;(d.status==="dirty"||c.status==="dirty")&&r.dirty(),a.set(d.value,c.value)}return{status:r.value,value:a}}}};Ae.create=(t,e,r)=>new Ae({valueType:e,keyType:t,typeName:k.ZodMap,...b(r)});var Ie=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.set)return g(n,{code:f.invalid_type,expected:y.set,received:n.parsedType}),w;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(g(n,{code:f.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(g(n,{code:f.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let s=this._def.valueType;function i(u){let d=new Set;for(let c of u){if(c.status==="aborted")return w;c.status==="dirty"&&r.dirty(),d.add(c.value)}return{status:r.value,value:d}}let a=[...n.data.values()].map((u,d)=>s._parse(new B(n,u,n.path,d)));return n.common.async?Promise.all(a).then(u=>i(u)):i(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:v.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:v.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ie.create=(t,e)=>new Ie({valueType:t,minSize:null,maxSize:null,typeName:k.ZodSet,...b(e)});var et=class t extends E{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.function)return g(r,{code:f.invalid_type,expected:y.function,received:r.parsedType}),w;function n(a,u){return Ue({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,je(),Q].filter(d=>!!d),issueData:{code:f.invalid_arguments,argumentsError:u}})}function o(a,u){return Ue({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,je(),Q].filter(d=>!!d),issueData:{code:f.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof ce){let a=this;return F(async function(...u){let d=new L([]),c=await a._def.args.parseAsync(u,s).catch(I=>{throw d.addIssue(n(u,I)),d}),l=await Reflect.apply(i,this,c);return await a._def.returns._def.type.parseAsync(l,s).catch(I=>{throw d.addIssue(o(l,I)),d})})}else{let a=this;return F(function(...u){let d=a._def.args.safeParse(u,s);if(!d.success)throw new L([n(u,d.error)]);let c=Reflect.apply(i,this,d.data),l=a._def.returns.safeParse(c,s);if(!l.success)throw new L([o(c,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:K.create(e).rest(te.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||K.create([]).rest(te.create()),returns:r||te.create(),typeName:k.ZodFunction,...b(n)})}},ve=class extends E{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ve.create=(t,e)=>new ve({getter:t,typeName:k.ZodLazy,...b(e)});var _e=class extends E{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return g(r,{received:r.data,code:f.invalid_literal,expected:this._def.value}),w}return{status:"valid",value:e.data}}get value(){return this._def.value}};_e.create=(t,e)=>new _e({value:t,typeName:k.ZodLiteral,...b(e)});function Vt(t,e){return new xe({values:t,typeName:k.ZodEnum,...b(e)})}var xe=class t extends E{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{expected:j.joinValues(n),received:r.parsedType,code:f.invalid_type}),w}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return g(r,{received:r.data,code:f.invalid_enum_value,options:n}),w}return F(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};xe.create=Vt;var we=class extends E{_parse(e){let r=j.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==y.string&&n.parsedType!==y.number){let o=j.objectValues(r);return g(n,{expected:j.joinValues(o),received:n.parsedType,code:f.invalid_type}),w}if(this._cache||(this._cache=new Set(j.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=j.objectValues(r);return g(n,{received:n.data,code:f.invalid_enum_value,options:o}),w}return F(e.data)}get enum(){return this._def.values}};we.create=(t,e)=>new we({values:t,typeName:k.ZodNativeEnum,...b(e)});var ce=class extends E{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.promise&&r.common.async===!1)return g(r,{code:f.invalid_type,expected:y.promise,received:r.parsedType}),w;let n=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return F(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ce.create=(t,e)=>new ce({type:t,typeName:k.ZodPromise,...b(e)});var q=class extends E{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),o=this._def.effect||null,s={addIssue:i=>{g(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){let i=o.transform(n.data,s);if(n.common.async)return Promise.resolve(i).then(async a=>{if(r.value==="aborted")return w;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?w:u.status==="dirty"?de(u.value):r.value==="dirty"?de(u.value):u});{if(r.value==="aborted")return w;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?w:a.status==="dirty"?de(a.value):r.value==="dirty"?de(a.value):a}}if(o.type==="refinement"){let i=a=>{let u=o.refinement(a,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?w:(a.status==="dirty"&&r.dirty(),i(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?w:(a.status==="dirty"&&r.dirty(),i(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!se(i))return w;let a=o.transform(i.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>se(i)?Promise.resolve(o.transform(i.value,s)).then(a=>({status:r.value,value:a})):w);j.assertNever(o)}};q.create=(t,e,r)=>new q({schema:t,typeName:k.ZodEffects,effect:e,...b(r)});q.createWithPreprocess=(t,e,r)=>new q({schema:e,effect:{type:"preprocess",transform:t},typeName:k.ZodEffects,...b(r)});var V=class extends E{_parse(e){return this._getType(e)===y.undefined?F(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};V.create=(t,e)=>new V({innerType:t,typeName:k.ZodOptional,...b(e)});var Y=class extends E{_parse(e){return this._getType(e)===y.null?F(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Y.create=(t,e)=>new Y({innerType:t,typeName:k.ZodNullable,...b(e)});var ke=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};ke.create=(t,e)=>new ke({innerType:t,typeName:k.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...b(e)});var be=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Te(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new L(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};be.create=(t,e)=>new be({innerType:t,typeName:k.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...b(e)});var Pe=class extends E{_parse(e){if(this._getType(e)!==y.nan){let n=this._getOrReturnCtx(e);return g(n,{code:f.invalid_type,expected:y.nan,received:n.parsedType}),w}return{status:"valid",value:e.data}}};Pe.create=t=>new Pe({typeName:k.ZodNaN,...b(t)});var Mn=Symbol("zod_brand"),Fe=class extends E{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},De=class t extends E{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?w:s.status==="dirty"?(r.dirty(),de(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?w:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:k.ZodPipeline})}},Ee=class extends E{_parse(e){let r=this._def.innerType._parse(e),n=o=>(se(o)&&(o.value=Object.freeze(o.value)),o);return Te(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};Ee.create=(t,e)=>new Ee({innerType:t,typeName:k.ZodReadonly,...b(e)});function Lt(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Bt(t,e={},r){return t?ae.create().superRefine((n,o)=>{let s=t(n);if(s instanceof Promise)return s.then(i=>{if(!i){let a=Lt(e,n),u=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:u})}});if(!s){let i=Lt(e,n),a=i.fatal??r??!0;o.addIssue({code:"custom",...i,fatal:a})}}):ae.create()}var Un={object:z.lazycreate},k;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(k||(k={}));var Fn=(t,e={message:`Input not instance of ${t.name}`})=>Bt(r=>r instanceof t,e),qt=ie.create,Jt=ue.create,Dn=Pe.create,Ln=le.create,Gt=me.create,zn=fe.create,Zn=Re.create,Wn=pe.create,Vn=ge.create,Bn=ae.create,qn=te.create,Jn=G.create,Gn=Oe.create,Hn=re.create,Kn=z.create,Yn=z.strictCreate,Xn=he.create,Qn=Xe.create,eo=ye.create,to=K.create,ro=Qe.create,no=Ae.create,oo=Ie.create,so=et.create,io=ve.create,ao=_e.create,co=xe.create,uo=we.create,lo=ce.create,mo=q.create,fo=V.create,po=Y.create,go=q.createWithPreprocess,ho=De.create,yo=()=>qt().optional(),vo=()=>Jt().optional(),_o=()=>Gt().optional(),xo={string:(t=>ie.create({...t,coerce:!0})),number:(t=>ue.create({...t,coerce:!0})),boolean:(t=>me.create({...t,coerce:!0})),bigint:(t=>le.create({...t,coerce:!0})),date:(t=>fe.create({...t,coerce:!0}))};var wo=w;var jo="cueframe/components";var To="cueframe.json",$o=Le.object({componentsDir:Le.string().min(1).default(jo)}).passthrough();function ze(t){let e=t,r=Co(e).root;for(;;){let n=Ne(e,To);if(tt(n)){let o=ko(n,"utf8"),s=$o.parse(JSON.parse(o));return{root:e,manifest:s}}if(e===r)return null;e=So(e)}}function Ht(t){return Ne(t.root,t.manifest.componentsDir)}function rt(t,e){return Ne(Ht(t),e)}function Kt(t){let e=Ht(t);return tt(e)?bo(e).filter(r=>{let n=Ne(e,r);return Eo(n).isDirectory()?tt(Ne(n,"index.tsx"))&&tt(Ne(n,"config.ts")):!1}).sort():[]}var Po="cueframe.json";function No(t){return t.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}function Mo(t){return t.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")}function yt(t,e){x(t,"new_component",new Error(e),p.UserError),m(p.UserError)}function Uo(t,e){return`import React from 'react';
16
-
17
- /** Custom CueFrame component. Mounted as ({ durationInFrames, params }). Edit me. */
18
- export default function ${e}({ params }: { durationInFrames: number; params: Record<string, unknown> }) {
19
- return <div style={{ width: '100%', height: '100%', display: 'grid', placeItems: 'center' }}>{String((params as { text?: unknown }).text ?? '${t}')}</div>;
20
+ ${Mn}
21
+ `)}return!0}return e||xa(t,`# CueFrame derived render cache (regenerated; never authored)
22
+ ${Mn}
23
+ `),!0}function Fh(r){let e=process.cwd(),t=r.dryRun??!1;B(r,"init_prepare",{cwd:e,dryRun:t});let n=ya(e,Lh),o=ga(n),i=qz;if(o)try{let m=JSON.parse(jh(n,"utf8"));typeof m.componentsDir=="string"&&m.componentsDir.length>0&&(i=m.componentsDir)}catch{}else t||xa(n,`${JSON.stringify({componentsDir:i},null,2)}
24
+ `);let s=ya(e,i),c=ga(s);!c&&!t&&Bz(s,{recursive:!0});let u=Wz(e,t);pe(r,{ok:!0,dryRun:t,root:e,manifest:{path:n,created:!o},componentsDir:i,componentsDirCreated:!c,gitignoreUpdated:u},()=>{console.log(`\u2713 ${t?"Would initialize":"Initialized"} CueFrame workspace at ${e}`),console.log(` ${o?"kept":"created"} ${Lh} (componentsDir: ${i})`),console.log(` ${c?"exists":"created"} ${i}/`),u&&console.log(` gitignored ${Mn}`),console.log("Next: cueframe eject <primitive> or cueframe new component <name>")})}import{existsSync as Ine,mkdirSync as kne,readFileSync as $ne,readdirSync as Tne,writeFileSync as lb}from"fs";import{join as ub}from"path";import{existsSync as Ms,readFileSync as zk,readdirSync as vk,statSync as wk}from"fs";import{dirname as Ik,join as Yo,parse as kk}from"path";var l={};It(l,{$brand:()=>Da,$input:()=>rd,$output:()=>od,NEVER:()=>Ea,TimePrecision:()=>md,ZodAny:()=>Hl,ZodArray:()=>eu,ZodBase64:()=>ws,ZodBase64URL:()=>Is,ZodBigInt:()=>Jo,ZodBigIntFormat:()=>Ts,ZodBoolean:()=>Ko,ZodCIDRv4:()=>zs,ZodCIDRv6:()=>vs,ZodCUID:()=>hs,ZodCUID2:()=>fs,ZodCatch:()=>bu,ZodCodec:()=>on,ZodCompileAsyncError:()=>pt,ZodCompileUnsupportedError:()=>de,ZodCreditCard:()=>Zl,ZodCustom:()=>rn,ZodCustomStringFormat:()=>Zo,ZodDate:()=>Xr,ZodDefault:()=>mu,ZodDiscriminatedUnion:()=>ou,ZodE164:()=>ks,ZodEmail:()=>ds,ZodEmoji:()=>us,ZodEnum:()=>qo,ZodError:()=>YI,ZodExactOptional:()=>Os,ZodFile:()=>pu,ZodFirstPartyTypeKind:()=>Ru,ZodFunction:()=>Pu,ZodGUID:()=>ls,ZodIPv4:()=>bs,ZodIPv6:()=>Ss,ZodISODate:()=>Ut,ZodISODateTime:()=>Vt,ZodISODuration:()=>qt,ZodISOTime:()=>Bt,ZodIntersection:()=>ru,ZodIssueCode:()=>tk,ZodJWT:()=>$s,ZodKSUID:()=>ys,ZodLazy:()=>$u,ZodLiteral:()=>cu,ZodMAC:()=>Wl,ZodMap:()=>su,ZodNaN:()=>zu,ZodNanoID:()=>ms,ZodNever:()=>Yl,ZodNonOptional:()=>Rs,ZodNull:()=>Jl,ZodNullable:()=>uu,ZodNumber:()=>Go,ZodNumberFormat:()=>po,ZodObject:()=>Yr,ZodOptional:()=>en,ZodPipe:()=>tn,ZodPrefault:()=>fu,ZodPreprocess:()=>vu,ZodPromise:()=>Tu,ZodReadonly:()=>wu,ZodRealError:()=>Xe,ZodRecord:()=>Bo,ZodSet:()=>au,ZodString:()=>Wo,ZodStringFormat:()=>xe,ZodSuccess:()=>yu,ZodSymbol:()=>Gl,ZodTemplateLiteral:()=>ku,ZodTransform:()=>du,ZodTuple:()=>iu,ZodType:()=>oe,ZodULID:()=>gs,ZodURL:()=>Hr,ZodUUID:()=>yt,ZodUndefined:()=>Kl,ZodUnion:()=>Qr,ZodUnknown:()=>Xl,ZodVoid:()=>Ql,ZodXID:()=>xs,ZodXor:()=>tu,_ZodString:()=>ps,_default:()=>hu,_function:()=>Kx,any:()=>Ox,array:()=>b,base64:()=>ux,base64url:()=>mx,bigint:()=>kx,boolean:()=>R,catch:()=>Su,check:()=>Jx,cidrv4:()=>dx,cidrv6:()=>lx,clone:()=>he,codec:()=>qx,coerce:()=>Mu,compile:()=>ad,config:()=>Pe,core:()=>$t,creditCard:()=>fx,cuid:()=>ox,cuid2:()=>rx,custom:()=>Hx,date:()=>Rx,decode:()=>jl,decodeAsync:()=>Nl,deepPartial:()=>cy,describe:()=>Xx,discriminatedUnion:()=>Dx,e164:()=>hx,email:()=>Gg,emoji:()=>ex,encode:()=>Ll,encodeAsync:()=>Fl,endsWith:()=>Do,enum:()=>f,exactOptional:()=>lu,file:()=>Nx,flattenError:()=>Pr,float32:()=>zx,float64:()=>vx,formatError:()=>Cr,fromJSONSchema:()=>sy,function:()=>Kx,getDiscriminatedOption:()=>Pp,getErrorMap:()=>rk,globalRegistry:()=>_e,gt:()=>gt,gte:()=>tt,guid:()=>Kg,hash:()=>Sx,hex:()=>bx,hostname:()=>yx,httpUrl:()=>Qg,includes:()=>Mo,input:()=>dy,instanceof:()=>Qx,int:()=>z,int32:()=>wx,int64:()=>$x,intersection:()=>nu,invertCodec:()=>Wx,ipv4:()=>ax,ipv6:()=>px,iso:()=>nn,json:()=>ty,jwt:()=>gx,keyof:()=>Mx,ksuid:()=>sx,lazy:()=>Ho,length:()=>so,literal:()=>x,locales:()=>Vr,looseObject:()=>Wt,looseRecord:()=>_x,lowercase:()=>Oo,lt:()=>ft,lte:()=>et,mac:()=>cx,map:()=>Lx,maxLength:()=>io,maxSize:()=>Lt,memoizer:()=>Fr,meta:()=>Yx,mime:()=>Ao,minLength:()=>kt,minSize:()=>xt,multipleOf:()=>_t,nan:()=>Bx,nanoid:()=>tx,nativeEnum:()=>Fx,negative:()=>Hi,never:()=>Ps,nonnegative:()=>Yi,nonoptional:()=>xu,nonpositive:()=>Xi,normalize:()=>_o,null:()=>J,nullable:()=>Jr,nullish:()=>Vx,number:()=>p,object:()=>A,optional:()=>ao,output:()=>ly,overwrite:()=>dt,parse:()=>El,parseAsync:()=>Dl,partialRecord:()=>Ax,pipe:()=>cs,positive:()=>Ji,prefault:()=>gu,preprocess:()=>oy,prettifyError:()=>Fa,promise:()=>Gx,properties:()=>es,property:()=>Qi,readonly:()=>Iu,record:()=>k,refine:()=>Cu,regex:()=>Co,regexes:()=>Ne,registry:()=>$i,safeDecode:()=>Ul,safeDecodeAsync:()=>ql,safeEncode:()=>Vl,safeEncodeAsync:()=>Bl,safeParse:()=>Al,safeParseAsync:()=>_l,set:()=>jx,setErrorMap:()=>ok,size:()=>no,slugify:()=>No,startsWith:()=>Eo,strictObject:()=>d,string:()=>a,stringFormat:()=>xx,stringbool:()=>ey,success:()=>Ux,superRefine:()=>Ou,symbol:()=>Px,templateLiteral:()=>Zx,toJSONSchema:()=>ns,toLowerCase:()=>jo,toUpperCase:()=>Fo,toZod:()=>br,transform:()=>Cs,treeifyError:()=>ja,trim:()=>Lo,tuple:()=>U,uint32:()=>Ix,uint64:()=>Tx,ulid:()=>nx,undefined:()=>Cx,union:()=>v,unknown:()=>O,uppercase:()=>Ro,url:()=>ke,util:()=>_,uuid:()=>Jg,uuidv4:()=>Hg,uuidv6:()=>Xg,uuidv7:()=>Yg,validate:()=>Ua,validateAsync:()=>Ba,void:()=>Le,xid:()=>ix,xor:()=>Ex});var $t={};It($t,{$ZodAny:()=>Sp,$ZodArray:()=>kp,$ZodAsyncError:()=>Je,$ZodBase64:()=>pp,$ZodBase64URL:()=>dp,$ZodBigInt:()=>hi,$ZodBigIntFormat:()=>gp,$ZodBoolean:()=>Ar,$ZodCIDRv4:()=>ap,$ZodCIDRv6:()=>cp,$ZodCUID:()=>Jc,$ZodCUID2:()=>Hc,$ZodCatch:()=>qp,$ZodCheck:()=>be,$ZodCheckBigIntFormat:()=>Ic,$ZodCheckEndsWith:()=>_c,$ZodCheckGreaterThan:()=>Yn,$ZodCheckIncludes:()=>Dc,$ZodCheckLengthEquals:()=>Oc,$ZodCheckLessThan:()=>Xn,$ZodCheckLowerCase:()=>Mc,$ZodCheckMaxLength:()=>Pc,$ZodCheckMaxSize:()=>kc,$ZodCheckMimeType:()=>Lc,$ZodCheckMinLength:()=>Cc,$ZodCheckMinSize:()=>$c,$ZodCheckMultipleOf:()=>vc,$ZodCheckNumberFormat:()=>wc,$ZodCheckOverwrite:()=>jc,$ZodCheckProperty:()=>Qn,$ZodCheckRegex:()=>Rc,$ZodCheckSizeEquals:()=>Tc,$ZodCheckStartsWith:()=>Ac,$ZodCheckStringFormat:()=>$o,$ZodCheckUpperCase:()=>Ec,$ZodCodec:()=>Lr,$ZodCreditCard:()=>up,$ZodCustom:()=>Xp,$ZodCustomStringFormat:()=>hp,$ZodCyclicError:()=>Si,$ZodDate:()=>Ip,$ZodDefault:()=>Np,$ZodDiscriminatedUnion:()=>Cp,$ZodE164:()=>lp,$ZodEmail:()=>Bc,$ZodEmoji:()=>Gc,$ZodEncodeError:()=>Dt,$ZodEnum:()=>Dp,$ZodError:()=>Tr,$ZodExactOptional:()=>jp,$ZodFile:()=>_p,$ZodFunction:()=>Jp,$ZodGUID:()=>Vc,$ZodIPv4:()=>np,$ZodIPv6:()=>ip,$ZodISODate:()=>tp,$ZodISODateTime:()=>ep,$ZodISODuration:()=>rp,$ZodISOTime:()=>op,$ZodIntersection:()=>Op,$ZodJWT:()=>mp,$ZodKSUID:()=>Qc,$ZodLazy:()=>jr,$ZodLiteral:()=>Ap,$ZodMAC:()=>sp,$ZodMap:()=>Mp,$ZodNaN:()=>Wp,$ZodNanoID:()=>Kc,$ZodNever:()=>vp,$ZodNonOptional:()=>Up,$ZodNull:()=>bp,$ZodNullable:()=>Fp,$ZodNumber:()=>mi,$ZodNumberFormat:()=>fp,$ZodObject:()=>xf,$ZodObjectJIT:()=>$p,$ZodOptional:()=>gi,$ZodPipe:()=>xi,$ZodPrefault:()=>Vp,$ZodPreprocess:()=>Zp,$ZodPromise:()=>Hp,$ZodReadonly:()=>Gp,$ZodRealError:()=>He,$ZodRecord:()=>Rp,$ZodRegistry:()=>ki,$ZodSet:()=>Ep,$ZodString:()=>Qt,$ZodStringFormat:()=>ge,$ZodSuccess:()=>Bp,$ZodSymbol:()=>xp,$ZodTemplateLiteral:()=>Kp,$ZodTransform:()=>Lp,$ZodTuple:()=>fi,$ZodType:()=>te,$ZodULID:()=>Xc,$ZodURL:()=>Zc,$ZodUUID:()=>Uc,$ZodUndefined:()=>yp,$ZodUnion:()=>_r,$ZodUnknown:()=>zp,$ZodVoid:()=>wp,$ZodXID:()=>Yc,$ZodXor:()=>Tp,$brand:()=>Da,$constructor:()=>P,$input:()=>rd,$output:()=>od,Doc:()=>Yt,INVALID:()=>Qe,JSONSchema:()=>qg,JSONSchemaGenerator:()=>is,NEVER:()=>Ea,TimePrecision:()=>md,URL_BAD_FORMAT:()=>qc,URL_UNPARSEABLE:()=>Wc,ZodCompileAsyncError:()=>pt,ZodCompileUnsupportedError:()=>de,_any:()=>Od,_array:()=>Ld,_base64:()=>Wi,_base64url:()=>Zi,_bigint:()=>wd,_boolean:()=>zd,_catch:()=>UI,_check:()=>Lg,_cidrv4:()=>Bi,_cidrv6:()=>qi,_coercedBigint:()=>Id,_coercedBoolean:()=>vd,_coercedDate:()=>Ad,_coercedNumber:()=>fd,_coercedString:()=>dd,_creditCard:()=>ud,_cuid:()=>_i,_cuid2:()=>Li,_custom:()=>Fd,_date:()=>Dd,_decode:()=>Vn,_decodeAsync:()=>Bn,_default:()=>FI,_discriminatedUnion:()=>TI,_e164:()=>Gi,_email:()=>Pi,_emoji:()=>Di,_encode:()=>Nn,_encodeAsync:()=>Un,_endsWith:()=>Do,_enum:()=>EI,_file:()=>jd,_float32:()=>xd,_float64:()=>yd,_gt:()=>gt,_gte:()=>tt,_guid:()=>Ci,_includes:()=>Mo,_int:()=>gd,_int32:()=>bd,_int64:()=>kd,_intersection:()=>PI,_ipv4:()=>Vi,_ipv6:()=>Ui,_isoDate:()=>qr,_isoDateTime:()=>Br,_isoDuration:()=>Zr,_isoTime:()=>Wr,_jwt:()=>Ki,_ksuid:()=>Ni,_lazy:()=>ZI,_length:()=>so,_literal:()=>AI,_lowercase:()=>Oo,_lt:()=>ft,_lte:()=>et,_mac:()=>ld,_map:()=>RI,_max:()=>et,_maxLength:()=>io,_maxSize:()=>Lt,_mime:()=>Ao,_min:()=>tt,_minLength:()=>kt,_minSize:()=>xt,_multipleOf:()=>_t,_nan:()=>_d,_nanoid:()=>Ai,_nativeEnum:()=>DI,_negative:()=>Hi,_never:()=>Md,_nonnegative:()=>Yi,_nonoptional:()=>NI,_nonpositive:()=>Xi,_normalize:()=>_o,_null:()=>Cd,_nullable:()=>jI,_number:()=>hd,_optional:()=>LI,_overwrite:()=>dt,_parse:()=>vo,_parseAsync:()=>wo,_pipe:()=>BI,_positive:()=>Ji,_promise:()=>GI,_properties:()=>es,_property:()=>Qi,_readonly:()=>qI,_record:()=>OI,_refine:()=>Nd,_regex:()=>Co,_safeDecode:()=>Wn,_safeDecodeAsync:()=>Gn,_safeEncode:()=>qn,_safeEncodeAsync:()=>Zn,_safeParse:()=>Io,_safeParseAsync:()=>ko,_set:()=>MI,_size:()=>no,_slugify:()=>No,_startsWith:()=>Eo,_string:()=>pd,_stringFormat:()=>Vo,_stringbool:()=>qd,_success:()=>VI,_superRefine:()=>Vd,_symbol:()=>Td,_templateLiteral:()=>WI,_toLowerCase:()=>jo,_toUpperCase:()=>Fo,_transform:()=>_I,_trim:()=>Lo,_tuple:()=>CI,_uint32:()=>Sd,_uint64:()=>$d,_ulid:()=>ji,_undefined:()=>Pd,_union:()=>kI,_unknown:()=>Rd,_uppercase:()=>Ro,_url:()=>Ur,_uuid:()=>Oi,_uuidv4:()=>Ri,_uuidv6:()=>Mi,_uuidv7:()=>Ei,_void:()=>Ed,_xid:()=>Fi,_xor:()=>$I,clone:()=>he,compile:()=>ad,compileFn:()=>Ti,config:()=>Pe,createStandardJSONSchemaMethod:()=>Uo,createToJSONSchemaMethod:()=>Zd,decode:()=>Mv,decodeAsync:()=>Dv,describe:()=>Ud,encode:()=>Rv,encodeAsync:()=>Ev,extractDefs:()=>Ft,finalize:()=>Nt,flattenError:()=>Pr,formatError:()=>Cr,getDiscriminatedOption:()=>Pp,globalConfig:()=>Ae,globalRegistry:()=>_e,handleUnrepresentable:()=>Ee,initializeContext:()=>jt,isBackEdge:()=>zi,isRecursiveSchema:()=>td,isValidBase64:()=>Dr,isValidBase64URL:()=>di,isValidCIDRv6:()=>pi,isValidCreditCard:()=>li,isValidIPv6:()=>Er,isValidJWT:()=>ui,locales:()=>Vr,memoizer:()=>Fr,mergeValues:()=>To,meta:()=>Bd,parse:()=>jn,parseAsync:()=>Fn,parseURLObject:()=>ii,prettifyError:()=>Fa,process:()=>fe,regexes:()=>Ne,registry:()=>$i,safeDecode:()=>_v,safeDecodeAsync:()=>jv,safeEncode:()=>Av,safeEncodeAsync:()=>Lv,safeParse:()=>Na,safeParseAsync:()=>Va,standardProps:()=>ni,stripTabAndNewline:()=>si,toDotPath:()=>Gh,toJSONSchema:()=>ns,toZod:()=>br,treeifyError:()=>ja,urlHostnameOk:()=>ai,urlProtocolOk:()=>ci,util:()=>_,validate:()=>Ua,validateAsync:()=>Ba,version:()=>Fc});var _={};It(_,{BIGINT_FORMAT_RANGES:()=>Ta,CONSTANT_CATCH:()=>_n,Class:()=>Sa,NUMBER_FORMAT_RANGES:()=>$a,aborted:()=>Et,allowsEval:()=>wa,assert:()=>Hz,assertEqual:()=>Zz,assertIs:()=>Kz,assertNever:()=>Jz,assertNotEqual:()=>Gz,assignProp:()=>Te,attachSchema:()=>An,base64ToUint8Array:()=>Vh,base64urlToUint8Array:()=>hv,cached:()=>So,captureStackTrace:()=>Dn,cleanEnum:()=>mv,cleanRegex:()=>zr,clone:()=>he,cloneDef:()=>Yz,codePointLength:()=>Ht,constantCatch:()=>Ra,createTransparentProxy:()=>nv,defineLazy:()=>za,defineLazyInternal:()=>ie,esc:()=>Ze,escapeRegex:()=>it,explicitlyAborted:()=>Pa,extend:()=>av,finalizeIssue:()=>Ke,floatSafeRemainder:()=>vr,getElementAtPath:()=>Qz,getEnumValues:()=>Sr,getLengthableOrigin:()=>$r,getParsedType:()=>rv,getSizableOrigin:()=>kr,hexToUint8Array:()=>gv,hide:()=>Oa,installLazyProp:()=>zv,isObject:()=>Jt,isPlainObject:()=>nt,issue:()=>zo,joinValues:()=>C,jsonStringifyReplacer:()=>bo,members:()=>Ca,merge:()=>pv,mergeDefs:()=>ct,normalizeParams:()=>N,nullish:()=>En,numKeys:()=>ov,objectClone:()=>Xz,omit:()=>sv,optionalKeys:()=>ka,own:()=>yo,parsedType:()=>D,partial:()=>dv,pick:()=>iv,prefixIssues:()=>Ge,primitiveTypes:()=>Ia,promiseAllObject:()=>ev,propertyKeyTypes:()=>Ir,randomString:()=>tv,required:()=>lv,safeExtend:()=>cv,shallowClone:()=>wr,slugify:()=>va,stringifyPrimitive:()=>E,toZod:()=>br,uint8ArrayToBase64:()=>Uh,uint8ArrayToBase64url:()=>fv,uint8ArrayToHex:()=>xv,unwrapMessage:()=>xo});function Zz(r){return r}function Gz(r){return r}function br(){return r=>r}function Kz(r){}function Jz(r){throw new Error("Unexpected value in exhaustive check")}function Hz(r){}function Sr(r){let e=Object.values(r).filter(n=>typeof n=="number");return Object.entries(r).filter(([n,o])=>e.indexOf(+n)===-1).map(([n,o])=>o)}function C(r,e="|"){return r.map(t=>E(t)).join(e)}function bo(r,e){return typeof e=="bigint"?e.toString():e}function So(r){return{get value(){{let t=r();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function En(r){return r==null}function zr(r){let e=r.startsWith("^")?1:0,t=r.endsWith("$")?r.length-1:r.length;return r.slice(e,t)}function vr(r,e){let t=r/e,n=Math.round(t),o=4*Number.EPSILON*Math.max(Math.abs(t),1);return Math.abs(t-n)<o?0:t-n}var Nh=Symbol("evaluating");function za(r,e,t){let n;Object.defineProperty(r,e,{get(){if(n!==Nh)return n===void 0&&(n=Nh,n=t()),n},set(o){Object.defineProperty(r,e,{value:o})},configurable:!0})}function Xz(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function Te(r,e,t){Object.defineProperty(r,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}function ct(...r){let e={};for(let t of r){let n=Object.getOwnPropertyDescriptors(t);Object.assign(e,n)}return Object.defineProperties({},e)}function Yz(r){return ct(r._zod.def)}function Qz(r,e){return e?e.reduce((t,n)=>t?.[n],r):r}function ev(r){let e=Object.keys(r),t=e.map(n=>r[n]);return Promise.all(t).then(n=>{let o={};for(let i=0;i<e.length;i++)o[e[i]]=n[i];return o})}function tv(r=10){let e="abcdefghijklmnopqrstuvwxyz",t="";for(let n=0;n<r;n++)t+=e[Math.floor(Math.random()*e.length)];return t}function Ze(r){return JSON.stringify(r)}function va(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function Jt(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var wa=So(()=>{if(Ae.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let r=Function;return new r(""),!0}catch{return!1}});function nt(r){if(Jt(r)===!1)return!1;let e=r.constructor;if(e===void 0||typeof e!="function")return!0;let t=e.prototype;return!(Jt(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function wr(r){return nt(r)?{...r}:Array.isArray(r)?[...r]:r instanceof Map?new Map(r):r instanceof Set?new Set(r):r}function ov(r){let e=0;for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&e++;return e}var rv=r=>{let e=typeof r;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(r)?"array":r===null?"null":r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?"promise":typeof Map<"u"&&r instanceof Map?"map":typeof Set<"u"&&r instanceof Set?"set":typeof Date<"u"&&r instanceof Date?"date":typeof File<"u"&&r instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Ir=new Set(["string","number","symbol"]),Ia=new Set(["string","number","bigint","boolean","symbol","undefined"]);function it(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function he(r,e,t){let n=new r._zod.constr(e??r._zod.def);return(!e||t?.parent)&&(n._zod.parent=r),n}function N(r){let e=r;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function nv(r){let e;return new Proxy({},{get(t,n,o){return e??(e=r()),Reflect.get(e,n,o)},set(t,n,o,i){return e??(e=r()),Reflect.set(e,n,o,i)},has(t,n){return e??(e=r()),Reflect.has(e,n)},deleteProperty(t,n){return e??(e=r()),Reflect.deleteProperty(e,n)},ownKeys(t){return e??(e=r()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(t,n){return e??(e=r()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(t,n,o){return e??(e=r()),Reflect.defineProperty(e,n,o)}})}function E(r){return typeof r=="bigint"?r.toString()+"n":typeof r=="string"?`"${r}"`:`${r}`}function ka(r){return Object.keys(r).filter(e=>r[e]._zod.optin!==void 0&&r[e]._zod.optout==="optional")}var $a={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ta={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function iv(r,e){let t=r._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=ct(r._zod.def,{get shape(){let s={};for(let c of Reflect.ownKeys(e)){if(!Object.prototype.hasOwnProperty.call(t.shape,c))throw new Error(`Unrecognized key: "${String(c)}"`);e[c]&&Te(s,c,t.shape[c])}return Te(this,"shape",s),s},checks:[]});return he(r,i)}function sv(r,e){let t=r._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=ct(r._zod.def,{get shape(){let s={...r._zod.def.shape};for(let c of Reflect.ownKeys(e)){if(!Object.prototype.hasOwnProperty.call(t.shape,c))throw new Error(`Unrecognized key: "${String(c)}"`);e[c]&&delete s[c]}return Te(this,"shape",s),s},checks:[]});return he(r,i)}function av(r,e){if(!nt(e))throw new Error("Invalid input to extend: expected a plain object");let t=r._zod.def.checks;if(t&&t.length>0){let i=r._zod.def.shape;for(let s of Reflect.ownKeys(e))if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=ct(r._zod.def,{get shape(){let i={...r._zod.def.shape,...e};return Te(this,"shape",i),i}});return he(r,o)}function cv(r,e){if(!nt(e))throw new Error("Invalid input to safeExtend: expected a plain object");let t=ct(r._zod.def,{get shape(){let n={...r._zod.def.shape,...e};return Te(this,"shape",n),n}});return he(r,t)}function pv(r,e){if(!e?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(r._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let t=ct(r._zod.def,{get shape(){let n={...r._zod.def.shape,...e._zod.def.shape};return Te(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:e._zod.def.checks??[]});return he(r,t)}function dv(r,e,t,n="partial"){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let c=ct(e._zod.def,{get shape(){let u=e._zod.def.shape,m={...u};if(t)for(let h of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(u,h))throw new Error(`Unrecognized key: "${String(h)}"`);t[h]&&(m[h]=r?new r({type:"optional",innerType:u[h]}):u[h])}else for(let h of Reflect.ownKeys(u))m[h]=r?new r({type:"optional",innerType:u[h]}):u[h];return Te(this,"shape",m),m},checks:[]});return he(e,c)}function lv(r,e,t){let n=ct(e._zod.def,{get shape(){let o=e._zod.def.shape,i={...o};if(t)for(let s of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(i,s))throw new Error(`Unrecognized key: "${String(s)}"`);t[s]&&(i[s]=new r({type:"nonoptional",innerType:o[s]}))}else for(let s of Reflect.ownKeys(o))i[s]=new r({type:"nonoptional",innerType:o[s]});return Te(this,"shape",i),i}});return he(e,n)}function Et(r,e=0){if(r.aborted===!0)return!0;for(let t=e;t<r.issues.length;t++)if(r.issues[t]?.continue!==!0)return!0;return!1}function Pa(r,e=0){if(r.aborted===!0)return!0;for(let t=e;t<r.issues.length;t++)if(r.issues[t]?.continue===!1)return!0;return!1}function Ge(r,e){return e.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(r),t})}function xo(r){return typeof r=="string"?r:r?.message}function An(r,e,t){var n;for(let o=e;o<r.length;o++)(n=r[o]).schema??(n.schema=t)}function Ke(r,e,t){var n;let o=r.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=r).schema??(n.schema=r.inst):r.schema=r.inst);let i=r.schema!==r.inst?r.schema?._zod.def?.error:void 0,s=r.message?r.message:xo(r.inst?._zod.def?.error?.(r))??xo(i?.(r))??xo(e?.error?.(r))??xo(t.customError?.(r))??xo(t.localeError?.(r))??"Invalid input",{inst:c,schema:u,continue:m,input:h,...g}=r;return g.path??(g.path=[]),g.message=s,e?.reportInput&&(g.input=h),g}function kr(r){return r instanceof Set?"set":r instanceof Map?"map":r instanceof File?"file":"unknown"}var uv=/[\uD800-\uDBFF]/;function Ht(r){let e=r.length;if(!uv.test(r))return e;let t=e;for(let n=0;n<e-1;n++)(r.charCodeAt(n)&64512)===55296&&(r.charCodeAt(n+1)&64512)===56320&&(t--,n++);return t}function $r(r){return Array.isArray(r)?"array":typeof r=="string"?"string":"unknown"}function D(r){let e=typeof r;switch(e){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let t=r;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return e}function zo(...r){let[e,t,n]=r;return typeof e=="string"?{message:e,code:"custom",input:t,inst:n}:{...e}}function mv(r){return Object.entries(r).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Vh(r){let e=atob(r),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function Uh(r){let e="";for(let t=0;t<r.length;t++)e+=String.fromCharCode(r[t]);return btoa(e)}function hv(r){let e=r.replace(/-/g,"+").replace(/_/g,"/"),t="=".repeat((4-e.length%4)%4);return Vh(e+t)}function fv(r){return Uh(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function gv(r){let e=r.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=Number.parseInt(e.slice(n,n+2),16);return t}function xv(r){return Array.from(r).map(e=>e.toString(16).padStart(2,"0")).join("")}var Sa=class{constructor(...e){}};function Ca(r,e){for(let t in e){let n=Object.getOwnPropertyDescriptor(e,t);n.get?Object.defineProperty(r,t,{...n,enumerable:!1}):yv(r,t,n.value)}}function yo(r,e,t,n=!0){return Object.defineProperty(r,e,{configurable:!0,writable:!0,enumerable:n,value:t}),t}function Oa(r,e,t){return yo(r,e,t,!1)}function yv(r,e,t){Object.defineProperty(r,e,{configurable:!0,get(){return this==null?t:yo(this,e,t.bind(this))},set(n){yo(this,e,n)}})}function bv(r,e){let t=Object.getPrototypeOf(r);return e in t?void 0:t}var ba,Mt=!1,Sv={configurable:!0,get(){Mt=!0}};function ie(r,e,t){let n=Object.getPrototypeOf(r._zod);if(e in n&&ba!==r._zod){ba=void 0;return}ba=r._zod,Object.defineProperty(n,e,{configurable:!0,get(){Object.defineProperty(this,e,Sv);let o=Mt;Mt=!1;try{let i=t(this);return Mt?delete this[e]:Object.defineProperty(this,e,{configurable:!0,writable:!0,value:i}),Mt=Mt||o,i}catch(i){throw delete this[e],Mt=Mt||o,i}},set(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o})}})}function zv(r,e,t,n){let o=bv(r,e);o&&Object.defineProperty(o,e,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,e,i),i.value=t(this),Object.defineProperty(this,e,i),i.value},set(i){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var _n="~constantCatch";function Ra(r){let e=()=>r;return e[_n]=!0,e}var Bh,Ea=Object.freeze({status:"aborted"}),Ma={value:void 0,enumerable:!1},qh="captureStackTrace"in Error?Error:null;function vv(r){let e=qh;if(e){let t=e.stackTraceLimit;if(typeof t=="number"){try{e.stackTraceLimit=0}catch{return qh=null,new r}try{return new r}finally{e.stackTraceLimit=t}}}return new r}function P(r,e,t,n){let o={};function i(y){this.def=y,this.constr=g,this.traits=new Set}i.prototype=o;let s=t,c=s&&new WeakSet;function u(y,S){if(!y._zod){Ma.value=new i(S);try{Object.defineProperty(y,"_zod",Ma)}finally{Ma.value=void 0}}if(y._zod.traits.has(r))return;if(y._zod.traits.add(r),e(y,S),c){let T=Object.getPrototypeOf(y),M=y._zod.constr.prototype,V=T;for(;V&&V!==M;)V=Object.getPrototypeOf(V);let F=V??T;c.has(F)||(c.add(F),Ca(F,s))}let w=g.prototype;for(let T in w)Object.prototype.hasOwnProperty.call(w,T)&&(T in y||(y[T]=w[T].bind(y)))}let m=n?.Parent??Object;class h extends m{}Object.defineProperty(h,"name",{value:r});function g(y){let S=n?.Parent?vv(h):this;u(S,y);let w=S._zod.deferred;if(w){for(let M of w)M();S._zod.deferred=void 0}let T=globalThis.__zod_globalConfig?.postProcessor;return T&&T(S),S}return Object.defineProperty(g,"init",{value:u}),Object.defineProperty(g,Symbol.hasInstance,{value:y=>n?.Parent&&y instanceof n.Parent?!0:y?._zod?.traits?.has(r)}),Object.defineProperty(g,"name",{value:r}),g}var Da=Symbol("zod_brand"),Je=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Dt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(Bh=globalThis).__zod_globalConfig??(Bh.__zod_globalConfig={});var Ae=globalThis.__zod_globalConfig;function Pe(r){return r&&Object.assign(Ae,r),Ae}function wv(){let r=this._zod;return r.message??(r.message=JSON.stringify(r.def,bo,2)),r.message}function Iv(r){this._zod.message=r}var kv={get:wv,set:Iv,enumerable:!0,configurable:!0},_a={value:void 0,enumerable:!1},La={value:void 0,enumerable:!1},Wh=new WeakSet([Object.prototype,Error.prototype]),Zh=(r,e)=>{r.name="$ZodError",_a.value=r._zod,Object.defineProperty(r,"_zod",_a),La.value=e,Object.defineProperty(r,"issues",La),_a.value=void 0,La.value=void 0,Object.defineProperty(r,"message",kv);let t=Object.getPrototypeOf(r);Wh.has(t)||(Wh.add(t),Object.defineProperty(t,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},Tr=P("$ZodError",Zh),He=P("$ZodError",Zh,void 0,{Parent:Error});function $v(r,e,t){return Object.prototype.hasOwnProperty.call(r,e)||(e==="__proto__"?Object.defineProperty(r,e,{value:t(),writable:!0,enumerable:!0,configurable:!0}):r[e]=t()),r[e]}function Pr(r,e=t=>t.message){let t={},n=[];for(let o of r.issues)o.path.length>0?$v(t,o.path[0],()=>[]).push(e(o)):n.push(e(o));return{formErrors:n,fieldErrors:t}}function Cr(r,e=t=>t.message){let t={_errors:[]},n=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>n({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)t._errors.push(e(s));else{let u=t,m=0;for(;m<c.length;){let h=c[m],g=m===c.length-1;if(h==="_errors"){g&&u._errors.push(e(s)),m++;continue}Object.prototype.hasOwnProperty.call(u,h)||Object.defineProperty(u,h,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let y=u[h];g&&y._errors.push(e(s)),u=y,m++}}}};return n(r),t}function ja(r,e=t=>t.message){let t={errors:[]},n=(o,i=[])=>{var s;for(let c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>n({issues:u},[...i,...c.path]));else if(c.code==="invalid_key")n({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")n({issues:c.issues},[...i,...c.path]);else{let u=[...i,...c.path];if(u.length===0){t.errors.push(e(c));continue}let m=t,h=0;for(;h<u.length;){let g=u[h],y=h===u.length-1;typeof g=="string"?(m.properties??(m.properties={}),Object.prototype.hasOwnProperty.call(m.properties,g)||Object.defineProperty(m.properties,g,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),m=m.properties[g]):(m.items??(m.items=[]),(s=m.items)[g]??(s[g]={errors:[]}),m=m.items[g]),y&&m.errors.push(e(c)),h++}}};return n(r),t}function Gh(r){let e=[],t=r.map(n=>typeof n=="object"?n.key:n);for(let n of t)typeof n=="number"?e.push(`[${n}]`):typeof n=="symbol"?e.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?e.push(`[${JSON.stringify(n)}]`):(e.length&&e.push("."),e.push(n));return e.join("")}function Fa(r){let e=[],t=[...r.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of t)e.push(`\u2716 ${n.message}`),n.path?.length&&e.push(` \u2192 at ${Gh(n.path)}`);return e.join(`
25
+ `)}function Ln(r,e){return{callee:e?.callee??r,Err:e?.Err}}var vo=r=>{let e=(t,n,o,i)=>{let s=o?{...o,async:!1}:{async:!1},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise)throw new Je;if(c.issues.length){let u=new(i?.Err??r)(c.issues.map(m=>Ke(m,s,Pe())));throw Dn(u,i?.callee??e),u}return c.value};return e},jn=vo(He),wo=r=>{let e=async(t,n,o,i)=>{let s=o?{...o,async:!0}:{async:!0},c=t._zod.run({value:n,issues:[]},s);if(c instanceof Promise&&(c=await c),c.issues.length){let u=new(i?.Err??r)(c.issues.map(m=>Ke(m,s,Pe())));throw Dn(u,i?.callee??e),u}return c.value};return e},Fn=wo(He),Io=r=>(e,t,n)=>{let o=n?{...n,async:!1}:{async:!1},i=e._zod.run({value:t,issues:[]},o);if(i instanceof Promise)throw new Je;return i.issues.length?{success:!1,error:new(r??Tr)(i.issues.map(s=>Ke(s,o,Pe())))}:{success:!0,data:i.value}},Na=Io(He),ko=r=>async(e,t,n)=>{let o=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new r(i.issues.map(s=>Ke(s,o,Pe())))}:{success:!0,data:i.value}},Va=ko(He),Pv=Symbol.for("zod.compile.invalid"),Cv=Symbol.for("zod.compile.fallback"),Ua=((r,e,t)=>{let n=r._zod.bag.validator;return n!==void 0&&n(e)!==Pv?!0:Ov(r,e,t)});function Ov(r,e,t){let n=t?{...t,async:!1}:{async:!1},o=r._zod.bag.fallbackRun,i;if(o?(n[Cv]=!0,i=o({value:e,issues:[]},n)):i=r._zod.run({value:e,issues:[]},n),i instanceof Promise)throw new Je;return i.issues.length===0}var Ba=async(r,e,t)=>{let n=t?{...t,async:!0}:{async:!0},o=r._zod.run({value:e,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Nn=r=>{let e=vo(r),t=(n,o,i,s)=>{let c=i?{...i,direction:"backward"}:{direction:"backward"};return e(n,o,c,Ln(t,s))};return t},Rv=Nn(He),Vn=r=>{let e=vo(r),t=(n,o,i,s)=>e(n,o,i,Ln(t,s));return t},Mv=Vn(He),Un=r=>{let e=wo(r),t=async(n,o,i,s)=>{let c=i?{...i,direction:"backward"}:{direction:"backward"};return await e(n,o,c,Ln(t,s))};return t},Ev=Un(He),Bn=r=>{let e=wo(r),t=async(n,o,i,s)=>await e(n,o,i,Ln(t,s));return t},Dv=Bn(He),qn=r=>(e,t,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Io(r)(e,t,o)},Av=qn(He),Wn=r=>(e,t,n)=>Io(r)(e,t,n),_v=Wn(He),Zn=r=>async(e,t,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return ko(r)(e,t,o)},Lv=Zn(He),Gn=r=>async(e,t,n)=>ko(r)(e,t,n),jv=Gn(He);var Ne={};It(Ne,{base64:()=>ac,base64url:()=>Kn,bigint:()=>hc,boolean:()=>fc,browserEmail:()=>Zv,cidrv4:()=>ic,cidrv6:()=>sc,creditCard:()=>Jn,cuid:()=>Wa,cuid2:()=>Za,date:()=>dc,datetime:()=>uc,domain:()=>Jv,duration:()=>Ya,e164:()=>pc,email:()=>ec,emoji:()=>tc,extendedDuration:()=>Fv,guid:()=>Qa,hex:()=>Xv,hostname:()=>Kv,html5Email:()=>Bv,httpProtocol:()=>cc,idnEmail:()=>Wv,integer:()=>Or,ipv4:()=>oc,ipv6:()=>rc,ksuid:()=>Ja,lowercase:()=>yc,mac:()=>nc,md5_base64:()=>Qv,md5_base64url:()=>e0,md5_hex:()=>Yv,nanoid:()=>Ha,nanoidOfLength:()=>Xa,null:()=>gc,number:()=>At,rfc5322Email:()=>qv,sha1_base64:()=>o0,sha1_base64url:()=>r0,sha1_hex:()=>t0,sha256_base64:()=>i0,sha256_base64url:()=>s0,sha256_hex:()=>n0,sha384_base64:()=>c0,sha384_base64url:()=>p0,sha384_hex:()=>a0,sha512_base64:()=>l0,sha512_base64url:()=>u0,sha512_hex:()=>d0,string:()=>mc,time:()=>lc,ulid:()=>Ga,undefined:()=>xc,unicodeEmail:()=>Kh,uppercase:()=>bc,uuid:()=>Xt,uuid4:()=>Nv,uuid6:()=>Vv,uuid7:()=>Uv,xid:()=>Ka});var Wa=/^[cC][0-9a-z]{6,}$/,Za=/^[0-9a-z]+$/,Ga=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ka=/^[0-9a-vA-V]{20}$/,Ja=/^[A-Za-z0-9]{27}$/,Ha=/^[a-zA-Z0-9_-]{21}$/;function Xa(r){return new RegExp(`^[a-zA-Z0-9_-]{${r}}$`)}var Ya=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Fv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Qa=/^([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})$/,Xt=r=>r?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[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)$/,Nv=Xt(4),Vv=Xt(6),Uv=Xt(7),ec=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Bv=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,qv=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Kh=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Wv=Kh,Zv=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Gv="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function tc(){return new RegExp(Gv,"u")}var oc=/^(?:(?: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])$/,rc=/^(([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}|:))$/,nc=r=>{let e=it(r??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},ic=/^((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])$/,sc=/^(([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])$/,ac=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kn=/^[A-Za-z0-9_-]*$/,Kv=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Jv=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,cc=/^https?$/,pc=/^\+[1-9]\d{6,14}$/,Jn=/^\d(?:[ -]?\d){11,18}$/,Jh="(?:(?:\\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 Hv(r){return new RegExp(`^${r}$`)}var dc=Hv(Jh);function qa(r){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof r.precision=="number"?r.precision===-1?`${e}`:r.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${r.precision}}`:r.seconds?`${e}:[0-5]\\d(?:\\.\\d+)?`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function lc(r){return new RegExp(`^${qa(r)}$`)}function uc(r){let e=["Z"];r.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let t=`${qa({precision:r.precision,seconds:!0})}(?:${e.join("|")})`,n=r.local?`${t}|${qa({precision:r.precision})}`:t;return new RegExp(`^${Jh}T(?:${n})$`)}var mc=r=>{let e=r?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},hc=/^-?\d+n?$/,Or=/^-?\d+$/,At=/^-?\d+(?:\.\d+)?$/,fc=/^(?:true|false)$/i,gc=/^null$/i;var xc=/^undefined$/i;var yc=/^[^A-Z]*$/,bc=/^[^a-z]*$/,Xv=/^[0-9a-fA-F]*$/;function Rr(r,e){return new RegExp(`^[A-Za-z0-9+/]{${r}}${e}$`)}function Mr(r){return new RegExp(`^[A-Za-z0-9_-]{${r}}$`)}var Yv=/^[0-9a-fA-F]{32}$/,Qv=Rr(22,"=="),e0=Mr(22),t0=/^[0-9a-fA-F]{40}$/,o0=Rr(27,"="),r0=Mr(27),n0=/^[0-9a-fA-F]{64}$/,i0=Rr(43,"="),s0=Mr(43),a0=/^[0-9a-fA-F]{96}$/,c0=Rr(64,""),p0=Mr(64),d0=/^[0-9a-fA-F]{128}$/,l0=Rr(86,"=="),u0=Mr(86);var be=P("$ZodCheck",(r,e)=>{var t;r._zod??(r._zod={}),r._zod.def=e,(t=r._zod).onattach??(t.onattach=[])}),Sc=r=>{let e=r.value;return!En(e)&&e.size!==void 0},zc=r=>{let e=r.value;return!En(e)&&e.length!==void 0},Hn={number:"number",bigint:"bigint",object:"date"},Xn=P("$ZodCheckLessThan",(r,e)=>{be.init(r,e);let t=Hn[typeof e.value];r._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),r._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:Hn[typeof n.value]??t,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:r,continue:!e.abort})}}),Yn=P("$ZodCheckGreaterThan",(r,e)=>{be.init(r,e);let t=Hn[typeof e.value];r._zod.onattach.push(n=>{let o=n._zod.bag,i=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),r._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:Hn[typeof n.value]??t,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:r,continue:!e.abort})}}),vc=P("$ZodCheckMultipleOf",(r,e)=>{be.init(r,e),r._zod.onattach.push(t=>{var n;(n=t._zod.bag).multipleOf??(n.multipleOf=e.value)}),r._zod.check=t=>{if(typeof t.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof t.value=="bigint"?e.value!==BigInt(0)&&t.value%e.value===BigInt(0):vr(t.value,e.value)===0)||t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:e.value,input:t.value,inst:r,continue:!e.abort})}}),wc=P("$ZodCheckNumberFormat",(r,e)=>{be.init(r,e),e.format=e.format||"float64";let t=e.format?.includes("int"),n=t?"int":"number",[o,i]=$a[e.format];r._zod.onattach.push(s=>{let c=s._zod.bag;c.format=e.format,c.minimum=o,c.maximum=i,t&&(c.pattern=Or)}),r._zod.check=s=>{let c=s.value;if(t){if(!Number.isInteger(c)){s.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:c,inst:r});return}if(!Number.isSafeInteger(c)){c>0?s.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:n,inclusive:!0,continue:!e.abort}):s.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:n,inclusive:!0,continue:!e.abort});return}}c<o&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:r,continue:!e.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:r,continue:!e.abort})}}),Ic=P("$ZodCheckBigIntFormat",(r,e)=>{be.init(r,e);let[t,n]=Ta[e.format];r._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,i.minimum=t,i.maximum=n}),r._zod.check=o=>{let i=o.value;i<t&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:t,inclusive:!0,inst:r,continue:!e.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:r,continue:!e.abort})}}),kc=P("$ZodCheckMaxSize",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=Sc),r._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),r._zod.check=n=>{let o=n.value;o.size<=e.maximum||n.issues.push({origin:kr(o),code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),$c=P("$ZodCheckMinSize",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=Sc),r._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),r._zod.check=n=>{let o=n.value;o.size>=e.minimum||n.issues.push({origin:kr(o),code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),Tc=P("$ZodCheckSizeEquals",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=Sc),r._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.size,o.maximum=e.size,o.size=e.size}),r._zod.check=n=>{let o=n.value,i=o.size;if(i===e.size)return;let s=i>e.size;n.issues.push({origin:kr(o),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:r,continue:!e.abort})}}),Pc=P("$ZodCheckMaxLength",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=zc),r._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(n._zod.bag.maximum=e.maximum)}),r._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>e.maximum?Ht(o):i)<=e.maximum)return;let c=$r(o);n.issues.push({origin:c,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),Cc=P("$ZodCheckMinLength",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=zc),r._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(n._zod.bag.minimum=e.minimum)}),r._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=e.minimum&&i<e.minimum*2?Ht(o):i)>=e.minimum)return;let c=$r(o);n.issues.push({origin:c,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:r,continue:!e.abort})}}),Oc=P("$ZodCheckLengthEquals",(r,e)=>{var t;be.init(r,e),(t=r._zod.def).when??(t.when=zc),r._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),r._zod.check=n=>{let o=n.value,i=o.length,s=typeof o=="string"&&i>=e.length&&i<=e.length*2?Ht(o):i;if(s===e.length)return;let c=$r(o),u=s>e.length;n.issues.push({origin:c,...u?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:r,continue:!e.abort})}}),$o=P("$ZodCheckStringFormat",(r,e)=>{var t,n;be.init(r,e),r._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(t=r._zod).check??(t.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:r,continue:!e.abort})}):(n=r._zod).check??(n.check=()=>{})}),Rc=P("$ZodCheckRegex",(r,e)=>{$o.init(r,e),r._zod.check=t=>{e.pattern.lastIndex=0,!e.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:e.pattern.toString(),inst:r,continue:!e.abort})}}),Mc=P("$ZodCheckLowerCase",(r,e)=>{e.pattern??(e.pattern=yc),$o.init(r,e)}),Ec=P("$ZodCheckUpperCase",(r,e)=>{e.pattern??(e.pattern=bc),$o.init(r,e)}),Dc=P("$ZodCheckIncludes",(r,e)=>{be.init(r,e);let t=it(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position},}${t}`:t);e.pattern=n,r._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),r._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:r,continue:!e.abort})}}),Ac=P("$ZodCheckStartsWith",(r,e)=>{be.init(r,e);let t=new RegExp(`^${it(e.prefix)}.*`);e.pattern??(e.pattern=t),r._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),r._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:r,continue:!e.abort})}}),_c=P("$ZodCheckEndsWith",(r,e)=>{be.init(r,e);let t=new RegExp(`.*${it(e.suffix)}$`);e.pattern??(e.pattern=t),r._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(t)}),r._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:r,continue:!e.abort})}});function Hh(r,e,t){r.issues.length&&e.issues.push(...Ge(t,r.issues))}var Qn=P("$ZodCheckProperty",(r,e)=>{be.init(r,e),r._zod.check=t=>{let n=e.schema._zod.run({value:t.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>Hh(o,t,e.property));Hh(n,t,e.property)}}),Lc=P("$ZodCheckMimeType",(r,e)=>{be.init(r,e);let t=new Set(e.mime);r._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),r._zod.check=n=>{t.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:r,continue:!e.abort})}}),jc=P("$ZodCheckOverwrite",(r,e)=>{be.init(r,e),r._zod.check=t=>{t.value=e.tx(t.value)}});var Yt=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
26
+ `).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
27
+ ${t.join(`
28
+ `)}
29
+ };`)(...Object.values(this.closed))}};var Fc={major:4,minor:5,patch:4};var te=P("$ZodType",(r,e)=>{var t;r??(r={}),r._zod.def=e,r._zod.bag=r._zod.bag||{},r._zod.version=Fc;let n=r._zod.def.checks,o=r._zod.traits.has("$ZodCheck")?[r,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let s of i._zod.onattach)s(r);if(o.length===0)(t=r._zod).deferred??(t.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let i=(c,u,m)=>{if(c.memo)return c;let h=Et(c),g;for(let y of u){if(y._zod.def.when){if(Pa(c)||!y._zod.def.when(c))continue}else if(h)continue;let S=c.issues.length,w=y._zod.check(c);if(w instanceof Promise&&m?.async===!1)throw new Je;if(g||w instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await w,c.issues.length!==S&&(An(c.issues,S,r),h||(h=Et(c,S)))});else{if(c.issues.length===S)continue;An(c.issues,S,r),h||(h=Et(c,S))}}return g?g.then(()=>c):c},s=(c,u,m)=>{if(Et(c))return c.aborted=!0,c;let h=i(u,o,m);if(h instanceof Promise){if(m.async===!1)throw new Je;return h.then(g=>r._zod.parse(g,m))}return r._zod.parse(h,m)};r._zod.run=(c,u)=>{if(u.skipChecks)return r._zod.parse(c,u);if(u.direction==="backward"){let h=r._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return h instanceof Promise?h.then(g=>s(g,c,u)):s(h,c,u)}let m=r._zod.parse(c,u);if(m instanceof Promise){if(u.async===!1)throw new Je;return m.then(h=>i(h,o,u))}return i(m,o,u)}}},{get"~standard"(){return Oa(this,"~standard",ni(this))},set"~standard"(r){yo(this,"~standard",r)}}),Yh=r=>r.success?{value:r.data}:{issues:r.error?.issues};function ni(r){return{validate:e=>{try{return Yh(Na(r,e))}catch{return Va(r,e).then(Yh)}},vendor:"zod",version:1}}var Qt=P("$ZodString",(r,e)=>{te.init(r,e),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??mc(r._zod.bag),r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=String(t.value)}catch{}return typeof t.value=="string"||t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:r}),t}}),ge=P("$ZodStringFormat",(r,e)=>{$o.init(r,e),Qt.init(r,e)}),Vc=P("$ZodGUID",(r,e)=>{e.pattern??(e.pattern=Qa),ge.init(r,e)}),Uc=P("$ZodUUID",(r,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Xt(n))}else e.pattern??(e.pattern=Xt());ge.init(r,e)}),Bc=P("$ZodEmail",(r,e)=>{e.pattern??(e.pattern=ec),ge.init(r,e)}),qc=1,Wc=2;function ii(r,e){if(!e.normalize&&e.protocol?.source===cc.source&&!/^https?:\/\//i.test(r))return qc;try{return new URL(r)}catch{return Wc}}var m0=/[\t\n\r]/g;function si(r){return r.replace(m0,"")}function ai(r,e){return e.lastIndex=0,e.test(r.hostname)}function ci(r,e){return e.lastIndex=0,e.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)}var Zc=P("$ZodURL",(r,e)=>{ge.init(r,e),r._zod.check=t=>{try{let n=t.value.trim(),o=ii(n,e);if(o===qc){t.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:t.value,inst:r,continue:!e.abort});return}if(o===Wc){t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:r,continue:!e.abort});return}e.hostname&&!ai(o,e.hostname)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:t.value,inst:r,continue:!e.abort}),e.protocol&&!ci(o,e.protocol)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:t.value,inst:r,continue:!e.abort}),t.value=e.normalize?o.href:si(n);return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:r,continue:!e.abort})}}}),Gc=P("$ZodEmoji",(r,e)=>{e.pattern??(e.pattern=tc()),ge.init(r,e)}),Kc=P("$ZodNanoID",(r,e)=>{if(e.length!==void 0&&(!Number.isInteger(e.length)||e.length<1))throw new Error(`Invalid nanoid length: ${e.length}`);e.pattern??(e.pattern=e.length===void 0?Ha:Xa(e.length)),ge.init(r,e)}),Jc=P("$ZodCUID",(r,e)=>{e.pattern??(e.pattern=Wa),ge.init(r,e)}),Hc=P("$ZodCUID2",(r,e)=>{e.pattern??(e.pattern=Za),ge.init(r,e)}),Xc=P("$ZodULID",(r,e)=>{e.pattern??(e.pattern=Ga),ge.init(r,e)}),Yc=P("$ZodXID",(r,e)=>{e.pattern??(e.pattern=Ka),ge.init(r,e)}),Qc=P("$ZodKSUID",(r,e)=>{e.pattern??(e.pattern=Ja),ge.init(r,e)}),ep=P("$ZodISODateTime",(r,e)=>{e.pattern??(e.pattern=uc(e)),ge.init(r,e),(e.local||e.precision===-1)&&(r._zod.bag.laxFormat=!0,r._zod.onattach.push(t=>{t._zod.bag.laxFormat=!0}))}),tp=P("$ZodISODate",(r,e)=>{e.pattern??(e.pattern=dc),ge.init(r,e)}),op=P("$ZodISOTime",(r,e)=>{e.pattern??(e.pattern=lc(e)),ge.init(r,e)}),rp=P("$ZodISODuration",(r,e)=>{e.pattern??(e.pattern=Ya),ge.init(r,e)}),np=P("$ZodIPv4",(r,e)=>{e.pattern??(e.pattern=oc),ge.init(r,e),r._zod.bag.format="ipv4"}),h0=/^[0-9a-fA-F:.]+$/;function Er(r){if(!h0.test(r))return!1;try{return new URL(`http://[${r}]`),!0}catch{return!1}}var ip=P("$ZodIPv6",(r,e)=>{e.pattern??(e.pattern=rc),ge.init(r,e),r._zod.bag.format="ipv6",r._zod.check=t=>{Er(t.value)||t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:r,continue:!e.abort})}}),sp=P("$ZodMAC",(r,e)=>{e.pattern??(e.pattern=nc(e.delimiter)),ge.init(r,e),r._zod.bag.format="mac"}),ap=P("$ZodCIDRv4",(r,e)=>{e.pattern??(e.pattern=ic),ge.init(r,e)});function pi(r){let e=r.split("/");if(e.length!==2)return!1;let[t,n]=e;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:Er(t)}var cp=P("$ZodCIDRv6",(r,e)=>{e.pattern??(e.pattern=sc),ge.init(r,e),r._zod.check=t=>{pi(t.value)||t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:r,continue:!e.abort})}});function Dr(r){if(r==="")return!0;if(/\s/.test(r)||r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}var pp=P("$ZodBase64",(r,e)=>{e.pattern??(e.pattern=ac),ge.init(r,e),r._zod.bag.contentEncoding="base64",r._zod.check=t=>{Dr(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:r,continue:!e.abort})}});function di(r){if(!Kn.test(r))return!1;let e=r.replace(/[-_]/g,n=>n==="-"?"+":"/"),t=e.padEnd(Math.ceil(e.length/4)*4,"=");return Dr(t)}var dp=P("$ZodBase64URL",(r,e)=>{e.pattern??(e.pattern=Kn),ge.init(r,e),r._zod.bag.contentEncoding="base64url",r._zod.check=t=>{di(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:r,continue:!e.abort})}}),lp=P("$ZodE164",(r,e)=>{e.pattern??(e.pattern=pc),ge.init(r,e)}),f0=/[- ]/g;function g0(r){let e=r.length,t=1,n=0;for(;e;){let o=+r[--e];t^=1,n+=t?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function li(r){return Jn.test(r)?g0(r.replace(f0,"")):!1}var up=P("$ZodCreditCard",(r,e)=>{e.pattern??(e.pattern=Jn),ge.init(r,e),r._zod.check=t=>{li(t.value)||t.issues.push({code:"invalid_format",format:"credit_card",input:t.value,inst:r,continue:!e.abort})}});function ui(r,e=null){try{let t=r.split(".");if(t.length!==3)return!1;let[n]=t;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}var mp=P("$ZodJWT",(r,e)=>{ge.init(r,e),r._zod.check=t=>{ui(t.value,e.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:r,continue:!e.abort})}}),hp=P("$ZodCustomStringFormat",(r,e)=>{ge.init(r,e),r._zod.check=t=>{e.fn(t.value)||t.issues.push({code:"invalid_format",format:e.format,input:t.value,inst:r,continue:!e.abort})}}),mi=P("$ZodNumber",(r,e)=>{te.init(r,e),r._zod.pattern=r._zod.bag.pattern??At,r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=Number(t.value)}catch{}let o=t.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return t;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return t.issues.push({expected:"number",code:"invalid_type",input:o,inst:r,...i?{received:i}:{}}),t}}),fp=P("$ZodNumberFormat",(r,e)=>{wc.init(r,e),mi.init(r,e)}),Ar=P("$ZodBoolean",(r,e)=>{te.init(r,e),r._zod.pattern=fc,r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=!!t.value}catch{}let o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:r}),t}}),hi=P("$ZodBigInt",(r,e)=>{te.init(r,e),r._zod.pattern=hc,r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=BigInt(t.value)}catch{}return typeof t.value=="bigint"||t.issues.push({expected:"bigint",code:"invalid_type",input:t.value,inst:r}),t}}),gp=P("$ZodBigIntFormat",(r,e)=>{Ic.init(r,e),hi.init(r,e)}),xp=P("$ZodSymbol",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value;return typeof o=="symbol"||t.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:r}),t}}),yp=P("$ZodUndefined",(r,e)=>{te.init(r,e),r._zod.pattern=xc,r._zod.values=new Set([void 0]),r._zod.parse=(t,n)=>{let o=t.value;return typeof o>"u"||t.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:r}),t}}),bp=P("$ZodNull",(r,e)=>{te.init(r,e),r._zod.pattern=gc,r._zod.values=new Set([null]),r._zod.parse=(t,n)=>{let o=t.value;return o===null||t.issues.push({expected:"null",code:"invalid_type",input:o,inst:r}),t}}),Sp=P("$ZodAny",(r,e)=>{te.init(r,e),r._zod.parse=t=>t}),zp=P("$ZodUnknown",(r,e)=>{te.init(r,e),r._zod.parse=t=>t}),vp=P("$ZodNever",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:r}),t)}),wp=P("$ZodVoid",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value;return typeof o>"u"||t.issues.push({expected:"void",code:"invalid_type",input:o,inst:r}),t}}),Ip=P("$ZodDate",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=new Date(t.value)}catch{}let o=t.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||t.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:r}),t}});function Qh(r,e,t){r.issues.length&&e.issues.push(...Ge(t,r.issues)),e.value[t]=r.value}var kp=P("$ZodArray",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:r}),n;n.value=t?t.alloc(r,n,Array(i.length),o):Array(i.length);let s=[];for(let c=0;c<i.length;c++){let u=i[c],m=e.element._zod.run({value:u,issues:[]},o);m instanceof Promise?s.push(m.then(h=>Qh(h,n,c))):Qh(m,n,c)}return s.length?Promise.all(s).then(()=>n):n}});function ri(r,e,t,n,o,i){let s=t in n,c=i==="optional";if(!(!s&&c&&o==="optional")){if(r.issues.length){if(o!==void 0&&c&&!s)return;e.issues.push(...Ge(t,r.issues))}if(!s&&o===void 0){r.issues.length||e.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[t]});return}r.value===void 0?s&&(e.value[t]=void 0):e.value[t]=r.value}}var x0=[];function ff(r){let e=Object.keys(r.shape),t=Object.getOwnPropertySymbols(r.shape),n=t.length?t:x0,o=n.length?[...e,...n]:e;for(let s of o)if(!r.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=ka(r.shape);return{...r,allKeys:o,symbolKeys:n,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(i)}}function gf(r,e,t,n,o,i){let s=[],c=o.keySet,u=o.catchall._zod,m=u.def.type,h=u.optin,g=u.optout;for(let y in e){if(c.has(y))continue;if(y==="__proto__"){m==="never"&&s.push(y);continue}if(m==="never"){s.push(y);continue}let S=u.run({value:e[y],issues:[]},n);S instanceof Promise?r.push(S.then(w=>ri(w,t,y,e,h,g))):ri(S,t,y,e,h,g)}return s.length&&t.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:i,continue:!0}),r.length?Promise.all(r).then(()=>t):t}var Nc=new WeakMap,xf=P("$ZodObject",(r,e)=>{if(te.init(r,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){let u=e.shape;Nc.set(e,u),Object.defineProperty(e,"shape",{get:()=>{let m={...u};return Object.defineProperty(e,"shape",{value:m}),Nc.set(e,m),m}})}let n=So(()=>ff(e));ie(r,"propValues",u=>{let m=u.def.shape,h={};for(let g in m){let y=m[g]._zod;if(y.values){Object.prototype.hasOwnProperty.call(h,g)||Te(h,g,new Set);for(let S of y.values)h[g].add(S);y.optin!==void 0&&h[g].add(void 0)}}return h});let o=Jt,i=e.catchall,s,c=Ae.memoizer;c?.attach(r),r._zod.parse=(u,m)=>{s??(s=n.value);let h=u.value;if(!o(h))return u.issues.push({expected:"object",code:"invalid_type",input:h,inst:r}),u;u.value=c?c.alloc(r,u,{},m):{};let g=[],y=s.shape;for(let S of s.allKeys){if(S==="__proto__")continue;let w=y[S],T=w._zod.optin,M=w._zod.optout,V=w._zod.run({value:h[S],issues:[]},m);V instanceof Promise?g.push(V.then(F=>ri(F,u,S,h,T,M))):ri(V,u,S,h,T,M)}return i?gf(g,h,u,m,n.value,r):g.length?Promise.all(g).then(()=>u):u}}),$p=P("$ZodObjectJIT",(r,e)=>{xf.init(r,e);let t=r._zod.parse,n=So(()=>ff(e)),o=Ae.memoizer,i=S=>{let w=n.value,T=w.symbolKeys,M=new Yt(["payload","ctx"],{shape:S,inst:r,memo:o,syms:T}),V=ye=>`shape[${ye}]._zod.run({ value: input[${ye}], issues: [] }, ctx)`,F=(ye,ce)=>`
30
+ for (let i = 0; i < ${ye}.issues.length; i++) {
31
+ const iss = ${ye}.issues[i];
32
+ iss.path = iss.path ? [${ce}, ...iss.path] : [${ce}];
33
+ payload.issues.push(iss);
34
+ }`;M.write("const input = payload.value;");let H=Object.create(null),re=0;for(let ye of w.allKeys)H[ye]=`key_${re++}`;M.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let ye of w.allKeys){if(ye==="__proto__")continue;let ce=H[ye],Re=typeof ye=="symbol"?`syms[${T.indexOf(ye)}]`:Ze(ye),Ct=`${Re} in input`,fr=S[ye],gr=fr?._zod?.optin,xr=gr!==void 0,$n=fr?._zod?.optout==="optional";if(M.write(`const ${ce} = ${V(Re)};`),xr&&$n){let Tn=gr==="optional"?`${ce}_present`:`${ce}.value !== undefined || ${ce}_present`;M.write(`
35
+ const ${ce}_present = ${Ct};
36
+ if (!${ce}.issues.length || ${ce}_present) {
37
+ if (${ce}.issues.length) {${F(ce,Re)}
38
+ }
39
+
40
+ if (${Tn}) {
41
+ newResult[${Re}] = ${ce}.value;
42
+ }
43
+ }
44
+
45
+ `)}else xr?M.write(`
46
+ if (${ce}.issues.length) {${F(ce,Re)}
47
+ }
48
+
49
+ if (${ce}.value === undefined) {
50
+ if (${Ct}) {
51
+ newResult[${Re}] = undefined;
52
+ }
53
+ } else {
54
+ newResult[${Re}] = ${ce}.value;
55
+ }
56
+
57
+ `):M.write(`
58
+ const ${ce}_present = ${Ct};
59
+ if (${ce}.issues.length) {${F(ce,Re)}
60
+ }
61
+ if (!${ce}_present && !${ce}.issues.length) {
62
+ payload.issues.push({
63
+ code: "invalid_type",
64
+ expected: "nonoptional",
65
+ input: undefined,
66
+ path: [${Re}]
67
+ });
68
+ }
69
+
70
+ if (${ce}_present) {
71
+ newResult[${Re}] = ${ce}.value;
72
+ }
73
+
74
+ `)}return M.write("payload.value = newResult;"),M.write("return payload;"),M.compile()},s,c=Jt,u=!Ae.jitless,h=u&&wa.value,g=e.catchall,y;r._zod.parse=(S,w)=>{y??(y=n.value);let T=S.value;return c(T)?u&&h&&w?.async===!1&&w.jitless!==!0?(s||(s=i(e.shape)),S=s(S,w),g?gf([],T,S,w,y,r):S):t(S,w):(S.issues.push({expected:"object",code:"invalid_type",input:T,inst:r}),S)}});function ef(r,e,t,n){for(let i of r)if(i.issues.length===0)return e.value=i.value,e;let o=r.filter(i=>!Et(i));return o.length===1?(e.value=o[0].value,o[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:r.map(i=>i.issues.map(s=>Ke(s,n,Pe())))}),e)}var _r=P("$ZodUnion",(r,e)=>{te.init(r,e),ie(r,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),ie(r,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ie(r,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),ie(r,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>zr(i.source)).join("|")})$`)}});let t=e.options.length===1?e.options[0]._zod.run:null;r._zod.parse=(n,o)=>{if(t)return t(n,o);let i=!1,s=[];for(let c of e.options){let u=c._zod.run({value:n.value,issues:[]},o);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(c=>ef(c,n,r,o)):ef(s,n,r,o)}});function tf(r,e,t,n){let o=[];for(let i=0;i<r.length;i++)r[i].issues.length===0&&o.push(i);return o.length===1?(e.value=r[o[0]].value,e):(o.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:r.map(i=>i.issues.map(s=>Ke(s,n,Pe())))}):e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:[],inclusive:!1,matches:o}),e)}var Tp=P("$ZodXor",(r,e)=>{_r.init(r,e),e.inclusive=!1;let t=e.options.length===1?e.options[0]._zod.run:null;r._zod.parse=(n,o)=>{if(t)return t(n,o);let i=!1,s=[];for(let c of e.options){let u=c._zod.run({value:n.value,issues:[]},o);u instanceof Promise?(s.push(u),i=!0):s.push(u)}return i?Promise.all(s).then(c=>tf(c,n,r,o)):tf(s,n,r,o)}});function Pp(r,e){let t=r._zod,n=t.bag.optionsMap;if(!n){n=new Map;let{options:o,discriminator:i}=t.def;for(let s of o)for(let c of s._zod.propValues?.[i]??[])n.has(c)||n.set(c,s);t.bag.optionsMap=n}return n.get(e)}var Cp=P("$ZodDiscriminatedUnion",(r,e)=>{e.inclusive=!1,_r.init(r,e);let t=r._zod.parse;ie(r,"propValues",o=>{let i={};for(let s of o.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);for(let[u,m]of Object.entries(c)){Object.prototype.hasOwnProperty.call(i,u)||Te(i,u,new Set);for(let h of m)i[u].add(h)}}return i}),e.options.forEach((o,i)=>{let s=Nc.get(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,e.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=So(()=>{let o=e.options,i=new Map;for(let s of o){let c=s._zod.propValues?.[e.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});r._zod.parse=(o,i)=>{let s=o.value;if(!Jt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:r}),o;let c=n.value.get(s?.[e.discriminator]);return c?c._zod.run(o,i):e.unionFallback||i.direction==="backward"?t(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,options:Array.from(n.value.keys()),input:s,path:[e.discriminator],inst:r}),o)}}),Op=P("$ZodIntersection",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value,i=e.left._zod.run({value:o,issues:[]},n),s=e.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([u,m])=>of(t,u,m)):of(t,i,s)}});function To(r,e){if(r===e)return{valid:!0,data:r};if(r instanceof Date&&e instanceof Date&&+r==+e)return{valid:!0,data:r};if(nt(r)&&nt(e)){let t=Object.keys(e),n=Object.keys(r).filter(i=>t.indexOf(i)!==-1),o={...r,...e};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let s=To(r[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return{valid:!1,mergeErrorPath:[]};let t=[];for(let n=0;n<r.length;n++){let o=r[n],i=e[n],s=To(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};t.push(s.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function of(r,e,t){let n=new Map,o,i=new Map,s=(m,h)=>{let g;if(m.code==="unrecognized_keys"&&!m.path?.length)o??(o=m),g=m.keys;else if(m.code==="invalid_key"&&m.origin==="record"&&m.path?.length===1){let y=String(m.path[0]);i.has(y)||i.set(y,m),g=[y]}else return!1;for(let y of g)n.has(y)||n.set(y,{}),n.get(y)[h]=!0;return!0};for(let m of e.issues)s(m,"l")||r.issues.push(m);for(let m of t.issues)s(m,"r")||r.issues.push(m);let c=[...n].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(c.length){let m=o?c.filter(h=>o.keys.includes(h)):[];m.length&&r.issues.push({...o,keys:m});for(let h of c)!m.includes(h)&&i.has(h)&&r.issues.push(i.get(h))}let u=To(e.value,t.value);if(!u.valid){if(Et(r))return r;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return r.value=u.data,r}var fi=P("$ZodTuple",(r,e)=>{te.init(r,e);let t=e.items,n=Ae.memoizer;n?.attach(r),r._zod.parse=(o,i)=>{let s=o.value;if(!Array.isArray(s))return o.issues.push({input:s,inst:r,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(r,o,[],i):[];let c=[],u=rf(t,"optin"),m=rf(t,"optout");if(!e.rest){if(s.length<u)return o.issues.push({code:"too_small",minimum:u,inclusive:!0,input:s,inst:r,origin:"array"}),o;s.length>t.length&&o.issues.push({code:"too_big",maximum:t.length,inclusive:!0,input:s,inst:r,origin:"array"})}let h=new Array(t.length);for(let g=0;g<t.length;g++){let y=t[g]._zod.run({value:s[g],issues:[]},i);y instanceof Promise?c.push(y.then(S=>{h[g]=S})):h[g]=y}if(e.rest){let g=t.length-1,y=s.slice(t.length);for(let S of y){g++;let w=e.rest._zod.run({value:S,issues:[]},i);w instanceof Promise?c.push(w.then(T=>nf(T,o,g))):nf(w,o,g)}}return c.length?Promise.all(c).then(()=>sf(h,o,t,s,m)):sf(h,o,t,s,m)}});function rf(r,e){for(let t=r.length-1;t>=0;t--)if(!(e==="optin"?r[t]._zod.optin!==void 0:r[t]._zod.optout==="optional"))return t+1;return 0}function nf(r,e,t){r.issues.length&&e.issues.push(...Ge(t,r.issues)),e.value[t]=r.value}function sf(r,e,t,n,o){for(let i=0;i<t.length;i++){let s=r[i],c=i<n.length;if(!c&&i>=o&&t[i]._zod.optin==="optional"){e.value.length=i;break}if(s.issues.length){if(!c&&i>=o){e.value.length=i;break}e.issues.push(...Ge(i,s.issues))}e.value[i]=s.value}for(let i=e.value.length-1;i>=n.length&&(t[i]._zod.optout==="optional"&&e.value[i]===void 0);i--)e.value.length=i;return e}var Rp=P("$ZodRecord",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!nt(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:r}),n;let s=[],c=e.keyType._zod.values;if(c&&!e.partial){n.value=t?t.alloc(r,n,{},o):{};let u=new Set;for(let h of c)if(typeof h=="string"||typeof h=="number"||typeof h=="symbol"){if(u.add(typeof h=="number"?h.toString():h),h==="__proto__")continue;let g=e.keyType._zod.run({value:h,issues:[]},o);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(g.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(w=>Ke(w,o,Pe())),input:h,path:[h],inst:r});continue}let y=g.value;if(y==="__proto__")continue;let S=e.valueType._zod.run({value:i[h],issues:[]},o);S instanceof Promise?s.push(S.then(w=>{w.issues.length&&n.issues.push(...Ge(h,w.issues)),n.value[y]=w.value})):(S.issues.length&&n.issues.push(...Ge(h,S.issues)),n.value[y]=S.value)}let m;for(let h in i)if(!u.has(h))if(e.mode==="loose"){if(h==="__proto__")continue;n.value[h]=i[h]}else m=m??[],m.push(h);m&&m.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:r,keys:m,continue:!0})}else{n.value=t?t.alloc(r,n,{},o):{};let u;for(let m of Reflect.ownKeys(i)){if(m==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,m))continue;let h=e.keyType._zod.run({value:m,issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&At.test(m)&&h.issues.length){let w=e.keyType._zod.run({value:Number(m),issues:[]},o);if(w instanceof Promise)throw new Error("Async schemas not supported in object keys currently");w.issues.length===0&&(h=w)}if(h.issues.length){e.mode==="loose"?n.value[m]=i[m]:c?(u=u??[],u.push(m)):n.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(w=>Ke(w,o,Pe())),input:m,path:[m],inst:r});continue}let y=h.value;if(y==="__proto__")continue;let S=e.valueType._zod.run({value:i[m],issues:[]},o);S instanceof Promise?s.push(S.then(w=>{w.issues.length&&n.issues.push(...Ge(m,w.issues)),n.value[y]=w.value})):(S.issues.length&&n.issues.push(...Ge(m,S.issues)),n.value[y]=S.value)}u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:r,keys:u,continue:!0})}return s.length?Promise.all(s).then(()=>n):n}}),Mp=P("$ZodMap",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:r}),n;let s=[];n.value=t?t.alloc(r,n,new Map,o):new Map;for(let[c,u]of i){let m=e.keyType._zod.run({value:c,issues:[]},o),h=e.valueType._zod.run({value:u,issues:[]},o);m instanceof Promise||h instanceof Promise?s.push(Promise.all([m,h]).then(([g,y])=>{af(g,y,n,c,i,r,o)})):af(m,h,n,c,i,r,o)}return s.length?Promise.all(s).then(()=>n):n}});function af(r,e,t,n,o,i,s){r.issues.length&&(Ir.has(typeof n)?t.issues.push(...Ge(n,r.issues)):t.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:r.issues.map(c=>Ke(c,s,Pe()))})),e.issues.length&&(Ir.has(typeof n)?t.issues.push(...Ge(n,e.issues)):t.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:e.issues.map(c=>Ke(c,s,Pe()))})),t.value.set(r.value,e.value)}var Ep=P("$ZodSet",(r,e)=>{te.init(r,e);let t=Ae.memoizer;t?.attach(r),r._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:r,expected:"set",code:"invalid_type"}),n;let s=[];n.value=t?t.alloc(r,n,new Set,o):new Set;for(let c of i){let u=e.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise?s.push(u.then(m=>cf(m,n))):cf(u,n)}return s.length?Promise.all(s).then(()=>n):n}});function cf(r,e){r.issues.length&&e.issues.push(...r.issues),e.value.add(r.value)}var Dp=P("$ZodEnum",(r,e)=>{te.init(r,e);let t=Sr(e.entries),n=new Set(t);r._zod.values=n;let o=t.filter(i=>Ir.has(typeof i));r._zod.pattern=new RegExp(o.length?`^(${o.map(i=>it(i.toString())).join("|")})$`:"^[^\\s\\S]$"),r._zod.parse=(i,s)=>{let c=i.value;return n.has(c)||i.issues.push({code:"invalid_value",values:t,input:c,inst:r}),i}}),Ap=P("$ZodLiteral",(r,e)=>{te.init(r,e);let t=new Set(e.values);r._zod.values=t,r._zod.pattern=new RegExp(e.values.length?`^(${e.values.map(n=>typeof n=="string"?it(n):n?it(n.toString()):String(n)).join("|")})$`:"^[^\\s\\S]$"),r._zod.parse=(n,o)=>{let i=n.value;return t.has(i)||n.issues.push({code:"invalid_value",values:e.values,input:i,inst:r}),n}}),_p=P("$ZodFile",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{let o=t.value;return o instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:o,inst:r}),t}}),Lp=P("$ZodTransform",(r,e)=>{te.init(r,e),r._zod.optin="optional",Ae.memoizer?.guard(r),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Dt(r.constructor.name);let o=e.transform(t.value,t);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(t.value=s,t));if(o instanceof Promise)throw new Je;return t.value=o,t}});function pf(r,e){return r.value=e.issues.length?void 0:e.value,r}var gi=P("$ZodOptional",(r,e)=>{te.init(r,e),ie(r,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),r._zod.optout="optional",ie(r,"values",t=>{let n=t.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),ie(r,"pattern",t=>{let n=t.def.innerType._zod.pattern;return n?new RegExp(`^(${zr(n.source)})?$`):void 0}),r._zod.parse=(t,n)=>{if(t.value===void 0){if(e.innerType._zod.optin!=="defaulted")return t;let o=e.innerType._zod.run({value:t.value,issues:[]},n);return o instanceof Promise?o.then(i=>pf(t,i)):pf(t,o)}return e.innerType._zod.run(t,n)}}),jp=P("$ZodExactOptional",(r,e)=>{gi.init(r,e),ie(r,"values",t=>t.def.innerType._zod.values),ie(r,"pattern",t=>t.def.innerType._zod.pattern),r._zod.parse=(t,n)=>e.innerType._zod.run(t,n)}),Fp=P("$ZodNullable",(r,e)=>{te.init(r,e),ie(r,"optin",t=>t.def.innerType._zod.optin),ie(r,"optout",t=>t.def.innerType._zod.optout),ie(r,"pattern",t=>{let n=t.def.innerType._zod.pattern;return n?new RegExp(`^(${zr(n.source)}|null)$`):void 0}),ie(r,"values",t=>t.def.innerType._zod.values?new Set([...t.def.innerType._zod.values,null]):void 0),r._zod.parse=(t,n)=>t.value===null?t:e.innerType._zod.run(t,n)}),Np=P("$ZodDefault",(r,e)=>{te.init(r,e),r._zod.optin="defaulted",ie(r,"values",t=>t.def.innerType._zod.values),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);if(t.value===void 0)return t.value=e.defaultValue,t;let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>df(i,e)):df(o,e)}});function df(r,e){return r.value===void 0&&(r.value=e.defaultValue),r}var Vp=P("$ZodPrefault",(r,e)=>{te.init(r,e),r._zod.optin="defaulted",ie(r,"values",t=>t.def.innerType._zod.values),r._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=e.defaultValue),e.innerType._zod.run(t,n))}),Up=P("$ZodNonOptional",(r,e)=>{te.init(r,e),ie(r,"values",t=>{let n=t.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),r._zod.parse=(t,n)=>{let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>lf(i,r)):lf(o,r)}});function lf(r,e){return!r.issues.length&&r.value===void 0&&r.issues.push({code:"invalid_type",expected:"nonoptional",input:r.value,inst:e}),r}var Bp=P("$ZodSuccess",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Dt("ZodSuccess");let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(i=>(t.value=i.issues.length===0,t)):(t.value=o.issues.length===0,t)}});function uf(r,e,t,n){return e.issues.length?(r.value=t.catchValue({...e,value:r.value,error:{issues:e.issues.map(o=>Ke(o,n,Pe()))},input:r.value}),r):(r.value=e.value,e.memo&&(r.memo=!0),r)}var qp=P("$ZodCatch",(r,e)=>{te.init(r,e),ie(r,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ie(r,"optout",t=>t.def.innerType._zod.optout),ie(r,"values",t=>t.def.innerType._zod.values),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);let o=e.innerType._zod.run({value:t.value,issues:[]},n);return o instanceof Promise?o.then(i=>uf(t,i,e,n)):uf(t,o,e,n)}}),Wp=P("$ZodNaN",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>((typeof t.value!="number"||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:r,expected:"nan",code:"invalid_type"}),t)}),xi=P("$ZodPipe",(r,e)=>{te.init(r,e),ie(r,"values",t=>t.def.in._zod.values),ie(r,"optin",t=>t.def.in._zod.optin),ie(r,"optout",t=>t.def.out._zod.optout),ie(r,"propValues",t=>t.def.in._zod.propValues),r._zod.parse=(t,n)=>{if(n.direction==="backward"){let i=e.out._zod.run(t,n);return i instanceof Promise?i.then(s=>ei(s,e.in,n)):ei(i,e.in,n)}let o=e.in._zod.run(t,n);return o instanceof Promise?o.then(i=>ei(i,e.out,n)):ei(o,e.out,n)}});function ei(r,e,t){return r.issues.some(n=>n.code!=="unrecognized_keys")?(r.aborted=!0,r):e._zod.run({value:r.value,issues:r.issues},t)}var Lr=P("$ZodCodec",(r,e)=>{te.init(r,e),ie(r,"values",t=>t.def.in._zod.values),ie(r,"optin",t=>t.def.in._zod.optin),ie(r,"optout",t=>t.def.out._zod.optout),ie(r,"propValues",t=>t.def.in._zod.propValues),r._zod.parse=(t,n)=>{if((n.direction||"forward")==="forward"){let i=e.in._zod.run(t,n);return i instanceof Promise?i.then(s=>ti(s,e,n)):ti(i,e,n)}else{let i=e.out._zod.run(t,n);return i instanceof Promise?i.then(s=>ti(s,e,n)):ti(i,e,n)}}});function ti(r,e,t){if(r.issues.length)return r.aborted=!0,r;if((t.direction||"forward")==="forward"){let o=e.transform(r.value,r);return o instanceof Promise?o.then(i=>oi(r,i,e.out,t)):oi(r,o,e.out,t)}else{let o=e.reverseTransform(r.value,r);return o instanceof Promise?o.then(i=>oi(r,i,e.in,t)):oi(r,o,e.in,t)}}function oi(r,e,t,n){return r.issues.length?(r.aborted=!0,r):t._zod.run({value:e,issues:r.issues},n)}var Zp=P("$ZodPreprocess",(r,e)=>{xi.init(r,e)}),Gp=P("$ZodReadonly",(r,e)=>{te.init(r,e),ie(r,"propValues",t=>t.def.innerType._zod.propValues),ie(r,"values",t=>t.def.innerType._zod.values),ie(r,"optin",t=>t.def.innerType?._zod?.optin),ie(r,"optout",t=>t.def.innerType?._zod?.optout),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);let o=e.innerType._zod.run(t,n);return o instanceof Promise?o.then(mf):mf(o)}});function mf(r){return r.memo||(r.value=Object.freeze(r.value)),r}var Kp=P("$ZodTemplateLiteral",(r,e)=>{te.init(r,e);let t=[];for(let n of e.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let o=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let i=o.startsWith("^")?1:0,s=o.endsWith("$")?o.length-1:o.length;t.push(o.slice(i,s))}else if(n===null||Ia.has(typeof n))t.push(it(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);r._zod.pattern=new RegExp(`^${t.join("")}$`),r._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:r,expected:"string",code:"invalid_type"}),n):(r._zod.pattern.lastIndex=0,r._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:r,code:"invalid_format",format:e.format??"template_literal",pattern:r._zod.pattern.source}),n)}),Jp=P("$ZodFunction",(r,e)=>(te.init(r,e),Object.defineProperty(r,"_def",{value:e}),r._zod.def=e,r.implement=t=>{if(typeof t!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=r._def.input?jn(r._def.input,n):n,i=Reflect.apply(t,this,o);return r._def.output?jn(r._def.output,i):i},"_zod",{value:r._zod,enumerable:!1})},r.implementAsync=t=>{if(typeof t!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=r._def.input?await Fn(r._def.input,n):n,i=await Reflect.apply(t,this,o);return r._def.output?await Fn(r._def.output,i):i},"_zod",{value:r._zod,enumerable:!1})},r._zod.parse=(t,n)=>typeof t.value!="function"?(t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:r}),t):(r._def.output&&r._def.output._zod.def.type==="promise"?t.value=r.implementAsync(t.value):t.value=r.implement(t.value),t),r.input=(...t)=>{let n=r.constructor;return Array.isArray(t[0])?new n({type:"function",input:new fi({type:"tuple",items:t[0],rest:t[1]}),output:r._def.output}):new n({type:"function",input:t[0],output:r._def.output})},r.output=t=>{let n=r.constructor;return new n({type:"function",input:r._def.input,output:t})},r)),Hp=P("$ZodPromise",(r,e)=>{te.init(r,e),r._zod.parse=(t,n)=>Promise.resolve(t.value).then(o=>e.innerType._zod.run({value:o,issues:[]},n))}),jr=P("$ZodLazy",(r,e)=>{te.init(r,e),za(r._zod,"innerType",()=>{let t=e;return t._cachedInner||(t._cachedInner=e.getter()),t._cachedInner}),ie(r,"pattern",t=>t.innerType?._zod?.pattern),ie(r,"propValues",t=>t.innerType?._zod?.propValues),ie(r,"optin",t=>t.innerType?._zod?.optin??void 0),ie(r,"optout",t=>t.innerType?._zod?.optout??void 0),r._zod.parse=(t,n)=>r._zod.innerType._zod.run(t,n)}),Xp=P("$ZodCustom",(r,e)=>{be.init(r,e),te.init(r,e),r._zod.parse=(t,n)=>t,r._zod.check=t=>{let n=t.value,o=e.fn(n);if(o instanceof Promise)return o.then(i=>hf(i,t,n,r));hf(o,t,n,r)}});function hf(r,e,t,n){if(!r){let o={code:"custom",input:t,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),e.issues.push(zo(o))}}var Si=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},Qp="~memo",bf=[];function Yp(r){return r.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Sf=new WeakMap;function ed(r,e){let t=Sf.get(r);if(t!==void 0)return t;if(e.has(r))return!0;e.add(r);let n=!1,o=c=>{!n&&c?._zod&&ed(c,e)&&(n=!0)},i=r._zod.def,s=i.type;switch(s){case"object":{for(let c of Reflect.ownKeys(i.shape))o(i.shape[c]);o(i.catchall);break}case"array":o(i.element);break;case"tuple":for(let c of i.items)o(c);o(i.rest);break;case"record":case"map":o(i.keyType),o(i.valueType);break;case"set":o(i.valueType);break;case"union":for(let c of i.options)o(c);break;case"intersection":o(i.left),o(i.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(i.innerType);break;case"pipe":o(i.in),o(i.out);break;case"function":o(i.input),o(i.output);break;case"lazy":o(r._zod.innerType);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 c in i){let u=Object.getOwnPropertyDescriptor(i,c);if(!u||u.get)continue;let m=u.value;if(!(!m||typeof m!="object")){if(m._zod)o(m);else if(Array.isArray(m))for(let h of m)o(h)}}}return e.delete(r),Sf.set(r,n),n}function td(r){return ed(r,new Set)}function y0(r,e){let t=r.buckets.get(e);return t||(t=new Map,r.buckets.set(e,t)),t}var yi,bi=[],b0={alloc(r,e,t){let n=yi;if(!n)return t;yi=void 0;let o={value:t,issues:null};return n.set(e.value,o),bi.push(o),t},guard(r){var e;(e=r._zod).deferred??(e.deferred=[]),r._zod.deferred.push(()=>{let t=r._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&zi(i,o.value))throw new Si;return t(o,i)};r._zod.parse=n,r._zod.run===t&&(r._zod.run=n)})},attach(r){var e;let t,n,o;(e=r._zod).deferred??(e.deferred=[]),r._zod.deferred.push(()=>{let i=r._zod.parse,s=(c,u)=>{if(t===void 0&&(t=ed(r,new Set),!t))return r._zod.parse=i,r._zod.run===s&&(r._zod.run=i),i(c,u);let m=c.value;if(m===null||typeof m!="object")return i(c,u);let h=u[Qp];h||(h={buckets:new Map,backEdges:void 0},u[Qp]=h);let g;n===u?g=o:(g=y0(h,r),n=u,o=g);let y=g.get(m);if(y)return c.value=y.value,y.issues?y.issues.length&&c.issues.push(...Yp(y.issues)):(c.memo=!0,h.backEdges??(h.backEdges=new Set),h.backEdges.add(y.value)),c;yi=g;let S=bi.length,w=i(c,u);yi=void 0;let T=bi.length>S?bi.pop():void 0;return w instanceof Promise?w.then(M=>(T&&(T.issues=M.issues.length?Yp(M.issues):bf),M)):(T&&(T.issues=w.issues.length?Yp(w.issues):bf),w)};r._zod.parse=s,r._zod.run===i&&(r._zod.run=s)})}};function Fr(){return b0}function zi(r,e){let t=r[Qp]?.backEdges;return t!==void 0&&e!==null&&typeof e=="object"&&t.has(e)}var Vr={};It(Vr,{ar:()=>zf,az:()=>vf,be:()=>If,bg:()=>kf,bn:()=>$f,ca:()=>Tf,ckb:()=>Pf,cs:()=>Cf,da:()=>Of,de:()=>Rf,el:()=>Mf,en:()=>vi,eo:()=>Ef,es:()=>Df,fa:()=>Af,fi:()=>_f,fr:()=>Lf,frCA:()=>jf,gu:()=>Ff,he:()=>Nf,hi:()=>Vf,hr:()=>Uf,hu:()=>Bf,hy:()=>Wf,id:()=>Zf,is:()=>Gf,it:()=>Kf,ja:()=>Jf,ka:()=>Hf,kh:()=>Xf,km:()=>wi,kn:()=>Yf,ko:()=>Qf,lt:()=>tg,mk:()=>og,ms:()=>rg,ne:()=>ng,nl:()=>ig,nn:()=>sg,no:()=>ag,ota:()=>cg,pl:()=>dg,ps:()=>pg,pt:()=>lg,ptBR:()=>ug,ro:()=>mg,ru:()=>fg,sk:()=>gg,sl:()=>xg,sv:()=>yg,ta:()=>bg,th:()=>Sg,tk:()=>zg,tr:()=>vg,ua:()=>wg,uk:()=>Ii,ur:()=>Ig,uz:()=>kg,vi:()=>$g,yo:()=>Cg,zhCN:()=>Tg,zhTW:()=>Pg});var S0=()=>{let r={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function e(o){return r[o]??null}let t={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${E(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${t[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${C(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function zf(){return{localeError:S0()}}var z0=()=>{let r={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function e(o){return r[o]??null}let t={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",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${E(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${t[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function vf(){return{localeError:z0()}}function wf(r,e,t,n){let o=Math.abs(r),i=o%10,s=o%100;return s>=11&&s<=19?n:i===1?e:i>=2&&i<=4?t:n}var v0=()=>{let r={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function e(o){return r[o]??null}let t={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${E(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);if(s){let c=Number(o.maximum),u=wf(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);if(s){let c=Number(o.minimum),u=wf(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${t[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${C(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function If(){return{localeError:v0()}}var w0=()=>{let r={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function e(o){return r[o]??null}let t={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${E(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${t[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${C(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function kf(){return{localeError:w0()}}var I0=()=>{let r={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function e(o){return r[o]??null}let t={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${i}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${c}`}case"invalid_value":return o.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${E(o.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${C(o.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} ${s.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${i.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${o.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${o.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o.options.map(s=>`'${s}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function $f(){return{localeError:I0()}}var k0=()=>{let r={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function e(o){return r[o]??null}let t={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${E(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${C(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",s=e(o.origin);return s?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",s=e(o.origin);return s?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${t[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}};function Tf(){return{localeError:k0()}}var $0=()=>{let r={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function e(o){return r[o]??null}let t={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},n={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s,u=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(h=>c.endsWith(h))?"\u06CC\u06D5":"\u06D5",m=/^[a-zA-Z]+$/.test(c);return s==="null"||s==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${i} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${c}${m?"":u}`}case"invalid_value":return o.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${E(o.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${C(o.values,"|")}`;case"too_big":{let i=e(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let i=e(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${i.prefix}"`:i.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${i.suffix}"`:i.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${i.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:i.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${i.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${t[i.format]??o.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${o.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${C(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${o.options.map(s=>`'${s}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${o.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function Pf(){return{localeError:$0()}}var T0=()=>{let r={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function e(o){return r[o]??null}let t={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${E(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${t[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${C(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function Cf(){return{localeError:T0()}}var P0=()=>{let r={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function e(o){return r[o]??null}let t={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${E(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=n[o.origin]??o.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=n[o.origin]??o.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${o.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${t[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${C(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}};function Of(){return{localeError:P0()}}var C0=()=>{let r={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function e(o){return r[o]??null}let t={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${E(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${t[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${C(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Rf(){return{localeError:C0()}}var O0=()=>{let r={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function e(o){return r[o]??null}let t={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${E(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${t[i.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${C(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Mf(){return{localeError:O0()}}var R0=()=>{let r={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 e(i){return r[i]??null}let t={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",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):n[i]??i}return i=>{switch(i.code){case"invalid_type":{let s=o(i.expected),c=D(i.input),u=o(c,i.input);return`Invalid input: expected ${s}, received ${u}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${E(i.values[0])}`:`Invalid option: expected one of ${C(i.values,"|")}`;case"too_big":{let s=i.exact?"exactly ":i.inclusive?"<=":"<",c=e(i.origin);return c?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${c.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{let s=i.exact?"exactly ":i.inclusive?">=":">",c=e(i.origin);return c?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${c.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${t[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(c=>`'${c}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function vi(){return{localeError:R0()}}var M0=()=>{let r={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function e(o){return r[o]??null}let t={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${E(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${t[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${C(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function Ef(){return{localeError:M0()}}var E0=()=>{let r={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(o){return r[o]??null}let t={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${E(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${o.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${t[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function Df(){return{localeError:E0()}}var D0=()=>{let r={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function e(o){return r[o]??null}let t={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${E(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${C(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${t[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${C(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Af(){return{localeError:D0()}}var A0=()=>{let r={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function e(o){return r[o]??null}let t={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${E(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${t[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${C(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function _f(){return{localeError:A0()}}var _0=()=>{let r={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(o){return r[o]??null}let t={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instance de ${o.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${E(o.values[0])} attendu`:`Option invalide : une valeur parmi ${C(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Trop grand : ${n[o.origin]??"valeur"} doit ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Trop petit : ${n[o.origin]??"valeur"} doit ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${i.pattern}`:`${t[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${C(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function Lf(){return{localeError:_0()}}var L0=()=>{let r={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function e(o){return r[o]??null}let t={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${E(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",s=e(o.origin);return s?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",s=e(o.origin);return s?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${t[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${C(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function jf(){return{localeError:L0()}}var j0=()=>{let r={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function e(o){return r[o]??null}let t={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${i}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${c}`}case"invalid_value":return o.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${E(o.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${C(o.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} ${s.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${i.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${o.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${o.keys.length>1?"\u0A93":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o.options.map(s=>`'${s}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function Ff(){return{localeError:j0()}}var F0=()=>{let r={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},e={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},t=m=>m?r[m]:void 0,n=m=>{let h=t(m);return h?h.label:m??r.unknown.label},o=m=>`\u05D4${n(m)}`,i=m=>(t(m)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=m=>m?e[m]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return m=>{switch(m.code){case"invalid_type":{let h=m.expected,g=u[h??""]??n(h),y=D(m.input),S=u[y]??r[y]?.label??y;return/^[A-Z]/.test(m.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${m.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${S}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}, \u05D4\u05EA\u05E7\u05D1\u05DC ${S}`}case"invalid_value":{if(m.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${E(m.values[0])}`;let h=m.values.map(S=>E(S));if(m.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h[0]} \u05D0\u05D5 ${h[1]}`;let g=h[h.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h.slice(0,-1).join(", ")} \u05D0\u05D5 ${g}`}case"too_big":{let h=s(m.origin),g=o(m.origin??"value");if(m.origin==="string")return`${h?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${m.maximum.toString()} ${h?.unit??""} ${m.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(m.origin==="number"){let w=m.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${m.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${m.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${w}`}if(m.origin==="array"||m.origin==="set"){let w=m.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",T=m.inclusive?`${m.maximum} ${h?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${m.maximum} ${h?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${g} ${w} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`.trim()}let y=m.inclusive?"<=":"<",S=i(m.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.maximum.toString()}`}case"too_small":{let h=s(m.origin),g=o(m.origin??"value");if(m.origin==="string")return`${h?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${m.minimum.toString()} ${h?.unit??""} ${m.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(m.origin==="number"){let w=m.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${m.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${m.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${w}`}if(m.origin==="array"||m.origin==="set"){let w=m.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(m.minimum===1&&m.inclusive){let M=(m.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${w} \u05DC\u05D4\u05DB\u05D9\u05DC ${M}`}let T=m.inclusive?`${m.minimum} ${h?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${m.minimum} ${h?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${g} ${w} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`.trim()}let y=m.inclusive?">=":">",S=i(m.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${g} ${S} ${y}${m.minimum.toString()}`}case"invalid_format":{let h=m;if(h.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${h.prefix}"`;if(h.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${h.suffix}"`;if(h.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${h.includes}"`;if(h.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${h.pattern}`;let g=c[h.format],y=g?.label??h.format,w=(g?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${y} \u05DC\u05D0 ${w}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${m.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${m.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${m.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${C(m.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(m.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Nf(){return{localeError:F0()}}var N0=()=>{let r={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function e(o){return r[o]??null}let t={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${c}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${E(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${i}${o.maximum} ${s.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum} \u0939\u094B`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} \u092E\u0947\u0902 ${i}${o.minimum} ${s.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} ${i}${o.minimum} \u0939\u094B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${i.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${i.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${o.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${o.keys.length>1?"\u092F\u093E\u0901":""}: ${C(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${o.origin} \u092E\u0947\u0902`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(s=>`'${s}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Vf(){return{localeError:N0()}}var V0=()=>{let r={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function e(o){return r[o]??null}let t={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${E(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${o.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=n[o.origin]??o.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${o.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${t[i.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${C(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[o.origin]??o.origin}`;default:return"Neispravan unos"}}};function Uf(){return{localeError:V0()}}var U0=()=>{let r={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function e(o){return r[o]??null}let t={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${E(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${t[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Bf(){return{localeError:U0()}}function qf(r,e,t){return Math.abs(r)===1?e:t}function Po(r){if(!r)return"";let e=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],t=r[r.length-1];return r+(e.includes(t)?"\u0576":"\u0568")}var B0=()=>{let r={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function e(o){return r[o]??null}let t={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${E(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);if(s){let c=Number(o.maximum),u=qf(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Po(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Po(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);if(s){let c=Number(o.minimum),u=qf(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Po(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Po(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${t[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${C(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Po(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Po(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Wf(){return{localeError:B0()}}var q0=()=>{let r={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function e(o){return r[o]??null}let t={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${E(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${t[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};function Zf(){return{localeError:q0()}}var W0=()=>{let r={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function e(o){return r[o]??null}let t={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${E(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${t[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${C(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function Gf(){return{localeError:W0()}}var Z0=()=>{let r={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function e(o){return r[o]??null}let t={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${E(o.values[0])}`:`Opzione non valida: atteso uno tra ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${t[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${C(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};function Kf(){return{localeError:Z0()}}var G0=()=>{let r={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function e(o){return r[o]??null}let t={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${E(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${C(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=e(o.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=e(o.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${t[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${C(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Jf(){return{localeError:G0()}}var K0=()=>{let r={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function e(o){return r[o]??null}let t={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${E(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${C(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${C(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Hf(){return{localeError:K0()}}var J0=()=>{let r={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function e(o){return r[o]??null}let t={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${E(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${C(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function wi(){return{localeError:J0()}}function Xf(){return wi()}var H0=()=>{let r={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function e(o){return r[o]??null}let t={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",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 \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${c}`}case"invalid_value":return o.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${E(o.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.maximum.toString()} ${s.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.minimum.toString()} ${s.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${i.prefix}"`:i.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${i.suffix}"`:i.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${i.includes}"`:i.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${i.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${o.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.options.map(s=>`'${s}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${o.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function Yf(){return{localeError:H0()}}var X0=()=>{let r={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function e(o){return r[o]??null}let t={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${E(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${C(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=e(o.origin),u=c?.unit??"\uC694\uC18C";return c?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${u} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${s}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=e(o.origin),u=c?.unit??"\uC694\uC18C";return c?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${u} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${t[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${C(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Qf(){return{localeError:X0()}}var Nr=r=>r.charAt(0).toUpperCase()+r.slice(1);function eg(r){let e=Math.abs(r),t=e%10,n=e%100;return n>=11&&n<=19||t===0?"many":t===1?"one":"few"}var Y0=()=>{let r={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function e(o,i,s,c){let u=r[o]??null;return u===null?u:{unit:u.unit[i],verb:u.verb[c][s?"inclusive":"notInclusive"]}}let t={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${E(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${C(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=n[o.origin]??o.origin,s=e(o.origin,eg(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${Nr(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.maximum.toString()} ${s.unit??"element\u0173"}`;let c=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Nr(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${o.maximum.toString()} ${s?.unit}`}case"too_small":{let i=n[o.origin]??o.origin,s=e(o.origin,eg(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${Nr(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.minimum.toString()} ${s.unit??"element\u0173"}`;let c=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Nr(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${o.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${t[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${C(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=n[o.origin]??o.origin;return`${Nr(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function tg(){return{localeError:Y0()}}var Q0=()=>{let r={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function e(o){return r[o]??null}let t={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${E(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${C(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function og(){return{localeError:Q0()}}var ew=()=>{let r={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function e(o){return r[o]??null}let t={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${E(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Terlalu besar: dijangka ${o.origin??"nilai"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Terlalu kecil: dijangka ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${t[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${C(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};function rg(){return{localeError:ew()}}var tw=()=>{let r={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function e(o){return r[o]??null}let t={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${c}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${E(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} \u092E\u093E ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} \u092E\u093E ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} ${i}${o.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${i.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${o.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${o.keys.length>1?"\u0939\u0930\u0942":""}: ${C(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${o.origin} \u092E\u093E`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(s=>`'${s}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function ng(){return{localeError:tw()}}var ow=()=>{let r={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function e(o){return r[o]??null}let t={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${E(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin),c=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin),c=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${t[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};function ig(){return{localeError:ow()}}var rw=()=>{let r={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function e(o){return r[o]??null}let t={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tal",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventa instanceof ${o.expected}, fekk ${c}`:`Ugyldig input: forventa ${i}, fekk ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventa ${E(o.values[0])}`:`Ugyldig val: forventa eitt av ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${s.unit??"element"}`:`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${s.unit}`:`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${t[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${C(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function sg(){return{localeError:rw()}}var nw=()=>{let r={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function e(o){return r[o]??null}let t={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${E(o.values[0])}`:`Ugyldig valg: forventet en av ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${t[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${C(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function ag(){return{localeError:nw()}}var iw=()=>{let r={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function e(o){return r[o]??null}let t={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${E(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${t[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function cg(){return{localeError:iw()}}var sw=()=>{let r={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function e(o){return r[o]??null}let t={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${E(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${C(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${t[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${C(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function pg(){return{localeError:sw()}}var aw=()=>{let r={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function e(o){return r[o]??null}let t={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${E(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${t[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${C(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function dg(){return{localeError:aw()}}var cw=()=>{let r={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(s){return r[s]??null}let t={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tuplo",articles:n.masculine},record:{name:"registo",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"ficheiro",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(s,c){let u=o[s]??{name:`valor "${s}"`,articles:n.masculine};return`${u.articles[c]} ${u.name}`}return s=>{switch(s.code){case"invalid_type":{let c=i(s.expected,"indefinite"),u=D(s.input),m=i(u,"indefinite");return`Entrada inv\xE1lida: esperava ${c}, recebeu ${m}`}case"invalid_value":return s.values.length===1?`Entrada inv\xE1lida: esperava ${E(s.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${C(s.values,"|")}`;case"too_big":{let c=s.inclusive?"<=":"<",u=e(s.origin);return u?`Demasiado grande: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.maximum.toString()} ${u.unit??"elementos"}`:`Demasiado grande: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.maximum.toString()}`}case"too_small":{let c=s.inclusive?">=":">",u=e(s.origin);return u?`Demasiado pequeno: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.minimum.toString()} ${u.unit??"elementos"}`:`Demasiado pequeno: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.minimum.toString()}`}case"invalid_format":{let c=s;return c.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${c.prefix}"`:c.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${c.suffix}"`:c.format==="includes"?`Texto inv\xE1lido: deve incluir "${c.includes}"`:c.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${c.pattern}`:`Formato d${t[c.format]??s.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${s.divisor}`;case"unrecognized_keys":{let c=s.keys.length>1?"s":"";return`Chave${c} inv\xE1lida${c}: ${C(s.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${s.options.map(u=>`'${u}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function lg(){return{localeError:cw()}}var pw=()=>{let r={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function e(s){return r[s]??null}let t={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tupla",articles:n.feminine},record:{name:"registro",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"arquivo",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(s,c){let u=o[s]??{name:`valor "${s}"`,articles:n.masculine};return`${u.articles[c]} ${u.name}`}return s=>{switch(s.code){case"invalid_type":{let c=i(s.expected,"indefinite"),u=D(s.input),m=i(u,"indefinite");return`Entrada inv\xE1lida: esperava ${c}, recebeu ${m}`}case"invalid_value":return s.values.length===1?`Entrada inv\xE1lida: esperava ${E(s.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${C(s.values,"|")}`;case"too_big":{let c=s.inclusive?"<=":"<",u=e(s.origin);return u?`Grande demais: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.maximum.toString()} ${u.unit??"elementos"}`:`Grande demais: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.maximum.toString()}`}case"too_small":{let c=s.inclusive?">=":">",u=e(s.origin);return u?`Pequeno demais: esperava que ${i(s.origin,"definite")} tivesse ${c} ${s.minimum.toString()} ${u.unit??"elementos"}`:`Pequeno demais: esperava que ${i(s.origin,"definite")} fosse ${c} ${s.minimum.toString()}`}case"invalid_format":{let c=s;return c.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${c.prefix}"`:c.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${c.suffix}"`:c.format==="includes"?`Texto inv\xE1lido: deve incluir "${c.includes}"`:c.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${c.pattern}`:`Formato d${t[c.format]??s.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${s.divisor}`;case"unrecognized_keys":{let c=s.keys.length>1?"s":"";return`Chave${c} inv\xE1lida${c}: ${C(s.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${s.options.map(u=>`'${u}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(s.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function ug(){return{localeError:pw()}}var dw=()=>{let r={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function e(o){return r[o]??null}let t={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${E(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Prea mic: a\u0219teptat ca ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${t[i.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${C(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}};function mg(){return{localeError:dw()}}function hg(r,e,t,n){let o=Math.abs(r),i=o%10,s=o%100;return s>=11&&s<=19?n:i===1?e:i>=2&&i<=4?t:n}var lw=()=>{let r={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function e(o){return r[o]??null}let t={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${E(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);if(s){let c=Number(o.maximum),u=hg(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);if(s){let c=Number(o.minimum),u=hg(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${C(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function fg(){return{localeError:lw()}}var uw=()=>{let r={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function e(o){return r[o]??null}let t={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${o.expected}, obdr\u017Ean\xE9 ${c}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${i}, obdr\u017Ean\xE9 ${c}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${E(o.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.maximum.toString()} ${s.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.minimum.toString()} ${s.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${i.includes}"`:i.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${t[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${C(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function gg(){return{localeError:uw()}}var mw=()=>{let r={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function e(o){return r[o]??null}let t={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${E(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${t[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${C(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};function xg(){return{localeError:mw()}}var hw=()=>{let r={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function e(o){return r[o]??null}let t={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${E(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${t[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${C(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function yg(){return{localeError:hw()}}var fw=()=>{let r={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function e(o){return r[o]??null}let t={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${E(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${C(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function bg(){return{localeError:fw()}}var gw=()=>{let r={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function e(o){return r[o]??null}let t={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${E(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=e(o.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=e(o.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${t[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${C(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Sg(){return{localeError:gw()}}var xw=()=>{let r={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function e(o){return r[o]??null}let t={regex:"giri\u015F",email:"e-po\xE7ta salgysy",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 sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",jwt:"JWT",template_literal:"\u015Fablon"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return`N\xE4dogry baha: gara\u015Fylan ${i} \xFDerine ${c} alyndy`}case"invalid_value":return o.values.length===1?`N\xE4dogry baha: ${E(o.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()} ${s.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`N\xE4dogry setir: "${i.prefix}" bilen ba\u015Flamaly`:i.format==="ends_with"?`N\xE4dogry setir: "${i.suffix}" bilen gutarmaly`:i.format==="includes"?`N\xE4dogry setir: "${i.includes}" saklamaly`:i.format==="regex"?`N\xE4dogry setir: ${i.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${t[i.format]??o.format}`}case"not_multiple_of":return`N\xE4dogry san: ${o.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${o.keys.length>1?"lar":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${o.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function zg(){return{localeError:xw()}}var yw=()=>{let r={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function e(o){return r[o]??null}let t={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${E(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${t[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function vg(){return{localeError:yw()}}var bw=()=>{let r={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function e(o){return r[o]??null}let t={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${E(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${C(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Ii(){return{localeError:bw()}}function wg(){return Ii()}var Sw=()=>{let r={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function e(o){return r[o]??null}let t={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${E(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${C(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${C(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Ig(){return{localeError:Sw()}}var zw=()=>{let r={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function e(o){return r[o]??null}let t={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${E(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${t[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function kg(){return{localeError:zw()}}var vw=()=>{let r={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function e(o){return r[o]??null}let t={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${E(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${t[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${C(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function $g(){return{localeError:vw()}}var ww=()=>{let r={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function e(o){return r[o]??null}let t={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${E(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${t[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${C(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Tg(){return{localeError:ww()}}var Iw=()=>{let r={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function e(o){return r[o]??null}let t={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${E(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${t[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${C(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Pg(){return{localeError:Iw()}}var kw=()=>{let r={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function e(o){return r[o]??null}let t={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=D(o.input),c=n[s]??s;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${E(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${C(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=e(o.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${s.verb} ${i}${o.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",s=e(o.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${s.verb} ${i}${o.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${t[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${C(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Cg(){return{localeError:kw()}}var Og,od=Symbol("ZodOutput"),rd=Symbol("ZodInput"),ki=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 o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function $i(){return new ki}(Og=globalThis).__zod_globalRegistry??(Og.__zod_globalRegistry=$i());var _e=globalThis.__zod_globalRegistry;var Qe=Symbol.for("zod.compile.invalid"),Rg=Symbol.for("zod.compile.fallback"),pt=class extends Error{constructor(e="z.compile does not support async refinements, transforms, or checks"){super(e),this.name="ZodCompileAsyncError"}},de=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=t}};function Tw(r,e){try{return Ti(r,{assertOnly:!0})}catch{return e}}function ad(r,e){try{let t=Ti(r),n=he(r),o=r._zod.run,i=o.__originalRun??o,s=(c,u)=>{if(u?.async||u?.direction==="backward"||u?.skipChecks||u?.[Rg]||u&&zi(u,c.value))return i(c,u);let m=t(c.value);return m!==Qe?(c.value=m,c):(u&&(u[Rg]=!0),i(c,u))};return s.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=Tw(r,t),n._zod.run=s,o.__originalRun||Pw(n,r,t),n}catch(t){if(e?.strict)throw t;return r}}function Pw(r,e,t){let n=r,o=e;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(s,c)=>{let u=t(s);return u!==Qe?{success:!0,data:u}:i(s,c)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(s,c)=>{let u=t(s);return u!==Qe?u:i(s,c)}}}function Ti(r,e){let t=!0;try{t=td(r)}catch{}if(t)throw new de("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0},o=new Yt(["input"]),i=Ie(o,n,r,"input",!e?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let s=["INVALID",...n.constants.keys()],c=[Qe,...n.constants.values()],u=o.content.join(`
75
+ `),m=e?.debug?s.length>0?`// Constants: ${s.join(", ")}
76
+ ${u}`:u:"",h=Function,g=`return (input) => {
77
+ ${u}
78
+ }`,y;try{y=new h(...s,g)(...c)}catch(S){throw new de(`this schema (generated code failed to evaluate: ${S.message})`)}return e?.debug&&(y.code=m),y}function Q(r,e){for(let[n,o]of r.constants)if(o===e)return n;let t=`c${r.constantCounter++}`;return r.constants.set(t,e),t}function ee(r){return`v${r.varCounter++}`}function Cw(r,e){let t=r._zod.run({value:e,issues:[]},{});if(t&&typeof t.then=="function")return Qe;let n=t;return n.issues.length===0?n.value:Qe}function Ve(r,e,t,n,o=!0){let i=r.content.length,s=e.constants.size,c=e.constantCounter,u=e.varCounter;try{return Ie(r,e,t,n,o)}catch(m){if(!(m instanceof de)||!m.islandable)throw m;if(r.content.length=i,e.constants.size>s){let h=Array.from(e.constants.keys()).slice(s);for(let g of h)e.constants.delete(g)}return e.constantCounter=c,e.varCounter=u,Ow(r,e,t,n)}}function Ow(r,e,t,n){let o=Q(e,t),i=Q(e,Cw),s=ee(e);return r.write(`const ${s} = ${i}(${o}, ${n});`),r.write(`if (${s} === INVALID) return INVALID;`),s}var Rw=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Mw(r,e,t,n){let o=t._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let s of o){let c=s._zod.def;if(c.when&&!Rw.has(c.check))throw new de('check with a custom "when" condition');switch(c.check){case"greater_than":Ew(r,e,c,i);break;case"less_than":Dw(r,e,c,i);break;case"multiple_of":Aw(r,e,c,i);break;case"number_format":Ag(r,c,i);break;case"min_length":{let u=eo(c.minimum,"min_length"),m=nd(r,e,i,`${i}.length >= ${u} && ${i}.length < ${c.minimum*2}`);r.write(`if (${m} < ${u}) return INVALID;`);break}case"max_length":{let u=eo(c.maximum,"max_length"),m=nd(r,e,i,`${i}.length > ${u}`);r.write(`if (${m} > ${u}) return INVALID;`);break}case"length_equals":{let u=eo(c.length,"length_equals"),m=nd(r,e,i,`${i}.length >= ${u} && ${i}.length <= ${c.length*2}`);r.write(`if (${m} !== ${u}) return INVALID;`);break}case"min_size":r.write(`if (${i}.size < ${eo(c.minimum,"min_size")}) return INVALID;`);break;case"max_size":r.write(`if (${i}.size > ${eo(c.maximum,"max_size")}) return INVALID;`);break;case"size_equals":r.write(`if (${i}.size !== ${eo(c.size,"size_equals")}) return INVALID;`);break;case"string_format":i=_g(r,e,c,i);break;case"custom":i=Nw(r,e,s,i);break;case"bigint_format":_w(r,c,i);break;case"mime_type":Lw(r,e,c,i);break;case"property":jw(r,e,c,i);break;case"overwrite":{let u=ee(e);Fw(r,e,s,i,u),i=u;break}default:throw new de(`check type ${c.check}`)}}return i}function nd(r,e,t,n){let o=Q(e,Ht),i=ee(e);return r.write(`const ${i} = typeof ${t} === "string" && ${n} ? ${o}(${t}) : ${t}.length;`),i}function eo(r,e){if(typeof r!="number"||!Number.isFinite(r))throw new de(`${e} bound of type ${typeof r}`);return`${r}`}function Dg(r,e){if(typeof e=="bigint")return`${e}n`;if(typeof e=="number"){if(Number.isNaN(e))throw new de("comparison check with NaN bound");return`${e}`}if(e instanceof Date){if(Number.isNaN(e.getTime()))throw new de("comparison check with Invalid Date bound");return Q(r,e)}throw new de(`comparison check bound of type ${typeof e}`)}function Ew(r,e,t,n){let o=t.inclusive?"<":"<=";r.write(`if (${n} ${o} ${Dg(e,t.value)}) return INVALID;`)}function Dw(r,e,t,n){let o=t.inclusive?">":">=";r.write(`if (${n} ${o} ${Dg(e,t.value)}) return INVALID;`)}function Aw(r,e,t,n){if(typeof t.value=="bigint"){if(t.value===BigInt(0))throw new de("multiple_of check with a zero divisor");r.write(`if (${n} % ${t.value}n !== 0n) return INVALID;`)}else{let o=Q(e,vr);r.write(`if (${o}(${n}, ${eo(t.value,"multiple_of")}) !== 0) return INVALID;`)}}function Ag(r,e,t){let n=e.format;switch(n){case"safeint":r.write(`if (!Number.isSafeInteger(${t})) return INVALID;`);break;case"int32":r.write(`if (!Number.isInteger(${t}) || ${t} < -2147483648 || ${t} > 2147483647) return INVALID;`);break;case"uint32":r.write(`if (!Number.isInteger(${t}) || ${t} < 0 || ${t} > 4294967295) return INVALID;`);break;case"float32":r.write(`if (!Number.isFinite(${t}) || ${t} < -3.4028234663852886e38 || ${t} > 3.4028234663852886e38) return INVALID;`);break;case"float64":r.write(`if (!Number.isFinite(${t})) return INVALID;`);break;default:throw new de(`number format ${n}`)}}function _w(r,e,t){let n=e.format;if(n)switch(n){case"int64":r.write(`if (${t} < -9223372036854775808n || ${t} > 9223372036854775807n) return INVALID;`);break;case"uint64":r.write(`if (${t} < 0n || ${t} > 18446744073709551615n) return INVALID;`);break;default:throw new de(`bigint format ${n}`)}}function Lw(r,e,t,n){let o=t.mime;if(o&&o.length>0){let i=Q(e,new Set(o));r.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function jw(r,e,t,n){let o=`${n}[${JSON.stringify(t.property)}]`;Ie(r,e,t.schema,o)}function Fw(r,e,t,n,o){let i=t._zod.def.tx;if(!i)throw new de("overwrite check without a transform function");if(ro(i))throw new pt("z.compile: async overwrite transforms are not supported");let s=Q(e,i);r.write(`const ${o} = ${s}(${n});`)}function id(){throw new Je}function cd(r){this.issues.push(r)}function Nw(r,e,t,n){let o=t._zod.def;if(o.fn){if(ro(o.fn))throw new pt("z.compile: async .refine() predicates are not supported");let i=Q(e,o.fn),s=Q(e,id),c=ee(e);return r.write(`const ${c} = ${i}(${n});`),r.write(`if (${c} instanceof Promise) ${s}();`),r.write(`if (!${c}) return INVALID;`),n}if(t._zod.check){if(ro(t._zod.check))throw new pt("z.compile: async .superRefine() / check functions are not supported");let i=t._zod.check,c=Q(e,m=>{let h={value:m,issues:[],addIssue:cd};return i(h)instanceof Promise&&id(),h.issues.length===0?h.value:Qe}),u=ee(e);return r.write(`const ${u} = ${c}(${n});`),r.write(`if (${u} === INVALID) return INVALID;`),u}throw new de("custom check without a predicate or check function")}var Vw=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function _g(r,e,t,n){let o=t.format;if(o==="base64"){let u=Q(e,Dr);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="base64url"){let u=Q(e,di);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="jwt"){let u=Q(e,ui),m=Q(e,t.alg??null);return r.write(`if (!${u}(${n}, ${m})) return INVALID;`),n}if(o==="ipv6"){let u=Q(e,Er);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="cidrv6"){let u=Q(e,pi);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(o==="credit_card"){let u=Q(e,li);return r.write(`if (!${u}(${n})) return INVALID;`),n}let i=t;if(o==="url"||o==="httpurl"||i.normalize||i.hostname!==void 0||i.protocol!==void 0){let u=Q(e,ii),m=Q(e,t),h=ee(e),g=ee(e);if(r.write(`const ${h} = ${n}.trim();`),r.write(`const ${g} = ${u}(${h}, ${m});`),r.write(`if (typeof ${g} === "number") return INVALID;`),i.hostname!==void 0){let w=Q(e,ai);r.write(`if (!${w}(${g}, ${m}.hostname)) return INVALID;`)}if(i.protocol!==void 0){let w=Q(e,ci);r.write(`if (!${w}(${g}, ${m}.protocol)) return INVALID;`)}let y=ee(e),S=i.normalize?`${g}.href`:`${Q(e,si)}(${h})`;return r.write(`const ${y} = ${S};`),y}let s=t.fn;if(s){if(ro(s))throw new de(`async string format ${o}`);let u=Q(e,s);return r.write(`if (!${u}(${n})) return INVALID;`),n}if(Vw.has(o)&&t.pattern){let u=Q(e,t.pattern);return r.write(`${u}.lastIndex = 0;`),r.write(`if (!${u}.test(${n})) return INVALID;`),n}let c=t.format;switch(c){case"regex":throw new de("regex format without a pattern");case"lowercase":r.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":r.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":r.write(`if (!${n}.includes(${Ze(t.includes)})) return INVALID;`);break;case"starts_with":{let u=t.prefix;r.write(`if (${n}.slice(0, ${u.length}) !== ${Ze(u)}) return INVALID;`);break}case"ends_with":{let u=t.suffix;r.write(`if (${n}.slice(-${u.length}) !== ${Ze(u)}) return INVALID;`);break}default:throw new de(`string format ${c}`)}return n}function Ie(r,e,t,n,o=!0){let i=t._zod.def,s=i.type;if(i.coerce)throw new de(`coercion (z.coerce.${s}())`);let c=o||!!i.checks?.length,u;switch(s){case"string":u=Uw(r,e,t,n);break;case"number":u=Bw(r,t,n);break;case"boolean":u=qw(r,n);break;case"bigint":u=Ww(r,t,n);break;case"symbol":u=Zw(r,n);break;case"undefined":u=Gw(r,n);break;case"null":u=Kw(r,n);break;case"any":case"unknown":u=n;break;case"never":r.write("return INVALID;"),u=n;break;case"void":u=Jw(r,n);break;case"nan":u=Hw(r,n);break;case"date":u=Xw(r,n);break;case"object":u=Yw(r,e,t,n,c);break;case"optional":u=Qw(r,e,t,n,c);break;case"nullable":u=oI(r,e,t,n,c);break;case"array":u=rI(r,e,t,n,c);break;case"literal":u=nI(r,e,t,n);break;case"enum":u=iI(r,e,t,n);break;case"readonly":{let m=Mg(r,e,t,n),h=ee(e);r.write(`const ${h} = Object.freeze(${m});`),u=h;break}case"success":Mg(r,e,t,n),u="true";break;case"default":case"prefault":u=sI(r,e,t,n);break;case"nonoptional":u=aI(r,e,t,n);break;case"tuple":u=cI(r,e,t,n);break;case"union":u=pI(r,e,t,n);break;case"intersection":u=uI(r,e,t,n);break;case"record":u=mI(r,e,t,n);break;case"map":u=fI(r,e,t,n);break;case"set":u=gI(r,e,t,n);break;case"file":u=xI(r,n);break;case"template_literal":u=yI(r,e,t,n);break;case"lazy":u=bI(r,e,t,n);break;case"pipe":u=SI(r,e,t,n);break;case"custom":u=zI(r,e,t,n);break;case"transform":u=II(r,e,t,n);break;case"catch":u=wI(r,e,t,n);break;default:throw new de(`schema type ${s}`)}return u===null?null:Mw(r,e,t,u)}function Uw(r,e,t,n){r.write(`if (typeof ${n} !== "string") return INVALID;`);let o=t._zod.def;return o.format===void 0?n:_g(r,e,o,n)}function Bw(r,e,t){r.write(`if (typeof ${t} !== "number" || !Number.isFinite(${t})) return INVALID;`);let n=e._zod.def;return n.check==="number_format"&&n.format&&Ag(r,{format:n.format},t),t}function qw(r,e){return r.write(`if (typeof ${e} !== "boolean") return INVALID;`),e}function Ww(r,e,t){r.write(`if (typeof ${t} !== "bigint") return INVALID;`);let n=e._zod.def;if(n.format)switch(n.format){case"int64":r.write(`if (${t} < -9223372036854775808n || ${t} > 9223372036854775807n) return INVALID;`);break;case"uint64":r.write(`if (${t} < 0n || ${t} > 18446744073709551615n) return INVALID;`);break}return t}function Zw(r,e){return r.write(`if (typeof ${e} !== "symbol") return INVALID;`),e}function Gw(r,e){return r.write(`if (${e} !== undefined) return INVALID;`),e}function Kw(r,e){return r.write(`if (${e} !== null) return INVALID;`),e}function Jw(r,e){return r.write(`if (${e} !== undefined) return INVALID;`),e}function Hw(r,e){return r.write(`if (typeof ${e} !== "number" || !Number.isNaN(${e})) return INVALID;`),e}function Xw(r,e){return r.write(`if (!(${e} instanceof Date) || Number.isNaN(${e}.getTime())) return INVALID;`),e}function Yw(r,e,t,n,o=!0){let i=t._zod.def;r.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let s=i.shape,c=Object.keys(s),u=Object.getOwnPropertySymbols(s),m=u.length?[...c,...u]:c,h=F=>typeof F=="symbol"?Q(e,F):Ze(F),g=F=>typeof F=="symbol"?`[${h(F)}]`:Ze(F),y=s;if(c.includes("__proto__"))throw new de('object shape key "__proto__"');let S=new Map;for(let F of m){let H=y[F],re=h(F),ye=ee(e);if(r.write(`const ${ye} = ${n}[${re}];`),H._zod.optin!==void 0){let ce=ee(e);r.write(`let ${ce} = (() => {`),r.indented(Re=>{let Ct=Ve(Re,e,H,ye);Re.write(`return ${Ct};`)}),r.write("})();"),H._zod.optout==="optional"?(r.write(`if (${ce} === INVALID) {`),r.indented(Re=>{Re.write(`if (${re} in ${n}) return INVALID;`),Re.write(`${ce} = undefined;`)}),r.write("}")):r.write(`if (${ce} === INVALID) return INVALID;`),S.set(F,ce)}else{tI(H)&&r.write(`if (!(${re} in ${n})) return INVALID;`);let ce=Ve(r,e,H,ye,o);ce!==null&&S.set(F,ce)}}let w=i.catchall,T="none";if(w){let F=w._zod.def.type;if(F==="never"){let H=c.map(re=>`k !== ${Ze(re)}`).join(" && ")||"true";r.write(`for (const k in ${n}) {`),r.indented(re=>{re.write(`if (${H}) return INVALID;`)}),r.write("}")}else(F==="unknown"||F==="any")&&!w._zod.def.checks?.length?T="passthrough":T="schema"}let M=ee(e),V=m.some(F=>oo(y[F])||sd(y[F]));if(!o){if(T==="schema"){let F=c.length>0?Q(e,new Set(c)):null;r.write(`for (const k in ${n}) {`),r.indented(H=>{H.write('if (k === "__proto__") continue;'),F&&H.write(`if (${F}.has(k)) continue;`);let re=ee(e);H.write(`const ${re} = ${n}[k];`),Ve(H,e,w,re,!1)}),r.write("}")}return null}if(V){r.write(`const ${M} = {};`);for(let F of m){let H=h(F),re=S.get(F);sd(y[F])?r.write(`if (${H} in ${n}) ${M}[${H}] = ${re};`):oo(y[F])?r.write(`if (${re} !== undefined || ${H} in ${n}) ${M}[${H}] = ${re};`):r.write(`${M}[${H}] = ${re};`)}}else{let F=m.map(H=>`${g(H)}: ${S.get(H)}`).join(", ");r.write(`const ${M} = { ${F} };`)}if(T!=="none"){let F=c.length>0?Q(e,new Set(c)):null;r.write(`for (const k in ${n}) {`),r.indented(H=>{if(H.write('if (k === "__proto__") continue;'),F&&H.write(`if (${F}.has(k)) continue;`),T==="passthrough")H.write(`${M}[k] = ${n}[k];`);else{let re=ee(e);H.write(`const ${re} = ${n}[k];`);let ye=Ve(H,e,w,re);H.write(`${M}[k] = ${ye};`)}}),r.write("}")}return M}function Qw(r,e,t,n,o=!0){let i=t._zod.def;if(eI(t))return Ie(r,e,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let c=ee(e),u=ee(e);return r.write(`let ${c};`),r.write(`if (${n} === undefined) {`),r.indented(m=>{m.write(`const ${u} = (() => {`),m.indented(h=>{let g=Ie(h,e,i.innerType,n);h.write(`return ${g};`)}),m.write("})();"),m.write(`if (${u} !== INVALID) ${c} = ${u};`)}),r.write("} else {"),r.indented(m=>{let h=Ie(m,e,i.innerType,n);m.write(`${c} = ${h};`)}),r.write("}"),c}let s=o?ee(e):null;return s&&r.write(`let ${s};`),r.write(`if (${n} !== undefined) {`),r.indented(c=>{let u=Ie(c,e,i.innerType,n,o);s&&u!==null&&c.write(`${s} = ${u};`)}),r.write("}"),s}function eI(r){return r._zod.traits?.has("$ZodExactOptional")===!0}function tI(r){return r._zod.optin===void 0&&to(r)}function to(r){if(r._zod.def.coerce)return!0;let e=r._zod.def;switch(e.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return e.innerType?to(e.innerType):!1;case"literal":return!!e.values?.includes(void 0);case"enum":return!!r._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return e.innerType?to(e.innerType):!0;case"catch":return!0;case"union":return e.options?e.options.some(to):!0;case"intersection":return!e.left||!e.right?!0:to(e.left)&&to(e.right);case"pipe":return e.in?to(e.in):!0;default:return!0}}function sd(r){return r._zod.optin==="optional"&&r._zod.optout==="optional"}function oo(r){let e=r._zod.def;switch(e.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!e.values?.includes(void 0);case"enum":return!!r._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return e.innerType?oo(e.innerType):!0;case"union":return e.options?e.options.some(oo):!0;case"intersection":return!e.left||!e.right||oo(e.left)||oo(e.right);case"pipe":return e.out?oo(e.out):!0;default:return!0}}function oI(r,e,t,n,o=!0){let i=t._zod.def,s=o?ee(e):null;return s&&r.write(`let ${s} = null;`),r.write(`if (${n} !== null) {`),r.indented(c=>{let u=Ie(c,e,i.innerType,n,o);s&&u!==null&&c.write(`${s} = ${u};`)}),r.write("}"),s}function rI(r,e,t,n,o=!0){let i=t._zod.def;r.write(`if (!Array.isArray(${n})) return INVALID;`);let s=o?ee(e):null,c=ee(e),u=ee(e);return s&&r.write(`const ${s} = new Array(${n}.length);`),r.write(`for (let ${c} = 0; ${c} < ${n}.length; ${c}++) {`),r.indented(m=>{m.write(`const ${u} = ${n}[${c}];`);let h=Ve(m,e,i.element,u,o);s&&h!==null&&m.write(`${s}[${c}] = ${h};`)}),r.write("}"),s}function nI(r,e,t,n){let i=t._zod.def.values;if(i.length!==1){let c=Q(e,new Set(i));return r.write(`if (!${c}.has(${n})) return INVALID;`),n}let s=i[0];if(typeof s=="number"&&Number.isNaN(s)){let c=Q(e,new Set(i));return r.write(`if (!${c}.has(${n})) return INVALID;`),n}if(typeof s=="string")r.write(`if (${n} !== ${Ze(s)}) return INVALID;`);else if(typeof s=="number"||typeof s=="boolean")r.write(`if (${n} !== ${s}) return INVALID;`);else if(s===null)r.write(`if (${n} !== null) return INVALID;`);else if(s===void 0)r.write(`if (${n} !== undefined) return INVALID;`);else if(typeof s=="bigint")r.write(`if (${n} !== ${s}n) return INVALID;`);else throw new de(`literal type ${typeof s}`);return n}function iI(r,e,t,n){let o=t._zod.values;if(!o)throw new de("enum schema without enumerated values");let i=Q(e,o);return r.write(`if (!${i}.has(${n})) return INVALID;`),n}function Mg(r,e,t,n){let o=t._zod.def;return Ie(r,e,o.innerType,n)}function sI(r,e,t,n){let o=t._zod.def,s=Object.getOwnPropertyDescriptor(t._zod.def,"defaultValue")?()=>t._zod.def.defaultValue:void 0;if(t._zod.def.type==="prefault"){if(!s)return Ie(r,e,o.innerType,n);let u=Q(e,s),m=ee(e);return r.write(`let ${m} = ${n};`),r.write(`if (${n} === undefined) ${m} = ${u}();`),Ie(r,e,o.innerType,m)}let c=ee(e);if(s){let u=Q(e,s),m=Q(e,wr);r.write(`let ${c};`),r.write(`if (${n} === undefined) {`),r.indented(h=>{h.write(`${c} = ${m}(${u}());`)}),r.write("} else {"),r.indented(h=>{let g=Ie(h,e,o.innerType,n);h.write(`${c} = ${g} === undefined ? ${m}(${u}()) : ${g};`)}),r.write("}")}else r.write(`let ${c};`),r.write(`if (${n} !== undefined) {`),r.indented(u=>{let m=Ie(u,e,o.innerType,n);u.write(`${c} = ${m};`)}),r.write("}");return c}function aI(r,e,t,n){let o=t._zod.def,i=Ie(r,e,o.innerType,n),s=ee(e);return r.write(`const ${s} = ${i};`),r.write(`if (${s} === undefined) return INVALID;`),s}function cI(r,e,t,n){let o=t._zod.def,i=o.items,s=o.rest;r.write(`if (!Array.isArray(${n})) return INVALID;`);let c=Eg(i,"optin"),u=Eg(i,"optout");s?r.write(`if (${n}.length < ${c}) return INVALID;`):r.write(`if (${n}.length < ${c} || ${n}.length > ${i.length}) return INVALID;`);let m=ee(e);r.write(`const ${m} = [];`);for(let h=0;h<i.length;h++){let g=i[h];if(h>=u)r.write(`if (${m}.length === ${h}) {`),r.indented(y=>{y.write(`if (${h} < ${n}.length) {`),y.indented(S=>{let w=ee(e);S.write(`const ${w} = ${n}[${h}];`);let T=Ve(S,e,g,w);S.write(`${m}[${h}] = ${T};`)}),y.write("} else {"),y.indented(S=>{if(sd(g)){S.write(`${m}.length = ${h};`);return}let w=ee(e),T=ee(e);S.write(`const ${w} = undefined;`),S.write(`const ${T} = (() => {`),S.indented(M=>{let V=Ve(M,e,g,w);M.write(`return ${V};`)}),S.write("})();"),S.write(`if (${T} === INVALID || ${T} === undefined) ${m}.length = ${h};`),S.write(`else ${m}[${h}] = ${T};`)}),y.write("}")}),r.write("}");else{let y=ee(e);r.write(`const ${y} = ${n}[${h}];`);let S=Ve(r,e,g,y);r.write(`${m}[${h}] = ${S};`)}}if(s){let h=ee(e),g=ee(e);r.write(`for (let ${h} = ${i.length}; ${h} < ${n}.length; ${h}++) {`),r.indented(y=>{y.write(`const ${g} = ${n}[${h}];`);let S=Ve(y,e,s,g);y.write(`${m}[${h}] = ${S};`)}),r.write("}")}return m}function Eg(r,e){for(let t=r.length-1;t>=0;t--)if(!(e==="optin"?r[t]._zod.optin!==void 0:r[t]._zod.optout==="optional"))return t+1;return 0}function pI(r,e,t,n){let o=t._zod.def,i=o.options;if(o.discriminator)return dI(r,e,o,n);if(o.inclusive===!1)throw new de("exclusive unions (z.xor)");if(i.length===0)return r.write("return INVALID;"),n;if(i.length===1)return Ie(r,e,i[0],n);if(i.every(u=>u._zod.def.type==="literal"&&!u._zod.def.checks?.length)){let u=new Set(i.flatMap(h=>h._zod.def.values)),m=Q(e,u);return r.write(`if (!${m}.has(${n})) return INVALID;`),n}let c=ee(e);r.write(`let ${c};`);for(let u=0;u<i.length;u++){let m=i[u];u===0?r.write(`${c} = (() => {`):r.write(`if (${c} === INVALID) ${c} = (() => {`),r.indented(h=>{let g=Ie(h,e,m,n);h.write(`return ${g};`)}),r.write("})();")}return r.write(`if (${c} === INVALID) return INVALID;`),c}function dI(r,e,t,n){if(t.unionFallback)throw new de("discriminated union with unionFallback");if(t.options.length===0)return r.write("return INVALID;"),n;let o=ee(e),i=ee(e);r.write(`const ${o} = ${n}?.[${Ze(t.discriminator)}];`),r.write(`let ${i};`);let s=!0,c=new Set;for(let u of t.options){let m=u._zod.propValues?.[t.discriminator];if(!m||m.size===0)throw new de("discriminated union option without static discriminator values");for(let y of m){if(c.has(y))throw new de(`duplicate discriminator value ${String(y)}`);c.add(y)}let h=Array.from(m,y=>lI(e,o,y)),g=s?"if":"else if";r.write(`${g} (${h.join(" || ")}) {`),r.indented(y=>{let S=Ie(y,e,u,n);y.write(`${i} = ${S};`)}),r.write("}"),s=!1}return r.write("else { return INVALID; }"),i}function lI(r,e,t){if(typeof t=="string")return`${e} === ${Ze(t)}`;if(typeof t=="number")return Number.isNaN(t)?`Number.isNaN(${e})`:`${e} === ${t}`;if(typeof t=="boolean")return`${e} === ${t}`;if(t===null)return`${e} === null`;if(t===void 0)return`${e} === undefined`;if(typeof t=="bigint")return`${e} === ${t}n`;if(typeof t=="symbol"){let n=Q(r,t);return`${e} === ${n}`}throw new de(`literal discriminator value ${String(t)}`)}function uI(r,e,t,n){let o=t._zod.def,i=Ve(r,e,o.left,n),s=Ve(r,e,o.right,n),c=Q(e,To),u=ee(e);return r.write(`const ${u} = ${c}(${i}, ${s});`),r.write(`if (!${u}.valid) return INVALID;`),`${u}.data`}function mI(r,e,t,n){let o=t._zod.def,i=Q(e,nt);r.write(`if (!${i}(${n})) return INVALID;`);let s=ee(e),c=ee(e),u=ee(e);r.write(`const ${s} = {};`);let m=o,h=m.partial?void 0:o.keyType._zod.values;if(h){let w=[];for(let M of h){if(!(typeof M=="string"||typeof M=="number"||typeof M=="symbol"))throw new de(`record key value ${String(M)}`);let V=typeof M=="number"?M.toString():M;if(V==="__proto__")throw new de('record key "__proto__"');w.push(V);let F=Q(e,M),H=Ie(r,e,o.keyType,F),re=ee(e);r.write(`const ${re} = ${n}[${hI(e,V)}];`);let ye=Ve(r,e,o.valueType,re);r.write(`${s}[${H}] = ${ye};`)}let T=Q(e,new Set(w));return r.write(`for (const ${c} in ${n}) {`),r.indented(M=>{M.write(`if (${T}.has(${c})) continue;`),m.mode==="loose"?M.write(`if (${c} !== "__proto__") ${s}[${c}] = ${n}[${c}];`):M.write("return INVALID;")}),r.write("}"),s}let g=o.keyType._zod.def;if(!(g.type==="string"&&g.format===void 0&&!g.coerce&&(g.checks?.length??0)===0)){let w=o.mode==="loose",T=Q(e,Ti(o.keyType)),M=Q(e,At),V=Q(e,Object.prototype.propertyIsEnumerable),F=ee(e);return r.write(`for (const ${c} of Reflect.ownKeys(${n})) {`),r.indented(H=>{H.write(`if (${c} === "__proto__") continue;`),H.write(`if (!${V}.call(${n}, ${c})) continue;`),H.write(`let ${F} = ${T}(${c});`),H.write(`if (${F} === INVALID && typeof ${c} === "string" && ${M}.test(${c})) ${F} = ${T}(Number(${c}));`),w?H.write(`if (${F} === INVALID) { ${s}[${c}] = ${n}[${c}]; continue; }`):H.write(`if (${F} === INVALID) return INVALID;`),H.write(`if (${F} === "__proto__") continue;`);let re=ee(e);H.write(`const ${re} = ${n}[${c}];`);let ye=Ve(H,e,o.valueType,re);H.write(`${s}[${F}] = ${ye};`)}),r.write("}"),s}let S=Q(e,Object.prototype.propertyIsEnumerable);return r.write(`for (const ${c} of Reflect.ownKeys(${n})) {`),r.indented(w=>{w.write(`if (${c} === "__proto__") continue;`),w.write(`if (!${S}.call(${n}, ${c})) continue;`),w.write(`if (typeof ${c} !== "string") return INVALID;`),w.write(`const ${u} = ${n}[${c}];`);let T=Ve(w,e,o.valueType,u);w.write(`${s}[${c}] = ${T};`)}),r.write("}"),s}function hI(r,e){return typeof e=="string"?Ze(e):Q(r,e)}function fI(r,e,t,n){let o=t._zod.def;r.write(`if (!(${n} instanceof Map)) return INVALID;`);let i=ee(e),s=ee(e),c=ee(e);return r.write(`const ${i} = new Map();`),r.write(`for (const [${s}, ${c}] of ${n}) {`),r.indented(u=>{let m=Ie(u,e,o.keyType,s),h=Ie(u,e,o.valueType,c);u.write(`${i}.set(${m}, ${h});`)}),r.write("}"),i}function gI(r,e,t,n){let o=t._zod.def;r.write(`if (!(${n} instanceof Set)) return INVALID;`);let i=ee(e),s=ee(e);return r.write(`const ${i} = new Set();`),r.write(`for (const ${s} of ${n}) {`),r.indented(c=>{let u=Ie(c,e,o.valueType,s);c.write(`${i}.add(${u});`)}),r.write("}"),i}function xI(r,e){return r.write(`if (!(${e} instanceof File)) return INVALID;`),e}function yI(r,e,t,n){r.write(`if (typeof ${n} !== "string") return INVALID;`);let o=t._zod.pattern;if(o){let i=Q(e,o);r.write(`${i}.lastIndex = 0;`),r.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function bI(r,e,t,n){let o=t._zod.def,i=Q(e,o.getter),s=Q(e,{parser:null});r.write(`if (!${s}.parser) {`),r.indented(u=>{u.write(`const inner = ${i}();`),u.write(`${s}.parser = function(input) {`),u.indented(m=>{m.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),m.write("return result.issues.length === 0 ? result.value : INVALID;")}),u.write("};")}),r.write("}");let c=ee(e);return r.write(`const ${c} = ${s}.parser(${n});`),r.write(`if (${c} === INVALID) return INVALID;`),c}function SI(r,e,t,n){let o=t._zod.def,i=Ie(r,e,o.in,n);if(o.transform){if(ro(o.transform))throw new pt("z.compile: async transforms in pipes are not supported");let s=o.transform,u=Q(e,h=>{let g={value:h,issues:[],addIssue:cd},y=s(h,g);return y instanceof Promise?Qe:g.issues.length===0?y:Qe}),m=ee(e);return r.write(`const ${m} = ${u}(${i});`),r.write(`if (${m} === INVALID) return INVALID;`),Ie(r,e,o.out,m)}else return Ie(r,e,o.out,i)}function ro(r){return typeof r=="function"&&(r.constructor.name==="AsyncFunction"||r[Symbol.toStringTag]==="AsyncFunction")}function zI(r,e,t,n){let o=t._zod.def;if(o.fn){if(ro(o.fn))throw new pt("z.compile: async custom predicates are not supported");let i=Q(e,o.fn),s=Q(e,id),c=ee(e);r.write(`const ${c} = ${i}(${n});`),r.write(`if (${c} instanceof Promise) ${s}();`),r.write(`if (!${c}) return INVALID;`)}else throw new de("custom schema without a predicate function");return n}function vI(r,e,t){let n=r._zod.run({value:t,issues:[]},{});if(n&&typeof n.then=="function")return Qe;let o=n;return o.issues.length===0?o.value:e()}function wI(r,e,t,n){let o=t._zod.def;if(!o.catchValue[_n])throw new de("catch with a callback (only a constant catch value compiles)",!1);let i=ee(e);r.write(`let ${i} = (() => {`),r.indented(m=>{let h=Ve(m,e,o.innerType,n);m.write(`return ${h};`)}),r.write("})();");let s=Q(e,o.innerType),c=Q(e,o.catchValue),u=Q(e,vI);return r.write(`if (${i} === INVALID) {`),r.indented(m=>{m.write(`${i} = ${u}(${s}, ${c}, ${n});`),m.write(`if (${i} === INVALID) return INVALID;`)}),r.write("}"),i}function II(r,e,t,n){let o=t._zod.def;if(o.transform){if(ro(o.transform))throw new pt("z.compile: async transforms are not supported");let i=o.transform,c=Q(e,m=>{let h={value:m,issues:[],addIssue:cd},g=i(m,h);return g instanceof Promise?Qe:h.issues.length===0?g:Qe}),u=ee(e);return r.write(`const ${u} = ${c}(${n});`),r.write(`if (${u} === INVALID) return INVALID;`),u}return n}function pd(r,e){return new r({type:"string",...N(e)})}function dd(r,e){return new r({type:"string",coerce:!0,...N(e)})}function Pi(r,e){return new r({type:"string",format:"email",check:"string_format",abort:!1,...N(e)})}function Ci(r,e){return new r({type:"string",format:"guid",check:"string_format",abort:!1,...N(e)})}function Oi(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,...N(e)})}function Ri(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...N(e)})}function Mi(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...N(e)})}function Ei(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...N(e)})}function Ur(r,e){return new r({type:"string",format:"url",check:"string_format",abort:!1,...N(e)})}function Di(r,e){return new r({type:"string",format:"emoji",check:"string_format",abort:!1,...N(e)})}function Ai(r,e){return new r({type:"string",format:"nanoid",check:"string_format",abort:!1,...N(e)})}function _i(r,e){return new r({type:"string",format:"cuid",check:"string_format",abort:!1,...N(e)})}function Li(r,e){return new r({type:"string",format:"cuid2",check:"string_format",abort:!1,...N(e)})}function ji(r,e){return new r({type:"string",format:"ulid",check:"string_format",abort:!1,...N(e)})}function Fi(r,e){return new r({type:"string",format:"xid",check:"string_format",abort:!1,...N(e)})}function Ni(r,e){return new r({type:"string",format:"ksuid",check:"string_format",abort:!1,...N(e)})}function Vi(r,e){return new r({type:"string",format:"ipv4",check:"string_format",abort:!1,...N(e)})}function Ui(r,e){return new r({type:"string",format:"ipv6",check:"string_format",abort:!1,...N(e)})}function ld(r,e){return new r({type:"string",format:"mac",check:"string_format",abort:!1,...N(e)})}function Bi(r,e){return new r({type:"string",format:"cidrv4",check:"string_format",abort:!1,...N(e)})}function qi(r,e){return new r({type:"string",format:"cidrv6",check:"string_format",abort:!1,...N(e)})}function Wi(r,e){return new r({type:"string",format:"base64",check:"string_format",abort:!1,...N(e)})}function Zi(r,e){return new r({type:"string",format:"base64url",check:"string_format",abort:!1,...N(e)})}function Gi(r,e){return new r({type:"string",format:"e164",check:"string_format",abort:!1,...N(e)})}function ud(r,e){return new r({type:"string",format:"credit_card",check:"string_format",abort:!1,...N(e)})}function Ki(r,e){return new r({type:"string",format:"jwt",check:"string_format",abort:!1,...N(e)})}var md={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Br(r,e){return new r({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...N(e)})}function qr(r,e){return new r({type:"string",format:"date",check:"string_format",...N(e)})}function Wr(r,e){return new r({type:"string",format:"time",check:"string_format",precision:null,...N(e)})}function Zr(r,e){return new r({type:"string",format:"duration",check:"string_format",...N(e)})}function hd(r,e){return new r({type:"number",checks:[],...N(e)})}function fd(r,e){return new r({type:"number",coerce:!0,checks:[],...N(e)})}function gd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"safeint",...N(e)})}function xd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"float32",...N(e)})}function yd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"float64",...N(e)})}function bd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"int32",...N(e)})}function Sd(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"uint32",...N(e)})}function zd(r,e){return new r({type:"boolean",...N(e)})}function vd(r,e){return new r({type:"boolean",coerce:!0,...N(e)})}function wd(r,e){return new r({type:"bigint",...N(e)})}function Id(r,e){return new r({type:"bigint",coerce:!0,...N(e)})}function kd(r,e){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...N(e)})}function $d(r,e){return new r({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...N(e)})}function Td(r,e){return new r({type:"symbol",...N(e)})}function Pd(r,e){return new r({type:"undefined",...N(e)})}function Cd(r,e){return new r({type:"null",...N(e)})}function Od(r){return new r({type:"any"})}function Rd(r){return new r({type:"unknown"})}function Md(r,e){return new r({type:"never",...N(e)})}function Ed(r,e){return new r({type:"void",...N(e)})}function Dd(r,e){return new r({type:"date",...N(e)})}function Ad(r,e){return new r({type:"date",coerce:!0,...N(e)})}function _d(r,e){return new r({type:"nan",...N(e)})}function ft(r,e){return new Xn({check:"less_than",...N(e),value:r,inclusive:!1})}function et(r,e){return new Xn({check:"less_than",...N(e),value:r,inclusive:!0})}function gt(r,e){return new Yn({check:"greater_than",...N(e),value:r,inclusive:!1})}function tt(r,e){return new Yn({check:"greater_than",...N(e),value:r,inclusive:!0})}function Ji(r){return gt(0,r)}function Hi(r){return ft(0,r)}function Xi(r){return et(0,r)}function Yi(r){return tt(0,r)}function _t(r,e){return new vc({check:"multiple_of",...N(e),value:r})}function Lt(r,e){return new kc({check:"max_size",...N(e),maximum:r})}function xt(r,e){return new $c({check:"min_size",...N(e),minimum:r})}function no(r,e){return new Tc({check:"size_equals",...N(e),size:r})}function io(r,e){return new Pc({check:"max_length",...N(e),maximum:r})}function kt(r,e){return new Cc({check:"min_length",...N(e),minimum:r})}function so(r,e){return new Oc({check:"length_equals",...N(e),length:r})}function Co(r,e){return new Rc({check:"string_format",format:"regex",...N(e),pattern:r})}function Oo(r){return new Mc({check:"string_format",format:"lowercase",...N(r)})}function Ro(r){return new Ec({check:"string_format",format:"uppercase",...N(r)})}function Mo(r,e){return new Dc({check:"string_format",format:"includes",...N(e),includes:r})}function Eo(r,e){return new Ac({check:"string_format",format:"starts_with",...N(e),prefix:r})}function Do(r,e){return new _c({check:"string_format",format:"ends_with",...N(e),suffix:r})}function Qi(r,e,t){return new Qn({check:"property",property:r,schema:e,...N(t)})}function es(r){return Object.entries(r).map(([e,t])=>new Qn({check:"property",property:e,schema:t}))}function Ao(r,e){return new Lc({check:"mime_type",mime:r,...N(e)})}function dt(r){return new jc({check:"overwrite",tx:r})}function _o(r){return dt(e=>e.normalize(r))}function Lo(){return dt(r=>r.trim())}function jo(){return dt(r=>r.toLowerCase())}function Fo(){return dt(r=>r.toUpperCase())}function No(){return dt(r=>va(r))}function Ld(r,e,t){return new r({type:"array",element:e,...N(t)})}function kI(r,e,t){return new r({type:"union",options:e,...N(t)})}function $I(r,e,t){return new r({type:"union",options:e,inclusive:!1,...N(t)})}function TI(r,e,t,n){return new r({type:"union",options:t,discriminator:e,...N(n)})}function PI(r,e,t){return new r({type:"intersection",left:e,right:t})}function CI(r,e,t,n){let o=t instanceof te,i=o?n:t,s=o?t:null;return new r({type:"tuple",items:e,rest:s,...N(i)})}function OI(r,e,t,n){return new r({type:"record",keyType:e,valueType:t,...N(n)})}function RI(r,e,t,n){return new r({type:"map",keyType:e,valueType:t,...N(n)})}function MI(r,e,t){return new r({type:"set",valueType:e,...N(t)})}function EI(r,e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new r({type:"enum",entries:n,...N(t)})}function DI(r,e,t){return new r({type:"enum",entries:e,...N(t)})}function AI(r,e,t){return new r({type:"literal",values:Array.isArray(e)?e:[e],...N(t)})}function jd(r,e){return new r({type:"file",...N(e)})}function _I(r,e){return new r({type:"transform",transform:e})}function LI(r,e){return new r({type:"optional",innerType:e})}function jI(r,e){return new r({type:"nullable",innerType:e})}function FI(r,e,t){return new r({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():wr(t)}})}function NI(r,e,t){return new r({type:"nonoptional",innerType:e,...N(t)})}function VI(r,e){return new r({type:"success",innerType:e})}function UI(r,e,t){return new r({type:"catch",innerType:e,catchValue:typeof t=="function"?t:Ra(t)})}function BI(r,e,t){return new r({type:"pipe",in:e,out:t})}function qI(r,e){return new r({type:"readonly",innerType:e})}function WI(r,e,t){return new r({type:"template_literal",parts:e,...N(t)})}function ZI(r,e){return new r({type:"lazy",getter:e})}function GI(r,e){return new r({type:"promise",innerType:e})}function Fd(r,e,t){let n=N(t);return n.abort??(n.abort=!0),new r({type:"custom",check:"custom",fn:e,...n})}function Nd(r,e,t){return new r({type:"custom",check:"custom",fn:e,...N(t)})}function Vd(r,e){let t=Lg(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(zo(o,n.value,t._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(zo(i))}},r(n.value,n)),e);return t}function Lg(r,e){let t=new be({check:"custom",...N(e)});return t._zod.check=r,t}function Ud(r){let e=new be({check:"describe"});return e._zod.onattach=[t=>{let n=_e.get(t)??{};_e.add(t,{...n,description:r})}],e._zod.check=()=>{},e}function Bd(r){let e=new be({check:"meta"});return e._zod.onattach=[t=>{let n=_e.get(t)??{};_e.add(t,{...n,...r})}],e._zod.check=()=>{},e}function qd(r,e){let t=N(e),n=t.truthy??["true","1","yes","on","y","enabled"],o=t.falsy??["false","0","no","off","n","disabled"];t.case!=="sensitive"&&(n=n.map(S=>typeof S=="string"?S.toLowerCase():S),o=o.map(S=>typeof S=="string"?S.toLowerCase():S));let i=new Set(n),s=new Set(o),c=r.Codec??Lr,u=r.Boolean??Ar,m=r.String??Qt,h=new m({type:"string",error:t.error}),g=new u({type:"boolean",error:t.error}),y=new c({type:"pipe",in:h,out:g,transform:((S,w)=>{let T=S;return t.case!=="sensitive"&&(T=T.toLowerCase()),i.has(T)?!0:s.has(T)?!1:(w.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:w.value,inst:y,continue:!1}),{})}),reverseTransform:((S,w)=>S===!0?n[0]||"true":o[0]||"false"),error:t.error});return y._zod.bag.truthy=n,y._zod.bag.falsy=o,y._zod.bag.case=t.case??"insensitive",y}function Vo(r,e,t,n={}){let o=N(n),i={check:"string_format",type:"string",format:e,fn:typeof t=="function"?t:c=>t.test(c),...o};return t instanceof RegExp&&(i.pattern=t),new r(i)}function Gr(r,...e){for(let t of e)for(let n of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Te(r,n,t[n]);return r}function jt(r){let e=r?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:r.processors??{},metadataRegistry:r?.metadata??_e,target:e,unrepresentable:r?.unrepresentable??"throw",override:r?.override??(()=>{}),io:r?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:r?.cycles??"ref",reused:r?.reused??"inline",intersections:[],deferred:[],external:r?.external??void 0}}function Ee(r,e,t,n,o){let i=typeof e.unrepresentable=="function"?e.unrepresentable({zodSchema:r,path:n.path,message:o}):e.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(t,i),!0}function fe(r,e,t={path:[],schemaPath:[]}){var n;let o=r._zod.def,i=e.seen.get(r);if(i)return i.count++,t.schemaPath.includes(r)&&(i.cycle=t.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:t.path};e.seen.set(r,s),e.sharedDefsExtractedFor=void 0,e.sharedEmitDoneFor=void 0;let c=r._zod.toJSONSchema?.();if(c)s.schema=c;else{let h={...t,schemaPath:[...t.schemaPath,r],path:t.path};if(r._zod.processJSONSchema)r._zod.processJSONSchema(e,s.schema,h);else{let y=s.schema,S=e.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(r,e,y,h)}let g=r._zod.parent;g&&(s.ref||(s.ref=g),fe(g,e,h),e.seen.get(g).isParent=!0)}let u=e.metadataRegistry.get(r);return u&&Gr(s.schema,u),e.io==="input"&&Ue(r)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(r).schema}function jg(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}function Ft(r,e){let t=r.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");if(r.external&&r.sharedDefsExtractedFor===r.external)return;let n=new Map;for(let s of r.seen.entries()){let c=r.metadataRegistry.get(s[0])?.id;if(c){let u=n.get(c);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(c,s[0])}}let o=s=>{let c=r.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let g=r.external.registry.get(s[0])?.id,y=r.external.uri??(w=>w);if(g)return{ref:y(g)};let S=s[1].defId??s[1].schema.id??`schema${r.counter++}`;return s[1].defId=S,{defId:S,ref:`${y("__shared")}#/${c}/${jg(S)}`}}let u="#",m=`${u}/${c}/`;if(s[1]===t&&!s[1].schema.id)return{ref:u};let h=s[1].schema.id??`__schema${r.counter++}`;return{defId:h,ref:m+jg(h)}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:u,defId:m}=o(s);c.def={...c.schema},m&&(c.defId=m);let h=c.schema;for(let g in h)delete h[g];h.$ref=u};if(r.cycles==="throw")for(let s of r.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
79
+
80
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of r.seen.entries()){let c=s[1];if(e===s[0]){i(s);continue}if(r.external){let m=r.external.registry.get(s[0])?.id;if(e!==s[0]&&m){i(s);continue}}if(r.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&r.reused==="ref"){i(s);continue}}r.external&&(r.sharedDefsExtractedFor=r.external)}function Vg(r){let e=r.anyOf;if(!Array.isArray(e)||e.length===0||r.type!==void 0)return;let t=[];for(let n of e){if(!n||typeof n!="object")return;Vg(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;t.includes(s)||t.push(s)}}delete r.anyOf,r.type=t.length===1?t[0]:t}var Ug=new Set(["type","properties","required","additionalProperties"]),Fg=["oneOf","anyOf"];function Ng(r){let e=r.additionalProperties;return e===void 0||e===!1||typeof e!="object"||e===null?null:Object.keys(e).length?e:null}function Wd(r){let e=[];for(let i of r){if(typeof i!="object"||i.type!=="object")return null;for(let s in i)if(!Ug.has(s))return null;e.push(i)}let t={},n=new Set;for(let i of e){for(let s in i.properties){if(Object.prototype.hasOwnProperty.call(t,s))continue;let c=[];for(let m of e){let h=m.properties?.[s]??Ng(m);h!=null&&(c.some(g=>JSON.stringify(g)===JSON.stringify(h))||c.push(h))}let u=c.length===1?c[0]:Wd(c)??{allOf:c};Te(t,s,u)}for(let s of i.required??[])n.add(s)}let o={type:"object",properties:t};if(n.size&&(o.required=[...n]),e.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let s of e){let c=Ng(s);c&&!i.some(u=>JSON.stringify(u)===JSON.stringify(c))&&i.push(c)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function KI(r){let e=r.allOf;if(!Array.isArray(e)||e.length<2)return;for(let o of Ug)if(o in r)return;let t=e.filter(o=>Fg.some(i=>Array.isArray(o[i]))),n=null;if(!t.length)n=Wd(e);else{let o=t[0],i=Fg.find(u=>Array.isArray(o[u]));if(Object.keys(o).length!==1)return;let s=e.filter(u=>u!==o),c=o[i].map(u=>Wd([...s,u]));if(c.some(u=>!u))return;n={[i]:c}}n&&(delete r.allOf,Gr(r,n))}function Nt(r,e){let t=r.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=c=>{let u=r.seen.get(c);if(u.ref===null)return;let m=u.def??u.schema,h={...m},g=u.ref;if(u.ref=null,g){n(g);let S=r.seen.get(g),w=S.schema;if(w.$ref&&(r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(w)):Gr(m,w),Gr(m,h),c._zod.parent===g)for(let M in m)M==="$ref"||M==="allOf"||M in h||delete m[M];if(w.$ref&&S.def)for(let M in m)M==="$ref"||M==="allOf"||M in S.def&&JSON.stringify(m[M])===JSON.stringify(S.def[M])&&delete m[M]}let y=c._zod.parent;if(y&&y!==g){n(y);let S=r.seen.get(y);if(S?.schema.$ref&&(m.$ref=S.schema.$ref,S.def))for(let w in m)w==="$ref"||w==="allOf"||w in S.def&&JSON.stringify(m[w])===JSON.stringify(S.def[w])&&delete m[w]}r.override({zodSchema:c,jsonSchema:m,path:u.path??[]})};if(!r.external||r.sharedEmitDoneFor!==r.external){for(let c of[...r.seen.entries()].reverse())n(c[0]);if(r.target!=="openapi-3.0")for(let c of r.seen.entries())Vg(c[1].def??c[1].schema);for(let c of r.deferred)c();if(r.intersections.length){let c=new Map;for(let u of r.seen.values())for(let m of[u.schema,u.def]){let h=m?.allOf;if(!Array.isArray(h))continue;let g=c.get(h);g?g.push(m):c.set(h,[m])}for(let u of r.intersections)for(let m of c.get(u)??[])KI(m)}}let o={};if(r.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":r.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":r.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":r.target,r.external?.uri){let c=r.external.registry.get(e)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=r.external.uri(c)}Gr(o,t.defId?t.schema:t.def??t.schema);let i=r.metadataRegistry.get(e)?.id;i!==void 0&&o.id===i&&delete o.id;let s=r.external?.defs??{};if(!r.external||r.sharedEmitDoneFor!==r.external)for(let c of r.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,Te(s,u.defId,u.def))}r.external&&(r.sharedEmitDoneFor=r.external),r.external||Object.keys(s).length>0&&(r.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...e["~standard"],jsonSchema:{input:Uo(e,"input",r.processors),output:Uo(e,"output",r.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Ue(r,e){let t=e??{seen:new Set};if(t.seen.has(r))return!1;t.seen.add(r);let n=r._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ue(n.element,t);if(n.type==="set")return Ue(n.valueType,t);if(n.type==="lazy")return Ue(n.getter(),t);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return Ue(n.innerType,t);if(n.type==="intersection")return Ue(n.left,t)||Ue(n.right,t);if(n.type==="record"||n.type==="map")return Ue(n.keyType,t)||Ue(n.valueType,t);if(n.type==="pipe")return r._zod.traits.has("$ZodCodec")?!0:Ue(n.in,t)||Ue(n.out,t);if(n.type==="object"){for(let o in n.shape)if(Ue(n.shape[o],t))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(Ue(o,t))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(Ue(o,t))return!0;return!!(n.rest&&Ue(n.rest,t))}return!1}var Zd=(r,e={})=>t=>{let n=jt({...t,processors:e});return fe(r,n),Ft(n,r),Nt(n,r)},Uo=(r,e,t={})=>n=>{let{libraryOptions:o,target:i}=n??{},s=jt({...o??{},target:i,io:e,processors:t});return fe(r,s),Ft(s,r),Nt(s,r)};var JI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jd=(r,e,t,n)=>{let o=t;o.type="string";let{minimum:i,maximum:s,format:c,patterns:u,contentEncoding:m,laxFormat:h}=r._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),c&&(o.format=JI[c]??c,o.format===""&&delete o.format,(c==="time"||h)&&delete o.format),m&&(o.contentEncoding=m),u&&u.size>0){let g=[...u];g.length===1?o.pattern=g[0].source:g.length>1&&(o.allOf=[...g.map(y=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},Hd=(r,e,t,n)=>{let o=t,{minimum:i,maximum:s,format:c,multipleOf:u,exclusiveMaximum:m,exclusiveMinimum:h}=r._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number";let g=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),y=typeof m=="number"&&m<=(s??Number.POSITIVE_INFINITY),S=e.target==="draft-04"||e.target==="openapi-3.0";g?S?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),y?S?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof s=="number"&&(o.maximum=s),typeof u=="number"&&(Number.isFinite(u)&&u!==0?o.multipleOf=Math.abs(u):Ee(r,e,o,n,`A multipleOf divisor of ${u} cannot be represented in JSON Schema`))},Xd=(r,e,t,n)=>{t.type="boolean"},Yd=(r,e,t,n)=>{Ee(r,e,t,n,"BigInt cannot be represented in JSON Schema")},Qd=(r,e,t,n)=>{Ee(r,e,t,n,"Symbols cannot be represented in JSON Schema")},el=(r,e,t,n)=>{e.target==="openapi-3.0"?(t.type="string",t.nullable=!0,t.enum=[null]):t.type="null"},tl=(r,e,t,n)=>{Ee(r,e,t,n,"Undefined cannot be represented in JSON Schema")},ol=(r,e,t,n)=>{Ee(r,e,t,n,"Void cannot be represented in JSON Schema")},rl=(r,e,t,n)=>{t.not={}},nl=(r,e,t,n)=>{},il=(r,e,t,n)=>{},sl=(r,e,t,n)=>{Ee(r,e,t,n,"Date cannot be represented in JSON Schema")},al=(r,e,t,n)=>{let o=r._zod.def,i=Sr(o.entries);if(i.length===0){t.not={};return}i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),t.enum=i},cl=(r,e,t,n)=>{let o=r._zod.def;if(o.values.length===0){t.not={};return}let i=[];for(let s of o.values)if(s===void 0){if(Ee(r,e,t,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(Ee(r,e,t,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];t.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?t.enum=[s]:t.const=s}else i.every(s=>typeof s=="number")&&(t.type="number"),i.every(s=>typeof s=="string")&&(t.type="string"),i.every(s=>typeof s=="boolean")&&(t.type="boolean"),i.every(s=>s===null)&&(t.type="null"),t.enum=i},pl=(r,e,t,n)=>{Ee(r,e,t,n,"NaN cannot be represented in JSON Schema")},dl=(r,e,t,n)=>{let o=t,i=r._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},ll=(r,e,t,n)=>{let o=t,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:u}=r._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=u.map(m=>({contentMediaType:m}))):Object.assign(o,i)},ul=(r,e,t,n)=>{t.type="boolean"},ml=(r,e,t,n)=>{Ee(r,e,t,n,"Custom types cannot be represented in JSON Schema")},hl=(r,e,t,n)=>{Ee(r,e,t,n,"Function types cannot be represented in JSON Schema")},fl=(r,e,t,n)=>{Ee(r,e,t,n,"Transforms cannot be represented in JSON Schema")},gl=(r,e,t,n)=>{Ee(r,e,t,n,"Map cannot be represented in JSON Schema")},xl=(r,e,t,n)=>{Ee(r,e,t,n,"Set cannot be represented in JSON Schema")},yl=(r,e,t,n)=>{let o=t,i=r._zod.def,{minimum:s,maximum:c}=r._zod.bag;typeof s=="number"&&(o.minItems=s),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=fe(i.element,e,{...n,path:[...n.path,"items"]})};function Kr(r){let e=r._zod.def;return e.type==="pipe"&&e.in._zod.traits.has("$ZodTransform")?Kr(e.out):e.type==="catch"?Kr(e.innerType):r._zod.optin}var bl=(r,e,t,n)=>{let o=t,i=r._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&Ee(r,e,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let h in s)Te(o.properties,h,fe(s[h],e,{...n,path:[...n.path,"properties",h]}));let u=new Set(Object.keys(s)),m=new Set([...u].filter(h=>{let g=i.shape[h];return e.io==="input"?Kr(g)===void 0:g._zod.optout===void 0}));m.size>0&&(o.required=Array.from(m)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=fe(i.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(o.additionalProperties=!1)},os=(r,e,t,n)=>{let o=r._zod.def,i=o.inclusive===!1,s=o.options.map((c,u)=>fe(c,e,{...n,path:[...n.path,i?"oneOf":"anyOf",u]}));i?t.oneOf=s:t.anyOf=s},Sl=(r,e,t,n)=>{let o=r._zod.def,i=fe(o.left,e,{...n,path:[...n.path,"allOf",0]}),s=fe(o.right,e,{...n,path:[...n.path,"allOf",1]}),c=m=>"allOf"in m&&Object.keys(m).length===1,u=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];t.allOf=u,e.intersections.push(u)},zl=(r,e,t,n)=>{let o=t,i=r._zod.def;o.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",c=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((T,M)=>fe(T,e,{...n,path:[...n.path,s,M]})),m=i.rest?fe(i.rest,e,{...n,path:[...n.path,c,...e.target==="openapi-3.0"?[i.items.length]:[]]}):null,h=i.items.length;for(;h>0;){let T=i.items[h-1];if(!(e.io==="input"?Kr(T)!==void 0:T._zod.optout==="optional"))break;h--}let g=i.items.length,y=!i.rest;e.target==="draft-2020-12"?(o.prefixItems=u,y?o.items=!1:m&&(o.items=m),h>0&&(o.minItems=h),y&&(o.maxItems=g)):e.target==="openapi-3.0"?(o.items={anyOf:u},m&&o.items.anyOf.push(m),h>0&&(o.minItems=h),y&&(o.maxItems=g)):(o.items=u,y?o.additionalItems=!1:m&&(o.additionalItems=m),h>0&&(o.minItems=h),y&&(o.maxItems=g));let{minimum:S,maximum:w}=r._zod.bag;typeof S=="number"&&(o.minItems=S),typeof w=="number"&&(o.maxItems=w)};function Gd(r,e,t){if(e.$ref){if(t.has(e))return e;t.add(e);let w=r.get(e)?.def;if(!w)return e;let T=Gd(r,w,t);return T===w?e:T}for(let w of["anyOf","oneOf"]){let T=e[w];if(!Array.isArray(T))continue;let M=T.map(V=>Gd(r,V,t));M.some((V,F)=>V!==T[F])&&(e={...e,[w]:M})}let n=Array.isArray(e.type)?e.type:[e.type],o=!n.includes("string")&&n.some(w=>w==="number"||w==="integer"),i=e.enum??(e.const!==void 0?[e.const]:void 0);if(!o&&!i?.some(w=>typeof w=="number"))return e;let{minimum:s,maximum:c,exclusiveMinimum:u,exclusiveMaximum:m,multipleOf:h,format:g,id:y,...S}=e;return S.enum?S.enum=S.enum.map(w=>typeof w=="number"?String(w):w):typeof S.const=="number"&&(S.const=String(S.const)),o&&(S.type="string",i||(S.pattern=(n.includes("number")?At:Or).source)),S}var Kd=new WeakMap;function HI(r){let e=new Map;for(let n of r.seen.values())n.def&&!e.has(n.schema)&&e.set(n.schema,n);let t=new Map;for(let n of Kd.get(r)??[]){let o=r.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||t.has(i))continue;let s=Gd(e,i,new Set);s!==i&&t.set(i,s)}if(t.size)for(let n of r.seen.values())for(let o of[n.schema,n.def]){let i=o&&t.get(o.propertyNames);i&&(o.propertyNames=i)}}var vl=(r,e,t,n)=>{let o=t,i=r._zod.def;o.type="object";let s=i.keyType,u=s._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let g=fe(i.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let y of u)Te(o.patternProperties,y.source,g)}else{if(e.target==="draft-07"||e.target==="draft-2020-12"){o.propertyNames=fe(i.keyType,e,{...n,path:[...n.path,"propertyNames"]});let g=Kd.get(e);g||(g=[],Kd.set(e,g),e.deferred.push(()=>HI(e))),g.push(r)}o.additionalProperties=fe(i.valueType,e,{...n,path:[...n.path,"additionalProperties"]})}let m=s._zod.values,h=e.io==="input"&&Kr(i.valueType)!==void 0;if(m&&!i.partial&&!h){let g=[...m].filter(y=>typeof y=="string"||typeof y=="number");g.length>0&&(o.required=g.map(String))}},wl=(r,e,t,n)=>{let o=r._zod.def,i=fe(o.innerType,e,n),s=e.seen.get(r);e.target==="openapi-3.0"?(s.ref=o.innerType,t.nullable=!0):t.anyOf=[i,{type:"null"}]},Il=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType},kl=Symbol();function Bg(r,e,t,n,o){let i=!1,s=JSON.stringify(r,(c,u)=>typeof u!="bigint"?u:(i=!0,null));return i?(Ee(e,t,n,o,"BigInt defaults cannot be represented in JSON Schema"),kl):JSON.parse(s)}var $l=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType;let s=Bg(o.defaultValue,r,e,t,n);s!==kl&&(t.default=s)},Tl=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);if(i.ref=o.innerType,e.io!=="input")return;let s=Bg(o.defaultValue,r,e,t,n);s!==kl&&(t._prefault=s)},Pl=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{Ee(r,e,t,n,"Dynamic catch values are not supported in JSON Schema");return}t.default=s},Cl=(r,e,t,n)=>{let o=r._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=e.io==="input"?i?o.out:o.in:o.out;fe(s,e,n);let c=e.seen.get(r);c.ref=s},Ol=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType,t.readOnly=!0},Rl=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType},rs=(r,e,t,n)=>{let o=r._zod.def;fe(o.innerType,e,n);let i=e.seen.get(r);i.ref=o.innerType},Ml=(r,e,t,n)=>{let o=r._zod.innerType;fe(o,e,n);let i=e.seen.get(r);i.ref=o},ts={string:Jd,number:Hd,boolean:Xd,bigint:Yd,symbol:Qd,null:el,undefined:tl,void:ol,never:rl,any:nl,unknown:il,date:sl,enum:al,literal:cl,nan:pl,template_literal:dl,file:ll,success:ul,custom:ml,function:hl,transform:fl,map:gl,set:xl,array:yl,object:bl,union:os,intersection:Sl,tuple:zl,record:vl,nullable:wl,nonoptional:Il,default:$l,prefault:Tl,catch:Pl,pipe:Cl,readonly:Ol,promise:Rl,optional:rs,lazy:Ml};function ns(r,e){if("_idmap"in r){let n=r,o=jt({...e,processors:ts}),i={};for(let u of n._idmap.entries()){let[m,h]=u;fe(h,o)}let s={},c={registry:n,uri:e?.uri,defs:i};o.external=c;for(let u of n._idmap.entries()){let[m,h]=u;Ft(o,h),Te(s,m,Nt(o,h))}if(Object.keys(i).length>0){let u=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[u]:i}}return{schemas:s}}let t=jt({...e,processors:ts});return fe(r,t),Ft(t,r),Nt(t,r)}var is=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??"draft-2020-12";t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),this.ctx=jt({processors:ts,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return fe(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Ft(this.ctx,e);let n=Nt(this.ctx,e),{"~standard":o,...i}=n;return i}};var qg={};var Xo={};It(Xo,{ZodAny:()=>Hl,ZodArray:()=>eu,ZodBase64:()=>ws,ZodBase64URL:()=>Is,ZodBigInt:()=>Jo,ZodBigIntFormat:()=>Ts,ZodBoolean:()=>Ko,ZodCIDRv4:()=>zs,ZodCIDRv6:()=>vs,ZodCUID:()=>hs,ZodCUID2:()=>fs,ZodCatch:()=>bu,ZodCodec:()=>on,ZodCreditCard:()=>Zl,ZodCustom:()=>rn,ZodCustomStringFormat:()=>Zo,ZodDate:()=>Xr,ZodDefault:()=>mu,ZodDiscriminatedUnion:()=>ou,ZodE164:()=>ks,ZodEmail:()=>ds,ZodEmoji:()=>us,ZodEnum:()=>qo,ZodExactOptional:()=>Os,ZodFile:()=>pu,ZodFunction:()=>Pu,ZodGUID:()=>ls,ZodIPv4:()=>bs,ZodIPv6:()=>Ss,ZodISODate:()=>Ut,ZodISODateTime:()=>Vt,ZodISODuration:()=>qt,ZodISOTime:()=>Bt,ZodIntersection:()=>ru,ZodJWT:()=>$s,ZodKSUID:()=>ys,ZodLazy:()=>$u,ZodLiteral:()=>cu,ZodMAC:()=>Wl,ZodMap:()=>su,ZodNaN:()=>zu,ZodNanoID:()=>ms,ZodNever:()=>Yl,ZodNonOptional:()=>Rs,ZodNull:()=>Jl,ZodNullable:()=>uu,ZodNumber:()=>Go,ZodNumberFormat:()=>po,ZodObject:()=>Yr,ZodOptional:()=>en,ZodPipe:()=>tn,ZodPrefault:()=>fu,ZodPreprocess:()=>vu,ZodPromise:()=>Tu,ZodReadonly:()=>wu,ZodRecord:()=>Bo,ZodSet:()=>au,ZodString:()=>Wo,ZodStringFormat:()=>xe,ZodSuccess:()=>yu,ZodSymbol:()=>Gl,ZodTemplateLiteral:()=>ku,ZodTransform:()=>du,ZodTuple:()=>iu,ZodType:()=>oe,ZodULID:()=>gs,ZodURL:()=>Hr,ZodUUID:()=>yt,ZodUndefined:()=>Kl,ZodUnion:()=>Qr,ZodUnknown:()=>Xl,ZodVoid:()=>Ql,ZodXID:()=>xs,ZodXor:()=>tu,_ZodString:()=>ps,_default:()=>hu,_function:()=>Kx,any:()=>Ox,array:()=>b,base64:()=>ux,base64url:()=>mx,bigint:()=>kx,boolean:()=>R,catch:()=>Su,check:()=>Jx,cidrv4:()=>dx,cidrv6:()=>lx,codec:()=>qx,creditCard:()=>fx,cuid:()=>ox,cuid2:()=>rx,custom:()=>Hx,date:()=>Rx,describe:()=>Xx,discriminatedUnion:()=>Dx,e164:()=>hx,email:()=>Gg,emoji:()=>ex,enum:()=>f,exactOptional:()=>lu,file:()=>Nx,float32:()=>zx,float64:()=>vx,function:()=>Kx,guid:()=>Kg,hash:()=>Sx,hex:()=>bx,hostname:()=>yx,httpUrl:()=>Qg,instanceof:()=>Qx,int:()=>z,int32:()=>wx,int64:()=>$x,intersection:()=>nu,invertCodec:()=>Wx,ipv4:()=>ax,ipv6:()=>px,json:()=>ty,jwt:()=>gx,keyof:()=>Mx,ksuid:()=>sx,lazy:()=>Ho,literal:()=>x,looseObject:()=>Wt,looseRecord:()=>_x,mac:()=>cx,map:()=>Lx,meta:()=>Yx,nan:()=>Bx,nanoid:()=>tx,nativeEnum:()=>Fx,never:()=>Ps,nonoptional:()=>xu,null:()=>J,nullable:()=>Jr,nullish:()=>Vx,number:()=>p,object:()=>A,optional:()=>ao,partialRecord:()=>Ax,pipe:()=>cs,prefault:()=>gu,preprocess:()=>oy,promise:()=>Gx,readonly:()=>Iu,record:()=>k,refine:()=>Cu,set:()=>jx,strictObject:()=>d,string:()=>a,stringFormat:()=>xx,stringbool:()=>ey,success:()=>Ux,superRefine:()=>Ou,symbol:()=>Px,templateLiteral:()=>Zx,transform:()=>Cs,tuple:()=>U,uint32:()=>Ix,uint64:()=>Tx,ulid:()=>nx,undefined:()=>Cx,union:()=>v,unknown:()=>O,url:()=>ke,uuid:()=>Jg,uuidv4:()=>Hg,uuidv6:()=>Xg,uuidv7:()=>Yg,void:()=>Le,xid:()=>ix,xor:()=>Ex});var ss={};It(ss,{endsWith:()=>Do,gt:()=>gt,gte:()=>tt,includes:()=>Mo,length:()=>so,lowercase:()=>Oo,lt:()=>ft,lte:()=>et,maxLength:()=>io,maxSize:()=>Lt,mime:()=>Ao,minLength:()=>kt,minSize:()=>xt,multipleOf:()=>_t,negative:()=>Hi,nonnegative:()=>Yi,nonpositive:()=>Xi,normalize:()=>_o,overwrite:()=>dt,positive:()=>Ji,properties:()=>es,property:()=>Qi,regex:()=>Co,size:()=>no,slugify:()=>No,startsWith:()=>Eo,toLowerCase:()=>jo,toUpperCase:()=>Fo,trim:()=>Lo,uppercase:()=>Ro});var Wg=new WeakSet([Object.prototype,Error.prototype]);function as(r,e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t(this);return Object.defineProperty(this,e,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,e,{value:n,configurable:!0,writable:!0})}})}var Zg=(r,e)=>{Tr.init(r,e),r.name="ZodError";let t=Object.getPrototypeOf(r);Wg.has(t)||(Wg.add(t),as(t,"format",n=>o=>Cr(n,o)),as(t,"flatten",n=>o=>Pr(n,o)),as(t,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,bo,2)}),as(t,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,bo,2)}),Object.defineProperty(t,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},YI=P("ZodError",Zg),Xe=P("ZodError",Zg,void 0,{Parent:Error});var El=vo(Xe),Dl=wo(Xe),Al=Io(Xe),_l=ko(Xe),Ll=Nn(Xe),jl=Vn(Xe),Fl=Un(Xe),Nl=Bn(Xe),Vl=qn(Xe),Ul=Wn(Xe),Bl=Zn(Xe),ql=Gn(Xe);function ek(){Ae.localeError||Pe(vi())}function co(){Ae.memoizer||Pe({memoizer:Fr()})}var oe=P("ZodType",(r,e)=>(ek(),te.init(r,e),r.def=e,r.type=e.type,r),{check(...r){let e=this.def;return this.clone(_.mergeDefs(e,{checks:[...e.checks??[],...r.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,e){return he(this,r,e)},brand(){return this},register(r,e){return r.add(this,e),this},refine(r,e){return this.check(Cu(r,e))},superRefine(r,e){return this.check(Ou(r,e))},overwrite(r){return this.check(dt(r))},optional(){return ao(this)},exactOptional(){return lu(this)},nullable(){return Jr(this)},nullish(){return ao(Jr(this))},nonoptional(r){return xu(this,r)},array(){return b(this)},or(r){return v([this,r])},and(r){return nu(this,r)},transform(r){return cs(this,Cs(r))},default(r){return hu(this,r)},prefault(r){return gu(this,r)},catch(r){return Su(this,r)},pipe(r){return cs(this,r)},readonly(){return Iu(this)},describe(r){let e=this.clone();return _e.add(e,{description:r}),e},meta(...r){if(r.length===0)return _e.get(this);let e=this.clone();return _e.add(e,r[0]),e},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r,...e){return e.length===0?r(this):r(this,...e)},get"~standard"(){return _.hide(this,"~standard",{...ni(this),jsonSchema:{input:Uo(this,"input"),output:Uo(this,"output")}})},set"~standard"(r){_.own(this,"~standard",r)},parse:function r(e,t){return El(this,e,t,{callee:r})},parseAsync:async function r(e,t){return await Dl(this,e,t,{callee:r})},safeParse(r,e){return Al(this,r,e)},async safeParseAsync(r,e){return _l(this,r,e)},get spa(){return this?.safeParseAsync},set spa(r){_.own(this,"spa",r)},encode:function r(e,t){return Ll(this,e,t,{callee:r})},decode:function r(e,t){return jl(this,e,t,{callee:r})},encodeAsync:async function r(e,t){return await Fl(this,e,t,{callee:r})},decodeAsync:async function r(e,t){return await Nl(this,e,t,{callee:r})},safeEncode(r,e){return Vl(this,r,e)},safeDecode(r,e){return Ul(this,r,e)},async safeEncodeAsync(r,e){return Bl(this,r,e)},async safeDecodeAsync(r,e){return ql(this,r,e)},toJSONSchema(r){return Zd(this,{})(r)},get description(){return _e.get(this)?.description},get _def(){return this._zod.def}}),ps=P("_ZodString",(r,e)=>{Qt.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>Jd(r,n,o,i);let t=r._zod.bag;r.format=t.format??null,r.minLength=t.minimum??null,r.maxLength=t.maximum??null},{regex(...r){return this.check(Co(...r))},includes(...r){return this.check(Mo(...r))},startsWith(...r){return this.check(Eo(...r))},endsWith(...r){return this.check(Do(...r))},min(...r){return this.check(kt(...r))},max(...r){return this.check(io(...r))},length(...r){return this.check(so(...r))},nonempty(...r){return this.check(kt(1,...r))},lowercase(r){return this.check(Oo(r))},uppercase(r){return this.check(Ro(r))},trim(){return this.check(Lo())},normalize(...r){return this.check(_o(...r))},toLowerCase(){return this.check(jo())},toUpperCase(){return this.check(Fo())},slugify(){return this.check(No())}}),Wo=P("ZodString",(r,e)=>{Qt.init(r,e),ps.init(r,e)},{email(r){return this.check(Pi(ds,r))},url(r){return this.check(Ur(Hr,r))},jwt(r){return this.check(Ki($s,r))},emoji(r){return this.check(Di(us,r))},guid(r){return this.check(Ci(ls,r))},uuid(r){return this.check(Oi(yt,r))},uuidv4(r){return this.check(Ri(yt,r))},uuidv6(r){return this.check(Mi(yt,r))},uuidv7(r){return this.check(Ei(yt,r))},nanoid(r){return this.check(Ai(ms,r))},cuid(r){return this.check(_i(hs,r))},cuid2(r){return this.check(Li(fs,r))},ulid(r){return this.check(ji(gs,r))},base64(r){return this.check(Wi(ws,r))},base64url(r){return this.check(Zi(Is,r))},xid(r){return this.check(Fi(xs,r))},ksuid(r){return this.check(Ni(ys,r))},ipv4(r){return this.check(Vi(bs,r))},ipv6(r){return this.check(Ui(Ss,r))},cidrv4(r){return this.check(Bi(zs,r))},cidrv6(r){return this.check(qi(vs,r))},e164(r){return this.check(Gi(ks,r))},datetime(r){return this.check(Br(Vt,r))},date(r){return this.check(qr(Ut,r))},time(r){return this.check(Wr(Bt,r))},duration(r){return this.check(Zr(qt,r))}});function a(r){return pd(Wo,r)}var xe=P("ZodStringFormat",(r,e)=>{ge.init(r,e),ps.init(r,e)}),Vt=P("ZodISODateTime",(r,e)=>{ep.init(r,e),xe.init(r,e)}),Ut=P("ZodISODate",(r,e)=>{tp.init(r,e),xe.init(r,e)}),Bt=P("ZodISOTime",(r,e)=>{op.init(r,e),xe.init(r,e)}),qt=P("ZodISODuration",(r,e)=>{rp.init(r,e),xe.init(r,e)}),ds=P("ZodEmail",(r,e)=>{Bc.init(r,e),xe.init(r,e)});function Gg(r){return Pi(ds,r)}var ls=P("ZodGUID",(r,e)=>{Vc.init(r,e),xe.init(r,e)});function Kg(r){return Ci(ls,r)}var yt=P("ZodUUID",(r,e)=>{Uc.init(r,e),xe.init(r,e)});function Jg(r){return Oi(yt,r)}function Hg(r){return Ri(yt,r)}function Xg(r){return Mi(yt,r)}function Yg(r){return Ei(yt,r)}var Hr=P("ZodURL",(r,e)=>{Zc.init(r,e),xe.init(r,e)});function ke(r){return Ur(Hr,r)}function Qg(r){return Ur(Hr,{protocol:Ne.httpProtocol,hostname:Ne.domain,..._.normalizeParams(r)})}var us=P("ZodEmoji",(r,e)=>{Gc.init(r,e),xe.init(r,e)});function ex(r){return Di(us,r)}var ms=P("ZodNanoID",(r,e)=>{Kc.init(r,e),xe.init(r,e)});function tx(r){return Ai(ms,r)}var hs=P("ZodCUID",(r,e)=>{Jc.init(r,e),xe.init(r,e)});function ox(r){return _i(hs,r)}var fs=P("ZodCUID2",(r,e)=>{Hc.init(r,e),xe.init(r,e)});function rx(r){return Li(fs,r)}var gs=P("ZodULID",(r,e)=>{Xc.init(r,e),xe.init(r,e)});function nx(r){return ji(gs,r)}var xs=P("ZodXID",(r,e)=>{Yc.init(r,e),xe.init(r,e)});function ix(r){return Fi(xs,r)}var ys=P("ZodKSUID",(r,e)=>{Qc.init(r,e),xe.init(r,e)});function sx(r){return Ni(ys,r)}var bs=P("ZodIPv4",(r,e)=>{np.init(r,e),xe.init(r,e)});function ax(r){return Vi(bs,r)}var Wl=P("ZodMAC",(r,e)=>{sp.init(r,e),xe.init(r,e)});function cx(r){return ld(Wl,r)}var Ss=P("ZodIPv6",(r,e)=>{ip.init(r,e),xe.init(r,e)});function px(r){return Ui(Ss,r)}var zs=P("ZodCIDRv4",(r,e)=>{ap.init(r,e),xe.init(r,e)});function dx(r){return Bi(zs,r)}var vs=P("ZodCIDRv6",(r,e)=>{cp.init(r,e),xe.init(r,e)});function lx(r){return qi(vs,r)}var ws=P("ZodBase64",(r,e)=>{pp.init(r,e),xe.init(r,e)});function ux(r){return Wi(ws,r)}var Is=P("ZodBase64URL",(r,e)=>{dp.init(r,e),xe.init(r,e)});function mx(r){return Zi(Is,r)}var ks=P("ZodE164",(r,e)=>{lp.init(r,e),xe.init(r,e)});function hx(r){return Gi(ks,r)}var Zl=P("ZodCreditCard",(r,e)=>{up.init(r,e),xe.init(r,e)});function fx(r){return ud(Zl,r)}var $s=P("ZodJWT",(r,e)=>{mp.init(r,e),xe.init(r,e)});function gx(r){return Ki($s,r)}var Zo=P("ZodCustomStringFormat",(r,e)=>{hp.init(r,e),xe.init(r,e)});function xx(r,e,t={}){return Vo(Zo,r,e,t)}function yx(r){return Vo(Zo,"hostname",Ne.hostname,r)}function bx(r){return Vo(Zo,"hex",Ne.hex,r)}function Sx(r,e){let t=e?.enc??"hex",n=`${r}_${t}`,o=Ne[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Vo(Zo,n,o,e)}var Go=P("ZodNumber",(r,e)=>{mi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>Hd(r,n,o,i);let t=r._zod.bag;r.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,r.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,r.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),r.isFinite=!0,r.format=t.format??null},{gt(r,e){return this.check(gt(r,e))},gte(r,e){return this.check(tt(r,e))},min(r,e){return this.check(tt(r,e))},lt(r,e){return this.check(ft(r,e))},lte(r,e){return this.check(et(r,e))},max(r,e){return this.check(et(r,e))},int(r){return this.check(z(r))},safe(r){return this.check(z(r))},positive(r){return this.check(gt(0,r))},nonnegative(r){return this.check(tt(0,r))},negative(r){return this.check(ft(0,r))},nonpositive(r){return this.check(et(0,r))},multipleOf(r,e){return this.check(_t(r,e))},step(r,e){return this.check(_t(r,e))},finite(){return this}});function p(r){return hd(Go,r)}var po=P("ZodNumberFormat",(r,e)=>{fp.init(r,e),Go.init(r,e)});function z(r){return gd(po,r)}function zx(r){return xd(po,r)}function vx(r){return yd(po,r)}function wx(r){return bd(po,r)}function Ix(r){return Sd(po,r)}var Ko=P("ZodBoolean",(r,e)=>{Ar.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Xd(r,t,n,o)});function R(r){return zd(Ko,r)}var Jo=P("ZodBigInt",(r,e)=>{hi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>Yd(r,n,o,i);let t=r._zod.bag;r.minValue=t.minimum??null,r.maxValue=t.maximum??null,r.format=t.format??null},{gte(r,e){return this.check(tt(r,e))},min(r,e){return this.check(tt(r,e))},gt(r,e){return this.check(gt(r,e))},lt(r,e){return this.check(ft(r,e))},lte(r,e){return this.check(et(r,e))},max(r,e){return this.check(et(r,e))},positive(r){return this.check(gt(BigInt(0),r))},negative(r){return this.check(ft(BigInt(0),r))},nonpositive(r){return this.check(et(BigInt(0),r))},nonnegative(r){return this.check(tt(BigInt(0),r))},multipleOf(r,e){return this.check(_t(r,e))}});function kx(r){return wd(Jo,r)}var Ts=P("ZodBigIntFormat",(r,e)=>{gp.init(r,e),Jo.init(r,e)});function $x(r){return kd(Ts,r)}function Tx(r){return $d(Ts,r)}var Gl=P("ZodSymbol",(r,e)=>{xp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Qd(r,t,n,o)});function Px(r){return Td(Gl,r)}var Kl=P("ZodUndefined",(r,e)=>{yp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>tl(r,t,n,o)});function Cx(r){return Pd(Kl,r)}var Jl=P("ZodNull",(r,e)=>{bp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>el(r,t,n,o)});function J(r){return Cd(Jl,r)}var Hl=P("ZodAny",(r,e)=>{Sp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>nl(r,t,n,o)});function Ox(){return Od(Hl)}var Xl=P("ZodUnknown",(r,e)=>{zp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>il(r,t,n,o)});function O(){return Rd(Xl)}var Yl=P("ZodNever",(r,e)=>{vp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>rl(r,t,n,o)});function Ps(r){return Md(Yl,r)}var Ql=P("ZodVoid",(r,e)=>{wp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ol(r,t,n,o)});function Le(r){return Ed(Ql,r)}var Xr=P("ZodDate",(r,e)=>{Ip.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>sl(r,n,o,i),r.min=(n,o)=>r.check(tt(n,o)),r.max=(n,o)=>r.check(et(n,o));let t=r._zod.bag;r.minDate=t.minimum?new Date(t.minimum):null,r.maxDate=t.maximum?new Date(t.maximum):null});function Rx(r){return Dd(Xr,r)}var eu=P("ZodArray",(r,e)=>{co(),kp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>yl(r,t,n,o),r.element=e.element},{min(r,e){return this.check(kt(r,e))},nonempty(r){return this.check(kt(1,r))},max(r,e){return this.check(io(r,e))},length(r,e){return this.check(so(r,e))},unwrap(){return this.element}});function b(r,e){return Ld(eu,r,e)}function Mx(r){let e=r._zod.def.shape;return f(Object.keys(e))}var Yr=P("ZodObject",(r,e)=>{co(),$p.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>bl(r,t,n,o),_.installLazyProp(r,"shape",t=>t._zod.def.shape,!1)},{keyof(){return f(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:O()})},loose(){return this.clone({...this._zod.def,catchall:O()})},strict(){return this.clone({...this._zod.def,catchall:Ps()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return _.extend(this,r)},safeExtend(r){return _.safeExtend(this,r)},merge(r){return _.merge(this,r)},pick(r){return _.pick(this,r)},omit(r){return _.omit(this,r)},partial(...r){return _.partial(en,this,r[0])},exactPartial(...r){return _.partial(Os,this,r[0],"exactPartial")},required(...r){return _.required(Rs,this,r[0])}});function A(r,e){let t={type:"object",shape:r??{},..._.normalizeParams(e)};return new Yr(t)}function d(r,e){return new Yr({type:"object",shape:r,catchall:Ps(),..._.normalizeParams(e)})}function Wt(r,e){return new Yr({type:"object",shape:r,catchall:O(),..._.normalizeParams(e)})}var Qr=P("ZodUnion",(r,e)=>{_r.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>os(r,t,n,o),r.options=e.options});function v(r,e){return new Qr({type:"union",options:r,..._.normalizeParams(e)})}var tu=P("ZodXor",(r,e)=>{Qr.init(r,e),Tp.init(r,e),r._zod.processJSONSchema=(t,n,o)=>os(r,t,n,o),r.options=e.options});function Ex(r,e){return new tu({type:"union",options:r,inclusive:!1,..._.normalizeParams(e)})}var ou=P("ZodDiscriminatedUnion",(r,e)=>{Qr.init(r,e),Cp.init(r,e)});function Dx(r,e,t){return new ou({type:"union",options:e,discriminator:r,..._.normalizeParams(t)})}var ru=P("ZodIntersection",(r,e)=>{Op.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Sl(r,t,n,o)});function nu(r,e){return new ru({type:"intersection",left:r,right:e})}var iu=P("ZodTuple",(r,e)=>{co(),fi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>zl(r,t,n,o)},{rest(r){return this.clone({...this._zod.def,rest:r})},partial(){let r=this._zod.def;if(r.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...r,items:r.items.map(e=>new en({type:"optional",innerType:e}))})}});function U(r,e,t){let n=e instanceof te,o=n?t:e,i=n?e:null;return new iu({type:"tuple",items:r,rest:i,..._.normalizeParams(o)})}var Bo=P("ZodRecord",(r,e)=>{co(),Rp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>vl(r,t,n,o),r.keyType=e.keyType,r.valueType=e.valueType});function k(r,e,t){return!e||!e._zod?new Bo({type:"record",keyType:a(),valueType:r,..._.normalizeParams(e)}):new Bo({type:"record",keyType:r,valueType:e,..._.normalizeParams(t)})}function Ax(r,e,t){return new Bo({type:"record",keyType:r,valueType:e,..._.normalizeParams(t),partial:!0})}function _x(r,e,t){return new Bo({type:"record",keyType:r,valueType:e,mode:"loose",..._.normalizeParams(t)})}var su=P("ZodMap",(r,e)=>{co(),Mp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>gl(r,t,n,o),r.keyType=e.keyType,r.valueType=e.valueType,r.min=(...t)=>r.check(xt(...t)),r.nonempty=t=>r.check(xt(1,t)),r.max=(...t)=>r.check(Lt(...t)),r.size=(...t)=>r.check(no(...t))});function Lx(r,e,t){return new su({type:"map",keyType:r,valueType:e,..._.normalizeParams(t)})}var au=P("ZodSet",(r,e)=>{co(),Ep.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>xl(r,t,n,o),r.min=(...t)=>r.check(xt(...t)),r.nonempty=t=>r.check(xt(1,t)),r.max=(...t)=>r.check(Lt(...t)),r.size=(...t)=>r.check(no(...t))});function jx(r,e){return new au({type:"set",valueType:r,..._.normalizeParams(e)})}var qo=P("ZodEnum",(r,e)=>{Dp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(n,o,i)=>al(r,n,o,i),r.enum=e.entries,r.options=Object.values(e.entries);let t=new Set(Object.keys(e.entries));r.extract=(n,o)=>{let i={};for(let s of n)if(t.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new qo({...e,checks:[],..._.normalizeParams(o),entries:i})},r.exclude=(n,o)=>{let i={...e.entries};for(let s of n)if(t.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new qo({...e,checks:[],..._.normalizeParams(o),entries:i})}});function f(r,e){let t=Array.isArray(r)?Object.fromEntries(r.map(n=>[n,n])):r;return new qo({type:"enum",entries:t,..._.normalizeParams(e)})}function Fx(r,e){return new qo({type:"enum",entries:r,..._.normalizeParams(e)})}var cu=P("ZodLiteral",(r,e)=>{Ap.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>cl(r,t,n,o),r.values=new Set(e.values),Object.defineProperty(r,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function x(r,e){return new cu({type:"literal",values:Array.isArray(r)?r:[r],..._.normalizeParams(e)})}var pu=P("ZodFile",(r,e)=>{_p.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ll(r,t,n,o),r.min=(t,n)=>r.check(xt(t,n)),r.max=(t,n)=>r.check(Lt(t,n)),r.mime=(t,n)=>r.check(Ao(Array.isArray(t)?t:[t],n))});function Nx(r){return jd(pu,r)}var du=P("ZodTransform",(r,e)=>{co(),Lp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>fl(r,t,n,o),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new Dt(r.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(_.issue(i,t.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=t.value),s.inst??(s.inst=r),t.issues.push(_.issue(s))}};let o=e.transform(t.value,t);return o instanceof Promise?o.then(i=>(t.value=i,t)):(t.value=o,t)}});function Cs(r){return new du({type:"transform",transform:r})}var en=P("ZodOptional",(r,e)=>{gi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>rs(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function ao(r){return new en({type:"optional",innerType:r})}var Os=P("ZodExactOptional",(r,e)=>{jp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>rs(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function lu(r){return new Os({type:"optional",innerType:r})}var uu=P("ZodNullable",(r,e)=>{Fp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>wl(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Jr(r){return new uu({type:"nullable",innerType:r})}function Vx(r){return ao(Jr(r))}var mu=P("ZodDefault",(r,e)=>{Np.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>$l(r,t,n,o),r.unwrap=()=>r._zod.def.innerType,r.removeDefault=r.unwrap});function hu(r,e){return new mu({type:"default",innerType:r,get defaultValue(){return typeof e=="function"?e():_.shallowClone(e)}})}var fu=P("ZodPrefault",(r,e)=>{Vp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Tl(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function gu(r,e){return new fu({type:"prefault",innerType:r,get defaultValue(){return typeof e=="function"?e():_.shallowClone(e)}})}var Rs=P("ZodNonOptional",(r,e)=>{Up.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Il(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function xu(r,e){return new Rs({type:"nonoptional",innerType:r,..._.normalizeParams(e)})}var yu=P("ZodSuccess",(r,e)=>{Bp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ul(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Ux(r){return new yu({type:"success",innerType:r})}var bu=P("ZodCatch",(r,e)=>{qp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Pl(r,t,n,o),r.unwrap=()=>r._zod.def.innerType,r.removeCatch=r.unwrap});function Su(r,e){return new bu({type:"catch",innerType:r,catchValue:typeof e=="function"?e:_.constantCatch(e)})}var zu=P("ZodNaN",(r,e)=>{Wp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>pl(r,t,n,o)});function Bx(r){return _d(zu,r)}var tn=P("ZodPipe",(r,e)=>{xi.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Cl(r,t,n,o),r.in=e.in,r.out=e.out});function cs(r,e){return new tn({type:"pipe",in:r,out:e})}var on=P("ZodCodec",(r,e)=>{tn.init(r,e),Lr.init(r,e)});function qx(r,e,t){return new on({type:"pipe",in:r,out:e,transform:t.decode,reverseTransform:t.encode})}function Wx(r){let e=r._zod.def;return new on({type:"pipe",in:e.out,out:e.in,transform:e.reverseTransform,reverseTransform:e.transform})}var vu=P("ZodPreprocess",(r,e)=>{tn.init(r,e),Zp.init(r,e)}),wu=P("ZodReadonly",(r,e)=>{Gp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Ol(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Iu(r){return new wu({type:"readonly",innerType:r})}var ku=P("ZodTemplateLiteral",(r,e)=>{Kp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>dl(r,t,n,o)});function Zx(r,e){return new ku({type:"template_literal",parts:r,..._.normalizeParams(e)})}var $u=P("ZodLazy",(r,e)=>{jr.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Ml(r,t,n,o),r.unwrap=()=>r._zod.def.getter()});function Ho(r){return new $u({type:"lazy",getter:r})}var Tu=P("ZodPromise",(r,e)=>{Hp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>Rl(r,t,n,o),r.unwrap=()=>r._zod.def.innerType});function Gx(r){return new Tu({type:"promise",innerType:r})}var Pu=P("ZodFunction",(r,e)=>{Jp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>hl(r,t,n,o)});function Kx(r){return new Pu({type:"function",input:Array.isArray(r?.input)?U(r?.input):r?.input??b(O()),output:r?.output??O()})}var rn=P("ZodCustom",(r,e)=>{Xp.init(r,e),oe.init(r,e),r._zod.processJSONSchema=(t,n,o)=>ml(r,t,n,o)});function Jx(r){let e=new be({check:"custom"});return e._zod.check=r,e}function Hx(r,e){return Fd(rn,r??(()=>!0),e)}function Cu(r,e={}){return Nd(rn,r,e)}function Ou(r,e){return Vd(r,e)}var Xx=Ud,Yx=Bd;function Qx(r,e={}){let t=new rn({type:"custom",check:"custom",fn:n=>n instanceof r,abort:!0,..._.normalizeParams(e)});return t._zod.bag.Class=r,t._zod.check=n=>{n.value instanceof r||n.issues.push({code:"invalid_type",expected:r.name,input:n.value,inst:t,path:[...t._zod.def.path??[]]})},t}var ey=(...r)=>qd({Codec:on,Boolean:Ko,String:Wo},...r);function ty(r){let e=Ho(()=>v([a(r),p(),R(),J(),b(e),k(a(),e)]));return e}function oy(r,e){return new vu({type:"pipe",in:Cs(r),out:e})}var tk={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ok(r){Pe({customError:r})}function rk(){return Pe().customError}var Ru;Ru||(Ru={});var nn={};It(nn,{ZodISODate:()=>Ut,ZodISODateTime:()=>Vt,ZodISODuration:()=>qt,ZodISOTime:()=>Bt,date:()=>ik,datetime:()=>nk,duration:()=>ak,time:()=>sk});function nk(r){return Br(Vt,r)}function ik(r){return qr(Ut,r)}function sk(r){return Wr(Bt,r)}function ak(r){return Zr(qt,r)}var W={...Xo,...ss,iso:nn},ck=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function pk(r,e){let t=r.$schema;return t==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":t==="http://json-schema.org/draft-07/schema#"?"draft-7":t==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function ry(r,e){return r.map((t,n)=>n<e?t:t.optional())}function dk(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}function lk(r,e){if(!r.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let t=r.slice(1).split("/").filter(Boolean);if(t.length===0)return e.rootSchema;let n=e.version==="draft-2020-12"?"$defs":"definitions";if(t[0]===n){let o=t[1]===void 0?void 0:dk(t[1]);if(!o||!e.defs[o])throw new Error(`Reference not found: ${r}`);return e.defs[o]}throw new Error(`Reference not found: ${r}`)}function uk(r,e){return W.transform(n=>n).check(n=>{let o=n.value;if(!(typeof o!="object"||o===null||Array.isArray(o)))for(let i of Object.getOwnPropertyNames(o)){let s=e.safeParse(i);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:i,path:[i],continue:!0})}}).pipe(r)}function ny(r,e){if(r!==!1)return r===void 0||r===!0?W.any():Ye(r,e)}var mk=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function iy(r,e){if(r.not!==void 0){if(typeof r.not=="object"&&Object.keys(r.not).length===0)return W.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(r.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(r.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(r.if!==void 0||r.then!==void 0||r.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(r.dependentSchemas!==void 0||r.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(r.$ref){let o=r.$ref;if(e.refs.has(o))return e.refs.get(o);if(e.processing.has(o))return W.lazy(()=>{if(!e.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return e.refs.get(o)});e.processing.add(o);let i=lk(o,e),s=Ye(i,e);return e.refs.set(o,s),e.processing.delete(o),s}if(r.enum!==void 0){let o=r.enum;if(e.version==="openapi-3.0"&&r.nullable===!0&&o.length===1&&o[0]===null)return W.null();if(o.length===0)return W.never();if(o.length===1)return W.literal(o[0]);if(o.every(s=>typeof s=="string"))return W.enum(o);let i=o.map(s=>W.literal(s));return i.length<2?i[0]:W.union([i[0],i[1],...i.slice(2)])}if(r.const!==void 0)return W.literal(r.const);let t=r.type;if(Array.isArray(t)){let o=t.map(i=>{let s={...r,type:i};return iy(s,e)});return o.length===0?W.never():o.length===1?o[0]:W.union(o)}if(!t)return W.any();let n;switch(t){case"string":{let o=W.string();if(r.format){let i=r.format;i==="email"?o=o.check(W.email()):i==="uri"||i==="uri-reference"?o=o.check(W.url()):i==="uuid"||i==="guid"?o=o.check(W.uuid()):i==="date-time"?o=o.check(W.iso.datetime({offset:!0})):i==="date"?o=o.check(W.iso.date()):i==="time"?o=o.check(W.regex(mk)):i==="duration"?o=o.check(W.iso.duration()):i==="hostname"?o=o.check(W.hostname()):i==="ipv4"?o=o.check(W.ipv4()):i==="ipv6"?o=o.check(W.ipv6()):i==="mac"?o=o.check(W.mac()):i==="cidr"?o=o.check(W.cidrv4()):i==="cidr-v6"?o=o.check(W.cidrv6()):i==="base64"?o=o.check(W.base64()):i==="base64url"?o=o.check(W.base64url()):i==="e164"?o=o.check(W.e164()):i==="credit_card"?o=o.check(W.creditCard()):i==="jwt"?o=o.check(W.jwt()):i==="emoji"?o=o.check(W.emoji()):i==="nanoid"?o=o.check(W.nanoid()):i==="cuid"?o=o.check(W.cuid()):i==="cuid2"?o=o.check(W.cuid2()):i==="ulid"?o=o.check(W.ulid()):i==="xid"?o=o.check(W.xid()):i==="ksuid"&&(o=o.check(W.ksuid()))}typeof r.minLength=="number"&&(o=o.min(r.minLength)),typeof r.maxLength=="number"&&(o=o.max(r.maxLength)),r.pattern&&(o=o.regex(new RegExp(r.pattern))),n=o;break}case"number":case"integer":{let o=t==="integer"?W.number().int():W.number();typeof r.minimum=="number"&&r.exclusiveMinimum!==!0&&(o=o.min(r.minimum)),typeof r.maximum=="number"&&r.exclusiveMaximum!==!0&&(o=o.max(r.maximum)),typeof r.exclusiveMinimum=="number"?o=o.gt(r.exclusiveMinimum):r.exclusiveMinimum===!0&&typeof r.minimum=="number"&&(o=o.gt(r.minimum)),typeof r.exclusiveMaximum=="number"?o=o.lt(r.exclusiveMaximum):r.exclusiveMaximum===!0&&typeof r.maximum=="number"&&(o=o.lt(r.maximum)),typeof r.multipleOf=="number"&&(o=o.multipleOf(r.multipleOf)),n=o;break}case"boolean":{n=W.boolean();break}case"null":{n=W.null();break}case"object":{let o={},i=r.properties||{},s=new Set(r.required||[]),c=typeof r.additionalProperties=="object"?Ye(r.additionalProperties,e):void 0;for(let[u,m]of Object.entries(i)){let h=Ye(m,e);Te(o,u,s.has(u)?h:h.optional())}if(r.patternProperties){let u=r.patternProperties,m=Object.keys(u),h=[];for(let y of m){let S=Ye(u[y],e),w=W.string().regex(new RegExp(y));h.push(W.looseRecord(w,S))}let g=[];if(Object.keys(o).length>0&&g.push(W.object(o).passthrough()),g.push(...h),g.length===0)n=W.object({}).passthrough();else if(g.length===1)n=g[0];else{let y=W.intersection(g[0],g[1]);for(let S=2;S<g.length;S++)y=W.intersection(y,g[S]);n=y}if(r.additionalProperties===!1){let y=Object.keys(o),S=m.map(T=>new RegExp(T)),w=n;n=n.check(T=>{if(!nt(T.value))return;let M=[];for(let V of Object.keys(T.value))y.includes(V)||S.some(F=>F.test(V))||M.push(V);M.length&&T.issues.push({code:"unrecognized_keys",keys:M,input:T.value,inst:w})})}}else{let u=W.object(o);r.additionalProperties===!1?n=u.strict():c?n=u.catchall(c):n=u.passthrough()}if(r.propertyNames!==void 0&&r.propertyNames!==!0){let u=typeof r.propertyNames=="object"&&r.propertyNames.type===void 0?{type:"string",...r.propertyNames}:r.propertyNames;n=uk(n,Ye(u,e))}break}case"array":{let o=r.prefixItems,i=r.items;if(o&&Array.isArray(o)){let s=typeof r.minItems=="number"?r.minItems:0,c=o.map(g=>Ye(g,e)),u=ry(c,s),m=Array.isArray(i)?void 0:ny(i,e),h=W.tuple(u);n=m?h.rest(m):h,typeof r.minItems=="number"&&(n=n.check(W.minLength(r.minItems))),typeof r.maxItems=="number"&&(n=n.check(W.maxLength(r.maxItems)))}else if(Array.isArray(i)){let s=typeof r.minItems=="number"?r.minItems:0,c=i.map(g=>Ye(g,e)),u=ry(c,s),m=ny(r.additionalItems,e),h=W.tuple(u);n=m?h.rest(m):h,typeof r.minItems=="number"&&(n=n.check(W.minLength(r.minItems))),typeof r.maxItems=="number"&&(n=n.check(W.maxLength(r.maxItems)))}else if(i!==void 0){let s=Ye(i,e),c=W.array(s);typeof r.minItems=="number"&&(c=c.min(r.minItems)),typeof r.maxItems=="number"&&(c=c.max(r.maxItems)),n=c}else n=W.array(W.any());break}default:throw new Error(`Unsupported type: ${t}`)}return n}function Ye(r,e){if(typeof r=="boolean")return r?W.any():W.never();let t=iy(r,e),n=r.type||r.enum!==void 0||r.const!==void 0;if(r.anyOf&&Array.isArray(r.anyOf)){let c=r.anyOf.map(m=>Ye(m,e)),u=W.union(c);t=n?W.intersection(t,u):u}if(r.oneOf&&Array.isArray(r.oneOf)){let c=r.oneOf.map(m=>Ye(m,e)),u=W.xor(c);t=n?W.intersection(t,u):u}if(r.allOf&&Array.isArray(r.allOf))if(r.allOf.length===0)t=n?t:W.any();else{let c=n?t:Ye(r.allOf[0],e),u=n?0:1;for(let m=u;m<r.allOf.length;m++)c=W.intersection(c,Ye(r.allOf[m],e));t=c}r.nullable===!0&&e.version==="openapi-3.0"&&(t=W.nullable(t)),r.readOnly===!0&&(t=W.readonly(t)),r.default!==void 0&&(t=t.default(r.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in r&&(o[c]=r[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in r&&(o[c]=r[c]);r.propertyNames!==void 0&&r.type==="object"&&r.$ref===void 0&&(o.propertyNames=r.propertyNames);for(let c of Object.keys(r))ck.has(c)||Te(o,c,r[c]);return Object.keys(o).length>0&&e.registry.add(t,o),r.description&&(t=t.describe(r.description)),t}function sy(r,e){if(typeof r=="boolean")return r?W.any():W.never();let t;try{t=JSON.parse(JSON.stringify(r))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=pk(t,e?.defaultTarget),o=t.$defs||t.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:t,registry:e?.registry??_e};return Ye(t,i)}var ay=Symbol("z.visit/resolving");function sn(r,e){let t=typeof e=="function"?e:(s,c)=>{let u=e[s._zod.def.type];return u?u(s,c):s},n=new Map;function o(s){let c=n.get(s);if(c===ay)return new jr({type:"lazy",getter:()=>n.get(s)});if(c!==void 0)return c;n.set(s,ay);let u=i(s),m=t(u,u!==s);return n.set(s,m),m}function i(s){let c=s._zod.def,u=c.type;switch(u){case"object":{let m=c.shape,h=Object.keys(m),g=!1,y={};for(let w of h){let T=o(m[w]);T!==m[w]&&(g=!0),y[w]=T}let S=c.catchall;return c.catchall&&(S=o(c.catchall),S!==c.catchall&&(g=!0)),g?he(s,{...c,shape:y,catchall:S}):s}case"array":{let m=o(c.element);return m===c.element?s:he(s,{...c,element:m})}case"tuple":{let m=c.items,h=!1,g=[];for(let S of m){let w=o(S);w!==S&&(h=!0),g.push(w)}let y=c.rest;return c.rest&&(y=o(c.rest),y!==c.rest&&(h=!0)),h?he(s,{...c,items:g,rest:y}):s}case"record":case"map":{let m=o(c.keyType),h=o(c.valueType);return m===c.keyType&&h===c.valueType?s:he(s,{...c,keyType:m,valueType:h})}case"set":{let m=o(c.valueType);return m===c.valueType?s:he(s,{...c,valueType:m})}case"union":{let m=c.options,h=!1,g=[];for(let y of m){let S=o(y);S!==y&&(h=!0),g.push(S)}return h?he(s,{...c,options:g}):s}case"intersection":{let m=o(c.left),h=o(c.right);return m===c.left&&h===c.right?s:he(s,{...c,left:m,right:h})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let m=o(c.innerType);return m===c.innerType?s:he(s,{...c,innerType:m})}case"pipe":{let m=o(c.in),h=o(c.out);return m===c.in&&h===c.out?s:he(s,{...c,in:m,out:h})}case"function":{let m=o(c.input),h=o(c.output);return m===c.input&&h===c.output?s:he(s,{...c,input:m,output:h})}case"lazy":{let m=c.getter,{_cachedInner:h,...g}=c;return he(s,{...g,getter:()=>o(m())})}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":return s;default:return s}}return o(r)}function cy(r){return sn(r,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:v(t.options)}})}function hk(r,e){if(!e?.length)return r;let t=r._zod.def;return he(r,ct(t,{checks:[...t.checks??[],...e]}),{parent:!0})}function py(r){return hk(r.out,r.checks)}function fk(r){return r.in._zod.traits.has("$ZodTransform")?py(r):r.in}function dy(r){return sn(r,{pipe:e=>fk(e._zod.def),default:(e,t)=>t?ao(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function ly(r){return sn(r,{pipe:e=>py(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var Mu={};It(Mu,{bigint:()=>bk,boolean:()=>yk,date:()=>Sk,number:()=>xk,string:()=>gk});function gk(r){return dd(Wo,r)}function xk(r){return fd(Go,r)}function yk(r){return vd(Ko,r)}function bk(r){return Id(Jo,r)}function Sk(r){return Ad(Xr,r)}var $k="cueframe/components";var Tk="cueframe.json",Pk=l.object({componentsDir:l.string().min(1).default($k)}).passthrough();function an(r){let e=r,t=kk(e).root;for(;;){let n=Yo(e,Tk);if(Ms(n)){let o=zk(n,"utf8"),i=Pk.parse(JSON.parse(o));return{root:e,manifest:i}}if(e===t)return null;e=Ik(e)}}function uy(r){return Yo(r.root,r.manifest.componentsDir)}function Es(r,e){return Yo(uy(r),e)}function my(r){let e=uy(r);return Ms(e)?vk(e).filter(t=>{let n=Yo(e,t);return wk(n).isDirectory()?Ms(Yo(n,"index.tsx"))&&Ms(Yo(n,"config.ts")):!1}).sort():[]}import{existsSync as zne,readFileSync as vne}from"fs";import{join as wne}from"path";var hy=d({featureId:a().describe("Stable billing feature id."),name:a().describe("Human-readable feature name."),type:f(["metered","boolean","credit_system"]).describe("metered = a depleting/gauge quota (has balances); boolean = an on/off plan grant; credit_system = a spendable wallet the metered lines draw from."),unit:v([f(["cents","count","minutes","gb"]),J()]).describe("What `balance`/`includedUsage`/`usage` are COUNTED IN \u2014 do not assume. `exports` is output-MINUTES (not a number of renders), `compose`/`ai_tokens`/`compose_verify`/`generate` are CENTS of spend (not a number of calls), `compose_capture` is a count of stills, `storage` is GB, a credit system is cents (1 credit = $0.01). null = boolean feature, nothing to count."),included:R().nullable().describe("Does the CURRENT plan grant this feature? For a credit-funded feature (see `fundedBy`) this is true whenever the plan grants the funding wallet \u2014 spend is then bounded by `balance`, not by inclusion. false = not on this plan (a create gated on it 402s billing_required); null = unknown (billing not configured / no live data)."),unlimited:R().nullable().describe("Metered only: the plan grants an effectively-unlimited allowance. null = unknown / boolean feature."),balance:p().nullable().describe("Metered only: remaining balance for the current period, in THIS feature's unit. For a credit-funded feature it is the funding wallet's balance restated at `creditCost` credits per unit \u2014 a SHARE of a pool, not a private allowance. null = unknown / boolean feature."),includedUsage:p().nullable().describe("Metered only: the plan's included allowance (the period limit), in this feature's unit. null = unknown / boolean feature."),usage:p().nullable().describe("Metered only: amount consumed this period, in this feature's unit. null = unknown / boolean feature."),nextResetAt:p().nullable().describe("Metered only: epoch-ms when the period balance resets. null = unknown / no scheduled reset."),fundedBy:a().nullable().describe("The credit system that actually pays for this feature (always `credits` \u2014 there is one wallet). Non-null means the feature has NO separate allowance: its `balance` restates that shared wallet, and every other feature with the same `fundedBy` competes for the same money. null = the plan grants this feature directly."),creditCost:p().nullable().describe("Credits consumed per ONE unit of this feature (exports 50 = $0.50 per 1080p output-minute; compose_capture 2 = $0.02 per still). null = not credit-funded.")}).describe("A single feature's entitlement: whether the plan includes it, plus remaining/limit when metered.");var Ck=d({orgId:a().describe("The org this API key is bound to \u2014 resolved server-side from the Authorization credential, NEVER from the request body/query."),displayName:a().nullable().describe("Org/customer display name from the billing record; null when not set or unknown."),plan:v([d({id:a().describe("Plan/product id (e.g. free, pro, business, studio)."),name:a().nullable().describe("Plan display name.")}),J()]).describe("The customer's current base plan/tier. null = unknown (billing not configured, or no active plan resolvable yet)."),entitlements:k(a(),hy).describe("Per-feature entitlements keyed by featureId. Covers the billing-gated capabilities: `exports` gates create_render AND generate_media output; `compose` gates compose; `brand_kits` gates create_brand_kit; plus ai_tokens/storage/compose_verify/compose_capture/etc. Most capabilities are CREDIT-FUNDED \u2014 `included` is true and the real limit is `balance`, drawn from the shared wallet named in `fundedBy` (`credits` \u2014 generation included; a free org is additionally bounded by a generation cap). So read `balance`, not `included`, to decide whether you can afford a call; `included:false` means the plan genuinely lacks the feature. Check BEFORE a metered call to avoid a mid-workflow 402 billing_required (whose error `details.featureId` names the gating feature)."),costCeilings:d({generateMediaUsdPerCall:p().nullable().describe("Per-call USD ceiling for generate_media: a generation whose ESTIMATE exceeds this 402s (generation_budget_exceeded) before any spend. Right-size the prompt/duration under this. null = unknown.")}).describe("Discoverable per-call cost ceilings so an agent can price/right-size a request before a guaranteed 402."),billingConfigured:R().describe("false = billing is not configured in this environment, so plan/entitlement values are best-effort and may be null (unknown), not authoritative.")}).describe("Account discovery for the authenticated key: identity + plan + entitlements + cost ceilings. Read this to see what your plan/credits allow before a metered call (create_render / compose / generate_media / create_brand_kit).");var Ok=0,Rk=9007199254740991,Mk=d({name:a().min(1),permissions:k(a(),b(f(["read","write"])).min(1)).describe("Resource \u2192 actions grant. Resources: media, sessions, projects, renders, webhooks, billing. Actions: read, write. Least-privilege \u2014 grant only what's needed (billing:write is required to start a checkout)."),expiresIn:z().gt(Ok).max(Rk).optional().describe("Lifetime in seconds; omit for no expiry.")});var Ek=d({key:a().describe("The full secret key (cf_test_\u2026 / cf_live_\u2026). Shown ONCE \u2014 store it now."),id:a(),prefix:a(),start:a().describe("First chars of the key, for later identification.")});var fy=d({ref:a().describe("Placement handle: a pack soundId/bedId, or an org media id."),role:f(["vo","music","sfx","ambience"]).describe("Declared role for mix policy."),envelopeClass:f(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),description:a(),durationSec:p(),evidence:d({envelopeClass:f(["transient","sweep","ambient"]),attackMs:p().optional(),spectralCentroidHz:p().optional(),meanVolumeDb:p().optional(),maxVolumeDb:p().optional()}).describe("Envelope probe evidence (always carries envelopeClass)."),source:f(["pack","org","generated"]).describe("Provenance discriminant."),license:a().describe('"CC0" (pack), "org-owned"/a CC token (org), or "generated".'),provenance:a().describe("Human-legible provenance (pack attribution / org-owned / generator + prompt)."),bpm:p().optional().describe("Tempo \u2014 present for music-role entries."),mood:b(a()).optional().describe("Editorial mood tags \u2014 present for pack music beds.")});var gy=d({id:a().describe("Billing catalog product id (e.g. pro, pro_yearly)."),tier:a().describe("Plan tier: pro | business | studio."),name:a(),interval:a().describe("month | year."),priceUsd:p().describe("Price in USD for the interval.")});var Dk=d({plans:b(gy).describe("Every purchasable {tier, interval} and its product id."),billingConfigured:R()});var Ak=200,_k=200,Lk=2e3,jk=500,Fk=500,Nk=5e3,Vk=100,Uk=900,Bk=100,qk=100,Wk=900,Zk=0,Gk=1,Kk=300,Jk=0,Hk=1e4,Xk=120,Yk=24,Qk=40,e$=500,t$=0,o$=5e3,r$=0,n$=5e3,i$=0,s$=2e3,a$=0,c$=9007199254740991,p$=24,d$=0,l$=1,u$=300,m$=24,h$=4e3,f$=0,g$=60,x$=6,y$=24,b$=60,xy=d({kitId:a().min(1).max(Ak),name:a().min(1).max(_k),description:a().max(Lk).optional(),tagline:a().max(jk).optional(),secondaryTagline:a().max(Fk).optional(),colors:d({primary:a().min(1),secondary:a().min(1),accent:a().min(1),background:a().min(1),text:a().min(1)}),extraColors:b(d({hex:a().min(1),label:a().min(1),usage:a().optional()})).optional(),headingFont:d({fontFamily:a().min(1),fontWeight:p()}),bodyFont:d({fontFamily:a().min(1),fontWeight:p()}),voiceGuidelines:a().max(Nk).optional(),syncCaptions:R().optional(),captionProfile:d({fontFamily:a().optional(),fontSize:p().optional(),fontWeight:z().min(Vk).max(Uk).multipleOf(Bk).optional().describe("Weight of the ordinary caption run: an integer 100-900 in steps of 100. It must be a weight the caption family actually ships a file for \u2014 the render refuses a face it has no bytes for rather than let the browser substitute a nearby one, and the refusal names this field and the weights that family ships. Omit it and the family's declared default is drawn: every built-in family declares a base and an emphasis weight it has files for, so naming only `fontFamily` is always valid. A family supplied as a brand font asset is decided by the sealed font manifest at render time."),color:a().optional(),highlightColor:a().optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase"]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().optional(),entranceStaggerMs:p().optional(),exitMs:p().optional(),emphasisColor:a().optional(),emphasisScale:p().optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(qk).max(Wk).optional().describe("Weight of an emphasised caption run: an integer 100-900. It must be a weight the emphasis family actually ships a file for \u2014 the render refuses a face it has no bytes for rather than let the browser substitute a nearby one, and the refusal names this field and the weights that family ships. Omit it and the family's declared emphasis default is drawn, which every built-in family has files for. A family supplied as a brand font asset is decided by the sealed font manifest at render time."),emphasisFontStyle:f(["normal","italic"]).optional().describe("`italic` is admissible ONLY when the resolved emphasis family ships an italic FILE, i.e. a brand-kit family sealed in italic. No built-in caption family ships one and neither does a generic CSS stack, so `italic` over either is refused at this field before capture instead of being faked by slanting the upright face. The enum keeps `italic` because a custom kit may carry it; emphasise a built-in family with `emphasisFontWeight`, `emphasisColor` or `emphasisScale` instead."),emphasisTextTransform:f(["none","uppercase"]).optional(),emphasisLetterSpacing:p().optional(),emphasisPlate:R().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional()}).optional().describe("Caption typography. THE ADMISSIBLE VALUES OF THE FONT FIELDS DEPEND ON THE RESOLVED FAMILY, so this schema cannot enumerate them: a caption run is drawn only where a font FILE exists for that exact family, weight and style, and any other face is refused before capture (naming the offending field) rather than substituted by the browser. A built-in family ships one upright file per declared weight range and NO italic file at all, so `fontWeight` / `emphasisFontWeight` must fall inside that family's range and `emphasisFontStyle: \"italic\"` is refused over it. A family supplied as a brand font asset is decided by the sealed font manifest at render time, and is the only place a real italic comes from. `fontFamily` / `emphasisFontFamily` must therefore name a built-in family or one the brand kit seals; a pure CSS generic stack (`sans-serif`) names no file and is refused too. An omitted weight or style takes the family's declared default and is judged exactly as an authored one is."),motion:d({duration:p().optional(),easing:v([f(["linear","ease","ease-in","ease-out","ease-in-out"]),d({kind:x("cubic-bezier"),x1:p(),y1:p(),x2:p(),y2:p()})]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:p().optional(),exitMs:p().optional()}).optional(),logo:d({src:a().min(1),alt:a().optional(),placement:f(["tl","tr","bl","br"]).optional(),sizePct:p().optional()}).optional(),intro:d({kind:f(["card","video"]),src:a().min(1).optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),outro:d({kind:f(["card","video"]),src:a().min(1).optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),watermark:d({src:a().min(1),opacity:p().min(Zk).max(Gk).optional(),placement:f(["tl","tr","bl","br"]).optional()}).optional(),spacing:d({base:p().optional(),lg:p().optional(),sm:p().optional()}).optional(),sizing:d({fontSizeHeading:p().optional(),fontSizeBody:p().optional(),fontSizeLabel:p().optional(),borderRadius:p().optional()}).optional(),audio:d({sfxIntensity:f(["off","light","standard","dense"]).optional(),musicEnabled:R().optional(),musicMood:a().max(Kk).optional(),sonicLogo:d({ref:a().min(1),placement:f(["intro","outro","both"]),offsetMs:z().min(Jk).max(Hk).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:d({tick:a().min(1).optional(),pop:a().min(1).optional(),impact:a().min(1).optional(),confirm:a().min(1).optional(),error:a().min(1).optional(),whoosh:a().min(1).optional(),riser:a().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:d({bedId:a().min(1).optional(),genre:a().max(Xk).optional(),bpmRange:d({min:p(),max:p()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:v([d({ref:a().min(1)}),J()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:b(a().min(1)).max(Yk).optional(),contactSheetKey:a().min(1).optional(),motifs:b(d({id:a().min(1).max(Qk),observed:a().min(1).max(e$),body:v([d({kind:x("card"),html:a().min(1),tokens:k(a(),a()).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()).optional()})]),motion:d({preset:f(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:z().min(t$).max(o$).optional(),exitMs:z().min(r$).max(n$).optional(),staggerMs:z().min(i$).max(s$).optional(),confidence:f(["high","low"]).optional()}).optional(),role:f(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:d({x:p(),y:p(),w:p(),h:p()}).optional(),evidence:b(z().min(a$).max(c$)).max(p$).optional(),diffScore:p().min(d$).max(l$).optional(),coverage:f(["reproduced","approximated","skipped"]),skipReason:a().max(u$).optional()})).max(m$).optional(),styleRubric:a().max(h$).optional(),density:d({graphicsPerMin:p().min(f$).max(g$),maxSimultaneous:z().min(1).max(x$)}).optional(),inspiration:d({sources:b(a()).min(1).max(y$),extractedAt:p(),extractionVersion:a().min(1).max(b$)}).optional()}).describe("POST /brand-kits body. Org/user are server-resolved; never accepted from the body.");var S$=12,z$=d({motifId:a().min(1).optional(),limit:z().min(1).max(S$).optional()}).describe("POST /brand-kits/{id}/exemplars body \u2014 select which exemplar frames to presign.");var v$=-9007199254740991,w$=9007199254740991,I$=d({exemplars:b(d({index:z().min(v$).max(w$),url:a()})),contactSheetUrl:a().optional()});var k$=300,$$=0,T$=1e4,P$=120,C$=24,O$=40,R$=500,M$=0,E$=5e3,D$=0,A$=5e3,_$=0,L$=2e3,j$=0,F$=9007199254740991,N$=24,V$=0,U$=1,B$=300,q$=24,W$=4e3,Z$=0,G$=60,K$=6,J$=24,H$=60,cn=d({id:a(),name:a(),description:a().nullable(),tagline:a().nullable(),colors:k(a(),a()),extraColors:b(d({name:a(),value:a()})).optional(),fonts:d({heading:v([d({family:a(),weight:v([p(),a()]).optional()}),J()]),body:v([d({family:a(),weight:v([p(),a()]).optional()}),J()])}),voiceGuidelines:a().nullable(),captions:d({sync:R(),profile:v([k(a(),O()),J()])}),motion:d({duration:p().optional(),easing:v([f(["linear","ease","ease-in","ease-out","ease-in-out"]),d({kind:x("cubic-bezier"),x1:p(),y1:p(),x2:p(),y2:p()})]).optional(),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:p().optional(),exitMs:p().optional()}).optional(),logo:d({src:a(),alt:a().optional(),placement:f(["tl","tr","bl","br"]).optional(),sizePct:p().optional()}).optional(),intro:d({kind:f(["card","video"]),src:a().optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),outro:d({kind:f(["card","video"]),src:a().optional(),title:a().optional(),subtitle:a().optional(),durationMs:p().optional()}).optional(),watermark:d({src:a(),opacity:p().optional(),placement:f(["tl","tr","bl","br"]).optional()}).optional(),spacing:d({base:p().optional(),lg:p().optional(),sm:p().optional()}).optional(),sizing:d({fontSizeHeading:p().optional(),fontSizeBody:p().optional(),fontSizeLabel:p().optional(),borderRadius:p().optional()}).optional(),audio:d({sfxIntensity:f(["off","light","standard","dense"]).optional(),musicEnabled:R().optional(),musicMood:a().max(k$).optional(),sonicLogo:d({ref:a().min(1),placement:f(["intro","outro","both"]),offsetMs:z().min($$).max(T$).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:d({tick:a().min(1).optional(),pop:a().min(1).optional(),impact:a().min(1).optional(),confirm:a().min(1).optional(),error:a().min(1).optional(),whoosh:a().min(1).optional(),riser:a().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:d({bedId:a().min(1).optional(),genre:a().max(P$).optional(),bpmRange:d({min:p(),max:p()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:v([d({ref:a().min(1)}),J()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional(),exemplarKeys:b(a().min(1)).max(C$).optional(),contactSheetKey:a().min(1).optional(),motifs:b(d({id:a().min(1).max(O$),observed:a().min(1).max(R$),body:v([d({kind:x("card"),html:a().min(1),tokens:k(a(),a()).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()).optional()})]),motion:d({preset:f(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),enterMs:z().min(M$).max(E$).optional(),exitMs:z().min(D$).max(A$).optional(),staggerMs:z().min(_$).max(L$).optional(),confidence:f(["high","low"]).optional()}).optional(),role:f(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),zone:d({x:p(),y:p(),w:p(),h:p()}).optional(),evidence:b(z().min(j$).max(F$)).max(N$).optional(),diffScore:p().min(V$).max(U$).optional(),coverage:f(["reproduced","approximated","skipped"]),skipReason:a().max(B$).optional()})).max(q$).optional(),styleRubric:a().max(W$).optional(),density:d({graphicsPerMin:p().min(Z$).max(G$),maxSimultaneous:z().min(1).max(K$)}).optional(),inspiration:d({sources:b(a()).min(1).max(J$),extractedAt:p(),extractionVersion:a().min(1).max(H$)}).optional(),createdAt:a(),updatedAt:a()}).describe("Brand kit response per \xA7Brand Kits.");var $e=d({hasMore:R(),nextCursor:a().nullable(),prevCursor:a().nullable()}).describe("Cursor pagination metadata.");var X$=d({data:b(cn),pagination:$e});var Y$=300,Qo=d({music:d({enabled:R().describe("Whether the compose carries a music bed."),mood:a().max(Y$).optional().describe("Freeform mood/genre prompt for the GENERATED bed (e.g. 'understated editorial, warm'). Ignored when mediaId pins a track."),mediaId:a().min(1).optional().describe("Pin a client-imported track as the bed. HONOR-OR-REFUSE: must be an org-owned kind:'audio' media item, else 422 \u2014 never accept-and-ignore. Absent \u21D2 generate from mood.")}).optional(),sfx:d({intensity:f(["off","light","standard","dense"]).describe("SFX placement density. Real-footage content keeps restraint caps regardless ('dense' is the explicit opt-out); generated/graphic-led content unlocks the standard tier.")}).optional()});var Q$=0,eT=0,tT=0,oT=80,rT=8,er=d({id:a().min(1),intent:a().min(1).describe("What this beat DOES editorially (hook the claim, prove it, CTA\u2026)."),durationSec:p().gt(Q$).optional(),source:d({mediaId:a().min(1),startSec:p().min(eT),endSec:p().gt(tT)}).optional().describe("MOMENT PINNING: this beat uses EXACTLY this window of this media item \u2014 honored to-the-frame or refused. v1: every sourced beat must reference the SAME mediaId (multi-source briefs are refused loudly, not silently merged)."),graphic:d({role:f(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]).describe("The mandated graphic's editorial role (the graphics-plan GraphicRole vocabulary)."),items:b(a().min(1).max(oT)).max(rT).optional().describe("Mandated list items (enumeration/sequence) \u2014 carried VERBATIM into the plan's copy.items.")}).optional().describe("GRAPHICS MANDATE: the plan MUST carry a graphics request of this role overlapping this beat's window \u2014 enforced at the plan gate (honor-or-refuse, like moment pinning). Prose mustIncludes reaches only the judge; this is the checkable form.")});var tr=f(["overlay","component","card","no-transitions"]);var nT=3,or=d({holdAt:b(f(["content","layout","motion"])).max(nT).optional().describe("Checkpoint gates \u2014 the compose pauses at each named stage for review via resume. DEFAULT (gates absent): the compose holds at EVERY stage \u2014 your agent reviews and resumes each one; an unreviewed checkpoint times out loudly after 60min. Auto-progression is the opt-in (gates.autoApprove: true)."),autoApprove:R().optional().describe("true = fully autonomous (compose runs with NO gates \u2014 the headless opt-in; without it a brief holds at every stage by default). Mutually exclusive with a non-empty holdAt."),reviewMode:f(["agent","hosted"]).optional().describe("Who captures the review decision. Default 'agent': you relay the packet and call resume. 'hosted': every checkpoint mints a review-page URL (checkpoint.ready payload + get_checkpoint's reviewUrl) where a human approves/revises from the browser \u2014 no account, no agent session; the recorded decision rides the SAME resume rail and you learn of it via checkpoint webhooks / wait_job.")});var ve=d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional()}).describe("Output-format spec per \xA7Format.");var iT=200,sT=2e3,aT=500,cT=100,pT=0,dT=3600,lT=500,uT=500,mT=35,hT=500,fT=2e3,gT=24,xT=24,yT=12,bT=24,ST=0,zT=0,vT=0,wT=0,IT=0,kT=0,$T=0,TT=4,PT=0,CT=0,OT=0,RT=0,MT=0,ET=0,DT=0,AT=0,_T=0,LT=1,jT=0,FT=1,NT=.1,VT=1,UT=0,BT=0,qT=-.3,WT=.3,ZT=-.3,GT=.3,KT=0,JT=1,HT=0,XT=1,YT=-.3,QT=.3,e1=0,t1=1,o1=0,r1=0,n1=1,i1=0,s1=1,a1=0,c1=1,p1=0,d1=1,l1=0,u1=0,m1=2,h1=16,f1=8,g1=d({projectId:a().min(1),name:a().max(iT).optional(),goal:a().min(1).max(sT).describe("What the video must accomplish."),audience:a().max(aT).optional(),platform:a().max(cT).optional(),format:ve.optional(),durationSec:p().gt(pT).max(dT).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:a().max(lT).optional(),cta:a().max(uT).optional(),locale:a().max(mT).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:a().max(hT).optional(),caption:a().max(fT).optional(),beats:b(er).max(gT).optional(),mustIncludes:b(a().min(1)).max(xT).optional(),references:b(a()).max(yT).optional(),captions:d({styleId:a().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:b(a().min(1)).max(bT).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:d({textAnimation:a().optional(),transitions:a().optional(),colorMood:a().optional(),captionStyle:a().optional()}).optional(),seededGraphics:b(d({id:a().min(1),startTime:p().min(ST).describe("Timeline start (seconds)."),duration:p().gt(zT).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(vT).describe("Source trim start (seconds)."),end:p().min(wT).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(IT),end:p().min(kT),reason:a().optional()})).optional(),volume:p().min($T).max(TT).optional(),muted:R().optional(),playbackRate:p().gt(PT).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(CT).optional(),fadeOutMs:p().min(OT).optional(),loop:R().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(RT),attackMs:p().min(MT),releaseMs:p().min(ET),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(DT).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(AT).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(_T).max(LT),y:p().min(jT).max(FT)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(NT).max(VT).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(UT).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(BT).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(qT).max(WT).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(ZT).max(GT).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(KT).max(JT),y:p().min(HT).max(XT)}).optional(),parallax:p().min(YT).max(QT).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:k(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(e1).max(t1).optional(),scale:p().gt(o1).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(r1).max(n1),y:p().min(i1).max(s1),w:p().gt(a1).max(c1),h:p().gt(p1).max(d1)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(l1)}).optional(),linkGroupId:a().min(1).optional(),animate:k(a(),b(d({time:p().min(u1),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(m1)).optional()})).max(h1).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:b(tr).max(f1).optional(),gates:or.optional(),audio:Qo.optional()});var x1=-9007199254740991,y1=9007199254740991,yy=d({composeUsd:p(),renderUsdPerExport:p(),estimatedJourneyUsd:p().describe("compose + expected renders \u2014 relay this BEFORE composing."),revisionCyclesIncluded:z().min(x1).max(y1).describe("Revise cycles the compose price includes per gate (A1). Beyond this, resume(revise) is refused with `revision_cycles_exhausted` \u2014 saying no never silently charges.")});var b1=200,S1=2e3,z1=500,v1=100,w1=0,I1=3600,k1=500,$1=500,T1=35,P1=500,C1=2e3,O1=24,R1=24,M1=12,E1=24,D1=0,A1=0,_1=0,L1=0,j1=0,F1=0,N1=0,V1=4,U1=0,B1=0,q1=0,W1=0,Z1=0,G1=0,K1=0,J1=0,H1=0,X1=1,Y1=0,Q1=1,eP=.1,tP=1,oP=0,rP=0,nP=-.3,iP=.3,sP=-.3,aP=.3,cP=0,pP=1,dP=0,lP=1,uP=-.3,mP=.3,hP=0,fP=1,gP=0,xP=0,yP=1,bP=0,SP=1,zP=0,vP=1,wP=0,IP=1,kP=0,$P=0,TP=2,PP=16,CP=8,Eu=d({id:a(),projectId:a(),kind:f(["authored","clip"]).describe("authored = create_brief; clip = minted by suggest_briefs from an AI clip suggestion."),sourceSuggestionId:a().optional().describe("kind:'clip' provenance \u2014 the suggestion this Brief was minted from."),name:a().max(b1).optional(),goal:a().min(1).max(S1).describe("What the video must accomplish."),audience:a().max(z1).optional(),platform:a().max(v1).optional(),format:ve.optional(),durationSec:p().gt(w1).max(I1).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:a().max(k1).optional(),cta:a().max($1).optional(),locale:a().max(T1).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:a().max(P1).optional(),caption:a().max(C1).optional(),beats:b(er).max(O1).optional(),mustIncludes:b(a().min(1)).max(R1).optional(),references:b(a()).max(M1).optional(),captions:d({styleId:a().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:b(a().min(1)).max(E1).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:d({textAnimation:a().optional(),transitions:a().optional(),colorMood:a().optional(),captionStyle:a().optional()}).optional(),seededGraphics:b(d({id:a().min(1),startTime:p().min(D1).describe("Timeline start (seconds)."),duration:p().gt(A1).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(_1).describe("Source trim start (seconds)."),end:p().min(L1).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(j1),end:p().min(F1),reason:a().optional()})).optional(),volume:p().min(N1).max(V1).optional(),muted:R().optional(),playbackRate:p().gt(U1).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(B1).optional(),fadeOutMs:p().min(q1).optional(),loop:R().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(W1),attackMs:p().min(Z1),releaseMs:p().min(G1),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(K1).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(J1).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(H1).max(X1),y:p().min(Y1).max(Q1)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(eP).max(tP).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(oP).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(rP).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(nP).max(iP).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(sP).max(aP).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(cP).max(pP),y:p().min(dP).max(lP)}).optional(),parallax:p().min(uP).max(mP).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:k(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(hP).max(fP).optional(),scale:p().gt(gP).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(xP).max(yP),y:p().min(bP).max(SP),w:p().gt(zP).max(vP),h:p().gt(wP).max(IP)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(kP)}).optional(),linkGroupId:a().min(1).optional(),animate:k(a(),b(d({time:p().min($P),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(TP)).optional()})).max(PP).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:b(tr).max(CP).optional(),gates:or.optional(),audio:Qo.optional(),quote:yy,createdAt:p(),updatedAt:p()});var OP=d({data:b(Eu),pagination:$e});var RP=200,MP=2e3,EP=500,DP=100,AP=0,_P=3600,LP=500,jP=500,FP=35,NP=500,VP=2e3,UP=24,BP=24,qP=12,WP=24,ZP=0,GP=0,KP=0,JP=0,HP=0,XP=0,YP=0,QP=4,eC=0,tC=0,oC=0,rC=0,nC=0,iC=0,sC=0,aC=0,cC=0,pC=1,dC=0,lC=1,uC=.1,mC=1,hC=0,fC=0,gC=-.3,xC=.3,yC=-.3,bC=.3,SC=0,zC=1,vC=0,wC=1,IC=-.3,kC=.3,$C=0,TC=1,PC=0,CC=0,OC=1,RC=0,MC=1,EC=0,DC=1,AC=0,_C=1,LC=0,jC=0,FC=2,NC=16,VC=8,UC=d({name:a().max(RP).optional(),goal:a().min(1).max(MP).optional().describe("What the video must accomplish."),audience:a().max(EP).optional(),platform:a().max(DP).optional(),format:ve.optional(),durationSec:p().gt(AP).max(_P).optional().describe("Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (\xB11.5s) and refuses a brief it cannot honor."),tone:a().max(LP).optional(),cta:a().max(jP).optional(),locale:a().max(FP).optional().describe("Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions."),hook:a().max(NP).optional(),caption:a().max(VP).optional(),beats:b(er).max(UP).optional(),mustIncludes:b(a().min(1)).max(BP).optional(),references:b(a()).max(qP).optional(),captions:d({styleId:a().min(1).optional().describe("Caption style id (e.g. 'serif-emphasis@1')."),emphasisPhrases:b(a().min(1)).max(WP).optional().describe("Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.")}).optional(),motionStyle:d({textAnimation:a().optional(),transitions:a().optional(),colorMood:a().optional(),captionStyle:a().optional()}).optional(),seededGraphics:b(d({id:a().min(1),startTime:p().min(ZP).describe("Timeline start (seconds)."),duration:p().gt(GP).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(KP).describe("Source trim start (seconds)."),end:p().min(JP).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(HP),end:p().min(XP),reason:a().optional()})).optional(),volume:p().min(YP).max(QP).optional(),muted:R().optional(),playbackRate:p().gt(eC).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(tC).optional(),fadeOutMs:p().min(oC).optional(),loop:R().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(rC),attackMs:p().min(nC),releaseMs:p().min(iC),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(sC).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(aC).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(cC).max(pC),y:p().min(dC).max(lC)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(uC).max(mC).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(hC).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(fC).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(gC).max(xC).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(yC).max(bC).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(SC).max(zC),y:p().min(vC).max(wC)}).optional(),parallax:p().min(IC).max(kC).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:k(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min($C).max(TC).optional(),scale:p().gt(PC).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(CC).max(OC),y:p().min(RC).max(MC),w:p().gt(EC).max(DC),h:p().gt(AC).max(_C)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(LC)}).optional(),linkGroupId:a().min(1).optional(),animate:k(a(),b(d({time:p().min(jC),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(FC)).optional()})).max(NC).optional().describe("Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."),exclusions:b(tr).max(VC).optional(),gates:or.optional(),audio:Qo.optional()});var BC="month",qC=d({plan:f(["credit_pack_10","credit_pack_30","credit_pack_100"]).describe("Plan tier to subscribe to."),interval:f(["month","year"]).default(BC).describe("Billing interval: 'month' (monthly) or 'year' (annual, ~2 months free).")});var WC=d({url:a().describe("Hosted Stripe checkout URL to open in a browser to complete payment. Always present on success \u2014 an existing saved card is never charged without confirming here."),plan:a(),interval:a(),productId:a().describe("Resolved billing catalog product id.")});var ZC=0,GC=9007199254740991,KC=2e3,by=d({anchor:v([d({beatId:a().min(1)}),d({timecodeMs:z().min(ZC).max(GC)})]).describe("What the comment is about: a plan beat (content gate) or a timecode on the artifact (layout/motion gates)."),verdict:f(["approve","revise","lock"]).describe("Per-anchor verdict under the single gate decision. `lock` = contractually frozen \u2014 the director touching a locked element is a defect, surfaced as a lock_violation verdict on the next packet (the no-discard machinery)."),note:a().max(KC).optional()});var Ds=d({thisStepUsd:p().describe("What approving costs NEXT (the render at the final gate; $0 earlier)."),jobSpendSoFarUsd:p().describe("What has SETTLED so far \u2014 $0 while the run is live (compose is charge-on-delivery on both rails), so abandoning at a gate charges nothing."),estimatedJourneyTotalUsd:p().describe("The same journey number the Brief quoted.")});var As=f(["content","layout","motion"]);var JC=-9007199254740991,HC=9007199254740991,XC=-9007199254740991,YC=9007199254740991,Du=d({id:a(),projectId:a(),composeJobId:a().optional(),briefId:a().optional(),kind:f(["gate","score"]),stage:As.optional(),version:z().min(JC).max(HC),status:f(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:O().describe("The stage artifact under review: the locked ComposePlan at content; the composition wire shape at layout/motion; the judged composition snapshot on kind:'score'."),stillUrls:b(a()).optional().describe("Presigned storyboard/eval stills \u2014 the packet's visual evidence (may be GC'd by the retention sweep after the job goes terminal; the decision record is immortal)."),criticVerdicts:O().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:Ds.optional(),revisionCycle:z().min(XC).max(YC).describe("Revise cycles this gate has consumed. The brief quote states the included count (revisionCyclesIncluded); beyond it, resume(revise) is refused with a typed error."),decision:O().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:f(["agent","hosted"]).optional().describe("How this packet is decided (from the Brief's gates). 'hosted' = the review PAGE captures the decision; absent/'agent' = the decision flows back through the driving agent."),reviewUrl:a().optional().describe("Hosted review-page URL (present when reviewMode is 'hosted') \u2014 a human decides from this link, no account or agent session; the recorded decision rides the SAME resume rail, and the agent learns of it via checkpoint webhooks / wait_job."),createdAt:p(),updatedAt:p()});var QC=d({data:b(Du),pagination:$e});var eO=24,tO=4e3,oO=d({decision:f(["approve","revise","abandon"]).describe("The ONE verdict for this gate (GitHub review grammar). approve = proceed (comments allowed \u2014 they record as taste signal without gating); revise = the director revises per comments/edits and RE-PRESENTS this same gate (in-job, no re-meter); abandon = end the run."),comments:b(by).max(eO).optional(),edits:O().optional().describe("Your edited stage artifact (the power path). With edits the re-presented packet carries exactly what you supplied; with comments alone the director re-authors scoped by them."),globalNote:a().max(tO).optional()}).describe("POST /checkpoints/:id/resume body \u2014 the A1 review grammar.");var rO=d({ok:x(!0)}).describe("POST /checkpoints/:id/resume response.");var yhe=d({ok:R()});var She=d({etag:a()});var rr=d({version:x(2),assets:k(a(),d({kind:f(["image","video","audio","data"]),required:R(),mimeTypes:b(a().min(1)).min(1).optional()})),graphics:d({api:f(["canvas2d","webgl","webgl2","webgpu"]).describe("Graphics backend the component requires. 'webgl' is the scene-shot lane (a real GL backend chosen by the host platform policy); a source that declares sceneShot must use it."),required:x(!0),accelerationPreference:f(["hardware-preferred","software-allowed"])}),alphaPolicy:f(["requires-transparency","allows-opaque"]),sceneShot:d({version:x(1)}).optional().describe("Opts the source into the typed scene-shot contract: params.scene is validated as a SceneShotSpec of this version at admission, before capture. Requires graphics.api 'webgl'; grants no additional imports or network access. Sources without it keep their existing semantics.")});var nO=200,iO=200,sO=2e3,aO=200,cO=0,Sy=d({componentId:a().min(1).max(nO),tsxSource:a().min(1),name:a().min(1).max(iO),description:a().max(sO),category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),propSchema:k(a(),O()).optional(),origin:f(["customer-owned","server-native"]).optional(),ejectedFrom:a().max(aO).optional(),tokens:k(a(),O()).optional(),examples:b(k(a(),O())).optional(),durationInFrames:p().gt(cO).optional(),manifest:rr}).describe("POST /components body. Org/user are server-resolved; never accepted from the body.");var zy=d({clipSourceKind:f(["overlay","effect","component"]).describe("The ClipSource `kind` to author this entry as: 'overlay' (built-in text/ui/scene/background/layout), 'effect' (built-in effect/transition), or 'component' (an org-INSTALLED custom component)."),refField:f(["primitiveId","componentId"]).describe("Which id field keys the ClipSource: 'primitiveId' for built-ins (source:'default'), 'componentId' for installed components (source:'installed'). Using the wrong field will NOT resolve at render.")});var vy=d({name:a(),mood:b(a()).optional(),params:k(a(),O()).optional(),description:a().optional()});var wy=d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional()});var Au=d({id:a(),name:a(),description:a(),source:f(["default","installed"]).describe("'default' = built-in primitive (place by primitiveId); 'installed' = org-authored component (place by componentId)."),category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]),kind:f(["component","transition","scene"]).describe("RENDER kind (component | transition | scene). NOT the ClipSource variant \u2014 see `placement` for how to author it on the timeline."),version:a(),propSchema:k(a(),O()),propDefaults:k(a(),O()).optional(),textParam:a().nullish().describe("The param field that carries this primitive's primary text; null = no single text slot."),subtextParam:a().nullish().describe("The param field for secondary text (subtitle/byline); null = none."),format:wy.optional(),durationInFrames:p().optional(),intent:a().optional().describe("Selection signal: a verb naming what this primitive accomplishes (e.g. 'product-trailer'). Match it to the beat you are authoring."),useWhen:a().optional().describe("When to use this \u2014 AND when not to. The negative guidance is load-bearing; read it before picking."),pairsWith:b(a()).optional().describe("Authoring guidance: ids of primitives that COMPOSE well with this one in the same edit."),avoidWith:b(a()).optional().describe("Authoring guidance: ids of primitives that CONFLICT with this one \u2014 do not place together."),tags:b(a()).optional().describe("Free-text search keywords."),mood:b(a()).optional().describe("Vibe/tone tags (e.g. 'cinematic', 'minimal'). Filter to match the edit's mood."),tier:f(["recommended","standard","niche"]).optional().describe("Quality/applicability RANKING (a preference, not a flag). Prefer 'recommended'; reach for 'niche' only when its specific use-case is exactly the beat."),useCase:b(f(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"])).optional().describe("The edit ROLE(s) this primitive fills \u2014 the dimension to filter by for a beat (e.g. 'intro', 'title-over-footage', 'grade')."),examples:b(vy).optional(),fixedCopy:b(a()).optional().describe("On-screen strings this primitive BAKES \u2014 the read-side counterpart to propSchema. These literals render REGARDLESS of params (no param can change them); fork the source via get_component_source to edit them. Use this to see at author time what fixed copy (someone-else's marketing text, faux-code, faux-data) will appear before you render."),brandBindings:b(d({param:a(),brandToken:a()})).optional().describe("Params that can follow the project brand kit. Each {param, brandToken} says: set `param` to `brandToken` (a `$brand:` ref, e.g. '$brand:colors.accent') to track the brand instead of a literal. See the list response's `brandTokens` for the full ref vocabulary. Omitted when nothing is brand-bound."),placement:zy.describe("How to author this entry as a ClipSource via apply_composition: the exact ClipSource `kind` + the id field to key it by. Built-ins place as {kind:'overlay'|'effect', primitiveId}; installed components place as {kind:'component', componentId}. A kind:'scene' primitive has no 'scene' ClipSource \u2014 it is placed as {kind:'overlay', primitiveId}."),warnings:b(a()).optional().describe("Non-blocking save-time advisories \u2014 the create/update SUCCEEDED. Currently: a `fontFamily` string literal referencing a NON-vendored font (a bare CSS generic like 'serif', or an unknown named family like 'Arial') whose LIVE-lane pixels vary by render host \u2014 re-author with a vendored family or 'Georgia'. Omitted when there is nothing to flag; only present on the create/update responses.")}).describe("Component catalog entry per \xA7Components.");var Iy=d({soundId:a().describe("Stable sound-pack item id."),family:f(["tick","pop","impact","confirm","error","whoosh","riser"]).describe("Editorial family the compose sfx pass binds by."),envelopeClass:f(["transient","sweep","ambient"]).describe("Coarse envelope shape \u2014 the browse grouping."),intensity:f(["subtle","standard","strong"]),durationSec:p().describe("Duration of the mastered asset (seconds)."),description:a().describe("One-line human-legible caption."),attribution:a().describe("CC0 provenance string.")});var pO=d({data:b(Au),pagination:$e,brandTokens:b(a()).optional().describe("Catalog-level reference: the valid `$brand:` token refs a param value may carry (e.g. accentColor: \"$brand:colors.accent\"). Colors + fonts are the common bindings; the full design-token vocabulary is listed. Derived from the brand kit resolver so it can't drift. See each entry's `brandBindings` for which params are brand-bound by default."),sfx:b(Iy).optional().describe("Catalog-level reference: the curated CC0 SFX pack (closed, versioned). The compose sfx pass places these deterministically; this is the pack-only structural inventory to pick a `soundId` by family. Present on the first page only."),audio:b(fy).optional().describe(`The UNIFIED org sound palette (audio-substrate Phase 2): the curated packs (SFX + music beds) unioned with THIS org's own uploads/imports (source:"org") and generated audio (source:"generated"), one uniform entry shape carrying role + envelopeClass + provenance + license; music entries carry bpm. Prefer an org sound when it fits \u2014 an org that uploads its product's real UI sounds hears ITS product. Present on the first page only.`)});var ky=d({artifactKind:x("image"),contentType:f(["image/png","image/jpeg"]),cached:R(),listUsd:p().optional().describe("List price charged for this delivered preview."),url:ke(),urlExpiresAt:a()});var $y=d({artifactKind:x("motion"),contentType:x("video/webm"),cached:R(),listUsd:p().optional().describe("List price charged for this delivered preview."),url:ke(),urlExpiresAt:a()});var Ty=v([ky,$y]);var dO=d({id:a(),name:a(),description:a(),source:f(["default","installed"]),tsxSource:a(),propSchema:k(a(),O()),origin:f(["customer-owned","server-native"]).optional(),ejectedFrom:a().optional(),tokens:k(a(),O()).optional(),examples:b(k(a(),O())).optional(),durationInFrames:p().optional(),manifest:rr}).describe("Installed component SOURCE (TSX) + ownership provenance per \xA7Components.");var lO=200,uO=2e3,mO=200,hO=0,fO=d({tsxSource:a().min(1).optional(),name:a().min(1).max(lO).optional(),description:a().max(uO).optional(),category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),propSchema:k(a(),O()).optional(),origin:f(["customer-owned","server-native"]).optional(),ejectedFrom:a().max(mO).optional(),tokens:k(a(),O()).optional(),examples:b(k(a(),O())).optional(),durationInFrames:p().gt(hO).optional(),manifest:rr.optional()}).describe("PUT /components/:id body. Org/user are server-resolved; never accepted from the body.");var gO=2e3,xO=5,yO=0,bO=0,SO=10,zO=-9007199254740991,vO=9007199254740991,wO=64,IO=3,kO=d({suggestionId:a().min(1).optional(),fromComposition:R().optional().describe("Reuse the project's current composition as the compose starting point (critique-retry path). The Director RE-AUTHORS graphics: if the current composition is client-authored and contains graphic clips (overlay/component/card), the request is refused (validation_error naming the clips) \u2014 render it verbatim with create_render instead. The director's own output (critique-retry) is exempt."),briefId:a().min(1).optional().describe("Compose from a persisted Brief (create_brief) \u2014 the intent-first door: every Brief field is HONORED or the request is refused loudly naming the field (window from beat moment-pinning; seeded graphics carried VERBATIM as locked clips; exclusions enforced; locale + caption emphasis threaded to the Director). Exactly ONE of suggestionId | fromComposition | briefId."),format:ve.optional().describe("Optional format override. Phase 2 ignores this \u2014 format precedence is project.compositionFormat \u2192 9:16 fhd 30fps default."),scope:O().optional().describe("RequestScope discriminated union (per compose-api-contract.md). Editor-only scopes (captions/overlay-track/broll/overlay-instance/segment) require an editor-session token; API tokens get 403 on those."),critique:a().max(gO).optional().describe("Structured critique block (per compose-api-contract.md decision #11). Capped at 2KB total; per-criterion blocks capped at 500 chars."),parentJobId:a().optional().describe("Pointer to the prior compose job this run iterates on. Surfaced on the resulting compose job as baselineComposeJobId."),maxCandidates:z().min(1).max(xO).optional().describe("Ensemble size. Currently pinned to 1 \u2014 the multi-candidate ensemble is disabled pending a capacity bound, so any value >1 is ignored and every compose runs a single candidate. Still accepted for forward-compat; will honor [1, 5] again once re-enabled."),budgetUsd:p().gt(yO).optional().describe("Per-job budget cap (USD). Clamped at the route against the org's composeMaxBudgetUsdPerJob setting."),qualityThreshold:p().min(bO).max(SO).optional().describe("Composite-score accept threshold. Server default per contract."),seed:z().min(zO).max(vO).optional().describe("Deterministic seed for replay."),clientNonce:a().max(wO).optional().describe("Opaque caller token that disambiguates intentional same-critique retries. Without it, identical (project, sug, seed, critique) tuples deduplicate; with it, retries create a fresh execution."),holdAt:b(f(["content","layout","motion"])).max(IO).optional().describe("Opt-in checkpoint gates. Each named stage pauses the compose at its boundary (status \u2192 awaiting_input) for client review via resume. Absent/empty \u21D2 fully autonomous. Non-empty \u21D2 the run is a single spine.")}).describe("POST /projects/:id/compose body.");var $O=d({composeJobId:a().describe("Opaque compose job id; pass to the SSE stream URL."),projectId:a(),status:f(["queued","failed"]).describe("queued = normal; failed = startup failed and the job is already terminal (the SSE stream will emit a single `job_failed` frame and close)."),streamUrl:a().optional().describe("Relative SSE endpoint to stream this job's events (per compose-api-contract.md).")}).describe("POST /projects/:id/compose response.");var Hhe=d({suggestionId:a().min(1),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}).optional()});var TO=0,PO=9007199254740991,Py=d({mode:f(["advise","amend","explore"]),assessment:d({editorial:d({score:p(),grounding:f(["measured","judged"]),abstained:R(),reliability:p().optional()}),spatial:d({score:p(),grounding:f(["measured","judged"]),abstained:R(),reliability:p().optional()}),brand:d({score:p(),grounding:f(["measured","judged"]),abstained:R(),reliability:p().optional()}),caption:d({score:p(),grounding:f(["measured","judged"]),abstained:R(),reliability:p().optional()})}).optional().describe("Grounded critique of the CURRENT composition. Omitted for mode=advise."),proposals:b(d({label:a(),candidateIndex:z().min(TO).max(PO).optional().describe("Present for amend/explore \u2014 adopt via POST /compose/jobs/:jobId/select with this candidateIndex. Absent for advise."),changeSummary:b(a()).describe("Human-legible edit-pattern labels."),boundToEtag:a().optional().describe("The composition etag this proposal was computed against."),expectedDelta:k(a(),a()).optional().describe("Advisory per-criterion score lift; NOT authoritative pre-recalibration.")})),principles:b(a()).describe("Reusable, grounded lessons for the client's next authoring."),plan:O().optional().describe("Present for mode=advise \u2014 the planner agent's ComposePlan (framing/cuts/captions/graphics intents) as GUIDANCE. The client agent reads it and re-authors; it is NOT converted to ops."),checkpointId:a().optional().describe("The durable kind:'score' Checkpoint minted from this advisory (evidence convergence \u2014 get_checkpoint re-reads the envelope later). Stamped at the consult success terminal.")}).describe("The advisory envelope returned by a completed consult job (on ComposeJobDetailResponse.advisoryResult).");var CO=-9007199254740991,OO=9007199254740991,RO=0,MO=9007199254740991,EO=-9007199254740991,DO=9007199254740991,AO=d({composeJobId:a(),projectId:a(),status:f(["queued","running","awaiting_input","complete","failed","cancelled"]),error:a().nullable(),request:d({suggestionId:a().optional(),fromComposition:R().optional(),scope:O().optional(),critique:a().optional(),parentJobId:a().optional(),maxCandidates:z().min(CO).max(OO).optional(),budgetUsd:p().optional(),qualityThreshold:p().optional()}),candidates:b(O()),winner:v([d({candidateIndex:z().min(RO).max(MO),compositionRunId:a()}),J()]),listUsd:p().optional(),startedAt:p(),completedAt:p().nullable(),advisoryResult:Py.optional(),checkpoint:d({checkpointId:a(),stage:f(["content","layout","motion"]),version:z().min(EO).max(DO)}).optional()});var Cy=d({composeJobId:a(),projectId:a(),status:f(["queued","running","awaiting_input","complete","failed","cancelled"]),suggestionId:a().optional(),createdAt:p(),completedAt:p().nullable()});var _O=d({jobs:b(Cy)});var LO=0,jO=9007199254740991,FO=d({candidateIndex:z().min(LO).max(jO),selectStrategy:f(["agent-authoritative","editor-merge","editor-replace"]),ifMatch:a().optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select body.");var NO=0,VO=9007199254740991,UO=d({newCompositionEtag:a(),mergeResult:d({replayedEdits:z().min(NO).max(VO),droppedEdits:b(d({trackId:a(),clipId:a().optional(),wordStartMs:p().optional(),reason:f(["target_removed","conflict"])}))}).optional()}).describe("POST /projects/:id/compose/jobs/:jobId/select response.");var BO=0,qO=4,WO=0,ZO=0,GO=0,KO=0,JO=0,HO=0,XO=0,YO=4,QO=0,eR=0,tR=0,oR=0,rR=0,nR=0,iR=0,sR=0,aR=0,cR=1,pR=0,dR=1,lR=.1,uR=1,mR=0,hR=0,fR=-.3,gR=.3,xR=-.3,yR=.3,bR=0,SR=1,zR=0,vR=1,wR=-.3,IR=.3,kR=0,$R=1,TR=0,PR=0,CR=1,OR=0,RR=1,MR=0,ER=1,DR=0,AR=1,_R=0,LR=0,jR=2,FR=0,NR=0,VR=0,UR=0,BR=0,qR=0,WR=15,ZR=100,GR=900,KR=0,JR=100,HR=900,XR=0,YR=0,QR=0,eM=0,tM=0,oM=100,rM=0,nM=0,iM=15,sM=100,aM=900,cM=0,pM=100,dM=900,lM=0,uM=0,mM=0,hM=0,fM=0,gM=100,_u=d({v:x(1),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}),tracks:b(d({id:a().min(1),kind:f(["video","audio","image","overlay","effect"]),name:a().optional(),enabled:R().optional(),volume:p().min(BO).max(qO).optional(),contents:b(v([d({id:a().min(1),startTime:p().min(WO).describe("Timeline start (seconds)."),duration:p().gt(ZO).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(GO).describe("Source trim start (seconds)."),end:p().min(KO).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(JO),end:p().min(HO),reason:a().optional()})).optional(),volume:p().min(XO).max(YO).optional(),muted:R().optional(),playbackRate:p().gt(QO).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(eR).optional(),fadeOutMs:p().min(tR).optional(),loop:R().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(oR),attackMs:p().min(rR),releaseMs:p().min(nR),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(iR).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(sR).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(aR).max(cR),y:p().min(pR).max(dR)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(lR).max(uR).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(mR).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(hR).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(fR).max(gR).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(xR).max(yR).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(bR).max(SR),y:p().min(zR).max(vR)}).optional(),parallax:p().min(wR).max(IR).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:k(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(kR).max($R).optional(),scale:p().gt(TR).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(PR).max(CR),y:p().min(OR).max(RR),w:p().gt(MR).max(ER),h:p().gt(DR).max(AR)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(_R)}).optional(),linkGroupId:a().min(1).optional(),animate:k(a(),b(d({time:p().min(LR),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(jR)).optional()}),d({id:a().min(1),startTime:p().min(FR).describe("Timeline start (seconds)."),duration:p().gt(NR).describe("Gap duration (seconds).")})]))})),markers:b(d({id:a().min(1),startTime:p().min(VR),endTime:p().min(UR).optional(),kind:a().min(1),name:a().optional(),metadata:k(a(),O()).optional()})).optional(),captions:v([d({source:x("derived"),from:d({clipId:a()}),segments:b(d({words:b(d({text:a().min(1),startMs:p().min(BR).describe("Word start on the composition timeline, in milliseconds."),endMs:p().min(qR).describe("Word end on the composition timeline, in milliseconds."),emphasis:R().optional(),annotate:f(["circle","underline"]).optional()}))})),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(WR).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(ZR).max(GR).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(KR).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(JR).max(HR).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional().describe("`italic` is admissible ONLY when the resolved emphasis family ships an italic FILE, i.e. a brand-kit family sealed in italic. No built-in caption family ships one and neither does a generic CSS stack, so `italic` over either is refused at this field before capture instead of being faked by slanting the upright face. The enum keeps `italic` because a custom kit may carry it; emphasise a built-in family with `emphasisFontWeight`, `emphasisColor` or `emphasisScale` instead."),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(XR).optional(),entranceStaggerMs:p().min(YR).optional(),exitMs:p().min(QR).optional(),emphasisPlate:R().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(eM).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(tM).max(oM).optional()}).optional().describe("Caption typography. THE ADMISSIBLE VALUES OF THE FONT FIELDS DEPEND ON THE RESOLVED FAMILY, so this schema cannot enumerate them: a caption run is drawn only where a font FILE exists for that exact family, weight and style, and any other face is refused before capture (naming the offending field) rather than substituted by the browser. A built-in family ships one upright file per declared weight range and NO italic file at all, so `fontWeight` / `emphasisFontWeight` must fall inside that family's range and `emphasisFontStyle: \"italic\"` is refused over it. A family supplied as a brand font asset is decided by the sealed font manifest at render time, and is the only place a real italic comes from. `fontFamily` / `emphasisFontFamily` must therefore name a built-in family or one the brand kit seals; a pure CSS generic stack (`sans-serif`) names no file and is refused too. An omitted weight or style takes the family's declared default and is judged exactly as an authored one is."),zPlane:f(["front","behind-subject"]).optional()}),d({source:x("authored"),segments:b(d({words:b(d({text:a().min(1),startMs:p().min(rM).describe("Word start on the composition timeline, in milliseconds."),endMs:p().min(nM).describe("Word end on the composition timeline, in milliseconds."),emphasis:R().optional(),annotate:f(["circle","underline"]).optional()}))})),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(iM).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(sM).max(aM).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(cM).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(pM).max(dM).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional().describe("`italic` is admissible ONLY when the resolved emphasis family ships an italic FILE, i.e. a brand-kit family sealed in italic. No built-in caption family ships one and neither does a generic CSS stack, so `italic` over either is refused at this field before capture instead of being faked by slanting the upright face. The enum keeps `italic` because a custom kit may carry it; emphasise a built-in family with `emphasisFontWeight`, `emphasisColor` or `emphasisScale` instead."),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(lM).optional(),entranceStaggerMs:p().min(uM).optional(),exitMs:p().min(mM).optional(),emphasisPlate:R().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(hM).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(fM).max(gM).optional()}).optional().describe("Caption typography. THE ADMISSIBLE VALUES OF THE FONT FIELDS DEPEND ON THE RESOLVED FAMILY, so this schema cannot enumerate them: a caption run is drawn only where a font FILE exists for that exact family, weight and style, and any other face is refused before capture (naming the offending field) rather than substituted by the browser. A built-in family ships one upright file per declared weight range and NO italic file at all, so `fontWeight` / `emphasisFontWeight` must fall inside that family's range and `emphasisFontStyle: \"italic\"` is refused over it. A family supplied as a brand font asset is decided by the sealed font manifest at render time, and is the only place a real italic comes from. `fontFamily` / `emphasisFontFamily` must therefore name a built-in family or one the brand kit seals; a pure CSS generic stack (`sans-serif`) names no file and is refused too. An omitted weight or style takes the family's declared default and is judged exactly as an authored one is."),zPlane:f(["front","behind-subject"]).optional()})]).optional(),license:d({type:a().min(1),source:a().optional(),notes:a().optional()}).optional(),accessibility:d({audioDescriptionTrackId:a().optional(),captionsTrackId:a().optional(),signLanguageTrackId:a().optional(),notes:a().optional()}).optional()}).describe("Canonical composition wire shape (multi-track; carries reframe, captions, markers).");var Se=v([J(),R(),p(),a(),b(Ho(()=>Se)),k(a(),Ho(()=>Se))]);var xM=64,yM=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),bM=1,SM=0,zM=1,vM=0,wM=1,IM=200,kM=4e3,$M=0,TM=3.141592653589793,PM=64,CM=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),OM=0,RM=1,MM=0,EM=1,DM=0,AM=1,_M=0,LM=1,jM=0,FM=1,NM=2.333,VM=0,UM=1,BM=16,qM=64,WM=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),ZM=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),GM=256,KM=new RegExp("^[a-f0-9]{64}$"),JM=0,HM=9007199254740991,XM=0,YM=9007199254740991,QM=0,e2=9007199254740991,t2=256,o2=0,r2=0,n2=9007199254740991,i2=0,s2=9007199254740991,a2=64,c2=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),p2=1,d2=0,l2=1,u2=0,m2=1,h2=80,f2=2e3,g2=64,x2=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),y2=0,b2=1,S2=0,z2=1,v2=0,w2=1,I2=0,k2=1,$2=0,T2=1,P2=2.333,C2=0,O2=1,R2=16,M2=64,E2=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),D2=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),A2=256,_2=new RegExp("^[a-f0-9]{64}$"),L2=0,j2=9007199254740991,F2=0,N2=9007199254740991,V2=0,U2=9007199254740991,B2=256,q2=0,W2=0,Z2=9007199254740991,G2=0,K2=9007199254740991,J2=64,H2=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),X2=1,Y2=0,Q2=1,eE=0,tE=1,oE=40,rE=8e3,nE=40,iE=8e3,sE=32,aE=4,cE=200,pE=32,dE=0,lE=15,uE=0,mE="satin",hE=64,fE=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),gE=0,xE=1,yE=0,bE=1,SE=0,zE=1,vE=0,wE=1,IE=0,kE=1,$E=2.333,TE=0,PE=1,CE=16,OE=64,RE=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),ME=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),EE=256,DE=new RegExp("^[a-f0-9]{64}$"),AE=0,_E=9007199254740991,LE=0,jE=9007199254740991,FE=0,NE=9007199254740991,VE=256,UE=0,BE=0,qE=9007199254740991,WE=0,ZE=9007199254740991,GE=64,KE=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),JE=1,HE=0,XE=1,YE=0,QE=1,eD=40,tD=8e3,oD=40,rD=8e3,nD="contain",iD="straight",sD=!0,aD="hidden",cD=64,pD=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),dD=0,lD=1,uD=0,mD=1,hD=0,fD=1,gD=0,xD=1,yD=0,bD=1,SD=2.333,zD=0,vD=1,wD=16,ID=64,kD=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),$D=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),TD=256,PD=new RegExp("^[a-f0-9]{64}$"),CD=0,OD=9007199254740991,RD=0,MD=9007199254740991,ED=0,DD=9007199254740991,AD=256,_D=0,LD=0,jD=9007199254740991,FD=0,ND=9007199254740991,VD=64,UD=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),BD=1,qD=0,WD=1,ZD=512,GD=new RegExp("^[^\\r\\n]+$"),KD=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),JD=16,HD=24,XD=128,YD=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),QD=100,eA=900,tA=8,oA=800,rA=1.2,nA=.6,iA=3,sA=0,aA=-20,cA=40,pA="center",dA=0,lA=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),uA=1,mA=0,hA=64,fA=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),gA=1,xA=0,yA=1,bA=512,SA=new RegExp("^[^\\r\\n]+$"),zA=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),vA=16,wA=24,IA=128,kA=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),$A=100,TA=900,PA=8,CA=800,OA=1.2,RA=.6,MA=3,EA=0,DA=-20,AA=40,_A="center",LA=0,jA=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),FA=0,NA=1,VA=0,Oy=v([d({kind:x("laptop"),id:a().min(1).max(xM).regex(yM),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(SM).default(bM)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(vM).max(wM).default(zM),width:p().min(IM).max(kM),openAngle:p().min($M).max(TM),materials:b(d({role:a().min(1).max(PM),type:f(["physical","unlit"]),color:v([a().regex(CM),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(OM).max(RM).optional(),metalness:p().min(MM).max(EM).optional(),clearcoat:p().min(DM).max(AM).optional(),clearcoatRoughness:p().min(_M).max(LM).optional(),anisotropy:p().min(jM).max(FM).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(NM).optional(),reflectivity:p().min(VM).max(UM).optional()})).max(BM).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(qM).regex(WM).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(ZM),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(GM),sourceVersionId:a().regex(KM)}),captureFrame:z().min(JM).max(HM),layout:d({width:z().gt(XM).max(YM),height:z().gt(QM).max(e2)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(t2),startFrame:z().min(r2).max(n2).default(o2),endFrame:z().gt(i2).max(s2).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(a2).regex(c2),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(d2).default(p2)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(u2).max(m2).default(l2),width:p().min(h2).max(f2),materials:b(d({role:a().min(1).max(g2),type:f(["physical","unlit"]),color:v([a().regex(x2),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(y2).max(b2).optional(),metalness:p().min(S2).max(z2).optional(),clearcoat:p().min(v2).max(w2).optional(),clearcoatRoughness:p().min(I2).max(k2).optional(),anisotropy:p().min($2).max(T2).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(P2).optional(),reflectivity:p().min(C2).max(O2).optional()})).max(R2).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(M2).regex(E2).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(D2),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(A2),sourceVersionId:a().regex(_2)}),captureFrame:z().min(L2).max(j2),layout:d({width:z().gt(F2).max(N2),height:z().gt(V2).max(U2)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(B2),startFrame:z().min(W2).max(Z2).default(q2),endFrame:z().gt(G2).max(K2).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(J2).regex(H2),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(Y2).default(X2)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(eE).max(tE).default(Q2),width:p().min(oE).max(rE),height:p().min(nE).max(iE),thickness:p().min(aE).max(cE).default(sE),cornerRadius:p().min(dE).default(pE),edgeRadius:p().min(uE).default(lE),finish:f(["satin","brushed"]).default(mE),materials:b(d({role:a().min(1).max(hE),type:f(["physical","unlit"]),color:v([a().regex(fE),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(gE).max(xE).optional(),metalness:p().min(yE).max(bE).optional(),clearcoat:p().min(SE).max(zE).optional(),clearcoatRoughness:p().min(vE).max(wE).optional(),anisotropy:p().min(IE).max(kE).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max($E).optional(),reflectivity:p().min(TE).max(PE).optional()})).max(CE).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(OE).regex(RE).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(ME),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(EE),sourceVersionId:a().regex(DE)}),captureFrame:z().min(AE).max(_E),layout:d({width:z().gt(LE).max(jE),height:z().gt(FE).max(NE)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(VE),startFrame:z().min(BE).max(qE).default(UE),endFrame:z().gt(WE).max(ZE).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(GE).regex(KE),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(HE).default(JE)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(YE).max(QE).default(XE),width:p().min(eD).max(tD),height:p().min(oD).max(rD),fit:f(["contain","cover"]).default(nD),transparency:f(["straight","premultiplied","opaque"]).default(iD),depthWrite:R().default(sD),backface:f(["hidden","visible"]).default(aD),materials:b(d({role:a().min(1).max(cD),type:f(["physical","unlit"]),color:v([a().regex(pD),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(dD).max(lD).optional(),metalness:p().min(uD).max(mD).optional(),clearcoat:p().min(hD).max(fD).optional(),clearcoatRoughness:p().min(gD).max(xD).optional(),anisotropy:p().min(yD).max(bD).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(SD).optional(),reflectivity:p().min(zD).max(vD).optional()})).max(wD).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(ID).regex(kD).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex($D),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(TD),sourceVersionId:a().regex(PD)}),captureFrame:z().min(CD).max(OD),layout:d({width:z().gt(RD).max(MD),height:z().gt(ED).max(DD)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(AD),startFrame:z().min(LD).max(jD).default(_D),endFrame:z().gt(FD).max(ND).optional()})]))}),d({id:a().min(1).max(VD).regex(UD),kind:x("text"),opacity:p().min(qD).max(WD).default(BD),lines:b(d({runs:b(d({text:a().min(1).max(ZD).regex(GD),color:v([a().regex(KD),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(JD)})).min(1).max(HD),fontFamily:v([a().min(1).max(XD).regex(YD),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(QD).max(eA),fontStyle:f(["normal","italic"]),fontSize:p().min(tA).max(oA),lineHeight:p().min(nA).max(iA).default(rA),letterSpacing:p().min(aA).max(cA).default(sA),align:f(["left","center","right"]).default(pA),maxWidth:p().gt(dA).optional(),color:v([a().regex(lA),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(mA).default(uA)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(hA).regex(fA),kind:x("text"),opacity:p().min(xA).max(yA).default(gA),lines:b(d({runs:b(d({text:a().min(1).max(bA).regex(SA),color:v([a().regex(zA),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(vA)})).min(1).max(wA),fontFamily:v([a().min(1).max(IA).regex(kA),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min($A).max(TA),fontStyle:f(["normal","italic"]),fontSize:p().min(PA).max(CA),lineHeight:p().min(RA).max(MA).default(OA),letterSpacing:p().min(DA).max(AA).default(EA),align:f(["left","center","right"]).default(_A),maxWidth:p().gt(LA).optional(),color:v([a().regex(jA),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("screen"),x:p(),y:p(),rotation:p().default(FA),scale:p().gt(VA).default(NA)})]);var UA=64,BA=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),qA=1,WA=0,ZA=1,GA=0,KA=1,JA=16,HA=64,XA=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),YA=1,QA=0,e_=1,t_=0,o_=1,r_=200,n_=4e3,i_=0,s_=3.141592653589793,a_=64,c_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),p_=0,d_=1,l_=0,u_=1,m_=0,h_=1,f_=0,g_=1,x_=0,y_=1,b_=2.333,S_=0,z_=1,v_=16,w_=64,I_=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),k_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),$_=256,T_=new RegExp("^[a-f0-9]{64}$"),P_=0,C_=9007199254740991,O_=0,R_=9007199254740991,M_=0,E_=9007199254740991,D_=256,A_=0,__=0,L_=9007199254740991,j_=0,F_=9007199254740991,N_=64,V_=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),U_=1,B_=0,q_=1,W_=0,Z_=1,G_=80,K_=2e3,J_=64,H_=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),X_=0,Y_=1,Q_=0,eL=1,tL=0,oL=1,rL=0,nL=1,iL=0,sL=1,aL=2.333,cL=0,pL=1,dL=16,lL=64,uL=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),mL=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),hL=256,fL=new RegExp("^[a-f0-9]{64}$"),gL=0,xL=9007199254740991,yL=0,bL=9007199254740991,SL=0,zL=9007199254740991,vL=256,wL=0,IL=0,kL=9007199254740991,$L=0,TL=9007199254740991,PL=64,CL=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),OL=1,RL=0,ML=1,EL=0,DL=1,AL=40,_L=8e3,LL=40,jL=8e3,FL=32,NL=4,VL=200,UL=32,BL=0,qL=15,WL=0,ZL="satin",GL=64,KL=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),JL=0,HL=1,XL=0,YL=1,QL=0,ej=1,tj=0,oj=1,rj=0,nj=1,ij=2.333,sj=0,aj=1,cj=16,pj=64,dj=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),lj=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),uj=256,mj=new RegExp("^[a-f0-9]{64}$"),hj=0,fj=9007199254740991,gj=0,xj=9007199254740991,yj=0,bj=9007199254740991,Sj=256,zj=0,vj=0,wj=9007199254740991,Ij=0,kj=9007199254740991,$j=64,Tj=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Pj=1,Cj=0,Oj=1,Rj=0,Mj=1,Ej=40,Dj=8e3,Aj=40,_j=8e3,Lj="contain",jj="straight",Fj=!0,Nj="hidden",Vj=64,Uj=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Bj=0,qj=1,Wj=0,Zj=1,Gj=0,Kj=1,Jj=0,Hj=1,Xj=0,Yj=1,Qj=2.333,eF=0,tF=1,oF=16,rF=64,nF=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),iF=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),sF=256,aF=new RegExp("^[a-f0-9]{64}$"),cF=0,pF=9007199254740991,dF=0,lF=9007199254740991,uF=0,mF=9007199254740991,hF=256,fF=0,gF=0,xF=9007199254740991,yF=0,bF=9007199254740991,SF=64,zF=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),vF=1,wF=0,IF=1,kF=512,$F=new RegExp("^[^\\r\\n]+$"),TF=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),PF=16,CF=24,OF=128,RF=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),MF=100,EF=900,DF=8,AF=800,_F=1.2,LF=.6,jF=3,FF=0,NF=-20,VF=40,UF="center",BF=0,qF=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),WF=1,ZF=0,GF=64,KF=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),JF=1,HF=0,XF=1,YF=512,QF=new RegExp("^[^\\r\\n]+$"),e4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),t4=16,o4=24,r4=128,n4=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),i4=100,s4=900,a4=8,c4=800,p4=1.2,d4=.6,l4=3,u4=0,m4=-20,h4=40,f4="center",g4=0,x4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),y4=0,b4=1,S4=0,Ry=v([d({kind:x("group"),id:a().min(1).max(UA).regex(BA),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(WA).default(qA)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(GA).max(KA).default(ZA),children:b(Oy).min(1).max(JA)}),d({kind:x("laptop"),id:a().min(1).max(HA).regex(XA),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(QA).default(YA)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(t_).max(o_).default(e_),width:p().min(r_).max(n_),openAngle:p().min(i_).max(s_),materials:b(d({role:a().min(1).max(a_),type:f(["physical","unlit"]),color:v([a().regex(c_),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(p_).max(d_).optional(),metalness:p().min(l_).max(u_).optional(),clearcoat:p().min(m_).max(h_).optional(),clearcoatRoughness:p().min(f_).max(g_).optional(),anisotropy:p().min(x_).max(y_).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(b_).optional(),reflectivity:p().min(S_).max(z_).optional()})).max(v_).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(w_).regex(I_).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(k_),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max($_),sourceVersionId:a().regex(T_)}),captureFrame:z().min(P_).max(C_),layout:d({width:z().gt(O_).max(R_),height:z().gt(M_).max(E_)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(D_),startFrame:z().min(__).max(L_).default(A_),endFrame:z().gt(j_).max(F_).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(N_).regex(V_),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(B_).default(U_)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(W_).max(Z_).default(q_),width:p().min(G_).max(K_),materials:b(d({role:a().min(1).max(J_),type:f(["physical","unlit"]),color:v([a().regex(H_),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(X_).max(Y_).optional(),metalness:p().min(Q_).max(eL).optional(),clearcoat:p().min(tL).max(oL).optional(),clearcoatRoughness:p().min(rL).max(nL).optional(),anisotropy:p().min(iL).max(sL).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(aL).optional(),reflectivity:p().min(cL).max(pL).optional()})).max(dL).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(lL).regex(uL).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(mL),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(hL),sourceVersionId:a().regex(fL)}),captureFrame:z().min(gL).max(xL),layout:d({width:z().gt(yL).max(bL),height:z().gt(SL).max(zL)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(vL),startFrame:z().min(IL).max(kL).default(wL),endFrame:z().gt($L).max(TL).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(PL).regex(CL),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(RL).default(OL)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(EL).max(DL).default(ML),width:p().min(AL).max(_L),height:p().min(LL).max(jL),thickness:p().min(NL).max(VL).default(FL),cornerRadius:p().min(BL).default(UL),edgeRadius:p().min(WL).default(qL),finish:f(["satin","brushed"]).default(ZL),materials:b(d({role:a().min(1).max(GL),type:f(["physical","unlit"]),color:v([a().regex(KL),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(JL).max(HL).optional(),metalness:p().min(XL).max(YL).optional(),clearcoat:p().min(QL).max(ej).optional(),clearcoatRoughness:p().min(tj).max(oj).optional(),anisotropy:p().min(rj).max(nj).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(ij).optional(),reflectivity:p().min(sj).max(aj).optional()})).max(cj).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(pj).regex(dj).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(lj),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(uj),sourceVersionId:a().regex(mj)}),captureFrame:z().min(hj).max(fj),layout:d({width:z().gt(gj).max(xj),height:z().gt(yj).max(bj)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(Sj),startFrame:z().min(vj).max(wj).default(zj),endFrame:z().gt(Ij).max(kj).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max($j).regex(Tj),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(Cj).default(Pj)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(Rj).max(Mj).default(Oj),width:p().min(Ej).max(Dj),height:p().min(Aj).max(_j),fit:f(["contain","cover"]).default(Lj),transparency:f(["straight","premultiplied","opaque"]).default(jj),depthWrite:R().default(Fj),backface:f(["hidden","visible"]).default(Nj),materials:b(d({role:a().min(1).max(Vj),type:f(["physical","unlit"]),color:v([a().regex(Uj),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(Bj).max(qj).optional(),metalness:p().min(Wj).max(Zj).optional(),clearcoat:p().min(Gj).max(Kj).optional(),clearcoatRoughness:p().min(Jj).max(Hj).optional(),anisotropy:p().min(Xj).max(Yj).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(Qj).optional(),reflectivity:p().min(eF).max(tF).optional()})).max(oF).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(rF).regex(nF).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(iF),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(sF),sourceVersionId:a().regex(aF)}),captureFrame:z().min(cF).max(pF),layout:d({width:z().gt(dF).max(lF),height:z().gt(uF).max(mF)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(hF),startFrame:z().min(gF).max(xF).default(fF),endFrame:z().gt(yF).max(bF).optional()})]))}),d({id:a().min(1).max(SF).regex(zF),kind:x("text"),opacity:p().min(wF).max(IF).default(vF),lines:b(d({runs:b(d({text:a().min(1).max(kF).regex($F),color:v([a().regex(TF),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(PF)})).min(1).max(CF),fontFamily:v([a().min(1).max(OF).regex(RF),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(MF).max(EF),fontStyle:f(["normal","italic"]),fontSize:p().min(DF).max(AF),lineHeight:p().min(LF).max(jF).default(_F),letterSpacing:p().min(NF).max(VF).default(FF),align:f(["left","center","right"]).default(UF),maxWidth:p().gt(BF).optional(),color:v([a().regex(qF),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(ZF).default(WF)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(GF).regex(KF),kind:x("text"),opacity:p().min(HF).max(XF).default(JF),lines:b(d({runs:b(d({text:a().min(1).max(YF).regex(QF),color:v([a().regex(e4),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(t4)})).min(1).max(o4),fontFamily:v([a().min(1).max(r4).regex(n4),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(i4).max(s4),fontStyle:f(["normal","italic"]),fontSize:p().min(a4).max(c4),lineHeight:p().min(d4).max(l4).default(p4),letterSpacing:p().min(m4).max(h4).default(u4),align:f(["left","center","right"]).default(f4),maxWidth:p().gt(g4).optional(),color:v([a().regex(x4),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("screen"),x:p(),y:p(),rotation:p().default(y4),scale:p().gt(S4).default(b4)})]);var z4=64,v4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),w4=1,I4=0,k4=1,$4=0,T4=1,P4=16,C4=64,O4=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),R4=1,M4=0,E4=1,D4=0,A4=1,_4=200,L4=4e3,j4=0,F4=3.141592653589793,N4=64,V4=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),U4=0,B4=1,q4=0,W4=1,Z4=0,G4=1,K4=0,J4=1,H4=0,X4=1,Y4=2.333,Q4=0,eN=1,tN=16,oN=64,rN=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),nN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),iN=256,sN=new RegExp("^[a-f0-9]{64}$"),aN=0,cN=9007199254740991,pN=0,dN=9007199254740991,lN=0,uN=9007199254740991,mN=256,hN=0,fN=0,gN=9007199254740991,xN=0,yN=9007199254740991,bN=64,SN=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),zN=1,vN=0,wN=1,IN=0,kN=1,$N=80,TN=2e3,PN=64,CN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ON=0,RN=1,MN=0,EN=1,DN=0,AN=1,_N=0,LN=1,jN=0,FN=1,NN=2.333,VN=0,UN=1,BN=16,qN=64,WN=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),ZN=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),GN=256,KN=new RegExp("^[a-f0-9]{64}$"),JN=0,HN=9007199254740991,XN=0,YN=9007199254740991,QN=0,eV=9007199254740991,tV=256,oV=0,rV=0,nV=9007199254740991,iV=0,sV=9007199254740991,aV=64,cV=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),pV=1,dV=0,lV=1,uV=0,mV=1,hV=40,fV=8e3,gV=40,xV=8e3,yV=32,bV=4,SV=200,zV=32,vV=0,wV=15,IV=0,kV="satin",$V=64,TV=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),PV=0,CV=1,OV=0,RV=1,MV=0,EV=1,DV=0,AV=1,_V=0,LV=1,jV=2.333,FV=0,NV=1,VV=16,UV=64,BV=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),qV=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),WV=256,ZV=new RegExp("^[a-f0-9]{64}$"),GV=0,KV=9007199254740991,JV=0,HV=9007199254740991,XV=0,YV=9007199254740991,QV=256,e6=0,t6=0,o6=9007199254740991,r6=0,n6=9007199254740991,i6=64,s6=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),a6=1,c6=0,p6=1,d6=0,l6=1,u6=40,m6=8e3,h6=40,f6=8e3,g6="contain",x6="straight",y6=!0,b6="hidden",S6=64,z6=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),v6=0,w6=1,I6=0,k6=1,$6=0,T6=1,P6=0,C6=1,O6=0,R6=1,M6=2.333,E6=0,D6=1,A6=16,_6=64,L6=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),j6=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),F6=256,N6=new RegExp("^[a-f0-9]{64}$"),V6=0,U6=9007199254740991,B6=0,q6=9007199254740991,W6=0,Z6=9007199254740991,G6=256,K6=0,J6=0,H6=9007199254740991,X6=0,Y6=9007199254740991,Q6=64,e9=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),t9=1,o9=0,r9=1,n9=512,i9=new RegExp("^[^\\r\\n]+$"),s9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),a9=16,c9=24,p9=128,d9=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),l9=100,u9=900,m9=8,h9=800,f9=1.2,g9=.6,x9=3,y9=0,b9=-20,S9=40,z9="center",v9=0,w9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),I9=1,k9=0,$9=64,T9=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),P9=1,C9=0,O9=1,R9=512,M9=new RegExp("^[^\\r\\n]+$"),E9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),D9=16,A9=24,_9=128,L9=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),j9=100,F9=900,N9=8,V9=800,U9=1.2,B9=.6,q9=3,W9=0,Z9=-20,G9=40,K9="center",J9=0,H9=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),X9=0,Y9=1,Q9=0,My=v([d({kind:x("group"),id:a().min(1).max(z4).regex(v4),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(I4).default(w4)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min($4).max(T4).default(k4),children:b(Ry).min(1).max(P4)}),d({kind:x("laptop"),id:a().min(1).max(C4).regex(O4),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(M4).default(R4)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(D4).max(A4).default(E4),width:p().min(_4).max(L4),openAngle:p().min(j4).max(F4),materials:b(d({role:a().min(1).max(N4),type:f(["physical","unlit"]),color:v([a().regex(V4),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(U4).max(B4).optional(),metalness:p().min(q4).max(W4).optional(),clearcoat:p().min(Z4).max(G4).optional(),clearcoatRoughness:p().min(K4).max(J4).optional(),anisotropy:p().min(H4).max(X4).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(Y4).optional(),reflectivity:p().min(Q4).max(eN).optional()})).max(tN).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(oN).regex(rN).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(nN),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(iN),sourceVersionId:a().regex(sN)}),captureFrame:z().min(aN).max(cN),layout:d({width:z().gt(pN).max(dN),height:z().gt(lN).max(uN)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(mN),startFrame:z().min(fN).max(gN).default(hN),endFrame:z().gt(xN).max(yN).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(bN).regex(SN),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(vN).default(zN)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(IN).max(kN).default(wN),width:p().min($N).max(TN),materials:b(d({role:a().min(1).max(PN),type:f(["physical","unlit"]),color:v([a().regex(CN),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(ON).max(RN).optional(),metalness:p().min(MN).max(EN).optional(),clearcoat:p().min(DN).max(AN).optional(),clearcoatRoughness:p().min(_N).max(LN).optional(),anisotropy:p().min(jN).max(FN).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(NN).optional(),reflectivity:p().min(VN).max(UN).optional()})).max(BN).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(qN).regex(WN).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(ZN),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(GN),sourceVersionId:a().regex(KN)}),captureFrame:z().min(JN).max(HN),layout:d({width:z().gt(XN).max(YN),height:z().gt(QN).max(eV)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(tV),startFrame:z().min(rV).max(nV).default(oV),endFrame:z().gt(iV).max(sV).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(aV).regex(cV),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(dV).default(pV)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(uV).max(mV).default(lV),width:p().min(hV).max(fV),height:p().min(gV).max(xV),thickness:p().min(bV).max(SV).default(yV),cornerRadius:p().min(vV).default(zV),edgeRadius:p().min(IV).default(wV),finish:f(["satin","brushed"]).default(kV),materials:b(d({role:a().min(1).max($V),type:f(["physical","unlit"]),color:v([a().regex(TV),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(PV).max(CV).optional(),metalness:p().min(OV).max(RV).optional(),clearcoat:p().min(MV).max(EV).optional(),clearcoatRoughness:p().min(DV).max(AV).optional(),anisotropy:p().min(_V).max(LV).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(jV).optional(),reflectivity:p().min(FV).max(NV).optional()})).max(VV).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(UV).regex(BV).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(qV),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(WV),sourceVersionId:a().regex(ZV)}),captureFrame:z().min(GV).max(KV),layout:d({width:z().gt(JV).max(HV),height:z().gt(XV).max(YV)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(QV),startFrame:z().min(t6).max(o6).default(e6),endFrame:z().gt(r6).max(n6).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(i6).regex(s6),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(c6).default(a6)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(d6).max(l6).default(p6),width:p().min(u6).max(m6),height:p().min(h6).max(f6),fit:f(["contain","cover"]).default(g6),transparency:f(["straight","premultiplied","opaque"]).default(x6),depthWrite:R().default(y6),backface:f(["hidden","visible"]).default(b6),materials:b(d({role:a().min(1).max(S6),type:f(["physical","unlit"]),color:v([a().regex(z6),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(v6).max(w6).optional(),metalness:p().min(I6).max(k6).optional(),clearcoat:p().min($6).max(T6).optional(),clearcoatRoughness:p().min(P6).max(C6).optional(),anisotropy:p().min(O6).max(R6).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(M6).optional(),reflectivity:p().min(E6).max(D6).optional()})).max(A6).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(_6).regex(L6).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(j6),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(F6),sourceVersionId:a().regex(N6)}),captureFrame:z().min(V6).max(U6),layout:d({width:z().gt(B6).max(q6),height:z().gt(W6).max(Z6)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(G6),startFrame:z().min(J6).max(H6).default(K6),endFrame:z().gt(X6).max(Y6).optional()})]))}),d({id:a().min(1).max(Q6).regex(e9),kind:x("text"),opacity:p().min(o9).max(r9).default(t9),lines:b(d({runs:b(d({text:a().min(1).max(n9).regex(i9),color:v([a().regex(s9),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(a9)})).min(1).max(c9),fontFamily:v([a().min(1).max(p9).regex(d9),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(l9).max(u9),fontStyle:f(["normal","italic"]),fontSize:p().min(m9).max(h9),lineHeight:p().min(g9).max(x9).default(f9),letterSpacing:p().min(b9).max(S9).default(y9),align:f(["left","center","right"]).default(z9),maxWidth:p().gt(v9).optional(),color:v([a().regex(w9),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(k9).default(I9)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max($9).regex(T9),kind:x("text"),opacity:p().min(C9).max(O9).default(P9),lines:b(d({runs:b(d({text:a().min(1).max(R9).regex(M9),color:v([a().regex(E9),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(D9)})).min(1).max(A9),fontFamily:v([a().min(1).max(_9).regex(L9),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(j9).max(F9),fontStyle:f(["normal","italic"]),fontSize:p().min(N9).max(V9),lineHeight:p().min(B9).max(q9).default(U9),letterSpacing:p().min(Z9).max(G9).default(W9),align:f(["left","center","right"]).default(K9),maxWidth:p().gt(J9).optional(),color:v([a().regex(H9),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("screen"),x:p(),y:p(),rotation:p().default(X9),scale:p().gt(Q9).default(Y9)})]);var eU=64,tU=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),oU=1,rU=0,nU=1,iU=0,sU=1,aU=16,cU=64,pU=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),dU=1,lU=0,uU=1,mU=0,hU=1,fU=200,gU=4e3,xU=0,yU=3.141592653589793,bU=64,SU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),zU=0,vU=1,wU=0,IU=1,kU=0,$U=1,TU=0,PU=1,CU=0,OU=1,RU=2.333,MU=0,EU=1,DU=16,AU=64,_U=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),LU=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),jU=256,FU=new RegExp("^[a-f0-9]{64}$"),NU=0,VU=9007199254740991,UU=0,BU=9007199254740991,qU=0,WU=9007199254740991,ZU=256,GU=0,KU=0,JU=9007199254740991,HU=0,XU=9007199254740991,YU=64,QU=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),e3=1,t3=0,o3=1,r3=0,n3=1,i3=80,s3=2e3,a3=64,c3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),p3=0,d3=1,l3=0,u3=1,m3=0,h3=1,f3=0,g3=1,x3=0,y3=1,b3=2.333,S3=0,z3=1,v3=16,w3=64,I3=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),k3=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),$3=256,T3=new RegExp("^[a-f0-9]{64}$"),P3=0,C3=9007199254740991,O3=0,R3=9007199254740991,M3=0,E3=9007199254740991,D3=256,A3=0,_3=0,L3=9007199254740991,j3=0,F3=9007199254740991,N3=64,V3=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),U3=1,B3=0,q3=1,W3=0,Z3=1,G3=40,K3=8e3,J3=40,H3=8e3,X3=32,Y3=4,Q3=200,eB=32,tB=0,oB=15,rB=0,nB="satin",iB=64,sB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),aB=0,cB=1,pB=0,dB=1,lB=0,uB=1,mB=0,hB=1,fB=0,gB=1,xB=2.333,yB=0,bB=1,SB=16,zB=64,vB=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),wB=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),IB=256,kB=new RegExp("^[a-f0-9]{64}$"),$B=0,TB=9007199254740991,PB=0,CB=9007199254740991,OB=0,RB=9007199254740991,MB=256,EB=0,DB=0,AB=9007199254740991,_B=0,LB=9007199254740991,jB=64,FB=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),NB=1,VB=0,UB=1,BB=0,qB=1,WB=40,ZB=8e3,GB=40,KB=8e3,JB="contain",HB="straight",XB=!0,YB="hidden",QB=64,e5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),t5=0,o5=1,r5=0,n5=1,i5=0,s5=1,a5=0,c5=1,p5=0,d5=1,l5=2.333,u5=0,m5=1,h5=16,f5=64,g5=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),x5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),y5=256,b5=new RegExp("^[a-f0-9]{64}$"),S5=0,z5=9007199254740991,v5=0,w5=9007199254740991,I5=0,k5=9007199254740991,$5=256,T5=0,P5=0,C5=9007199254740991,O5=0,R5=9007199254740991,M5=64,E5=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),D5=1,A5=0,_5=1,L5=512,j5=new RegExp("^[^\\r\\n]+$"),F5=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),N5=16,V5=24,U5=128,B5=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),q5=100,W5=900,Z5=8,G5=800,K5=1.2,J5=.6,H5=3,X5=0,Y5=-20,Q5=40,eq="center",tq=0,oq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),rq=1,nq=0,iq=64,sq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),aq=1,cq=0,pq=1,dq=512,lq=new RegExp("^[^\\r\\n]+$"),uq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),mq=16,hq=24,fq=128,gq=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),xq=100,yq=900,bq=8,Sq=800,zq=1.2,vq=.6,wq=3,Iq=0,kq=-20,$q=40,Tq="center",Pq=0,Cq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),Oq=0,Rq=1,Mq=0,Ey=v([d({kind:x("group"),id:a().min(1).max(eU).regex(tU),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(rU).default(oU)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(iU).max(sU).default(nU),children:b(My).min(1).max(aU)}),d({kind:x("laptop"),id:a().min(1).max(cU).regex(pU),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(lU).default(dU)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(mU).max(hU).default(uU),width:p().min(fU).max(gU),openAngle:p().min(xU).max(yU),materials:b(d({role:a().min(1).max(bU),type:f(["physical","unlit"]),color:v([a().regex(SU),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(zU).max(vU).optional(),metalness:p().min(wU).max(IU).optional(),clearcoat:p().min(kU).max($U).optional(),clearcoatRoughness:p().min(TU).max(PU).optional(),anisotropy:p().min(CU).max(OU).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(RU).optional(),reflectivity:p().min(MU).max(EU).optional()})).max(DU).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(AU).regex(_U).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(LU),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(jU),sourceVersionId:a().regex(FU)}),captureFrame:z().min(NU).max(VU),layout:d({width:z().gt(UU).max(BU),height:z().gt(qU).max(WU)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(ZU),startFrame:z().min(KU).max(JU).default(GU),endFrame:z().gt(HU).max(XU).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(YU).regex(QU),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(t3).default(e3)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(r3).max(n3).default(o3),width:p().min(i3).max(s3),materials:b(d({role:a().min(1).max(a3),type:f(["physical","unlit"]),color:v([a().regex(c3),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(p3).max(d3).optional(),metalness:p().min(l3).max(u3).optional(),clearcoat:p().min(m3).max(h3).optional(),clearcoatRoughness:p().min(f3).max(g3).optional(),anisotropy:p().min(x3).max(y3).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(b3).optional(),reflectivity:p().min(S3).max(z3).optional()})).max(v3).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(w3).regex(I3).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(k3),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max($3),sourceVersionId:a().regex(T3)}),captureFrame:z().min(P3).max(C3),layout:d({width:z().gt(O3).max(R3),height:z().gt(M3).max(E3)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(D3),startFrame:z().min(_3).max(L3).default(A3),endFrame:z().gt(j3).max(F3).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(N3).regex(V3),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(B3).default(U3)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(W3).max(Z3).default(q3),width:p().min(G3).max(K3),height:p().min(J3).max(H3),thickness:p().min(Y3).max(Q3).default(X3),cornerRadius:p().min(tB).default(eB),edgeRadius:p().min(rB).default(oB),finish:f(["satin","brushed"]).default(nB),materials:b(d({role:a().min(1).max(iB),type:f(["physical","unlit"]),color:v([a().regex(sB),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(aB).max(cB).optional(),metalness:p().min(pB).max(dB).optional(),clearcoat:p().min(lB).max(uB).optional(),clearcoatRoughness:p().min(mB).max(hB).optional(),anisotropy:p().min(fB).max(gB).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(xB).optional(),reflectivity:p().min(yB).max(bB).optional()})).max(SB).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(zB).regex(vB).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(wB),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(IB),sourceVersionId:a().regex(kB)}),captureFrame:z().min($B).max(TB),layout:d({width:z().gt(PB).max(CB),height:z().gt(OB).max(RB)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(MB),startFrame:z().min(DB).max(AB).default(EB),endFrame:z().gt(_B).max(LB).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(jB).regex(FB),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(VB).default(NB)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(BB).max(qB).default(UB),width:p().min(WB).max(ZB),height:p().min(GB).max(KB),fit:f(["contain","cover"]).default(JB),transparency:f(["straight","premultiplied","opaque"]).default(HB),depthWrite:R().default(XB),backface:f(["hidden","visible"]).default(YB),materials:b(d({role:a().min(1).max(QB),type:f(["physical","unlit"]),color:v([a().regex(e5),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(t5).max(o5).optional(),metalness:p().min(r5).max(n5).optional(),clearcoat:p().min(i5).max(s5).optional(),clearcoatRoughness:p().min(a5).max(c5).optional(),anisotropy:p().min(p5).max(d5).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(l5).optional(),reflectivity:p().min(u5).max(m5).optional()})).max(h5).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(f5).regex(g5).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(x5),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(y5),sourceVersionId:a().regex(b5)}),captureFrame:z().min(S5).max(z5),layout:d({width:z().gt(v5).max(w5),height:z().gt(I5).max(k5)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max($5),startFrame:z().min(P5).max(C5).default(T5),endFrame:z().gt(O5).max(R5).optional()})]))}),d({id:a().min(1).max(M5).regex(E5),kind:x("text"),opacity:p().min(A5).max(_5).default(D5),lines:b(d({runs:b(d({text:a().min(1).max(L5).regex(j5),color:v([a().regex(F5),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(N5)})).min(1).max(V5),fontFamily:v([a().min(1).max(U5).regex(B5),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(q5).max(W5),fontStyle:f(["normal","italic"]),fontSize:p().min(Z5).max(G5),lineHeight:p().min(J5).max(H5).default(K5),letterSpacing:p().min(Y5).max(Q5).default(X5),align:f(["left","center","right"]).default(eq),maxWidth:p().gt(tq).optional(),color:v([a().regex(oq),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(nq).default(rq)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(iq).regex(sq),kind:x("text"),opacity:p().min(cq).max(pq).default(aq),lines:b(d({runs:b(d({text:a().min(1).max(dq).regex(lq),color:v([a().regex(uq),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(mq)})).min(1).max(hq),fontFamily:v([a().min(1).max(fq).regex(gq),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(xq).max(yq),fontStyle:f(["normal","italic"]),fontSize:p().min(bq).max(Sq),lineHeight:p().min(vq).max(wq).default(zq),letterSpacing:p().min(kq).max($q).default(Iq),align:f(["left","center","right"]).default(Tq),maxWidth:p().gt(Pq).optional(),color:v([a().regex(Cq),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("screen"),x:p(),y:p(),rotation:p().default(Oq),scale:p().gt(Mq).default(Rq)})]);var Eq=64,Dq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Aq=1,_q=0,Lq=1,jq=0,Fq=1,Nq=16,Vq=64,Uq=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),Bq=1,qq=0,Wq=1,Zq=0,Gq=1,Kq=200,Jq=4e3,Hq=0,Xq=3.141592653589793,Yq=64,Qq=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),e8=0,t8=1,o8=0,r8=1,n8=0,i8=1,s8=0,a8=1,c8=0,p8=1,d8=2.333,l8=0,u8=1,m8=16,h8=64,f8=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),g8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),x8=256,y8=new RegExp("^[a-f0-9]{64}$"),b8=0,S8=9007199254740991,z8=0,v8=9007199254740991,w8=0,I8=9007199254740991,k8=256,$8=0,T8=0,P8=9007199254740991,C8=0,O8=9007199254740991,R8=64,M8=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),E8=1,D8=0,A8=1,_8=0,L8=1,j8=80,F8=2e3,N8=64,V8=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),U8=0,B8=1,q8=0,W8=1,Z8=0,G8=1,K8=0,J8=1,H8=0,X8=1,Y8=2.333,Q8=0,e7=1,t7=16,o7=64,r7=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),n7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),i7=256,s7=new RegExp("^[a-f0-9]{64}$"),a7=0,c7=9007199254740991,p7=0,d7=9007199254740991,l7=0,u7=9007199254740991,m7=256,h7=0,f7=0,g7=9007199254740991,x7=0,y7=9007199254740991,b7=64,S7=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),z7=1,v7=0,w7=1,I7=0,k7=1,$7=40,T7=8e3,P7=40,C7=8e3,O7=32,R7=4,M7=200,E7=32,D7=0,A7=15,_7=0,L7="satin",j7=64,F7=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),N7=0,V7=1,U7=0,B7=1,q7=0,W7=1,Z7=0,G7=1,K7=0,J7=1,H7=2.333,X7=0,Y7=1,Q7=16,eW=64,tW=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),oW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),rW=256,nW=new RegExp("^[a-f0-9]{64}$"),iW=0,sW=9007199254740991,aW=0,cW=9007199254740991,pW=0,dW=9007199254740991,lW=256,uW=0,mW=0,hW=9007199254740991,fW=0,gW=9007199254740991,xW=64,yW=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),bW=1,SW=0,zW=1,vW=0,wW=1,IW=40,kW=8e3,$W=40,TW=8e3,PW="contain",CW="straight",OW=!0,RW="hidden",MW=64,EW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),DW=0,AW=1,_W=0,LW=1,jW=0,FW=1,NW=0,VW=1,UW=0,BW=1,qW=2.333,WW=0,ZW=1,GW=16,KW=64,JW=new RegExp("^[A-Za-z_][A-Za-z0-9_-]*$"),HW=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),XW=256,YW=new RegExp("^[a-f0-9]{64}$"),QW=0,eZ=9007199254740991,tZ=0,oZ=9007199254740991,rZ=0,nZ=9007199254740991,iZ=256,sZ=0,aZ=0,cZ=9007199254740991,pZ=0,dZ=9007199254740991,lZ=64,uZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),mZ=1,hZ=0,fZ=1,gZ=512,xZ=new RegExp("^[^\\r\\n]+$"),yZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),bZ=16,SZ=24,zZ=128,vZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),wZ=100,IZ=900,kZ=8,$Z=800,TZ=1.2,PZ=.6,CZ=3,OZ=0,RZ=-20,MZ=40,EZ="center",DZ=0,AZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),_Z=1,LZ=0,jZ=64,FZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),NZ=1,VZ=0,UZ=1,BZ=512,qZ=new RegExp("^[^\\r\\n]+$"),WZ=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),ZZ=16,GZ=24,KZ=128,JZ=new RegExp("^[A-Za-z0-9][A-Za-z0-9 _.\\-]*$"),HZ=100,XZ=900,YZ=8,QZ=800,eG=1.2,tG=.6,oG=3,rG=0,nG=-20,iG=40,sG="center",aG=0,cG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),pG=0,dG=1,lG=0,Dy=v([d({kind:x("group"),id:a().min(1).max(Eq).regex(Dq),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(_q).default(Aq)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(jq).max(Fq).default(Lq),children:b(Ey).min(1).max(Nq)}),d({kind:x("laptop"),id:a().min(1).max(Vq).regex(Uq),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(qq).default(Bq)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(Zq).max(Gq).default(Wq),width:p().min(Kq).max(Jq),openAngle:p().min(Hq).max(Xq),materials:b(d({role:a().min(1).max(Yq),type:f(["physical","unlit"]),color:v([a().regex(Qq),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(e8).max(t8).optional(),metalness:p().min(o8).max(r8).optional(),clearcoat:p().min(n8).max(i8).optional(),clearcoatRoughness:p().min(s8).max(a8).optional(),anisotropy:p().min(c8).max(p8).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(d8).optional(),reflectivity:p().min(l8).max(u8).optional()})).max(m8).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(h8).regex(f8).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(g8),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(x8),sourceVersionId:a().regex(y8)}),captureFrame:z().min(b8).max(S8),layout:d({width:z().gt(z8).max(v8),height:z().gt(w8).max(I8)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(k8),startFrame:z().min(T8).max(P8).default($8),endFrame:z().gt(C8).max(O8).optional()})])).optional()}),d({kind:x("phone"),id:a().min(1).max(R8).regex(M8),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(D8).default(E8)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(_8).max(L8).default(A8),width:p().min(j8).max(F8),materials:b(d({role:a().min(1).max(N8),type:f(["physical","unlit"]),color:v([a().regex(V8),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(U8).max(B8).optional(),metalness:p().min(q8).max(W8).optional(),clearcoat:p().min(Z8).max(G8).optional(),clearcoatRoughness:p().min(K8).max(J8).optional(),anisotropy:p().min(H8).max(X8).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(Y8).optional(),reflectivity:p().min(Q8).max(e7).optional()})).max(t7).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(o7).regex(r7).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(n7),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(i7),sourceVersionId:a().regex(s7)}),captureFrame:z().min(a7).max(c7),layout:d({width:z().gt(p7).max(d7),height:z().gt(l7).max(u7)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(m7),startFrame:z().min(f7).max(g7).default(h7),endFrame:z().gt(x7).max(y7).optional()})])).optional()}),d({kind:x("slab"),id:a().min(1).max(b7).regex(S7),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(v7).default(z7)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(I7).max(k7).default(w7),width:p().min($7).max(T7),height:p().min(P7).max(C7),thickness:p().min(R7).max(M7).default(O7),cornerRadius:p().min(D7).default(E7),edgeRadius:p().min(_7).default(A7),finish:f(["satin","brushed"]).default(L7),materials:b(d({role:a().min(1).max(j7),type:f(["physical","unlit"]),color:v([a().regex(F7),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(N7).max(V7).optional(),metalness:p().min(U7).max(B7).optional(),clearcoat:p().min(q7).max(W7).optional(),clearcoatRoughness:p().min(Z7).max(G7).optional(),anisotropy:p().min(K7).max(J7).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(H7).optional(),reflectivity:p().min(X7).max(Y7).optional()})).max(Q7).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(eW).regex(tW).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(oW),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(rW),sourceVersionId:a().regex(nW)}),captureFrame:z().min(iW).max(sW),layout:d({width:z().gt(aW).max(cW),height:z().gt(pW).max(dW)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(lW),startFrame:z().min(mW).max(hW).default(uW),endFrame:z().gt(fW).max(gW).optional()})])).optional()}),d({kind:x("page"),id:a().min(1).max(xW).regex(yW),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(SW).default(bW)}).default({position:[0,0,0],rotation:[0,0,0],scale:1}),opacity:p().min(vW).max(wW).default(zW),width:p().min(IW).max(kW),height:p().min($W).max(TW),fit:f(["contain","cover"]).default(PW),transparency:f(["straight","premultiplied","opaque"]).default(CW),depthWrite:R().default(OW),backface:f(["hidden","visible"]).default(RW),materials:b(d({role:a().min(1).max(MW),type:f(["physical","unlit"]),color:v([a().regex(EW),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),roughness:p().min(DW).max(AW).optional(),metalness:p().min(_W).max(LW).optional(),clearcoat:p().min(jW).max(FW).optional(),clearcoatRoughness:p().min(NW).max(VW).optional(),anisotropy:p().min(UW).max(BW).optional(),anisotropyRotation:p().optional(),ior:p().min(1).max(qW).optional(),reflectivity:p().min(WW).max(ZW).optional()})).max(GW).optional(),surfaces:k(a(),v([d({source:x("image"),assetSlot:a().min(1).max(KW).regex(JW).describe("Image asset slot name bound by the clip assets map; never a URL.")}),d({source:x("color"),color:v([a().regex(HW),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({source:x("component"),component:d({version:x(1),componentId:a().min(1).max(XW),sourceVersionId:a().regex(YW)}),captureFrame:z().min(QW).max(eZ),layout:d({width:z().gt(tZ).max(oZ),height:z().gt(rZ).max(nZ)}),bakeScale:v([x(2),x(3)]).optional().describe("Optional authored scale. Preparation defaults omission to 2 and may auto-raise it to 3."),params:k(a(),Se).optional()}),d({source:x("video"),mediaId:a().min(1).max(iZ),startFrame:z().min(aZ).max(cZ).default(sZ),endFrame:z().gt(pZ).max(dZ).optional()})]))}),d({id:a().min(1).max(lZ).regex(uZ),kind:x("text"),opacity:p().min(hZ).max(fZ).default(mZ),lines:b(d({runs:b(d({text:a().min(1).max(gZ).regex(xZ),color:v([a().regex(yZ),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(bZ)})).min(1).max(SZ),fontFamily:v([a().min(1).max(zZ).regex(vZ),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(wZ).max(IZ),fontStyle:f(["normal","italic"]),fontSize:p().min(kZ).max($Z),lineHeight:p().min(PZ).max(CZ).default(TZ),letterSpacing:p().min(RZ).max(MZ).default(OZ),align:f(["left","center","right"]).default(EZ),maxWidth:p().gt(DZ).optional(),color:v([a().regex(AZ),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("world"),transform:d({position:U([p(),p(),p()]).default([0,0,0]),rotation:U([p(),p(),p()]).default([0,0,0]),scale:p().gt(LZ).default(_Z)}).default({position:[0,0,0],rotation:[0,0,0],scale:1})}),d({id:a().min(1).max(jZ).regex(FZ),kind:x("text"),opacity:p().min(VZ).max(UZ).default(NZ),lines:b(d({runs:b(d({text:a().min(1).max(BZ).regex(qZ),color:v([a().regex(WZ),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]).optional(),emphasis:R().optional()})).min(1).max(ZZ)})).min(1).max(GZ),fontFamily:v([a().min(1).max(KZ).regex(JZ),f(["$brand:fonts.heading","$brand:fonts.body","$brand:fonts.caption"])]),fontWeight:z().min(HZ).max(XZ),fontStyle:f(["normal","italic"]),fontSize:p().min(YZ).max(QZ),lineHeight:p().min(tG).max(oG).default(eG),letterSpacing:p().min(nG).max(iG).default(rG),align:f(["left","center","right"]).default(sG),maxWidth:p().gt(aG).optional(),color:v([a().regex(cG),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])]),space:x("screen"),x:p(),y:p(),rotation:p().default(pG),scale:p().gt(lG).default(dG)})]);var uG=16,mG=8192,hG=16,fG=8192,gG=.3141592653589793,xG=1.3962634015954636,yG="studio",bG="soft",SG=1,zG=0,vG=-420,wG=.5,IG=0,kG=1,$G={lightingProfile:"studio",preset:"soft",intensity:1,floorY:-420,shadowOpacity:.5},TG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),PG=0,CG=0,OG=1,RG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),MG=2,EG=8,DG=0,AG=1,_G=0,LG=1,jG=0,FG=1,NG=new RegExp("^#(?:[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"),VG=2,UG=8,BG={kind:"transparent"},qG=64,WG=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),ZG=64,GG=0,KG=1,JG=0,HG=1,XG=-4,YG=5,QG=0,eK=1,tK=-4,oK=5,rK=256,nK=[],iK=0,sK=0,aK=.5,cK=0,pK=0,dK=1,lK=0,uK=0,mK=0,hK=64,fK=null,gK={grain:0,vignette:0,focus:null},xK=64,yK=new RegExp("^[A-Za-z0-9][A-Za-z0-9_-]*$"),bK=2,SK=0,zK=[],Lu=d({version:x(2),referenceSize:d({width:z().min(uG).max(mG),height:z().min(hG).max(fG)}),camera:d({position:U([p(),p(),p()]).optional(),rotation:U([p(),p(),p()]).optional(),fov:p().min(gG).max(xG).optional()}).optional(),environment:v([d({kind:x("studio").optional(),lightingProfile:f(["studio","studio-edge"]).default(yG),preset:f(["soft","key","rim"]).default(bG),intensity:p().min(zG).default(SG),floorY:p().default(vG),shadowOpacity:p().min(IG).max(kG).default(wG)}),d({kind:x("photographic-studio-v1")})]).default($G),backdrop:v([d({kind:x("transparent")}),d({kind:x("solid"),color:v([a().regex(TG),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])}),d({kind:x("linear"),angle:p().default(PG),stops:b(d({at:p().min(CG).max(OG),color:v([a().regex(RG),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])})).min(MG).max(EG)}),d({kind:x("radial"),at:U([p().min(DG).max(AG),p().min(_G).max(LG)]).default([.5,.5]),stops:b(d({at:p().min(jG).max(FG),color:v([a().regex(NG),f(["$brand:colors.background","$brand:colors.surface","$brand:colors.text","$brand:colors.textMuted","$brand:colors.accent","$brand:colors.accentStrong","$brand:colors.accentSoft","$brand:colors.success","$brand:colors.warning","$brand:colors.danger"])])})).min(VG).max(UG)})]).default(BG),layers:b(Dy).min(1),animation:b(d({target:v([d({kind:x("camera")}),d({kind:x("layer"),layerId:a().min(1).max(qG).regex(WG)}),d({kind:x("environment")}),d({kind:x("focus")})]),property:a().min(1).max(ZG),keyframes:b(d({at:p().min(GG).max(KG),value:p(),easing:v([d({kind:x("linear")}),d({kind:x("hold")}),d({kind:x("bezier"),x1:p().min(JG).max(HG),y1:p().min(XG).max(YG),x2:p().min(QG).max(eK),y2:p().min(tK).max(oK)})]).optional()})).min(1).max(rK)})).default(nK),post:d({grain:p().min(sK).max(aK).default(iK),vignette:p().min(pK).max(dK).default(cK),focus:v([d({distance:p().gt(lK),range:p().gt(uK),maxBlur:p().min(mK).max(hK)}),J()]).default(fK)}).default(gK),constraints:b(d({kind:x("minSeparation"),objects:b(a().min(1).max(xK).regex(yK)).min(bK),gap:p().gt(SK)})).default(zK)}).describe("A version-2 scene shot: a self-contained 3D world-object shot that scene.add / scene.update materializes into an ordinary component clip. The shot owns its layers, camera, lighting, backdrop and normalized local animation; the composition owns start, duration, ordering, cuts and transitions. Coordinates are REFERENCE PIXELS: origin at frame centre, +X right, +Y down, +Z toward the viewer. referenceSize must have the SAME aspect ratio as the composition format; mismatch fails instead of cropping. At equal aspect ratio the shot scales uniformly by outputWidth/referenceWidth. A segment's easing belongs to the keyframe it ARRIVES at; the first keyframe has no easing. Authoring limits: 32 layers, 4 devices, 16 distinct image slots, 256 keyframes per channel, 2048 keyframes per shot. Version 2 supports nested groups, procedural slab/page/phone/laptop objects, screen- and world-space text, admitted image/component/video surfaces, fixed photographic and generated studio environments, transparent/solid/linear/radial backdrops, constraints, focus, grain and vignette. Raw HTML, custom shader props, imported GLB models, arbitrary external HDR environments, skeletal animation and physics are refused with an exact field path.");var vK=0,wK=0,IK=0,kK=0,$K=0,TK=0,PK=0,CK=4,OK=0,RK=0,MK=0,EK=0,DK=0,AK=0,_K=0,LK=0,jK=0,FK=1,NK=0,VK=1,UK=.1,BK=1,qK=0,WK=0,ZK=-.3,GK=.3,KK=-.3,JK=.3,HK=0,XK=1,YK=0,QK=1,eJ=-.3,tJ=.3,oJ=0,rJ=1,nJ=0,iJ=0,sJ=1,aJ=0,cJ=1,pJ=0,dJ=1,lJ=0,uJ=1,mJ=0,hJ=0,fJ=2,gJ=0,xJ=0,yJ=0,bJ=0,SJ=0,zJ=0,vJ=0,wJ=4,IJ=0,kJ=0,$J=0,TJ=0,PJ=0,CJ=0,OJ=0,RJ=0,MJ=0,EJ=1,DJ=0,AJ=1,_J=.1,LJ=1,jJ=0,FJ=0,NJ=-.3,VJ=.3,UJ=-.3,BJ=.3,qJ=0,WJ=1,ZJ=0,GJ=1,KJ=-.3,JJ=.3,HJ=0,XJ=1,YJ=0,QJ=0,eH=1,tH=0,oH=1,rH=0,nH=1,iH=0,sH=1,aH=0,cH=0,pH=2,dH=0,lH=0,uH=0,mH=0,hH=0,fH=0,gH=0,xH=4,yH=0,bH=0,SH=0,zH=0,vH=0,wH=0,IH=0,kH=0,$H=0,TH=1,PH=0,CH=1,OH=.1,RH=1,MH=0,EH=0,DH=-.3,AH=.3,_H=-.3,LH=.3,jH=0,FH=1,NH=0,VH=1,UH=-.3,BH=.3,qH=0,WH=1,ZH=0,GH=0,KH=1,JH=0,HH=1,XH=0,YH=1,QH=0,eX=1,tX=0,oX=0,rX=2,nX=0,iX=0,sX=0,aX=0,cX=0,pX=0,dX=0,lX=1,uX=0,mX=1,hX=.1,fX=1,gX=0,xX=0,yX=-.3,bX=.3,SX=-.3,zX=.3,vX=15,wX=100,IX=900,kX=0,$X=100,TX=900,PX=0,CX=0,OX=0,RX=0,MX=0,EX=100,DX=0,AX=0,_X=15,LX=100,jX=900,FX=0,NX=100,VX=900,UX=0,BX=0,qX=0,WX=0,ZX=0,GX=100,KX=0,JX=0,HX=0,XX=2e3,YX=0,QX=0,eY=0,tY=0,oY=0,rY=0,ju=v([d({type:x("clip.add"),clip:d({id:a().min(1),startTime:p().min(vK).describe("Timeline start (seconds)."),duration:p().gt(wK).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(IK).describe("Source trim start (seconds)."),end:p().min(kK).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min($K),end:p().min(TK),reason:a().optional()})).optional(),volume:p().min(PK).max(CK).optional(),muted:R().optional(),playbackRate:p().gt(OK).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(RK).optional(),fadeOutMs:p().min(MK).optional(),loop:R().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(EK),attackMs:p().min(DK),releaseMs:p().min(AK),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(_K).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(LK).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(jK).max(FK),y:p().min(NK).max(VK)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(UK).max(BK).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(qK).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(WK).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(ZK).max(GK).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(KK).max(JK).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(HK).max(XK),y:p().min(YK).max(QK)}).optional(),parallax:p().min(eJ).max(tJ).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:k(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(oJ).max(rJ).optional(),scale:p().gt(nJ).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(iJ).max(sJ),y:p().min(aJ).max(cJ),w:p().gt(pJ).max(dJ),h:p().gt(lJ).max(uJ)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(mJ)}).optional(),linkGroupId:a().min(1).optional(),animate:k(a(),b(d({time:p().min(hJ),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(fJ)).optional()}),trackId:a().optional(),newTrack:R().optional(),newTrackId:a().optional()}).describe("Add a clip to the timeline. The clip self-routes to a track by FAMILY (`clip.kind`, else derived from `source.kind`, else the target track) \u2014 a `media` clip MUST carry `kind` (video|audio|image) or a `trackId`, else it is rejected as ambiguous. `trackId` targets an existing SAME-family track; `newTrack:true` (with optional pinned `newTrackId`) creates a fresh track of that family."),d({type:x("clip.remove"),clipId:a()}).describe("Remove a clip by id (located across every track)."),d({type:x("clip.update"),clipId:a(),patch:d({id:a().min(1).optional(),startTime:p().min(gJ).optional().describe("Timeline start (seconds)."),duration:p().gt(xJ).optional().describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(yJ).describe("Source trim start (seconds)."),end:p().min(bJ).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(SJ),end:p().min(zJ),reason:a().optional()})).optional(),volume:p().min(vJ).max(wJ).optional(),muted:R().optional(),playbackRate:p().gt(IJ).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(kJ).optional(),fadeOutMs:p().min($J).optional(),loop:R().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(TJ),attackMs:p().min(PJ),releaseMs:p().min(CJ),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(OJ).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(RJ).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(MJ).max(EJ),y:p().min(DJ).max(AJ)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(_J).max(LJ).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(jJ).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(FJ).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(NJ).max(VJ).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(UJ).max(BJ).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(qJ).max(WJ),y:p().min(ZJ).max(GJ)}).optional(),parallax:p().min(KJ).max(JJ).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:k(a(),a()).optional(),zPlane:x("front").optional()})]).optional(),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(HJ).max(XJ).optional(),scale:p().gt(YJ).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(QJ).max(eH),y:p().min(tH).max(oH),w:p().gt(rH).max(nH),h:p().gt(iH).max(sH)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(aH)}).optional(),linkGroupId:a().min(1).optional(),animate:k(a(),b(d({time:p().min(cH),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(pH)).optional()})}).describe("Patch an existing clip by id (cross-family). The patch is a partial TimelineClip. NOTE: `source` is REPLACED wholesale \u2014 the patch merges at the top level only, so a partial `source` WIPES the source fields you omit. Patch the whole source object when changing it. (To change reframe/excluded ranges, prefer setCropIntents / addExcludedRange, not a source patch.)"),d({type:x("removeClipsByMediaId"),mediaId:a()}).describe("Remove EVERY clip sourced from a given mediaId (e.g. after deleting that media)."),d({type:x("loadOverlays"),clips:b(d({id:a().min(1),startTime:p().min(dH).describe("Timeline start (seconds)."),duration:p().gt(lH).describe("Clip duration (seconds)."),source:v([d({kind:x("media"),mediaId:a().min(1),trim:d({start:p().min(uH).describe("Source trim start (seconds)."),end:p().min(mH).describe("Source trim end (seconds).")}).optional(),excludedRanges:b(d({start:p().min(hH),end:p().min(fH),reason:a().optional()})).optional(),volume:p().min(gH).max(xH).optional(),muted:R().optional(),playbackRate:p().gt(yH).optional(),sync:f(["video","independent"]).optional(),kenBurns:f(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:p().optional(),fadeInMs:p().min(bH).optional(),fadeOutMs:p().min(SH).optional(),loop:R().optional(),audioRole:f(["sfx","music","vo","ambience"]).optional(),duck:d({duckDb:p().max(zH),attackMs:p().min(vH),releaseMs:p().min(wH),windows:b(d({startMs:p(),endMs:p()})).optional()}).optional(),anchor:d({clipId:a().min(1),offsetMs:p()}).optional(),reframe:d({segments:b(d({startSec:p().min(IH).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(kH).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min($H).max(TH),y:p().min(PH).max(CH)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(OH).max(RH).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(MH).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(EH).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(DH).max(AH).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(_H).max(LH).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})).min(1)}).optional()}),d({kind:x("component"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("overlay"),primitiveId:a().min(1),params:k(a(),O()),zPlane:f(["front","behind-subject"]).optional(),anchor:d({space:x("scene"),x:p().min(jH).max(FH),y:p().min(NH).max(VH)}).optional(),parallax:p().min(UH).max(BH).optional()}),d({kind:x("effect"),primitiveId:a().min(1),params:k(a(),O()).optional()}),d({kind:x("alpha-layer"),componentId:a().min(1),props:k(a(),O()),assets:k(a(),a().min(1)).optional(),zPlane:f(["front","behind-subject"]).optional()}),d({kind:x("card"),html:a().min(1).describe("Your card's HTML \u2014 rendered VERBATIM as the graphic (shell motion via applyMotionPreset in a FOLLOWING call). CANVAS CONTRACT: the card renders in a viewport equal to the composition format's pixel frame (1080\xD71920 at 9:16 fhd); the root is NOT auto-pinned \u2014 declare explicit width/height matching the frame (box-sizing:border-box) and anchor content with flex/grid; position:absolute;inset:0 on the root does NOT fill the frame; for edge-to-edge backgrounds add an inner absolutely-positioned layer with generous negative inset. Overlay compositing applies a ~92% safe-area inset \u2014 keep critical copy away from the extreme edges. Web fonts: @import inside the HTML works (the render box has network); bare font-family names fall back silently."),tokens:k(a(),a()).optional(),zPlane:x("front").optional()})]),kind:f(["video","audio","image","overlay","effect"]).optional(),opacity:p().min(qH).max(WH).optional(),scale:p().gt(ZH).optional(),rotation:p().optional(),position:d({x:p(),y:p()}).optional(),region:d({x:p().min(GH).max(KH),y:p().min(JH).max(HH),w:p().gt(XH).max(YH),h:p().gt(QH).max(eX)}).optional(),fit:f(["cover","contain"]).optional(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()})).optional(),transitionIn:d({type:a().min(1),duration:p().gt(tX)}).optional(),linkGroupId:a().min(1).optional(),animate:k(a(),b(d({time:p().min(oX),value:p(),easing:v([f(["linear","ease","easeIn","easeOut","easeInOut"]),d({cubicBezier:U([p(),p(),p(),p()])})]).optional()})).min(rX)).optional()}))}).describe("Replace the overlay channel wholesale with the given clips (bulk set, not a merge)."),d({type:x("addMarker"),marker:d({id:a().min(1),startTime:p().min(nX),endTime:p().min(iX).optional(),kind:a().min(1),name:a().optional(),metadata:k(a(),O()).optional()})}).describe("Add a timeline marker (a named time point/range; carry extensions in `metadata`)."),d({type:x("removeMarker"),markerId:a()}).describe("Remove a marker by id."),d({type:x("updateMarker"),markerId:a(),updates:d({id:a().min(1).optional(),startTime:p().min(sX).optional(),endTime:p().min(aX).optional(),kind:a().min(1).optional(),name:a().optional(),metadata:k(a(),O()).optional()})}).describe("Patch a marker's fields by id (partial merge)."),d({type:x("setCropIntents"),clipId:a(),segments:v([b(d({startSec:p().min(cX).describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:p().gt(pX).describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:v([d({mode:x("frame-center")}),d({mode:x("point"),x:p().min(dX).max(lX),y:p().min(uX).max(mX)}),d({mode:x("face"),faceId:a().min(1),shotScale:f(["close","standard","wide"]).optional()}),d({mode:x("all-faces")}),d({mode:x("active-speaker")})]).describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:a().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:p().min(hX).max(fX).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale` \u2014 a face-tracked shot is sized EITHER by the editorial scale (shotScale, which the bake calibrates to the detected face) OR by an explicit zoom, never both. A segment carrying both is REJECTED: shotScale wins at bake time and the zoom would be silently discarded."),ease:d({in:p().min(gX).describe("Ease-IN ramp DURATION in seconds at the segment START."),out:p().min(xX).describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:d({x:p().min(yX).max(bX).describe("Horizontal nudge, source-normalized (+ = right)."),y:p().min(SX).max(zX).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")})),J()])}).describe("Set (or CLEAR, with `segments: null`) the camera/reframe channel on a MEDIA clip \u2014 the time-aligned source\u2192output viewport (focus, zoom, ease, bias). This is the PREFERRED way to author reframing; do NOT reframe via a whole-source `clip.update` patch. Segments tile the clip's duration."),d({type:x("setEffects"),clipId:a(),effects:b(d({primitiveId:a().min(1),params:k(a(),O()).optional()}))}).describe("Set (or CLEAR, with `effects: []`) a clip's EFFECT channel \u2014 the registered effect primitives stacked onto that clip, each `{ primitiveId, params? }`. WHOLESALE: the array REPLACES the clip's current effects, so send the full stack (read the clip first to add one). This is the ONLY way to change effects on an existing clip \u2014 do NOT reach for a `clip.update` patch, whose top-level merge is the source-clobbering footgun documented above."),d({type:x("setCaptionStyle"),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(vX).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(wX).max(IX).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(kX).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min($X).max(TX).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional().describe("`italic` is admissible ONLY when the resolved emphasis family ships an italic FILE, i.e. a brand-kit family sealed in italic. No built-in caption family ships one and neither does a generic CSS stack, so `italic` over either is refused at this field before capture instead of being faked by slanting the upright face. The enum keeps `italic` because a custom kit may carry it; emphasise a built-in family with `emphasisFontWeight`, `emphasisColor` or `emphasisScale` instead."),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(PX).optional(),entranceStaggerMs:p().min(CX).optional(),exitMs:p().min(OX).optional(),emphasisPlate:R().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(RX).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(MX).max(EX).optional()}).describe("Caption typography. THE ADMISSIBLE VALUES OF THE FONT FIELDS DEPEND ON THE RESOLVED FAMILY, so this schema cannot enumerate them: a caption run is drawn only where a font FILE exists for that exact family, weight and style, and any other face is refused before capture (naming the offending field) rather than substituted by the browser. A built-in family ships one upright file per declared weight range and NO italic file at all, so `fontWeight` / `emphasisFontWeight` must fall inside that family's range and `emphasisFontStyle: \"italic\"` is refused over it. A family supplied as a brand font asset is decided by the sealed font manifest at render time, and is the only place a real italic comes from. `fontFamily` / `emphasisFontFamily` must therefore name a built-in family or one the brand kit seals; a pure CSS generic stack (`sans-serif`) names no file and is refused too. An omitted weight or style takes the family's declared default and is judged exactly as an authored one is.")}).describe("Merge style overrides (font/color/position/emphasis) onto the composition's caption layer. Partial \u2014 omitted fields keep their current value; creates the caption container if absent."),d({type:x("setCaptionDepth"),zPlane:f(["front","behind-subject"])}).describe("Set the caption compositing plane. Use `behind-subject` to place captions behind the segmented foreground subject; use `front` for conventional captions above all video layers."),d({type:x("setCaptions"),segments:b(d({words:b(d({text:a().min(1),startMs:p().min(DX).describe("Word start on the composition timeline, in milliseconds."),endMs:p().min(AX).describe("Word end on the composition timeline, in milliseconds."),emphasis:R().optional(),annotate:f(["circle","underline"]).optional()}))})),style:d({fontFamily:a().min(1).optional(),fontSize:p().min(1).max(_X).optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:z().min(LX).max(jX).optional(),color:a().min(1).optional(),highlightColor:a().min(1).optional(),backgroundColor:a().optional(),plate:f(["glass","solid","none"]).optional(),position:f(["top","center","bottom"]).optional(),textTransform:f(["none","uppercase","capitalize"]).optional(),emphasisColor:a().optional(),emphasisGradient:a().optional(),emphasisScale:p().gt(FX).optional(),emphasisFontFamily:a().optional(),emphasisFontWeight:z().min(NX).max(VX).optional(),emphasisTextTransform:f(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:p().optional(),emphasisFontStyle:f(["normal","italic"]).optional().describe("`italic` is admissible ONLY when the resolved emphasis family ships an italic FILE, i.e. a brand-kit family sealed in italic. No built-in caption family ships one and neither does a generic CSS stack, so `italic` over either is refused at this field before capture instead of being faked by slanting the upright face. The enum keeps `italic` because a custom kit may carry it; emphasise a built-in family with `emphasisFontWeight`, `emphasisColor` or `emphasisScale` instead."),entrance:f(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:p().min(UX).optional(),entranceStaggerMs:p().min(BX).optional(),exitMs:p().min(qX).optional(),emphasisPlate:R().optional(),emphasisPlateColor:a().optional(),emphasisPlateTextColor:a().optional(),emphasisPlateAltColor:a().optional(),emphasisPlateAltTextColor:a().optional(),emphasisPlateRadius:p().min(WX).optional(),emphasisPlatePadX:p().optional(),emphasisPlatePadY:p().optional(),annotationColor:a().optional(),maxWidthPercent:p().gt(ZX).max(GX).optional()}).optional().describe("Caption typography. THE ADMISSIBLE VALUES OF THE FONT FIELDS DEPEND ON THE RESOLVED FAMILY, so this schema cannot enumerate them: a caption run is drawn only where a font FILE exists for that exact family, weight and style, and any other face is refused before capture (naming the offending field) rather than substituted by the browser. A built-in family ships one upright file per declared weight range and NO italic file at all, so `fontWeight` / `emphasisFontWeight` must fall inside that family's range and `emphasisFontStyle: \"italic\"` is refused over it. A family supplied as a brand font asset is decided by the sealed font manifest at render time, and is the only place a real italic comes from. `fontFamily` / `emphasisFontFamily` must therefore name a built-in family or one the brand kit seals; a pure CSS generic stack (`sans-serif`) names no file and is refused too. An omitted weight or style takes the family's declared default and is judged exactly as an authored one is.")}).describe("Replace the caption SEGMENTS wholesale \u2014 author the word-timed caption layer directly (each segment = one sentence/page of `words` with timeline-ms `startMs`/`endMs`, optional `emphasis`). This is how a client with its OWN word timings (e.g. a generated VO take) gets word-synced captions without a source transcript; the compose lane's transcript slice writes the same layer. `style`, when given, merges with setCaptionStyle semantics; an omitted style keeps the existing one. Renderer paginates within a segment and never pools words across two \u2014 keep segments sentence-bounded."),d({type:x("captions.fromTranscript"),mediaId:a().min(1),window:d({startSec:p().min(KX),endSec:p().gt(JX)}).optional()}).describe("Attach caption CONTENT from the media's cached transcript \u2014 no pasting words. ROUTE-MATERIALIZED like applyMotionPreset/materializeGrid: the server slices the word-timed transcript to `window` (source seconds; absent = the whole media), rebases times, sentence-splits into segments, and applies it as `setCaptions`. 422 media_no_transcript when the media has no transcript or no words in the window. For your OWN word timings use setCaptions directly."),d({type:x("applyMotionPreset"),clipId:a(),preset:a(),params:d({enterMs:p().optional(),exitMs:p().optional(),staggerMs:p().optional()}).optional()}).describe("Shell a STATIC `card` clip with a frame-driven MOTION preset \u2014 the public card-shelling op (the layout renders VERBATIM; only the container animates in/out). The server wraps the card in the chosen `preset` (fade-up / slide-in-left / slide-in-right / scale-pop / stagger-reveal), transpiles it, mints it as a LIVE component, and swaps the clip source to that component (the bakeless live lane \u2014 no box). `params` tunes timing (`enterMs`/`exitMs`, `staggerMs` for stagger-reveal). The target must be a static card (components already carry motion; library overlays already move); re-run overwrites idempotently ONLY while the target is still a card (an uncompilable shell); once shelled, the clip is a COMPONENT \u2014 to change its motion, remove and re-add the card, then re-shell. Honored under `dry_run` (validates preset + target without transpiling or persisting). ORDERING: the preset resolves its target against the PERSISTED composition \u2014 a card added in the SAME batch is not yet visible to it. Persist the clip.add batch first, then shell in a following call."),d({type:x("materializeGrid"),clipId:a(),grid:f(["beat","word","shot"]),maxMarkers:z().gt(HX).max(XX).optional()}).describe('Materialize a clip\'s SOURCE-media temporal GRID as timeline markers \u2014 the rhythm authority you cut to. `grid:"beat"` reads a MUSIC bed\'s beat map (get_media_context.beatGrid), `grid:"word"` the VO word onsets (wordGrid); each grid point is projected from media time to TIMELINE time through the clip\'s placement (startTime, trim, playbackRate, excludedRanges) and written as a `kind:"beat"|"word"` marker (`metadata.sourceClipId` set). Points outside the clip\'s visible window are skipped. Re-running REPLACES the prior markers from the same clip+grid (idempotent). Land cuts and transition MIDPOINTS on the markers (a 0.5s transition starts 0.25s before its marker). `maxMarkers` (default 500, ceiling 2000) \u2014 exceeding it fails loud with the count. `grid:"shot"` is not yet exposed (shot_grid_unavailable). The target must be a media clip; absent evidence fails loud (grid_unavailable) naming how to get it (declare audioRole:"music" at ingest / transcribe).'),d({type:x("setFormat"),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional()})}).describe("Set the output format \u2014 `aspectRatio` (16:9|9:16|1:1|4:5) plus optional `fps` and `resolution`. Merges: an omitted field keeps the current value."),d({type:x("addTrack"),kind:f(["video","audio","image","overlay","effect"]),name:a().optional(),id:a().optional()}).describe("Add an EMPTY track of a given family (video|audio|image|overlay|effect). Optional pinned `id`."),d({type:x("removeTrack"),trackId:a()}).describe("Remove a track AND all its clips by id."),d({type:x("updateTrack"),trackId:a(),updates:d({name:a().optional(),enabled:R().optional()})}).describe("Patch a track's `name` / `enabled` by id."),d({type:x("reorderTracks"),fromIndex:p(),toIndex:p()}).describe("Move a track from one index to another (changes layer/compositing order)."),d({type:x("moveClipToTrack"),clipId:a(),targetTrackId:a(),newStartTime:p().optional()}).describe("Move a clip to another SAME-family track, optionally at a new `newStartTime`."),d({type:x("duplicateClip"),clipId:a(),newClipId:a().optional()}).describe("Duplicate a clip by id. Pin `newClipId` to make the copy's id deterministic (required for a clean undo/inverse)."),d({type:x("cutAndRipple"),start:p(),end:p()}).describe("Server-authoritative: delete the [start,end] time window (seconds) and ripple every downstream clip/marker/caption earlier to close the gap."),d({type:x("ripple"),time:p(),amount:p()}).describe("Server-authoritative: shift everything at/after `time` (seconds) by `amount` seconds (+ opens a gap, \u2212 closes one)."),d({type:x("addExcludedRange"),clipId:a(),sourceStart:p(),sourceEnd:p(),reason:a().optional()}).describe("Server-authoritative: exclude a [sourceStart,sourceEnd] span (seconds) of a clip's SOURCE (an internal trim) and ripple downstream \u2014 the preferred way to drop a sub-range vs a source patch."),d({type:x("removeExcludedRange"),clipId:a(),rangeIdx:p()}).describe("Server-authoritative: remove a clip's previously-added excluded range by index (re-includes that span, ripples downstream)."),d({type:x("scene.add"),clipId:a().min(1).describe("Id for the new scene clip. Must not already exist in the composition."),trackId:a().min(1).optional().describe("Existing DEDICATED scene track to place the shot on. Mutually exclusive with `newTrack`; the track must be an overlay track holding only scene clips and gaps."),newTrack:R().optional().describe("Mint a dedicated overlay track for this shot. Mutually exclusive with `trackId`."),newTrackId:a().min(1).optional().describe("Optional id for the minted track. Defaults to `track-scene-<clipId>`."),startTime:p().min(YX).describe("Timeline start (seconds), quantized to the composition's frame lattice."),duration:p().gt(QX).describe("Clip duration (seconds). The shot's normalized animation is sampled over exactly this span."),transitionIn:d({type:a().min(1).describe("Transition kind. Scene tracks accept `cut` and `fade` in v1."),duration:p().gt(eY).describe("Transition duration (seconds), quantized to the frame lattice.")}).optional().describe("Incoming transition for this shot \u2014 the SINGLE owner of the boundary. v1 accepts `cut` and `fade`; a fade holds the outgoing shot's last content frame across the overlap instead of starting this shot early, so authored start times and total length are preserved. A one-frame fade is a cut; zero-frame fades, fades longer than either participating clip and fades across a gap are refused."),scene:Lu.describe("The complete validated scene spec. It names asset SLOTS, never media URLs or loader instructions; the sibling `assets` map binds those slot names to CueFrame media IDs. Required fields have no implicit runtime defaults \u2014 persist the complete validated result."),assets:k(a(),a().min(1)).describe("Asset SLOT NAME \u2192 registered CueFrame media ID. Keys must be EXACTLY the image slots the scene references (`image` on a page layer, `screen` on a device layer); a missing binding names the layer that owns the slot and an extra binding is refused. Every bound item must already be registered media of kind `image` \u2014 PNG, JPEG or WebP, admitted by verified MIME and decoded dimensions. GIF, SVG and video need an explicit ingest conversion or a future layer type. Required screenshot slots never fall back to placeholder art during export, so bind real media IDs (import_media / finalize_upload) before authoring the shot.")}).describe('Author a scene shot and place it on a dedicated overlay track. The host validates the scene, generates and registers an immutable wrapper component source, and emits the ordinary track/clip operations carrying `props.componentRef` \u2014 you edit a scene SPEC, never wrapper TSX or a source hash. Registration and the composition update are ONE undoable edit; a failure publishes nothing and leaves no clip pointing at an unresolved source. Pass EXACTLY ONE of `trackId` (an existing dedicated scene track) or `newTrack: true` (mint one). That track holds scene-shot clips and gaps only \u2014 no generic component/primitive/media clips in v1 \u2014 and existing generic overlay tracks are unaffected. Scene clips use front zPlane and full-frame placement: outer per-clip `region`, `position`, `scale`, `rotation`, `fit`, `effects`, `animate`, `params.transition`, `params.sequenceGroup` and internal fadeIn/fadeOut are REFUSED with a path, because the shot\'s own layer transforms are the single transform owner. TEXT: `space: "screen"` text is composed above the world result, stays fixed in the frame and stays sharp through focus; `space: "world"` text is rasterized into the 3D scene, moves with the camera and is occluded by geometry. Screenshots and world text are UNLIT and colour-managed so product UI colours are not tinted by the studio lighting, while device bodies are lit and cast shadows; an unlit surface still occludes. SCOPE GAP (pre-existing, neither closed nor changed by scene shots): global wrap effects \u2014 composition-level grades and camera effects \u2014 do not reach front-overlay clips, so they do not affect a scene shot. Author the look INSIDE the shot (`post.grain`, `post.vignette`, `post.focus`, `backdrop`, `environment`) instead. DISCOVERY: there is no built-in scene primitive to look up in list_catalog; the wrapper this operation registers appears afterwards as an ordinary INSTALLED component under the existing catalog rules.'),d({type:x("scene.update"),clipId:a().min(1).describe("Id of an existing scene-shot clip."),startTime:p().min(tY).optional().describe("New timeline start (seconds), quantized to the frame lattice."),duration:p().gt(oY).optional().describe("New clip duration (seconds). Retimes the normalized animation; it does not trim the shot."),transitionIn:d({type:a().min(1).describe("Transition kind. Scene tracks accept `cut` and `fade` in v1."),duration:p().gt(rY).describe("Transition duration (seconds), quantized to the frame lattice.")}).optional().describe("Incoming transition for this shot \u2014 the SINGLE owner of the boundary. v1 accepts `cut` and `fade`; a fade holds the outgoing shot's last content frame across the overlap instead of starting this shot early, so authored start times and total length are preserved. A one-frame fade is a cut; zero-frame fades, fades longer than either participating clip and fades across a gap are refused."),scene:Lu.optional().describe("Replacement scene spec, validated as a whole. Omit to keep the persisted spec."),assets:k(a(),a().min(1)).optional().describe("Replacement slot \u2192 media ID bindings, validated against the merged spec's slots. Omit to keep the persisted bindings. Same admission rules as `scene.add`: registered image media in PNG, JPEG or WebP.")}).describe("Revise a scene shot in place by clip id. Send a replacement `scene` and/or `assets`; timing changes use the ordinary clip timing fields (`startTime`, `duration`, `transitionIn`). Omitted fields keep their persisted values and the MERGED result is re-validated as a whole, so a partial edit cannot leave the shot invalid. Changing only values or asset IDs updates props and bindings and REUSES the pinned source; changing the referenced SLOT SET regenerates the wrapper manifest and registers a new immutable source version atomically. Undo restores the source reference, spec, bindings and timing together. Topology, asset bindings, text content, font properties, device kind and colours are STATIC within a shot's animation \u2014 change them here (a revised spec) rather than trying to animate them. This is not a source trim or slip: a shortened or extended clip resamples the SAME normalized animation over its new duration, and trim/slip requests on generated animation are rejected rather than reinterpreted as media trims. In one batch, `scene.update` may target a shot added by an earlier `scene.add`.")]).describe("One scoped composition operation. Discriminated by `type` \u2014 `clip.add` / `clip.remove` / `clip.update` patch clips across any family; the rest cover markers, reframe, effects, captions, format, tracks, and the server-authoritative ripple recomputes. Validated strictly server-side against the runtime CompositionOp vocabulary.");var nY=d({ops:b(ju).min(1),if_match:a().optional().describe('Optional OCC precondition \u2014 the strong etag (`"<hex>"`) the caller last saw. On mismatch the batch is rejected (409 stale_etag) before any op applies.'),dry_run:R().optional().describe("When true, validate the batch (apply + projection accept/reject guards) WITHOUT persisting. Returns `{ valid, errors }` instead of applying."),session_id:a().optional().describe("Optional compose-session id. When present, the ops target the session's SCRATCH composition (a derived sibling) instead of the project's active composition \u2014 the server never mutates active until commit.")}).describe("POST /projects/:id/composition/apply body \u2014 a batch of CompositionOps.");var iY=200,sY=d({name:a().min(1).max(iY).optional(),format:ve.optional()}).describe("POST /projects/:id/compositions body \u2014 create a new video (composition) in the project. `format` defaults to the project's compositionFormat when omitted.");var aY=0,cY=9007199254740991,Ay=d({compositionId:a(),format:ve,etag:a(),isActive:R(),updatedAt:p(),sceneCount:z().min(aY).max(cY)}).describe("A composition in a project, flagging the active one.");var pY=d({data:b(Ay)}).describe("GET /projects/:id/compositions response.");var dY=2e3,lY=d({intent:a().min(1).max(dY).describe("Plain-English goal \u2014 what you're trying to achieve with this edit."),mode:f(["advise","amend","explore"]).optional().describe("advise = proposer-only (no render/judge, no grounded assessment); amend (default) = grade the current composition + author the fix for the weakest criterion; explore = ranked slate of diverse directions. All modes are async \u2014 poll the returned job."),focus:f(["editorial","spatial","brand","caption"]).optional().describe("Optional criterion to concentrate the advice on."),ifMatch:a().optional().describe("Etag of the composition the advice is computed against. Proposals are bound to it; apply a proposal BEFORE any other edit or it will 409.")}).describe("POST /projects/:id/consult body.");var uY=d({consultJobId:a().describe("Opaque consult job id; poll it for the advisory result."),projectId:a(),status:f(["queued","failed"]).describe("queued = normal; failed = startup failed and the job is already terminal."),streamUrl:a().optional().describe("Relative SSE endpoint to stream this job's events.")}).describe("POST /projects/:id/consult response.");var _y=d({faceId:a(),bbox:d({x:p(),y:p(),width:p(),height:p()}),speakingShare:p().optional()});var Ly=d({window:d({startSec:p(),endSec:p()}),faces:b(_y)});var Ffe=d({projectId:a().optional().describe("Optional project to scope the token to; omitted = org library.")});var Vfe=d({projectId:a(),mediaId:a()});var mY=2048,qfe=d({videoUrl:ke().max(mY),format:ve.optional()});var hY=0,fY=10,gY=6,xY=d({criticId:a().min(1).describe("Stable client id; re-registering the same id UPSERTS."),label:a().min(1),tier:f(["rules","rubric","evaluator"]),floor:p().min(hY).max(fY).optional().describe("Score below this routes a refine like a built-in criterion. Defaults to 6."),rules:b(k(a(),O())).optional().describe('tier "rules": declarative ClientRule[] (data).'),rubric:a().optional().describe('tier "rubric": your criterion + description; scored as an extra column.'),referenceMediaIds:b(a()).max(gY).optional().describe('tier "rubric"/"evaluator": up to 6 org media ids whose thumbnails the judge sees as YOUR reference standard \u2014 "looks like mine" becomes a machine check. Each must be an org-owned media item with a visual thumbnail (422 names any that is not).'),url:ke().optional().describe('tier "evaluator": your HTTPS webhook; CueFrame POSTs the artifact.')}).describe("Register a custom compose critic.");var _s=d({criticId:a(),label:a(),tier:f(["rules","rubric","evaluator"]),floor:p(),referenceMediaIds:b(a()).optional()}).describe("One registered critic (rubric/rules/url stay write-only \u2014 never echoed).");var yY=d({critics:b(_s)});var bY=d({id:a(),criticId:a(),tier:f(["rules","rubric","evaluator"]),secret:a().optional().describe("evaluator tier: Standard-Webhooks signing secret, returned ONCE.")}).describe("POST /critics response (evaluator secret present exactly once).");var SY=d({fromCompositionId:a().min(1).describe("Source composition to reframe a sibling from."),targetFormat:ve.describe("The target output format (aspectRatio + optional fps/resolution) for the new sibling.")}).describe("Derive a reframed sibling composition for a new aspect (Auto-Reframe / Magic-Resize, agent-native).");var zY=d({compositionId:a().describe("The new sibling composition's id.")}).describe("POST /projects/:id/compositions/derive response.");var ege=d({error:d({code:a().describe("Stable machine-readable error code per \xA7Error Model."),message:a().describe("Human-readable message."),details:k(a(),O()).optional().describe("Optional context (currentEtag, projectIds, retryAfter, \u2026).")}).describe("Standard API error envelope.")}).describe("Error envelope used by every non-2xx response.");var nr=d({kind:f(["transcript","subjectTrack","matte"]),intent:d({kind:f(["whole","window"]),window:d({startSec:p(),endSec:p()}).optional().describe("The SOURCE window this fact covers, when it is scoped to a clip.")}),status:f(["pending","ready","failed"]),summary:d({presenceFraction:p().optional().describe("Matte only: fraction of frames carrying a detected subject (0\u20131). Below 0.6 there is no reliable silhouette \u2014 the matte is delivered but cannot carry a behind-subject graphic, and is NOT charged."),faceCount:p().optional(),language:a().optional(),wordCount:p().optional(),durationSec:p().optional()}).optional(),charge:d({usd:p()}).optional().describe("What this fact was BILLED, in USD. Absent when it cost nothing: a compose/render side effect (already paid for inside that operation) or an unusable matte."),error:d({code:a(),message:a()}).optional(),readyAt:p().optional()}).describe("One derived fact about a media item \u2014 computed once, charged at most once.");var ir=d({kind:f(["transcript","subjectTrack","matte"]),quotedUsd:p().describe("The server's price for this enhancement, in USD. Meaningful ONLY when `available` is true \u2014 an unavailable offer quotes 0 because there is nothing to price yet."),available:R(),reason:a().optional().describe("Why this cannot be bought right now. Present iff `available` is false. e.g. `media_not_ready` (the source has no known duration yet).")}).describe("A purchasable enhancement that this media item does not have yet.");var jy=v([d({kind:f(["subjectTrack","matte"]),scope:d({startSec:p(),endSec:p()}),state:f(["pending","ready","failed"]),fact:nr}),d({kind:f(["subjectTrack","matte"]),scope:d({startSec:p(),endSec:p()}),state:f(["available","unavailable"]),offer:ir})]).describe("The server-selected fact or offer for one exact source window. Present when kind, startSec, and endSec are supplied; clients consume this instead of recreating the fact hash.");var vY=24,wY=d({count:z().min(1).max(vY),contentType:f(["image/jpeg","image/png"]).optional(),includeContactSheet:R().optional()}).describe("POST /brand-kits/exemplar-uploads body. Reserve presigned PUT slots for curated reference frames (\u2264720px recommended \u2014 they are vision input tokens downstream).");var IY=d({batchId:a(),uploads:b(d({key:a(),url:a()})),contactSheetUpload:d({key:a(),url:a()}).optional(),expiresAt:a()});var kY=d({clipSuggestionId:a().min(1)}).describe("POST /projects/:id/exports/{fcpxml,premiere} body.");var Fy=d({phase:f(["trim","build","upload","trigger"]),message:a(),detail:a().optional(),retryable:R()});var Ny=f(["fcpxml","premiere"]);var Vy=f(["queued","trimming","building","uploading","complete","error","cancelled"]);var $Y=0,TY=1,PY=d({id:a(),format:Ny,status:Vy,progress:p().min($Y).max(TY).describe("Fractional progress 0..1 across the trim/build/upload pipeline. Reaches 1 only on `complete`."),outputUrl:a().nullable(),outputExpiresAt:a().nullable(),outputSizeBytes:p().nullable(),outputDurationSec:p().nullable(),error:v([Fy,J()]).describe("Set when status is `error`; null otherwise. The phase field localizes the failure to trim / build / upload / trigger."),trimCacheHit:R().nullable(),clipSuggestionId:a().nullable(),createdAt:a(),updatedAt:a()}).describe("NLE export job response.");var CY=d({url:ke()}).describe("POST /brand-kits/extract body \u2014 the website URL to extract brand tokens from.");var Uy=d({colors:b(a()),fonts:b(a()),title:a().optional(),description:a().optional()}).describe("POST /brand-kits/extract response \u2014 extracted brand tokens (not persisted).");var OY=200,RY=0,MY=50,EY=d({query:a().min(1).max(OY),perPage:z().gt(RY).max(MY).optional()}).describe("POST /fonts/search body.");var DY=d({results:b(d({family:a(),category:a().optional(),variants:b(a()).optional(),cssUrl:a().optional(),previewText:a().optional()}))}).describe("POST /fonts/search response.");var zge=d({composition:O()});var AY=0,_Y=0,LY=100,wge=d({after:z().min(AY).optional(),before:z().min(_Y).optional(),limit:z().min(1).max(LY).optional()});var kge=Wt({});var jY=d({status:f(["ok","degraded"]),version:a(),checks:k(a(),d({ok:R(),detail:a().optional()})).optional()}).describe("Health probe response.");var By=d({jobId:a().describe("Poll GET /v1/jobs/{jobId} / wait_job until terminal."),jobKey:a().describe("Deterministic identity of the work (content hash of every input the result depends on). Re-enqueueing the same key returns the same job while it runs; a failed key revives as a fresh attempt."),kind:a().describe("Job family, e.g. `verify` | `preview` | `brand_kit_extract`."),status:f(["running","succeeded","cancelled"]).describe("running on a fresh/deduped enqueue; succeeded when an identical request already completed. Cancelled is part of the shared status vocabulary; identical cancelled work revives to running.")});var FY=0,NY=9007199254740991,VY=0,UY=9007199254740991,qy=d({geometry:d({scale:p(),compositionWidth:p().optional(),compositionHeight:p().optional(),width:p().optional(),height:p().optional()}),warnings:b(k(a(),O())).optional(),previewed:d({source:f(["inline","scratch","persisted"]),compositionId:a().optional(),etag:a().optional()}),listUsd:p().optional().describe("List price charged for this delivered capture."),artifacts:b(d({id:a(),beatSec:p(),bytes:z().gt(FY).max(NY),contentType:f(["image/png","image/jpeg"]),layers:d({video:a().nullable(),overlays:z().min(VY).max(UY)}),url:ke(),urlExpiresAt:a()}))});var Wy=d({perCriterion:O(),composite:p(),critique:a(),checkpointId:a(),beats:O().optional(),clientScores:b(O()).optional(),listUsd:p().optional().describe("List price charged for this delivered evaluation.")});var BY=d({id:a().describe("Job id \u2014 pass to GET /v1/jobs/{id} / wait_job."),jobKey:a().describe("Deterministic identity of the work (idempotency key, e.g. `verify-<sessionId>-<contentHash>` \u2014 the hash covers the composition AND grading inputs). Re-enqueueing the same key returns the same job while it runs."),kind:a().describe("Job family, e.g. `verify`."),status:f(["running","succeeded","failed","cancelled"]).describe("Poll until terminal (`succeeded` | `failed` | `cancelled`)."),progress:v([d({phase:a(),percent:p().optional(),message:a().optional()}),J()]).describe("Executor heartbeat while running; null when none reported."),result:v([v([qy,Ty,Wy,Uy]),J()]).describe("Kind-specific payload when status is `succeeded`; null otherwise."),error:v([d({code:a(),message:a()}),J()]).describe("Stable failure code + human message when status is `failed`; null otherwise. `job_timeout` = the executor died mid-run and the stall sweep reaped the job \u2014 re-enqueue to retry."),createdAt:a(),updatedAt:a(),completedAt:a().nullable()});var Zy=d({mediaId:a().describe("The media item this moment belongs to \u2014 feed it to apply_composition as a clip source, or GET /v1/media/{id}/context for its faces/beat/word grids."),name:a().describe("The media item's name, so a result is readable without a second call."),score:p().describe("Cosine similarity between the query text and the chunk's frame, in [-1, 1]. Higher is closer. Compare scores WITHIN one response; absolute values are not calibrated across queries."),startSec:p().describe("Moment start, SECONDS from the media item's start."),endSec:p().describe("Moment end, SECONDS from the media item's start."),thumbUrl:a().nullable().describe("Presigned URL for the media item's thumbnail, or null when it has none. This is the ITEM's thumbnail, not a still of this moment \u2014 render a still of the exact range with preview_frame.")});var qY=d({results:b(Zy).describe("Matching moments, best first. Empty means nothing matched (when `indexing` is false) \u2014 the library was searched and came back empty-handed."),indexing:R().describe('TRUE when some of the org\'s footage is NOT in the visual index yet \u2014 media that predates it, or is still processing. This is COVERAGE, not emptiness: it can be true ALONGSIDE results, and then it means "these are the best moments among what we have looked at so far", not "these are the best moments". An empty `results` with `indexing: true` means "not looked at yet", NOT "no match" \u2014 re-run the media through processing (reprocess) to index it, then search again. FALSE with empty `results` is a real miss: the library was searched and nothing matched.')}).describe(`Semantic search over the org's OWN footage. The query is embedded with the same CLIP model that embedded every indexed frame, so a description of what you want to SEE ("wide shot of the speaker at a whiteboard") finds the moment even when nobody says those words.`);var WY=100,Fge=d({category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional(),kind:f(["component","transition","scene"]).optional(),tier:f(["recommended","standard","niche"]).optional(),useCase:f(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"]).optional(),mood:a().optional(),q:a().optional(),intent:a().optional(),limit:z().min(1).max(WY).optional(),after:a().optional()});var Vge=d({kind:f(["subjectTrack","matte"]).optional(),startSec:p().optional(),endSec:p().optional()});var ZY=0,GY=0,KY=d({startSec:p().min(ZY).describe("Source-in of the window to matte, in seconds into the underlying source."),endSec:p().gt(GY).describe("Source-out of the window to matte, in seconds into the underlying source.")}).describe("POST /media/:id/matte body. The window is REQUIRED and is the clip's SOURCE trim, not timeline time: a matte's cost scales with its duration, so there is no whole-source default to fall back on.");var JY=d({factId:a(),status:f(["pending","ready","failed"]),quotedUsd:p().describe("The server's price for this matte, in USD, quoted from the window duration."),alreadyExisted:R().describe("True when a matte for this exact window was already pending or ready. Nothing was dispatched and nothing will be charged.")}).describe("POST /media/:id/matte response \u2014 the claimed matte fact.");var Fu=d({mediaItemId:a(),language:a().nullable(),fullText:a(),utterances:b(k(a(),O())),data:b(k(a(),O())).optional(),pagination:$e.optional()}).describe("Transcript response.");var HY=d({mediaId:a(),durationSec:p().nullable(),width:p().nullable(),height:p().nullable(),thumbnail:v([d({url:a()}),J()]).describe("Presigned processing thumbnail (~1 week) \u2014 the footage at a glance. For stills at chosen timestamps, use preview_frame with a one-clip composition over this media."),faces:d({status:f(["ready","not_detected"]),windows:b(Ly)}),transcript:d({status:f(["ready","not_transcribed","unavailable"]),data:v([Fu,J()])}),beatGrid:v([d({bpm:p(),beatTimesMs:b(p()).describe("Beat onset times in MILLISECONDS \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds)."),confidence:p().describe("Rhythmic-periodicity strength (0\u20131). Trust the grid for cutting when high; a beatless bed reports low."),method:f(["requested-anchored","detected"]).describe("`requested-anchored` = phase-locked to a requested BPM (a generated bed whose prompt named a tempo); `detected` = full beat tracking (import/upload).")}),J()]).describe("The MUSIC-role rhythm grid (audio-substrate MVP). Present only for a music bed that carries a computed beat grid; null otherwise. For a music-driven film, cut on these beats (transition midpoints on beats, risers resolving on downbeats)."),wordGrid:v([d({wordTimesMs:b(p()).describe("Word onset times in MILLISECONDS, in order \u2014 divide by 1000 for timeline startTime (composition timeline fields are seconds).")}),J()]).describe("The VO-role rhythm grid: word onsets surfaced from the transcript (pure exposure). Present only when a transcript exists; null otherwise. For a VO-driven (narration) film, cut every beat boundary to the voice \u2014 the film-spine rule."),audioRole:v([f(["vo","music","sfx","ambience"]),J()]).describe("DECLARED audio role of this asset (audio-substrate P0): 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks). Author the clip source's `audioRole` from this. Null for footage/images or an undeclared audio asset."),envelope:v([d({envelopeClass:f(["transient","sweep","ambient"]).describe("Coarse temporal shape: 'transient' (a sharp one-shot), 'sweep' (a bounded rise/fall over ~0.5\u20132s), 'ambient' (an unbounded bed)."),attackMs:p().optional(),spectralCentroidHz:p().optional(),meanVolumeDb:p().optional(),maxVolumeDb:p().optional()}),J()]).describe("Envelope evidence (audio-substrate P0). `envelopeClass` is always present when an envelope exists (the SFX pack carries it); the numeric probe stats are present only when an audio probe has run. Null when no envelope is stored."),facts:b(nr).describe("Derived facts about this source (subject tracks, mattes): what has been computed, its status, and what it was billed. Same shape as GET /media/{id}/facts."),offers:b(ir).describe("Enhancements this source does not have yet, with a server quote. Same shape as GET /media/{id}/facts. Mattes are quoted per-window via POST /media/{id}/matte, never here.")}).describe("Read-only authoring context for a source media item: detected face roster + transcript + the temporal grids (beat / word) an agent cuts to, the DECLARED audioRole + envelope of an audio asset, and the paid-enhancement block (facts already computed + offers for what is missing).");var XY=d({id:a(),uploadUrl:ke(),expiresAt:a()}).describe("POST /media response: reserved media id + a presigned PUT URL. PUT the raw bytes to uploadUrl (\u2264 ~5 GiB), then POST /media/:id/finalize.");var YY=0,QY=0,eQ=d({kind:f(["subjectTrack","matte"]).describe("Which enhancement to buy. `transcript` is NOT purchasable here \u2014 it is delivered by the transcription pipeline."),intent:d({startSec:p().min(YY),endSec:p().gt(QY)}).optional().describe("The SOURCE window. REQUIRED for `matte` (its cost scales with duration). OPTIONAL for `subjectTrack`: give a clip's source window to buy the track the render looks up for THAT clip, and pay only for its duration; omit it to detect the whole source.")}).describe("POST /media/:id/facts body.");var tQ=d({factId:a(),status:f(["pending","ready","failed"]),quotedUsd:p(),alreadyExisted:R().describe("True when this exact fact was already pending or ready. Nothing was dispatched and nothing will be charged.")}).describe("POST /media/:id/facts response.");var oQ=d({facts:b(nr),offers:b(ir).describe("What is NOT yet present and could be bought. A `matte` offer appears ONLY when the request carried `startSec`+`endSec` (the clip's SOURCE window) \u2014 a matte's price is a function of its duration, so there is no honest whole-source matte quote. `transcript` is never offered: it is produced by the ingest pipeline, not bought here."),exact:jy.optional()}).describe("Facts and offers for a media item, plus an exact-window resolution when requested.");var rQ=d({audioRole:f(["vo","music","sfx","ambience"]).optional().describe("Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks).")}).describe("POST /media/:id/finalize body \u2014 optional declared audioRole.");var nQ=d({id:a(),status:f(["processing","complete"]),processingPhase:a()}).describe("POST /media/:id/finalize response: ingest triggered (audio/video \u2192 processing) or the item is immediately ready (image/asset \u2192 complete).");var iQ=1e4,sQ=d({generator:f(["text-to-video","text-to-image","image-to-video","text-to-music","text-to-speech","text-to-sfx","auto"]),prompt:a().min(1).max(iQ),style:k(a(),O()).optional().describe("Free-form generation parameters, read per generator. All generators honor `aspect` (string) + `durationSec` (number) where applicable. text-to-speech honors `voice` (string; default voice when omitted), `speed` (number 0.7-1.2), `stability` (number 0-1), and `styleExaggeration` (number 0-1 \u2192 the endpoint's style exaggeration). Provider and model selection are server-owned and cannot be overridden."),refs:d({firstFrameMediaId:a().optional(),lastFrameMediaId:a().optional(),imageMediaIds:b(a()).optional()}).optional()}).describe("POST /media/generate body.");var aQ=d({id:a(),status:x("generating"),estimateUsd:p().optional()}).describe("POST /media/generate response.");var cQ=2048,pQ=500,dQ=0,lQ=10737418240,uQ=d({url:ke().max(cQ),filename:a().min(1).max(pQ),contentType:f(["video/mp4","video/quicktime","video/x-matroska","video/webm","audio/mpeg","audio/wav","audio/x-wav","audio/mp4","audio/aac","image/png","image/jpeg","image/webp","image/gif","image/svg+xml","application/json","font/ttf","font/otf","font/woff","font/woff2"]),size:z().gt(dQ).max(lQ).optional(),audioRole:f(["vo","music","sfx","ambience"]).optional().describe("Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO \u2014 never ducks).")}).describe("POST /media/import body.");var mQ=d({id:a(),status:x("importing")}).describe("POST /media/import response.");var Gy=d({phase:f(["idle","pending_import","pending_upload","uploading","extracting","loading_model","transcribing","proxy","embedding","analyzing","indexing","generating","rendering","processing","complete","error","cancelled"]),percent:p().nullish(),message:a().nullish(),error:a().nullish()}).describe("Processing status stored on mediaItems rows.");var Nu=d({id:a(),status:a(),source:f(["upload","generated","stock"]),name:a(),mimeType:a(),fileSize:p(),duration:p().nullable(),width:p().nullable(),height:p().nullable(),frameRate:p().nullable(),progress:v([d({phase:a(),percent:p().nullable()}),J()]),analysis:v([k(a(),O()),J()]),listUsd:p().optional().describe("A2 money stamp \u2014 GENERATED media only: the generate meter's LIST price (USD) at the success terminal. A plan allowance may zero the invoice line. Absent for uploads/imports, failures, x402 (on-chain receipts)."),thumbnailUrl:a().nullable(),previewUrl:a().nullable(),kind:a().nullable(),tags:v([b(a()),J()]),attribution:v([d({provider:f(["pexels","pixabay","freesound","klipy"]),externalId:a().nullable(),assetUrl:a().nullable(),license:a().nullable()}),J()]),processingStatus:v([Gy,J()]),createdAt:a(),updatedAt:a()}).describe("Media item response per \xA7Media.");var hQ=d({data:b(Nu),pagination:$e});var fQ=500,gQ=0,xQ=10737418240,yQ=d({filename:a().min(1).max(fQ),contentType:f(["video/mp4","video/quicktime","video/x-matroska","video/webm","audio/mpeg","audio/wav","audio/x-wav","audio/mp4","audio/aac","image/png","image/jpeg","image/webp","image/gif","image/svg+xml","application/json","font/ttf","font/otf","font/woff","font/woff2"]),size:z().gt(gQ).max(xQ),projectId:a().min(1).optional()}).describe("POST /media upload initiation body.");var bQ=d({jobId:a(),status:a(),muxedItems:v([k(a(),a()),J()]).optional(),error:a().nullish(),startedAt:a().nullish(),completedAt:a().nullish()}).describe("Mux job response.");var bxe=d({sessionId:a()});var SQ=64,zxe=d({seedComposition:O().optional(),leaseJobId:a().min(1).max(SQ).optional()});var zQ=0,vQ=0,wQ=d({fromSec:p().min(zQ).describe("Window start, seconds into the composition."),toSec:p().gt(vQ).describe("Window end (exclusive), seconds."),compositionId:a().min(1).optional().describe("Target a specific composition; defaults to the project's active composition.")}).describe("POST /projects/:id/preview-clip body.");var IQ=0,kQ=9007199254740991,$Q=0,TQ=9007199254740991,PQ=0,CQ=120,OQ=3600,Ixe=d({componentId:a().min(1),params:k(a(),O()).optional(),assets:k(a(),a().min(1)).optional().describe("Component asset-slot name to org mediaId. Every required manifest slot must be bound."),width:z().gt(IQ).max(kQ).optional(),height:z().gt($Q).max(TQ).optional(),fps:p().gt(PQ).max(CQ).optional().describe("Preview frame rate. When omitted, uses the project's format."),durationInFrames:z().min(1).max(OQ).optional().describe("Preview frame count. When omitted, uses the component's declared duration; required if the component has none.")});var RQ=.1,MQ=1,EQ=100,$xe=d({composition:O().optional().describe("The composition to render. Absent \u21D2 the project's ACTIVE composition \u2014 what create_render will encode. The response's `previewed.source` names what was rendered."),compositionId:a().optional().describe("Preview a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:a().optional().describe("Compose-session id: render that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),timestamps:b(p()).min(1),imageFormat:f(["png","jpeg"]).optional().describe("Still format. Default jpeg \u2014 these pixels go to a vision model, where jpeg is equivalent and png costs multiples in bytes to store and move. Pass png only when you need full fidelity."),scale:p().min(RQ).max(MQ).optional().describe("Render scale 0.1\u20131. Default 0.5, which is what this schema has always recommended for vision-bound looks. Pass 1 when judging fine detail \u2014 it costs ~4x the vision tokens."),jpegQuality:z().min(1).max(EQ).optional().describe("JPEG quality (jpeg only). Default 70 \u2014 the quality the eval panel grades at.")});var DQ=300,AQ=0,_Q=1e4,LQ=120,jQ=d({brandKits:b(d({id:a(),name:a(),audio:d({sfxIntensity:f(["off","light","standard","dense"]).optional(),musicEnabled:R().optional(),musicMood:a().max(DQ).optional(),sonicLogo:d({ref:a().min(1),placement:f(["intro","outro","both"]),offsetMs:z().min(AQ).max(_Q).optional()}).optional().describe("A brand sound signature bound to the intro/outro bookend. `ref` = a palette reference; bound only when the kit carries the matching bumper (intro/outro), else a non-blocking advisory."),uiSoundSet:d({tick:a().min(1).optional(),pop:a().min(1).optional(),impact:a().min(1).optional(),confirm:a().min(1).optional(),error:a().min(1).optional(),whoosh:a().min(1).optional(),riser:a().min(1).optional()}).optional().describe("Per-family SFX overrides (the brand's own tick/pop/\u2026). Highest-priority tier over the org palette + pack default in the compose SFX draw."),bedStyle:d({bedId:a().min(1).optional(),genre:a().max(LQ).optional(),bpmRange:d({min:p(),max:p()}).optional()}).optional().describe("Preferred music bed (`bedId`) or a style hint (`genre` / `bpmRange`). Surfaced for driving agents; compose does not auto-select a pack bed."),ambiencePreference:v([d({ref:a().min(1)}),J()]).optional().describe("Preferred ambience bed (`{ref}`) or explicit null (opt-out). Surfaced for driving agents; compose has no ambience auto-placement.")}).optional()})).describe("The org's brand kits (bind one to a project via update_project). `audio` carries the brand sound kit when set."),critics:b(_s).describe("Registered critics \u2014 run in the Director's gates AND score_composition."),references:b(d({mediaId:a(),name:a().optional(),thumbnailUrl:a().optional().describe("Presigned reference thumbnail (~1 week).")})).describe("The union of critic reference media \u2014 the org's visual standard, with provenance."),recentDecisions:b(d({checkpointId:a(),projectId:a(),kind:f(["gate","score"]),stage:f(["content","layout","motion"]).optional(),decision:a(),decidedAt:p()})).describe("The last recorded checkpoint decisions \u2014 the raw taste log phase 2 will distill.")}).describe("The org's legible taste: brand + critics + references + decision log.");var FQ=0,NQ=9007199254740991,Ky=d({hasComposition:R(),sceneCount:z().min(FQ).max(NQ),duration:p().nullable(),updatedAt:a().nullable()}).describe("Summary of a project's stored composition.");var Jy=d({id:a(),name:a(),kind:a().nullable(),durationSec:p().nullable().describe("Seconds. Uses the media duration when known; audio without one falls back to its transcript's measured duration (same rule as get_media_context)."),hasTranscript:R().describe("A cached transcript EXISTS for this item. The bodies are never inlined here \u2014 fetch one with GET /v1/media/{id}/transcript (or get_media_context for faces + grids too).")}).describe("One media item as the project context lists it: identity + duration + whether a transcript exists.");var Hy=v([d({status:x("ready"),mediaId:a(),words:b(d({text:a(),start:p().describe("Word onset (SECONDS from source start)."),end:p().describe("Word end (SECONDS from source start).")}))}),d({status:x("unavailable"),mediaId:a()})]);var VQ=0,UQ=0,BQ=d({composition:v([_u,J()]).describe("The project's ACTIVE composition wire shape \u2014 identical to GET /v1/projects/{id}/composition. NULL when the project has no composition yet (a freshly created project): mint one with new_composition, or let the first apply_composition create it."),format:v([d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}),J()]).describe("The composition's format, hoisted \u2014 the pixel frame every card/graphic must be authored against. Null whenever `composition` is null."),media:b(Jy).describe("The org's media library (most recent first, capped) \u2014 the pool this project can draw clips from."),transcript:v([Hy,J()]).describe('The FIRST transcribed media item\'s word-timed transcript, flattened \u2014 the spine a VO-driven film cuts to. `status:"ready"` carries the words; `status:"unavailable"` means the transcript exists but its body could not be fetched (retry); null means nothing in `media` is transcribed. For any OTHER transcribed item (see each entry\'s `hasTranscript`), read GET /v1/media/{id}/transcript.'),brandKit:v([cn,J()]).describe("The kit BOUND to this project (`projects.brandKitId` is the brand SSOT \u2014 bind one via update_project). Null when the project has no kit bound; enumerate the org's kits with GET /v1/brand-kits."),markers:b(d({id:a().min(1),startTime:p().min(VQ),endTime:p().min(UQ).optional(),kind:a().min(1),name:a().optional(),metadata:k(a(),O()).optional()})).describe("The composition's markers \u2014 hoisted alongside `format`. Empty when the composition carries none AND when there is no composition yet.")}).describe("One-call agent context for a project: composition + format + media pool + the lead transcript + the bound brand kit + markers. Replaces get_composition + get_media_context + get_profile at the start of an authoring session. A 404 means the project doesn't exist for your org \u2014 never that it is empty.");var qQ=200,WQ=0,ZQ=0,GQ=d({name:a().min(1).max(qQ),description:a().optional(),format:ve.optional(),brandKitId:a().min(1).optional(),width:p().gt(WQ).optional(),height:p().gt(ZQ).optional()}).describe("POST /projects body.");var Xy=v([d({id:a(),status:a(),createdAt:a(),outputUrl:a().nullable(),outputExpiresAt:a().nullable()}),J()]).describe("Most recent render for a project, if any.");var Vu=d({id:a(),name:a(),description:a().nullable(),format:v([ve,J()]),brandKitId:a().nullable(),activeCompositionId:a().nullable(),composition:Ky,lastRender:Xy,createdAt:a()}).describe("Project response per \xA7Projects.");var KQ=d({data:b(Vu),pagination:$e});var JQ=200,HQ=d({name:a().min(1).max(JQ).optional(),description:a().optional(),format:ve.optional(),brandKitId:a().min(1).optional()}).describe("PATCH /projects/:id body.");var XQ=d({clipSuggestionId:a().min(1).optional(),compositionId:a().min(1).optional().describe("Target a specific composition in the project; defaults to the project's active composition."),format:ve.optional(),priority:f(["interactive","standard","background"]).optional(),intent:f(["preview","final"]).optional(),brandKitId:v([a().min(1),J()]).optional()}).describe("POST /projects/:id/renders body.");var YQ=0,QQ=9007199254740991,eee=0,tee=9007199254740991,Yy=d({phase:f(["queued","validating","presigning","collecting-artifacts","resolving","detecting","baking-matte","translating","spawning","encoding","uploading"]),percent:p(),scenesCompleted:z().min(YQ).max(QQ).optional(),scenesTotal:z().min(eee).max(tee).optional()}).describe("Non-terminal render progress; phase is one of the worker's emitted stages.");var Uu=d({id:a(),status:f(["queued","pending","rendering","complete","error","cancelled"]),progress:Yy.optional(),outputUrl:a().nullable(),outputExpiresAt:a().nullable(),error:a().nullable().describe("Human-readable failure message. Pair with `errorCode` for a stable, machine-readable code an agent runner can branch on."),errorCode:a().nullable().describe("Stable, machine-readable error code (e.g. `render_pipeline_unavailable`, `render_route_missing`, `render_pipeline_failed`). Null when status is not `error` or unavailable for an older render."),errorDetails:v([k(a(),O()),J()]).describe("Structured failure context \u2014 `{ targetUrl?, upstreamStatus?, upstreamCode?, attemptedAt? }`. Surfaced so agent runners can distinguish operator-config issues from upstream-down vs route-missing without parsing `error`."),category:v([f(["authoring","transient","internal"]),J()]).describe("Failure taxonomy when status is `error`; null otherwise. `authoring` = deterministic defect in YOUR composition/request \u2014 fix it, retrying is futile; `transient` = temporary pipeline/infra failure \u2014 safe to retry_render; `internal` = unexpected server fault \u2014 retry once then escalate. Mirrors the render.failed webhook's `category`."),retryable:R().nullable().describe("Whether re-attempting the SAME render can succeed (status `error`); null otherwise. true \u2192 call retry_render. false \u2192 deterministic (category authoring/internal); fix the composition first \u2014 retry_render alone reproduces it. Mirrors the render.failed webhook's `retryable`."),createdAt:a(),updatedAt:a().describe("ISO-8601 timestamp of the render's most recent progress update. Compute staleness = now \u2212 updatedAt to distinguish a wedged render from a slow one and decide whether to wait, cancel, or retry."),listUsd:p().optional().describe("A2 money stamp: the metered event's LIST price (USD), stamped at the success terminal (exports for deliverable renders, compose_capture for A8 previews). A plan allowance may zero the actual invoice line \u2014 this is the list price, never a Stripe charge. Absent while running, on failure, and for x402 orgs (on-chain receipts). Mirrors the get_usage ledger."),warnings:b(a()).optional().describe("Non-fatal advisories surfaced at render-CREATE (omitted when none, and on GET \u2014 create-time only).")}).describe("Render job response per \xA7Renders.");var oee=d({data:b(Uu),pagination:$e});var ree=d({outputUrl:a(),outputExpiresAt:a()}).describe("POST /refresh-url response.");var Ls=d({candidateId:a(),provider:f(["pexels","pixabay","freesound","klipy"]),kind:f(["video","photo","sfx","gif"]),thumbnail:a(),previewUrl:a(),downloadUrl:a().optional(),duration:p().optional(),width:p().optional(),height:p().optional(),author:a(),authorUrl:a().optional(),assetUrl:a().optional(),license:a().optional()}).describe("A stock resource search candidate.");var nee=d({kind:f(["sfx-pack","music-pack"]).optional(),id:a().min(1).optional(),projectId:a().min(1).optional(),candidateId:a().min(1).optional()}).describe('POST /resources/import body \u2014 stock candidate lane { projectId, candidateId } OR curated pack lane { kind:"sfx-pack"|"music-pack", id }.');var iee=d({id:a(),status:f(["importing","ready"])}).describe("POST /resources/import response.");var see=200,aee=200,cee=10,pee=0,dee=50,lee=0,uee=9007199254740991,mee=0,hee=9007199254740991,fee=0,gee=0,xee=d({query:a().min(1).max(see).optional(),queries:b(a().min(1).max(aee)).min(1).max(cee).optional(),kind:f(["video","photo","sfx","gif"]).optional(),provider:f(["pexels","pixabay","freesound","klipy"]).optional(),limit:z().gt(pee).max(dee).optional(),minWidth:z().gt(lee).max(uee).optional().describe("Video-only minimum selected-rendition width in pixels; smaller results are excluded."),minHeight:z().gt(mee).max(hee).optional().describe("Video-only minimum selected-rendition height in pixels; smaller results are excluded."),durationSec:d({min:p().min(fee).optional(),max:p().gt(gee).optional()}).optional().describe("sfx-only clip-length bound in seconds \u2192 Freesound native filter.")}).describe("POST /resources/search body \u2014 one `query`, or a batch of `queries[]`.");var Qy=d({query:a(),provider:f(["pexels","pixabay","freesound","klipy"]).optional(),kind:f(["video","photo","sfx","gif"]).optional(),candidates:b(Ls),error:a().optional()}).describe("One query's candidates within a batch search.");var yee=d({provider:f(["pexels","pixabay","freesound","klipy"]).optional(),kind:f(["video","photo","sfx","gif"]).optional(),candidates:b(Ls).optional(),results:b(Qy).optional()}).describe("POST /resources/search response \u2014 `candidates` for one query, `results[]` for a batch.");var bee=-9007199254740991,See=9007199254740991,zee=d({ok:x(!0),stage:f(["content","layout","motion"]).optional(),version:z().min(bee).max(See).optional(),composeJobId:a().optional()}).describe("Decision recorded; the run resumes (the SAME rail as POST /checkpoints/{id}/resume).");var vee=-9007199254740991,wee=9007199254740991,Iee=-9007199254740991,kee=9007199254740991,$ee=-9007199254740991,Tee=9007199254740991,Pee=d({id:a(),projectId:a(),composeJobId:a().optional(),briefId:a().optional(),kind:f(["gate","score"]),stage:As.optional(),version:z().min(vee).max(wee),status:f(["awaiting","approved","revised","abandoned","expired","superseded"]),artifact:O().describe("The stage artifact under review: the locked ComposePlan at content; the composition wire shape at layout/motion; the judged composition snapshot on kind:'score'."),stillUrls:b(a()).optional().describe("Presigned storyboard/eval stills \u2014 the packet's visual evidence (may be GC'd by the retention sweep after the job goes terminal; the decision record is immortal)."),criticVerdicts:O().optional().describe("Per-criterion scores + critique from the design loop / judge, incl. lock_violation entries."),quote:Ds.optional(),revisionCycle:z().min(Iee).max(kee).describe("Revise cycles this gate has consumed. The brief quote states the included count (revisionCyclesIncluded); beyond it, resume(revise) is refused with a typed error."),decision:O().optional().describe("The recorded decision {decision, comments?, globalNote?, decidedAt} once resolved."),reviewMode:f(["agent","hosted"]).optional().describe("How this packet is decided (from the Brief's gates). 'hosted' = the review PAGE captures the decision; absent/'agent' = the decision flows back through the driving agent."),createdAt:p(),updatedAt:p(),versionStack:b(d({id:a(),version:z().min($ee).max(Tee),stage:f(["content","layout","motion"]).optional(),status:a(),decision:a().optional(),createdAt:p()})).describe("The run's v1\u2192vN gate history \u2014 per-version status + decision summaries.")});var yye=d({composition:O().optional().describe("The composition to judge. Absent \u21D2 the project's ACTIVE composition."),compositionId:a().optional().describe("Judge a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:a().optional().describe("Compose-session id: judge that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),editorialIntent:a().optional(),brandContext:a().optional()});var Cee=10,Oee=25,Sye=d({q:a().min(1),limit:z().min(1).max(Oee).default(Cee)});var eb=d({startSec:p(),endSec:p(),candidateId:a().describe("The chosen audio source (the clearest mic) for this span \u2192 programAudioSourceId."),reasons:b(a())});var tb=d({startSec:p(),endSec:p(),candidateId:a(),sourceInSec:p().describe("Chosen source window start (declared-offset resolved)."),sourceOutSec:p(),reasons:b(a())});var ob=d({candidateId:a().describe("Stable angle/source id. An unknown id is rejected, never remapped."),role:a().nullish().describe('Agent-declared semantic tag (e.g. "wide", "webcam").'),score:p().describe("The weighted prominence score (\u03A3 weights\xB7signal)."),contributions:k(a(),p()).describe("signalKey \u2192 weighted contribution (the agent reweights from this)."),reasons:b(a())});var rb=d({startSec:p().describe("Span start (output seconds)."),endSec:p().describe("Span end (output seconds)."),chosen:a().describe('The recommended candidateId, or "__hold__" (abstain).'),pacingNote:a().nullish().describe("Which mechanism produced the pick (argmax / hysteresis / override / hold \u2026)."),candidates:b(ob)});var Ree=d({projectId:a(),groupId:a(),selectorVersion:a(),signalVersions:k(a(),a()),moments:b(rb),recommendation:d({cutSchedule:b(tb),audioBed:b(eb).describe("Best-audio bed (instance #3): the clearest mic per span."),suppressedSwitches:b(d({atSec:p(),wouldHaveBeenCandidateId:a(),byScore:p(),blockedBy:a(),releaseAtSec:p().nullable()})).describe("Switches the stabilizer suppressed (the anti-ping-pong audit).")}),divergesFromComposition:R().optional()}).describe("Selector (switch) candidates + recommendation for a synced-angle group. Every candidate carries score + contributions + reasons so the agent reweights from evidence; the recommendation is the lowered cut schedule + best-audio bed.");var Mee=0,Eee=0,Dee=0,Aee=0,_ee=0,Lee=d({groupId:a().min(1),weights:k(a(),p()).optional().describe("Sparse prominence weights (the taste knob, non-negative). Default = DOMINANCE_WEIGHTS."),minHoldSec:p().gt(Mee).optional(),enterSec:p().min(Eee).optional(),switchMargin:p().min(Dee).optional(),cooldownSec:p().min(Aee).optional(),maxHoldSec:p().gt(_ee).optional(),lockSourceId:a().optional().describe("Pin a camera/angle for the whole timeline."),overrides:b(d({startSec:p(),endSec:p(),candidateId:a()})).optional()});var jee=200,Fee=50,Nee=20,Vee=d({name:a().min(1).max(jee),files:b(d({mediaId:a().min(1),role:a().min(1).max(Fee)})).min(1).max(Nee)}).describe("POST /sessions body.");var nb=d({mediaId:a(),role:a(),status:a().nullable()}).describe("One file member of a session, with optional role + status.");var Uee=0,Bee=9007199254740991,ib=d({id:a(),name:a(),fileCount:z().min(Uee).max(Bee),muxStatus:a().nullable(),createdAt:a()}).describe("Session list summary (per list endpoint).");var qee=d({data:b(ib),pagination:$e});var Wee=d({id:a(),name:a(),files:b(nb),mux:d({status:a().nullable(),jobId:a().nullable(),muxedItems:v([k(a(),a()),J()]),error:a().nullable(),startedAt:a().nullable(),completedAt:a().nullable()}),createdAt:a()}).describe("Session response per \xA7Sessions.");var sb=d({name:a(),title:a(),description:a()}).describe("A CueFrame agent skill (metadata).");var Zee=d({skills:b(sb)}).describe("GET /skills response \u2014 the available agent skills.");var Bye=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var Wye=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var Gye=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var Jye=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var Xye=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var Qye=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var tbe=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var rbe=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var ibe=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var abe=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var pbe=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var lbe=d({error:d({code:a(),message:a(),details:k(a(),O()).optional()})});var Gee=d({factId:a().describe("Opaque identifier for the derived fact."),status:f(["pending","ready","failed"]).describe("State of the fact right now. `ready` with `alreadyExisted` means the detection was already computed and is available immediately."),quotedUsd:p().describe("The server's price for this detection, in USD, quoted from the source duration. Zero is charged when `alreadyExisted` is true."),alreadyExisted:R().describe("True when this exact detection was already pending or ready. Nothing was dispatched and nothing will be charged \u2014 the same fact is served twice for one price.")}).describe("POST /media/:id/detect-subjects response \u2014 the claimed perception fact.");var Kee=0,Jee=9007199254740991,ab=d({id:a(),briefId:a().nullable(),rank:z().gt(Kee).max(Jee),trim:d({start:p(),end:p()}),score:p(),title:a(),reason:a(),topic:a(),hook:a(),platforms:b(a()),format:a(),caption:a(),hashtags:b(a()),textOverlays:b(a()),editingNotes:a(),motionStyle:d({textAnimation:a(),transitions:a(),colorMood:a(),captionStyle:a()}),visualTreatment:b(d({time:v([p(),a()]),visual:a()})),brollSuggestions:b(d({moment:a(),searchTerms:b(a()),rationale:a()})),thumbnailConcept:a()}).describe("Single ranked clip suggestion.");var Hee=d({status:f(["idle","generating","completed","failed"]),createdAt:a().nullable(),analyzedAt:a().nullable(),jobId:a().nullable(),topics:b(a()),suggestions:b(ab),pagination:$e}).describe("GET /media/:id/suggestions envelope.");var Xee=d({status:f(["queued","running","complete","failed"]),alreadyRunning:R().optional()}).describe("POST /media/:id/suggestions response.");var Yee=1e3,Qee=0,ete=0,tte=256,ote=256,rte=0,nte=0,ite=256,ste=12e3,ate=d({words:b(d({text:a().min(1).max(Yee),timelineStart:p().min(Qee),timelineEnd:p().min(ete),clipId:a().min(1).max(tte),poolItemId:a().min(1).max(ote),sourceStart:p().min(rte),sourceEnd:p().min(nte),speakerId:v([a().max(ite),J()])})).min(1).max(ste)}).describe("A bounded merged timeline transcript for CueFrame edit analysis. The server selects the model; clients cannot provide a provider, API key, or model override.");var cte=0,pte=9007199254740991,dte=0,lte=9007199254740991,ute=0,mte=9007199254740991,hte=d({fillers:b(z().min(cte).max(pte)),silenceGaps:b(z().min(dte).max(lte)),emphasis:b(z().min(ute).max(mte))}).describe("CueFrame-model analysis of timeline word indices. Every returned index refers to the request's words array.");var fte=64,gte=new RegExp("^[a-z][a-z0-9_]*$"),xte=0,yte=1,bte=500,Ste=10,zte=d({scores:b(d({name:a().min(1).max(fte).regex(gte),value:p().min(xte).max(yte),comment:a().max(bte).optional()})).min(1).max(Ste)}).describe("POST /traces/:traceId/scores body.");var vte=-9007199254740991,wte=9007199254740991,Ite=d({accepted:z().min(vte).max(wte)}).describe("POST /traces/:traceId/scores response.");var kte=0,$te=0,Tte=d({task:f(["summary","chapters","highlights"]).describe("What to ask of the transcript. `summary` \u2014 prose: the argument plus the concrete takeaways as bullets. `chapters` \u2014 one line per subject change, `[h:mm:ss] Title \u2014 description`. `highlights` \u2014 up to 8 standalone moments, strongest first, one line each as `[h:mm:ss]-[h:mm:ss] Title \u2014 why it lands` plus the line that carries it. Every timestamp is ABSOLUTE seconds from the start of the media, including when you pass a `window`, and every one is verified against the transcript before you see it \u2014 but they are LINE-START markers about 15s apart, so treat a span as APPROXIMATE (up to 15s early) and refine it against the word timings from GET /v1/media/{id}/context before you cut."),window:d({startSec:p().min(kte).describe("Window start, SECONDS from the start of the media."),endSec:p().min($te).describe("Window end, SECONDS from the start of the media.")}).optional().describe("Analyse only this slice of the transcript. Omit to analyse all of it. Words are windowed exactly as captions.fromTranscript windows them (a word straddling an edge is clamped, a word wholly outside is dropped). Use this when a long recording is rejected with `transcript_too_long`, and to chapter a single segment of a podcast without paying for the whole thing.")}).describe("One editorial question about a media item's transcript.");var Pte=d({task:f(["summary","chapters","highlights"]).describe("Echo of the requested task \u2014 so a batched caller can pair answers to asks."),result:a().describe("The answer, as text. `summary` is prose; `chapters` and `highlights` are one record per LINE in the shape documented on the request's `task` field \u2014 split on newlines to parse them. Timestamps are absolute seconds from the start of the media and every one is CHECKED against the transcript before the response is returned (a fabricated timestamp fails the call rather than shipping), but they are line-start markers about 15s apart \u2014 a boundary can sit up to 15s BEFORE the moment you want. Use them to locate, not to cut: refine against the word timings in GET /v1/media/{id}/context.")}).describe("The analysis of one media item's transcript. Metered: this is a real LLM call, billed on measured token spend, so it is not a read to poll.");var Cte=-9007199254740991,Ote=9007199254740991,Rte=d({token:a(),expiresAt:z().min(Cte).max(Ote).describe("Expiry, ms since epoch (~30 min TTL).")}).describe("POST /uploads/token response: a short-lived token for the signed upload lane (the upload-signing worker's `uppy-auth-token` header). The org is derived from the session server-side and stamped into the token.");var cb=d({featureId:a().describe("The metered plan feature (exports, compose, compose_verify, \u2026)."),value:p().optional().describe("Metered amount, in the feature's own unit (exports = render-minutes, storage = GB). Absent for a discrete single use, AND deliberately absent on the cost-plus lines (compose, generate, ai_tokens, compose_verify) whose internal metered unit is not a quantity \u2014 read `listUsd` for what those events cost you."),projectId:a().optional(),jobId:a().optional().describe("The job/render/compose/media id that produced the meter."),jobKind:a().optional().describe("render | compose | consult_* | verify | preview | generate | session_uptime | \u2026"),listUsd:p().optional().describe("LIST price of this metered event, USD. Honest naming: the invoice may zero it inside a plan allowance \u2014 this is the event's list price, not a Stripe line item."),createdAt:p().describe("Epoch-ms when the meter landed.")});var Mte=d({data:b(cb),pagination:$e});var Obe=d({valid:R(),errors:b(d({code:a(),stage:a(),category:a(),retryable:R(),message:a(),fix:k(a(),O()).optional()})),advisories:b(d({rule:a(),criterion:a(),clipId:a().optional(),detail:a(),fix:a()})).describe("Deterministic, render-free QUALITY floors (the SAME named defects the Director's in-loop verify and score_composition surface: static-hold, caption-spine, sfx-density, sfx-speech-collision, bed-coverage, audio-role). NON-blocking \u2014 they never flip `valid` (an editorially-weak composition still renders); fix them for quality, not to save. Empty when the composition is clean or the wire shape failed (they need a parsed composition)."),quote:d({thisStepUsd:p(),jobSpendSoFarUsd:p(),estimatedJourneyTotalUsd:p()}).describe("The A2 money triple for the commodity lane: validate is free; estimatedJourneyTotalUsd is the render price to finish from a valid composition \u2014 relay it BEFORE create_render.")});var bt=f(["media.transcribed","media.completed","suggest.completed","session.mux.complete","session.mux.failed","render.completed","compose.completed","checkpoint.ready","project.updated","composition.updated","webhook.test"]);var Ete=0,Dte=6e4,Ate=d({url:a().min(1),events:b(bt).min(1),settleMs:z().min(Ete).max(Dte).optional()}).describe("POST /webhooks body.");var _te=0,Lte=9007199254740991,jte=d({id:a(),url:ke(),events:b(bt),settleMs:z().min(_te).max(Lte),enabled:R(),status:f(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed, inactive."),secret:a().describe("Standard Webhooks signing secret, format `whsec_<base64>`. Returned ONCE at create; rotate = delete + recreate. Every delivery carries `webhook-id`, `webhook-timestamp` (unix seconds), and `webhook-signature: v1,<base64>` (HMAC-SHA256 over `{id}.{timestamp}.{rawBody}`). Verify with any Standard-Webhooks library (`standardwebhooks` / `svix`): `new Webhook(secret).verify(rawBody, headers)`."),verification:d({status:x("pending"),reason:a()}).optional().describe('Present ONLY when ownership verification did not complete (status:"pending"). CueFrame POSTs a signed `webhook.verify` challenge whose `data.token` your endpoint must echo in a 2xx to activate; `reason` is one of token_not_echoed | non_2xx_<code> | unreachable | ssrf_blocked. A pending webhook receives no events \u2014 fix the receiver and POST /webhooks/:id/verify (no delete/recreate needed). See GET /webhooks/events for the full contract.')}).describe("POST /webhooks response (secret present exactly once).");var Fte=d({delivery:k(a(),O()).describe("The shared HTTP envelope + headers + retry semantics."),signing:k(a(),O()).describe("Standard Webhooks signing: secret format, signed content, how to verify."),ownershipVerification:k(a(),O()).describe("The synchronous echo-the-token activation handshake + recovery."),events:b(d({event:bt,when:a(),data:k(a(),a())})).describe("Every subscribable event with its exact delivery `data` fields."),sample:k(a(),O()).describe("A fully-worked example delivery (headers + body).")}).describe("The webhook delivery/signing/verification contract, as data. Read this before building a receiver.");var Nte=0,Vte=9007199254740991,Ute=0,Bte=9007199254740991,Bu=d({id:a(),url:ke(),events:b(bt),settleMs:z().min(Nte).max(Vte),enabled:R(),verificationStatus:f(["pending","verified"]).describe("pending = callback URL has not echoed the ownership challenge (receives no events); verified = ownership proven."),createdAt:a(),lastDeliveredAt:a().nullable(),lastFailedAt:a().nullable(),consecutiveFailures:z().min(Ute).max(Bte)}).describe("Webhook endpoint record (secret omitted after create).");var qte=d({data:b(Bu),pagination:$e});var Wte=0,Zte=6e4,Gte=d({url:a().min(1).optional(),events:b(bt).min(1).optional(),settleMs:z().min(Wte).max(Zte).optional(),enabled:R().optional()}).describe("PATCH /webhooks/:id body.");var Kte=d({deliveryId:a(),status:x("queued")}).describe("POST /webhooks/:id/test response.");var Jte=d({id:a(),status:f(["active","pending"]).describe("active = ownership verified + receiving events; pending = challenge not echoed."),verification:d({status:x("pending"),reason:a()}).optional().describe("Present only when the re-challenge did not verify; `reason` names why (see WebhookCreateResponse.verification).")}).describe("POST /webhooks/:id/verify response.");var Hte=d({orgId:a(),permissions:k(a(),b(a())),keyId:a(),keyName:a()}).describe("Whoami response.");var Jbe=d({x402Version:x(2),accepts:b(Wt({})).describe("Accepted payment requirements. Read `accepts[0]` for scheme (`exact` for a fixed price, `upto` for a measured one), network (CAIP-2), asset, amount and payTo."),error:a().optional().describe("Human-readable reason.")}).describe("x402 v2 PaymentRequired challenge \u2014 the body of a 402 on a priced operation.");var qu=xy;var Xte=A({id:a()});var Yte=A({id:a()});var Qte=A({id:a()});var eoe=A({id:a()});var toe=A({id:a()}),ooe=Le();var roe=A({id:a()});var noe=A({id:a()});var ioe=A({id:a()});var soe=A({id:a()});var aoe=A({id:a()}),coe=d({suggestionId:a().min(1),format:d({aspectRatio:f(["16:9","9:16","1:1","4:5"]),fps:v([x(24),x(25),x(30),x(60)]).optional(),resolution:f(["hd","fhd","4k"]).optional(),platform:a().optional()}).optional()}),poe=O(),doe=A({id:a()});var loe=A({id:a()});var uoe=A({id:a()}),moe=O();var hoe=100,foe=A({category:f(["text","effects","transitions","layouts","backgrounds","ui-blocks","scenes"]).optional().describe("Filter to one category bucket (text|effects|transitions|layouts|backgrounds|ui-blocks|scenes)."),kind:f(["component","transition","scene"]).optional().describe("Filter by render kind (component|transition|scene)."),tier:f(["recommended","standard","niche"]).optional().describe("Filter by curation tier (recommended|standard|niche)."),useCase:f(["intro","outro","full-scene","title-over-footage","transition","background","grade","emphasis","explainer","social-cut"]).optional().describe("Filter to entries whose useCase includes this edit role (e.g. intro, title-over-footage, grade)."),mood:a().optional().describe("Filter to entries whose mood tags include this value (e.g. cinematic, minimal)."),q:a().optional().describe("Free-text match across id/name/description/intent/useWhen/tags/mood. Recommend-orders results."),intent:a().optional().describe("Alias of `q` framed as recommend-by-intent (e.g. intent=intro). Recommend-orders results."),limit:z().min(1).max(hoe).optional().describe("Page size (1..100). Omit to return the whole filtered catalog in one page."),after:a().optional().describe("Opaque cursor from a previous page's nextCursor (forward-only).")});var Wu=Sy;var goe=A({id:a()});var xoe=A({id:a()});var yoe=A({id:a()});var boe=A({id:a()});var Soe=A({id:a(),composeJobId:a()}),zoe=O(),voe=A({id:a(),composeJobId:a()});var woe=A({id:a(),composeJobId:a()});var Ioe=A({id:a()});var koe=A({id:a(),composeJobId:a()});var $oe=A({id:a()}),Toe=64,Poe=d({seedComposition:O().optional(),leaseJobId:a().min(1).max(Toe).optional()}),Coe=A({sessionId:a()}),Ooe=A({id:a(),sessionId:a()}),Roe=A({composition:O()}),Moe=A({id:a(),sessionId:a()}),Eoe=A({ok:R()}),Doe=A({id:a(),sessionId:a()}),Aoe=A({etag:a()});var _oe=A({id:a()});var Loe=A({id:a()});var joe=O(),Foe=A({id:a()});var Noe=Le(),Voe=A({id:a()});var Uoe=A({id:a()});var Boe=O(),qoe=A({id:a()});var Woe=O(),Zoe=A({id:a()});var Goe=A({valid:R(),errors:b(A({code:a(),stage:a(),category:a(),retryable:R(),message:a(),fix:k(a(),O()).optional()})),advisories:b(A({rule:a(),criterion:a(),clipId:a().optional(),detail:a(),fix:a()})).describe("Deterministic, render-free QUALITY floors (the SAME named defects the Director's in-loop verify and score_composition surface: static-hold, caption-spine, sfx-density, sfx-speech-collision, bed-coverage, audio-role). NON-blocking \u2014 they never flip `valid` (an editorially-weak composition still renders); fix them for quality, not to save. Empty when the composition is clean or the wire shape failed (they need a parsed composition)."),quote:A({thisStepUsd:p(),jobSpendSoFarUsd:p(),estimatedJourneyTotalUsd:p()}).describe("The A2 money triple for the commodity lane: validate is free; estimatedJourneyTotalUsd is the render price to finish from a valid composition \u2014 relay it BEFORE create_render.")}),Koe=A({id:a(),compositionId:a()}),Joe=Le();var Hoe=A({id:a()});var Xoe=A({criticId:a()}),Yoe=Le();var Qoe=A({id:a()}),ere=d({composition:O().optional().describe("The composition to judge. Absent \u21D2 the project's ACTIVE composition."),compositionId:a().optional().describe("Judge a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:a().optional().describe("Compose-session id: judge that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),editorialIntent:a().optional(),brandContext:a().optional()});var tre=A({id:a()}),ore=.1,rre=1,nre=100,ire=d({composition:O().optional().describe("The composition to render. Absent \u21D2 the project's ACTIVE composition \u2014 what create_render will encode. The response's `previewed.source` names what was rendered."),compositionId:a().optional().describe("Preview a SPECIFIC persisted composition of this project (create_render parity). Absent \u21D2 the active one. A stale/foreign id is a 404 \u2014 never a silent fall-through."),session_id:a().optional().describe("Compose-session id: render that session's SCRATCH composition (what the session has been editing) instead of the active row. Ignored when `composition` is passed."),timestamps:b(p()).min(1),imageFormat:f(["png","jpeg"]).optional().describe("Still format. Default jpeg \u2014 these pixels go to a vision model, where jpeg is equivalent and png costs multiples in bytes to store and move. Pass png only when you need full fidelity."),scale:p().min(ore).max(rre).optional().describe("Render scale 0.1\u20131. Default 0.5, which is what this schema has always recommended for vision-bound looks. Pass 1 when judging fine detail \u2014 it costs ~4x the vision tokens."),jpegQuality:z().min(1).max(nre).optional().describe("JPEG quality (jpeg only). Default 70 \u2014 the quality the eval panel grades at.")});var sre=A({id:a()}),are=0,cre=9007199254740991,pre=0,dre=9007199254740991,lre=0,ure=120,mre=3600,hre=d({componentId:a().min(1),params:k(a(),O()).optional(),assets:k(a(),a().min(1)).optional().describe("Component asset-slot name to org mediaId. Every required manifest slot must be bound."),width:z().gt(are).max(cre).optional(),height:z().gt(pre).max(dre).optional(),fps:p().gt(lre).max(ure).optional().describe("Preview frame rate. When omitted, uses the project's format."),durationInFrames:z().min(1).max(mre).optional().describe("Preview frame count. When omitted, uses the component's declared duration; required if the component has none.")});var fre=A({id:a()});var gre=A({id:a()});var xre=A({id:a(),exportId:a()});var yre=A({id:a(),exportId:a()});var bre=Wt({});var Sre=A({jobId:a()});var zre=A({jobId:a()});var vre=10,wre=25,Ire=A({q:a().min(1).describe("What the moment should look like, in plain language. Describe the IMAGE, not the words spoken."),limit:z().min(1).max(wre).default(vre).describe("Maximum moments to return. Default 10, maximum 25.")});var kre=d({projectId:a().optional().describe("Optional project to scope the token to; omitted = org library.")});var $re=A({id:a()});var Tre=A({id:a()}),Pre=Le(),Cre=A({id:a()});var Ore=A({id:a()}),Rre=0,Mre=0,Ere=100,Dre=A({after:z().min(Rre).optional().describe("Return utterances after this zero-based index."),before:z().min(Mre).optional().describe("Return utterances before this zero-based index."),limit:z().min(1).max(Ere).optional().describe("Maximum utterances to return when paginating.")});var Are=A({id:a()});var _re=A({id:a()});var Lre=A({id:a()});var jre=A({id:a()}),Fre=A({kind:f(["subjectTrack","matte"]).optional().describe("Resolve one exact editor prerequisite. Requires startSec and endSec; the response includes the server-selected `exact` result."),startSec:p().optional().describe("Source-in of the clip's trim, in seconds. Must be sent WITH endSec \u2014 one without the other is a 400, never a silent whole-source default."),endSec:p().optional().describe("Source-out of the clip's trim, in seconds. Must be sent WITH startSec.")});var Nre=A({id:a()});var Vre=A({id:a()});var Ure=A({id:a()});var Bre=A({id:a()});var qre=A({id:a()}),Wre=Le(),Zre=A({id:a()});var Gre=A({id:a()});var Kre=A({id:a()});var Jre=A({id:a()});var Hre=A({id:a(),renderId:a()});var Xre=A({id:a(),renderId:a()});var Yre=A({id:a(),renderId:a()});var Qre=A({id:a(),renderId:a()});var ene=A({id:a(),renderId:a()}),tne=O();var one=A({id:a()});var rne=A({id:a()});var nne=A({id:a()});var ine=A({id:a()}),sne=Le(),ane=A({id:a()});var cne=A({id:a()});var pne=A({name:a()}),dne=O();var lne=A({traceId:a()});var une=A({id:a()});var mne=A({id:a()});var hne=A({id:a()}),fne=Le(),gne=A({id:a()});var xne=A({id:a()});var yne=2048,bne=d({videoUrl:ke().max(yne),format:ve.optional()}),Sne=A({projectId:a(),mediaId:a()});var pb={version:2,assets:{},graphics:{api:"canvas2d",required:!0,accelerationPreference:"software-allowed"},alphaPolicy:"requires-transparency"};function db(r,e){let t=wne(r.root,"cueframe.json");if(!zne(t))throw Object.assign(new Error("No cueframe.json workspace manifest was found."),{code:"no_component_manifest"});let n=JSON.parse(vne(t,"utf8")),o=Wu.shape.manifest.safeParse(n.components?.[e]?.manifest);if(!o.success)throw Object.assign(new Error(`Component "${e}" has no valid contract-v2 manifest at cueframe.json components.${e}.manifest.`),{code:"no_component_manifest"});return o.data}var Pne="cueframe.json";function Cne(r){return r.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join("")}function One(r){return r.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function Zu(r,e){G(r,"new_component",new Error(e),j.UserError),L(j.UserError)}function Rne(r,e){return`import React from 'react';
81
+
82
+ /** Custom CueFrame component. Mounted through component contract v2. Edit me. */
83
+ export default function ${e}({ params }: { durationInFrames: number; params: Record<string, unknown>; assets: Record<string, unknown>; render: { frame: number; fps: number; width: number; height: number; seed: string; colorSpace: 'srgb' } }) {
84
+ return <div style={{ width: '100%', height: '100%', display: 'grid', placeItems: 'center' }}>{String((params as { text?: unknown }).text ?? '${r}')}</div>;
20
85
  }
21
- `}function Fo(t,e){return`import { z } from 'zod';
86
+ `}function Mne(r,e){return`import { z } from 'zod';
22
87
  import component from './index';
23
88
 
24
89
  const paramsSchema = z.object({}).passthrough();
25
90
 
26
91
  export const config = {
27
- id: '${t}',
92
+ id: '${r}',
28
93
  component,
29
94
  name: '${e}',
30
95
  category: 'ui-blocks',
@@ -33,29 +98,33 @@ export const config = {
33
98
  paramsSchema,
34
99
  };
35
100
  export default config;
36
- `}function Qt(t,e){R(t,"name",e);let r=e.dryRun??!1,n=e.force??!1,o=No(t);o||yt(e,`name "${t}" has no alphanumeric characters to form a component identifier.`);let s=Mo(t);h(e,"new_component_prepare",{name:t,dryRun:r,force:n});let i=ze(process.cwd());i||yt(e,"No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first to scaffold one.");let a=rt(i,t),u=Ro(a);u&&Io(a).length>0&&!n&&yt(e,`Component dir ${a} already exists and is non-empty. Pass --force to overwrite (this replaces local source).`);let d={"index.tsx":Uo(t,o),"config.ts":Fo(t,s)};if(!r){Oo(a,{recursive:!0});for(let[I,ne]of Object.entries(d))Yt(Xt(a,I),ne);let c=Xt(i.root,Po),l=JSON.parse(Ao(c,"utf8")),S=l.components??{};S[t]={custom:!0},l.components=S,Yt(c,`${JSON.stringify(l,null,2)}
37
- `)}$(e,{ok:!0,dryRun:r,name:t,component:o,dir:a,files:Object.keys(d),overwritten:u&&n},()=>{console.log(`\u2713 ${r?"Would scaffold":"Scaffolded"} custom component ${t} (${o}) into ${a}`);for(let l of Object.keys(d))console.log(` ${r?"would write":"wrote"} ${l}`);r||console.log(` stamped cueframe.json components.${t} (custom)`),console.log("Edit index.tsx, then `cueframe push "+t+"` to publish it to CueFrame.")})}import{existsSync as ot,readFileSync as st}from"fs";import{join as it}from"path";import N from"typescript";var Do="cueframe.json",Lo=["effects","transitions","text","layouts"];function zo(t){return Lo.includes(t??"")?t:"layouts"}function Zo(t){let e=t;for(;N.isAsExpression(e)||N.isParenthesizedExpression(e)||typeof N.isSatisfiesExpression=="function"&&N.isSatisfiesExpression(e);)e=e.expression;return e}function Wo(t,e){for(let r of t.statements)if(N.isImportDeclaration(r)&&N.isStringLiteral(r.moduleSpecifier)&&r.moduleSpecifier.text===e)return!0;return!1}function er(t,e){let r=N.createSourceFile(e,t,N.ScriptTarget.Latest,!0,N.ScriptKind.TS),n;for(let s of r.statements)if(N.isVariableStatement(s)){for(let i of s.declarationList.declarations)if(N.isIdentifier(i.name)&&i.name.text==="config"&&i.initializer){let a=Zo(i.initializer);N.isObjectLiteralExpression(a)&&(n=a)}if(n)break}let o={};if(!n)return o;for(let s of n.properties){if(!N.isPropertyAssignment(s)||!(N.isIdentifier(s.name)||N.isStringLiteral(s.name)))continue;let i=s.name.text;N.isStringLiteralLike(s.initializer)&&(i==="name"?o.name=s.initializer.text:i==="category"?o.category=s.initializer.text:i==="version"&&(o.version=s.initializer.text))}return o}function Vo(t){let e=it(t,"config.ts");if(!ot(e))return{};let r=st(e,"utf8"),n=N.createSourceFile("config.ts",r,N.ScriptTarget.Latest,!0,N.ScriptKind.TS),o=it(t,"_config.ts");return Wo(n,"./_config")&&ot(o)?er(st(o,"utf8"),"_config.ts"):er(r,"config.ts")}function Bo(t){return t.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function qo(t,e){let r=it(t.root,Do);if(ot(r))try{let o=JSON.parse(st(r,"utf8")).components?.[e]?.ejectedFrom;return typeof o=="string"&&o.length>0?o:void 0}catch{return}}var nt="none \u2014 params are unvalidated server-side";async function tr(t,e,r){let n=rt(t,e),o=it(n,"index.tsx");if(!ot(o))throw Object.assign(new Error(`Component "${e}" has no index.tsx at ${n}. Scaffold it first (cueframe eject / new component).`),{code:"no_component_source"});let s=st(o,"utf8"),i=Vo(n),a=i.name??Bo(e),u=zo(i.category),d=qo(t,e),c=`Custom component "${e}" pushed from the local CueFrame workspace.`,l={type:"object",properties:{}};h(r,"push_component",{id:e,name:a,category:u,version:i.version,ejectedFrom:d,propSchema:nt});let S=!1;try{await Ve.getComponent(e),S=!0}catch(I){if(I instanceof Z&&I.status===404)S=!1;else throw I}return S?(await Ve.updateComponent(e,{tsxSource:s,name:a,description:c,category:u,propSchema:l,origin:"repo-owned",...d?{ejectedFrom:d}:{}}),h(r,"pushed",{id:e,action:"updated"}),{id:e,action:"updated",name:a,category:u,propSchema:nt}):(await Ve.createComponent({componentId:e,tsxSource:s,name:a,description:c,category:u,propSchema:l,origin:"repo-owned",...d?{ejectedFrom:d}:{}}),h(r,"pushed",{id:e,action:"created"}),{id:e,action:"created",name:a,category:u,propSchema:nt})}async function rr(t,e){t||(x(e,"push",new Error("Pass a component id (cueframe push <id>), or use `cueframe sync` to push all."),p.UserError),m(p.UserError)),R(t,"id",e),T(e.target);let r=ze(process.cwd());r||(x(e,"push",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),p.UserError),m(p.UserError)),h(e,"push_prepare",{id:t,target:e.target});try{let n=await tr(r,t,e);$(e,{ok:!0,target:e.target,...n},()=>{console.log(`\u2713 ${n.action} component ${n.id} (${n.name}) on CueFrame`),console.log(` propSchema: ${n.propSchema}`)})}catch(n){let o=n.code==="no_component_source"?p.UserError:_(n);x(e,"push",n,o),m(o)}}async function nr(t){T(t.target);let e=ze(process.cwd());e||(x(t,"sync",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),p.UserError),m(p.UserError));let r=Kt(e);h(t,"sync_prepare",{target:t.target,count:r.length,ids:r});let n=[],o=[];for(let s of r)try{n.push(await tr(e,s,t))}catch(i){let a=i.code==="no_component_source"?p.UserError:_(i);A(t,"sync",i,a),o.push({id:s,error:i})}$(t,{ok:o.length===0,target:t.target,pushed:n,failed:o.map(s=>({id:s.id,error:O(s.error)}))},()=>{if(n.length===0&&o.length===0){console.log("No components to sync. Scaffold one with `cueframe eject` or `cueframe new component`.");return}for(let s of n)console.log(`\u2713 ${s.action} ${s.id} (${s.name})`);n.length>0&&console.log(` propSchema: ${nt}`);for(let s of o)console.error(`\u2716 ${s.id}: ${O(s.error)}`);console.log(`Synced ${n.length}/${r.length} component(s) to CueFrame.`)}),o.length>0&&m(_(o[0].error))}var at=["media","sessions","projects","renders","webhooks"],or={readonly:Object.fromEntries(at.map(t=>[t,["read"]])),editall:Object.fromEntries(at.map(t=>[t,["read","write"]]))};function Jo(t){if(t.preset){let e=or[t.preset];return e||(console.error(`Unknown --preset "${t.preset}". Valid: ${Object.keys(or).join(", ")}.`),m(p.UserError)),e}if(t.scope)return Go(t.scope);console.error("Provide --scope or --preset (e.g. --preset readonly | editall)."),m(p.UserError)}function Go(t){let e={};for(let r of t.split(",").map(n=>n.trim()).filter(Boolean)){let[n,o]=r.split(":");(!n||!o)&&(console.error(`Invalid --scope "${r}". Use resource:rw (e.g. renders:rw,media:r).`),m(p.UserError)),at.includes(n)||(console.error(`--scope "${r}": unknown resource "${n}". Valid: ${at.join(", ")}.`),m(p.UserError));let s=[];/r/i.test(o)&&s.push("read"),/w/i.test(o)&&s.push("write"),s.length===0&&(console.error(`--scope "${r}": actions must include r and/or w.`),m(p.UserError)),e[n]=s}return Object.keys(e).length===0&&(console.error("--scope is required, e.g. --scope media:rw,projects:rw,renders:rw"),m(p.UserError)),e}async function sr(t){T(t.target);let e=Jo(t),r={name:t.name,permissions:e};if(t.expires){let n=Number(t.expires);(!Number.isFinite(n)||n<=0)&&(console.error("--expires must be a positive number of days."),m(p.UserError)),r.expiresIn=Math.round(n*86400)}try{let n=await Ct("/v1/api-keys",{method:"POST",body:JSON.stringify(r),headers:{"content-type":"application/json"}});$(t,{ok:!0,id:n.id,prefix:n.prefix,start:n.start,key:n.key},()=>{let o=Object.entries(e).map(([s,i])=>`${s}:${i.map(a=>a[0]).join("")}`).join(" ");console.log(`\u2713 API key "${t.name}" created \u2014 scopes: ${o}`),console.log(`
101
+ `}function mb(r,e){we(r,"name",e);let t=e.dryRun??!1,n=e.force??!1,o=Cne(r);o||Zu(e,`name "${r}" has no alphanumeric characters to form a component identifier.`);let i=One(r);B(e,"new_component_prepare",{name:r,dryRun:t,force:n});let s=an(process.cwd());s||Zu(e,"No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first to scaffold one.");let c=Es(s,r),u=Ine(c);u&&Tne(c).length>0&&!n&&Zu(e,`Component dir ${c} already exists and is non-empty. Pass --force to overwrite (this replaces local source).`);let m={"index.tsx":Rne(r,o),"config.ts":Mne(r,i)};if(!t){kne(c,{recursive:!0});for(let[S,w]of Object.entries(m))lb(ub(c,S),w);let h=ub(s.root,Pne),g=JSON.parse($ne(h,"utf8")),y=g.components??{};y[r]={custom:!0,manifest:pb},g.components=y,lb(h,`${JSON.stringify(g,null,2)}
102
+ `)}pe(e,{ok:!0,dryRun:t,name:r,component:o,dir:c,files:Object.keys(m),overwritten:u&&n},()=>{console.log(`\u2713 ${t?"Would scaffold":"Scaffolded"} custom component ${r} (${o}) into ${c}`);for(let g of Object.keys(m))console.log(` ${t?"would write":"wrote"} ${g}`);t||console.log(` stamped cueframe.json components.${r} (custom)`),console.log("Edit index.tsx, then `cueframe push "+r+"` to publish it to CueFrame.")})}import{existsSync as Fs,readFileSync as Ns}from"fs";import{join as Vs}from"path";import De from"typescript";var Ene="cueframe.json",Dne=["effects","transitions","text","layouts"];function Ane(r){return Dne.includes(r??"")?r:"layouts"}function _ne(r){let e=r;for(;De.isAsExpression(e)||De.isParenthesizedExpression(e)||typeof De.isSatisfiesExpression=="function"&&De.isSatisfiesExpression(e);)e=e.expression;return e}function Lne(r,e){for(let t of r.statements)if(De.isImportDeclaration(t)&&De.isStringLiteral(t.moduleSpecifier)&&t.moduleSpecifier.text===e)return!0;return!1}function hb(r,e){let t=De.createSourceFile(e,r,De.ScriptTarget.Latest,!0,De.ScriptKind.TS),n;for(let i of t.statements)if(De.isVariableStatement(i)){for(let s of i.declarationList.declarations)if(De.isIdentifier(s.name)&&s.name.text==="config"&&s.initializer){let c=_ne(s.initializer);De.isObjectLiteralExpression(c)&&(n=c)}if(n)break}let o={};if(!n)return o;for(let i of n.properties){if(!De.isPropertyAssignment(i)||!(De.isIdentifier(i.name)||De.isStringLiteral(i.name)))continue;let s=i.name.text;De.isStringLiteralLike(i.initializer)&&(s==="name"?o.name=i.initializer.text:s==="category"?o.category=i.initializer.text:s==="version"&&(o.version=i.initializer.text))}return o}function jne(r){let e=Vs(r,"config.ts");if(!Fs(e))return{};let t=Ns(e,"utf8"),n=De.createSourceFile("config.ts",t,De.ScriptTarget.Latest,!0,De.ScriptKind.TS),o=Vs(r,"_config.ts");return Lne(n,"./_config")&&Fs(o)?hb(Ns(o,"utf8"),"_config.ts"):hb(t,"config.ts")}function Fne(r){return r.split(/[^a-zA-Z0-9]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Nne(r,e){let t=Vs(r.root,Ene);if(Fs(t))try{let o=JSON.parse(Ns(t,"utf8")).components?.[e]?.ejectedFrom;return typeof o=="string"&&o.length>0?o:void 0}catch{return}}var js="none \u2014 params are unvalidated server-side";function fb(r){let e=r.code;return e==="no_component_source"||e==="no_component_manifest"?j.UserError:K(r)}async function gb(r,e,t){let n=Es(r,e),o=Vs(n,"index.tsx");if(!Fs(o))throw Object.assign(new Error(`Component "${e}" has no index.tsx at ${n}. Scaffold it first (cueframe eject / new component).`),{code:"no_component_source"});let i=Ns(o,"utf8"),s=jne(n),c=s.name??Fne(e),u=Ane(s.category),m=Nne(r,e),h=db(r,e),g=`Custom component "${e}" pushed from the local CueFrame workspace.`,y={type:"object",properties:{}};B(t,"push_component",{id:e,name:c,category:u,version:s.version,ejectedFrom:m,propSchema:js});let S=!1;try{await Ot.getComponent(e),S=!0}catch(w){if(w instanceof We&&w.status===404)S=!1;else throw w}return S?(await Ot.updateComponent(e,{tsxSource:i,name:c,description:g,category:u,propSchema:y,origin:"customer-owned",manifest:h,...m?{ejectedFrom:m}:{}}),B(t,"pushed",{id:e,action:"updated"}),{id:e,action:"updated",name:c,category:u,propSchema:js}):(await Ot.createComponent({componentId:e,tsxSource:i,name:c,description:g,category:u,propSchema:y,origin:"customer-owned",manifest:h,...m?{ejectedFrom:m}:{}}),B(t,"pushed",{id:e,action:"created"}),{id:e,action:"created",name:c,category:u,propSchema:js})}async function xb(r,e){r||(G(e,"push",new Error("Pass a component id (cueframe push <id>), or use `cueframe sync` to push all."),j.UserError),L(j.UserError)),we(r,"id",e),ae(e.target);let t=an(process.cwd());t||(G(e,"push",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),j.UserError),L(j.UserError)),B(e,"push_prepare",{id:r,target:e.target});try{let n=await gb(t,r,e);pe(e,{ok:!0,target:e.target,...n},()=>{console.log(`\u2713 ${n.action} component ${n.id} (${n.name}) on CueFrame`),console.log(` propSchema: ${n.propSchema}`)})}catch(n){let o=fb(n);G(e,"push",n,o),L(o)}}async function yb(r){ae(r.target);let e=an(process.cwd());e||(G(r,"sync",new Error("No CueFrame workspace found (no cueframe.json up-tree). Run `cueframe init` first."),j.UserError),L(j.UserError));let t=my(e);B(r,"sync_prepare",{target:r.target,count:t.length,ids:t});let n=[],o=[];for(let i of t)try{n.push(await gb(e,i,r))}catch(s){let c=fb(s);Ce(r,"sync",s,c),o.push({id:i,error:s})}pe(r,{ok:o.length===0,target:r.target,pushed:n,failed:o.map(i=>({id:i.id,error:ze(i.error)}))},()=>{if(n.length===0&&o.length===0){console.log("No components to sync. Scaffold one with `cueframe eject` or `cueframe new component`.");return}for(let i of n)console.log(`\u2713 ${i.action} ${i.id} (${i.name})`);n.length>0&&console.log(` propSchema: ${js}`);for(let i of o)console.error(`\u2716 ${i.id}: ${ze(i.error)}`);console.log(`Synced ${n.length}/${t.length} component(s) to CueFrame.`)}),o.length>0&&L(K(o[0].error))}var Us=["media","sessions","projects","renders","webhooks"],bb={readonly:Object.fromEntries(Us.map(r=>[r,["read"]])),editall:Object.fromEntries(Us.map(r=>[r,["read","write"]]))};function Vne(r){if(r.preset){let e=bb[r.preset];return e||(console.error(`Unknown --preset "${r.preset}". Valid: ${Object.keys(bb).join(", ")}.`),L(j.UserError)),e}if(r.scope)return Une(r.scope);console.error("Provide --scope or --preset (e.g. --preset readonly | editall)."),L(j.UserError)}function Une(r){let e={};for(let t of r.split(",").map(n=>n.trim()).filter(Boolean)){let[n,o]=t.split(":");(!n||!o)&&(console.error(`Invalid --scope "${t}". Use resource:rw (e.g. renders:rw,media:r).`),L(j.UserError)),Us.includes(n)||(console.error(`--scope "${t}": unknown resource "${n}". Valid: ${Us.join(", ")}.`),L(j.UserError));let i=[];/r/i.test(o)&&i.push("read"),/w/i.test(o)&&i.push("write"),i.length===0&&(console.error(`--scope "${t}": actions must include r and/or w.`),L(j.UserError)),e[n]=i}return Object.keys(e).length===0&&(console.error("--scope is required, e.g. --scope media:rw,projects:rw,renders:rw"),L(j.UserError)),e}async function Sb(r){ae(r.target);let e=Vne(r),t={name:r.name,permissions:e};if(r.expires){let n=Number(r.expires);(!Number.isFinite(n)||n<=0)&&(console.error("--expires must be a positive number of days."),L(j.UserError)),t.expiresIn=Math.round(n*86400)}try{let n=await bh("/v1/api-keys",{method:"POST",body:JSON.stringify(t),headers:{"content-type":"application/json"}});pe(r,{ok:!0,id:n.id,prefix:n.prefix,start:n.start,key:n.key},()=>{let o=Object.entries(e).map(([i,s])=>`${i}:${s.map(c=>c[0]).join("")}`).join(" ");console.log(`\u2713 API key "${r.name}" created \u2014 scopes: ${o}`),console.log(`
38
103
  ${n.key}
39
- `),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(n){x(t,"keys_create",n,_(n)),m(_(n))}}async function ir(t){T(t.target);let e;try{e=await W("/api/auth/api-key/list",{method:"GET"})}catch(n){x(t,"keys_list",n,_(n)),m(_(n))}e.status>=400&&(x(t,"keys_list",new Error(`list failed (${e.status})`),U(e.status)),m(U(e.status)));let r=Array.isArray(e.body)?e.body:[];$(t,{ok:!0,keys:r},()=>{if(r.length===0){console.log("No API keys.");return}for(let n of r)console.log(` ${n.id} ${n.name??"(unnamed)"} ${n.start??""}\u2026`)})}async function ar(t,e){T(e.target);let r;try{r=await W("/api/auth/api-key/delete",{method:"POST",body:JSON.stringify({keyId:t}),headers:{"content-type":"application/json"}})}catch(n){x(e,"keys_revoke",n,_(n)),m(_(n))}r.status>=400&&(x(e,"keys_revoke",new Error(`revoke failed (${r.status})`),U(r.status)),m(U(r.status))),$(e,{ok:!0,revoked:t},()=>console.log(`\u2713 Revoked ${t}`))}async function cr(t){T(t.target),h(t,"list_prepare",{target:t.target});try{let e=await Se.listProjects(),r=t.limit,n=typeof r=="number"&&Number.isFinite(r)&&r>0?e.data.slice(0,r):e.data;if(h(t,"list_complete",{count:n.length,total:e.data.length,truncated:n.length<e.data.length,projects:n}),!t.json){if(e.data.length===0){console.log("No projects found.");return}for(let o of n){let s=new Date(o.createdAt).toLocaleDateString();console.log(` ${o.id} ${o.name} (${s})`)}n.length<e.data.length&&console.log(` \u2026 ${e.data.length-n.length} more (raise --limit to see all)`)}}catch(e){x(t,"list",e,_(e)),m(_(e))}}import{readFile as Ho,stat as Ko}from"fs/promises";import{existsSync as Yo}from"fs";import{basename as Xo,extname as Qo}from"path";var es=4e3,dr=1800*1e3,ur=5,lr={".mp4":"video/mp4",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".wav":"audio/wav",".mp3":"audio/mpeg",".m4a":"audio/mp4",".aac":"audio/aac",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml"};function ts(t,e){let r=Qo(t).toLowerCase(),n=lr[r];if(!n){let o=new Error(`Unsupported file extension "${r||"(none)"}" for ${t}. Supported: ${Object.keys(lr).join(", ")}.`);x(e,"preflight",o,p.UserError),m(p.UserError)}return n}var mr=["vo","music","sfx","ambience"];async function fr(t,e){Yo(t)||(x(e,"preflight",new Error(`File not found: ${t}`),p.UserError),m(p.UserError));let r=Xo(t),n=(await Ko(t)).size,o=ts(r,e);if(e.audioRole&&!mr.includes(e.audioRole)){let C=new Error(`--audio-role must be one of ${mr.join("|")} (got "${e.audioRole}")`);x(e,"preflight",C,p.UserError),m(p.UserError)}let s=e.audioRole;if(e.dryRun){h(e,"upload_dry_run",{file:r,sizeBytes:n,contentType:o,target:e.target,analyzeAfter:!!e.analyze,wouldCall:"POST /v1/media \u2192 presigned PUT \u2192 POST /v1/media/:id/finalize \u2192 poll processing"}),e.json||console.log(`[dry-run] Would upload ${r} (${(n/1024/1024).toFixed(1)} MB, ${o}) to ${e.target}.`);return}T(e.target),h(e,"upload_prepare",{file:r,sizeBytes:n,contentType:o,target:e.target});let i=P("Preparing upload\u2026",e.json),a,u;try{let C=await oe.createMediaUpload({filename:r,contentType:o,size:n});a=C.id,u=C.uploadUrl,i.succeed("Ready"),h(e,"upload_ready",{mediaItemId:a})}catch(C){i.fail(`Failed: ${O(C)}`),A(e,"upload_prepare",C,_(C)),m(_(C))}let d=Date.now(),c=P(`Uploading ${r} (${(n/1024/1024).toFixed(1)} MB)\u2026`,e.json);try{let C=await Ho(t),X=await fetch(u,{method:"PUT",headers:{"Content-Type":o},body:C});if(!X.ok)throw new Error(`presigned PUT failed: ${X.status} ${X.statusText}`);await oe.finalizeMedia(a,s?{audioRole:s}:{}),c.succeed(`Uploaded: ${r}`),h(e,"upload_complete",{mediaItemId:a,bytesUploaded:n,...s?{audioRole:s}:{},durationMs:Date.now()-d})}catch(C){c.fail(`Upload failed: ${O(C)}`),A(e,"upload",C,p.NetworkError),m(p.NetworkError)}let l=P("Processing (transcription)\u2026",e.json),S=Date.now(),I=null,ne=0;for(;;){if(await new Promise(C=>setTimeout(C,es)),Date.now()-S>dr){let C=`Processing did not complete within ${Math.round(dr/6e4)}m. Media item ID: ${a}.`;l.fail(C),A(e,"process",new Error(C),p.ApiServerError),m(p.ApiServerError)}try{let C=await oe.getMedia(a);ne=0;let X=C?.processingStatus?.phase??"unknown",dt=C?.processingStatus?.percent??null,bt=Math.round((Date.now()-S)/1e3),Br=dt!=null?` \xB7 ${Math.round(dt*100)}%`:"";if(l.text=`Processing\u2026 ${X}${Br} (${bt}s)`,h(e,"process_progress",{phase:X,percent:dt,elapsedSec:bt}),X==="complete"||X==="completed"){l.succeed(`Ready: ${a}`),I=C,h(e,"process_complete",{mediaItemId:a,durationMs:Date.now()-S,item:C});break}if(X==="error"){let Et=C?.processingStatus?.error??"unknown error";l.fail(`Processing failed: ${Et}`),A(e,"process",new Error(Et),p.ApiServerError),m(p.ApiServerError)}}catch(C){C instanceof Z&&[401,403,404].includes(C.status)&&(l.fail(`Processing check failed: ${O(C)}`),A(e,"process",C,_(C)),m(_(C))),ne++,ne>=ur&&(l.fail(`Processing check failed: ${O(C)}`),A(e,"process",new Error(`Processing status unreadable after ${ur} consecutive failures: ${O(C)}`),_(C)),m(_(C)))}}if(e.analyze){J(`
40
- Media item ID: ${a}`,e);let{analyzeCommand:C}=await import("./analyze-4EGOBMRV.js");await C(a,{target:e.target,wait:!0,json:e.json});return}e.json||$(e,{mediaItemId:a,item:I},()=>{console.log(`
41
- Media item ID: ${a}`),console.log(`
42
- Run \`cueframe analyze ${a} --target ${e.target}\` to generate clip suggestions.`)})}function vt(t){let e=Math.floor(t/60),r=Math.floor(t%60);return`${e}:${String(r).padStart(2,"0")}`}async function pr(t,e){t!==void 0&&R(t,"mediaItemId",e),T(e.target),h(e,"clips_prepare",{target:e.target,mode:t?"suggestions":"media-list",...t?{mediaItemId:t}:{}});try{if(!t){let n=await oe.listMedia();if(h(e,"clips_complete",{mode:"media-list",count:n.data.length,media:n.data}),!e.json){if(n.data.length===0){console.log("No media items found. Import a video first.");return}console.log("Media items (pass the ID to `cueframe clips <id>`):"),console.log("");for(let o of n.data){let s=o.duration?`${vt(o.duration)} `:"",i=o.processingStatus?.phase??"unknown",a=i==="complete"?"":` [${i}]`;console.log(` ${o.id} ${o.name} ${s}${a}`)}}return}let r=await $t.listMediaSuggestions(t);if(h(e,"clips_complete",{mode:"suggestions",mediaItemId:t,count:r.suggestions.length,suggestions:r.suggestions}),!e.json){if(r.suggestions.length===0){console.log("No clip suggestions found for this media item."),console.log("If analysis is still running, try again shortly. Otherwise the video may not have suitable clips.");return}console.log(`${r.suggestions.length} clip suggestion${r.suggestions.length!==1?"s":""}:`),console.log("");for(let n of r.suggestions){let o=`${vt(n.trim.start)} \u2192 ${vt(n.trim.end)}`,s=(n.trim.end-n.trim.start).toFixed(1);console.log(` ${n.id}`),console.log(` ${n.title}`),console.log(` ${o} (${s}s) ${n.format} score: ${n.score}`),n.reason&&console.log(` ${n.reason}`),console.log("")}}}catch(r){x(e,"clips",r,_(r)),m(_(r))}}import{readFileSync as rs}from"fs";async function gr(t,e){R(t,"projectId",e),T(e.target),h(e,"composition_get_prepare",{projectId:t});let r=await Ze(`/v1/projects/${t}/composition`,{method:"GET"},e,"composition_get");r.status>=400&&(We(r,e,"composition_get"),m(U(r.status)));let n=r.headers.etag,o=n&&vr(n);h(e,"composition_get_complete",{projectId:t,etag:o,status:r.status}),$(e,{etag:o,composition:r.body},()=>{o&&console.log(`# ETag: ${o}`),console.log(JSON.stringify(r.body,null,2))})}async function hr(t,e){R(t,"projectId",e),e.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),m(p.UserError)),T(e.target);let r=await _t(t,e),n=await _r(e.body);h(e,"composition_put_prepare",{projectId:t,ifMatch:r});let o=new Headers({"content-type":"application/json","if-match":r}),s=await Ze(`/v1/projects/${t}/composition`,{method:"PUT",headers:o,body:n},e,"composition_put");s.status>=400&&(We(s,e,"composition_put"),m(U(s.status)));let i=s.headers.etag;h(e,"composition_put_complete",{projectId:t,etag:i,status:s.status,response:s.body}),$(e,{etag:i,response:s.body},()=>{console.log(`Composition saved (ETag: ${i??"unknown"}).`),s.body&&typeof s.body=="object"&&console.log(JSON.stringify(s.body,null,2))})}async function ct(t,e){R(t,"projectId",e),e.suggestionId||(console.error("--suggestion <suggestionId> is required"),m(p.UserError)),T(e.target);let r=await _t(t,e),n;if(e.format)try{n=JSON.parse(e.format)}catch{console.error(`--format must be JSON, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`),m(p.UserError)}let o=JSON.stringify({suggestionId:e.suggestionId,...n?{format:n}:{}});h(e,"composition_from_suggestion_prepare",{projectId:t,suggestionId:e.suggestionId,ifMatch:r});let s,i=r,a=0,u=3;for(;;){a++;let c=new Headers({"content-type":"application/json","if-match":i});if(s=await Ze(`/v1/projects/${t}/composition/from-suggestion`,{method:"POST",headers:c,body:o},e,"composition_from_suggestion"),!(s.status===409&&s.body?.error?.code==="stale_etag"))break;if(a>u){h(e,"composition_from_suggestion_etag_retries_exhausted",{projectId:t,attempts:u});break}h(e,"composition_from_suggestion_etag_retry",{projectId:t,attempt:a,reason:"stale_etag"}),i=await _t(t,e)}s.status>=400&&(We(s,e,"composition_from_suggestion"),m(U(s.status)));let d=s.headers.etag;h(e,"composition_from_suggestion_complete",{projectId:t,suggestionId:e.suggestionId,etag:d,status:s.status,response:s.body,attempts:a}),$(e,{etag:d,response:s.body},()=>{console.log(`Composition built from suggestion ${e.suggestionId} (ETag: ${d??"unknown"}).`),s.body&&typeof s.body=="object"&&console.log(JSON.stringify(s.body,null,2))})}async function yr(t){t.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),m(p.UserError)),T(t.target);let e=await _r(t.body);h(t,"composition_validate_prepare",{});let r=new Headers({"content-type":"application/json"}),n=await Ze("/v1/composition/validate",{method:"POST",headers:r,body:e},t,"composition_validate");n.status>=400&&(We(n,t,"composition_validate"),m(U(n.status))),h(t,"composition_validate_complete",{status:n.status}),$(t,{valid:!0},()=>{console.log("\u2713 Composition is valid.")})}function vr(t){return t.replace(/^W\//,"").replace(/-gzip(?=("?)$)/,"")}async function _t(t,e){if(e.force)return"*";if(e.ifMatch)return e.ifMatch;let r=await Ze(`/v1/projects/${t}/composition`,{method:"GET"},e,"composition_etag_fetch");if(r.status===404)return J("No existing composition; treating as create (If-Match: *).",e),"*";r.status>=400&&(We(r,e,"composition_etag_fetch"),m(U(r.status)));let n=r.headers.etag;return n||(x(e,"composition_etag_fetch",new Error("Server returned no ETag on composition GET; cannot safely thread If-Match. Pass --force to overwrite anyway."),p.ApiServerError),m(p.ApiServerError)),vr(n)}async function _r(t){if(t.startsWith("@")){let e=t.slice(1);if(e==="-"){let r=[];for await(let n of process.stdin)r.push(Buffer.isBuffer(n)?n:Buffer.from(n));return Buffer.concat(r).toString("utf-8")}return rs(e,"utf-8")}return t}async function Ze(t,e,r,n){try{return await W(t,e)}catch(o){x(r,n,o,p.NetworkError),m(p.NetworkError)}}function We(t,e,r){let n=t.body?.error,o=n?.code??"unknown",s=n?.message??t.statusText,i=ns(o,t.status,n?.details),a=U(t.status);e.json?x(e,r,Object.assign(new Error(s),{code:o,status:t.status,details:n?.details,advice:i}),a):(process.stderr.write(`\u2716 ${r}: ${s} (${o}, ${t.status})
43
- `),i&&process.stderr.write(` \u2192 ${i}
44
- `))}function ns(t,e,r){let n=new Z(e,{code:t,message:"",details:r&&typeof r=="object"?r:void 0}),o=jt(n);return o||(e===404?"Project or composition not found. Run `cueframe list` to confirm the project ID; the composition may not yet exist.":null)}async function xr(t){let e=t.aspect?{aspectRatio:t.aspect,fps:t.fps??30,resolution:t.resolution??"fhd"}:void 0;if(t.dryRun){if(h(t,"project_create_dry_run",{name:t.name,target:t.target,format:e??null,fromSuggestion:t.fromSuggestion??null,cheap:t.cheap??!1,wouldCall:t.fromSuggestion?t.cheap?"POST /v1/projects \u2192 POST /v1/projects/:id/composition/from-suggestion (sync translator)":"POST /v1/projects \u2192 POST /v1/projects/:id/compose (async) \u2192 SSE watch":"POST /v1/projects"}),!t.json){let o=t.cheap?" (--cheap: deterministic translator)":"";console.log(`[dry-run] Would create project "${t.name}" on ${t.target}`+(t.fromSuggestion?` from suggestion ${t.fromSuggestion}${o}.`:"."))}return}T(t.target),h(t,"project_create_prepare",{name:t.name,target:t.target,fromSuggestion:t.fromSuggestion??null,cheap:t.cheap??!1});let r=P(`Creating project "${t.name}"\u2026`,t.json),n;try{n=await Se.createProject({name:t.name,format:e}),r.succeed(`Created: ${n.id}`)}catch(o){r.fail(`Failed: ${O(o)}`),A(t,"project_create",o,_(o)),m(_(o))}if(h(t,"project_create_complete",{project:n}),!t.json&&!t.fromSuggestion&&console.log(`
45
- ${n.id} ${n.name}`),t.fromSuggestion){let o=!1;if(o||await ct(n.id,{target:t.target,suggestionId:t.fromSuggestion,json:t.json,force:!0}),!t.json){let s=o?"(composed)":"(translated)";console.log(`
46
- ${n.id} ${n.name} \u2190 composed from ${t.fromSuggestion} ${s}`)}}}async function wr(t,e){R(t,"projectId",e),T(e.target),h(e,"project_delete_prepare",{projectId:t});try{await Se.deleteProject(t),h(e,"project_delete_complete",{projectId:t}),$(e,{ok:!0,projectId:t},()=>{console.log(`Project ${t} deleted.`)})}catch(r){x(e,"project_delete",r,_(r)),m(_(r))}}async function kr(t,e){R(t,"mediaId",e),T(e.target),h(e,"media_delete_prepare",{mediaId:t});try{await oe.deleteMedia(t),h(e,"media_delete_complete",{mediaId:t}),$(e,{ok:!0,mediaId:t},()=>{console.log(`Media ${t} deleted.`)})}catch(r){x(e,"media_delete",r,_(r)),m(_(r))}}import{writeFileSync as os}from"fs";import{resolve as ss}from"path";var is=1500,as=4e3,cs=1800*1e3,br=5;async function xt(t,e,r={}){let n=Date.now()+(r.timeoutMs??cs),o=r.reconnectBackoffMs??is,s=Date.now(),i=0;for(;Date.now()<n;){let a=null,u=!1;try{for await(let d of Tt(t,e)){if(i=0,d.event==="progress"){let c=Math.round((Date.now()-s)/1e3);if(r.spinner){let l=Math.round(d.data.percent*100);r.spinner.text=`Rendering\u2026 ${d.data.phase}${l>0?` \xB7 ${l}%`:""} (${c}s)`}r.onProgress?.({phase:d.data.phase,percent:d.data.percent,elapsedSec:c});continue}d.event==="complete"?a={kind:"complete",outputUrl:d.data.outputUrl,outputExpiresAt:d.data.outputExpiresAt,duration:d.data.duration}:a={kind:"failed",message:d.data.message};break}}catch(d){if(d instanceof Z)u=!0;else{if(i++,i>=br)throw Object.assign(new Error(`Render stream unreachable after ${br} consecutive transport failures: ${d instanceof Error?d.message:String(d)}`),{cause:d});await new Promise(c=>setTimeout(c,o));continue}}if(a)return a;if(u){let d=await ds(t,e);if(d)return d;await new Promise(c=>setTimeout(c,as));continue}await new Promise(d=>setTimeout(d,o))}return{kind:"failed",message:`Timed out waiting for render to reach a terminal state. Render ID: ${e}, Project ID: ${t}.`}}async function ds(t,e){let r=await Rt.getRender(t,e);return r.status==="complete"?{kind:"complete",outputUrl:r.outputUrl??null,outputExpiresAt:null,duration:null}:r.status==="error"||r.status==="cancelled"?{kind:"failed",message:r.error??`Render ${r.status}`}:null}async function Er(t,e){R(t,"renderId",e),R(e.project,"projectId",e),T(e.target),h(e,"render_watch_prepare",{renderId:t,projectId:e.project,target:e.target});let r=P(`Watching render ${t}\u2026`,e.json),n;try{n=await xt(e.project,t,{spinner:r,onProgress:s=>h(e,"render_progress",{renderId:t,...s})})}catch(s){r.fail(`Failed to watch render: ${O(s)}`),A(e,"render_watch",s,_(s)),m(_(s))}n.kind==="failed"&&(r.fail(n.message),A(e,"render_watch",new Error(n.message),p.ApiServerError),m(p.ApiServerError)),r.succeed(`Render complete (${t})`);let o=null;e.download&&n.outputUrl?o=await wt(n.outputUrl,e.out??`./reel-${t.slice(0,8)}.mp4`,e.json):n.outputUrl||(x(e,"render_watch",new Error("Render reported complete but no outputUrl was returned."),p.ApiServerError),e.json||console.error(`Render reported complete but no outputUrl was returned.
47
- Re-fetch via GET /v1/projects/${e.project}/renders/${t}.`),m(p.ApiServerError)),h(e,"render_complete",{renderId:t,projectId:e.project,outputUrl:n.outputUrl,outputExpiresAt:n.outputExpiresAt,duration:n.duration,outputPath:o}),e.json||(n.outputUrl&&console.log(`MP4 URL: ${n.outputUrl}`),n.outputExpiresAt&&console.log(`Expires: ${n.outputExpiresAt}`),n.duration!=null&&console.log(`Duration: ${n.duration}s`))}async function wt(t,e,r){let n=ss(e),o=P(`Downloading \u2192 ${n}\u2026`,r);try{let s=await fetch(t);if(!s.ok)throw new Error(`HTTP ${s.status}`);let i=Buffer.from(await s.arrayBuffer());return os(n,i),o.succeed(`Saved: ${n} (${(i.length/1024/1024).toFixed(1)} MB)`),n}catch(s){o.fail(`Download failed: ${O(s)}`),console.error(`
48
- MP4 URL (1-hour TTL): ${t}`),m(p.NetworkError)}}async function Sr(t,e){let r=e.map(i=>i==null?"null":String(i)).join(":"),n=`${t}:${r}`,o=new TextEncoder().encode(n),s=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(s),i=>i.toString(16).padStart(2,"0")).join("")}async function us(t){let e=await W(`/v1/projects/${t}/composition`,{method:"GET"});return e.status===404?"no-composition":e.status>=400?"unknown-composition":e.headers.etag??"no-etag"}async function Cr(t,e){if(R(t,"projectId",e),e.dryRun){h(e,"render_dry_run",{projectId:t,target:e.target,wouldCall:"POST /v1/projects/:id/renders \u2192 SSE watch \u2192 download MP4"}),e.json||console.log(`[dry-run] Would render project ${t} on ${e.target}.`);return}T(e.target),h(e,"render_prepare",{projectId:t,target:e.target});let r;try{r=e.idempotencyKey??await Sr("render",[t,await us(t)]),h(e,"idempotency_key",{scope:"render",key:r,overridden:!!e.idempotencyKey})}catch(c){r="",h(e,"idempotency_key",{scope:"render",key:null,skipped:!0,reason:c instanceof Error?c.message:String(c)})}let n=P("Queuing render\u2026",e.json),o,s,i=!1;try{let c=e.aspect?{format:{aspectRatio:e.aspect,fps:e.fps??30,resolution:e.resolution??"fhd"}}:{};e.priority&&(c.priority=e.priority),e.intent&&(c.intent=e.intent);let l={"content-type":"application/json"};r&&(l["idempotency-key"]=r);let S=await W(`/v1/projects/${t}/renders`,{method:"POST",headers:l,body:JSON.stringify(c)});if(S.status>=400){let ne=S.body?.error;throw new Z(S.status,{code:ne?.code??"unknown",message:ne?.message??S.statusText})}let I=S.body;o=I.id,s=I.status,i=S.headers["idempotency-replay"]==="true",n.succeed(i?`Render replayed: ${o} (status: ${s})`:`Render queued: ${o}`)}catch(c){n.fail(`Failed: ${O(c)}`),A(e,"render_prepare",c,_(c)),m(_(c))}i?h(e,"render_idempotent_replay",{renderId:o,projectId:t,status:s,idempotencyKey:r}):h(e,"render_queued",{renderId:o,projectId:t});let a=P("Rendering\u2026",e.json),u;try{u=await xt(t,o,{spinner:a,onProgress:c=>h(e,"render_progress",{renderId:o,...c})})}catch(c){a.fail(`Failed to watch render: ${O(c)}`),A(e,"render_progress",c,_(c)),m(_(c))}u.kind==="failed"&&(a.fail(u.message),A(e,"render_progress",new Error(u.message),p.ApiServerError),m(p.ApiServerError)),a.succeed("Render complete"),u.outputUrl||(x(e,"render_complete",new Error("Render reported complete but no outputUrl was returned."),p.ApiServerError),e.json||console.error(`Render reported complete but no outputUrl was returned.
104
+ `),console.log(" Shown ONCE \u2014 store it now (paste it into your integration; not saved here).")})}catch(n){G(r,"keys_create",n,K(n)),L(K(n))}}async function zb(r){ae(r.target);let e;try{e=await rt("/api/auth/api-key/list",{method:"GET"})}catch(n){G(r,"keys_list",n,K(n)),L(K(n))}e.status>=400&&(G(r,"keys_list",new Error(`list failed (${e.status})`),je(e.status)),L(je(e.status)));let t=Array.isArray(e.body)?e.body:[];pe(r,{ok:!0,keys:t},()=>{if(t.length===0){console.log("No API keys.");return}for(let n of t)console.log(` ${n.id} ${n.name??"(unnamed)"} ${n.start??""}\u2026`)})}async function vb(r,e){ae(e.target);let t;try{t=await rt("/api/auth/api-key/delete",{method:"POST",body:JSON.stringify({keyId:r}),headers:{"content-type":"application/json"}})}catch(n){G(e,"keys_revoke",n,K(n)),L(K(n))}t.status>=400&&(G(e,"keys_revoke",new Error(`revoke failed (${t.status})`),je(t.status)),L(je(t.status))),pe(e,{ok:!0,revoked:r},()=>console.log(`\u2713 Revoked ${r}`))}async function wb(r){ae(r.target),B(r,"list_prepare",{target:r.target});try{let e=await fo.listProjects(),t=r.limit,n=typeof t=="number"&&Number.isFinite(t)&&t>0?e.data.slice(0,t):e.data;if(B(r,"list_complete",{count:n.length,total:e.data.length,truncated:n.length<e.data.length,projects:n}),!r.json){if(e.data.length===0){console.log("No projects found.");return}for(let o of n){let i=new Date(o.createdAt).toLocaleDateString();console.log(` ${o.id} ${o.name} (${i})`)}n.length<e.data.length&&console.log(` \u2026 ${e.data.length-n.length} more (raise --limit to see all)`)}}catch(e){G(r,"list",e,K(e)),L(K(e))}}import{readFile as Bne,stat as qne}from"fs/promises";import{existsSync as Wne}from"fs";import{basename as Zne,extname as Gne}from"path";var Kne=4e3,Ib=1800*1e3,kb=5,$b={".mp4":"video/mp4",".mov":"video/quicktime",".webm":"video/webm",".mkv":"video/x-matroska",".wav":"audio/wav",".mp3":"audio/mpeg",".m4a":"audio/mp4",".aac":"audio/aac",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml"};function Jne(r,e){let t=Gne(r).toLowerCase(),n=$b[t];if(!n){let o=new Error(`Unsupported file extension "${t||"(none)"}" for ${r}. Supported: ${Object.keys($b).join(", ")}.`);G(e,"preflight",o,j.UserError),L(j.UserError)}return n}var Tb=["vo","music","sfx","ambience"];async function Bs(r,e){Wne(r)||(G(e,"preflight",new Error(`File not found: ${r}`),j.UserError),L(j.UserError));let t=Zne(r),n=(await qne(r)).size,o=Jne(t,e);if(e.audioRole&&!Tb.includes(e.audioRole)){let T=new Error(`--audio-role must be one of ${Tb.join("|")} (got "${e.audioRole}")`);G(e,"preflight",T,j.UserError),L(j.UserError)}let i=e.audioRole;if(e.dryRun){B(e,"upload_dry_run",{file:t,sizeBytes:n,contentType:o,target:e.target,analyzeAfter:!!e.analyze,wouldCall:"POST /v1/media \u2192 presigned PUT \u2192 POST /v1/media/:id/finalize \u2192 poll processing"}),e.json||console.log(`[dry-run] Would upload ${t} (${(n/1024/1024).toFixed(1)} MB, ${o}) to ${e.target}.`);return}ae(e.target),B(e,"upload_prepare",{file:t,sizeBytes:n,contentType:o,target:e.target});let s=Me("Preparing upload\u2026",e.json),c,u;try{let T=await Rt.createMediaUpload({filename:t,contentType:o,size:n});c=T.id,u=T.uploadUrl,s.succeed("Ready"),B(e,"upload_ready",{mediaItemId:c})}catch(T){s.fail(`Failed: ${ze(T)}`),Ce(e,"upload_prepare",T,K(T)),L(K(T))}let m=Date.now(),h=Me(`Uploading ${t} (${(n/1024/1024).toFixed(1)} MB)\u2026`,e.json);try{let T=await Bne(r),M=await fetch(u,{method:"PUT",headers:{"Content-Type":o},body:T});if(!M.ok)throw new Error(`presigned PUT failed: ${M.status} ${M.statusText}`);await Rt.finalizeMedia(c,i?{audioRole:i}:{}),h.succeed(`Uploaded: ${t}`),B(e,"upload_complete",{mediaItemId:c,bytesUploaded:n,...i?{audioRole:i}:{},durationMs:Date.now()-m})}catch(T){h.fail(`Upload failed: ${ze(T)}`),Ce(e,"upload",T,j.NetworkError),L(j.NetworkError)}let g=Me("Processing (transcription)\u2026",e.json),y=Date.now(),S=null,w=0;for(;;){if(await new Promise(T=>setTimeout(T,Kne)),Date.now()-y>Ib){let T=`Processing did not complete within ${Math.round(Ib/6e4)}m. Media item ID: ${c}.`;g.fail(T),Ce(e,"process",new Error(T),j.ApiServerError),L(j.ApiServerError)}try{let T=await Rt.getMedia(c);w=0;let M=T?.processingStatus?.phase??"unknown",V=T?.processingStatus?.percent??null,F=Math.round((Date.now()-y)/1e3),H=V!=null?` \xB7 ${Math.round(V*100)}%`:"";if(g.text=`Processing\u2026 ${M}${H} (${F}s)`,B(e,"process_progress",{phase:M,percent:V,elapsedSec:F}),M==="complete"||M==="completed"){g.succeed(`Ready: ${c}`),S=T,B(e,"process_complete",{mediaItemId:c,durationMs:Date.now()-y,item:T});break}if(M==="error"){let re=T?.processingStatus?.error??"unknown error";g.fail(`Processing failed: ${re}`),Ce(e,"process",new Error(re),j.ApiServerError),L(j.ApiServerError)}}catch(T){T instanceof We&&[401,403,404].includes(T.status)&&(g.fail(`Processing check failed: ${ze(T)}`),Ce(e,"process",T,K(T)),L(K(T))),w++,w>=kb&&(g.fail(`Processing check failed: ${ze(T)}`),Ce(e,"process",new Error(`Processing status unreadable after ${kb} consecutive failures: ${ze(T)}`),K(T)),L(K(T)))}}if(e.analyze){at(`
105
+ Media item ID: ${c}`,e);let{analyzeCommand:T}=await import("./analyze-NKSULY3V.js");return await T(c,{target:e.target,wait:!0,json:e.json}),{mediaItemId:c,item:S}}return e.json||pe(e,{mediaItemId:c,item:S},()=>{console.log(`
106
+ Media item ID: ${c}`),console.log(`
107
+ Run \`cueframe analyze ${c} --target ${e.target}\` to generate clip suggestions.`)}),{mediaItemId:c,item:S}}function Gu(r){let e=Math.floor(r/60),t=Math.floor(r%60);return`${e}:${String(t).padStart(2,"0")}`}async function Pb(r,e){r!==void 0&&we(r,"mediaItemId",e),ae(e.target),B(e,"clips_prepare",{target:e.target,mode:r?"suggestions":"media-list",...r?{mediaItemId:r}:{}});try{if(!r){let n=await Rt.listMedia();if(B(e,"clips_complete",{mode:"media-list",count:n.data.length,media:n.data}),!e.json){if(n.data.length===0){console.log("No media items found. Import a video first.");return}console.log("Media items (pass the ID to `cueframe clips <id>`):"),console.log("");for(let o of n.data){let i=o.duration?`${Gu(o.duration)} `:"",s=o.processingStatus?.phase??"unknown",c=s==="complete"?"":` [${s}]`;console.log(` ${o.id} ${o.name} ${i}${c}`)}}return}let t=await wh.listMediaSuggestions(r);if(B(e,"clips_complete",{mode:"suggestions",mediaItemId:r,count:t.suggestions.length,suggestions:t.suggestions}),!e.json){if(t.suggestions.length===0){console.log("No clip suggestions found for this media item."),console.log("If analysis is still running, try again shortly. Otherwise the video may not have suitable clips.");return}console.log(`${t.suggestions.length} clip suggestion${t.suggestions.length!==1?"s":""}:`),console.log("");for(let n of t.suggestions){let o=`${Gu(n.trim.start)} \u2192 ${Gu(n.trim.end)}`,i=(n.trim.end-n.trim.start).toFixed(1);console.log(` ${n.id}`),console.log(` ${n.title}`),console.log(` ${o} (${i}s) ${n.format} score: ${n.score}`),n.reason&&console.log(` ${n.reason}`),console.log("")}}}catch(t){G(e,"clips",t,K(t)),L(K(t))}}import{readFileSync as Hne}from"fs";async function Cb(r,e){we(r,"projectId",e),ae(e.target),B(e,"composition_get_prepare",{projectId:r});let t=await pn(`/v1/projects/${r}/composition`,{method:"GET"},e,"composition_get");t.status>=400&&(dn(t,e,"composition_get"),L(je(t.status)));let n=t.headers.etag,o=n&&Ob(n);B(e,"composition_get_complete",{projectId:r,etag:o,status:t.status}),pe(e,{etag:o,composition:t.body},()=>{o&&console.log(`# ETag: ${o}`),console.log(JSON.stringify(t.body,null,2))})}async function qs(r,e){we(r,"projectId",e),e.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),L(j.UserError)),ae(e.target);let t=await Ku(r,e),n=await Rb(e.body);B(e,"composition_put_prepare",{projectId:r,ifMatch:t});let o=new Headers({"content-type":"application/json","if-match":t}),i=await pn(`/v1/projects/${r}/composition`,{method:"PUT",headers:o,body:n},e,"composition_put");i.status>=400&&(dn(i,e,"composition_put"),L(je(i.status)));let s=i.headers.etag;return B(e,"composition_put_complete",{projectId:r,etag:s,status:i.status,response:i.body}),pe(e,{etag:s,response:i.body},()=>{console.log(`Composition saved (ETag: ${s??"unknown"}).`),i.body&&typeof i.body=="object"&&console.log(JSON.stringify(i.body,null,2))}),{etag:s,response:i.body}}async function Ws(r,e){we(r,"projectId",e),e.suggestionId||(console.error("--suggestion <suggestionId> is required"),L(j.UserError)),ae(e.target);let t=await Ku(r,e),n;if(e.format)try{n=JSON.parse(e.format)}catch{console.error(`--format must be JSON, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`),L(j.UserError)}let o=JSON.stringify({suggestionId:e.suggestionId,...n?{format:n}:{}});B(e,"composition_from_suggestion_prepare",{projectId:r,suggestionId:e.suggestionId,ifMatch:t});let i,s=t,c=0,u=3;for(;;){c++;let h=new Headers({"content-type":"application/json","if-match":s});if(i=await pn(`/v1/projects/${r}/composition/from-suggestion`,{method:"POST",headers:h,body:o},e,"composition_from_suggestion"),!(i.status===409&&i.body?.error?.code==="stale_etag"))break;if(c>u){B(e,"composition_from_suggestion_etag_retries_exhausted",{projectId:r,attempts:u});break}B(e,"composition_from_suggestion_etag_retry",{projectId:r,attempt:c,reason:"stale_etag"}),s=await Ku(r,e)}i.status>=400&&(dn(i,e,"composition_from_suggestion"),L(je(i.status)));let m=i.headers.etag;B(e,"composition_from_suggestion_complete",{projectId:r,suggestionId:e.suggestionId,etag:m,status:i.status,response:i.body,attempts:c}),pe(e,{etag:m,response:i.body},()=>{console.log(`Composition built from suggestion ${e.suggestionId} (ETag: ${m??"unknown"}).`),i.body&&typeof i.body=="object"&&console.log(JSON.stringify(i.body,null,2))})}async function Zs(r){r.body||(console.error("--body is required (inline JSON, @file.json, or @- for stdin)"),L(j.UserError)),ae(r.target);let e=await Rb(r.body);B(r,"composition_validate_prepare",{});let t=new Headers({"content-type":"application/json"}),n=await pn("/v1/composition/validate",{method:"POST",headers:t,body:e},r,"composition_validate");return n.status>=400&&(dn(n,r,"composition_validate"),L(je(n.status))),B(r,"composition_validate_complete",{status:n.status}),pe(r,{valid:!0},()=>{console.log("\u2713 Composition is valid.")}),{valid:!0}}function Ob(r){return r.replace(/^W\//,"").replace(/-gzip(?=("?)$)/,"")}async function Ku(r,e){if(e.force)return"*";if(e.ifMatch)return e.ifMatch;let t=await pn(`/v1/projects/${r}/composition`,{method:"GET"},e,"composition_etag_fetch");if(t.status===404)return at("No existing composition; treating as create (If-Match: *).",e),"*";t.status>=400&&(dn(t,e,"composition_etag_fetch"),L(je(t.status)));let n=t.headers.etag;return n||(G(e,"composition_etag_fetch",new Error("Server returned no ETag on composition GET; cannot safely thread If-Match. Pass --force to overwrite anyway."),j.ApiServerError),L(j.ApiServerError)),Ob(n)}async function Rb(r){if(r.startsWith("@")){let e=r.slice(1);if(e==="-"){let t=[];for await(let n of process.stdin)t.push(Buffer.isBuffer(n)?n:Buffer.from(n));return Buffer.concat(t).toString("utf-8")}return Hne(e,"utf-8")}return r}async function pn(r,e,t,n){try{return await rt(r,e)}catch(o){G(t,n,o,j.NetworkError),L(j.NetworkError)}}function dn(r,e,t){let n=r.body?.error,o=n?.code??"unknown",i=n?.message??r.statusText,s=Xne(o,r.status,n?.details),c=je(r.status);e.json?G(e,t,Object.assign(new Error(i),{code:o,status:r.status,details:n?.details,advice:s}),c):(process.stderr.write(`\u2716 ${t}: ${i} (${o}, ${r.status})
108
+ `),s&&process.stderr.write(` \u2192 ${s}
109
+ `))}function Xne(r,e,t){let n=new We(e,{code:r,message:"",details:t&&typeof t=="object"?t:void 0}),o=Sh(n);return o||(e===404?"Project or composition not found. Run `cueframe list` to confirm the project ID; the composition may not yet exist.":null)}async function Gs(r){let e=r.aspect?{aspectRatio:r.aspect,fps:r.fps??30,resolution:r.resolution??"fhd"}:void 0;if(r.dryRun){if(B(r,"project_create_dry_run",{name:r.name,target:r.target,format:e??null,brandKitId:r.brandKitId??null,fromSuggestion:r.fromSuggestion??null,cheap:r.cheap??!1,wouldCall:r.fromSuggestion?r.cheap?"POST /v1/projects \u2192 POST /v1/projects/:id/composition/from-suggestion (sync translator)":"POST /v1/projects \u2192 POST /v1/projects/:id/compose (async) \u2192 SSE watch":"POST /v1/projects"}),!r.json){let o=r.cheap?" (--cheap: deterministic translator)":"";console.log(`[dry-run] Would create project "${r.name}" on ${r.target}`+(r.fromSuggestion?` from suggestion ${r.fromSuggestion}${o}.`:"."))}return}ae(r.target),B(r,"project_create_prepare",{name:r.name,target:r.target,fromSuggestion:r.fromSuggestion??null,brandKitId:r.brandKitId??null,cheap:r.cheap??!1});let t=Me(`Creating project "${r.name}"\u2026`,r.json),n;try{n=await fo.createProject({name:r.name,format:e,brandKitId:r.brandKitId}),t.succeed(`Created: ${n.id}`)}catch(o){t.fail(`Failed: ${ze(o)}`),Ce(r,"project_create",o,K(o)),L(K(o))}if(B(r,"project_create_complete",{project:n}),!r.json&&!r.fromSuggestion&&console.log(`
110
+ ${n.id} ${n.name}`),r.fromSuggestion){let o=!1;if(o||await Ws(n.id,{target:r.target,suggestionId:r.fromSuggestion,json:r.json,force:!0}),!r.json){let i=o?"(composed)":"(translated)";console.log(`
111
+ ${n.id} ${n.name} \u2190 composed from ${r.fromSuggestion} ${i}`)}}return n}async function Mb(r,e){we(r,"projectId",e),ae(e.target),B(e,"project_delete_prepare",{projectId:r});try{await fo.deleteProject(r),B(e,"project_delete_complete",{projectId:r}),pe(e,{ok:!0,projectId:r},()=>{console.log(`Project ${r} deleted.`)})}catch(t){G(e,"project_delete",t,K(t)),L(K(t))}}async function Eb(r,e){we(r,"mediaId",e),ae(e.target),B(e,"media_delete_prepare",{mediaId:r});try{await Rt.deleteMedia(r),B(e,"media_delete_complete",{mediaId:r}),pe(e,{ok:!0,mediaId:r},()=>{console.log(`Media ${r} deleted.`)})}catch(t){G(e,"media_delete",t,K(t)),L(K(t))}}import{writeFileSync as Yne}from"fs";import{resolve as Qne}from"path";var eie=1500,tie=4e3,oie=1800*1e3,Db=5;async function Ju(r,e,t={}){let n=Date.now()+(t.timeoutMs??oie),o=t.reconnectBackoffMs??eie,i=Date.now(),s=0;for(;Date.now()<n;){let c=null,u=!1;try{for await(let m of zh(r,e)){if(s=0,m.event==="progress"){let h=Math.round((Date.now()-i)/1e3);if(t.spinner){let g=Math.round(m.data.percent*100);t.spinner.text=`Rendering\u2026 ${m.data.phase}${g>0?` \xB7 ${g}%`:""} (${h}s)`}t.onProgress?.({phase:m.data.phase,percent:m.data.percent,elapsedSec:h});continue}m.event==="complete"?c={kind:"complete",outputUrl:m.data.outputUrl,outputExpiresAt:m.data.outputExpiresAt,duration:m.data.duration}:c={kind:"failed",message:m.data.message};break}}catch(m){if(m instanceof We)u=!0;else{if(s++,s>=Db)throw Object.assign(new Error(`Render stream unreachable after ${Db} consecutive transport failures: ${m instanceof Error?m.message:String(m)}`),{cause:m});await new Promise(h=>setTimeout(h,o));continue}}if(c)return c;if(u){let m=await rie(r,e);if(m)return m;await new Promise(h=>setTimeout(h,tie));continue}await new Promise(m=>setTimeout(m,o))}return{kind:"failed",message:`Timed out waiting for render to reach a terminal state. Render ID: ${e}, Project ID: ${r}.`}}async function rie(r,e){let t=await Ih.getRender(r,e);return t.status==="complete"?{kind:"complete",outputUrl:t.outputUrl??null,outputExpiresAt:null,duration:null}:t.status==="error"||t.status==="cancelled"?{kind:"failed",message:t.error??`Render ${t.status}`}:null}async function Ab(r,e){we(r,"renderId",e),we(e.project,"projectId",e),ae(e.target),B(e,"render_watch_prepare",{renderId:r,projectId:e.project,target:e.target});let t=Me(`Watching render ${r}\u2026`,e.json),n;try{n=await Ju(e.project,r,{spinner:t,onProgress:i=>B(e,"render_progress",{renderId:r,...i})})}catch(i){t.fail(`Failed to watch render: ${ze(i)}`),Ce(e,"render_watch",i,K(i)),L(K(i))}n.kind==="failed"&&(t.fail(n.message),Ce(e,"render_watch",new Error(n.message),j.ApiServerError),L(j.ApiServerError)),t.succeed(`Render complete (${r})`);let o=null;e.download&&n.outputUrl?o=await Hu(n.outputUrl,e.out??`./reel-${r.slice(0,8)}.mp4`,e.json):n.outputUrl||(G(e,"render_watch",new Error("Render reported complete but no outputUrl was returned."),j.ApiServerError),e.json||console.error(`Render reported complete but no outputUrl was returned.
112
+ Re-fetch via GET /v1/projects/${e.project}/renders/${r}.`),L(j.ApiServerError)),B(e,"render_complete",{renderId:r,projectId:e.project,outputUrl:n.outputUrl,outputExpiresAt:n.outputExpiresAt,duration:n.duration,outputPath:o}),e.json||(n.outputUrl&&console.log(`MP4 URL: ${n.outputUrl}`),n.outputExpiresAt&&console.log(`Expires: ${n.outputExpiresAt}`),n.duration!=null&&console.log(`Duration: ${n.duration}s`))}async function Hu(r,e,t){let n=Qne(e),o=Me(`Downloading \u2192 ${n}\u2026`,t);try{let i=await fetch(r);if(!i.ok)throw new Error(`HTTP ${i.status}`);let s=Buffer.from(await i.arrayBuffer());return Yne(n,s),o.succeed(`Saved: ${n} (${(s.length/1024/1024).toFixed(1)} MB)`),n}catch(i){o.fail(`Download failed: ${ze(i)}`),console.error(`
113
+ MP4 URL (1-hour TTL): ${r}`),L(j.NetworkError)}}async function _b(r,e){let t=e.map(s=>s==null?"null":String(s)).join(":"),n=`${r}:${t}`,o=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(i),s=>s.toString(16).padStart(2,"0")).join("")}async function nie(r){let e=await rt(`/v1/projects/${r}/composition`,{method:"GET"});return e.status===404?"no-composition":e.status>=400?"unknown-composition":e.headers.etag??"no-etag"}async function Ks(r,e){if(we(r,"projectId",e),e.dryRun){B(e,"render_dry_run",{projectId:r,target:e.target,wouldCall:"POST /v1/projects/:id/renders \u2192 SSE watch \u2192 download MP4"}),e.json||console.log(`[dry-run] Would render project ${r} on ${e.target}.`);return}ae(e.target),B(e,"render_prepare",{projectId:r,target:e.target});let t;try{t=e.idempotencyKey??await _b("render",[r,await nie(r)]),B(e,"idempotency_key",{scope:"render",key:t,overridden:!!e.idempotencyKey})}catch(h){t="",B(e,"idempotency_key",{scope:"render",key:null,skipped:!0,reason:h instanceof Error?h.message:String(h)})}let n=Me("Queuing render\u2026",e.json),o,i,s=!1;try{let h=e.aspect?{format:{aspectRatio:e.aspect,fps:e.fps??30,resolution:e.resolution??"fhd"}}:{};e.priority&&(h.priority=e.priority),e.intent&&(h.intent=e.intent);let g={"content-type":"application/json"};t&&(g["idempotency-key"]=t);let y=await rt(`/v1/projects/${r}/renders`,{method:"POST",headers:g,body:JSON.stringify(h)});if(y.status>=400){let w=y.body?.error;throw new We(y.status,{code:w?.code??"unknown",message:w?.message??y.statusText})}let S=y.body;o=S.id,i=S.status,s=y.headers["idempotency-replay"]==="true",n.succeed(s?`Render replayed: ${o} (status: ${i})`:`Render queued: ${o}`)}catch(h){n.fail(`Failed: ${ze(h)}`),Ce(e,"render_prepare",h,K(h)),L(K(h))}s?B(e,"render_idempotent_replay",{renderId:o,projectId:r,status:i,idempotencyKey:t}):B(e,"render_queued",{renderId:o,projectId:r});let c=Me("Rendering\u2026",e.json),u;try{u=await Ju(r,o,{spinner:c,onProgress:h=>B(e,"render_progress",{renderId:o,...h})})}catch(h){c.fail(`Failed to watch render: ${ze(h)}`),Ce(e,"render_progress",h,K(h)),L(K(h))}u.kind==="failed"&&(c.fail(u.message),Ce(e,"render_progress",new Error(u.message),j.ApiServerError),L(j.ApiServerError)),c.succeed("Render complete"),u.outputUrl||(G(e,"render_complete",new Error("Render reported complete but no outputUrl was returned."),j.ApiServerError),e.json||console.error(`Render reported complete but no outputUrl was returned.
49
114
  Render ID: ${o}
50
- Project ID: ${t}
51
- Re-fetch via GET /v1/projects/${t}/renders/${o} once the URL is signed.`),m(p.ApiServerError));let d=await wt(u.outputUrl,e.out??`./reel-${o.slice(0,8)}.mp4`,e.json);h(e,"render_complete",{renderId:o,projectId:t,outputUrl:u.outputUrl,outputExpiresAt:u.outputExpiresAt,duration:u.duration,outputPath:d})}import ls from"open";import{createAuthClient as ms}from"better-auth/client";import{deviceAuthorizationClient as fs}from"better-auth/client/plugins";async function jr(t){let e=Ce(t.target),r=ms({baseURL:e,plugins:[fs()]}),n=P("Requesting device code\u2026",t.json),o;try{let{data:d,error:c}=await r.device.code({client_id:"cueframe-cli",scope:"openid profile email"});(c||!d)&&(n.fail(`Could not start login: ${c?.message??"unknown error"}`),m(p.NetworkError)),o=d}catch(d){n.fail(`Could not start login: ${d instanceof Error?d.message:String(d)}`),m(p.NetworkError)}n.succeed("Device code issued");let s=o.verification_uri_complete??o.verification_uri;J("",t),J(` Visit: ${s}`,t),J(` Code: ${o.user_code}`,t),J("",t);try{await ls(s)}catch{}let i=P("Waiting for approval in browser\u2026",t.json),a=Date.now()+o.expires_in*1e3,u=o.interval*1e3;for(;Date.now()<a;){await new Promise(d=>setTimeout(d,u));try{let{data:d,error:c}=await r.device.token({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:o.device_code,client_id:"cueframe-cli"});if(d?.access_token){let I=d.access_token;qe(I,t.target,t.url),i.succeed(`Logged in. Token saved for target "${t.target}".`),$(t,{ok:!0,target:t.target,apiUrl:e},()=>{});return}let l=d??c,S=l?.error;S==="authorization_pending"||(S==="slow_down"?u+=5e3:S==="access_denied"?(i.fail("Access denied in the browser."),m(p.UserError)):S==="expired_token"?(i.fail("Device code expired before approval. Run `cueframe login` again."),m(p.UserError)):S&&(i.fail(`Login failed: ${l?.error_description??S}`),m(p.ApiClientError)))}catch{}}i.fail("Timed out waiting for approval. Run `cueframe login` again."),m(p.UserError)}import{readFileSync as ps}from"fs";var Tr=new Set(["GET","POST","PUT","PATCH","DELETE"]);async function Or(t,e,r){let n=t.toUpperCase();Tr.has(n)||(x(r,"api",new Error(`Unsupported method: ${t}. Allowed: ${[...Tr].join(", ")}.`),p.UserError),m(p.UserError)),e.startsWith("/")||(x(r,"api",new Error(`Path must start with '/'. Got: ${e}`),p.UserError),m(p.UserError)),T(r.target);let o=hs(r.header??[]),s=await ys(r.body,n);s!==void 0&&!o.has("content-type")&&o.set("content-type","application/json");let i;try{i=await W(e,{method:n,headers:o,body:s})}catch(u){x(r,"api",u,_(u)),m(_(u))}gs(i,{include:!!r.include,json:!!r.json,method:n,path:e});let a=U(i.status);a!==p.Success&&x(r,"api",Object.assign(new Error(`${n} ${e} \u2192 ${i.status} ${i.statusText}`),{code:i.body?.error?.code,status:i.status}),a),process.exitCode=a}function gs(t,{include:e,json:r,method:n,path:o}){if(r){console.log(JSON.stringify({status:t.status,statusText:t.statusText,headers:t.headers,body:t.body}));return}if(e){process.stdout.write(`HTTP/1.1 ${t.status} ${t.statusText}
52
- `);for(let[s,i]of Object.entries(t.headers))process.stdout.write(`${s}: ${i}
115
+ Project ID: ${r}
116
+ Re-fetch via GET /v1/projects/${r}/renders/${o} once the URL is signed.`),L(j.ApiServerError));let m=await Hu(u.outputUrl,e.out??`./reel-${o.slice(0,8)}.mp4`,e.json);return B(e,"render_complete",{renderId:o,projectId:r,outputUrl:u.outputUrl,outputExpiresAt:u.outputExpiresAt,duration:u.duration,outputPath:m}),{renderId:o,projectId:r,outputUrl:u.outputUrl,outputExpiresAt:u.outputExpiresAt,duration:u.duration,outputPath:m}}import{existsSync as Js}from"fs";import{readFile as iie}from"fs/promises";import{resolve as st}from"path";var Xu="REPLACE_WITH_MEDIA_ID";function sr(r,e,t=Xu){let n=0,o=s=>s===t?(n+=1,e):Array.isArray(s)?s.map(o):s&&typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,u])=>[c,o(u)])):s,i=o(r);if(n!==1)throw new Error(`Recipe must contain exactly one ${t} media value; found ${n}.`);return i}async function Yu(r,e){try{return JSON.parse(await iie(r,"utf8"))}catch(t){G(e,"recipe_read",new Error(`Could not read valid JSON from ${r}: ${ze(t)}`),j.UserError),L(j.UserError)}}function Lb(r,e,t){let n=r.recipe?.mediaSlots?.[0]?.projectMediaId;(!r.name||!r.composition||!n||!r.recipe?.cloudBrandKit)&&(G(t,"recipe_read",new Error(`${e} is a project, but not a portable CueFrame recipe template.`),j.UserError),L(j.UserError));let o=(r.recipe.components??[]).map(i=>{let s=i.componentId,c=i.sourceVersionId,u=s&&c?r.authoredComponents?.[s]?.versions?.[c]:void 0;return(!s||!c||!u||u.componentId!==s)&&(G(t,"recipe_read",new Error(`${e} has an invalid authored component reference.`),j.UserError),L(j.UserError)),{id:s,name:i.name||s,category:i.category??"layouts",source:u,propSchema:i.propSchema}});return{name:r.name,brandKit:r.recipe.cloudBrandKit,composition:r.composition,mediaPlaceholder:n,components:o}}async function sie(r,e){let t=st(r);if(t.endsWith(".cueframe"))return Lb(await Yu(t,e),t,e);if(!Js(t)&&/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(r)){let s=`https://raw.githubusercontent.com/cueframe-ai/cueframe-recipes/main/${r}/recipe.cueframe`;try{let c=await fetch(s,{headers:{accept:"application/json"}});if(!c.ok)throw new Error(`${c.status} ${c.statusText}`);return Lb(await c.json(),s,e)}catch(c){G(e,"recipe_fetch",new Error(`Could not load recipe "${r}" from cueframe-ai/cueframe-recipes: ${ze(c)}`),j.NetworkError),L(j.NetworkError)}}let n=t,[o,i]=await Promise.all([Yu(st(n,"brand-kit.json"),e),Yu(st(n,"composition.template.json"),e)]);return{name:n.split("/").pop()??o.name,brandKit:o,composition:i,mediaPlaceholder:Xu,components:[]}}async function aie(r,e){for(let t of r.components){let n={tsxSource:t.source.tsxSource,name:t.name,description:`Authored component installed from the ${r.name} CueFrame recipe.`,category:t.category,propSchema:t.propSchema??{type:"object",properties:{}},origin:"customer-owned",manifest:t.source.manifest},o=!1;try{await Ot.getComponent(t.id),o=!0}catch(i){if(!(i instanceof We)||i.status!==404)throw i}o?await Ot.updateComponent(t.id,n):await Ot.createComponent({componentId:t.id,...n}),B(e,"recipe_component_ready",{componentId:t.id,action:o?"updated":"created"})}}async function jb(r){let e=await sie(r.directory,r);if(r.dryRun){sr(e.composition,"dry_run_media_id",e.mediaPlaceholder);let g={recipe:Js(st(r.directory))?st(r.directory):r.directory,media:st(r.media),target:r.target,render:r.render,output:st(r.out),wouldRun:["upload source media",...e.components.length>0?["install authored recipe components"]:[],"upsert recipe brand kit","create project","bind media to recipe composition","validate composition","save composition",...r.render?["render and download MP4"]:[]]};return pe(r,g,()=>console.log(`[dry-run] Recipe is valid. Would create ${e.name}.`)),g}B(r,"recipe_run_prepare",{recipe:Js(st(r.directory))?st(r.directory):r.directory,media:st(r.media),target:r.target});let t=await Bs(r.media,{target:r.target,analyze:!1,json:r.json});ae(r.target);try{await aie(e,r)}catch(g){G(r,"recipe_components",g,K(g)),L(K(g))}let n;try{n=await vh.createBrandKit(e.brandKit),B(r,"recipe_brand_kit_ready",{brandKitId:n.id})}catch(g){G(r,"recipe_brand_kit",g,K(g)),L(K(g))}let o=e.composition.format,i=await Gs({name:e.name,target:r.target,aspect:o?.aspectRatio,fps:o?.fps,resolution:o?.resolution,brandKitId:n.id,json:r.json});if(!t||!i)throw new Error("Recipe orchestration stopped before CueFrame returned the required media and project IDs.");let s=sr(e.composition,t.mediaItemId,e.mediaPlaceholder),c=JSON.stringify(s);await Zs({target:r.target,body:c,json:r.json});let u=await qs(i.id,{target:r.target,body:c,force:!0,json:r.json}),m=r.render?await Ks(i.id,{target:r.target,out:r.out,json:r.json}):void 0,h={recipe:Js(st(r.directory))?st(r.directory):r.directory,mediaItemId:t.mediaItemId,brandKitId:n.id,projectId:i.id,compositionEtag:u.etag,...m?{renderId:m.renderId,outputPath:m.outputPath}:{}};return B(r,"recipe_run_complete",h),r.json||pe(r,h,()=>{console.log(`
117
+ Recipe ready in project ${i.id}.`),m&&console.log(`Output: ${m.outputPath}`)}),h}import{readFile as sz,writeFile as Bce,rename as qce,unlink as Wce}from"fs/promises";import{randomUUID as Zce}from"crypto";import{resolve as az}from"path";var Fb=["Inter","Space Mono","Montserrat","Roboto","Poppins","Oswald","Playfair Display","Bebas Neue","Instrument Serif","National Park","Bricolage Grotesque","Schibsted Grotesk"],Nb=["Georgia"],Vb=Object.freeze({Inter:{slug:"inter",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Montserrat:{slug:"montserrat",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Roboto:{slug:"roboto",faces:[{weight:"100 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},Oswald:{slug:"oswald",faces:[{weight:"400 700",file:"400"}],captionDefaults:{base:600,emphasis:700}},"Playfair Display":{slug:"playfair-display",faces:[{weight:"400 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},"Bricolage Grotesque":{slug:"bricolage-grotesque",faces:[{weight:"200 800",file:"400"}],captionDefaults:{base:600,emphasis:800}},"Schibsted Grotesk":{slug:"schibsted-grotesk",faces:[{weight:"400 900",file:"400"}],captionDefaults:{base:600,emphasis:800}},"Space Mono":{slug:"space-mono",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}},Poppins:{slug:"poppins",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}},"Bebas Neue":{slug:"bebas-neue",faces:[{weight:"400",file:"400"}],captionDefaults:{base:400,emphasis:400}},"Instrument Serif":{slug:"instrument-serif",faces:[{weight:"400",file:"400"}],captionDefaults:{base:400,emphasis:400}},"National Park":{slug:"national-park",faces:[{weight:"400",file:"400"}],captionDefaults:{base:400,emphasis:400}},Georgia:{slug:"gelasio",faces:[{weight:"400",file:"400"},{weight:"700",file:"700"}],captionDefaults:{base:400,emphasis:700}}}),Qu="normal";function Hs(r){return Vb[r]}function cie(r,e){let t=r.weight.split(/\s+/).map(Number);if(t.some(i=>!Number.isFinite(i)))return!1;if(t.length===1)return t[0]===e;let[n,o]=t;return e>=n&&e<=o}function Ub(r,e,t){if(t!==Qu)return!1;let n=Hs(r);return n?n.faces.some(o=>cie(o,e)):!1}function Bb(r){let e=Hs(r);return e?e.faces.map(t=>t.weight.split(/\s+/).join("-")).join(", "):""}function qb(r){return r.split(",").map(e=>e.trim().replace(/^['"]|['"]$/g,"").trim()).filter(Boolean)}var pie=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);var die=new Map(Object.keys(Vb).map(r=>[r.toLowerCase(),r]));function Wb(r){if(typeof r!="string"||r.trim().length===0)return{kind:"default"};if(r.includes("$brand:")||r.includes("${"))return{kind:"unknown"};let e;for(let t of qb(r)){let n=t.toLowerCase();if(pie.has(n))continue;let o=die.get(n);if(!o)return{kind:"unknown"};e??=o}return e?{kind:"bundled",family:e}:{kind:"default"}}var Xs=Object.freeze({fontFamily:"Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,emphasisFontWeight:800,emphasisFontStyle:"normal"}),lie="Inter";function Zb(r){return typeof r!="string"||r.trim().length===0?{kind:"bundled",family:lie}:Wb(r)}function Gb(r){return(r.kind==="bundled"?Hs(r.family):void 0)?.captionDefaults??{base:Xs.fontWeight,emphasis:Xs.emphasisFontWeight}}function uie(r){let e=r.fontFamily??Xs.fontFamily,t=Zb(r.fontFamily),n=r.fontWeight??Gb(t).base,o=r.emphasisFontFamily,i=o??e,s=o===void 0?t:Zb(o),c=r.emphasisFontWeight??Gb(s).emphasis,u=r.emphasisFontStyle??Xs.emphasisFontStyle;return{base:{role:"base",field:"fontWeight",stack:e,resolved:t,weight:n,style:Qu,fromDefault:r.fontWeight===void 0},emphasis:{role:"emphasis",field:u==="italic"?"emphasisFontStyle":"emphasisFontWeight",stack:i,resolved:s,weight:c,style:u,fromDefault:u==="italic"?r.emphasisFontStyle===void 0:r.emphasisFontWeight===void 0}}}function mie(r){let{base:e,emphasis:t}=uie(r);return t.stack===e.stack&&t.weight===e.weight&&t.style===e.style?[e]:[e,t]}var PMe=Object.freeze(["fontWeight","emphasisFontWeight","emphasisFontStyle"]);function em(r){return r.fromDefault?`no ${r.field} is authored, so the ${r.role} run is drawn at the default ${r.style==="italic"?`${r.field} "italic"`:r.weight}`:`${r.field} ${r.style==="italic"?'"italic"':r.weight} has no file behind it`}function hie(r){if(r.resolved.kind==="default"&&r.style==="italic")return{field:r.field,face:{family:r.stack,weight:r.weight,style:r.style},message:`font_not_reproducible \u2014 ${em(r)}: "${r.stack}" names no font file the render bundle carries, and it ships no italic binary at all, so the browser would slant whatever upright face it matched and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`};if(r.resolved.kind!=="bundled")return null;let e={family:r.resolved.family,weight:r.weight,style:r.style};return r.style==="italic"?{field:r.field,face:e,message:`font_not_reproducible \u2014 ${em(r)}: ${r.resolved.family} ships no italic binary, so the browser would slant the upright face and the render refuses it before capture. Emphasise with emphasisFontWeight, emphasisColor or emphasisScale, or name an uploaded brand font that is sealed in italic.`}:Ub(r.resolved.family,r.weight,r.style)?null:{field:r.field,face:e,message:`font_not_reproducible \u2014 ${em(r)}: ${r.resolved.family} ships ${Bb(r.resolved.family)}. The render refuses a weight outside that range before capture rather than let the browser substitute a nearby file, so set ${r.field} to a weight the family covers, or pick a family whose files do.`}}function tm(r){let e=[];for(let t of mie(r)){let n=hie(t);n&&e.push(n)}return e}var CMe=Object.freeze(["fontFamily","fontWeight","emphasisFontFamily","emphasisFontWeight","emphasisFontStyle"]);function fie(r){return r.caption?{ref:r.caption,slot:"caption"}:r.body?{ref:r.body,slot:"body"}:{ref:r.heading,slot:"heading"}}function gie(r){let e=r.captionProfile?.fontFamily;if(e!==void 0)return{family:e,path:"captionProfile.fontFamily"};let{ref:t,slot:n}=fie(r.fonts);return{family:t?.family,path:`fonts.${n}`}}function Kb(r){let e=gie(r),t=r.captionProfile??{},n={...t,...e.family!==void 0?{fontFamily:e.family}:{fontFamily:void 0}};return tm(n).map(o=>({...o,path:t[o.field]!==void 0?`captionProfile.${o.field}`:e.path}))}var OMe=Object.freeze([400,500,600,700,800,900]);var EMe=new Set([...Fb,...Nb].map(r=>r.toLowerCase()));var Oe=l.string();var Jb=l.discriminatedUnion("mode",[l.object({mode:l.literal("frame-center")}),l.object({mode:l.literal("point"),x:l.number().min(0).max(1),y:l.number().min(0).max(1)}),l.object({mode:l.literal("face"),faceId:l.string().min(1),shotScale:l.enum(["close","standard","wide"]).optional()}),l.object({mode:l.literal("all-faces")}),l.object({mode:l.literal("active-speaker")})]),Hb=l.object({startSec:l.number().nonnegative().describe("Segment START in seconds, clip-relative. Segments tile the clip's duration in order."),endSec:l.number().positive().describe("Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."),focus:Jb.describe("WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."),intent:l.string().optional().describe("Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."),zoom:l.number().min(.1).max(1).optional().describe("How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale`: a face-tracked shot is sized EITHER by the editorial scale (shotScale, calibrated to the detected face) OR by an explicit zoom \u2014 never both."),ease:l.object({in:l.number().nonnegative().describe("Ease-IN ramp DURATION in seconds at the segment START."),out:l.number().nonnegative().describe("Ease-OUT ramp DURATION in seconds at the segment END.")}).optional().describe("Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."),bias:l.object({x:l.number().min(-.3).max(.3).describe("Horizontal nudge, source-normalized (+ = right)."),y:l.number().min(-.3).max(.3).describe("Vertical nudge, source-normalized (+ = down).")}).optional().describe("Optional FINE framing nudge off the focus center, source-normalized in [\u22120.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe \u2014 use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.")}),Xb=Hb.refine(r=>!(r.focus.mode==="face"&&r.focus.shotScale!==void 0&&r.zoom!==void 0),{message:"a face segment takes EITHER focus.shotScale (editorial scale, calibrated to the detected face) OR an explicit zoom \u2014 never both; shotScale wins at bake time and the zoom would be silently discarded",path:["zoom"]}),om=l.object({segments:l.array(Xb).min(1)});var rm=l.object({aspectRatio:l.enum(["16:9","9:16","1:1","4:5"]),fps:l.union([l.literal(24),l.literal(25),l.literal(30),l.literal(60)]).optional(),resolution:l.enum(["hd","fhd","4k"]).optional(),platform:l.string().optional()}),oS=l.object({start:l.number().nonnegative(),end:l.number().nonnegative()}),xie=l.object({start:l.number().nonnegative(),end:l.number().nonnegative(),reason:l.string().optional()}),yie=l.object({kind:l.literal("media"),mediaId:Oe,trim:oS.optional(),excludedRanges:l.array(xie).optional(),volume:l.number().min(0).max(4).optional(),muted:l.boolean().optional(),playbackRate:l.number().positive().optional(),sync:l.enum(["video","independent"]).optional(),kenBurns:l.enum(["in","out","pan-l","pan-r","none"]).optional(),volumeDb:l.number().optional(),fadeInMs:l.number().nonnegative().optional(),fadeOutMs:l.number().nonnegative().optional(),loop:l.boolean().optional(),audioRole:l.enum(["sfx","music","vo","ambience"]).optional(),duck:l.object({duckDb:l.number().max(0),attackMs:l.number().nonnegative(),releaseMs:l.number().nonnegative(),windows:l.array(l.object({startMs:l.number(),endMs:l.number()})).optional()}).optional(),anchor:l.object({clipId:l.string().min(1),offsetMs:l.number()}).optional(),reframe:om.optional()}),bie=l.object({kind:l.literal("component"),componentId:l.string().min(1),props:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),l.string().min(1)).optional(),zPlane:l.enum(["front","behind-subject"]).optional()}),Sie=l.object({kind:l.literal("overlay"),primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()),zPlane:l.enum(["front","behind-subject"]).optional(),anchor:l.object({space:l.literal("scene"),x:l.number().min(0).max(1),y:l.number().min(0).max(1)}).optional(),parallax:l.number().min(-.3).max(.3).optional()}),zie=l.object({kind:l.literal("effect"),primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()).optional()}),vie=l.object({kind:l.literal("alpha-layer"),componentId:l.string().min(1),props:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),l.string().min(1)).optional().describe("Manifest asset slot \u2192 project media id. At mount each slot arrives as `assets[slot].handle`, a fetchable URL for <Img>/<Video>/<Audio>; `props` becomes `params` and never carries an asset URL."),zPlane:l.enum(["front","behind-subject"]).optional()}),wie=l.object({kind:l.literal("card"),html:l.string().min(1),tokens:l.record(l.string(),l.string()).optional(),zPlane:l.literal("front").optional()}),Iie=l.object({kind:l.literal("composition"),compositionId:l.string().min(1),trim:oS.optional()}).strict(),kie=l.discriminatedUnion("kind",[yie,bie,Sie,zie,vie,wie,Iie]),$ie=l.object({type:l.string().min(1),duration:l.number().positive()}),Tie=l.object({x:l.number(),y:l.number()}),nm=l.object({x:l.number().min(0).max(1),y:l.number().min(0).max(1),w:l.number().positive().max(1),h:l.number().positive().max(1)}),Pie=l.enum(["cover","contain"]),Cie=l.object({primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()).optional()}),Oie=l.union([l.enum(["linear","ease","easeIn","easeOut","easeInOut"]),l.object({cubicBezier:l.tuple([l.number(),l.number(),l.number(),l.number()])}).strict()]),Rie=l.object({time:l.number().nonnegative(),value:l.number(),easing:Oie.optional()}).strict(),Mie=l.array(Rie).min(2),Yb=["opacity","scale","rotation","position.x","position.y","volume"],Eie=l.object({id:l.string().min(1),startTime:l.number().nonnegative(),duration:l.number().positive(),source:kie,kind:l.enum(["video","audio","image","overlay","effect"]).optional(),opacity:l.number().min(0).max(1).optional(),scale:l.number().positive().optional(),rotation:l.number().optional(),position:Tie.optional(),region:nm.optional(),fit:Pie.optional(),effects:l.array(Cie).optional(),transitionIn:$ie.optional(),linkGroupId:l.string().min(1).optional(),animate:l.record(l.string(),Mie).superRefine((r,e)=>{for(let t of Object.keys(r))Yb.includes(t)||e.addIssue({code:l.ZodIssueCode.custom,path:[t],message:`"${t}" is not an animatable param (${Yb.join(", ")})`})}).optional()}).strict(),Die=l.object({id:l.string().min(1),startTime:l.number().nonnegative(),duration:l.number().positive()}).strict(),Aie=l.unknown().transform((r,e)=>{let n=(!!r&&typeof r=="object"&&"source"in r?Eie:Die).safeParse(r);return n.success?n.data:(e.issues.push(...n.error.issues),l.NEVER)}),_ie=l.object({id:l.string().min(1),kind:l.enum(["video","audio","image","overlay","effect"]),name:l.string().optional(),enabled:l.boolean().optional(),volume:l.number().min(0).max(4).optional(),contents:l.array(Aie)}).strict(),Lie=l.object({id:l.string().min(1),startTime:l.number().nonnegative(),endTime:l.number().nonnegative().optional(),kind:l.string().min(1),name:l.string().optional(),metadata:l.record(l.string(),l.unknown()).optional()}).strict(),jie=l.object({public:l.boolean().optional(),readerOrgIds:l.array(l.string()).optional(),writerOrgIds:l.array(l.string()).optional()}),Fie=l.object({type:l.string().min(1),source:l.string().optional(),notes:l.string().optional()}),Nie=l.object({audioDescriptionTrackId:l.string().optional(),captionsTrackId:l.string().optional(),signLanguageTrackId:l.string().optional(),notes:l.string().optional()}),Vie=l.object({text:l.string().min(1),startMs:l.number().nonnegative().describe("Word start on the composition timeline, in milliseconds."),endMs:l.number().nonnegative().describe("Word end on the composition timeline, in milliseconds."),emphasis:l.boolean().optional(),annotate:l.enum(["circle","underline"]).optional()}),Qb=l.object({fontFamily:l.string().min(1).optional(),fontSize:l.number().min(1,"captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").max(15,"captions style.fontSize is PERCENT of composition height (1-15, default 5) \u2014 px values are not accepted").optional().describe("Font size as % of composition height (1-15, default 5). NOT px."),fontWeight:l.number().int().min(100).max(900).optional(),color:l.string().min(1).optional(),highlightColor:l.string().min(1).optional(),backgroundColor:l.string().optional(),plate:l.enum(["glass","solid","none"]).optional(),position:l.enum(["top","center","bottom"]).optional(),textTransform:l.enum(["none","uppercase","capitalize"]).optional(),emphasisColor:l.string().optional(),emphasisGradient:l.string().optional(),emphasisScale:l.number().positive().optional(),emphasisFontFamily:l.string().optional(),emphasisFontWeight:l.number().int().min(100).max(900).optional(),emphasisTextTransform:l.enum(["none","uppercase","capitalize"]).optional(),emphasisLetterSpacing:l.number().optional(),emphasisFontStyle:l.enum(["normal","italic"]).optional(),entrance:l.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:l.number().nonnegative().optional(),entranceStaggerMs:l.number().nonnegative().optional(),exitMs:l.number().nonnegative().optional(),emphasisPlate:l.boolean().optional(),emphasisPlateColor:l.string().optional(),emphasisPlateTextColor:l.string().optional(),emphasisPlateAltColor:l.string().optional(),emphasisPlateAltTextColor:l.string().optional(),emphasisPlateRadius:l.number().nonnegative().optional(),emphasisPlatePadX:l.number().optional(),emphasisPlatePadY:l.number().optional(),annotationColor:l.string().optional(),maxWidthPercent:l.number().positive().max(100,"captions style.maxWidthPercent is % of composition width (max 100)").optional()}),eS=l.object({words:l.array(Vie)}),tS=l.enum(["front","behind-subject"]).optional(),Uie=l.discriminatedUnion("source",[l.object({source:l.literal("derived"),from:l.object({clipId:l.string()}),segments:l.array(eS),style:Qb.optional(),zPlane:tS}),l.object({source:l.literal("authored"),segments:l.array(eS),style:Qb.optional(),zPlane:tS})]).superRefine((r,e)=>{if(r.style)for(let t of tm(r.style))e.addIssue({code:"custom",path:["style",t.field],message:t.message})});var ln=l.object({v:l.literal(1,{error:r=>r.input===void 0?'Missing version envelope: add top-level "v": 1 to the composition.':`Invalid version envelope: top-level "v" must be the literal 1 (got ${JSON.stringify(r.input)}).`}),format:rm,tracks:l.array(_ie),markers:l.array(Lie).optional(),captions:Uie.optional(),sourceSuggestionId:l.string().optional(),license:Fie.optional(),licenseVerification:l.enum(["attested","cueframe-verified","third-party-verified"]).optional(),accessibility:Nie.optional(),ownerOrgId:l.string().optional(),acl:jie.optional()}).strict(),Bie=l.enum(["user","agent","import"]),XMe=l.object({id:l.string().min(1),compositionId:Oe,predecessorId:l.string().optional(),createdAt:l.number(),etag:l.string().min(1),authorKind:Bie,authorId:l.string().optional(),composition:ln});var qie="gp-1",Ys=l.literal(qie),rS=nm,un=l.enum(["title-card","stat","lower-third","pull-quote","hero","logo-tag","enumeration","sequence","comparison"]),im=l.object({headline:l.string().max(120).optional(),sub:l.string().max(200).optional(),value:l.string().max(40).optional(),label:l.string().max(80).optional(),items:l.array(l.string().max(80)).max(8).optional(),series:l.array(l.object({label:l.string().max(40),value:l.string().max(16)})).max(8).optional()}).strict(),Wie=l.object({id:l.string().min(1),atSec:l.number().min(0),durSec:l.number().positive(),role:un,copy:im,intent:l.string().min(1).max(400),priority:l.number().int().min(0).max(10).default(5)}).strict(),Zie=l.object({version:Ys,beats:l.array(Wie)}).strict(),Gie=l.enum(["headline","value","label","sublabel","logo","accent-shape","backdrop"]),Kie=l.enum(["heading","body","accent","surface","on-accent","on-surface"]),Jie=l.enum(["front","behind-subject"]),Hie=l.object({elId:l.string().min(1),role:Gie,box:rS,styleRole:Kie,z:Jie.default("front"),text:l.string().max(200).optional(),typeScaleStep:l.number().int().min(0).max(8).optional()}).strict(),ar=1e-6,Xie=(r,e)=>r.x<e.x+e.w-ar&&r.x+r.w>e.x+ar&&r.y<e.y+e.h-ar&&r.y+r.h>e.y+ar,Yie=l.object({version:Ys,beatId:l.string().min(1),frame:l.object({w:l.number().positive(),h:l.number().positive()}).strict(),keepOut:l.array(rS),safe:l.object({titleSafe:l.number().min(0).max(1),actionSafe:l.number().min(0).max(1)}).strict(),elements:l.array(Hie),dropped:l.object({reason:l.string().min(1)}).strict().optional()}).strict().superRefine((r,e)=>{for(let t of r.elements){if(t.z==="behind-subject")continue;let n=t.box;(n.x+n.w>1+ar||n.y+n.h>1+ar)&&e.addIssue({code:l.ZodIssueCode.custom,message:`element ${t.elId} box spills past the frame`,path:["elements"]});for(let o of r.keepOut)Xie(n,o)&&e.addIssue({code:l.ZodIssueCode.custom,message:`element ${t.elId} overlaps a face keep-out (text on the speaker)`,path:["elements"]})}}),Qie=l.enum(["reveal","fade","rise","count-up","wipe"]),ese=l.enum(["pulse","underline","color-shift"]),tse=l.enum(["fade","fall","wipe","cut"]),ose=l.enum(["spring","ease-out","ease-in-out","linear"]),rse=l.object({type:Qie,atMs:l.number().min(0),durMs:l.number().positive(),ease:ose.default("spring"),stagger:l.number().min(0).optional()}).strict(),nse=l.object({type:ese,atMs:l.number().min(0),durMs:l.number().positive()}).strict(),ise=l.object({type:tse,atMs:l.number().min(0),durMs:l.number().positive()}).strict(),sse=l.object({elId:l.string().min(1),enter:rse,emphasis:nse.optional(),exit:ise.optional()}).strict(),ase=l.object({version:Ys,beatId:l.string().min(1),elements:l.array(sse)}).strict(),r2e=l.object({version:Ys,content:Zie,layouts:l.array(Yie),motions:l.array(ase)}).strict();var cse=l.discriminatedUnion("kind",[l.object({kind:l.literal("face"),faceId:l.string().min(1)}),l.object({kind:l.literal("all-faces")}),l.object({kind:l.literal("frame-center")}),l.object({kind:l.literal("active-speaker")}),l.object({kind:l.literal("point"),x:l.number().min(0).max(1),y:l.number().min(0).max(1)})]),pse=l.object({startSec:l.number().nonnegative(),endSec:l.number().positive(),action:l.enum(["frame","keep","trim"]).describe("'frame' = SHOW this span cropped/tracked per `subject`. 'keep' = SHOW this span as-is, no reframe (footage with nothing to track). 'trim' = DELETE this span from the output entirely \u2014 trimmed footage never appears."),subject:cse.optional(),shotScale:l.enum(["close","standard","wide"]).optional(),zoomScale:l.number().min(.4).max(1).optional(),verticalBias:l.number().min(-.3).max(.3).optional(),lateralBias:l.number().min(-.3).max(.3).optional(),intent:l.string().optional()}).refine(r=>r.action!=="frame"||r.subject!==void 0,{message:"frame segment requires a subject \u2014 for footage with no trackable subject use action:'keep' (shown as-is); do NOT trim spans you want shown"}).refine(r=>r.action!=="keep"||r.subject===void 0,{message:"keep segment shows footage as-is \u2014 it takes no subject (use action:'frame' to track one)"}).refine(r=>r.shotScale===void 0||r.zoomScale===void 0,{message:"framing segment takes EITHER shotScale (editorial scale \u2014 the bake calibrates the zoom to the detected face) OR zoomScale (an explicit fraction of the frame), never both: shotScale wins and the zoomScale would be silently discarded",path:["zoomScale"]}),dse=l.object({startSec:l.number().nonnegative(),endSec:l.number().positive(),reason:l.string().min(1)}),lse=l.object({id:l.string().min(1),atSec:l.number().nonnegative(),durSec:l.number().positive(),kind:l.enum(["broll","audio","sfx","music","ambience","gif","image"]),source:l.enum(["find","generate"]),intent:l.string().min(1),resolvedMediaId:l.string().optional()}),use=l.object({id:l.string().min(1),atSec:l.number().nonnegative(),durSec:l.number().positive(),role:un,copy:im,intent:l.string().min(1)}),mse=l.object({startSec:l.number().nonnegative(),endSec:l.number().nonnegative().optional(),kind:l.string().min(1),name:l.string().optional()}),a2e=l.object({framing:l.array(pse).min(1),cuts:l.array(dse).optional(),captions:l.object({styleIntent:l.string().optional()}).optional(),assets:l.array(lse).optional(),graphics:l.array(use).optional(),markers:l.array(mse).optional()});var hse=l.union([l.enum(["linear","ease","ease-in","ease-out","ease-in-out"]),l.object({kind:l.literal("cubic-bezier"),x1:l.number().min(0).max(1),y1:l.number(),x2:l.number().min(0).max(1),y2:l.number()})]),St=l.string().min(1),sm=l.union([l.object({kind:l.literal("system"),family:l.string().min(1),weight:l.number().int().min(1).max(1e3).optional(),style:l.enum(["normal","italic"]).optional()}),l.object({kind:l.literal("web"),family:l.string().min(1),url:l.string().url().optional(),weight:l.number().int().min(1).max(1e3).optional(),style:l.enum(["normal","italic"]).optional()}),l.object({kind:l.literal("uploaded"),fontId:Oe,family:l.string().optional(),weight:l.number().int().min(1).max(1e3).optional(),style:l.enum(["normal","italic"]).optional()})]),fse=l.object({primary:l.string().min(1),secondary:l.string().optional(),accent:l.string().min(1),background:l.string().min(1),text:l.string().min(1),textMuted:l.string().optional(),border:l.string().optional(),surface:l.string().optional(),card:l.string().optional(),gridLine:l.string().optional(),accentMuted:l.string().optional(),textOnAccent:l.string().optional(),textOnSurface:l.string().optional()}),gse=l.object({heading:sm,body:sm.optional(),caption:sm.optional()}),xse=l.object({base:l.number().positive().optional(),lg:l.number().positive().optional(),sm:l.number().positive().optional()}),yse=l.object({fontSizeHeading:l.number().positive().optional(),fontSizeBody:l.number().positive().optional(),fontSizeLabel:l.number().positive().optional(),borderRadius:l.number().nonnegative().optional()}),bse=l.object({duration:l.number().positive().optional(),easing:hse.optional(),entrance:l.enum(["none","fade","word-pop","stagger-up"]).optional(),staggerMs:l.number().nonnegative().optional(),exitMs:l.number().nonnegative().optional()}),iS=l.enum(["tl","tr","bl","br"]),Sse=l.object({src:l.string().min(1),alt:l.string().optional(),placement:iS.optional(),sizePct:l.number().positive().optional()}),nS=l.object({kind:l.enum(["card","video"]),src:l.string().min(1).optional(),title:l.string().optional(),subtitle:l.string().optional(),durationMs:l.number().positive().optional()}),zse=l.object({src:l.string().min(1),opacity:l.number().min(0).max(1).optional(),placement:iS.optional()}),vse=l.discriminatedUnion("kind",[l.object({kind:l.literal("card"),html:l.string().min(1),tokens:l.record(l.string(),l.string()).optional()}),l.object({kind:l.literal("overlay"),primitiveId:l.string().min(1),params:l.record(l.string(),l.unknown()).optional()}),l.object({kind:l.literal("component"),componentId:l.string().min(1),props:l.record(l.string(),l.unknown()).optional()})]),wse=l.enum(["fade-up","slide-in-left","slide-in-right","scale-pop","stagger-reveal"]),Ise=l.object({id:l.string().min(1).max(40),observed:l.string().min(1).max(500),body:vse,motion:l.object({preset:wse,enterMs:l.number().int().min(0).max(5e3).optional(),exitMs:l.number().int().min(0).max(5e3).optional(),staggerMs:l.number().int().min(0).max(2e3).optional(),confidence:l.enum(["high","low"]).optional()}).optional(),role:un,zone:l.object({x:l.number(),y:l.number(),w:l.number(),h:l.number()}).optional(),evidence:l.array(l.number().int().min(0)).max(24).optional(),diffScore:l.number().min(0).max(1).optional(),coverage:l.enum(["reproduced","approximated","skipped"]),skipReason:l.string().max(300).optional()}),kse=l.object({public:l.boolean().optional(),readerOrgIds:l.array(l.string()).optional(),writerOrgIds:l.array(l.string()).optional()}),$se=l.object({type:l.string().min(1),source:l.string().optional(),notes:l.string().optional()}),sS=l.object({id:l.string().min(1),name:l.string().min(1),colors:fse,fonts:gse,spacing:xse.optional(),sizing:yse.optional(),motion:bse.optional(),captionProfile:l.object({color:l.string().optional(),highlightColor:l.string().optional(),emphasisColor:l.string().optional(),plate:l.enum(["glass","solid","none"]).optional(),entrance:l.enum(["none","fade","word-pop","stagger-up"]).optional(),entranceMs:l.number().optional(),entranceStaggerMs:l.number().optional(),exitMs:l.number().optional(),fontFamily:l.string().optional(),fontWeight:l.number().int().min(100).max(900).multipleOf(100).optional(),emphasisFontFamily:l.string().optional(),emphasisScale:l.number().positive().optional(),emphasisFontWeight:l.number().int().min(100).max(900).optional(),emphasisFontStyle:l.enum(["normal","italic"]).optional(),emphasisTextTransform:l.enum(["none","uppercase"]).optional(),emphasisLetterSpacing:l.number().optional(),emphasisPlate:l.boolean().optional(),emphasisPlateColor:l.string().optional(),emphasisPlateTextColor:l.string().optional()}).optional(),exemplarKeys:l.array(l.string().min(1)).max(24).optional(),contactSheetKey:l.string().min(1).optional(),motifs:l.array(Ise).max(24).optional(),styleRubric:l.string().max(4e3).optional(),density:l.object({graphicsPerMin:l.number().min(0).max(60),maxSimultaneous:l.number().int().min(1).max(6)}).optional(),inspiration:l.object({sources:l.array(l.string()).min(1).max(24),extractedAt:l.number(),extractionVersion:l.string().min(1).max(60)}).optional(),logo:Sse.optional(),intro:nS.optional(),outro:nS.optional(),watermark:zse.optional(),audio:l.object({sfxIntensity:l.enum(["off","light","standard","dense"]).optional(),musicEnabled:l.boolean().optional(),musicMood:l.string().max(300).optional(),sonicLogo:l.object({ref:St,placement:l.enum(["intro","outro","both"]),offsetMs:l.number().int().min(0).max(1e4).optional()}).optional(),uiSoundSet:l.object({tick:St.optional(),pop:St.optional(),impact:St.optional(),confirm:St.optional(),error:St.optional(),whoosh:St.optional(),riser:St.optional()}).optional(),bedStyle:l.object({bedId:St.optional(),genre:l.string().max(120).optional(),bpmRange:l.object({min:l.number(),max:l.number()}).optional()}).optional(),ambiencePreference:l.object({ref:St}).nullable().optional()}).optional(),license:$se.optional(),licenseVerification:l.enum(["attested","cueframe-verified","third-party-verified"]).optional(),ownerOrgId:l.string().optional(),acl:kse.optional()}).superRefine((r,e)=>{for(let t of Kb(r))e.addIssue({code:"custom",path:t.path.split("."),message:t.message})});var Tse=l.enum(["pending","uploading","analyzing","subsetting","ready","partial","failed"]),Pse=l.object({weight:l.number().int().min(100).max(900),style:l.enum(["normal","italic"]),storageKey:l.string().min(1),byteSize:l.number().int().nonnegative().optional(),subsetComplete:l.boolean().optional()}),f2e=l.object({id:l.string().min(1),family:l.string().min(1),status:Tse,variants:l.array(Pse).nonempty(),source:l.enum(["uploaded","system","web"]).optional(),license:l.object({type:l.string().min(1),source:l.string().optional(),notes:l.string().optional()}).optional(),createdAt:l.number().optional(),ownerOrgId:l.string().optional()});var Cse=l.enum(["interactive","standard","background"]),Ose=l.enum(["preview","final"]),Rse=l.enum(["offline","live"]),Mse=l.enum(["user","agent","cost_limit","superseded","source_removed","timeout","error"]),aS=l.enum(["pending","rendering","complete","error","cancelled"]),Ese=l.object({phase:l.string().min(1),percent:l.number().min(0).max(100),scenesTotal:l.number().int().positive().optional()}),Dse=l.object({package:l.string().min(1),name:l.string().min(1),version:l.string().min(1)}),Ase=l.object({mediaId:Oe,presignedUrl:l.string().url(),expiresAt:l.number().optional()}),_se=l.object({composition:ln,brandKit:sS.optional(),mediaSources:l.array(Ase),registryPins:l.array(Dse),capturedAt:l.number()}),Lse=l.object({kind:l.literal("r2"),path:l.string().optional()}),jse=l.object({kind:l.literal("s3"),credentialId:l.string().min(1),bucket:l.string().min(1),key:l.string().min(1),region:l.string().optional(),acl:l.string().optional()}),Fse=l.object({kind:l.literal("youtube"),credentialId:l.string().min(1),title:l.string().min(1),description:l.string().optional(),privacy:l.enum(["public","unlisted","private"]),tags:l.array(l.string()).optional()}),Nse=l.object({kind:l.literal("mux"),credentialId:l.string().min(1),passthrough:l.string().optional()}),Vse=l.object({kind:l.literal("webhook"),url:l.string().url(),signingKeyId:l.string().optional(),headers:l.record(l.string(),l.string()).optional()}),Use=l.discriminatedUnion("kind",[Lse,jse,Fse,Nse,Vse]),Bse=l.enum(["pending","uploading","delivered","failed"]),qse=l.object({destinationIndex:l.number().int().nonnegative(),status:Bse,url:l.string().url().optional(),deliveredAt:l.number().optional(),error:l.string().optional()}),z2e=l.object({id:Oe,projectId:Oe.optional(),compositionId:Oe,compositionVersionId:l.string().min(1),status:aS,progress:Ese.optional(),mode:Rse.optional(),priority:Cse,intent:Ose.optional(),snapshot:_se.optional(),snapshotRef:l.string().optional(),outputUrl:l.string().url().optional(),outputExpiresAt:l.number().optional(),destinations:l.array(Use).optional(),destinationResults:l.array(qse).optional(),cancelReason:Mse.optional(),error:l.object({code:l.string(),message:l.string(),details:l.record(l.string(),l.unknown()).optional()}).optional(),createdAt:l.number(),updatedAt:l.number()}),v2e=l.object({jobId:Oe,status:aS,percent:l.number().min(0).max(100).optional(),framesRendered:l.number().int().nonnegative().optional(),framesTotal:l.number().int().positive().optional()});var Wse=l.enum(["first-party","community-verified","community-unverified","user-private","sandbox","deprecated"]),Zse=l.enum(["2d","immersive","interactive"]),Gse=l.object({path:l.string().min(1),fallback:l.unknown()}),Kse=l.object({effectName:l.string().min(1),metadata:l.record(l.string(),l.unknown()).optional()}),Jse=l.object({description:l.string().optional(),use_when:l.array(l.string()).optional(),avoid_when:l.array(l.string()).optional(),vibe:l.array(l.string()).optional(),formats:l.array(l.string()).optional(),pairs_well_with:l.array(l.string()).optional(),exemplars:l.array(l.string()).optional()}),k2e=l.object({name:l.string().min(1),package:l.string().min(1),category:l.enum(["overlay","text","effect","transition","layout"]),version:l.string().min(1),origin:Wse,modes:l.array(Zse).optional(),paramsSchema:l.unknown(),varyingParams:l.array(l.string()).optional(),extends:l.string().optional(),tokens:l.array(Gse).optional(),otio:Kse.optional(),meta:Jse.optional()});var O2e=l.object({id:Oe,name:l.string().min(1),defaultFormat:rm.optional(),palConformDefault:l.union([l.literal(24),l.literal(30)]).optional(),activeCompositionId:Oe.nullable().optional(),brandKitId:l.string().optional(),ownerOrgId:l.string().optional(),createdAt:l.number(),updatedAt:l.number()});var Hse=l.enum(["main","wide","facecam","screen","audio"]),Xse=l.object({mediaId:Oe,role:Hse,label:l.string().optional()}),Yse=l.object({videoRole:l.enum(["main","wide","facecam","screen"]),audioRole:l.literal("audio")}),D2e=l.object({id:Oe,name:l.string().min(1),members:l.array(Xse).nonempty(),mux:l.array(Yse).optional(),ownerOrgId:l.string().optional(),createdAt:l.number(),updatedAt:l.number()});var j2e=l.enum(["render.completed","media.transcribed","media.completed","composition.updated"]),Qse=l.enum(["pending","delivering","delivered","failed","exhausted"]),F2e=l.object({id:Oe,url:l.string().url(),events:l.array(l.string().min(1)).nonempty(),signingKeyId:l.string().optional(),headers:l.record(l.string(),l.string()).optional(),enabled:l.boolean().optional(),ownerOrgId:l.string().optional(),createdAt:l.number(),updatedAt:l.number()}),N2e=l.object({id:l.string().min(1),webhookId:Oe,event:l.string().min(1),payload:l.record(l.string(),l.unknown()),status:Qse,attemptCount:l.number().int().nonnegative(),responseStatus:l.number().int().optional(),responseBody:l.string().optional(),error:l.string().optional(),createdAt:l.number(),deliveredAt:l.number().optional()});function hn(r){return"source"in r}function mn(r){return r.startTime+r.duration}function eae(r){let e=[],t=[...r.contents].sort((n,o)=>n.startTime-o.startTime);for(let n=1;n<t.length;n++){let o=t[n-1],i=t[n];i.startTime<mn(o)&&e.push({code:"track_clips_overlap",message:`Track ${r.id}: items ${o.id} and ${i.id} overlap at [${i.startTime}, ${Math.min(mn(o),mn(i))})`,details:{trackId:r.id,clipAId:o.id,clipBId:i.id,overlapRange:[i.startTime,Math.min(mn(o),mn(i))]}})}return e}function tae(r){let e=[];for(let t of r.contents){if(!hn(t))continue;oae(r.kind,t.source.kind)||e.push({code:"clip_source_track_kind_mismatch",message:`Track ${r.id} (kind=${r.kind}) cannot hold TimelineClip ${t.id} (source.kind=${t.source.kind})`,details:{trackId:r.id,clipId:t.id,sourceKind:t.source.kind,trackKind:r.kind}})}return e}function oae(r,e){switch(r){case"video":return e==="media"||e==="component"||e==="composition";case"audio":return e==="media"||e==="component";case"image":return e==="media"||e==="component";case"overlay":return e==="overlay"||e==="component"||e==="alpha-layer"||e==="card";case"effect":return e==="effect"}}function rae(r){let e=[],t=[...r.contents].sort((n,o)=>n.startTime-o.startTime);for(let n=0;n<t.length;n++){let o=t[n];if(!hn(o)||!o.transitionIn)continue;let i=t[n-1];if(!i||!hn(i)){e.push({code:"transition_no_predecessor",message:`Track ${r.id}: TimelineClip ${o.id} has transitionIn but no TimelineClip predecessor`,details:{trackId:r.id,clipId:o.id}});continue}let s=o.transitionIn.duration,c=Math.min(i.duration,o.duration);s>c&&e.push({code:"transition_too_long",message:`Track ${r.id}: TimelineClip ${o.id} transitionIn.duration (${s}) exceeds available headroom (${c})`,details:{trackId:r.id,clipId:o.id,transitionDuration:s,available:c}})}return e}function nae(r){let e=[];for(let t of r.contents){if(!hn(t)||t.source.kind!=="media")continue;let n=t.source.excludedRanges;if(!n||n.length===0)continue;let o=t.source.trim,i=o?.start??0,s=o?.end??i+t.duration,c=-1/0,u=0,m=!1;for(let y=0;y<n.length;y++){let S=n[y];if(S.end<=S.start){e.push({code:"excluded_range_invalid",message:`Track ${r.id}: TimelineClip ${t.id} excludedRanges[${y}] end (${S.end}) must be > start (${S.start})`,details:{trackId:r.id,clipId:t.id,index:y,start:S.start,end:S.end}}),m=!0;break}if(S.start<i||S.end>s){e.push({code:"excluded_range_out_of_bounds",message:`Track ${r.id}: TimelineClip ${t.id} excludedRanges[${y}] [${S.start}, ${S.end}] outside trim [${i}, ${s}]`,details:{trackId:r.id,clipId:t.id,index:y,start:S.start,end:S.end,trimStart:i,trimEnd:s}}),m=!0;break}if(S.start<c){e.push({code:"excluded_range_overlap",message:`Track ${r.id}: TimelineClip ${t.id} excludedRanges[${y}] overlaps preceding range (start ${S.start} < prevEnd ${c})`,details:{trackId:r.id,clipId:t.id,index:y,start:S.start,prevEnd:c}}),m=!0;break}c=S.end,u+=S.end-S.start}if(m)continue;let h=s-i,g=h-u;Math.abs(g-t.duration)>.001&&e.push({code:"excluded_range_duration_mismatch",message:`Track ${r.id}: TimelineClip ${t.id} duration (${t.duration}) \u2260 trimSpan (${h}) \u2212 \u03A3excluded (${u}) = ${g}`,details:{trackId:r.id,clipId:t.id,expected:g,actual:t.duration,trimSpan:h,totalExcluded:u}})}return e}function iae(r){let e=[];for(let t of r.contents){if(!hn(t)||t.source.kind!=="media")continue;let n=t.source.trim;if(!n)continue;let o=t.source.playbackRate??1;if(!(o>0))continue;let i=t.source.excludedRanges;if(i&&i.length>0)continue;let s=n.end-n.start,c=s/o;Math.abs(c-t.duration)>.001&&e.push({code:"clip_duration_trim_mismatch",message:`Track ${r.id}: TimelineClip ${t.id} duration (${t.duration}) \u2260 trimSpan (${s}) \xF7 playbackRate (${o}) = ${c}`,details:{trackId:r.id,clipId:t.id,expected:c,actual:t.duration,trimSpan:s,playbackRate:o}})}return e}function sae(r){return[...eae(r),...tae(r),...rae(r),...nae(r),...iae(r)]}function cS(r){let e=[];for(let t of r.tracks)e.push(...sae(t));return e}var fn=r=>r.endTime??r.startTime;function pS(r){let e=(r.markers??[]).filter(n=>n.kind==="scene").sort((n,o)=>n.startTime-o.startTime),t=[];for(let n=1;n<e.length;n++){let o=e[n-1],i=e[n];i.startTime<fn(o)&&t.push({code:"scene_marker_overlap",message:`Scene markers ${o.id} and ${i.id} overlap at [${i.startTime}, ${Math.min(fn(o),fn(i))})`,details:{markerAId:o.id,markerBId:i.id,overlapRange:[i.startTime,Math.min(fn(o),fn(i))]}})}return t}function dS(r){let e=new Map,t=[],n=(o,i)=>{let s=e.get(o);s?t.push({code:"composition_id_collision",message:`Id ${o} used by both ${s} and ${i}`,details:{id:o,existingKind:s,newKind:i}}):e.set(o,i)};for(let o of r.tracks){n(o.id,"track");for(let i of o.contents)n(i.id,"source"in i?"clip":"gap")}for(let o of r.markers??[])n(o.id,"marker");return t}function aae(r){let e=r.animate;if(!e)return[];let t=[];for(let[n,o]of Object.entries(e)){if(!o)continue;let i=[...o].sort((s,c)=>s.time-c.time);for(let s of i)s.time>r.duration+1e-6&&t.push({code:"varying_keyframe_time_out_of_range",message:`clip "${r.id}" animates "${n}" at ${s.time}s, past its own duration of ${r.duration}s \u2014 that keyframe can never be reached`,details:{clipId:r.id,param:n,time:s.time,duration:r.duration}});for(let s=1;s<i.length;s++)Math.abs(i[s].time-i[s-1].time)<1e-6&&t.push({code:"varying_keyframe_duplicate_time",message:`clip "${r.id}" has two "${n}" keyframes at ${i[s].time}s \u2014 the value at that instant is undefined`,details:{clipId:r.id,param:n,time:i[s].time}})}return t}function lS(r){let e=[];for(let t of r.tracks)for(let n of t.contents)"source"in n&&e.push(...aae(n));return e}function uS(r){return[...dS(r),...cS(r),...pS(r),...lS(r)]}var am=2,cae=2,Qs=2,cm=l.enum(["image","video","audio","data"]),pae=l.union([l.literal(256),l.literal(512),l.literal(1024),l.literal(2048)]),dae=l.discriminatedUnion("mode",[l.object({mode:l.literal("original")}).strict(),l.object({mode:l.literal("tier"),tier:pae}).strict(),l.object({mode:l.literal("auto"),maxProjectedWidthRatio:l.number().positive().max(64),maxProjectedHeightRatio:l.number().positive().max(64),minVisibleSourceWidthRatio:l.number().positive().max(1).default(1),minVisibleSourceHeightRatio:l.number().positive().max(1).default(1)}).strict()]),lae=l.object({kind:cm,required:l.boolean(),mimeTypes:l.array(l.string().min(1)).min(1).optional(),mediaDemand:dae.optional()}).strict(),mS=l.enum(["canvas2d","webgl","webgl2","webgpu"]),pm=l.object({api:mS,required:l.literal(!0),accelerationPreference:l.enum(["hardware-preferred","software-allowed"])}).strict(),hS=l.object({version:l.literal(2)}).strict(),fS=l.enum(["angle","angle-egl","swangle","vulkan"]),gS=l.object({glBackend:fS,colorPipeline:l.literal("srgb"),sceneShot:hS.nullable()}).strict(),uae=l.object({webgl:l.string().min(1),renderer:l.string(),maxTextureSize:l.number().int().positive(),halfFloatColorTarget:l.string().min(1),glBackend:fS}).strict(),mae=l.object({loadedRuntimeIdentity:l.string().min(1),loadedDependencyIdentity:l.string().min(1),observedRasterAffectingFlags:l.object({browserArguments:l.array(l.string().min(1))}).strict(),browserProduct:l.string().min(1),browserVersion:l.string().min(1),browserExecutableSha256:l.string().regex(/^[a-f0-9]{64}$/),headless:l.boolean(),os:l.string().min(1),arch:l.string().min(1),deviceScaleFactor:l.number().positive(),colorProfile:l.string().min(1),actualGlBackend:l.string().min(1),actualRenderer:l.string().min(1),gpuIdentity:l.string().min(1).nullable()}).strict(),wEe=mae.omit({deviceScaleFactor:!0}).strict(),IEe=l.object({handle:l.string().min(1),mimeType:l.literal("image/png"),byteLength:l.number().int().positive(),width:l.number().int().positive(),height:l.number().int().positive(),encodedSha256:l.string().regex(/^[a-f0-9]{64}$/)}).strict(),kEe=l.object({sessionId:l.string().uuid(),requestId:l.number().int().nonnegative(),frame:l.number().int().nonnegative(),deviceScaleFactor:l.number().positive()}).strict(),xS=l.object({version:l.literal(am),assets:l.record(l.string().min(1),lae),graphics:pm,alphaPolicy:l.enum(["requires-transparency","allows-opaque"]),sceneShot:hS.optional()}).strict(),$Ee=Object.freeze({version:am,assets:Object.freeze({}),graphics:Object.freeze({api:"canvas2d",required:!0,accelerationPreference:"software-allowed"}),alphaPolicy:"requires-transparency"}),ea=l.object({version:l.literal(am),componentId:l.string().min(1).max(128).regex(/^[a-z0-9][a-z0-9._-]*$/),tsxSource:l.string().min(1),manifest:xS}).strict(),TEe=l.object({version:l.literal(1),sourceVersionId:l.string().regex(/^[a-f0-9]{64}$/)}).strict();var yS=l.object({handle:l.string().min(1).max(256),kind:cm,mimeType:l.string().min(1),contentSha256:l.string().regex(/^[a-f0-9]{64}$/),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),durationSec:l.number().positive().optional(),frameRate:l.number().positive().optional()}).strict(),hae=l.object({handle:l.string().min(1).max(256),kind:cm,mimeType:l.string().min(1),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),durationSec:l.number().positive().optional(),frameRate:l.number().positive().optional()}).strict(),fae=l.object({path:l.string().min(1)}).strict(),PEe=l.object({version:l.literal(cae),bundleId:l.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:l.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:l.string().min(1),dependencyLockDigest:l.string().regex(/^[a-f0-9]{64}$/),entrypoint:l.string().min(1),manifest:xS}).strict(),CEe=l.object({version:l.literal(Qs),bundleId:l.string().regex(/^[a-f0-9]{64}$/),params:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),yS),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),alpha:l.boolean(),graphics:pm,seed:l.string().min(1),renderer:gS}).strict(),OEe=l.object({version:l.literal(Qs),source:ea,params:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),yS),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),codec:l.enum(["vp9","prores"]),runtimeDigest:l.string().min(1),dependencyLockDigest:l.string().regex(/^[a-f0-9]{64}$/),seed:l.string().min(1)}).strict(),REe=l.object({version:l.literal(Qs),source:ea,params:l.record(l.string(),l.unknown()),assets:l.record(l.string().min(1),hae),assetFiles:l.record(l.string().min(1),fae),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),codec:l.enum(["vp9","prores"]),runtimeDigest:l.string().min(1),dependencyLockDigest:l.string().regex(/^[a-f0-9]{64}$/),seed:l.string().min(1)}).strict(),gae=l.object({api:mS,acceleration:l.enum(["hardware","software"]),adapterName:l.string().min(1).optional(),deviceLost:l.literal(!1)}).strict(),MEe=l.object({version:l.literal(Qs),artifactId:l.string().regex(/^[a-f0-9]{64}$/),renderKey:l.string().regex(/^[a-f0-9]{64}$/),bundleId:l.string().regex(/^[a-f0-9]{64}$/),sourceVersionId:l.string().regex(/^[a-f0-9]{64}$/),runtimeDigest:l.string().min(1),outputSha256:l.string().regex(/^[a-f0-9]{64}$/),outputBytes:l.number().int().positive(),codec:l.enum(["png","vp9","prores"]),width:l.number().int().positive(),height:l.number().int().positive(),fps:l.number().positive(),durationInFrames:l.number().int().positive(),alpha:l.boolean(),requestedGraphics:pm,actualGraphics:gae,renderer:gS,host:uae.nullable()}).strict(),xae=["invalid_component_source","unsupported_runtime_version","component_does_not_compile","component_runtime_error","component_deadline_exceeded","component_resource_exhausted","component_asset_undeclared","component_asset_unavailable","component_asset_integrity_failed","component_network_denied","component_import_denied","component_graphics_unavailable","component_graphics_mismatch","component_device_lost","component_output_invalid","component_conflict","component_scene_invalid"],EEe=l.enum(xae),cr=class extends Error{code;retryable;locator;constructor(e,t,n){super(t,n?.cause===void 0?void 0:{cause:n.cause}),this.name="ComponentRuntimeError",this.code=e,this.retryable=n?.retryable??!1,n?.locator&&(this.locator=n.locator)}};import{createHash as yae}from"crypto";function bS(r){return r.replace(/\r\n?/g,`
118
+ `).normalize("NFC")}function dm(r,e){if(r===null||typeof r=="boolean")return r;if(typeof r=="string")return bS(r);if(typeof r=="number"){if(!Number.isFinite(r))throw new TypeError("Canonical JSON does not support non-finite numbers.");return Object.is(r,-0)?0:r}if(typeof r!="object")throw new TypeError(`Canonical JSON does not support ${typeof r} values.`);if(e.has(r))throw new TypeError("Canonical JSON does not support cyclic values.");e.add(r);try{if(Array.isArray(r))return r.map(i=>dm(i,e));let t=Object.getPrototypeOf(r);if(t!==Object.prototype&&t!==null)throw new TypeError("Canonical JSON only supports plain objects.");let n=r,o={};for(let i of Object.keys(n).sort()){let s=n[i];if(s===void 0)throw new TypeError("Canonical JSON does not support undefined values.");o[bS(i)]=dm(s,e)}return o}finally{e.delete(r)}}function SS(r){return JSON.stringify(dm(r,new Set))}function zS(r){return SS(r)}function bae(r){return yae("sha256").update(r).digest("hex")}function vS(r){return bae(zS(r))}var tz=Pz(YS(),1);var Gm=Object.freeze(["react","react/jsx-runtime","remotion","@remotion/media","@remotion/layout-utils","@remotion/transitions","@remotion/motion-blur","@remotion/noise","@remotion/paths","@remotion/shapes","@remotion/three","three","three/webgpu","three/tsl","@react-three/fiber","@cueframe/animate","gsap","postprocessing"]);var QS=new Set(Gm),Fce=new Set(["Math.random","Date.now","performance.now","crypto.getRandomValues","crypto.randomUUID"]),Nce=new Set(["Date","requestAnimationFrame","setTimeout","setInterval"]),Vce=new Set(["Audio","Html5Audio","Html5Video","OffthreadVideo","Video"]);function ez(r){let e=r.imported;return r.type!=="ImportSpecifier"||!e?null:e.type==="Identifier"&&typeof e.name=="string"?e.name:e.type==="StringLiteral"&&typeof e.value=="string"?e.value:null}function oz(r){if(!r||typeof r!="object")return null;let e=r;if(e.type==="Identifier"&&typeof e.name=="string")return e.name;if(e.type!=="MemberExpression"&&e.type!=="OptionalMemberExpression")return null;let t=oz(e.object);if(!t||!e.property||typeof e.property!="object")return null;let n=e.property,o=e.computed===!0?n.type==="StringLiteral"&&typeof n.value=="string"?n.value:null:n.type==="Identifier"&&typeof n.name=="string"?n.name:null;return o?`${t}.${o}`:null}function Km(r){return oz(r)?.replace(/^(?:globalThis|window|self)\./,"")??null}function ot(r){throw new cr("component_import_denied",`Component import is not allowed: ${JSON.stringify(r)}.`)}function rz(r,e){let t,n=!1;try{t=(0,tz.parse)(r,{sourceType:"module",plugins:["jsx","typescript"],errorRecovery:!1})}catch(i){throw new cr("component_does_not_compile",i instanceof Error?i.message:String(i))}let o=i=>{if(!i||typeof i!="object")return;if(Array.isArray(i)){for(let u of i)o(u);return}let s=i,c=s.type;if((c==="ImportDeclaration"||c==="ExportNamedDeclaration"||c==="ExportAllDeclaration")&&s.source&&typeof s.source=="object"){let u=s.source.value;if(typeof u=="string"&&!QS.has(u)&&ot(u),(u==="remotion"||u==="@remotion/media")&&c==="ImportDeclaration"){let h=(Array.isArray(s.specifiers)?s.specifiers:[]).map(ez).find(g=>g!==null&&Vce.has(g));h&&ot(`${u}.${h}; use @cueframe/animate MediaTileScene`)}if(u==="@cueframe/animate"&&c==="ImportDeclaration"){let m=Array.isArray(s.specifiers)?s.specifiers:[];n||=m.map(ez).some(h=>h==="MediaTileScene"||h==="ImageTileScene")}}if(c==="ImportExpression"&&ot("dynamic import()"),c==="CallExpression"){let u=s.callee;u?.type==="Import"&&ot("dynamic import()"),u?.type==="Identifier"&&u.name==="require"&&ot("require()"),u?.type==="Identifier"&&typeof u.name=="string"&&Nce.has(u.name)&&ot(`ambient ${u.name}`);let m=Km(s.callee),h=Array.isArray(s.arguments)?s.arguments:[],g=h[0]?.type==="StringLiteral"?h[0].value:void 0;m==="document.createElement"&&(g==="video"||g==="audio")&&ot(`raw ${g} element; use @cueframe/animate MediaTileScene`)}if(c==="JSXOpeningElement"){let u=s.name;u?.type==="JSXIdentifier"&&(u.name==="video"||u.name==="audio")&&ot(`raw <${String(u.name)}> element; use @cueframe/animate MediaTileScene`)}if(c==="NewExpression"){let u=s.callee;u?.type==="Identifier"&&(u.name==="Date"||u.name==="Worker"||u.name==="SharedWorker")&&ot(`ambient ${String(u.name)}`)}if(c==="MemberExpression"||c==="OptionalMemberExpression"){let u=Km(s);u&&Fce.has(u)&&ot(`ambient ${u}`)}if(c==="VariableDeclarator"){let u=Km(s.init),m=s.id;u&&["Math","Date","performance","crypto"].includes(u)&&m?.type==="Identifier"&&ot(`ambient ${u} alias`),u==="Math"&&m?.type==="ObjectPattern"&&(Array.isArray(m.properties)?m.properties:[]).some(g=>{let y=g.key;return y?.name==="random"||y?.value==="random"})&&ot("ambient Math.random alias")}if(c==="TSImportType"){let u=s.argument;u?.type==="StringLiteral"&&typeof u.value=="string"&&!QS.has(u.value)&&ot(u.value)}for(let[u,m]of Object.entries(s))u==="loc"||u==="start"||u==="end"||u==="errors"||u==="comments"||o(m)};if(o(t),n&&e!==void 0&&e!=="webgl2")throw new cr("component_graphics_mismatch","MediaTileScene requires manifest.graphics.api to be webgl2.")}var ho=l.string().min(1),nz=l.enum(["image","video","audio","data"]),Uce=l.object({version:l.literal(1),project:l.object({version:l.literal(4),id:ho,name:ho,createdAt:l.number().finite(),modifiedAt:l.number().finite(),composition:ln,pool:l.array(l.object({id:ho,kind:nz}).passthrough()),authoredComponents:l.never().optional(),recipe:l.object({schemaVersion:l.literal(1),slug:l.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),mediaSlots:l.array(l.object({id:ho,projectMediaId:ho,kind:nz}).passthrough()).length(1),cloudBrandKit:qu,components:l.array(l.object({componentId:ho,name:ho,category:l.enum(["effects","transitions","text","layouts"]),propSchema:l.record(l.string(),l.unknown()).optional(),sourceVersionId:l.never().optional()}).strict())}).passthrough()}).passthrough(),components:l.array(ea)}).strict();function Jm(r,e,t){let n=new Map;for(let o of r){let i=e(o);if(n.has(i))throw new Error(`Duplicate ${t}: ${i}`);n.set(i,o)}return n}function iz(r){let e=Uce.parse(r),t=uS(e.project.composition);if(t.length)throw new Error(t.map(S=>`${S.code}: ${S.message}`).join(`
119
+ `));let o=structuredClone(r).project,i=Jm(e.components,S=>S.componentId,"component source"),s=Jm(o.recipe.components,S=>S.componentId,"recipe component"),c=Jm(o.pool,S=>S.id,"pool media id");for(let S of o.recipe.mediaSlots)if(c.get(S.projectMediaId)?.kind!==S.kind)throw new Error(`Media slot ${S.id} must match a pool entry of kind ${S.kind}.`);let u=new Map;for(let[S,w]of i){if(!s.has(S))throw new Error(`Missing recipe metadata for component ${S}.`);if(Buffer.byteLength(w.tsxSource,"utf8")>5e5)throw new Error(`Component ${S} exceeds the recipe loader's 500000-byte source limit.`);rz(w.tsxSource,w.manifest.graphics.api),u.set(S,vS(w))}for(let S of s.keys())if(!i.has(S))throw new Error(`Missing source for component ${S}.`);for(let S of o.composition.tracks)for(let w of S.contents){if(!("source"in w))continue;let T=w.source;if(T.kind==="media"&&!c.has(T.mediaId))throw new Error(`Missing pool media ${T.mediaId}.`);if(T.kind!=="component"&&T.kind!=="alpha-layer")continue;let M=i.get(T.componentId);if(!M)throw new Error(`Missing source for placed component ${T.componentId}.`);if(Object.hasOwn(T.props,"componentRef"))throw new Error(`Remove componentRef from ${w.id}; recipe pack owns source pinning.`);let V=T.assets??{};for(let[F,H]of Object.entries(M.manifest.assets))if(H.required&&!V[F])throw new Error(`Missing required asset ${T.componentId}.${F}.`);for(let[F,H]of Object.entries(V)){let re=M.manifest.assets[F];if(!re||c.get(H)?.kind!==re.kind)throw new Error(`Invalid asset binding ${T.componentId}.${F}: ${H}.`)}w.source={...T,props:{...T.props,componentRef:{version:1,sourceVersionId:u.get(T.componentId)}}}}let m=Object.fromEntries([...i].map(([S,w])=>{let T=u.get(S);return[S,{headVersionId:T,versions:{[T]:w}}]})),h=o.recipe.mediaSlots[0].projectMediaId;sr(o.composition,h,h);let{recipe:g,...y}=o;return{...y,authoredComponents:m,recipe:{...g,components:g.components.map(({propSchema:S,...w})=>({...w,sourceVersionId:u.get(w.componentId),...S===void 0?{}:{propSchema:S}}))}}}async function cz(r){try{let e;if(r.body==="@-"){let s=[];for await(let c of process.stdin)s.push(Buffer.from(c));e=Buffer.concat(s).toString("utf8")}else e=r.body.startsWith("@")?await sz(az(r.body.slice(1)),"utf8"):r.body;let t=iz(JSON.parse(e)),n=az(r.out),o=JSON.stringify(t,null,2)+`
120
+ `;if(r.check){if(await sz(n,"utf8")!==o)throw new Error(`Stale generated file: ${n}`)}else if(!r.dryRun){let s=`${n}.${Zce()}.tmp`;try{await Bce(s,o,{flag:"wx"}),await qce(s,n)}finally{await Wce(s).catch(c=>{if(c.code!=="ENOENT")throw c})}}let i={output:n,check:!!r.check,dryRun:!!r.dryRun,sourceVersions:Object.fromEntries(Object.entries(t.authoredComponents).map(([s,c])=>[s,c.headVersionId]))};return B(r,"recipe_pack_complete",i),r.json||console.log(`${r.check?"Checked":r.dryRun?"Validated":"Packed"} ${n}`),i}catch(e){G(r,"recipe_pack",e,j.UserError),L(j.UserError)}}import Gce from"open";import{createAuthClient as Kce}from"better-auth/client";import{deviceAuthorizationClient as Jce}from"better-auth/client/plugins";async function pz(r){let e=go(r.target),t=Kce({baseURL:e,plugins:[Jce()]}),n=Me("Requesting device code\u2026",r.json),o;try{let{data:m,error:h}=await t.device.code({client_id:"cueframe-cli",scope:"openid profile email"});(h||!m)&&(n.fail(`Could not start login: ${h?.message??"unknown error"}`),L(j.NetworkError)),o=m}catch(m){n.fail(`Could not start login: ${m instanceof Error?m.message:String(m)}`),L(j.NetworkError)}n.succeed("Device code issued");let i=o.verification_uri_complete??o.verification_uri;at("",r),at(` Visit: ${i}`,r),at(` Code: ${o.user_code}`,r),at("",r);try{await Gce(i)}catch{}let s=Me("Waiting for approval in browser\u2026",r.json),c=Date.now()+o.expires_in*1e3,u=o.interval*1e3;for(;Date.now()<c;){await new Promise(m=>setTimeout(m,u));try{let{data:m,error:h}=await t.device.token({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:o.device_code,client_id:"cueframe-cli"});if(m?.access_token){let S=m.access_token;Cn(S,r.target,r.url),s.succeed(`Logged in. Token saved for target "${r.target}".`),pe(r,{ok:!0,target:r.target,apiUrl:e},()=>{});return}let g=m??h,y=g?.error;y==="authorization_pending"||(y==="slow_down"?u+=5e3:y==="access_denied"?(s.fail("Access denied in the browser."),L(j.UserError)):y==="expired_token"?(s.fail("Device code expired before approval. Run `cueframe login` again."),L(j.UserError)):y&&(s.fail(`Login failed: ${g?.error_description??y}`),L(j.ApiClientError)))}catch{}}s.fail("Timed out waiting for approval. Run `cueframe login` again."),L(j.UserError)}import{readFileSync as Hce}from"fs";var dz=new Set(["GET","POST","PUT","PATCH","DELETE"]);async function mz(r,e,t){let n=r.toUpperCase();dz.has(n)||(G(t,"api",new Error(`Unsupported method: ${r}. Allowed: ${[...dz].join(", ")}.`),j.UserError),L(j.UserError)),e.startsWith("/")||(G(t,"api",new Error(`Path must start with '/'. Got: ${e}`),j.UserError),L(j.UserError)),ae(t.target);let o=Yce(t.header??[]),i=await Qce(t.body,n);i!==void 0&&!o.has("content-type")&&o.set("content-type","application/json");let s;try{s=await rt(e,{method:n,headers:o,body:i})}catch(u){G(t,"api",u,K(u)),L(K(u))}Xce(s,{include:!!t.include,json:!!t.json,method:n,path:e});let c=je(s.status);c!==j.Success&&G(t,"api",Object.assign(new Error(`${n} ${e} \u2192 ${s.status} ${s.statusText}`),{code:s.body?.error?.code,status:s.status}),c),process.exitCode=c}function Xce(r,{include:e,json:t,method:n,path:o}){if(t){console.log(JSON.stringify({status:r.status,statusText:r.statusText,headers:r.headers,body:r.body}));return}if(e){process.stdout.write(`HTTP/1.1 ${r.status} ${r.statusText}
121
+ `);for(let[i,s]of Object.entries(r.headers))process.stdout.write(`${i}: ${s}
53
122
  `);process.stdout.write(`
54
- `),$r(t.body,t.status>=400);return}if(t.status===204||t.body===null){console.error(`${n} ${o} \u2192 ${t.status} (no content)`);return}$r(t.body,t.status>=400)}function $r(t,e){let r=e?process.stderr:process.stdout;t!=null&&(typeof t=="string"?r.write(t.endsWith(`
55
- `)?t:t+`
56
- `):r.write(JSON.stringify(t,null,2)+`
57
- `))}function hs(t){let e=new Headers;for(let r of t){let n=r.indexOf(":");n===-1&&(console.error(`Invalid --header (expected "Name: value"): ${r}`),m(p.UserError));let o=r.slice(0,n).trim(),s=r.slice(n+1).trim();e.set(o,s)}return e}async function ys(t,e){if(t){if(t.startsWith("@")){let r=t.slice(1);return r==="-"?Rr():ps(r,"utf-8")}return t}if(!(e==="GET"||e==="DELETE")&&!process.stdin.isTTY)return Rr()}async function Rr(){let t=[];for await(let e of process.stdin)t.push(Buffer.isBuffer(e)?e:Buffer.from(e));return Buffer.concat(t).toString("utf-8")}var Ar=/#\/components\/schemas\/([A-Za-z0-9_]+)/g;function vs(t,e){let r=new Set,n=[e];for(;n.length;){let o=n.pop();if(r.has(o)||!(o in t))continue;r.add(o);let s=JSON.stringify(t[o]),i;for(Ar.lastIndex=0;i=Ar.exec(s);)n.push(i[1])}return r}function _s(t){let e=t?.paths??{};for(let r of Object.values(e))if(r?.put?.operationId==="putComposition"){let n=r.put?.requestBody?.content?.["application/json"]?.schema?.$ref,o=typeof n=="string"?n.match(/#\/components\/schemas\/(.+)$/):null;if(o)return o[1]}return null}async function Ir(t,e){t!=="composition"&&(console.error(`Unknown schema '${t}'. Supported: composition.`),m(p.UserError)),St({baseUrl:Ce(e.target)});let r;try{r=await W("/v1/openapi.json",{method:"GET"})}catch(d){x(e,"schema",d,p.NetworkError),m(p.NetworkError)}if(r.status>=400){let d=U(r.status);x(e,"schema",new Error(`Failed to fetch /v1/openapi.json (${r.status})`),d),m(d)}let n=r.body,o=n?.components?.schemas??{},s=_s(n);(!s||!(s in o))&&(x(e,"schema",new Error("Could not locate the composition schema in openapi.json (putComposition body ref not found)."),p.ApiServerError),m(p.ApiServerError));let i=vs(o,s);i.delete(s);let a={};for(let d of[...i].sort())a[d]=o[d];let u={name:s,schema:o[s],referenced:a};$(e,u,()=>{console.log(JSON.stringify(u,null,2))})}import{writeFileSync as xs}from"fs";import{resolve as ws}from"path";var Pr=1800*1e3,ks=5e3;async function kt(t,e){R(e.projectId,"projectId",e),R(e.suggestionId,"suggestionId",e),T(e.target),h(e,"export_prepare",{projectId:e.projectId,suggestionId:e.suggestionId,format:t,target:e.target});let r=P(`Queuing ${t} export\u2026`,e.json),n;try{n=(await(t==="fcpxml"?Be.createFcpxmlExport:Be.createPremiereExport)(e.projectId,{clipSuggestionId:e.suggestionId})).id,r.succeed(`Export queued: ${n}`)}catch(u){r.fail(`Failed: ${O(u)}`),A(e,"export_prepare",u,_(u)),m(_(u))}if(h(e,"export_queued",{exportId:n,projectId:e.projectId,format:t}),!e.wait){J(`Poll status with: cueframe api GET /v1/projects/${e.projectId}/exports/${n}`,e);return}let o=await bs(e.projectId,n,e);o.kind==="failed"&&(x(e,"export_progress",Object.assign(new Error(o.message),o.error?{details:o.error}:{}),p.ApiServerError),e.json||console.error(`Export failed: ${o.message}`),m(p.ApiServerError)),o.outputUrl||(x(e,"export_complete",new Error("Export reported complete but no outputUrl was returned."),p.ApiServerError),e.json||console.error(`Export reported complete but no outputUrl was returned.
123
+ `),lz(r.body,r.status>=400);return}if(r.status===204||r.body===null){console.error(`${n} ${o} \u2192 ${r.status} (no content)`);return}lz(r.body,r.status>=400)}function lz(r,e){let t=e?process.stderr:process.stdout;r!=null&&(typeof r=="string"?t.write(r.endsWith(`
124
+ `)?r:r+`
125
+ `):t.write(JSON.stringify(r,null,2)+`
126
+ `))}function Yce(r){let e=new Headers;for(let t of r){let n=t.indexOf(":");n===-1&&(console.error(`Invalid --header (expected "Name: value"): ${t}`),L(j.UserError));let o=t.slice(0,n).trim(),i=t.slice(n+1).trim();e.set(o,i)}return e}async function Qce(r,e){if(r){if(r.startsWith("@")){let t=r.slice(1);return t==="-"?uz():Hce(t,"utf-8")}return r}if(!(e==="GET"||e==="DELETE")&&!process.stdin.isTTY)return uz()}async function uz(){let r=[];for await(let e of process.stdin)r.push(Buffer.isBuffer(e)?e:Buffer.from(e));return Buffer.concat(r).toString("utf-8")}var hz=/#\/components\/schemas\/([A-Za-z0-9_]+)/g;function epe(r,e){let t=new Set,n=[e];for(;n.length;){let o=n.pop();if(t.has(o)||!(o in r))continue;t.add(o);let i=JSON.stringify(r[o]),s;for(hz.lastIndex=0;s=hz.exec(i);)n.push(s[1])}return t}function tpe(r){let e=r?.paths??{};for(let t of Object.values(e))if(t?.put?.operationId==="putComposition"){let n=t.put?.requestBody?.content?.["application/json"]?.schema?.$ref,o=typeof n=="string"?n.match(/#\/components\/schemas\/(.+)$/):null;if(o)return o[1]}return null}async function fz(r,e){r!=="composition"&&(console.error(`Unknown schema '${r}'. Supported: composition.`),L(j.UserError)),yh({baseUrl:go(e.target)});let t;try{t=await rt("/v1/openapi.json",{method:"GET"})}catch(m){G(e,"schema",m,j.NetworkError),L(j.NetworkError)}if(t.status>=400){let m=je(t.status);G(e,"schema",new Error(`Failed to fetch /v1/openapi.json (${t.status})`),m),L(m)}let n=t.body,o=n?.components?.schemas??{},i=tpe(n);(!i||!(i in o))&&(G(e,"schema",new Error("Could not locate the composition schema in openapi.json (putComposition body ref not found)."),j.ApiServerError),L(j.ApiServerError));let s=epe(o,i);s.delete(i);let c={};for(let m of[...s].sort())c[m]=o[m];let u={name:i,schema:o[i],referenced:c};pe(e,u,()=>{console.log(JSON.stringify(u,null,2))})}import{writeFileSync as ope}from"fs";import{resolve as rpe}from"path";var gz=1800*1e3,npe=5e3;async function Hm(r,e){we(e.projectId,"projectId",e),we(e.suggestionId,"suggestionId",e),ae(e.target),B(e,"export_prepare",{projectId:e.projectId,suggestionId:e.suggestionId,format:r,target:e.target});let t=Me(`Queuing ${r} export\u2026`,e.json),n;try{n=(await(r==="fcpxml"?Pn.createFcpxmlExport:Pn.createPremiereExport)(e.projectId,{clipSuggestionId:e.suggestionId})).id,t.succeed(`Export queued: ${n}`)}catch(u){t.fail(`Failed: ${ze(u)}`),Ce(e,"export_prepare",u,K(u)),L(K(u))}if(B(e,"export_queued",{exportId:n,projectId:e.projectId,format:r}),!e.wait){at(`Poll status with: cueframe api GET /v1/projects/${e.projectId}/exports/${n}`,e);return}let o=await ipe(e.projectId,n,e);o.kind==="failed"&&(G(e,"export_progress",Object.assign(new Error(o.message),o.error?{details:o.error}:{}),j.ApiServerError),e.json||console.error(`Export failed: ${o.message}`),L(j.ApiServerError)),o.outputUrl||(G(e,"export_complete",new Error("Export reported complete but no outputUrl was returned."),j.ApiServerError),e.json||console.error(`Export reported complete but no outputUrl was returned.
58
127
  Export ID: ${n}
59
- Re-fetch via GET /v1/projects/${e.projectId}/exports/${n}.`),m(p.ApiServerError));let i=e.out??`./export-${n.slice(0,8)}.zip`,a=await Es(o.outputUrl,i,e.json);h(e,"export_complete",{exportId:n,projectId:e.projectId,format:t,outputUrl:o.outputUrl,outputExpiresAt:o.outputExpiresAt,outputSizeBytes:o.outputSizeBytes,trimCacheHit:o.trimCacheHit,outputPath:a})}async function bs(t,e,r){let n=Date.now()+(r.timeoutMs??Pr),o=r.pollIntervalMs??ks,s=Date.now(),i=P("Exporting\u2026",r.json);try{for(;Date.now()<n;){let a;try{a=await Be.getExport(t,e)}catch(c){if(c instanceof Z&&c.status>=500){await Nr(o);continue}throw i.fail(`Failed to poll: ${O(c)}`),c}let u=Math.round((Date.now()-s)/1e3),d=Math.round((a.progress??0)*100);if(i.text=`Exporting\u2026 ${a.status}${d>0?` \xB7 ${d}%`:""} (${u}s)`,h(r,"export_progress",{exportId:e,status:a.status,progress:a.progress,elapsedSec:u}),a.status==="complete")return i.succeed(`Export complete (${u}s)`),{kind:"complete",outputUrl:a.outputUrl??null,outputExpiresAt:a.outputExpiresAt??null,outputSizeBytes:a.outputSizeBytes??null,trimCacheHit:a.trimCacheHit??null};if(a.status==="error"||a.status==="cancelled"){let c=a.error?.message??`Export ${a.status}`;return i.fail(c),{kind:"failed",message:c,error:a.error?{phase:a.error.phase,retryable:!!a.error.retryable}:null}}await Nr(o)}return i.fail(`Timed out waiting for export (${Math.round((Date.now()-s)/1e3)}s)`),{kind:"failed",message:`Timed out after ${Math.round((r.timeoutMs??Pr)/1e3)}s`,error:null}}catch(a){x(r,"export_progress",a,_(a)),m(_(a))}}async function Es(t,e,r){let n=ws(e),o=P(`Downloading \u2192 ${n}\u2026`,r);try{let s=await fetch(t);if(!s.ok)throw new Error(`HTTP ${s.status}`);let i=Buffer.from(await s.arrayBuffer());return xs(n,i),o.succeed(`Saved: ${n} (${(i.length/1024/1024).toFixed(1)} MB)`),n}catch(s){o.fail(`Download failed: ${O(s)}`),r||console.error(`
60
- Export URL (7-day TTL): ${t}`),m(p.NetworkError)}}function Nr(t){return new Promise(e=>setTimeout(e,t))}async function Mr(t){T(t.target),h(t,"sessions_list_prepare",{});try{let e=await Me.listSessions();h(t,"sessions_list_complete",{count:e.data.length}),$(t,e,()=>{if(e.data.length===0){console.log("No sessions yet. Create one with `cueframe sessions create --name <n> --files <mediaId:role> \u2026`");return}for(let r of e.data){let n=r.muxStatus??"pending";console.log(`${r.id} ${r.fileCount} files mux:${n} ${r.name}`)}e.pagination.hasMore&&console.log(`# more \u2014 pass --after ${e.pagination.nextCursor} (raw via \`cueframe api\`)`)})}catch(e){x(t,"sessions_list",e,_(e)),m(_(e))}}async function Ur(t,e){R(t,"sessionId",e),T(e.target),h(e,"sessions_get_prepare",{sessionId:t});try{let r=await Me.getSession(t);h(e,"sessions_get_complete",{sessionId:t}),$(e,r,()=>{console.log(JSON.stringify(r,null,2))})}catch(r){x(e,"sessions_get",r,_(r)),m(_(r))}}async function Fr(t){t.name||(console.error("--name is required"),m(p.UserError)),(!t.files||t.files.length===0)&&(console.error("At least one --file <mediaId:role> is required"),m(p.UserError));let e=t.files.map((r,n)=>{let o=r.indexOf(":");return o===-1&&(console.error(`--file[${n}] must be <mediaId>:<role>. Got: ${r}`),m(p.UserError)),{mediaId:r.slice(0,o).trim(),role:r.slice(o+1).trim()}});T(t.target),h(t,"sessions_create_prepare",{name:t.name,fileCount:e.length});try{let r=await Me.createSession({name:t.name,files:e});h(t,"sessions_create_complete",{sessionId:r.id}),$(t,r,()=>{console.log(`Session created: ${r.id}`),console.log(JSON.stringify(r,null,2))})}catch(r){x(t,"sessions_create",r,_(r)),m(_(r))}}async function Dr(t,e){R(t,"sessionId",e),T(e.target),h(e,"sessions_delete_prepare",{sessionId:t});try{await Me.deleteSession(t),h(e,"sessions_delete_complete",{sessionId:t}),$(e,{ok:!0,sessionId:t},()=>{console.log(`Session ${t} deleted.`)})}catch(r){x(e,"sessions_delete",r,_(r)),m(_(r))}}function Lr(t){let e=t.commands.map(Lr);return{name:t.name(),description:t.description(),arguments:t.registeredArguments.map(r=>({name:r.name(),required:r.required,description:r.description})),options:t.options.map(r=>({flags:r.flags,description:r.description,...r.defaultValue!==void 0?{default:r.defaultValue}:{}})),...e.length>0?{subcommands:e}:{}}}function zr(t,e){let r=t.commands.map(Lr);if(e.json){h(e,"describe_complete",{name:t.name(),version:t.version()??null,commands:r});return}console.log(`${t.name()} ${t.version()??""}`.trim());for(let n of r){console.log(`
61
- ${n.name} \u2014 ${n.description}`);for(let o of n.subcommands??[])console.log(` ${n.name} ${o.name} \u2014 ${o.description}`)}}var Zr=["prod","dev","local"];function D(t){if(t===void 0)return"prod";if(Zr.includes(t))return t;console.error(`Invalid --target ${t}. Allowed: ${Zr.join(", ")}.`),m(p.UserError)}function Wr(t){if(!t)return;let e=parseInt(t,10);if(e===24||e===30||e===60)return e;console.error(`Invalid --fps ${t}. Allowed: 24, 30, 60.`),m(p.UserError)}async function Vr(){let t=new Ss;t.name("cueframe").description("AI-assisted video editing and rendering").version("0.4.3").option("--json","Emit a structured JSON document on stdout instead of human-formatted output. Spinners are silenced.").option("--dry-run","Validate inputs and report what would happen \u2014 no API calls, no mutations. Applies to upload, analyze, project create, render.");let e=()=>t.opts();t.command("install").description('One-line setup: wire the CueFrame MCP server into every installed agent (Claude Code / Cursor / Codex) and install the agent skills. No API key \u2014 auth is a browser "Allow" on first call.').option("-t, --target <target>","Target environment: prod (default), dev, local").option("-f, --force","Overwrite skills that are already installed in ~/.claude/skills").action(c=>Pt({json:e().json,target:D(c.target),dryRun:e().dryRun,force:c.force})),t.command("init").description("Scaffold a CueFrame component workspace (cueframe.json + components dir) in the current repo, so `new component` has a home and the render harness can discover it.").action(()=>Ut({json:e().json,dryRun:e().dryRun})),t.command("new").description("Scaffold new owned source in the component workspace").command("component").description("Scaffold a blank custom component in cueframe/components/<name>").argument("<name>","Component id (e.g. my-badge)").option("-f, --force","Overwrite an existing non-empty component dir").action((c,l)=>Qt(c,{json:e().json,dryRun:e().dryRun,force:l.force})),t.command("push").description("Publish a locally-authored component (cueframe/components/<id>/index.tsx) to CueFrame so it renders server-side. Upserts by id.").argument("[id]","Component id to push (omit and use `cueframe sync` to push all)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>rr(c,{target:D(l.target),json:e().json})),t.command("sync").description("Publish EVERY component in the workspace (cueframe/components/*) to CueFrame. Upserts each by id.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(c=>nr({target:D(c.target),json:e().json}));let n=t.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");n.command("create").description("Mint a scoped API key (cf_*). Requires a logged-in session.").requiredOption("-n, --name <name>","Key name, e.g. ci-runner").option("-s, --scope <scope>","Comma-separated resource:actions, e.g. media:rw,projects:rw,renders:rw (resources: media,sessions,projects,renders,webhooks; actions r/w)").option("--preset <preset>","Scope preset instead of --scope: readonly (read all) | editall (read+write all)").option("--expires <days>","Expire after N days (default: never)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(c=>sr({...c,target:D(c.target),json:e().json})),n.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(c=>ir({target:D(c.target),json:e().json})),n.command("revoke").description("Revoke an API key by id.").argument("<keyId>","Key id (from `cueframe keys list`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>ar(c,{target:D(l.target),json:e().json})),t.command("login").description("Browser-mediated sign-in (OAuth device flow). Recommended for laptops.").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action(c=>jr({...c,target:D(c.target),json:e().json})),t.command("auth").description("Save a static API key (cf_live_\u2026 / cf_test_\u2026). Use for CI / headless environments.").argument("<api-key>","Your CueFrame API key").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action((c,l)=>{let S=D(l.target);qe(c,S,l.url),e().json?console.log(JSON.stringify({ok:!0,target:S},null,2)):console.log(`API key saved for target "${S}"`)}),t.command("list").description("List projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-n, --limit <n>","Max projects to show","10").action(c=>cr({target:D(c.target),limit:parseInt(c.limit),json:e().json}));let o=t.command("project").description("Project commands");o.command("create").description("Create a new project. With --from-suggestion, atomically build the composition from a clip suggestion in one round-trip \u2014 the project is then immediately renderable via `cueframe render <projectId>`.").requiredOption("-n, --name <name>","Project name").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9","9:16").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("--from-suggestion <sug>","Clip suggestion publicId (sug_\u2026) \u2014 atomically builds the composition after project creation so render needs no further args").option("--cheap","With --from-suggestion: use the deterministic translator (no LLM, ~100ms) instead of the AI authoring pass. Useful for tests / programmatic flows.").action(c=>xr({name:c.name,target:D(c.target),aspect:c.aspect,fps:Wr(c.fps),resolution:c.resolution,fromSuggestion:c.fromSuggestion,cheap:c.cheap,json:e().json,dryRun:e().dryRun})),o.command("delete").description("Permanently delete a project (irreversible cleanup \u2014 removes the composition and render history).").argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>wr(c,{target:D(l.target),json:e().json})),t.command("media").description("Media library cleanup commands").command("delete").description("Permanently delete a media item (irreversible cleanup \u2014 removes the source and its derived assets).").argument("<mediaId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>kr(c,{target:D(l.target),json:e().json})),t.command("upload").description("Upload a video file and process it").argument("<file>","Path to video file").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --analyze","Run clip analysis after processing completes").option("-r, --audio-role <role>","Declare the audio role (vo|music|sfx|ambience) \u2014 routes ingest enrichment: vo\u2192transcript, music\u2192beat grid, sfx/ambience\u2192envelope").action((c,l)=>fr(c,{target:D(l.target),analyze:l.analyze,audioRole:l.audioRole,json:e().json,dryRun:e().dryRun})),t.command("analyze").description("Trigger AI clip suggestion analysis for a media item").argument("<mediaItemId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-w, --wait","Wait for analysis to complete and show results").action((c,l)=>Ot(c,{target:D(l.target),wait:l.wait,json:e().json,dryRun:e().dryRun})),t.command("clips").description("List AI-generated clip suggestions for a media item").argument("[mediaItemId]","Media item ID (omit to list your media library)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>pr(c,{target:D(l.target),json:e().json}));let i=t.command("render").description("Render a project to MP4 (queues, watches via SSE, downloads). Renders whatever composition is saved on the project \u2014 build it first via `project create --from-suggestion` or `composition from-suggestion`.").allowExcessArguments(!1).argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9 (defaults to project format)").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("-o, --out <path>","Output file path (default: ./reel-<id>.mp4)").option("--idempotency-key <key>",'Override the auto-derived Idempotency-Key. Default: sha256("render:<projectId>:<currentCompositionETag>"). Pass a fresh UUID to force a new render row.').option("--priority <p>","Routing intent: interactive (low-latency, access-gated), standard (default), background (lowest queue weight).").option("--intent <i>","Encode-quality hint: preview (fast / low-bitrate, for editor scrubbing) or final (default, full Format).").action((c,l)=>Cr(c,{target:l.target,aspect:l.aspect,fps:Wr(l.fps),resolution:l.resolution,out:l.out,json:e().json,dryRun:e().dryRun,...l.idempotencyKey?{idempotencyKey:l.idempotencyKey}:{},...l.priority?{priority:l.priority}:{},...l.intent?{intent:l.intent}:{}}));t.command("api").description("Raw API call against the v1 surface (escape hatch \u2014 like `gh api`).").argument("<method>","HTTP method: GET, POST, PUT, PATCH, DELETE").argument("<path>","API path starting with /v1, e.g. /v1/projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-b, --body <body>","Request body (inline JSON, @file.json to read from disk, @- for stdin)").option("-H, --header <header...>",'Additional header (repeatable), e.g. -H "If-Match: \\"abc\\""').option("-i, --include","Include response status line + headers in stdout (curl-style). Lets agents read ETag etc.").action((c,l,S)=>Or(c,l,{target:S.target,body:S.body,header:S.header,include:S.include,json:e().json})),t.command("schema").description("Print the live composition wire schema from the server (/v1/openapi.json) \u2014 discover the contract instead of guessing.").argument("[resource]","Schema to print (currently: composition)","composition").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>Ir(c,{target:l.target,json:e().json}));let a=t.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");a.command("validate").description("Validate a composition body against the live schema WITHOUT saving or rendering. Returns per-field errors \u2014 author safely before paying for a render.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(c=>yr({target:c.target,body:c.body,json:e().json})),a.command("get").description("Fetch the project's composition and ETag").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>gr(c,{target:l.target,json:e().json})),a.command("put").description("Replace the composition. GETs ETag first for safe concurrent writes.").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite \u2014 may clobber concurrent edits)").action((c,l)=>hr(c,{target:l.target,body:l.body,ifMatch:l.ifMatch,force:l.force,json:e().json})),a.command("from-suggestion").description("Build the composition from an existing clip suggestion").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--format <json>",`Optional format override, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`).option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite)").action((c,l)=>ct(c,{target:l.target,suggestionId:l.suggestion,format:l.format,ifMatch:l.ifMatch,force:l.force,json:e().json})),i.command("watch").description("Reattach to an existing render and stream progress to terminal state").argument("<renderId>","Render ID (from `cueframe render` output)").requiredOption("-p, --project <projectId>","Project the render belongs to").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--no-download","Print the MP4 URL but skip downloading the file").option("-o, --out <path>","Output file path when downloading (default: ./reel-<id>.mp4)").action((c,l,S)=>{let I=S?.parent?.opts?.()?.target??l.target;return Er(c,{target:I,project:l.project,out:l.out,download:l.download!==!1,json:e().json})});let u=t.command("export").description("Hand the timeline off to a real NLE (Final Cut Pro / Premiere Pro)");u.command("fcpxml").description("Build a Final Cut Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((c,l)=>kt("fcpxml",{target:l.target,projectId:c,suggestionId:l.suggestion,out:l.out,wait:l.wait,json:e().json})),u.command("premiere").description("Build a Premiere Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((c,l)=>kt("premiere",{target:l.target,projectId:c,suggestionId:l.suggestion,out:l.out,wait:l.wait,json:e().json}));let d=t.command("sessions").description("Multi-file ingest sessions (camera A/B/screen \u2192 muxed composition)");d.command("list").description("List sessions in this org").option("-t, --target <target>","Target environment: prod (default), dev, local").action(c=>Mr({target:c.target,json:e().json})),d.command("get").description("Get a single session by ID").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>Ur(c,{target:l.target,json:e().json})),d.command("create").description("Create a session from one or more media files").requiredOption("-n, --name <name>","Session name").requiredOption("-f, --file <entry...>","Each entry is <mediaId>:<role> (repeatable)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(c=>Fr({target:c.target,name:c.name,files:c.file,json:e().json})),d.command("delete").description("Delete a session (server checks for compositions referencing it)").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((c,l)=>Dr(c,{target:l.target,json:e().json})),t.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>zr(t,{json:e().json}));try{await t.parseAsync()}catch(c){let l=_(c);x(e(),"cli",Object.assign(new Error(O(c)),{code:c?.code,status:c?.status}),l),m(l)}}await Vr();
128
+ Re-fetch via GET /v1/projects/${e.projectId}/exports/${n}.`),L(j.ApiServerError));let s=e.out??`./export-${n.slice(0,8)}.zip`,c=await spe(o.outputUrl,s,e.json);B(e,"export_complete",{exportId:n,projectId:e.projectId,format:r,outputUrl:o.outputUrl,outputExpiresAt:o.outputExpiresAt,outputSizeBytes:o.outputSizeBytes,trimCacheHit:o.trimCacheHit,outputPath:c})}async function ipe(r,e,t){let n=Date.now()+(t.timeoutMs??gz),o=t.pollIntervalMs??npe,i=Date.now(),s=Me("Exporting\u2026",t.json);try{for(;Date.now()<n;){let c;try{c=await Pn.getExport(r,e)}catch(h){if(h instanceof We&&h.status>=500){await xz(o);continue}throw s.fail(`Failed to poll: ${ze(h)}`),h}let u=Math.round((Date.now()-i)/1e3),m=Math.round((c.progress??0)*100);if(s.text=`Exporting\u2026 ${c.status}${m>0?` \xB7 ${m}%`:""} (${u}s)`,B(t,"export_progress",{exportId:e,status:c.status,progress:c.progress,elapsedSec:u}),c.status==="complete")return s.succeed(`Export complete (${u}s)`),{kind:"complete",outputUrl:c.outputUrl??null,outputExpiresAt:c.outputExpiresAt??null,outputSizeBytes:c.outputSizeBytes??null,trimCacheHit:c.trimCacheHit??null};if(c.status==="error"||c.status==="cancelled"){let h=c.error?.message??`Export ${c.status}`;return s.fail(h),{kind:"failed",message:h,error:c.error?{phase:c.error.phase,retryable:!!c.error.retryable}:null}}await xz(o)}return s.fail(`Timed out waiting for export (${Math.round((Date.now()-i)/1e3)}s)`),{kind:"failed",message:`Timed out after ${Math.round((t.timeoutMs??gz)/1e3)}s`,error:null}}catch(c){G(t,"export_progress",c,K(c)),L(K(c))}}async function spe(r,e,t){let n=rpe(e),o=Me(`Downloading \u2192 ${n}\u2026`,t);try{let i=await fetch(r);if(!i.ok)throw new Error(`HTTP ${i.status}`);let s=Buffer.from(await i.arrayBuffer());return ope(n,s),o.succeed(`Saved: ${n} (${(s.length/1024/1024).toFixed(1)} MB)`),n}catch(i){o.fail(`Download failed: ${ze(i)}`),t||console.error(`
129
+ Export URL (7-day TTL): ${r}`),L(j.NetworkError)}}function xz(r){return new Promise(e=>setTimeout(e,r))}async function yz(r){ae(r.target),B(r,"sessions_list_prepare",{});try{let e=await yr.listSessions();B(r,"sessions_list_complete",{count:e.data.length}),pe(r,e,()=>{if(e.data.length===0){console.log("No sessions yet. Create one with `cueframe sessions create --name <n> --files <mediaId:role> \u2026`");return}for(let t of e.data){let n=t.muxStatus??"pending";console.log(`${t.id} ${t.fileCount} files mux:${n} ${t.name}`)}e.pagination.hasMore&&console.log(`# more \u2014 pass --after ${e.pagination.nextCursor} (raw via \`cueframe api\`)`)})}catch(e){G(r,"sessions_list",e,K(e)),L(K(e))}}async function bz(r,e){we(r,"sessionId",e),ae(e.target),B(e,"sessions_get_prepare",{sessionId:r});try{let t=await yr.getSession(r);B(e,"sessions_get_complete",{sessionId:r}),pe(e,t,()=>{console.log(JSON.stringify(t,null,2))})}catch(t){G(e,"sessions_get",t,K(t)),L(K(t))}}async function Sz(r){r.name||(console.error("--name is required"),L(j.UserError)),(!r.files||r.files.length===0)&&(console.error("At least one --file <mediaId:role> is required"),L(j.UserError));let e=r.files.map((t,n)=>{let o=t.indexOf(":");return o===-1&&(console.error(`--file[${n}] must be <mediaId>:<role>. Got: ${t}`),L(j.UserError)),{mediaId:t.slice(0,o).trim(),role:t.slice(o+1).trim()}});ae(r.target),B(r,"sessions_create_prepare",{name:r.name,fileCount:e.length});try{let t=await yr.createSession({name:r.name,files:e});B(r,"sessions_create_complete",{sessionId:t.id}),pe(r,t,()=>{console.log(`Session created: ${t.id}`),console.log(JSON.stringify(t,null,2))})}catch(t){G(r,"sessions_create",t,K(t)),L(K(t))}}async function zz(r,e){we(r,"sessionId",e),ae(e.target),B(e,"sessions_delete_prepare",{sessionId:r});try{await yr.deleteSession(r),B(e,"sessions_delete_complete",{sessionId:r}),pe(e,{ok:!0,sessionId:r},()=>{console.log(`Session ${r} deleted.`)})}catch(t){G(e,"sessions_delete",t,K(t)),L(K(t))}}function vz(r){let e=r.commands.map(vz);return{name:r.name(),description:r.description(),arguments:r.registeredArguments.map(t=>({name:t.name(),required:t.required,description:t.description})),options:r.options.map(t=>({flags:t.flags,description:t.description,...t.defaultValue!==void 0?{default:t.defaultValue}:{}})),...e.length>0?{subcommands:e}:{}}}function wz(r,e){let t=r.commands.map(vz);if(e.json){B(e,"describe_complete",{name:r.name(),version:r.version()??null,commands:t});return}console.log(`${r.name()} ${r.version()??""}`.trim());for(let n of t){console.log(`
130
+ ${n.name} \u2014 ${n.description}`);for(let o of n.subcommands??[])console.log(` ${n.name} ${o.name} \u2014 ${o.description}`)}}var Iz=["prod","dev","local"];function Fe(r){if(r===void 0)return"prod";if(Iz.includes(r))return r;console.error(`Invalid --target ${r}. Allowed: ${Iz.join(", ")}.`),L(j.UserError)}function kz(r){if(!r)return;let e=parseInt(r,10);if(e===24||e===25||e===30||e===60)return e;console.error(`Invalid --fps ${r}. Allowed: 24, 25, 30, 60.`),L(j.UserError)}async function $z(){let r=new ape;r.name("cueframe").description("AI-assisted video editing and rendering").version("0.4.4").option("--json","Emit a structured JSON document on stdout instead of human-formatted output. Spinners are silenced.").option("--dry-run","Validate inputs and report what would happen \u2014 no API calls, no mutations. Applies to upload, analyze, project create, render.");let e=()=>r.opts();r.command("install").description('One-line setup: wire the CueFrame MCP server into every installed agent (Claude Code / Cursor / Codex) and install the agent skills. No API key \u2014 auth is a browser "Allow" on first call.').option("-t, --target <target>","Target environment: prod (default), dev, local").option("-f, --force","Replace locally changed or untracked skills, retaining backups").action(g=>_h({json:e().json,target:Fe(g.target),dryRun:e().dryRun,force:g.force})),r.command("init").description("Scaffold a CueFrame component workspace (cueframe.json + components dir) in the current repo, so `new component` has a home and the render harness can discover it.").action(()=>Fh({json:e().json,dryRun:e().dryRun})),r.command("new").description("Scaffold new owned source in the component workspace").command("component").description("Scaffold a blank custom component in cueframe/components/<name>").argument("<name>","Component id (e.g. my-badge)").option("-f, --force","Overwrite an existing non-empty component dir").action((g,y)=>mb(g,{json:e().json,dryRun:e().dryRun,force:y.force})),r.command("push").description("Publish a locally-authored component (cueframe/components/<id>/index.tsx) to CueFrame so it renders server-side. Upserts by id.").argument("[id]","Component id to push (omit and use `cueframe sync` to push all)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>xb(g,{target:Fe(y.target),json:e().json})),r.command("sync").description("Publish EVERY component in the workspace (cueframe/components/*) to CueFrame. Upserts each by id.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>yb({target:Fe(g.target),json:e().json}));let n=r.command("keys").description("Manage API keys. `keys create` mints a scoped key \u2014 run `cueframe login` first (keys cannot mint keys).");n.command("create").description("Mint a scoped API key (cf_*). Requires a logged-in session.").requiredOption("-n, --name <name>","Key name, e.g. ci-runner").option("-s, --scope <scope>","Comma-separated resource:actions, e.g. media:rw,projects:rw,renders:rw (resources: media,sessions,projects,renders,webhooks; actions r/w)").option("--preset <preset>","Scope preset instead of --scope: readonly (read all) | editall (read+write all)").option("--expires <days>","Expire after N days (default: never)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>Sb({...g,target:Fe(g.target),json:e().json})),n.command("list").description("List your API keys.").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>zb({target:Fe(g.target),json:e().json})),n.command("revoke").description("Revoke an API key by id.").argument("<keyId>","Key id (from `cueframe keys list`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>vb(g,{target:Fe(y.target),json:e().json})),r.command("login").description("Browser-mediated sign-in (OAuth device flow). Recommended for laptops.").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action(g=>pz({...g,target:Fe(g.target),json:e().json})),r.command("auth").description("Save a static API key (cf_live_\u2026 / cf_test_\u2026). Use for CI / headless environments.").argument("<api-key>","Your CueFrame API key").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--url <url>","Override the API base URL (advanced)").action((g,y)=>{let S=Fe(y.target);kh(g),Cn(g,S,y.url),e().json?console.log(JSON.stringify({ok:!0,target:S},null,2)):console.log(`API key saved for target "${S}"`)}),r.command("list").description("List projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-n, --limit <n>","Max projects to show","10").action(g=>wb({target:Fe(g.target),limit:parseInt(g.limit),json:e().json}));let o=r.command("project").description("Project commands");o.command("create").description("Create a new project. With --from-suggestion, atomically build the composition from a clip suggestion in one round-trip \u2014 the project is then immediately renderable via `cueframe render <projectId>`.").requiredOption("-n, --name <name>","Project name").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9","9:16").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("--brand-kit <id>","Bind a brand kit id to the project").option("--from-suggestion <sug>","Clip suggestion publicId (sug_\u2026) \u2014 atomically builds the composition after project creation so render needs no further args").option("--cheap","With --from-suggestion: use the deterministic translator (no LLM, ~100ms) instead of the AI authoring pass. Useful for tests / programmatic flows.").action(async g=>{await Gs({name:g.name,target:Fe(g.target),aspect:g.aspect,fps:kz(g.fps),resolution:g.resolution,brandKitId:g.brandKit,fromSuggestion:g.fromSuggestion,cheap:g.cheap,json:e().json,dryRun:e().dryRun})}),o.command("delete").description("Permanently delete a project (irreversible cleanup \u2014 removes the composition and render history).").argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>Mb(g,{target:Fe(y.target),json:e().json})),r.command("media").description("Media library cleanup commands").command("delete").description("Permanently delete a media item (irreversible cleanup \u2014 removes the source and its derived assets).").argument("<mediaId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>Eb(g,{target:Fe(y.target),json:e().json})),r.command("upload").description("Upload a video file and process it").argument("<file>","Path to video file").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --analyze","Run clip analysis after processing completes").option("-r, --audio-role <role>","Declare the audio role (vo|music|sfx|ambience) \u2014 routes ingest enrichment: vo\u2192transcript, music\u2192beat grid, sfx/ambience\u2192envelope").action(async(g,y)=>{await Bs(g,{target:Fe(y.target),analyze:y.analyze,audioRole:y.audioRole,json:e().json,dryRun:e().dryRun})}),r.command("analyze").description("Trigger AI clip suggestion analysis for a media item").argument("<mediaItemId>","Media item ID (from `cueframe clips`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-w, --wait","Wait for analysis to complete and show results").action((g,y)=>$h(g,{target:Fe(y.target),wait:y.wait,json:e().json,dryRun:e().dryRun})),r.command("clips").description("List AI-generated clip suggestions for a media item").argument("[mediaItemId]","Media item ID (omit to list your media library)").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>Pb(g,{target:Fe(y.target),json:e().json}));let s=r.command("recipe").description("Package or run a portable CueFrame recipe");s.command("pack").description("Validate, pin authored source, and package a recipe offline. No login, upload, compilation, or rendering.").requiredOption("-b, --body <json|@file|@->","Version-1 packaging input: project draft and bundled component sources; @- reads stdin").requiredOption("-o, --out <path>","Generated .cueframe project path (replaced on success)").option("--check","Check that the output is current without writing it").action(async g=>{await cz({...g,json:e().json,dryRun:e().dryRun})}),s.command("run").description("Upload the source, create the recipe project, validate it, and render it").argument("[recipe]","Recipe slug from cueframe-ai/cueframe-recipes, local .cueframe template, or legacy directory",".").requiredOption("-m, --media <path>","Source media file for the recipe").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output MP4 path","./recipe-output.mp4").option("--no-render","Create the editable project without rendering it").action(async(g,y)=>{await jb({directory:g,media:y.media,out:y.out,target:Fe(y.target),render:y.render!==!1,json:e().json,dryRun:e().dryRun})});let c=r.command("render").description("Render a project to MP4 (queues, watches via SSE, downloads). Renders whatever composition is saved on the project \u2014 build it first via `project create --from-suggestion` or `composition from-suggestion`.").allowExcessArguments(!1).argument("<projectId>","Project ID (from `cueframe list` or `project create`)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-a, --aspect <ratio>","Aspect ratio: 9:16, 1:1, 16:9 (defaults to project format)").option("--fps <n>","Frame rate","30").option("--resolution <r>","Resolution: hd, fhd, 2k, 4k","fhd").option("-o, --out <path>","Output file path (default: ./reel-<id>.mp4)").option("--idempotency-key <key>",'Override the auto-derived Idempotency-Key. Default: sha256("render:<projectId>:<currentCompositionETag>"). Pass a fresh UUID to force a new render row.').option("--priority <p>","Routing intent: interactive (low-latency, access-gated), standard (default), background (lowest queue weight).").option("--intent <i>","Encode-quality hint: preview (fast / low-bitrate, for editor scrubbing) or final (default, full Format).").action(async(g,y)=>{await Ks(g,{target:y.target,aspect:y.aspect,fps:kz(y.fps),resolution:y.resolution,out:y.out,json:e().json,dryRun:e().dryRun,...y.idempotencyKey?{idempotencyKey:y.idempotencyKey}:{},...y.priority?{priority:y.priority}:{},...y.intent?{intent:y.intent}:{}})});r.command("api").description("Raw API call against the v1 surface (escape hatch \u2014 like `gh api`).").argument("<method>","HTTP method: GET, POST, PUT, PATCH, DELETE").argument("<path>","API path starting with /v1, e.g. /v1/projects").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-b, --body <body>","Request body (inline JSON, @file.json to read from disk, @- for stdin)").option("-H, --header <header...>",'Additional header (repeatable), e.g. -H "If-Match: \\"abc\\""').option("-i, --include","Include response status line + headers in stdout (curl-style). Lets agents read ETag etc.").action((g,y,S)=>mz(g,y,{target:S.target,body:S.body,header:S.header,include:S.include,json:e().json})),r.command("schema").description("Print the live composition wire schema from the server (/v1/openapi.json) \u2014 discover the contract instead of guessing.").argument("[resource]","Schema to print (currently: composition)","composition").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>fz(g,{target:y.target,json:e().json}));let u=r.command("composition").description("Read/write a project's composition. ETag is threaded automatically.");u.command("validate").description("Validate a composition body against the live schema WITHOUT saving or rendering. Returns per-field errors \u2014 author safely before paying for a render.").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(async g=>{await Zs({target:g.target,body:g.body,json:e().json})}),u.command("get").description("Fetch the project's composition and ETag").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>Cb(g,{target:y.target,json:e().json})),u.command("put").description("Replace the composition. GETs ETag first for safe concurrent writes.").argument("<projectId>","Project ID").option("-t, --target <target>","Target environment: prod (default), dev, local").requiredOption("-b, --body <body>","Composition JSON (inline, @file.json, or @- for stdin)").option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite \u2014 may clobber concurrent edits)").action(async(g,y)=>{await qs(g,{target:y.target,body:y.body,ifMatch:y.ifMatch,force:y.force,json:e().json})}),u.command("from-suggestion").description("Build the composition from an existing clip suggestion").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--format <json>",`Optional format override, e.g. '{"aspectRatio":"9:16","fps":30,"resolution":"fhd"}'`).option("--if-match <etag>","Use this ETag (skip the GET round-trip)").option("--force","Use If-Match: * (unconditional overwrite)").action((g,y)=>Ws(g,{target:y.target,suggestionId:y.suggestion,format:y.format,ifMatch:y.ifMatch,force:y.force,json:e().json})),c.command("watch").description("Reattach to an existing render and stream progress to terminal state").argument("<renderId>","Render ID (from `cueframe render` output)").requiredOption("-p, --project <projectId>","Project the render belongs to").option("-t, --target <target>","Target environment: prod (default), dev, local").option("--no-download","Print the MP4 URL but skip downloading the file").option("-o, --out <path>","Output file path when downloading (default: ./reel-<id>.mp4)").action((g,y,S)=>{let w=S?.parent?.opts?.()?.target??y.target;return Ab(g,{target:w,project:y.project,out:y.out,download:y.download!==!1,json:e().json})});let m=r.command("export").description("Hand the timeline off to a real NLE (Final Cut Pro / Premiere Pro)");m.command("fcpxml").description("Build a Final Cut Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((g,y)=>Hm("fcpxml",{target:y.target,projectId:g,suggestionId:y.suggestion,out:y.out,wait:y.wait,json:e().json})),m.command("premiere").description("Build a Premiere Pro export zip and (optionally) wait to download it").argument("<projectId>","Project ID").requiredOption("-s, --suggestion <suggestionId>","Clip suggestion publicId (sug_\u2026)").option("-t, --target <target>","Target environment: prod (default), dev, local").option("-o, --out <path>","Output zip path (default: ./export-<id>.zip)").option("--wait","Block until the export finishes, then download the artifact").action((g,y)=>Hm("premiere",{target:y.target,projectId:g,suggestionId:y.suggestion,out:y.out,wait:y.wait,json:e().json}));let h=r.command("sessions").description("Multi-file ingest sessions (camera A/B/screen \u2192 muxed composition)");h.command("list").description("List sessions in this org").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>yz({target:g.target,json:e().json})),h.command("get").description("Get a single session by ID").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>bz(g,{target:y.target,json:e().json})),h.command("create").description("Create a session from one or more media files").requiredOption("-n, --name <name>","Session name").requiredOption("-f, --file <entry...>","Each entry is <mediaId>:<role> (repeatable)").option("-t, --target <target>","Target environment: prod (default), dev, local").action(g=>Sz({target:g.target,name:g.name,files:g.file,json:e().json})),h.command("delete").description("Delete a session (server checks for compositions referencing it)").argument("<sessionId>","Session ID").option("-t, --target <target>","Target environment: prod (default), dev, local").action((g,y)=>zz(g,{target:y.target,json:e().json})),r.command("describe").description("Print the CLI command tree as structured JSON (agent introspection)").action(()=>wz(r,{json:e().json}));try{await r.parseAsync()}catch(g){let y=K(g);G(e(),"cli",Object.assign(new Error(ze(g)),{code:g?.code,status:g?.status}),y),L(y)}}await $z();