{"version":3,"file":"backgroundSync-DA3vr4MB.mjs","names":["record","record","GraphemeCount","CodePointCount","IsMaxLength","IsMinLength","IsArray","IsBigInt","IsBoolean","IsConstructor","IsUndefined","IsFunction","IsInteger","IsNull","IsNumber","IsObject","IsString","IsSymbol","IsMultipleOf","UnicodeSegmentGuard.GraphemeCount","UnicodeGuard.CodePointCount","IsMaxLength","UnicodeGuard.IsMaxLength","IsMinLength","UnicodeGuard.IsMinLength","Keys","IsBoolean","IsNumber","IsString","IsDate","Guard","Get","Guard.Keys","Guard.Symbols","Guard.IsObject","Settings.Get","WithEnumerable","WithHidden","Settings.Get","Guard.IsUnsafePropertyKey","Settings.Get","Update","Guard.IsObject","Guard.HasPropertyKey","Guard.IsEqual","IsSchema","Memory.Create","Memory.Update","Memory.Update","Memory.Create","Memory.Discard","Memory.Create","Memory.Discard","Memory.Create","Memory.Discard","Ref","Memory.Create","IsRef","Memory.Create","Memory.Create","Memory.Create","IsSchema","Guard.HasPropertyKey","Guard.Keys","Guard.Values","Memory.Create","Memory.Discard","Memory.Create","Guard.Keys","Memory.Update","Memory.Create","Memory.Update","Guard.IsObjectNotArray","Guard.HasPropertyKey","Guard.IsNull","Match","Memory.Create","Memory.Discard","IsEnum","Memory.Create","Memory.Discard","FromArray","FromBigInt","FromBoolean","FromNull","FromNumber","FromObject","FromRegExp","FromString","FromUndefined","FromValue","GlobalsGuard.IsTypeArray","GlobalsGuard.IsDate","GlobalsGuard.IsRegExp","GlobalsGuard.IsBoolean","GlobalsGuard.IsString","GlobalsGuard.IsNumber","Guard.IsArray","Guard.IsBoolean","Guard.IsBigInt","Guard.IsConstructor","Guard.IsNull","Guard.IsObject","Guard.IsString","Guard.IsSymbol","Guard.IsUndefined","Guard.IsFunction","Get","IsSchema","Guard.HasPropertyKey","Guard.IsObject","IsSchema","Guard.HasPropertyKey","IsSchema","Guard.HasPropertyKey","BigInt","Memory.Create","Boolean","Memory.Create","Memory.Create","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsString","Memory.Create","Memory.Create","Number","Memory.Create","Symbol","Memory.Create","String","Memory.Create","Memory.Create","Memory.Discard","Guard.IsEqual","FromLiteral","Guard.ShiftLeft","FromType","FromTypes","Guard.IsEqual","Memory.Create","Guard.ShiftLeft","FromLiteral","Guard.IsEqual","FromUnion","FromType","String","Memory.Create","Object","Memory.Create","Memory.Discard","Object","Memory.Discard","Memory.Update","Memory.Discard","Memory.Update","Guard.Keys","Object","Guard.IsEqual","Guard.ShiftLeft","Guard.IsEqual","Distribute","ExtendsResult.IsExtendsTrueLike","Guard.ShiftLeft","Guard.ShiftLeft","Distribute","IsEnum","Guard.IsEqual","Guard.IsString","Guard.IsNumber","Object","Guard.IsEqual","Guard.HasPropertyKey","Guard.IsString","Guard.ShiftLeft","Guard.IsEqual","Guard.IsString","Guard.IsNumber","Object","IsSchema","IsEnum","Object","Memory.Update","Guard.IsEqual","String","Number","Guard.Keys","Memory.Create","Memory.Create","T.BigInt","T.String","T.Number","T.Integer","T.Never","T.Literal","T.Union","Match","AllowedDigits","Match","Match","Token.Const","S.PatternBigIntMapping","S.PatternStringMapping","S.PatternNumberMapping","S.PatternIntegerMapping","S.PatternNeverMapping","Token.Until_1","S.PatternTextMapping","S.PatternBaseMapping","S.PatternGroupMapping","S.PatternUnionMapping","S.PatternTermMapping","S.PatternBodyMapping","S.PatternMapping","Guard.ShiftLeft","IsEnum","Memory.Update","IsSchema","Guard.HasPropertyKey","Guard.IsEqual","ExtendsUnion","Memory.Create","Guard.IsObject","Guard.HasPropertyKey","Guard.IsEqual","Match","Result.Match","Result.ExtendsTrue","Memory.Assign","Result.ExtendsFalse","Guard.ShiftLeft","IsEnum","Result.ExtendsTrue","Result.ExtendsUnion","Result.ExtendsFalse","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsFalse","Result.Match","Guard.ShiftLeft","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsTrue","Result.Match","Result.ExtendsFalse","Result.Match","Result.ExtendsTrue","Result.Match","Result.ExtendsFalse","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsFalse","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsString","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsTrue","Result.ExtendsFalse","Result.Match","Result.IsExtendsTrueLike","Guard.Keys","Memory.Assign","Guard.Values","Guard.HasPropertyKey","Guard.ShiftLeft","Object","FromObject","Guard.IsEqual","Guard.Keys","Result.ExtendsTrue","Result.ExtendsFalse","FromRecord","Result.ExtendsTrue","Result.ExtendsTrue","Memory.Create","Guard.IsObject","Guard.HasPropertyKey","Guard.IsEqual","Guard.IsString","Result.IsExtendsTrueLike","Guard.IsArray","Result.ExtendsTrue","Memory.Assign","Result.ExtendsFalse","IsSchema","Result.Match","Result.ExtendsFalse","Guard.ShiftLeft","Guard.IsEqual","Result.ExtendsTrue","Result.IsExtendsTrueLike","Result.ExtendsTrue","Guard.ShiftLeft","Result.Match","Result.ExtendsTrue","Result.ExtendsFalse","Result.ExtendsTrue","Result.ExtendsFalse","Result.ExtendsTrue","IsEnum","Result.ExtendsFalse","Object","Memory.Update","IsSchema","Guard.HasPropertyKey","Guard.IsEqual","FromRef","FromType","FromProperties","FromTypes","Guard.ShiftLeft","IsRef","FromRef","FromType","FromProperties","FromTypes","IsRef","FromRef","FromProperties","Guard.Keys","FromType","FromTypes","IsRef","Object","Object","Guard.Keys","IsRef","ExtendsResult.IsExtendsTrueLike","ExtendsResult.IsExtendsFalse","Guard.ShiftLeft","Guard.IsEqual","Memory.Update","Guard.IsEqual","IsRef","Guard.ShiftLeft","IsEnum","FromRef","FromType","IsRef","ExtendsResult.IsExtendsTrueLike","Memory.Assign","Guard.ShiftLeft","Guard.IsLessThan","Settings.Get","Guard.IsEqual","Guard.IsGreaterThan","Ref","Memory.Create","Memory.Discard","Memory.Update","FromLiteral","Guard.IsString","FromTemplateLiteral","FromType","FromUnion","FromType","FromType","FromLiteral","FromTemplateLiteral","FromUnion","Memory.Update","FromType","ExtendsResult.IsExtendsUnion","ExtendsResult.IsExtendsTrue","Memory.Update","Memory.Update","Memory.Update","ExtendsResult.IsExtendsTrueLike","Guard.ShiftLeft","Memory.Update","FromCyclic","FromType","FromDependent","FromType","Guard.Keys","Guard.HasPropertyKey","Memory.Assign","FromIntersect","FromType","FromObject","FromTuple","FromType","Guard.Keys","Guard.ShiftLeft","FromType","FromUnion","FromType","FromCyclic","FromDependent","FromIntersect","FromUnion","FromTuple","FromObject","FromType","Object","FromArray","Number","ExtendsResult.IsExtendsTrueLike","Guard.IsEqual","FromCyclic","FromType","FromDependent","FromType","FromEnum","FromType","FromIntersect","FromType","FromLiteral","FromTemplateLiteral","FromType","FromUnion","FromType","FromType","FromCyclic","FromDependent","IsEnum","FromEnum","FromIntersect","FromLiteral","FromTemplateLiteral","FromUnion","FromType","FromTypes","FromType","FromObject","ExtendsResult.IsExtendsTrueLike","FromTuple","Guard.IsEqual","FromType","FromArray","FromObject","FromTuple","NormalizeType","Memory.Update","FromType","Memory.Update","Number","String","Symbol","FromArray","Number","FromObject","Guard.Keys","FromRecord","FromTuple","FromType","FromArray","FromObject","FromRecord","FromTuple","Memory.Update","FromType","FromTemplateLiteral","FromType","FromUnion","FromEnum","FromLiteral","Guard.IsNumber","IsEnum","Memory.Assign","Object","Memory.Update","Memory.Assign","Guard.Keys","Memory.Update","Memory.Update","Guard.IsArray","FromKeys","Guard.Keys","FromType","Object","Memory.Update","FromType","Memory.Update","FromCyclic","FromType","Memory.Assign","FromDependent","FromType","FromIntersect","FromType","FromUnion","FromType","FromObject","Guard.Keys","Object","FromType","FromCyclic","FromDependent","FromIntersect","FromUnion","FromObject","Object","Memory.Update","FromType","Guard.Keys","Memory.Assign","FromType","Object","Memory.Update","FromType","FromArray","Array","FromCyclic","FromType","Memory.Assign","FromDependent","FromType","FromIntersect","FromType","FromObject","Guard.Keys","Object","FromTuple","FromUnion","FromType","FromType","FromArray","FromCyclic","FromDependent","FromIntersect","FromObject","FromTuple","FromUnion","Memory.Update","FromType","FromCyclic","FromType","Memory.Assign","FromType","FromIntersect","FromType","FromUnion","FromType","FromObject","Guard.Keys","Object","FromType","FromCyclic","FromIntersect","FromUnion","FromObject","Object","Memory.Update","FromType","Memory.Update","Memory.Update","IsRef","Guard.ShiftLeft","IsRef","Guard.Keys","Guard.IsEqual","Object","Memory.Update","Guard.IsEqual","Insert","Guard.ShiftLeft","Type.Object","Type.Union","Type.String","Type.Null","Type.Optional","sessionEntryToContextMessages","boundaryEntryId","sessionEntryToContextMessages","n","a","o","s","c","u","d","f","g","_","Guard.HasPropertyKey","Guard.IsArray","Guard.Every","Guard.IsObject","Guard.IsFunction","IsSchemaObject","Guard.IsObject","Guard.IsArray","Guard.IsBoolean","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsObject","Guard.IsArray","Guard.IsString","Guard.HasPropertyKey","Guard.IsObject","Guard.IsArray","Guard.IsString","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.HasPropertyKey","Guard.IsNumber","Guard.IsBigInt","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsArray","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsObject","Guard.HasPropertyKey","Guard.IsBoolean","Guard.IsEqual","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsString","Guard.HasPropertyKey","Guard.IsArray","Guard.IsString","Guard.HasPropertyKey","Guard.HasPropertyKey","Guard.IsString","Guard.IsArray","Guard.HasPropertyKey","Guard.IsBoolean","Guard.HasPropertyKey","Guard.HasPropertyKey","Settings.Get","G.Every","G.EveryAll","Guard.IsEqual","Schema.IsSchemaObject","Schema.IsId","Schema.IsSchemaBoolean","Schema.IsDynamicAnchor","Schema.IsRecursiveAnchorTrue","Guard.IsUndefined","IsValid","Schema.IsItems","G.IsArray","G.Every","G.IsLessThan","Schema.IsPatternProperties","G.Keys","Schema.IsProperties","G.IsEqual","G.Every","G.EveryAll","Pathing.EncodeFragment","G.IsEqual","G.IsGreaterThan","G.IsValueLike","G.IsEqual","G.IsDeepEqual","IsValid","Schema.IsMinContains","G.IsEqual","G.SomeAll","G.IsEqual","G.Keys","G.Every","G.Entries","G.HasPropertyKey","G.IsArray","G.EveryAll","Pathing.EncodeFragment","G.IsEqual","G.Keys","G.Every","G.Entries","G.HasPropertyKey","G.EveryAll","G.IsEqual","G.Keys","G.Every","G.Entries","G.HasPropertyKey","G.EveryAll","Pathing.EncodeFragment","Guard.IsObject","Guard.IsUnsafePropertyKey","Schema.IsSchemaObject","Schema.IsId","Stack.NextUri","Stack.DefaultUri","Guard.IsObject","Schema.IsDynamicAnchor","Guard.IsEqual","Guard.Keys","Guard.IsArray","Guard.IsUndefined","Pointer.Get","Schema.IsAnchor","Guard.HasPropertyKey","Stack.NextStack","Schema.IsRecursiveAnchorTrue","Resolve.DynamicRef","Schema.IsSchema","G.Some","G.IsValueLike","G.IsEqual","G.IsDeepEqual","G.IsLessThan","G.IsGreaterThan","Decode","Encode","FormatPuny.IsAcePrefixed","FormatPuny.Decode","FormatPuny.Encode","FormatBidi.HasRightToLeftCharacters","FormatBidi.SatisfiesBidiRule","FormatPuny.IsAcePrefixed","FormatPuny.Decode","LabelUnicode.IsUnicodeLabel","IsValidLabelLength","IsLabel","LabelPuny.IsPunyLabel","LabelAscii.IsAsciiLabel","IsHostname","LabelPuny.IsPunyLabel","LabelUnicode.IsUnicodeLabel","IsIdnHostname","FormatBidi.HasBidiChars","FormatBidi.SatisfiesBidiRule","Idna.IsHostname","Idna.IsIdnHostname","InvalidIriChars","Format.Test","Schema.IsThen","Schema.IsElse","G.Every","G.IsLessEqualThan","G.EveryAll","Schema.IsPrefixItems","Schema.IsItemsSized","IsValid","Schema.IsContains","G.Counted","G.IsLessEqualThan","Schema.IsMinContains","G.IsLessEqualThan","G.IsLessEqualThan","G.IsMaxLength","G.IsLessEqualThan","G.Keys","IsValid","Schema.IsContains","G.Counted","G.IsGreaterEqualThan","G.IsGreaterEqualThan","G.IsGreaterEqualThan","G.IsMinLength","G.IsGreaterEqualThan","G.Keys","G.IsMultipleOf","G.IsEqual","G.IsString","G.Every","G.Entries","G.EveryAll","Pathing.EncodeFragment","G.IsEqual","G.Every","G.IsLessEqualThan","G.EveryAll","Settings.Get","G.IsUndefined","Schema.IsRequired","G.Every","G.Entries","G.HasPropertyKey","G.EveryAll","Pathing.EncodeFragment","G.Every","G.Keys","G.EveryAll","Pathing.EncodeFragment","Resolve.RecursiveRef","Schema.IsSchema","Resolve.Ref","Schema.IsSchema","G.Every","G.HasPropertyKey","G.EveryAll","G.IsEqual","G.IsObjectNotArray","G.IsArray","G.IsBoolean","G.IsInteger","G.IsNumber","G.IsNull","G.IsString","G.IsBigInt","G.IsConstructor","G.IsFunction","G.IsSymbol","G.IsUndefined","G.Some","G.Every","G.EveryAll","G.Every","G.Entries","G.EveryAll","G.IsEqual","Hashing.Hash","Stack.NextStack","Schema.IsSchemaBoolean","Schema.IsType","G.IsObject","G.IsArray","Schema.IsRequired","Schema.IsAdditionalProperties","Schema.IsDependencies","Schema.IsDependentRequired","Schema.IsDependentSchemas","Schema.IsPatternProperties","Schema.IsProperties","Schema.IsPropertyNames","Schema.IsMinProperties","Schema.IsMaxProperties","Schema.IsAdditionalItems","Schema.IsContains","Schema.IsItems","Schema.IsMinContains","Schema.IsMaxContains","Schema.IsMinItems","Schema.IsMaxItems","Schema.IsPrefixItems","Schema.IsUniqueItems","G.IsString","Schema.IsMinLength","Schema.IsMaxLength","Schema.IsFormat","Schema.IsPattern","G.IsNumber","G.IsBigInt","Schema.IsExclusiveMinimum","Schema.IsExclusiveMaximum","Schema.IsMinimum","Schema.IsMaximum","Schema.IsMultipleOf","Schema.IsRef","Schema.IsRecursiveRef","Schema.IsDynamicRef","Schema.IsConst","Schema.IsEnum","Schema.IsIf","Schema.IsNot","Schema.IsAllOf","Schema.IsAnyOf","Schema.IsOneOf","Schema.IsUnevaluatedItems","Schema.IsUnevaluatedProperties","Schema.IsRefine","Errors","Arguments.Match","Engine.Stack","Engine.ErrorContext","Engine.ErrorSchema","GetLocalizationFunction","Get","Check","Arguments.Match","Engine.Stack","Engine.CheckContext","Engine.CheckSchema","Arguments.Match","SchemaCheck","Arguments.Match","SchemaErrors","FromArray","Guard.IsArray","FromType","FromCyclic","FromType","Ref","Guard.HasPropertyKey","FromIntersect","FromType","Guard.HasPropertyKey","FromObject","Guard.IsObject","Guard.IsArray","Guard.Keys","Guard.HasPropertyKey","IsSchema","FromType","Guard.IsBoolean","Guard.IsEqual","FromRecord","Guard.IsObject","Guard.Keys","FromType","Guard.IsBoolean","Guard.IsEqual","IsSchema","FromRef","Guard.HasPropertyKey","FromType","FromTuple","Guard.IsArray","FromType","Guard.IsGreaterThan","Guard.HasPropertyKey","Guard.Keys","Guard.IsUnsafePropertyKey","Guard.IsEqual","Guard.Symbols","FromObject","Guard.IsClassInstance","FromArray","GlobalsGuard.IsTypeArray","GlobalsGuard.IsRegExp","GlobalsGuard.IsMap","GlobalsGuard.IsSet","Guard.IsArray","Guard.IsObject","FromUnion","FromType","FromType","T.IsArray","FromArray","T.IsCyclic","FromCyclic","T.IsIntersect","FromIntersect","T.IsObject","FromObject","T.IsRecord","FromRecord","T.IsRef","FromRef","T.IsTuple","FromTuple","T.IsUnion","FromUnion","Memory.Assign","FromProperties","Guard","FromType","String","Arguments.Match","Settings.Get","FromType","Guard.IsObject","Guard.HasPropertyKey","Guard.IsArray","FromBoolean","Guard.IsEqual","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","Guard.IsEqual","FromNumber","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","Guard.IsEqual","FromBoolean","FromNumber","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","FromBoolean","FromString","Guard.IsNumber","Guard.IsEqual","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNull","Guard.IsString","Guard.IsUndefined","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromBigInt","Guard.IsEqual","FromBoolean","FromNumber","FromString","Guard.IsBigInt","Guard.IsBoolean","Guard.IsNumber","Guard.IsNull","Guard.IsString","Guard.IsUndefined","FromArray","Try.TryArray","FromType","Try.TryBigInt","Try.IsOk","Try.TryBoolean","Try.IsOk","FromCyclic","FromType","Ref","FromType","Try.TryNumber","Try.IsOk","FromIntersect","FromType","Try.TryBigInt","Try.IsOk","Guard.IsEqual","Try.TryBoolean","Try.TryNumber","Try.TryString","Try.TryNull","Try.IsOk","Try.TryNumber","Try.IsOk","Guard.Keys","FromType","Guard.IsUndefined","Guard.EntriesRegExp","Guard.Keys","FromType","Guard.HasPropertyKey","Guard.IsObject","FromObject","Guard.IsObjectNotArray","Guard.EntriesRegExp","Guard.Keys","FromType","Guard.HasPropertyKey","Guard.IsObject","FromRecord","Guard.IsObjectNotArray","FromRef","Guard.HasPropertyKey","FromType","Try.TryString","Try.IsOk","FromType","FromTuple","Guard.IsArray","FromType","Try.TryUndefined","Try.IsOk","FromUnion","FromType","Guard.IsUndefined","Try.TryUndefined","Try.IsOk","FromType","Type.IsArray","FromArray","Type.IsBigInt","Type.IsBoolean","Type.IsCyclic","FromCyclic","Type.IsEnum","Type.IsInteger","Type.IsIntersect","FromIntersect","Type.IsLiteral","Type.IsNull","Type.IsNumber","Type.IsObject","FromObject","Type.IsRecord","FromRecord","Type.IsRef","FromRef","Type.IsString","Type.IsTemplateLiteral","Type.IsTuple","FromTuple","Type.IsUndefined","Type.IsUnion","FromUnion","Type.IsVoid","Arguments.Match","FromType","FromArray","Guard.IsArray","FromType","FromCyclic","FromType","Ref","Guard.IsUndefined","Guard.IsFunction","FromIntersect","FromType","FromObject","Guard.IsObject","Guard.Keys","FromType","Guard.IsUndefined","Guard.HasPropertyKey","Guard.IsBoolean","FromRecord","Guard.IsObject","Guard.Keys","FromType","FromRef","Guard.HasPropertyKey","FromType","FromTuple","Guard.IsArray","FromType","FromUnion","FromType","FromType","T.IsArray","FromArray","T.IsCyclic","FromCyclic","T.IsIntersect","FromIntersect","T.IsObject","FromObject","T.IsRecord","FromRecord","T.IsRef","FromRef","T.IsTuple","FromTuple","T.IsUnion","FromUnion","Arguments.Match","FromType","Arguments.Match","Decode","Encode","Guard.IsEqual","Decode","Guard.IsArray","Encode","Guard.IsEqual","Ref","Guard.IsDeepEqual","Decode","Guard.IsEqual","Guard.IsObject","Encode","Decode","Guard.IsObjectNotArray","Guard.Keys","Guard.HasPropertyKey","Encode","Guard.IsEqual","Decode","Guard.IsObjectNotArray","Guard.Keys","Encode","Guard.IsEqual","Guard.HasPropertyKey","Guard.IsEqual","Decode","Guard.IsArray","Encode","Guard.IsEqual","Guard.IsEqual","Type.IsArray","Type.IsCyclic","Type.IsIntersect","Type.IsObject","Type.IsRecord","Type.IsRef","Type.IsTuple","Type.IsUnion","Assert","Settings.Get","Assert","Settings.Get","T.Object","T.Literal","T.String","T.Unknown","T.Union","Type.String","Type.Object","Type.Array","Type.Union","Type.Literal","Type.Optional","Type.Integer","isRecord$1","fs","isRecord","isRecord$1","parse","fs","record","isRecord","L","Type.String","Type.Object","Type.Union","Type.Literal","Type.Optional","Type.Array","import_binding","bindingifySourcemap","import_binding","wrap","import_binding","bindingifySourcemap","t","n","filter.include","filter.exclude","filter.code","filter.id","moduleType","filter.or","filter.moduleType","filter.and","fsp","record","platform","import_binding","import_binding","watch","import_binding","packageRootOf","isRecord","packageRootOf","readBuildRecord","fsp","NATIVE_COMPOSITION_MAX_BYTES","readSharedHarnessState","updateSharedHarnessState","PACKAGE_MANIFEST","fs","BUILD_DIRECTORY","errorMessage","wait","spawnProcess"],"sources":["../../../../core/po-core/dist/src/constants/contextApi.mjs","../../../../core/po-core/dist/src/services/chatgptAuth/index.mjs","../../../../core/po-core/dist/src/services/chatgptLogin/index.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/metrics.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/guard/unicode/unicode_segment.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/guard/unicode/unicode.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/guard/guard.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/guard/globals.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/guard/index.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/settings/settings.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/keys.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/finalize.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/assign.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/create.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/discard.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/update.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/schema.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/deferred.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/constructor.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/function.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/ref.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/generic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/any.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/never.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/_add_optional.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/_optional.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/properties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/unknown.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/unsafe.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/arguments/arguments.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/infer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/dependent.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/enum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/unreachable/unreachable.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/hashing/hash.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/locale/en_US.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/locale/_config.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/_codec.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/_immutable.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/_add_readonly.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/_readonly.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/bigint.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/boolean.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/integer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/null.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/number.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/symbol.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/string.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/patterns/pattern.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/template_literal/create.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/template_literal/decode.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/record_create.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_any.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/tuple/to_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/property.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/composite.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/narrow.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/distribute.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/exclude/operation.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_enum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_integer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_number.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_string.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/flatten.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/from_key.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/record/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/record.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/rest.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/this.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/undefined.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/void.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/mapping.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/internal/match.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/internal/take.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/internal/char.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/internal/trim.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/unsigned_integer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/const.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/ident.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/unsigned_number.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/until.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/token/until_1.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/script/parser.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/template_literal/encode.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/template_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/result.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/extends_right.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/any.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/bigint.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/boolean.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/parameters.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/return_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/constructor.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/dependent.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/enum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/function.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/integer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/never.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/null.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/number.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/record.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/string.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/symbol.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/template_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/inference.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/undefined.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/unknown.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/void.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/extends_left.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/interface/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/interface.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/cyclic/check.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/cyclic/candidates.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/cyclic/extends.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/cyclic/target.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/extends/extends.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/compare.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/broaden.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/call/resolve_target.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/call/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/types/call.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/capitalize.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/lowercase.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/uncapitalize.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/uppercase.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/conditional.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/conditional/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/constructor_parameters.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/exclude.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/exclude/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/extract.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/extract/operation.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/extract/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/indexed.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/from_dependent.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/object/collapse.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/helpers/keys.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexed/from_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_enum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/this/expand_this.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexed/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexed/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexed/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/instance_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/keyof.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/keyof/from_any.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/keyof/from_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/keyof/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/keyof/from_record.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/keyof/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/keyof/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/mapped.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/mapped/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/module/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/non_nullable.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/omit.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/omit/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/omit/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/parameters.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/parameters/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/partial.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/partial/from_dependent.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/partial/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/partial/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/partial/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/partial/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/partial/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/pick.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/pick/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/pick/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/readonly_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/ref/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/required/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/required/from_dependent.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/required/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/required/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/_remove_optional.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/required/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/required/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/required.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/required/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/return_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/return_type/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/with.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/with/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/rest/spread.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/instantiate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/_add_immutable.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/action/evaluate.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/type/engine/priority/priority.mjs","../../../../core/po-core/dist/src/schemas/profileIdentity.mjs","../../../../core/po-core/dist/src/services/transcriptPages/index.mjs","../../../../core/po-core/dist/src/services/contextUsage/index.mjs","../../../../core/po-core/dist/src/services/piMessages/index.mjs","../../../../core/po-core/dist/src/services/piSessionEntries/index.mjs","../../../../core/po-core/dist/src/services/piExtensionHost/index.mjs","../../../../core/po-core/dist/src/schemas/packageApi.mjs","../../../../core/po-core/dist/executionBudget.mjs","../../../../core/po-web-security/dist/types/bundleManifest.mjs","../../../../core/po-core/dist/runtimeContextApi.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/_refine.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/schema.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/additionalItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/additionalProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/allOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/anchor.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/anyOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/const.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/contains.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/default.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/dependencies.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/dependentRequired.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/dependentSchemas.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/dynamicAnchor.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/dynamicRef.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/else.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/enum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/format.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/id.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/if.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/items.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/maximum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/maxContains.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/maxItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/maxLength.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/maxProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/minimum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/minContains.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/minItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/minLength.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/minProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/multipleOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/not.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/oneOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/pattern.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/patternProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/prefixItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/properties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/propertyNames.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/recursiveAnchor.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/recursiveRef.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/ref.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/required.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/then.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/uniqueItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/unevaluatedItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/_context.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/_refine.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/_stack.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/additionalItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/_pathing.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/_regexp.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/additionalProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/allOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/anyOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/boolean.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/const.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/contains.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/dependencies.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/dependentRequired.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/dependentSchemas.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/pointer/pointer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/resolve/resolve.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/dynamicRef.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/enum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/date.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/time.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/date_time.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/duration.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/email.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/pattern/pattern.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/label/ascii.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/format/puny.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/format/bidi.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/label/unicode.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/label/puny.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/hostname.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idna/idn-hostname.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/hostname.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idn_email.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/idn_hostname.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/ipv4.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/ipv6.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/iri_reference.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/iri.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/json_pointer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/regex.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/relative_json_pointer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/uri_reference.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/uri_template.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/uri.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/url.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/uuid.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/format/_registry.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/format.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/if.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/items.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/maxContains.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/maximum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/maxItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/maxLength.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/maxProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/minContains.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/minimum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/minItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/minLength.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/minProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/multipleOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/not.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/oneOf.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/pattern.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/patternProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/prefixItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/_exact_optional.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/properties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/propertyNames.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/recursiveRef.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/ref.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/required.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/uniqueItems.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/engine/schema.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/errors.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/settings/internal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/schema/check.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/check/check.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/errors/errors.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/assert/assert.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/additional.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_record.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_ref.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/system/memory/deep.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clone/clone.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/shared/union_priority_sort.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/clean/clean.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_result.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_bigint.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_boolean.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_null.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_number.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_string.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/try/try_undefined.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_bigint.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_boolean.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_enum.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_integer.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_null.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_number.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_additional.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/shared/optional_undefined.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_record.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_ref.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_string.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_template_literal.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_undefined.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_void.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/convert/convert.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_default.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_record.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_ref.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/default/default.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/pipeline/pipeline.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/callback.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_array.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_cyclic.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_intersect.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_object.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_record.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_ref.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_tuple.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_union.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/from_type.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/decode.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/codec/encode.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/parse/parse.mjs","../../../../../node_modules/.pnpm/typebox@1.4.2/node_modules/typebox/build/value/delta/edit.mjs","../../../../core/po-core/dist/src/schemas/help.mjs","../../../../foundations/po-config/dist/domains-DYqoL3VY.mjs","../../../../core/po-core/dist/profileIdentity.mjs","../../../../foundations/po-config/dist/profiles-CbTR2tNE.mjs","../../../../core/po-core/dist/src/schemas/approvalPrompt.mjs","../../../../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/alien.js","../../../../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/atom.js","../../../../../node_modules/.pnpm/@tanstack+store@0.11.2/node_modules/@tanstack/store/dist/store.js","../../../../core/po-core/dist/src/web/services/hubRevisions/index.mjs","../../../../core/po-core/dist/src/constants/nativeHost.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/binding-CUpfdq6A.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/logs-D6uA606S.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/normalize-string-or-regex-COVDiCTB.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/misc-DOSKtd97.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/error-CBG33oNV.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/parse-BFmj01mi.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/parse-ast-index.mjs","../../../../../node_modules/.pnpm/@rolldown+pluginutils@1.0.1/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/bindingify-input-options-UCGox0BH.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/create-bundler-option-DH74Qvg7.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/watch-CILbYpHY.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/shared/rolldown-BYX6bV3R.mjs","../../../../../node_modules/.pnpm/rolldown@1.2.14/node_modules/rolldown/dist/index.mjs","../../../../cli/po/src/builders/server/packageUrl.ts","../../../../cli/po/src/builders/web/webPluginManifest.ts","../../../../cli/po/src/builders/web/webPluginScan.ts","../../../../cli/po/src/builders/web/index.ts","../../../../cli/po/src/builders/native/index.ts","../../../../core/po-core/dist/runtimeLogSinkTelemetry.mjs","../../../../cli/po/src/composition/harnessState/index.ts","../../../../core/po-core/dist/runtimePackages.mjs","../../../../cli/po/src/composition/layerPackageInstaller/index.ts","../../../../core/po-core/dist/src/services/sqliteSessionHistory/index.mjs","../../../../core/po-core/dist/src/services/durableNavigation/docs.mjs","../../../../core/po-core/dist/src/services/sqliteTranscriptReader/index.mjs","../../../../core/po-core/dist/src/services/openSessionRegistry/index.mjs","../../../../core/po-core/dist/src/services/workspaceRegistry/workspaceRecords.mjs","../../../../core/po-core/dist/src/services/workspaceRegistry/sync.mjs","../../../../core/po-core/dist/src/services/workspaceRegistry/index.mjs","../../../../core/po-core/dist/src/services/durableRequestReceipts/docs.mjs","../../../../core/po-core/dist/src/services/durableRequestReceipts/index.mjs","../../../../cli/po/src/builders/cli/sessionComposition.ts","../../../../cli/po/src/builders/server/mcpApp.ts","../../../../cli/po/src/builders/server/mcpAppBuild.ts","../../../../cli/po/src/builders/server/mcpBundle.ts","../../../../cli/po/src/composition/syncPrune/index.ts","../../../../cli/po/src/composition/syncService/localBuilds.ts","../../../../cli/po/src/composition/syncService/index.ts","../../../../cli/po/src/builders/server/backgroundSync.ts"],"sourcesContent":["//#region src/constants/contextApi.ts\n/**\n* What one entry in the composition actually is, for a reader who clicked it.\n*\n* The projection prices the composition and stops there: names, owners, and\n* integer counts, small enough to republish whenever the composition changes.\n* The prose and the schema behind a figure are an order of magnitude larger and\n* are wanted one row at a time, so they travel on request instead. This module\n* is the contract both ends of that request share, and it is deliberately free\n* of Node imports so a browser can hold it too.\n*/\n/** Where a host mounts this package's API; the segment after /api/plugins/. */\nconst API_BASE_PATH = \"context\";\n/** The session a proxied request belongs to; the hub strips it before forwarding. */\nconst SESSION_QUERY_PARAM = \"session\";\nconst ITEM_ROUTE = \"/item\";\nconst CURRENT_ROUTE = \"/current\";\nconst NAME_QUERY_PARAM = \"name\";\nconst KIND_QUERY_PARAM = \"kind\";\nconst CONTEXT_DETAIL_VERSION = 1;\n/** Plugin-agnostic status payload: a JSON map keyed by registered tool name. */\nconst CONTEXT_TOOL_WARNINGS_STATUS_KEY = \"po-context-tool-warnings\";\n//#endregion\nexport { API_BASE_PATH, CONTEXT_DETAIL_VERSION, CONTEXT_TOOL_WARNINGS_STATUS_KEY, CURRENT_ROUTE, ITEM_ROUTE, KIND_QUERY_PARAM, NAME_QUERY_PARAM, SESSION_QUERY_PARAM };\n\n//# sourceMappingURL=contextApi.mjs.map","//#region src/services/chatgptAuth/index.ts\n/** The one ChatGPT sign-in every Po feature shares; separate from Pi's `openai-codex` model login. */\nconst CHATGPT_AUTH_PROVIDER_ID = \"po-chatgpt\";\nconst CHATGPT_AUTH_PROVIDER_NAME = \"ChatGPT for Po features\";\nconst CHATGPT_SIGN_IN_HINT = `Sign in to ${CHATGPT_AUTH_PROVIDER_NAME} under Settings > Providers, or with /login.`;\nfunction record(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n/** Reads a JSON body without buffering more than `limit` bytes. Errors are generic; callers map them. */\nasync function readBoundedJson(response, limit, signal) {\n\tif (!response.body) throw new Error(\"Response has no body.\");\n\tconst reader = response.body.getReader();\n\tconst chunks = [];\n\tlet length = 0;\n\ttry {\n\t\twhile (true) {\n\t\t\tsignal?.throwIfAborted();\n\t\t\tconst { value, done } = await reader.read();\n\t\t\tif (done) break;\n\t\t\tlength += value.length;\n\t\t\tif (length > limit) throw new Error(\"Response body is too large.\");\n\t\t\tchunks.push(value);\n\t\t}\n\t\tsignal?.throwIfAborted();\n\t\treturn JSON.parse(Buffer.concat(chunks).toString(\"utf8\"));\n\t} finally {\n\t\tawait reader.cancel().catch(() => void 0);\n\t\treader.releaseLock();\n\t}\n}\n/** The ChatGPT account claim of an access token, or undefined when it is missing or malformed. */\nfunction accountIdOf(token) {\n\ttry {\n\t\tconst payload = JSON.parse(Buffer.from(token.split(\".\")[1] ?? \"\", \"base64url\").toString(\"utf8\"));\n\t\tconst auth = record(payload) ? payload[\"https://api.openai.com/auth\"] : void 0;\n\t\tconst id = record(auth) ? auth.chatgpt_account_id : void 0;\n\t\treturn typeof id === \"string\" && /^[A-Za-z0-9_-]{1,256}$/.test(id) ? id : void 0;\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Resolves the subscription token and account claim; every failure becomes `loginMessage` unless aborted. */\nasync function chatgptCredentials(source, loginMessage, signal) {\n\tif (!source.available()) throw new Error(loginMessage);\n\tlet token;\n\ttry {\n\t\ttoken = (await source.getAuth(signal))?.auth.apiKey;\n\t} catch {\n\t\tsignal?.throwIfAborted();\n\t\tthrow new Error(loginMessage);\n\t}\n\tsignal?.throwIfAborted();\n\tconst accountId = token ? accountIdOf(token) : void 0;\n\tif (!token || !accountId) throw new Error(loginMessage);\n\treturn {\n\t\ttoken,\n\t\taccountId\n\t};\n}\n//#endregion\nexport { CHATGPT_AUTH_PROVIDER_ID, CHATGPT_AUTH_PROVIDER_NAME, CHATGPT_SIGN_IN_HINT, accountIdOf, chatgptCredentials, readBoundedJson };\n\n//# sourceMappingURL=index.mjs.map","import { piAgentDirectory } from \"../piSettings/core.mjs\";\nimport { modelConfigDirectory } from \"../piSettings/sync.mjs\";\nimport \"../../../runtimePiSettings.mjs\";\nimport { CHATGPT_AUTH_PROVIDER_ID, CHATGPT_AUTH_PROVIDER_NAME, accountIdOf, chatgptCredentials, readBoundedJson } from \"../chatgptAuth/index.mjs\";\nimport { createHash, randomBytes, timingSafeEqual } from \"node:crypto\";\nimport path from \"node:path\";\nimport { createServer } from \"node:http\";\nimport { ModelRuntime } from \"@earendil-works/pi-coding-agent\";\n//#region src/services/chatgptLogin/index.ts\nconst CLIENT_ID = \"app_EMoamEEZ73f0CkXaXp7hrann\";\nconst AUTH_ORIGIN = \"https://auth.openai.com\";\nconst TOKEN_URL = `${AUTH_ORIGIN}/oauth/token`;\n/** Realtime voice needs the connector scopes that Pi's own ChatGPT login does not request. */\nconst SCOPE = \"openid profile email offline_access api.connectors.read api.connectors.invoke\";\nconst CALLBACK_HOST = \"127.0.0.1\";\nconst CALLBACK_PORT = 1455;\nconst CALLBACK_PATH = \"/auth/callback\";\n/** The redirect registered for this OAuth client; the browser reaches the listener through localhost. */\nconst REDIRECT_URI = `http://localhost:${CALLBACK_PORT}${CALLBACK_PATH}`;\nconst MAX_TOKEN_RESPONSE_BYTES = 1048576;\nconst TOKEN_TIMEOUT_MS = 3e4;\nfunction record(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nasync function requestTokens(body, previousRefresh, signal) {\n\tconst bounded = AbortSignal.any([AbortSignal.timeout(TOKEN_TIMEOUT_MS), ...signal ? [signal] : []]);\n\tconst response = await fetch(TOKEN_URL, {\n\t\tmethod: \"POST\",\n\t\theaders: { \"content-type\": \"application/x-www-form-urlencoded\" },\n\t\tbody,\n\t\tredirect: \"error\",\n\t\tsignal: bounded\n\t});\n\tif (!response.ok) {\n\t\tawait response.body?.cancel().catch(() => void 0);\n\t\tthrow new Error(`ChatGPT sign-in was rejected (HTTP ${response.status}). Sign in again.`);\n\t}\n\tconst json = await readBoundedJson(response, MAX_TOKEN_RESPONSE_BYTES, bounded);\n\tconst access = record(json) ? json.access_token : void 0;\n\tconst refresh = record(json) ? json.refresh_token ?? previousRefresh : void 0;\n\tconst expiresIn = record(json) ? json.expires_in : void 0;\n\tif (typeof access !== \"string\" || typeof refresh !== \"string\" || typeof expiresIn !== \"number\" || expiresIn <= 0) throw new Error(\"ChatGPT sign-in returned an invalid token response.\");\n\tconst accountId = accountIdOf(access);\n\tif (!accountId) throw new Error(\"ChatGPT sign-in did not include a ChatGPT account.\");\n\treturn {\n\t\taccess,\n\t\trefresh,\n\t\texpires: Date.now() + expiresIn * 1e3,\n\t\taccountId\n\t};\n}\nfunction sameState(supplied, expected) {\n\tconst left = Buffer.from(supplied ?? \"\");\n\tconst right = Buffer.from(expected);\n\treturn left.length === right.length && timingSafeEqual(left, right);\n}\n/** The authorization code from a redirect URL; pasted input must carry the expected state. */\nfunction codeFromRedirect(url, state) {\n\tfor (const name of [\n\t\t\"state\",\n\t\t\"code\",\n\t\t\"error\"\n\t]) if (url.searchParams.getAll(name).length > 1) throw new Error(\"The sign-in address is invalid.\");\n\tif (!sameState(url.searchParams.get(\"state\"), state)) throw new Error(\"The sign-in address does not match this attempt.\");\n\tif (url.searchParams.get(\"error\")) throw new Error(\"ChatGPT sign-in was declined.\");\n\tconst code = url.searchParams.get(\"code\");\n\tif (!code || code.trim() !== code) throw new Error(\"The sign-in address has no authorization code.\");\n\treturn code;\n}\n/** Listens for the browser redirect on the registered loopback port; rejects when the port is taken. */\nasync function listenForCode(state, signal) {\n\tconst server = createServer();\n\tlet resolveCode;\n\tlet rejectCode;\n\tconst code = new Promise((resolve, reject) => {\n\t\tresolveCode = resolve;\n\t\trejectCode = reject;\n\t});\n\tcode.catch(() => void 0);\n\tserver.on(\"request\", (request, response) => {\n\t\tconst reply = (status, text) => {\n\t\t\tresponse.writeHead(status, {\n\t\t\t\t\"content-type\": \"text/plain; charset=utf-8\",\n\t\t\t\t\"cache-control\": \"no-store\"\n\t\t\t});\n\t\t\tresponse.end(text);\n\t\t};\n\t\tconst url = new URL(request.url ?? \"/\", REDIRECT_URI);\n\t\tif (request.method !== \"GET\" || url.pathname !== CALLBACK_PATH) return reply(404, \"Not found.\");\n\t\ttry {\n\t\t\tresolveCode(codeFromRedirect(url, state));\n\t\t\treply(200, \"Signed in. You can close this page.\");\n\t\t} catch (error) {\n\t\t\tif (sameState(url.searchParams.get(\"state\"), state)) rejectCode(error);\n\t\t\treply(400, \"Sign-in could not be completed.\");\n\t\t}\n\t});\n\tawait new Promise((resolve, reject) => {\n\t\tserver.once(\"error\", reject);\n\t\tserver.listen({\n\t\t\thost: CALLBACK_HOST,\n\t\t\tport: CALLBACK_PORT,\n\t\t\texclusive: true\n\t\t}, () => {\n\t\t\tserver.off(\"error\", reject);\n\t\t\tresolve();\n\t\t});\n\t});\n\tconst close = () => {\n\t\tserver.close();\n\t\tserver.closeAllConnections();\n\t};\n\tsignal?.addEventListener(\"abort\", close, { once: true });\n\treturn {\n\t\tcode,\n\t\tclose\n\t};\n}\nasync function login(callbacks) {\n\tconst { signal } = callbacks;\n\tconst verifier = randomBytes(64).toString(\"base64url\");\n\tconst state = randomBytes(32).toString(\"base64url\");\n\tconst authorize = new URL(`${AUTH_ORIGIN}/oauth/authorize`);\n\tauthorize.search = new URLSearchParams({\n\t\tresponse_type: \"code\",\n\t\tclient_id: CLIENT_ID,\n\t\tredirect_uri: REDIRECT_URI,\n\t\tscope: SCOPE,\n\t\tcode_challenge: createHash(\"sha256\").update(verifier).digest(\"base64url\"),\n\t\tcode_challenge_method: \"S256\",\n\t\tid_token_add_organizations: \"true\",\n\t\tstate\n\t}).toString();\n\tconst callback = await listenForCode(state, signal).catch(() => void 0);\n\ttry {\n\t\tcallbacks.onAuth({\n\t\t\turl: authorize.toString(),\n\t\t\tinstructions: \"Sign in in your browser. If it does not return here, paste the address it lands on.\"\n\t\t});\n\t\tconst pasted = (callbacks.onManualCodeInput?.() ?? callbacks.onPrompt({\n\t\t\tmessage: \"Paste the address your browser lands on\",\n\t\t\tplaceholder: REDIRECT_URI\n\t\t})).then((input) => {\n\t\t\tif (!URL.canParse(input.trim())) throw new Error(\"Paste the full address from your browser.\");\n\t\t\treturn codeFromRedirect(new URL(input.trim()), state);\n\t\t});\n\t\tconst code = await (callback ? Promise.race([callback.code, pasted]) : pasted);\n\t\tsignal?.throwIfAborted();\n\t\treturn await requestTokens(new URLSearchParams({\n\t\t\tgrant_type: \"authorization_code\",\n\t\t\tclient_id: CLIENT_ID,\n\t\t\tcode,\n\t\t\tcode_verifier: verifier,\n\t\t\tredirect_uri: REDIRECT_URI\n\t\t}), void 0, signal);\n\t} finally {\n\t\tcallback?.close();\n\t}\n}\nconst chatgptAuthProvider = {\n\tname: CHATGPT_AUTH_PROVIDER_NAME,\n\toauth: {\n\t\tname: CHATGPT_AUTH_PROVIDER_NAME,\n\t\tisSubscription: true,\n\t\tlogin,\n\t\trefreshToken: (credentials, signal) => requestTokens(new URLSearchParams({\n\t\t\tgrant_type: \"refresh_token\",\n\t\t\tclient_id: CLIENT_ID,\n\t\t\trefresh_token: credentials.refresh\n\t\t}), credentials.refresh, signal),\n\t\tgetApiKey: (credentials) => credentials.access\n\t}\n};\n/** Adds the shared sign-in to a Pi model runtime: its Providers row, /login entry, refresh and storage. */\nfunction registerChatgptAuthProvider(runtime) {\n\truntime.registerProvider(CHATGPT_AUTH_PROVIDER_ID, chatgptAuthProvider);\n}\n/**\n* Reads the shared sign-in outside a session (Voice runs at the hub). It opens the same auth.json\n* a session uses; Pi's file lock keeps refreshes from different runtimes from racing.\n*/\nfunction createChatgptAuthReader(options) {\n\tlet loading;\n\tconst runtime = () => {\n\t\tloading ??= (async () => {\n\t\t\tconst agentDirectory = piAgentDirectory(options.environment, options.homeDirectory);\n\t\t\tconst directory = modelConfigDirectory(agentDirectory, options.homeDirectory);\n\t\t\tconst created = await ModelRuntime.create({\n\t\t\t\tauthPath: path.join(directory, \"auth.json\"),\n\t\t\t\tmodelsPath: path.join(directory, \"models.json\"),\n\t\t\t\trefreshOnCreate: false\n\t\t\t});\n\t\t\tregisterChatgptAuthProvider(created);\n\t\t\treturn created;\n\t\t})().catch((error) => {\n\t\t\tloading = void 0;\n\t\t\tthrow error;\n\t\t});\n\t\treturn loading;\n\t};\n\tconst fresh = async (signal) => {\n\t\tconst current = await runtime();\n\t\tawait current.refresh({\n\t\t\tallowNetwork: false,\n\t\t\tproviders: [CHATGPT_AUTH_PROVIDER_ID],\n\t\t\t...signal ? { signal } : {}\n\t\t});\n\t\treturn current;\n\t};\n\treturn {\n\t\t/** Whether the shared sign-in exists on disk. No network call; the same check `credentials` runs first. */\n\t\tasync signedIn(signal) {\n\t\t\treturn (await fresh(signal)).isUsingSubscription(CHATGPT_AUTH_PROVIDER_ID);\n\t\t},\n\t\tasync credentials(loginMessage, signal) {\n\t\t\tconst current = await fresh(signal);\n\t\t\treturn chatgptCredentials({\n\t\t\t\tavailable: () => current.isUsingSubscription(CHATGPT_AUTH_PROVIDER_ID),\n\t\t\t\tgetAuth: (authSignal) => current.getAuth(CHATGPT_AUTH_PROVIDER_ID, authSignal ? { signal: authSignal } : {})\n\t\t\t}, loginMessage, signal);\n\t\t}\n\t};\n}\n//#endregion\nexport { createChatgptAuthReader, registerChatgptAuthProvider };\n\n//# sourceMappingURL=index.mjs.map","/** TypeBox instantiation metrics */\nexport const Metrics = {\n    assign: 0,\n    create: 0,\n    clone: 0,\n    discard: 0,\n    update: 0\n};\n","// --------------------------------------------------------------------------\n// IsBetween\n// --------------------------------------------------------------------------\nfunction IsBetween(value, min, max) {\n    return value >= min && value <= max;\n}\n// --------------------------------------------------------------------------\n// IsZeroWidthJoiner\n// --------------------------------------------------------------------------\nfunction IsZeroWidthJoiner(value) {\n    return (value === 0x200D);\n}\n// --------------------------------------------------------------------------\n// IsHighSurrogate\n// --------------------------------------------------------------------------\nfunction IsHighSurrogate(value) {\n    return IsBetween(value, 0xD800, 0xDBFF);\n}\n// --------------------------------------------------------------------------\n// IsRegionalIndicator\n// --------------------------------------------------------------------------\nfunction IsRegionalIndicator(value) {\n    return IsBetween(value, 0x1F1E6, 0x1F1FF);\n}\n// --------------------------------------------------------------------------\n// IsVariationSelector\n// --------------------------------------------------------------------------\nfunction IsVariationSelector(value) {\n    return IsBetween(value, 0xFE00, 0xFE0F);\n}\n// --------------------------------------------------------------------------\n// IsCombiningMark\n// --------------------------------------------------------------------------\nfunction IsCombiningMark(value) {\n    return (IsBetween(value, 0x0300, 0x036F) ||\n        IsBetween(value, 0x1AB0, 0x1AFF) ||\n        IsBetween(value, 0x1DC0, 0x1DFF) ||\n        IsBetween(value, 0xFE20, 0xFE2F));\n}\n// --------------------------------------------------------------------------\n// CodePointLength\n// --------------------------------------------------------------------------\nfunction CodePointLength(value) {\n    return value > 0xFFFF ? 2 : 1;\n}\n// --------------------------------------------------------------------------\n// ConsumeModifiers (helper)\n// --------------------------------------------------------------------------\nfunction ConsumeModifiers(value, index) {\n    while (index < value.length) {\n        const point = value.codePointAt(index);\n        if (IsCombiningMark(point) || IsVariationSelector(point)) {\n            index += CodePointLength(point);\n        }\n        else {\n            break;\n        }\n    }\n    return index;\n}\n// --------------------------------------------------------------------------\n// NextGraphemeClusterIndex\n// --------------------------------------------------------------------------\nfunction NextGraphemeClusterIndex(value, clusterStart) {\n    const startCP = value.codePointAt(clusterStart);\n    let clusterEnd = clusterStart + CodePointLength(startCP);\n    // Consume combining marks & variation selectors\n    clusterEnd = ConsumeModifiers(value, clusterEnd);\n    // Handle multi-ZWJ sequences\n    while (clusterEnd < value.length - 1 && IsZeroWidthJoiner(value.codePointAt(clusterEnd))) {\n        const nextCP = value.codePointAt(clusterEnd + 1);\n        clusterEnd += 1 + CodePointLength(nextCP);\n        clusterEnd = ConsumeModifiers(value, clusterEnd);\n    }\n    // Handle regional indicator pairs (flags)\n    if (IsRegionalIndicator(startCP) &&\n        clusterEnd < value.length &&\n        IsRegionalIndicator(value.codePointAt(clusterEnd))) {\n        clusterEnd += CodePointLength(value.codePointAt(clusterEnd));\n    }\n    return clusterEnd;\n}\n// --------------------------------------------------------------------------\n// IsGraphemeCodePoint\n// --------------------------------------------------------------------------\nfunction IsGraphemeCodePoint(value) {\n    return ((value >= 0x0300) && ( // above special range\n    IsHighSurrogate(value) ||\n        IsCombiningMark(value) ||\n        IsVariationSelector(value) ||\n        IsZeroWidthJoiner(value)));\n}\n// --------------------------------------------------------------------------\n// IsMinLengthSegmented\n// --------------------------------------------------------------------------\n/** Checks if a string has at least a minimum number of grapheme clusters */\nfunction IsMinLengthSegmented(value, minLength) {\n    // if (minLength === 0) return true // 0-length (unreachable)\n    let count = 0, index = 0;\n    while (index < value.length) {\n        index = NextGraphemeClusterIndex(value, index);\n        if ((++count) >= minLength)\n            return true;\n    }\n    return false;\n}\n// --------------------------------------------------------------------------\n// IsMaxLengthSegmented\n// --------------------------------------------------------------------------\n/** Checks if a string has at most a maximum number of grapheme clusters */\nfunction IsMaxLengthSegmented(value, maxLength) {\n    let count = 0, index = 0;\n    while (index < value.length) {\n        index = NextGraphemeClusterIndex(value, index);\n        if ((++count) > maxLength)\n            return false;\n    }\n    return true;\n}\n// --------------------------------------------------------------------------\n// GraphemeCount\n// --------------------------------------------------------------------------\n/** Returns the number of grapheme clusters in a string */\nexport function GraphemeCount(value) {\n    let count = 0, index = 0;\n    while (index < value.length) {\n        index = NextGraphemeClusterIndex(value, index);\n        count++;\n    }\n    return count;\n}\n// --------------------------------------------------------------------------\n// IsMinLength\n// --------------------------------------------------------------------------\n/** Fast check for minimum grapheme length, falls back to full check if needed */\nexport function IsMinLength(value, minLength) {\n    if (minLength === 0)\n        return true; // 0-length\n    if (value.length < minLength)\n        return false; // length is upper bound on grapheme count\n    let index = 0;\n    while (true) {\n        if (IsGraphemeCodePoint(value.charCodeAt(index))) {\n            return IsMinLengthSegmented(value, minLength);\n        }\n        if ((++index) >= minLength)\n            return true;\n    }\n}\n// --------------------------------------------------------------------------\n// IsMaxLength\n// --------------------------------------------------------------------------\n/** Fast check for maximum grapheme length, falls back to full check if needed */\nexport function IsMaxLength(value, maxLength) {\n    if (value.length <= maxLength)\n        return true; // length is upper bound on grapheme count\n    let index = 0;\n    while (true) {\n        if (IsGraphemeCodePoint(value.charCodeAt(index))) {\n            return IsMaxLengthSegmented(value, maxLength);\n        }\n        if ((++index) > maxLength)\n            return false;\n    }\n}\n","// ------------------------------------------------------------------\n// CodePointCount (10-bit Shift Branchless)\n//\n// Counts code points by enumerating UTF-16 sequences and incrementing\n// when not within a high/low pairing. Because surrogate blocks are\n// 1024 (2^10) wide and aligned, by shifting right by (0xA), we can\n// collapse each unit to a constant per block (high: 0x36, low: 0x37)\n// and shift again into a packed (0x3637) for comparison. Fetch calls\n// to charCodeAt(...) are kept to one call per iteration.\n//\n// ------------------------------------------------------------------\n/** Returns the total number of Unicode code points in the string */\nexport function CodePointCount(value) {\n    let result = 0, index = 0, prev = 0;\n    while (index < value.length) {\n        const next = value.charCodeAt(index++) >> 0xA; // shift  (10-bits into high/low)\n        result += +(((prev << 8) | next) !== 0x3637); // packed (or +!(prev === 0x36 && next === 0x37))\n        prev = next;\n    }\n    return result;\n}\n// ------------------------------------------------------------------\n// IsMaxLength\n// ------------------------------------------------------------------\n/** Returns true if the string length in Unicode code points is less than or equal to maxLength */\nexport function IsMaxLength(value, maxLength) {\n    return value.length <= maxLength || (value.length <= (maxLength << 1) && CodePointCount(value) <= maxLength);\n}\n// ------------------------------------------------------------------\n// IsMinLength\n// ------------------------------------------------------------------\n/** Returns true if the string length in Unicode code points is greater than or equal to minLength */\nexport function IsMinLength(value, minLength) {\n    return value.length >= (minLength << 1) || (value.length >= minLength && CodePointCount(value) >= minLength);\n}\n","// deno-fmt-ignore-file\nimport * as UnicodeSegmentGuard from './unicode/unicode_segment.mjs';\nimport * as UnicodeGuard from './unicode/unicode.mjs';\n// --------------------------------------------------------------------------\n// Guards\n// --------------------------------------------------------------------------\n/** Returns true if this value is an array */\nexport function IsArray(value) {\n    return Array.isArray(value);\n}\n/** Returns true if this value is bigint */\nexport function IsBigInt(value) {\n    return IsEqual(typeof value, 'bigint');\n}\n/** Returns true if this value is a boolean */\nexport function IsBoolean(value) {\n    return IsEqual(typeof value, 'boolean');\n}\n/** Returns true if this value is a constructor */\nexport function IsConstructor(value) {\n    if (IsUndefined(value) || !IsFunction(value))\n        return false;\n    const result = Function.prototype.toString.call(value);\n    if (/^class\\s/.test(result))\n        return true;\n    if (/\\[native code\\]/.test(result))\n        return true;\n    return false;\n}\n/** Returns true if this value is a function */\nexport function IsFunction(value) {\n    return IsEqual(typeof value, 'function');\n}\n/** Returns true if this value is integer */\nexport function IsInteger(value) {\n    return Number.isInteger(value);\n}\n/** Returns true if this value is null */\nexport function IsNull(value) {\n    return IsEqual(value, null);\n}\n/** Returns true if this value is number */\nexport function IsNumber(value) {\n    return Number.isFinite(value);\n}\n/** Returns true if this value is an object but not an array */\nexport function IsObjectNotArray(value) {\n    return IsObject(value) && !IsArray(value);\n}\n/** Returns true if this value is an object */\nexport function IsObject(value) {\n    return IsEqual(typeof value, 'object') && !(IsNull(value));\n}\n/** Returns true if this value is string */\nexport function IsString(value) {\n    return IsEqual(typeof value, 'string');\n}\n/** Returns true if this value is symbol */\nexport function IsSymbol(value) {\n    return IsEqual(typeof value, 'symbol');\n}\n/** Returns true if this value is undefined */\nexport function IsUndefined(value) {\n    return IsEqual(value, undefined);\n}\n// --------------------------------------------------------------------------\n// Relational\n// --------------------------------------------------------------------------\nexport function IsEqual(left, right) {\n    return left === right;\n}\nexport function IsGreaterThan(left, right) {\n    return left > right;\n}\nexport function IsLessThan(left, right) {\n    return left < right;\n}\nexport function IsLessEqualThan(left, right) {\n    return left <= right;\n}\nexport function IsGreaterEqualThan(left, right) {\n    return left >= right;\n}\n// --------------------------------------------------------------------------\n// MultipleOf\n// --------------------------------------------------------------------------\nexport function IsMultipleOf(dividend, divisor) {\n    if (IsBigInt(dividend) || IsBigInt(divisor)) {\n        return BigInt(dividend) % BigInt(divisor) === 0n;\n    }\n    const tolerance = 1e-10;\n    if (!IsNumber(dividend))\n        return true;\n    if (IsInteger(dividend) && (1 / divisor) % 1 === 0)\n        return true;\n    const mod = dividend % divisor;\n    return Math.min(Math.abs(mod), Math.abs(mod - divisor), Math.abs(mod + divisor)) < tolerance;\n}\n// ------------------------------------------------------------------\n// IsClassInstance\n// ------------------------------------------------------------------\n/** Returns true if the value appears to be an instance of a class. */\nexport function IsClassInstance(value) {\n    if (!IsObject(value))\n        return false;\n    const proto = globalThis.Object.getPrototypeOf(value);\n    if (IsNull(proto))\n        return false;\n    return IsEqual(typeof proto.constructor, 'function') &&\n        !(IsEqual(proto.constructor, globalThis.Object) ||\n            IsEqual(proto.constructor.name, 'Object'));\n}\n// ------------------------------------------------------------------\n// IsValueLike\n// ------------------------------------------------------------------\nexport function IsValueLike(value) {\n    return IsBigInt(value) ||\n        IsBoolean(value) ||\n        IsNull(value) ||\n        IsNumber(value) ||\n        IsString(value) ||\n        IsUndefined(value);\n}\n// --------------------------------------------------------------------------\n// String\n// --------------------------------------------------------------------------\n/** Returns the total number of visual grapheme clusters in the string. */\nexport function GraphemeCount(value) {\n    return UnicodeSegmentGuard.GraphemeCount(value);\n}\n/** Returns the total number of Unicode code points in the string. */\nexport function CodePointCount(value) {\n    return UnicodeGuard.CodePointCount(value);\n}\n/** Returns true if the string length in Unicode code points does not exceed maxLength */\nexport function IsMaxLength(value, maxLength) {\n    return UnicodeGuard.IsMaxLength(value, maxLength);\n}\n/** Returns true if the string length in Unicode code points is at least minLength */\nexport function IsMinLength(value, minLength) {\n    return UnicodeGuard.IsMinLength(value, minLength);\n}\n// --------------------------------------------------------------------------\n// Array\n// --------------------------------------------------------------------------\n/** Returns true if every element from offset satisfies the callback, short-circuiting on the first failure */\nexport function Every(value, offset, callback) {\n    return value.every((item, index) => (index < offset) || callback(item, index));\n}\n/** Returns true if every element from offset satisfies the callback, using exhaustive enumeration */\nexport function EveryAll(value, offset, callback) {\n    let result = true;\n    value.forEach((item, index) => { if ((index >= offset) && !callback(item, index))\n        result = false; });\n    return result;\n}\n/** Returns true if some element satisfies the callback, short-circuiting on the first success */\nexport function Some(value, callback) {\n    return value.some((value, index) => callback(value, index));\n}\n/** Returns true if some element satisfies the callback, using exhaustive enumeration */\nexport function SomeAll(value, callback) {\n    let result = false;\n    value.forEach((item, index) => { if (callback(item, index))\n        result = true; });\n    return result;\n}\n/** Returns the count of elements that satisfy the callback */\nexport function Counted(value, callback) {\n    return value.reduce((result, value, index) => callback(value, index) ? ++result : result, 0);\n}\n/** Shifts the left-most element from an array and dispatches to the true arm, or the false arm if empty */\nexport function ShiftLeft(array, true_, false_) {\n    return (IsEqual(array.length, 0) ? false_() : true_(array[0], array.slice(1)));\n}\n// --------------------------------------------------------------------------\n// Object\n// --------------------------------------------------------------------------\n/** Returns true if the PropertyKey is Unsafe (ref: prototype-pollution). */\nexport function IsUnsafePropertyKey(key) {\n    return IsEqual(key, '__proto__') || IsEqual(key, 'constructor') || IsEqual(key, 'prototype');\n}\n/** Returns true if this value has this property key */\nexport function HasPropertyKey(value, key) {\n    return IsUnsafePropertyKey(key) ? Object.prototype.hasOwnProperty.call(value, key) : key in value;\n}\n/** Returns object entries as `[RegExp, Value][]` */\nexport function EntriesRegExp(value) {\n    return Keys(value).map((key) => [new RegExp(`^${key}$`), value[key]]);\n}\n/** Returns object entries as `[string, Value][]` */\nexport function Entries(value) {\n    return Object.entries(value);\n}\n/** Returns property keys for this object via `Object.getOwnPropertyNames({ ... })` */\nexport function Keys(value) {\n    return Object.getOwnPropertyNames(value);\n}\n/** Returns the property keys for this object via `Object.getOwnPropertySymbols({ ... })` */\nexport function Symbols(value) {\n    return Object.getOwnPropertySymbols(value);\n}\n/** Returns the property values for the given object via `Object.values()` */\nexport function Values(value) {\n    return Object.values(value);\n}\n// ------------------------------------------------------------------\n// IsDeepEqual\n// ------------------------------------------------------------------\nfunction DeepEqualObject(left, right) {\n    if (!IsObject(right))\n        return false;\n    const keys = Keys(left);\n    return IsEqual(keys.length, Keys(right).length) &&\n        keys.every((key) => IsDeepEqual(left[key], right[key]));\n}\nfunction DeepEqualArray(left, right) {\n    return IsArray(right) && IsEqual(left.length, right.length) &&\n        left.every((_, index) => IsDeepEqual(left[index], right[index]));\n}\n/** Returns true if left and right values are structurally equal */\nexport function IsDeepEqual(left, right) {\n    return (IsArray(left) ? DeepEqualArray(left, right) :\n        IsObject(left) ? DeepEqualObject(left, right) :\n            IsEqual(left, right));\n}\n","// --------------------------------------------------------------------------\n// Primitives\n// --------------------------------------------------------------------------\nexport function IsBoolean(value) {\n    return value instanceof Boolean;\n}\nexport function IsNumber(value) {\n    return value instanceof Number;\n}\nexport function IsString(value) {\n    return value instanceof String;\n}\n// --------------------------------------------------------------------------\n// TypeArray\n// --------------------------------------------------------------------------\nexport function IsTypeArray(value) {\n    return globalThis.ArrayBuffer.isView(value);\n}\n/** Returns true if the value is a Int8Array */\nexport function IsInt8Array(value) {\n    return value instanceof globalThis.Int8Array;\n}\n/** Returns true if the value is a Uint8Array */\nexport function IsUint8Array(value) {\n    return value instanceof globalThis.Uint8Array;\n}\n/** Returns true if the value is a Uint8ClampedArray */\nexport function IsUint8ClampedArray(value) {\n    return value instanceof globalThis.Uint8ClampedArray;\n}\n/** Returns true if the value is a Int16Array */\nexport function IsInt16Array(value) {\n    return value instanceof globalThis.Int16Array;\n}\n/** Returns true if the value is a Uint16Array */\nexport function IsUint16Array(value) {\n    return value instanceof globalThis.Uint16Array;\n}\n/** Returns true if the value is a Int32Array */\nexport function IsInt32Array(value) {\n    return value instanceof globalThis.Int32Array;\n}\n/** Returns true if the value is a Uint32Array */\nexport function IsUint32Array(value) {\n    return value instanceof globalThis.Uint32Array;\n}\n/** Returns true if the value is a Float32Array */\nexport function IsFloat32Array(value) {\n    return value instanceof globalThis.Float32Array;\n}\n/** Returns true if the value is a Float64Array */\nexport function IsFloat64Array(value) {\n    return value instanceof globalThis.Float64Array;\n}\n/** Returns true if the value is a BigInt64Array */\nexport function IsBigInt64Array(value) {\n    return value instanceof globalThis.BigInt64Array;\n}\n/** Returns true if the value is a BigUint64Array */\nexport function IsBigUint64Array(value) {\n    return value instanceof globalThis.BigUint64Array;\n}\n// ------------------------------------------------------------------\n// RegExp\n// ------------------------------------------------------------------\n/** Returns true if the value is a RegExp */\nexport function IsRegExp(value) {\n    return value instanceof globalThis.RegExp;\n}\n// ------------------------------------------------------------------\n// Date\n// ------------------------------------------------------------------\n/** Returns true if the value is a Date */\nexport function IsDate(value) {\n    return value instanceof globalThis.Date;\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\n/** Returns true if the value is a Set */\nexport function IsSet(value) {\n    return value instanceof globalThis.Set;\n}\n// ------------------------------------------------------------------\n// Map\n// ------------------------------------------------------------------\n/** Returns true if the value is a Map */\nexport function IsMap(value) {\n    return value instanceof globalThis.Map;\n}\n","// ------------------------------------------------------------------\n// Guards\n// ------------------------------------------------------------------\nexport * as EmitGuard from './emit.mjs';\nexport * as GlobalsGuard from './globals.mjs';\nexport * as NativeGuard from './native.mjs';\n// ------------------------------------------------------------------\n// Default\n// ------------------------------------------------------------------\nimport * as Guard from './guard.mjs';\nexport * as Guard from './guard.mjs';\nexport default Guard;\n","import { Guard } from '../../guard/index.mjs';\n// -------------------------------------------------------------------\n// State\n// -------------------------------------------------------------------\n// Internal mutable state\nconst settings = {\n    immutableTypes: false,\n    maxErrors: 8,\n    maxParseErrors: 1,\n    maxInstantiationCount: 128,\n    useAcceleration: true,\n    exactOptionalPropertyTypes: false,\n    enumerableKind: false,\n    correctiveParse: false,\n    unionPrioritySort: true\n};\n// -------------------------------------------------------------------\n// Reset\n// -------------------------------------------------------------------\n/** Resets system settings to defaults */\nexport function Reset() {\n    settings.immutableTypes = false;\n    settings.maxErrors = 8;\n    settings.maxParseErrors = 1;\n    settings.maxInstantiationCount = 128;\n    settings.useAcceleration = true;\n    settings.exactOptionalPropertyTypes = false;\n    settings.enumerableKind = false;\n    settings.correctiveParse = false;\n    settings.unionPrioritySort = true;\n}\n// -------------------------------------------------------------------\n// Set\n// -------------------------------------------------------------------\n/** Sets system settings */\nexport function Set(options) {\n    for (const key of Guard.Keys(options)) {\n        const value = options[key];\n        if (value !== undefined) {\n            Object.defineProperty(settings, key, { value });\n        }\n    }\n}\n// -------------------------------------------------------------------\n// Get\n// -------------------------------------------------------------------\n/** Gets current system settings */\nexport function Get() {\n    return settings;\n}\n","import { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Keys (alternatively, Reflect.ownKeys(...))\n// ------------------------------------------------------------------\n/** Returns the own string and symbol keys of the given object. */\nexport function Keys(value) {\n    return [...Guard.Keys(value), ...Guard.Symbols(value)];\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { Guard } from '../../guard/index.mjs';\nimport { Settings } from '../settings/index.mjs';\nimport { Keys } from './keys.mjs';\n// ------------------------------------------------------------------\n// Freeze\n// ------------------------------------------------------------------\nfunction Freeze(value, seen) {\n    if (seen.has(value))\n        return;\n    seen.add(value);\n    for (const key of Keys(value)) {\n        const descriptor = Object.getOwnPropertyDescriptor(value, key);\n        if (!descriptor || !('value' in descriptor))\n            continue;\n        if (Guard.IsObject(descriptor.value))\n            Freeze(descriptor.value, seen);\n    }\n    Object.freeze(value);\n}\n// ------------------------------------------------------------------\n// Finalize\n// ------------------------------------------------------------------\n/** Finalizes a type. Will recursively freeze if `immutableTypes` is true, otherwise no action. */\nexport function Finalize(value) {\n    if (!Settings.Get().immutableTypes)\n        return value;\n    Freeze(value, new WeakSet());\n    return value;\n}\n","// deno-lint-ignore-file ban-types no-explicit-any\n// deno-fmt-ignore-file\nimport { Metrics } from './metrics.mjs';\nimport { Finalize } from './finalize.mjs';\nimport { Keys } from './keys.mjs';\n/** Performs an Object assign using the Left and Right object types. */\nexport function Assign(left, right) {\n    Metrics.assign += 1;\n    const result = {}, rightKeys = Keys(right), leftKeys = Keys(left);\n    for (const key of leftKeys) {\n        if (rightKeys.includes(key))\n            continue;\n        Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(left, key));\n    }\n    for (const key of rightKeys) {\n        Object.defineProperty(result, key, Object.getOwnPropertyDescriptor(right, key));\n    }\n    return Finalize(result);\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { Settings } from '../settings/index.mjs';\nimport { Metrics } from './metrics.mjs';\nimport { Finalize } from './finalize.mjs';\n// ------------------------------------------------------------------\n// WithEnumerable\n// ------------------------------------------------------------------\nfunction WithEnumerable(left, right) {\n    return { ...left, ...right };\n}\n// ------------------------------------------------------------------\n// WithHidden\n// ------------------------------------------------------------------\nfunction WithHidden(left, right) {\n    for (const key of Object.keys(right)) {\n        Object.defineProperty(left, key, {\n            configurable: true,\n            writable: true,\n            enumerable: false,\n            value: right[key]\n        });\n    }\n    return left;\n}\n// ------------------------------------------------------------------\n// Create\n// ------------------------------------------------------------------\n/** Creates an object with hidden, enumerable, and optional property sets. */\nexport function Create(hidden, enumerable, options = {}) {\n    Metrics.create += 1;\n    const withEnumerable = WithEnumerable(enumerable, options);\n    const withHidden = Settings.Get().enumerableKind ? WithEnumerable(withEnumerable, hidden) : WithHidden(withEnumerable, hidden);\n    return Finalize(withHidden);\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { Metrics } from './metrics.mjs';\nimport { Finalize } from './finalize.mjs';\nimport { Keys } from './keys.mjs';\n// ------------------------------------------------------------------\n// Discard\n// ------------------------------------------------------------------\n/** Discards property keys from the given object. */\nexport function Discard(value, propertyKeys) {\n    Metrics.discard += 1;\n    const result = {};\n    for (const key of Keys(value)) {\n        if (propertyKeys.includes(key))\n            continue;\n        const descriptor = Object.getOwnPropertyDescriptor(value, key);\n        Object.defineProperty(result, key, descriptor);\n    }\n    return Finalize(result);\n}\n","// deno-lint-ignore-file no-explicit-any\nimport { Guard } from '../../guard/index.mjs';\nimport { Settings } from '../settings/index.mjs';\nimport { Metrics } from './metrics.mjs';\nimport { Finalize } from './finalize.mjs';\nimport { Keys } from './keys.mjs';\n// ------------------------------------------------------------------\n// WithCurrent\n// ------------------------------------------------------------------\nfunction WithCurrent(current, hiddenKeys, enumerableKeys, result) {\n    for (const key of Keys(current)) {\n        if (Guard.IsUnsafePropertyKey(key) || hiddenKeys.includes(key) || enumerableKeys.includes(key))\n            continue; // (ignore: prototype-pollution)\n        const descriptor = Object.getOwnPropertyDescriptor(current, key); // safe-name!\n        Object.defineProperty(result, key, descriptor);\n    }\n}\n// ------------------------------------------------------------------\n// WithHidden\n// ------------------------------------------------------------------\nfunction WithHidden(hidden, keys, result) {\n    const enumerableKind = Settings.Get().enumerableKind;\n    for (const key of keys) {\n        if (Guard.IsUnsafePropertyKey(key))\n            continue; // (ignore: prototype-pollution)\n        Object.defineProperty(result, key, {\n            configurable: true,\n            writable: true,\n            enumerable: enumerableKind,\n            value: hidden[key]\n        });\n    }\n}\n// ------------------------------------------------------------------\n// WithEnumerable\n// ------------------------------------------------------------------\nfunction WithEnumerable(enumerable, keys, result) {\n    for (const key of keys) {\n        if (Guard.IsUnsafePropertyKey(key))\n            continue; // (ignore: prototype-pollution)\n        Object.defineProperty(result, key, {\n            configurable: true,\n            enumerable: true,\n            writable: true,\n            value: enumerable[key]\n        });\n    }\n}\n// ------------------------------------------------------------------\n// Update\n// ------------------------------------------------------------------\n/** Updates an existing type with additional hidden and enumerable properties while preserving property configuration. */\nexport function Update(current, hidden, enumerable) {\n    Metrics.update += 1;\n    const result = {}, hiddenKeys = Keys(hidden), enumerableKeys = Keys(enumerable);\n    WithCurrent(current, hiddenKeys, enumerableKeys, result);\n    WithHidden(hidden, hiddenKeys, result);\n    WithEnumerable(enumerable, enumerableKeys, result);\n    return Finalize(result);\n}\n","// deno-lint-ignore-file\n// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Kind\n// ------------------------------------------------------------------\nexport function IsKind(value, kind) {\n    return Guard.IsObject(value) && Guard.HasPropertyKey(value, '~kind') && Guard.IsEqual(value[\"~kind\"], kind);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\nexport function IsSchema(value) {\n    return Guard.IsObject(value);\n}\n","import { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Deferred action. */\nexport function Deferred(action, parameters, options) {\n    return Memory.Create({ '~kind': 'Deferred' }, { type: 'deferred', action, parameters, options }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TDeferred. */\nexport function IsDeferred(value) {\n    return IsKind(value, 'Deferred');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nexport function AddReadonlyAction(type, options) {\n    const result = Memory.Update(type, { '~readonly': true }, options);\n    return result;\n}\nexport function AddReadonlyInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return AddReadonlyAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nexport function AddOptionalAction(type, options) {\n    const result = Memory.Update(type, { '~optional': true }, options);\n    return result;\n}\nexport function AddOptionalInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return AddOptionalAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates an Array type. */\nexport function _Array_(items, options) {\n    return Memory.Create({ '~kind': 'Array' }, { type: 'array', items }, options);\n}\nexport { _Array_ as Array }; // Prevent Collision With Global Scope\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TArray. */\nexport function IsArray(value) {\n    return IsKind(value, 'Array');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TArray. */\nexport function ArrayOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'items']);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Constructor type. */\nexport function Constructor(parameters, instanceType, options = {}) {\n    return Memory.Create({ '~kind': 'Constructor' }, { type: 'constructor', parameters, instanceType }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TConstructor. */\nexport function IsConstructor(value) {\n    return IsKind(value, 'Constructor');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TConstructor. */\nexport function ConstructorOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'parameters', 'instanceType']);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Function type. */\nexport function _Function_(parameters, returnType, options = {}) {\n    return Memory.Create({ ['~kind']: 'Function' }, { type: 'function', parameters, returnType }, options);\n}\nexport { _Function_ as Function }; // Prevent Collision With Global Scope\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TFunction. */\nexport function IsFunction(value) {\n    return IsKind(value, 'Function');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TFunction. */\nexport function FunctionOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'parameters', 'returnType']);\n}\n","// deno-lint-ignore-file no-explicit-any\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Ref type. */\nexport function Ref(ref, options) {\n    return Memory.Create({ ['~kind']: 'Ref' }, { $ref: ref }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TRef. */\nexport function IsRef(value) {\n    return IsKind(value, 'Ref');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from '../types/schema.mjs';\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\n/** Creates a Generic type. */\nexport function Generic(parameters, expression) {\n    return Memory.Create({ '~kind': 'Generic' }, { type: 'generic', parameters, expression });\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TGeneric. */\nexport function IsGeneric(value) {\n    return IsKind(value, 'Generic');\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file \nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Any type. */\nexport function Any(options) {\n    return Memory.Create({ ['~kind']: 'Any' }, {}, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TAny. */\nexport function IsAny(value) {\n    return IsKind(value, 'Any');\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const NeverPattern = '(?!)';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Never type. */\nexport function Never(options) {\n    return Memory.Create({ '~kind': 'Never' }, { not: {} }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TNever. */\nexport function IsNever(value) {\n    return IsKind(value, 'Never');\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { AddOptionalAction } from '../engine/optional/instantiate_add.mjs';\n/** Creates a deferred AddOptional action. */\nexport function AddOptionalDeferred(type, options = {}) {\n    return Deferred('AddOptional', [type], options);\n}\n/** Applies an AddOptional action to a type. */\nexport function AddOptional(type, options = {}) {\n    return AddOptionalAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\nimport { AddOptional } from '../action/_add_optional.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Applies an Optional modifier to the given type. */\nexport function Optional(type) {\n    return AddOptional(type);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TOptional */\nexport function IsOptional(value) {\n    return IsSchema(value) && Guard.HasPropertyKey(value, '~optional');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsOptional } from './_optional.mjs';\n/** Creates a RequiredArray derived from the given TProperties value. */\nexport function RequiredArray(properties) {\n    return Guard.Keys(properties).filter((key) => !IsOptional(properties[key]));\n}\n/** Extracts a tuple of keys from a TProperties value. */\nexport function PropertyKeys(properties) {\n    return Guard.Keys(properties);\n}\n/** Extracts a tuple of property values from a TProperties value. */\nexport function PropertyValues(properties) {\n    return Guard.Values(properties);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { RequiredArray } from './properties.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates an Object type. */\nexport function _Object_(properties, options = {}) {\n    const requiredKeys = RequiredArray(properties);\n    const required = requiredKeys.length > 0 ? { required: requiredKeys } : {};\n    return Memory.Create({ '~kind': 'Object' }, { type: 'object', ...required, properties }, options);\n}\nexport { _Object_ as Object }; // Prevent Collision With Global Scope\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TObject. */\nexport function IsObject(value) {\n    return IsKind(value, 'Object');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TObject. */\nexport function ObjectOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'properties', 'required']);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates an Unknown type. */\nexport function Unknown(options) {\n    return Memory.Create({ ['~kind']: 'Unknown' }, {}, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUnknown. */\nexport function IsUnknown(value) {\n    return IsKind(value, 'Unknown');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Cyclic type. */\nexport function Cyclic($defs, $ref, options) {\n    // $defs require an $id per definition to enable Ajv to resolve correctly\n    const defs = Guard.Keys($defs).reduce((result, key) => {\n        return { ...result, [key]: Memory.Update($defs[key], {}, { $id: key }) };\n    }, {});\n    return Memory.Create({ ['~kind']: 'Cyclic' }, { $defs: defs, $ref }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TCyclic. */\nexport function IsCyclic(value) {\n    return IsKind(value, 'Cyclic');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TCyclic. */\nexport function CyclicOptions(type) {\n    return Memory.Discard(type, ['~kind', '$defs', '$ref']);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file \nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Unsafe type. */\nexport function Unsafe(schema) {\n    return Memory.Update(schema, { ['~unsafe']: null }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUnsafe. */\nexport function IsUnsafe(value) {\n    return Guard.IsObjectNotArray(value)\n        && Guard.HasPropertyKey(value, '~unsafe')\n        && Guard.IsNull(value['~unsafe']);\n}\n","/**\n * Match arguments for overloaded functions that use the `...args: unknown[]` pattern. Arguments\n * are parsed using argument length only.\n */\nexport function Match(args, match) {\n    return (match[args.length]?.(...args) ?? (() => {\n        throw Error('Invalid Arguments');\n    })());\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from '../types/schema.mjs';\nimport { Unknown } from '../types/unknown.mjs';\n/** Creates an Infer instruction. */\nexport function Infer(...args) {\n    const [name, extends_] = Arguments.Match(args, {\n        2: (name, extends_) => [name, extends_, extends_],\n        1: (name) => [name, Unknown(), Unknown()],\n    });\n    return Memory.Create({ ['~kind']: 'Infer' }, { type: 'infer', name, extends: extends_ }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TInfer. */\nexport function IsInfer(value) {\n    return IsKind(value, 'Infer');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Dependent type */\nexport function Dependent(if_, then_, else_, options = {}) {\n    return Memory.Create({ '~kind': 'Dependent' }, { if: if_, then: then_, else: else_ }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TDependent. */\nexport function IsDependent(value) {\n    return IsKind(value, 'Dependent');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a IsDependent. */\nexport function DependentOptions(type) {\n    return Memory.Discard(type, ['~kind', 'if', 'then', 'else']);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { IsTypeScriptEnumLike } from '../engine/enum/typescript_enum_to_enum_values.mjs';\nimport { TypeScriptEnumToEnumValues } from '../engine/enum/typescript_enum_to_enum_values.mjs';\n/** Returns true if the given value is a EnumValue */\nexport function IsEnumValue(value) {\n    return Guard.IsString(value) || Guard.IsNumber(value);\n}\n/** Creates an Enum type. */\nexport function Enum(value, options) {\n    const values = IsTypeScriptEnumLike(value) ? TypeScriptEnumToEnumValues(value) : value;\n    return Memory.Create({ '~kind': 'Enum' }, { enum: values }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TEnum. */\nexport function IsEnum(value) {\n    return IsKind(value, 'Enum');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Intersect type. */\nexport function Intersect(types, options = {}) {\n    return Memory.Create({ '~kind': 'Intersect' }, { allOf: types }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TIntersect. */\nexport function IsIntersect(value) {\n    return IsKind(value, 'Intersect');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TIntersect. */\nexport function IntersectOptions(type) {\n    return Memory.Discard(type, ['~kind', 'allOf']);\n}\n","// deno-coverage-ignore-start - unreachable by definition\n/** Used for unreachable logic */\nexport function Unreachable() {\n    throw new Error('Unreachable');\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../unreachable/index.mjs';\nimport { GlobalsGuard, Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// InstanceKeys\n//\n// Retrieves all enumerable and non-enumerable own property keys\n// and inherited prototype keys (excluding symbols and the 'constructor')\n// from an object instance.\n//\n// This function is useful for differentiating between class instances\n// based on their structural keys rather than relying on the\n// constructor name. It provides a more reliable structural comparison\n// by capturing both own and prototype properties.\n//\n// ------------------------------------------------------------------\nfunction InstanceKeys(value) {\n    const propertyKeys = new Set();\n    let current = value;\n    while (current && current !== Object.prototype) {\n        for (const key of Reflect.ownKeys(current)) {\n            if (key !== 'constructor' && typeof key !== 'symbol')\n                propertyKeys.add(key);\n        }\n        current = Object.getPrototypeOf(current);\n    }\n    return [...propertyKeys];\n}\n// ------------------------------------------------------------------\n// IsIEEE754\n//\n// TypeBox guards do not consider +/- Infinity or NaN as valid\n// numbers, but they are valid IEEE754 numbers. We use a special\n// guard to ensure these numbers are considered for hashing.\n//\n// ------------------------------------------------------------------\nfunction IsIEEE754(value) {\n    return typeof value === 'number';\n}\n// ------------------------------------------------------------------\n// ByteMarker\n// ------------------------------------------------------------------\nconst ByteMarker = {\n    Array: 0x0,\n    BigInt: 0x1,\n    Boolean: 0x2,\n    Date: 0x3,\n    Constructor: 0x4,\n    Function: 0x5,\n    Null: 0x6,\n    Number: 0x7,\n    Object: 0x8,\n    RegExp: 0x9,\n    String: 0xA,\n    Symbol: 0xB,\n    TypeArray: 0xC,\n    Undefined: 0xD\n};\n// ------------------------------------------------------------------\n// State\n// ------------------------------------------------------------------\n//\n// The 64-bit accumulator is held as four 16-bit limbs (A0 is the least\n// significant) so the FNV1A64 operation can be computed with number\n// arithmetic, avoiding a BigInt multiply and modulo for every byte.\n//\n// Offset: 14695981039346656037 (0xCBF29CE484222325)\n//\n// ------------------------------------------------------------------\nlet A0 = 0x2325, A1 = 0x8422, A2 = 0x9CE4, A3 = 0xCBF2;\nconst F64 = new Float64Array(1);\nconst F64In = new DataView(F64.buffer);\nconst F64Out = new Uint8Array(F64.buffer);\n// ------------------------------------------------------------------\n// Operation\n//\n// Prime: 1099511628211 (0x100000001B3 = 2^40 + 0x1B3)\n//\n// The multiply is computed as (A * 0x1B3) + (A << 40) modulo 2^64, \n// where (A << 40) adds (A0 << 8) to the third limb and (A1 << 8) \n// to the fourth.\n//\n// ------------------------------------------------------------------\nfunction FNV1A64_OP(byte) {\n    const L0 = A0 ^ byte;\n    const T0 = L0 * 0x1B3;\n    const T1 = A1 * 0x1B3 + (T0 >>> 16);\n    const T2 = A2 * 0x1B3 + (T1 >>> 16) + (L0 << 8);\n    const T3 = A3 * 0x1B3 + (T2 >>> 16) + (A1 << 8);\n    A0 = T0 & 0xFFFF;\n    A1 = T1 & 0xFFFF;\n    A2 = T2 & 0xFFFF;\n    A3 = T3 & 0xFFFF;\n}\n// ------------------------------------------------------------------\n// Array\n// ------------------------------------------------------------------\nfunction FromArray(value) {\n    FNV1A64_OP(ByteMarker.Array);\n    for (const item of value) {\n        FromValue(item);\n    }\n}\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n    FNV1A64_OP(ByteMarker.BigInt);\n    F64In.setBigInt64(0, value);\n    for (const byte of F64Out) {\n        FNV1A64_OP(byte);\n    }\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n    FNV1A64_OP(ByteMarker.Boolean);\n    FNV1A64_OP(value ? 1 : 0);\n}\n// ------------------------------------------------------------------\n// Constructor\n// ------------------------------------------------------------------\nfunction FromConstructor(value) {\n    FNV1A64_OP(ByteMarker.Constructor);\n    FromValue(value.toString());\n}\n// ------------------------------------------------------------------\n// Date\n// ------------------------------------------------------------------\nfunction FromDate(value) {\n    FNV1A64_OP(ByteMarker.Date);\n    FromValue(value.getTime());\n}\n// ------------------------------------------------------------------\n// Function\n// ------------------------------------------------------------------\nfunction FromFunction(value) {\n    FNV1A64_OP(ByteMarker.Function);\n    FromValue(value.toString());\n}\n// ------------------------------------------------------------------\n// Null\n// ------------------------------------------------------------------\nfunction FromNull(_value) {\n    FNV1A64_OP(ByteMarker.Null);\n}\n// ------------------------------------------------------------------\n// Number | IEEE754\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n    FNV1A64_OP(ByteMarker.Number);\n    F64In.setFloat64(0, value, true /* little-endian */);\n    for (const byte of F64Out) {\n        FNV1A64_OP(byte);\n    }\n}\n// ------------------------------------------------------------------\n// Object\n// ------------------------------------------------------------------\nfunction FromObject(value) {\n    FNV1A64_OP(ByteMarker.Object);\n    for (const key of InstanceKeys(value).sort()) {\n        FromValue(key);\n        FromValue(value[key]);\n    }\n}\n// ------------------------------------------------------------------\n// RegExp\n// ------------------------------------------------------------------\nfunction FromRegExp(value) {\n    FNV1A64_OP(ByteMarker.RegExp);\n    FromString(value.toString());\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nconst encoder = new TextEncoder();\nfunction FromString(value) {\n    FNV1A64_OP(ByteMarker.String);\n    for (let i = 0; i < value.length; i++) {\n        const code = value.charCodeAt(i);\n        if (code > 0x7F) {\n            for (const byte of encoder.encode(value.slice(i))) {\n                FNV1A64_OP(byte);\n            }\n            return;\n        }\n        FNV1A64_OP(code);\n    }\n}\n// ------------------------------------------------------------------\n// Symbol\n// ------------------------------------------------------------------\nfunction FromSymbol(value) {\n    FNV1A64_OP(ByteMarker.Symbol);\n    FromValue(value.toString());\n}\n// ------------------------------------------------------------------\n// TypeArray\n// ------------------------------------------------------------------\nfunction FromTypeArray(value) {\n    FNV1A64_OP(ByteMarker.TypeArray);\n    const buffer = new Uint8Array(value.buffer);\n    for (let i = 0; i < buffer.length; i++) {\n        FNV1A64_OP(buffer[i]);\n    }\n}\n// ------------------------------------------------------------------\n// Undefined\n// ------------------------------------------------------------------\nfunction FromUndefined(_value) {\n    return FNV1A64_OP(ByteMarker.Undefined);\n}\n// ------------------------------------------------------------------\n// Hash\n//\n// deno-coverage-ignore-start - unreachable\n//\n// This function should all JavaScript values so we can't reach the\n// fall-through. We use Unreachable to assert that no values pass\n// through. We will need to handle these should they arise.\n//\n// ------------------------------------------------------------------\nfunction FromValue(value) {\n    return (GlobalsGuard.IsTypeArray(value) ? FromTypeArray(value) :\n        GlobalsGuard.IsDate(value) ? FromDate(value) :\n            GlobalsGuard.IsRegExp(value) ? FromRegExp(value) :\n                GlobalsGuard.IsBoolean(value) ? FromBoolean(value.valueOf()) :\n                    GlobalsGuard.IsString(value) ? FromString(value.valueOf()) :\n                        GlobalsGuard.IsNumber(value) ? FromNumber(value.valueOf()) :\n                            IsIEEE754(value) ? FromNumber(value) :\n                                Guard.IsArray(value) ? FromArray(value) :\n                                    Guard.IsBoolean(value) ? FromBoolean(value) :\n                                        Guard.IsBigInt(value) ? FromBigInt(value) :\n                                            Guard.IsConstructor(value) ? FromConstructor(value) :\n                                                Guard.IsNull(value) ? FromNull(value) :\n                                                    Guard.IsObject(value) ? FromObject(value) :\n                                                        Guard.IsString(value) ? FromString(value) :\n                                                            Guard.IsSymbol(value) ? FromSymbol(value) :\n                                                                Guard.IsUndefined(value) ? FromUndefined(value) :\n                                                                    Guard.IsFunction(value) ? FromFunction(value) :\n                                                                        Unreachable());\n}\n// deno-coverage-ignore-stop\n// ------------------------------------------------------------------\n// Hash\n// ------------------------------------------------------------------\nfunction Hex(limb) {\n    return limb.toString(16).padStart(4, '0');\n}\n/** Generates a FNV1A-64 non cryptographic hash of the given value */\nexport function HashCode(value) {\n    return BigInt(`0x${Hash(value)}`);\n}\n/** Generates a FNV1A-64 non cryptographic hash of the given value */\nexport function Hash(value) {\n    A0 = 0x2325, A1 = 0x8422, A2 = 0x9CE4, A3 = 0xCBF2;\n    FromValue(value);\n    return `${Hex(A3)}${Hex(A2)}${Hex(A1)}${Hex(A0)}`;\n}\n","// deno-fmt-ignore-file\n/** en_US: English (United States) - ISO 639-1 language code 'en' with ISO 3166-1 alpha-2 country code 'US' for United States. */\nexport function en_US(error) {\n    switch (error.keyword) {\n        case 'additionalProperties': return 'must not have additional properties';\n        case 'anyOf': return 'must match a schema in anyOf';\n        case 'boolean': return 'schema is false';\n        case 'const': return 'must be equal to constant';\n        case 'contains': return 'must contain at least 1 valid item';\n        case 'dependencies': return `must have properties ${error.params.dependencies.join(', ')} when property ${error.params.property} is present`;\n        case 'dependentRequired': return `must have properties ${error.params.dependencies.join(', ')} when property ${error.params.property} is present`;\n        case 'enum': return 'must be equal to one of the allowed values';\n        case 'exclusiveMaximum': return `must be ${error.params.comparison} ${error.params.limit}`;\n        case 'exclusiveMinimum': return `must be ${error.params.comparison} ${error.params.limit}`;\n        case 'format': return `must match format \"${error.params.format}\"`;\n        case 'if': return `must match \"${error.params.failingKeyword}\" schema`;\n        case 'maxItems': return `must not have more than ${error.params.limit} items`;\n        case 'maxLength': return `must not have more than ${error.params.limit} characters`;\n        case 'maxProperties': return `must not have more than ${error.params.limit} properties`;\n        case 'maximum': return `must be ${error.params.comparison} ${error.params.limit}`;\n        case 'minItems': return `must not have fewer than ${error.params.limit} items`;\n        case 'minLength': return `must not have fewer than ${error.params.limit} characters`;\n        case 'minProperties': return `must not have fewer than ${error.params.limit} properties`;\n        case 'minimum': return `must be ${error.params.comparison} ${error.params.limit}`;\n        case 'multipleOf': return `must be multiple of ${error.params.multipleOf}`;\n        case 'not': return 'must not be valid';\n        case 'oneOf': return 'must match exactly one schema in oneOf';\n        case 'pattern': return `must match pattern \"${error.params.pattern}\"`;\n        case 'propertyNames': return `property names ${error.params.propertyNames.join(', ')} are invalid`;\n        case 'required': return `must have required properties ${error.params.requiredProperties.join(', ')}`;\n        case 'type': return typeof error.params.type === 'string' ? `must be ${error.params.type}` : `must be either ${error.params.type.join(' or ')}`;\n        case 'unevaluatedItems': return 'must not have unevaluated items';\n        case 'unevaluatedProperties': return 'must not have unevaluated properties';\n        case 'uniqueItems': return `must not have duplicate items`;\n        case '~refine': return error.params.message;\n        // deno-coverage-ignore-start - unreachable\n        default: return 'an unknown validation error occurred';\n        // deno-coverage-ignore-stop\n    }\n}\n","// deno-fmt-ignore-file\nimport { en_US } from './en_US.mjs';\nlet locale = en_US;\n/** Sets the locale */\nexport function Set(callback) {\n    locale = callback;\n}\n/** Gets the locale */\nexport function Get() {\n    return locale;\n}\n/** Resets the locale to `en_US` */\nexport function Reset() {\n    Set(en_US);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\nexport class EncodeBuilder {\n    constructor(type, decode) {\n        this.type = type;\n        this.decode = decode;\n    }\n    Encode(callback) {\n        const type = this.type;\n        const decode = IsCodec(type) ? (value) => this.decode(type['~codec'].decode(value)) : this.decode;\n        const encode = IsCodec(type) ? (value) => type['~codec'].encode(callback(value)) : callback;\n        const codec = { decode, encode };\n        return Memory.Update(this.type, { '~codec': codec }, {});\n    }\n}\nexport class DecodeBuilder {\n    constructor(type) {\n        this.type = type;\n    }\n    Decode(callback) {\n        return new EncodeBuilder(this.type, callback);\n    }\n}\n// ------------------------------------------------------------------\n// Bidirectional\n// ------------------------------------------------------------------\n/** Creates a bi-directional Codec. Codec functions are called on Value.Decode and Value.Encode. */\nexport function Codec(type) {\n    return new DecodeBuilder(type);\n}\n// ------------------------------------------------------------------\n// Unidirectional\n// ------------------------------------------------------------------\n/** Createsa  uni-directional Codec with Decode only. The Decode function is called on Value.Decode */\nexport function Decode(type, callback) {\n    return Codec(type).Decode(callback).Encode(() => {\n        throw Error('Encode not implemented');\n    });\n}\n/** Creates a uni-directional Codec with Encode only. The Encode function is called on Value.Encode */\nexport function Encode(type, callback) {\n    return Codec(type).Decode(() => {\n        throw Error('Decode not implemented');\n    }).Encode(callback);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\nexport function IsCodec(value) {\n    return IsSchema(value) &&\n        Guard.HasPropertyKey(value, '~codec') &&\n        Guard.IsObject(value['~codec']) &&\n        Guard.HasPropertyKey(value['~codec'], 'encode') &&\n        Guard.HasPropertyKey(value['~codec'], 'decode');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\nimport { AddImmutable } from '../action/_add_immutable.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Applies an Immutable modifier to the given type. */\nexport function Immutable(type) {\n    return AddImmutable(type);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TImmutable */\nexport function IsImmutable(value) {\n    return IsSchema(value) && Guard.HasPropertyKey(value, '~immutable');\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { AddReadonlyAction } from '../engine/readonly/instantiate_add.mjs';\n/** Creates a deferred AddReadonly action. */\nexport function AddReadonlyDeferred(type, options = {}) {\n    return Deferred('AddReadonly', [type], options);\n}\n/** Applies an AddReadonly action to a type. */\nexport function AddReadonly(type, options = {}) {\n    return AddReadonlyAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\nimport { AddReadonly } from '../action/_add_readonly.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Applies an Readonly property modifier to the given type. */\nexport function Readonly(type) {\n    return AddReadonly(type);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TReadonly */\nexport function IsReadonly(value) {\n    return IsSchema(value) && Guard.HasPropertyKey(value, '~readonly');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const BigIntPattern = '-?(?:0|[1-9][0-9]*)n';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a BigInt type. */\nexport function BigInt(options) {\n    return Memory.Create({ '~kind': 'BigInt' }, { type: 'bigint' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TBigInt. */\nexport function IsBigInt(value) {\n    return IsKind(value, 'BigInt');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Boolean type. */\nexport function Boolean(options) {\n    return Memory.Create({ '~kind': 'Boolean' }, { type: 'boolean' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TBoolean. */\nexport function IsBoolean(value) {\n    return IsKind(value, 'Boolean');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const IntegerPattern = '-?(?:0|[1-9][0-9]*)';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Integer type. */\nexport function Integer(options) {\n    return Memory.Create({ '~kind': 'Integer' }, { type: 'integer' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TInteger. */\nexport function IsInteger(value) {\n    return IsKind(value, 'Integer');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// InvalidLiteralValue\n// ------------------------------------------------------------------\nexport class InvalidLiteralValue extends Error {\n    constructor(value) {\n        super(`Invalid Literal value`);\n        Object.defineProperty(this, 'cause', {\n            value: { value },\n            writable: false,\n            configurable: false,\n            enumerable: false\n        });\n    }\n}\nexport function LiteralTypeName(value) {\n    return (Guard.IsBigInt(value) ? 'bigint' :\n        Guard.IsBoolean(value) ? 'boolean' :\n            Guard.IsNumber(value) ? 'number' :\n                Guard.IsString(value) ? 'string' :\n                    (() => { throw new InvalidLiteralValue(value); })());\n}\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Literal type. */\nexport function Literal(value, options) {\n    return Memory.Create({ '~kind': 'Literal' }, { type: LiteralTypeName(value), const: value }, options);\n}\n// ------------------------------------------------------------------\n// Guards\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TLiteralValue. */\nexport function IsLiteralValue(value) {\n    return Guard.IsBigInt(value)\n        || Guard.IsBoolean(value)\n        || Guard.IsNumber(value)\n        || Guard.IsString(value);\n}\n/** Returns true if the given value is TLiteral<bigint>. */\nexport function IsLiteralBigInt(value) {\n    return IsLiteral(value) && Guard.IsBigInt(value.const);\n}\n/** Returns true if the given value is TLiteral<boolean>. */\nexport function IsLiteralBoolean(value) {\n    return IsLiteral(value) && Guard.IsBoolean(value.const);\n}\n/** Returns true if the given value is TLiteral<number>. */\nexport function IsLiteralNumber(value) {\n    return IsLiteral(value) && Guard.IsNumber(value.const);\n}\n/** Returns true if the given value is TLiteral<string>. */\nexport function IsLiteralString(value) {\n    return IsLiteral(value) && Guard.IsString(value.const);\n}\n/** Returns true if the given value is TLiteral. */\nexport function IsLiteral(value) {\n    return IsKind(value, 'Literal');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Null type. */\nexport function Null(options) {\n    return Memory.Create({ '~kind': 'Null' }, { type: 'null' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TNull. */\nexport function IsNull(value) {\n    return IsKind(value, 'Null');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Pattern\n// ------------------------------------------------------------------\nexport const NumberPattern = '-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Number type. */\nexport function Number(options) {\n    return Memory.Create({ '~kind': 'Number' }, { type: 'number' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is a TNumber. */\nexport function IsNumber(value) {\n    return IsKind(value, 'Number');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Symbol type. */\nexport function Symbol(options) {\n    return Memory.Create({ '~kind': 'Symbol' }, { type: 'symbol' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TSymbol. */\nexport function IsSymbol(value) {\n    return IsKind(value, 'Symbol');\n}\n","// deno-lint-ignore-file\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// StringPattern\n// ------------------------------------------------------------------\nexport const StringPattern = '.*';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a String type. */\nexport function String(options) {\n    return Memory.Create({ '~kind': 'String' }, { type: 'string' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TString. */\nexport function IsString(value) {\n    return IsKind(value, 'String');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Union type. */\nexport function Union(anyOf, options = {}) {\n    return Memory.Create({ '~kind': 'Union' }, { anyOf }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUnion. */\nexport function IsUnion(value) {\n    return IsKind(value, 'Union');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TUnion. */\nexport function UnionOptions(type) {\n    return Memory.Discard(type, ['~kind', 'anyOf']);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Pattern } from '../../script/parser.mjs';\n/** Parses a Pattern into a sequence of TemplateLiteral types. A result of [] indicates failure to parse. */\nexport function ParsePatternIntoTypes(pattern) {\n    const parsed = Pattern(pattern);\n    const result = Guard.IsEqual(parsed.length, 2)\n        ? parsed[0]\n        : []; // Failed to Parse\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nfunction FromLiteral(_value) {\n    return true;\n}\nfunction FromTypesReduce(types) {\n    return Guard.ShiftLeft(types, (left, right) => FromType(left)\n        ? FromTypesReduce(right)\n        : false, () => true);\n}\nfunction FromTypes(types) {\n    const result = Guard.IsEqual(types.length, 0) ? false : FromTypesReduce(types);\n    return result;\n}\nfunction FromType(type) {\n    return (IsUnion(type) ? FromTypes(type.anyOf) :\n        IsLiteral(type) ? FromLiteral(type.const) :\n            false);\n}\n/** Returns true if the given TemplateLiteral types yields a finite variant set */\nexport function IsTemplateLiteralFinite(types) {\n    const result = FromTypes(types);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nexport function TemplateLiteralCreate(pattern) {\n    return Memory.Create({ ['~kind']: 'TemplateLiteral' }, { type: 'string', pattern }, {});\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { String } from '../../types/string.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { ParsePatternIntoTypes } from '../patterns/pattern.mjs';\nimport { IsTemplateLiteralFinite } from './is_finite.mjs';\nimport { TemplateLiteralCreate } from './create.mjs';\nfunction FromLiteralPush(variants, value, result = []) {\n    return Guard.ShiftLeft(variants, (left, right) => FromLiteralPush(right, value, [...result, `${left}${value}`]), () => result);\n}\nfunction FromLiteral(variants, value) {\n    return (Guard.IsEqual(variants.length, 0) ? [`${value}`] : FromLiteralPush(variants, value));\n}\nfunction FromUnion(variants, types, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => FromUnion(variants, right, [...result, ...FromType(variants, left)]), () => result);\n}\n// ------------------------------------------------------------------\n// deno-coverage-ignore-start - symmetric unreachable | internal\n// \n// Parsed TemplateLiteral patterns only yield Literal or Union but\n// we keep the fall-through to assert that no other types can reach \n// here without error.\n//\n// ------------------------------------------------------------------\nfunction FromType(variants, type) {\n    const result = (IsUnion(type) ? FromUnion(variants, type.anyOf) :\n        IsLiteral(type) ? FromLiteral(variants, type.const) :\n            Unreachable() // []\n    );\n    return result;\n}\nfunction DecodeFromSpan(variants, types) {\n    return Guard.ShiftLeft(types, (left, right) => DecodeFromSpan(FromType(variants, left), right), () => variants);\n}\nfunction VariantsToLiterals(variants) {\n    return variants.map(variant => Literal(variant));\n}\nfunction DecodeTypesAsUnion(types) {\n    const variants = DecodeFromSpan([], types);\n    const literals = VariantsToLiterals(variants);\n    const result = Union(literals);\n    return result;\n}\n// ------------------------------------------------------------------\n// deno-coverage-ignore-start - internal\n// \n// Cannot invoke the 0-length condition as the TemplateLiteral \n// parsers always return at least 1 TLiteral or TUnion. We would \n// return a empty string TLiteral for this case, but will use \n// Unreachable to catch parse inputs that trigger 0-length.\n//\n// ------------------------------------------------------------------\nfunction DecodeTypes(types) {\n    return (Guard.IsEqual(types.length, 0) ? Unreachable() : // Literal('') :\n        Guard.IsEqual(types.length, 1) && IsLiteral(types[0]) ? types[0] :\n            DecodeTypesAsUnion(types));\n}\n/**\n * (Internal) Decodes a TemplateLiteral pattern into a Type. This function is unsafe. Decoding a non-finite\n * TemplateLiteral pattern may produce another TemplateLiteral pattern. During enumeration, this\n * TemplateLiteral -> TemplateLiteral behavior can cause a StackOverflow. A better in-flight template-literal\n * decoding algorithm is needed. (for review)\n */\nexport function TemplateLiteralDecodeUnsafe(pattern) {\n    const types = ParsePatternIntoTypes(pattern);\n    const result = Guard.IsEqual(types.length, 0) // Failed to Parse | IsTemplateLiteralPattern\n        ? String() // ... Pattern cannot be typed, so discard\n        : IsTemplateLiteralFinite(types)\n            ? DecodeTypes(types)\n            : TemplateLiteralCreate(pattern);\n    return result;\n}\n/** Decodes a TemplateLiteral pattern but returns TString if the pattern in non-finite. */\nexport function TemplateLiteralDecode(pattern) {\n    const decoded = TemplateLiteralDecodeUnsafe(pattern);\n    const result = IsTemplateLiteral(decoded) ? String() : decoded;\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nexport function CreateRecord(key, value) {\n    const type = 'object';\n    const patternProperties = { [key]: value };\n    return Memory.Create({ ['~kind']: 'Record' }, { type, patternProperties });\n}\n","// deno-fmt-ignore-file\nimport { StringKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromAnyKey(value) {\n    return CreateRecord(StringKey, value);\n}\n","// deno-fmt-ignore-file\nimport { Object } from '../../types/object.mjs';\nexport function FromBooleanKey(value) {\n    return Object({ true: value, false: value });\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Tuple type. */\nexport function Tuple(types, options = {}) {\n    const [items, minItems, additionalItems] = [types, types.length, false];\n    return Memory.Create({ ['~kind']: 'Tuple' }, { type: 'array', additionalItems, items, minItems }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TTuple. */\nexport function IsTuple(value) {\n    return IsKind(value, 'Tuple');\n}\n// ------------------------------------------------------------------\n// Options\n// ------------------------------------------------------------------\n/** Extracts options from a TTuple. */\nexport function TupleOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'items', 'minItems', 'additionalItems']);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Object } from '../../types/object.mjs';\nexport function TupleElementsToProperties(types) {\n    const result = types.reduceRight((result, right, index) => {\n        return { [index]: right, ...result };\n    }, {});\n    return result;\n}\nexport function TupleToObject(type) {\n    const properties = TupleElementsToProperties(type.items);\n    const result = Object(properties);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction RemoveOptionalOperation(type) {\n    return Memory.Discard(type, ['~optional']);\n}\nexport function RemoveOptionalAction(type, options) {\n    const result = Memory.Update(RemoveOptionalOperation(type), {}, options);\n    return result;\n}\nexport function RemoveOptionalInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return RemoveOptionalAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction RemoveReadonlyOperation(type) {\n    return Memory.Discard(type, ['~readonly']);\n}\nexport function RemoveReadonlyAction(type, options) {\n    const result = Memory.Update(RemoveReadonlyOperation(type), {}, options);\n    return result;\n}\nexport function RemoveReadonlyInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return RemoveReadonlyAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { IsOptional } from '../../types/_optional.mjs';\nimport { IsReadonly } from '../../types/_readonly.mjs';\nimport { AddOptionalAction } from '../optional/instantiate_add.mjs';\nimport { AddReadonlyAction } from '../readonly/instantiate_add.mjs';\nimport { RemoveOptionalAction } from '../optional/instantiate_remove.mjs';\nimport { RemoveReadonlyAction } from '../readonly/instantiate_remove.mjs';\nimport { EvaluateIntersect, EvaluateUnion } from './evaluate.mjs';\nexport function EvaluatePropertyIntersect(left, right) {\n    const isReadonly = IsReadonly(left) && IsReadonly(right);\n    const isOptional = IsOptional(left) && IsOptional(right);\n    const evaluated = EvaluateIntersect([left, right]);\n    const property = RemoveReadonlyAction(RemoveOptionalAction(evaluated, {}), {});\n    return (isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) :\n        isReadonly ? AddReadonlyAction(property, {}) :\n            isOptional ? AddOptionalAction(property, {}) :\n                property);\n}\nexport function EvaluatePropertyUnion(left, right) {\n    const isReadonly = IsReadonly(left) || IsReadonly(right);\n    const isOptional = IsOptional(left) || IsOptional(right);\n    const leftProperty = RemoveReadonlyAction(RemoveOptionalAction(left, {}), {});\n    const rightProperty = RemoveReadonlyAction(RemoveOptionalAction(right, {}), {});\n    const property = EvaluateUnion([leftProperty, rightProperty]);\n    return (isReadonly && isOptional ? AddReadonlyAction(AddOptionalAction(property, {}), {}) :\n        isReadonly ? AddReadonlyAction(property, {}) :\n            isOptional ? AddOptionalAction(property, {}) :\n                property);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { TupleElementsToProperties } from '../tuple/to_object.mjs';\nimport { EvaluatePropertyIntersect } from './property.mjs';\nfunction CompositePropertyKey(left, right, key) {\n    return (key in left\n        ? key in right ? EvaluatePropertyIntersect(left[key], right[key]) : left[key]\n        : key in right ? right[key] : Never());\n}\nfunction CompositeProperties(left, right) {\n    const keys = new Set([...Guard.Keys(left), ...Guard.Keys(right)]);\n    const result = [...keys].reduce((result, key) => {\n        return { ...result, [key]: CompositePropertyKey(left, right, key) };\n    }, {});\n    return result;\n}\nfunction GetProperties(type) {\n    const result = (IsObject(type) ? type.properties :\n        IsTuple(type) ? TupleElementsToProperties(type.items) :\n            {});\n    return result;\n}\nexport function Composite(left, right) {\n    const leftProperties = GetProperties(left);\n    const rightProperties = GetProperties(right);\n    const properties = CompositeProperties(leftProperties, rightProperties);\n    const result = Object(properties);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsAny } from '../../types/any.mjs';\nimport { Never, IsNever } from '../../types/never.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnknown } from '../../types/unknown.mjs';\nimport { Compare, CompareResultLeftInside, CompareResultRightInside, CompareResultEqual } from './compare.mjs';\nimport { Composite } from './composite.mjs';\nfunction NarrowCompareRule(left, right) {\n    const result = Compare(left, right);\n    return (Guard.IsEqual(result, CompareResultLeftInside) ? left :\n        Guard.IsEqual(result, CompareResultRightInside) ? right :\n            Guard.IsEqual(result, CompareResultEqual) ? right :\n                Never());\n}\nfunction CanComposite(type) {\n    return (IsObject(type) || IsTuple(type));\n}\nfunction NarrowCompositeRule(left, right) {\n    const canCompositeLeft = CanComposite(left);\n    const canCompositeRight = CanComposite(right);\n    return (canCompositeLeft && canCompositeRight ? Composite(left, right) :\n        canCompositeLeft && !canCompositeRight ? left :\n            !canCompositeLeft && canCompositeRight ? right :\n                NarrowCompareRule(left, right));\n}\nexport function Narrow(left, right) {\n    return (IsNever(left) ? left :\n        IsAny(left) ? left :\n            IsUnknown(left) ? right :\n                IsNever(right) ? right :\n                    IsAny(right) ? right :\n                        IsUnknown(right) ? left :\n                            NarrowCompositeRule(left, right));\n}\n","// deno-fmt-ignore-file\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { Narrow } from './narrow.mjs';\nimport { EvaluateIntersect } from './evaluate.mjs';\nimport { EvaluateType } from './evaluate.mjs';\nfunction ShouldEvaluate(left, right) {\n    const result = IsUnion(left) || IsUnion(right);\n    return result;\n}\nfunction DistributeOperation(left, right) {\n    const evaluatedLeft = EvaluateType(left);\n    const evaluatedRight = EvaluateType(right);\n    const shouldEvaluate = ShouldEvaluate(evaluatedLeft, evaluatedRight);\n    const result = shouldEvaluate\n        ? EvaluateIntersect([evaluatedLeft, evaluatedRight])\n        : Narrow(evaluatedLeft, evaluatedRight);\n    return result;\n}\nfunction DistributeType(type, types, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => DistributeType(type, right, [...result, DistributeOperation(left, type)]), () => Guard.IsEqual(result.length, 0)\n        ? [type]\n        : result);\n}\nfunction DistributeUnion(types, distribution, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => DistributeUnion(right, distribution, [...result, ...Distribute([left], distribution)]), () => result);\n}\nexport function Distribute(types, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => IsUnion(left)\n        ? Distribute(right, DistributeUnion(left.anyOf, result))\n        : Distribute(right, DistributeType(left, result)), () => result);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { EvaluateType } from '../evaluate/evaluate.mjs';\nimport { EvaluateUnion } from '../evaluate/evaluate.mjs';\nfunction ExcludeType(left, right) {\n    const check = Extends({}, left, right);\n    const result = ExtendsResult.IsExtendsTrueLike(check) ? [] : [left];\n    return result;\n}\nfunction ExcludeUnion(left, right, result = []) {\n    return Guard.ShiftLeft(left, (head, tail) => ExcludeUnion(tail, right, [...result, ...ExcludeType(head, right)]), () => result);\n}\nexport function ExcludeOperation(left, right) {\n    const evaluated = EvaluateType(left);\n    const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];\n    const remaining = ExcludeUnion(canonical, right);\n    const result = EvaluateUnion(remaining);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { Literal } from '../../types/literal.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\n// ------------------------------------------------------------------\n// Infrastructure\n// ------------------------------------------------------------------\nimport { Distribute } from './distribute.mjs';\nimport { Broaden } from './broaden.mjs';\nimport { ExcludeOperation } from '../exclude/operation.mjs';\nimport { TemplateLiteralDecode } from '../template_literal/decode.mjs';\nexport function EvaluateDependent(if_, then_, else_) {\n    const intersected = EvaluateIntersect([if_, then_]);\n    const excluded = ExcludeOperation(else_, if_);\n    const result = EvaluateUnion([intersected, excluded]);\n    return result;\n}\nexport function EvaluateEnum(values, result = []) {\n    return Guard.ShiftLeft(values, (left, right) => EvaluateEnum(right, [...result, Literal(left)]), () => EvaluateUnion(result));\n}\nexport function EvaluateIntersect(types) {\n    const distribution = Distribute(types);\n    const broadend = Broaden(distribution);\n    const result = EvaluateUnion(broadend);\n    return result;\n}\nexport function EvaluateTemplateLiteral(pattern) {\n    const evaluated = TemplateLiteralDecode(pattern);\n    const result = EvaluateType(evaluated);\n    return result;\n}\nexport function EvaluateUnion(types) {\n    const broadend = Broaden(types);\n    const result = EvaluateUnionFast(broadend);\n    return result;\n}\nexport function EvaluateType(type) {\n    const result = (IsDependent(type) ? EvaluateDependent(type.if, type.then, type.else) :\n        IsEnum(type) ? EvaluateEnum(type.enum) :\n            IsIntersect(type) ? EvaluateIntersect(type.allOf) :\n                IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) :\n                    IsUnion(type) ? EvaluateUnion(type.anyOf) :\n                        type);\n    return result;\n}\nexport function EvaluateUnionFast(types) {\n    const result = (Guard.IsEqual(types.length, 1) ? types[0] :\n        Guard.IsEqual(types.length, 0) ? Never() :\n            Union(types));\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromKey } from './from_key.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nexport function FromEnumKey(values, value) {\n    const unionKey = EvaluateEnum(values);\n    const result = FromKey(unionKey, value);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { IntegerKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromIntegerKey(_key, value) {\n    const result = CreateRecord(IntegerKey, value);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { FromKey } from './from_key.mjs';\nexport function FromIntersectKey(types, value) {\n    const evaluatedKey = EvaluateIntersect(types);\n    const result = FromKey(evaluatedKey, value);\n    return result;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nexport function FromLiteralKey(key, value) {\n    return (Guard.IsString(key) || Guard.IsNumber(key) ? Object({ [key]: value }) :\n        Guard.IsEqual(key, false) ? Object({ false: value }) :\n            Guard.IsEqual(key, true) ? Object({ true: value }) :\n                Object({}));\n}\n","// deno-fmt-ignore-file\nimport { NumberKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromNumberKey(_key, value) {\n    const result = CreateRecord(NumberKey, value);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { StringKey } from '../../types/record.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromStringKey(key, value) {\n    // special case: override for string with raw pattern. We do not observe inference for the\n    // raw string patterns, but as a pattern (assuming non-never) is in the set of string, we\n    // allow overriding. Callers will need to narrow to the pattern manually. TB legacy.\n    return (Guard.HasPropertyKey(key, 'pattern') && (Guard.IsString(key.pattern) || key.pattern instanceof RegExp)\n        ? CreateRecord(key.pattern.toString(), value)\n        : CreateRecord(StringKey, value));\n}\n","// deno-fmt-ignore-file\nimport { FromKey } from './from_key.mjs';\nimport { ParsePatternIntoTypes } from '../patterns/pattern.mjs';\nimport { IsTemplateLiteralFinite } from '../template_literal/is_finite.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nimport { CreateRecord } from './record_create.mjs';\nexport function FromTemplateKey(pattern, value) {\n    const types = ParsePatternIntoTypes(pattern);\n    const finite = IsTemplateLiteralFinite(types);\n    const result = finite ? FromKey(EvaluateTemplateLiteral(pattern), value) : CreateRecord(pattern, value);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nfunction FlattenType(type) {\n    const result = IsUnion(type) ? Flatten(type.anyOf) : [type];\n    return result;\n}\nexport function Flatten(types, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => Flatten(right, [...result, ...FlattenType(left)]), () => result);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsSchema } from '../../types/schema.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsNumber } from '../../types/number.mjs';\nimport { IsInteger } from '../../types/integer.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { IsString } from '../../types/string.mjs';\nimport { StringKey } from '../../types/record.mjs';\nimport { Flatten } from '../evaluate/flatten.mjs';\nimport { CreateRecord } from './record_create.mjs';\nfunction StringOrNumberCheck(types) {\n    return types.some(type => IsString(type) || IsNumber(type) || IsInteger(type));\n}\nfunction TryBuildRecord(types, value) {\n    return (Guard.IsEqual(StringOrNumberCheck(types), true)\n        ? CreateRecord(StringKey, value)\n        : undefined);\n}\nfunction CreateProperties(types, value) {\n    return types.reduce((result, left) => {\n        return IsLiteral(left) && (Guard.IsString(left.const) || Guard.IsNumber(left.const))\n            ? { ...result, [left.const]: value }\n            : result;\n    }, {});\n}\nfunction CreateObject(types, value) {\n    const properties = CreateProperties(types, value);\n    const result = Object(properties);\n    return result;\n}\nexport function FromUnionKey(types, value) {\n    const flattened = Flatten(types);\n    const record = TryBuildRecord(flattened, value);\n    return (IsSchema(record) // maybe IsRecord?\n        ? record\n        : CreateObject(flattened, value));\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { IsAny } from '../../types/any.mjs';\nimport { IsBoolean } from '../../types/boolean.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsInteger } from '../../types/integer.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsNumber } from '../../types/number.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { IsString } from '../../types/string.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\n// ------------------------------------------------------------------\n// Keys and Deferred\n// ------------------------------------------------------------------\nimport { FromAnyKey } from './from_key_any.mjs';\nimport { FromBooleanKey } from './from_key_boolean.mjs';\nimport { FromEnumKey } from './from_key_enum.mjs';\nimport { FromIntegerKey } from './from_key_integer.mjs';\nimport { FromIntersectKey } from './from_key_intersect.mjs';\nimport { FromLiteralKey } from './from_key_literal.mjs';\nimport { FromNumberKey } from './from_key_number.mjs';\nimport { FromStringKey } from './from_key_string.mjs';\nimport { FromTemplateKey } from './from_key_template_literal.mjs';\nimport { FromUnionKey } from './from_key_union.mjs';\nexport function FromKey(key, value) {\n    const result = (IsAny(key) ? FromAnyKey(value) :\n        IsBoolean(key) ? FromBooleanKey(value) :\n            IsEnum(key) ? FromEnumKey(key.enum, value) :\n                IsInteger(key) ? FromIntegerKey(key, value) :\n                    IsIntersect(key) ? FromIntersectKey(key.allOf, value) :\n                        IsLiteral(key) ? FromLiteralKey(key.const, value) :\n                            IsNumber(key) ? FromNumberKey(key, value) :\n                                IsUnion(key) ? FromUnionKey(key.anyOf, value) :\n                                    IsString(key) ? FromStringKey(key, value) :\n                                        IsTemplateLiteral(key) ? FromTemplateKey(key.pattern, value) :\n                                            Object({}));\n    return result;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { RecordDeferred } from '../../types/record.mjs';\nimport { FromKey } from './from_key.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function RecordAction(key, value, options) {\n    const result = CanInstantiate([key])\n        ? Memory.Update(FromKey(key, value), {}, options)\n        : RecordDeferred(key, value, options);\n    return result;\n}\nexport function RecordInstantiate(context, state, key, value, options) {\n    const instantiatedKey = InstantiateType(context, state, key);\n    const instantiatedValue = InstantiateType(context, state, value);\n    return RecordAction(instantiatedKey, instantiatedValue, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { Integer, IntegerPattern } from './integer.mjs';\nimport { Number, NumberPattern } from './number.mjs';\nimport { String, StringPattern } from './string.mjs';\nimport { Deferred } from './deferred.mjs';\nimport { TemplateLiteralDecodeUnsafe } from '../engine/template_literal/decode.mjs';\nimport { CreateRecord } from '../engine/record/record_create.mjs';\nimport { RecordAction } from '../engine/record/instantiate.mjs';\nexport const IntegerKey = `^${IntegerPattern}$`;\nexport const NumberKey = `^${NumberPattern}$`;\nexport const StringKey = `^${StringPattern}$`;\n/** Represents a deferred Record action. */\nexport function RecordDeferred(key, value, options = {}) {\n    return Deferred('Record', [key, value], options);\n}\n// -------------------------------------------------------------------\n// Factory\n// -------------------------------------------------------------------\n/** Creates a Record type. */\nexport function Record(key, value, options = {}) {\n    return RecordAction(key, value, options);\n}\n// -------------------------------------------------------------------\n// RecordFromPattern\n// -------------------------------------------------------------------\n/** Creates a Record type from regular expression pattern. */\nexport function RecordFromPattern(pattern, value) {\n    return CreateRecord(pattern, value);\n}\n/** Transforms a Record Pattern to a Type */\nexport function RecordPatternToType(pattern) {\n    const result = (Guard.IsEqual(pattern, StringKey) ? String() :\n        Guard.IsEqual(pattern, IntegerKey) ? Integer() :\n            Guard.IsEqual(pattern, NumberKey) ? Number() :\n                TemplateLiteralDecodeUnsafe(pattern));\n    return result;\n}\n/** Extracts the Pattern from a Record type */\nexport function RecordPattern(type) {\n    return Guard.Keys(type.patternProperties)[0];\n}\n/** Extracts the Key from a Record type */\nexport function RecordKey(type) {\n    const pattern = RecordPattern(type);\n    const result = RecordPatternToType(pattern);\n    return result;\n}\n/** Extracts the Value from a Record type */\nexport function RecordValue(type) {\n    return type.patternProperties[RecordPattern(type)];\n}\n// -------------------------------------------------------------------\n// Guard\n// -------------------------------------------------------------------\nexport function IsRecord(value) {\n    return IsKind(value, 'Record');\n}\n// -------------------------------------------------------------------\n// Options\n// -------------------------------------------------------------------\nexport function RecordOptions(type) {\n    return Memory.Discard(type, ['~kind', 'type', 'patternProperties']);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from '../types/schema.mjs';\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\n/** Creates a Rest instruction type. */\nexport function Rest(type) {\n    return Memory.Create({ '~kind': 'Rest' }, { type: 'rest', items: type }, {});\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TRest. */\nexport function IsRest(value) {\n    return IsKind(value, 'Rest');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a This type. */\nexport function This(options) {\n    return Memory.Create({ ['~kind']: 'This' }, { $ref: '#' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TThis. */\nexport function IsThis(value) {\n    return IsKind(value, 'This');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Undefined type. */\nexport function Undefined(options) {\n    return Memory.Create({ '~kind': 'Undefined' }, { type: 'undefined' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TUndefined. */\nexport function IsUndefined(value) {\n    return IsKind(value, 'Undefined');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Void type. */\nexport function Void(options) {\n    return Memory.Create({ '~kind': 'Void' }, { type: 'void' }, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TVoid. */\nexport function IsVoid(value) {\n    return IsKind(value, 'Void');\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport * as T from '../types/index.mjs';\nimport * as S from '../action/index.mjs';\nfunction IntrinsicOrCall(ref, parameters) {\n    // deno-coverage-ignore-start\n    //\n    // Have extensively tested but reports show no Omit coverage (review)\n    return (Guard.IsEqual(ref, 'Array') ? T.Array(parameters[0]) :\n        Guard.IsEqual(ref, 'Capitalize') ? S.CapitalizeDeferred(parameters[0]) :\n            Guard.IsEqual(ref, 'ConstructorParameters') ? S.ConstructorParametersDeferred(parameters[0]) :\n                Guard.IsEqual(ref, 'Evaluate') ? S.EvaluateDeferred(parameters[0]) :\n                    Guard.IsEqual(ref, 'Exclude') ? S.ExcludeDeferred(parameters[0], parameters[1]) :\n                        Guard.IsEqual(ref, 'Extract') ? S.ExtractDeferred(parameters[0], parameters[1]) :\n                            Guard.IsEqual(ref, 'Index') ? S.IndexDeferred(parameters[0], parameters[1]) :\n                                Guard.IsEqual(ref, 'InstanceType') ? S.InstanceTypeDeferred(parameters[0]) :\n                                    Guard.IsEqual(ref, 'Lowercase') ? S.LowercaseDeferred(parameters[0]) :\n                                        Guard.IsEqual(ref, 'NonNullable') ? S.NonNullableDeferred(parameters[0]) :\n                                            Guard.IsEqual(ref, 'Omit') ? S.OmitDeferred(parameters[0], parameters[1]) :\n                                                Guard.IsEqual(ref, 'Parameters') ? S.ParametersDeferred(parameters[0]) :\n                                                    Guard.IsEqual(ref, 'Partial') ? S.PartialDeferred(parameters[0]) :\n                                                        Guard.IsEqual(ref, 'Pick') ? S.PickDeferred(parameters[0], parameters[1]) :\n                                                            Guard.IsEqual(ref, 'Readonly') ? S.ReadonlyObjectDeferred(parameters[0]) :\n                                                                Guard.IsEqual(ref, 'KeyOf') ? S.KeyOfDeferred(parameters[0]) :\n                                                                    Guard.IsEqual(ref, 'Record') ? T.RecordDeferred(parameters[0], parameters[1]) :\n                                                                        Guard.IsEqual(ref, 'Required') ? S.RequiredDeferred(parameters[0]) :\n                                                                            Guard.IsEqual(ref, 'ReturnType') ? S.ReturnTypeDeferred(parameters[0]) :\n                                                                                Guard.IsEqual(ref, 'Uncapitalize') ? S.UncapitalizeDeferred(parameters[0]) :\n                                                                                    Guard.IsEqual(ref, 'Uppercase') ? S.UppercaseDeferred(parameters[0]) :\n                                                                                        T.CallConstruct(T.Ref(ref), parameters));\n    // deno-coverage-ignore-stop\n}\n// ------------------------------------------------------------------\n// Unreachable\n// ------------------------------------------------------------------\n// deno-coverage-ignore-start\nfunction Unreachable() {\n    throw Error('Unreachable');\n}\nfunction DelimitedDecode(input, result = []) {\n    return Guard.ShiftLeft(input, (left, right) => DelimitedDecode(right, [...result, left[1]]), () => result);\n}\nfunction Delimited(input) {\n    return Guard.IsEqual(input.length, 3)\n        ? [input[0], ...DelimitedDecode(input[1])]\n        : [];\n}\nexport function GenericParameterExtendsEqualsMapping(input) {\n    return T.Parameter(input[0], input[2], input[4]);\n}\nexport function GenericParameterExtendsMapping(input) {\n    return T.Parameter(input[0], input[2], input[2]);\n}\nexport function GenericParameterEqualsMapping(input) {\n    return T.Parameter(input[0], T.Unknown(), input[2]);\n}\nexport function GenericParameterIdentifierMapping(input) {\n    return T.Parameter(input, T.Unknown(), T.Unknown());\n}\nexport function GenericParameterMapping(input) {\n    return input;\n}\nexport function GenericParameterListMapping(input) {\n    return Delimited(input);\n}\nexport function GenericParametersMapping(input) {\n    return input[1];\n}\nexport function GenericCallArgumentListMapping(input) {\n    return Delimited(input);\n}\nexport function GenericCallArgumentsMapping(input) {\n    return input[1];\n}\nexport function GenericCallMapping(input) {\n    return IntrinsicOrCall(input[0], input[1]);\n}\nexport function OptionalSemiColonMapping(input) {\n    return null;\n}\nexport function KeywordStringMapping(input) {\n    return T.String();\n}\nexport function KeywordNumberMapping(input) {\n    return T.Number();\n}\nexport function KeywordBooleanMapping(input) {\n    return T.Boolean();\n}\nexport function KeywordUndefinedMapping(input) {\n    return T.Undefined();\n}\nexport function KeywordNullMapping(input) {\n    return T.Null();\n}\nexport function KeywordIntegerMapping(input) {\n    return T.Integer();\n}\nexport function KeywordBigIntMapping(input) {\n    return T.BigInt();\n}\nexport function KeywordUnknownMapping(input) {\n    return T.Unknown();\n}\nexport function KeywordAnyMapping(input) {\n    return T.Any();\n}\nexport function KeywordObjectMapping(input) {\n    return T.Object({});\n}\nexport function KeywordNeverMapping(input) {\n    return T.Never();\n}\nexport function KeywordSymbolMapping(input) {\n    return T.Symbol();\n}\nexport function KeywordVoidMapping(input) {\n    return T.Void();\n}\nexport function KeywordThisMapping(input) {\n    return T.This();\n}\nexport function LiteralBigIntMapping(input) {\n    return T.Literal(BigInt(input));\n}\nexport function LiteralBooleanMapping(input) {\n    return T.Literal(Guard.IsEqual(input, 'true'));\n}\nexport function LiteralNumberMapping(input) {\n    return T.Literal(parseFloat(input));\n}\nexport function LiteralStringMapping(input) {\n    return T.Literal(input);\n}\nexport function TemplateInterpolateMapping(input) {\n    return input[1];\n}\nexport function TemplateSpanMapping(input) {\n    return T.Literal(input);\n}\nexport function TemplateBodyMapping(input) {\n    return (Guard.IsEqual(input.length, 3)\n        ? [input[0], input[1], ...input[2]]\n        : [input[0]]);\n}\nexport function TemplateLiteralTypesMapping(input) {\n    return input[1];\n}\nexport function TemplateLiteralMapping(input) {\n    return T.TemplateLiteralDeferred(input);\n}\nexport function DependentMapping(input) {\n    return (Guard.IsEqual(input.length, 6) ? T.Dependent(input[1], input[3], input[5]) :\n        T.Dependent(input[1], input[3], T.Unknown()));\n}\nexport function KeyOfMapping(input) {\n    return input.length > 0;\n}\nexport function IndexArrayMapping(input) {\n    return input.reduce((result, current) => {\n        return Guard.IsEqual(current.length, 3)\n            ? [...result, [current[1]]]\n            : [...result, []];\n    }, []);\n}\nexport function ExtendsMapping(input) {\n    return Guard.IsEqual(input.length, 6)\n        ? [input[1], input[3], input[5]]\n        : [];\n}\nexport function BaseMapping(input) {\n    return Guard.IsArray(input) && Guard.IsEqual(input.length, 3)\n        ? input[1]\n        : input;\n}\nexport function WithMapping(input) {\n    return Guard.IsEqual(input.length, 2) ? input[1] : [];\n}\n// deno-coverage-ignore-start\nfunction FactorIndexArray(Type, indexArray) {\n    return indexArray.reduce((result, left) => {\n        const _left = left;\n        return (Guard.IsEqual(_left.length, 1) ? S.IndexDeferred(result, _left[0]) :\n            Guard.IsEqual(_left.length, 0) ? T.Array(result) :\n                Unreachable());\n    }, Type);\n}\n// deno-coverage-ignore-stop\nfunction FactorExtends(type, extend) {\n    return Guard.IsEqual(extend.length, 3)\n        ? S.ConditionalDeferred(type, extend[0], extend[1], extend[2])\n        : type;\n}\nfunction FactorWith(type, withClause) {\n    return Guard.IsArray(withClause) && Guard.IsEqual(withClause.length, 0)\n        ? type\n        : S.WithDeferred(type, withClause);\n}\nexport function FactorMapping(input) {\n    const [keyOf, type, indexArray, extend, withClause] = input;\n    return FactorWith(keyOf\n        ? FactorExtends(S.KeyOfDeferred(FactorIndexArray(type, indexArray)), extend)\n        : FactorExtends(FactorIndexArray(type, indexArray), extend), withClause);\n}\n// deno-coverage-ignore-start\nfunction ExprBinaryMapping(left, rest) {\n    return (Guard.IsEqual(rest.length, 3) ? (() => {\n        const [operator, right, next] = rest;\n        const Schema = ExprBinaryMapping(right, next);\n        if (Guard.IsEqual(operator, '&')) {\n            return T.IsIntersect(Schema)\n                ? T.Intersect([left, ...Schema.allOf])\n                : T.Intersect([left, Schema]);\n        }\n        if (Guard.IsEqual(operator, '|')) {\n            return T.IsUnion(Schema)\n                ? T.Union([left, ...Schema.anyOf])\n                : T.Union([left, Schema]);\n        }\n        Unreachable();\n    })() : left);\n}\nexport function ExprTermTailMapping(input) {\n    return input;\n}\nexport function ExprTermMapping(input) {\n    const [left, rest] = input;\n    return ExprBinaryMapping(left, rest);\n}\nexport function ExprTailMapping(input) {\n    return input;\n}\nexport function ExprMapping(input) {\n    const [left, rest] = input;\n    return ExprBinaryMapping(left, rest);\n}\nexport function ExprReadonlyMapping(input) {\n    return S.AddImmutableDeferred(input[1]);\n}\nexport function ExprPipeMapping(input) {\n    return input[1];\n}\nexport function GenericTypeMapping(input) {\n    return T.Generic(input[0], input[2]);\n}\n// deno-coverage-ignore-start\nexport function InferTypeMapping(input) {\n    return (Guard.IsEqual(input.length, 4) ? T.Infer(input[1], input[3]) :\n        Guard.IsEqual(input.length, 2) ? T.Infer(input[1], T.Unknown()) :\n            Unreachable());\n}\nexport function TypeMapping(input) {\n    return input;\n}\nexport function PropertyKeyNumberMapping(input) {\n    return `${input}`;\n}\nexport function PropertyKeyIdentMapping(input) {\n    return input;\n}\nexport function PropertyKeyQuotedMapping(input) {\n    return input;\n}\n// deno-coverage-ignore-start\nexport function PropertyKeyIndexMapping(input) {\n    return (T.IsInteger(input[3]) ? T.IntegerKey :\n        T.IsNumber(input[3]) ? T.NumberKey :\n            T.IsSymbol(input[3]) ? T.StringKey :\n                T.IsString(input[3]) ? T.StringKey :\n                    Unreachable());\n}\nexport function PropertyKeyMapping(input) {\n    return input;\n}\nexport function ReadonlyMapping(input) {\n    return input.length > 0;\n}\nexport function OptionalMapping(input) {\n    return input.length > 0;\n}\nexport function PropertyMapping(input) {\n    const [isReadonly, key, isOptional, _colon, type] = input;\n    return {\n        [key]: (isReadonly && isOptional ? S.AddReadonlyDeferred(S.AddOptionalDeferred(type)) :\n            isReadonly && !isOptional ? S.AddReadonlyDeferred(type) :\n                !isReadonly && isOptional ? S.AddOptionalDeferred(type) :\n                    type)\n    };\n}\nexport function PropertyDelimiterMapping(input) {\n    return input;\n}\nexport function PropertyListMapping(input) {\n    return Delimited(input);\n}\nfunction PropertiesReduce(propertyList) {\n    return propertyList.reduce((result, left) => {\n        const isPatternProperties = (Guard.HasPropertyKey(left, T.IntegerKey) || Guard.HasPropertyKey(left, T.NumberKey) || Guard.HasPropertyKey(left, T.StringKey));\n        // @ts-ignore 5.0.4 - unable to observe ...left on right arm\n        return (isPatternProperties\n            ? [result[0], Memory.Assign(result[1], left)]\n            : [Memory.Assign(result[0], left), result[1]]);\n    }, [{}, {}]);\n}\nexport function PropertiesMapping(input) {\n    return PropertiesReduce(input[1]);\n}\nexport function _Object_Mapping(input) {\n    const [properties, patternProperties] = input;\n    const options = Guard.IsEqual(Guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };\n    return T.Object(properties, options);\n}\n// deno-coverage-ignore-start\nexport function ElementNamedMapping(input) {\n    return (Guard.IsEqual(input.length, 5) ? S.AddReadonlyDeferred(S.AddOptionalDeferred(input[4])) :\n        Guard.IsEqual(input.length, 3) ? input[2] :\n            Guard.IsEqual(input.length, 4) ? (Guard.IsEqual(input[2], 'readonly') ? S.AddReadonlyDeferred(input[3]) : S.AddOptionalDeferred(input[3])) :\n                Unreachable());\n}\nexport function ElementBaseMapping(input) {\n    if (!Guard.IsArray(input) || !Guard.IsEqual(input.length, 3))\n        return input;\n    const [isReadonly, type, isOptional] = input;\n    return (isReadonly && isOptional ? S.AddReadonlyDeferred(S.AddOptionalDeferred(type)) :\n        isReadonly && !isOptional ? S.AddReadonlyDeferred(type) :\n            !isReadonly && isOptional ? S.AddOptionalDeferred(type) :\n                type);\n}\n// deno-coverage-ignore-start\nexport function ElementMapping(input) {\n    return (Guard.IsEqual(input.length, 2) ? T.Rest(input[1]) :\n        Guard.IsEqual(input.length, 1) ? input[0] :\n            Unreachable());\n}\nexport function ElementListMapping(input) {\n    return Delimited(input);\n}\nexport function _Tuple_Mapping(input) {\n    return T.Tuple(input[1]);\n}\nexport function ParameterReadonlyOptionalMapping(input) {\n    return S.AddReadonlyDeferred(S.AddOptionalDeferred(input[4]));\n}\nexport function ParameterReadonlyMapping(input) {\n    return S.AddReadonlyDeferred(input[3]);\n}\nexport function ParameterOptionalMapping(input) {\n    return S.AddOptionalDeferred(input[3]);\n}\nexport function ParameterTypeMapping(input) {\n    return input[2];\n}\nexport function ParameterBaseMapping(input) {\n    return input;\n}\n// deno-coverage-ignore-start\nexport function ParameterMapping(input) {\n    return (Guard.IsEqual(input.length, 2) ? T.Rest(input[1]) :\n        Guard.IsEqual(input.length, 1) ? input[0] :\n            Unreachable());\n}\nexport function ParameterListMapping(input) {\n    return Delimited(input);\n}\nexport function _Function_Mapping(input) {\n    return T._Function_(input[1], input[4]);\n}\nexport function _Constructor_Mapping(input) {\n    return T.Constructor(input[2], input[5]);\n}\nfunction ApplyReadonly(state, type) {\n    return (Guard.IsEqual(state, 'remove') ? S.RemoveReadonlyDeferred(type) :\n        Guard.IsEqual(state, 'add') ? S.AddReadonlyDeferred(type) :\n            type);\n}\nexport function MappedReadonlyMapping(input) {\n    return (Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '-') ? 'remove' :\n        Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '+') ? 'add' :\n            Guard.IsEqual(input.length, 1) ? 'add' :\n                'none');\n}\nfunction ApplyOptional(state, type) {\n    return (Guard.IsEqual(state, 'remove') ? S.RemoveOptionalDeferred(type) :\n        Guard.IsEqual(state, 'add') ? S.AddOptionalDeferred(type) :\n            type);\n}\nexport function MappedOptionalMapping(input) {\n    return (Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '-') ? 'remove' :\n        Guard.IsEqual(input.length, 2) && Guard.IsEqual(input[0], '+') ? 'add' :\n            Guard.IsEqual(input.length, 1) ? 'add' :\n                'none');\n}\nexport function MappedAsMapping(input) {\n    return Guard.IsEqual(input.length, 2) ? [input[1]] : [];\n}\nexport function _Mapped_Mapping(input) {\n    return (Guard.IsArray(input[6]) && Guard.IsEqual(input[6].length, 1)\n        ? S.MappedDeferred(T.Identifier(input[3]), input[5], input[6][0], ApplyReadonly(input[1], ApplyOptional(input[8], input[10])))\n        : S.MappedDeferred(T.Identifier(input[3]), input[5], T.Ref(input[3]), ApplyReadonly(input[1], ApplyOptional(input[8], input[10]))));\n}\nexport function ReferenceMapping(input) {\n    return T.Ref(input);\n}\nexport function WithBigIntMapping(input) {\n    return BigInt(input);\n}\nexport function WithNumberMapping(input) {\n    return parseFloat(input);\n}\nexport function WithBooleanMapping(input) {\n    return Guard.IsEqual(input, 'true');\n}\nexport function WithStringMapping(input) {\n    return input;\n}\nexport function WithNullMapping(input) {\n    return null;\n}\nexport function WithUndefinedMapping(input) {\n    return undefined;\n}\nexport function WithPropertyMapping(input) {\n    return { [input[0]]: input[2] };\n}\nexport function WithPropertyListMapping(input) {\n    return Delimited(input);\n}\nfunction WithObjectMappingReduce(propertyList) {\n    return propertyList.reduce((result, left) => {\n        return Memory.Assign(result, left);\n    }, {});\n}\nexport function WithObjectMapping(input) {\n    return WithObjectMappingReduce(input[1]);\n}\nexport function WithElementListMapping(input) {\n    return Delimited(input);\n}\nexport function WithArrayMapping(input) {\n    return input[1];\n}\nexport function WithValueMapping(input) {\n    return input;\n}\nexport function PatternBigIntMapping(input) {\n    return T.BigInt();\n}\nexport function PatternStringMapping(input) {\n    return T.String();\n}\nexport function PatternNumberMapping(input) {\n    return T.Number();\n}\nexport function PatternIntegerMapping(input) {\n    return T.Integer();\n}\nexport function PatternNeverMapping(input) {\n    return T.Never();\n}\nexport function PatternTextMapping(input) {\n    return T.Literal(input);\n}\nexport function PatternBaseMapping(input) {\n    return input;\n}\nexport function PatternGroupMapping(input) {\n    return T.Union(input[1]);\n}\nexport function PatternUnionMapping(input) {\n    return (input.length === 3 ? [...input[0], ...input[2]] :\n        input.length === 1 ? [...input[0]] :\n            []);\n}\nexport function PatternTermMapping(input) {\n    return [input[0], ...input[1]];\n}\nexport function PatternBodyMapping(input) {\n    return input;\n}\nexport function PatternMapping(input) {\n    return input[1];\n}\nexport function InterfaceDeclarationHeritageListMapping(input) {\n    return Delimited(input);\n}\nexport function InterfaceDeclarationHeritageMapping(input) {\n    return Guard.IsEqual(input.length, 2) ? input[1] : [];\n}\nexport function InterfaceDeclarationGenericMapping(input) {\n    const parameters = input[2];\n    const heritage = input[3];\n    const [properties, patternProperties] = input[4];\n    const options = Guard.IsEqual(Guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };\n    return { [input[1]]: T.Generic(parameters, S.InterfaceDeferred(heritage, properties, options)) };\n}\nexport function InterfaceDeclarationMapping(input) {\n    const heritage = input[2];\n    const [properties, patternProperties] = input[3];\n    const options = Guard.IsEqual(Guard.Keys(patternProperties).length, 0) ? {} : { patternProperties };\n    return { [input[1]]: S.InterfaceDeferred(heritage, properties, options) };\n}\nexport function TypeAliasDeclarationGenericMapping(input) {\n    return { [input[1]]: T.Generic(input[2], input[4]) };\n}\nexport function TypeAliasDeclarationMapping(input) {\n    return { [input[1]]: input[3] };\n}\nexport function ExportKeywordMapping(input) {\n    return null; // ignored-dont-care\n}\nexport function ModuleDeclarationDelimiterMapping(input) {\n    return input;\n}\nexport function ModuleDeclarationListMapping(input) {\n    return Delimited(input);\n}\nexport function ModuleDeclarationMapping(input) {\n    return input[1];\n}\nexport function ModuleMapping(input) {\n    const [moduleDeclaration, moduleDeclarationList] = [input[0], input[1]];\n    return S.ModuleDeferred(Memory.Assign(moduleDeclaration, PropertiesReduce(moduleDeclarationList)[0]));\n}\nexport function ScriptMapping(input) {\n    return input;\n}\n","// deno-coverage-ignore-start - parsebox tested\nimport { IsEqual } from './guard.mjs';\n/** Checks the value is a Tuple-2 [string, string] result */\nexport function IsMatch(value) {\n    return IsEqual(value.length, 2);\n}\n/** Matches on a result and dispatches either left or right arm */\nexport function Match(input, ok, fail) {\n    return IsMatch(input) ? ok(input[0], input[1]) : fail();\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { IsMatch } from './match.mjs';\nimport { IsEqual } from './guard.mjs';\nfunction TakeVariant(variant, input) {\n    return (IsEqual(input.indexOf(variant), 0)\n        ? [variant, input.slice(variant.length)]\n        : []);\n}\n/** Takes one of the given variants or fail */\nexport function Take(variants, input) {\n    // ----------------------------------------------------------------\n    // Symmetric\n    // ----------------------------------------------------------------\n    // return Guard.ShiftLeft(variants, (valueLeft, valueRight) => \n    //   Match(TakeVariant(valueLeft, input), (take, rest) => \n    //     [take, rest],\n    //     () => Take(valueRight, input)),\n    //   () => []) as never\n    // ----------------------------------------------------------------\n    // Inline\n    // ----------------------------------------------------------------\n    for (let i = 0; i < variants.length; i++) {\n        const result = TakeVariant(variants[i], input);\n        if (IsMatch(result))\n            return result;\n    }\n    return [];\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\n// ------------------------------------------------------------------\n// Range\n// ------------------------------------------------------------------\nfunction Range(start, end) {\n    return Array.from({ length: end - start + 1 }, (_, i) => String.fromCharCode(start + i));\n}\nexport const Alpha = [\n    ...Range(97, 122), // Lowercase\n    ...Range(65, 90) // Uppercase\n];\nexport const Zero = '0';\nexport const NonZero = Range(49, 57); // 1 - 9\nexport const Digit = [Zero, ...NonZero];\n// ------------------------------------------------------------------\n// Characters\n// ------------------------------------------------------------------\nexport const WhiteSpace = ' ';\nexport const NewLine = '\\n';\nexport const TabSpace = '\\t';\nexport const UnderScore = '_';\nexport const Dot = '.';\nexport const DollarSign = '$';\nexport const Hyphen = '-';\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { IsEqual } from './guard.mjs';\nimport * as Char from './char.mjs';\nconst LineComment = '//';\nconst OpenComment = '/*';\nconst CloseComment = '*/';\nfunction DiscardMultilineComment(input) {\n    const index = input.indexOf(CloseComment);\n    const result = IsEqual(index, -1) ? '' : input.slice(index + 2);\n    return result;\n}\nfunction DiscardLineComment(input) {\n    const index = input.indexOf(Char.NewLine);\n    const result = IsEqual(index, -1) ? '' : input.slice(index);\n    return result;\n}\n// ...\nfunction TrimStartUntilNewline(input) {\n    return input.replace(/^[ \\t\\r\\f\\v]+/, '');\n}\nexport function TrimWhitespace(input) {\n    const trimmed = TrimStartUntilNewline(input);\n    return (trimmed.startsWith(OpenComment) ? TrimWhitespace(DiscardMultilineComment(trimmed.slice(2))) :\n        trimmed.startsWith(LineComment) ? TrimWhitespace(DiscardLineComment(trimmed.slice(2))) :\n            trimmed);\n}\nexport function Trim(input) {\n    const trimmed = input.trimStart();\n    return (trimmed.startsWith(OpenComment) ? Trim(DiscardMultilineComment(trimmed.slice(2))) :\n        trimmed.startsWith(LineComment) ? Trim(DiscardLineComment(trimmed.slice(2))) :\n            trimmed);\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './internal/match.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { Many } from './internal/many.mjs';\nimport { Digit } from './internal/char.mjs';\nimport { Zero } from './internal/char.mjs';\nimport { NonZero } from './internal/char.mjs';\nimport { UnderScore } from './internal/char.mjs';\nfunction TakeNonZero(input) {\n    return Take(NonZero, input);\n}\nconst AllowedDigits = [...Digit, UnderScore];\nfunction TakeDigits(input) {\n    return Many(AllowedDigits, [UnderScore], input);\n}\nfunction TakeUnsignedInteger(input) {\n    return Match(Take([Zero], input), (Zero, ZeroRest) => [Zero, ZeroRest], () => Match(TakeNonZero(input), (NonZero, NonZeroRest) => Match(TakeDigits(NonZeroRest), (Digits, DigitsRest) => [`${NonZero}${Digits}`, DigitsRest], () => []), // fail: did not match Digits\n    () => [])); // fail: did not match NonZero\n}\n/** Matches if next is a UnsignedInteger */\nexport function UnsignedInteger(input) {\n    return TakeUnsignedInteger(Trim(input));\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { IsEqual } from './internal/guard.mjs';\nimport { TrimWhitespace } from './internal/trim.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { NewLine } from './internal/char.mjs';\nimport { WhiteSpace } from './internal/char.mjs';\nfunction TakeConst(const_, input) {\n    return Take([const_], input);\n}\n/** Matches if next is the given Const value */\nexport function Const(const_, input) {\n    return (IsEqual(const_, '') ? ['', input] : (const_.startsWith(NewLine) ? TakeConst(const_, TrimWhitespace(input)) :\n        const_.startsWith(WhiteSpace) ? TakeConst(const_, input) :\n            TakeConst(const_, Trim(input))));\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './internal/match.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { Alpha } from './internal/char.mjs';\nimport { Digit } from './internal/char.mjs';\nimport { UnderScore } from './internal/char.mjs';\nimport { DollarSign } from './internal/char.mjs';\nconst Initial = [...Alpha, UnderScore, DollarSign];\nfunction TakeInitial(input) {\n    return Take(Initial, input);\n}\nconst Remaining = [...Initial, ...Digit];\nfunction TakeRemaining(input, result = '') {\n    return Match(Take(Remaining, input), (Remaining, RemainingRest) => TakeRemaining(RemainingRest, `${result}${Remaining}`), () => [result, input]);\n}\nfunction TakeIdent(input) {\n    return Match(TakeInitial(input), (Initial, InitialRest) => Match(TakeRemaining(InitialRest), (Remaining, RemainingRest) => [`${Initial}${Remaining}`, RemainingRest], () => []), // fail: did not match Remaining\n    () => []); // fail: did not match Initial\n}\n/** Matches if next is an Ident */\nexport function Ident(input) {\n    return TakeIdent(Trim(input));\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { IsEqual } from './internal/guard.mjs';\nimport { IsMatch, Match } from './internal/match.mjs';\nimport { Trim } from './internal/trim.mjs';\nimport { Take } from './internal/take.mjs';\nimport { Many } from './internal/many.mjs';\nimport { Digit, UnderScore } from './internal/char.mjs';\nimport { Dot } from './internal/char.mjs';\nimport { UnsignedInteger } from './unsigned_integer.mjs';\nconst AllowedDigits = [...Digit, UnderScore];\nfunction IsLeadingDot(input) {\n    return IsMatch(Take([Dot], input));\n}\nfunction TakeFractional(input) {\n    return Match(Many(AllowedDigits, [UnderScore], input), (Digits, DigitsRest) => IsEqual(Digits, '')\n        ? [] // fail: no Digits\n        : [Digits, DigitsRest], () => []); // fail: did not match Digits\n}\nfunction LeadingDot(input) {\n    return Match(Take([Dot], input), (Dot, DotRest) => Match(TakeFractional(DotRest), (Fractional, FractionalRest) => [`0${Dot}${Fractional}`, FractionalRest], () => []), // fail: did not match Fractional\n    () => []); // fail: did not match Dot\n}\nfunction LeadingInteger(input) {\n    return Match(UnsignedInteger(input), (Integer, IntegerRest) => Match(Take([Dot], IntegerRest), (Dot, DotRest) => Match(TakeFractional(DotRest), (Fractional, FractionalRest) => [`${Integer}${Dot}${Fractional}`, FractionalRest], () => [`${Integer}`, DotRest]), // fail: did not match Fractional, use Integer\n    () => [`${Integer}`, IntegerRest]), // fail: did not match Dot, use Integer\n    () => []); // fail: did not match Integer\n}\nfunction TakeUnsignedNumber(input) {\n    return (IsLeadingDot(input)\n        ? LeadingDot(input)\n        : LeadingInteger(input));\n}\n/** Matches if next is a UnsignedNumber */\nexport function UnsignedNumber(input) {\n    return TakeUnsignedNumber(Trim(input));\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { Match } from './internal/match.mjs';\nimport { IsEqual, ShiftLeft } from './internal/guard.mjs';\nfunction TakeOne(input) {\n    const result = IsEqual(input, '') ? [] : [input.slice(0, 1), input.slice(1)];\n    return result;\n}\nfunction IsInputMatchSentinal(end, input) {\n    return ShiftLeft(end, (left, right) => input.startsWith(left)\n        ? true\n        : IsInputMatchSentinal(right, input), () => false);\n}\n/** Match Input until but not including End. No match if End not found. */\nexport function Until(end, input, result = '') {\n    return Match(TakeOne(input), (One, Rest) => IsInputMatchSentinal(end, input)\n        ? [result, input] // ok: at sentinal \n        : Until(end, Rest, `${result}${One}`) // fail: advance + 1\n    , () => []);\n}\n// deno-coverage-ignore-stop\n","// deno-coverage-ignore-start - parsebox tested\n// deno-fmt-ignore-file\nimport { IsEqual } from './internal/guard.mjs';\nimport { Match } from './internal/match.mjs';\nimport { Until } from './until.mjs';\n/** Match Input until but not including End. No match if End not found or match is zero-length. */\nexport function Until_1(end, input) {\n    return Match(Until(end, input), (Until, UntilRest) => IsEqual(Until, '')\n        ? [] // fail: match has no characters\n        : [Until, UntilRest], () => []); // fail: did not match Until\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\n// ------------------------------------------------------------------\n//\n// This module was auto-generated by TypeBox's parser compiler\n// infrastructure (ParseBox). The source grammar is located at:\n//\n// Source: ./design/syntax/syntax.ts\n//\n// ------------------------------------------------------------------\nimport * as S from './mapping.mjs';\nimport * as Token from './token/index.mjs';\nconst If = (result, left, right = () => []) => result.length === 2 ? left(result) : right();\nexport const GenericParameterExtendsEquals = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('extends', input), ([_1, input]) => If(Type(input), ([_2, input]) => If(Token.Const('=', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.GenericParameterExtendsEqualsMapping(_0), input]);\nexport const GenericParameterExtends = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('extends', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericParameterExtendsMapping(_0), input]);\nexport const GenericParameterEquals = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('=', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericParameterEqualsMapping(_0), input]);\nexport const GenericParameterIdentifier = (input) => If(Token.Ident(input), ([_0, input]) => [S.GenericParameterIdentifierMapping(_0), input]);\nexport const GenericParameter = (input) => If(If(GenericParameterExtendsEquals(input), ([_0, input]) => [_0, input], () => If(GenericParameterExtends(input), ([_0, input]) => [_0, input], () => If(GenericParameterEquals(input), ([_0, input]) => [_0, input], () => If(GenericParameterIdentifier(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.GenericParameterMapping(_0), input]);\nexport const GenericParameterList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(GenericParameter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => GenericParameterList_0(input, [...result, _0]), () => [result, input]);\nexport const GenericParameterList = (input) => If(If(If(GenericParameter(input), ([_0, input]) => If(GenericParameterList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.GenericParameterListMapping(_0), input]);\nexport const GenericParameters = (input) => If(If(Token.Const('<', input), ([_0, input]) => If(GenericParameterList(input), ([_1, input]) => If(Token.Const('>', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericParametersMapping(_0), input]);\nexport const GenericCallArgumentList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => GenericCallArgumentList_0(input, [...result, _0]), () => [result, input]);\nexport const GenericCallArgumentList = (input) => If(If(If(Type(input), ([_0, input]) => If(GenericCallArgumentList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.GenericCallArgumentListMapping(_0), input]);\nexport const GenericCallArguments = (input) => If(If(Token.Const('<', input), ([_0, input]) => If(GenericCallArgumentList(input), ([_1, input]) => If(Token.Const('>', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericCallArgumentsMapping(_0), input]);\nexport const GenericCall = (input) => If(If(Token.Ident(input), ([_0, input]) => If(GenericCallArguments(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.GenericCallMapping(_0), input]);\nexport const OptionalSemiColon = (input) => If(If(If(Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.OptionalSemiColonMapping(_0), input]);\nexport const KeywordString = (input) => If(Token.Const('string', input), ([_0, input]) => [S.KeywordStringMapping(_0), input]);\nexport const KeywordNumber = (input) => If(Token.Const('number', input), ([_0, input]) => [S.KeywordNumberMapping(_0), input]);\nexport const KeywordBoolean = (input) => If(Token.Const('boolean', input), ([_0, input]) => [S.KeywordBooleanMapping(_0), input]);\nexport const KeywordUndefined = (input) => If(Token.Const('undefined', input), ([_0, input]) => [S.KeywordUndefinedMapping(_0), input]);\nexport const KeywordNull = (input) => If(Token.Const('null', input), ([_0, input]) => [S.KeywordNullMapping(_0), input]);\nexport const KeywordInteger = (input) => If(Token.Const('integer', input), ([_0, input]) => [S.KeywordIntegerMapping(_0), input]);\nexport const KeywordBigInt = (input) => If(Token.Const('bigint', input), ([_0, input]) => [S.KeywordBigIntMapping(_0), input]);\nexport const KeywordUnknown = (input) => If(Token.Const('unknown', input), ([_0, input]) => [S.KeywordUnknownMapping(_0), input]);\nexport const KeywordAny = (input) => If(Token.Const('any', input), ([_0, input]) => [S.KeywordAnyMapping(_0), input]);\nexport const KeywordObject = (input) => If(Token.Const('object', input), ([_0, input]) => [S.KeywordObjectMapping(_0), input]);\nexport const KeywordNever = (input) => If(Token.Const('never', input), ([_0, input]) => [S.KeywordNeverMapping(_0), input]);\nexport const KeywordSymbol = (input) => If(Token.Const('symbol', input), ([_0, input]) => [S.KeywordSymbolMapping(_0), input]);\nexport const KeywordVoid = (input) => If(Token.Const('void', input), ([_0, input]) => [S.KeywordVoidMapping(_0), input]);\nexport const KeywordThis = (input) => If(Token.Const('this', input), ([_0, input]) => [S.KeywordThisMapping(_0), input]);\nexport const TemplateInterpolate = (input) => If(If(Token.Const('${', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TemplateInterpolateMapping(_0), input]);\nexport const TemplateSpan = (input) => If(Token.Until(['${', '`'], input), ([_0, input]) => [S.TemplateSpanMapping(_0), input]);\nexport const TemplateBody = (input) => If(If(If(TemplateSpan(input), ([_0, input]) => If(TemplateInterpolate(input), ([_1, input]) => If(TemplateBody(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(TemplateSpan(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(TemplateSpan(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.TemplateBodyMapping(_0), input]);\nexport const TemplateLiteralTypes = (input) => If(If(Token.Const('`', input), ([_0, input]) => If(TemplateBody(input), ([_1, input]) => If(Token.Const('`', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TemplateLiteralTypesMapping(_0), input]);\nexport const TemplateLiteral = (input) => If(TemplateLiteralTypes(input), ([_0, input]) => [S.TemplateLiteralMapping(_0), input]);\nexport const Dependent = (input) => If(If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const('else', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If(If(Token.Const('if', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('then', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.DependentMapping(_0), input]);\nexport const LiteralBigInt = (input) => If(Token.BigInt(input), ([_0, input]) => [S.LiteralBigIntMapping(_0), input]);\nexport const LiteralBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.LiteralBooleanMapping(_0), input]);\nexport const LiteralNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.LiteralNumberMapping(_0), input]);\nexport const LiteralString = (input) => If(Token.String(['\\'', '\\\"'], input), ([_0, input]) => [S.LiteralStringMapping(_0), input]);\nexport const KeyOf = (input) => If(If(If(Token.Const('keyof', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.KeyOfMapping(_0), input]);\nexport const IndexArray_0 = (input, result = []) => If(If(If(Token.Const('[', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(Token.Const('[', input), ([_0, input]) => If(Token.Const(']', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => IndexArray_0(input, [...result, _0]), () => [result, input]);\nexport const IndexArray = (input) => If(IndexArray_0(input), ([_0, input]) => [S.IndexArrayMapping(_0), input]);\nexport const Extends = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('?', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const(':', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0), input]);\nexport const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Dependent(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(_Tuple_(input), ([_0, input]) => [_0, input], () => If(_Constructor_(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(_Mapped_(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))))))))))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);\nexport const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(WithObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);\nexport const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => If(With(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FactorMapping(_0), input]);\nexport const ExprTermTail = (input) => If(If(If(Token.Const('&', input), ([_0, input]) => If(Factor(input), ([_1, input]) => If(ExprTermTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0), input]);\nexport const ExprTerm = (input) => If(If(Factor(input), ([_0, input]) => If(ExprTermTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0), input]);\nexport const ExprTail = (input) => If(If(If(Token.Const('|', input), ([_0, input]) => If(ExprTerm(input), ([_1, input]) => If(ExprTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTailMapping(_0), input]);\nexport const Expr = (input) => If(If(ExprTerm(input), ([_0, input]) => If(ExprTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprMapping(_0), input]);\nexport const ExprReadonly = (input) => If(If(Token.Const('readonly', input), ([_0, input]) => If(Expr(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprReadonlyMapping(_0), input]);\nexport const ExprPipe = (input) => If(If(Token.Const('|', input), ([_0, input]) => If(Expr(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprPipeMapping(_0), input]);\nexport const GenericType = (input) => If(If(GenericParameters(input), ([_0, input]) => If(Token.Const('=', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericTypeMapping(_0), input]);\nexport const InferType = (input) => If(If(If(Token.Const('infer', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(Token.Const('extends', input), ([_2, input]) => If(Expr(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => If(If(Token.Const('infer', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.InferTypeMapping(_0), input]);\nexport const Type = (input) => If(If(InferType(input), ([_0, input]) => [_0, input], () => If(ExprPipe(input), ([_0, input]) => [_0, input], () => If(ExprReadonly(input), ([_0, input]) => [_0, input], () => If(Expr(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.TypeMapping(_0), input]);\nexport const PropertyKeyNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.PropertyKeyNumberMapping(_0), input]);\nexport const PropertyKeyIdent = (input) => If(Token.Ident(input), ([_0, input]) => [S.PropertyKeyIdentMapping(_0), input]);\nexport const PropertyKeyQuoted = (input) => If(Token.String(['\\'', '\\\"'], input), ([_0, input]) => [S.PropertyKeyQuotedMapping(_0), input]);\nexport const PropertyKeyIndex = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => [])))), ([_3, input]) => If(Token.Const(']', input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.PropertyKeyIndexMapping(_0), input]);\nexport const PropertyKey = (input) => If(If(PropertyKeyNumber(input), ([_0, input]) => [_0, input], () => If(PropertyKeyIdent(input), ([_0, input]) => [_0, input], () => If(PropertyKeyQuoted(input), ([_0, input]) => [_0, input], () => If(PropertyKeyIndex(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.PropertyKeyMapping(_0), input]);\nexport const Readonly = (input) => If(If(If(Token.Const('readonly', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ReadonlyMapping(_0), input]);\nexport const Optional = (input) => If(If(If(Token.Const('?', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.OptionalMapping(_0), input]);\nexport const Property = (input) => If(If(Readonly(input), ([_0, input]) => If(PropertyKey(input), ([_1, input]) => If(Optional(input), ([_2, input]) => If(Token.Const(':', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.PropertyMapping(_0), input]);\nexport const PropertyDelimiter = (input) => If(If(If(Token.Const(',', input), ([_0, input]) => If(Token.Const('\\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const(';', input), ([_0, input]) => If(Token.Const('\\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Token.Const('\\n', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))))), ([_0, input]) => [S.PropertyDelimiterMapping(_0), input]);\nexport const PropertyList_0 = (input, result = []) => If(If(PropertyDelimiter(input), ([_0, input]) => If(Property(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => PropertyList_0(input, [...result, _0]), () => [result, input]);\nexport const PropertyList = (input) => If(If(If(Property(input), ([_0, input]) => If(PropertyList_0(input), ([_1, input]) => If(If(PropertyDelimiter(input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.PropertyListMapping(_0), input]);\nexport const Properties = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(PropertyList(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.PropertiesMapping(_0), input]);\nexport const _Object_ = (input) => If(Properties(input), ([_0, input]) => [S._Object_Mapping(_0), input]);\nexport const ElementNamed = (input) => If(If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Token.Const('readonly', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [_0, input], () => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Token.Const('readonly', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [_0, input], () => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.ElementNamedMapping(_0), input]);\nexport const ElementBase = (input) => If(If(ElementNamed(input), ([_0, input]) => [_0, input], () => If(If(Readonly(input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Optional(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ElementBaseMapping(_0), input]);\nexport const Element = (input) => If(If(If(Token.Const('...', input), ([_0, input]) => If(ElementBase(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(ElementBase(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ElementMapping(_0), input]);\nexport const ElementList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Element(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ElementList_0(input, [...result, _0]), () => [result, input]);\nexport const ElementList = (input) => If(If(If(Element(input), ([_0, input]) => If(ElementList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ElementListMapping(_0), input]);\nexport const _Tuple_ = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(ElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S._Tuple_Mapping(_0), input]);\nexport const ParameterReadonlyOptional = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Token.Const('readonly', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.ParameterReadonlyOptionalMapping(_0), input]);\nexport const ParameterReadonly = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Token.Const('readonly', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ParameterReadonlyMapping(_0), input]);\nexport const ParameterOptional = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => If(Token.Const(':', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ParameterOptionalMapping(_0), input]);\nexport const ParameterType = (input) => If(If(Token.Ident(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(Type(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ParameterTypeMapping(_0), input]);\nexport const ParameterBase = (input) => If(If(ParameterReadonlyOptional(input), ([_0, input]) => [_0, input], () => If(ParameterReadonly(input), ([_0, input]) => [_0, input], () => If(ParameterOptional(input), ([_0, input]) => [_0, input], () => If(ParameterType(input), ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.ParameterBaseMapping(_0), input]);\nexport const Parameter = (input) => If(If(If(Token.Const('...', input), ([_0, input]) => If(ParameterBase(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(ParameterBase(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ParameterMapping(_0), input]);\nexport const ParameterList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Parameter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ParameterList_0(input, [...result, _0]), () => [result, input]);\nexport const ParameterList = (input) => If(If(If(Parameter(input), ([_0, input]) => If(ParameterList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ParameterListMapping(_0), input]);\nexport const _Function_ = (input) => If(If(Token.Const('(', input), ([_0, input]) => If(ParameterList(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => If(Token.Const('=>', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S._Function_Mapping(_0), input]);\nexport const _Constructor_ = (input) => If(If(Token.Const('new', input), ([_0, input]) => If(Token.Const('(', input), ([_1, input]) => If(ParameterList(input), ([_2, input]) => If(Token.Const(')', input), ([_3, input]) => If(Token.Const('=>', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S._Constructor_Mapping(_0), input]);\nexport const MappedReadonly = (input) => If(If(If(Token.Const('+', input), ([_0, input]) => If(Token.Const('readonly', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('-', input), ([_0, input]) => If(Token.Const('readonly', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('readonly', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.MappedReadonlyMapping(_0), input]);\nexport const MappedOptional = (input) => If(If(If(Token.Const('+', input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('-', input), ([_0, input]) => If(Token.Const('?', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const('?', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])))), ([_0, input]) => [S.MappedOptionalMapping(_0), input]);\nexport const MappedAs = (input) => If(If(If(Token.Const('as', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.MappedAsMapping(_0), input]);\nexport const _Mapped_ = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(MappedReadonly(input), ([_1, input]) => If(Token.Const('[', input), ([_2, input]) => If(Token.Ident(input), ([_3, input]) => If(Token.Const('in', input), ([_4, input]) => If(Type(input), ([_5, input]) => If(MappedAs(input), ([_6, input]) => If(Token.Const(']', input), ([_7, input]) => If(MappedOptional(input), ([_8, input]) => If(Token.Const(':', input), ([_9, input]) => If(Type(input), ([_10, input]) => If(OptionalSemiColon(input), ([_11, input]) => If(Token.Const('}', input), ([_12, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input]))))))))))))), ([_0, input]) => [S._Mapped_Mapping(_0), input]);\nexport const Reference = (input) => If(Token.Ident(input), ([_0, input]) => [S.ReferenceMapping(_0), input]);\nexport const WithBigInt = (input) => If(Token.BigInt(input), ([_0, input]) => [S.WithBigIntMapping(_0), input]);\nexport const WithNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.WithNumberMapping(_0), input]);\nexport const WithBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithBooleanMapping(_0), input]);\nexport const WithString = (input) => If(Token.String(['\\\"', '\\''], input), ([_0, input]) => [S.WithStringMapping(_0), input]);\nexport const WithNull = (input) => If(Token.Const('null', input), ([_0, input]) => [S.WithNullMapping(_0), input]);\nexport const WithUndefined = (input) => If(Token.Const('undefined', input), ([_0, input]) => [S.WithUndefinedMapping(_0), input]);\nexport const WithProperty = (input) => If(If(PropertyKey(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(WithValue(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithPropertyMapping(_0), input]);\nexport const WithPropertyList_0 = (input, result = []) => If(If(PropertyDelimiter(input), ([_0, input]) => If(WithProperty(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithPropertyList_0(input, [...result, _0]), () => [result, input]);\nexport const WithPropertyList = (input) => If(If(If(WithProperty(input), ([_0, input]) => If(WithPropertyList_0(input), ([_1, input]) => If(If(PropertyDelimiter(input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithPropertyListMapping(_0), input]);\nexport const WithObject = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(WithPropertyList(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithObjectMapping(_0), input]);\nexport const WithElementList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(WithValue(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithElementList_0(input, [...result, _0]), () => [result, input]);\nexport const WithElementList = (input) => If(If(If(WithValue(input), ([_0, input]) => If(WithElementList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithElementListMapping(_0), input]);\nexport const WithArray = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(WithElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithArrayMapping(_0), input]);\nexport const WithValue = (input) => If(If(WithBigInt(input), ([_0, input]) => [_0, input], () => If(WithNumber(input), ([_0, input]) => [_0, input], () => If(WithBoolean(input), ([_0, input]) => [_0, input], () => If(WithString(input), ([_0, input]) => [_0, input], () => If(WithNull(input), ([_0, input]) => [_0, input], () => If(WithUndefined(input), ([_0, input]) => [_0, input], () => If(WithObject(input), ([_0, input]) => [_0, input], () => If(WithArray(input), ([_0, input]) => [_0, input], () => [])))))))), ([_0, input]) => [S.WithValueMapping(_0), input]);\nexport const PatternBigInt = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)n', input), ([_0, input]) => [S.PatternBigIntMapping(_0), input]);\nexport const PatternString = (input) => If(Token.Const('.*', input), ([_0, input]) => [S.PatternStringMapping(_0), input]);\nexport const PatternNumber = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?', input), ([_0, input]) => [S.PatternNumberMapping(_0), input]);\nexport const PatternInteger = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)', input), ([_0, input]) => [S.PatternIntegerMapping(_0), input]);\nexport const PatternNever = (input) => If(Token.Const('(?!)', input), ([_0, input]) => [S.PatternNeverMapping(_0), input]);\nexport const PatternText = (input) => If(Token.Until_1(['-?(?:0|[1-9][0-9]*)n', '.*', '-?(?:0|[1-9][0-9]*)(?:\\\\.[0-9]+)?', '-?(?:0|[1-9][0-9]*)', '(?!)', '(', ')', '$', '|'], input), ([_0, input]) => [S.PatternTextMapping(_0), input]);\nexport const PatternBase = (input) => If(If(PatternBigInt(input), ([_0, input]) => [_0, input], () => If(PatternString(input), ([_0, input]) => [_0, input], () => If(PatternNumber(input), ([_0, input]) => [_0, input], () => If(PatternInteger(input), ([_0, input]) => [_0, input], () => If(PatternNever(input), ([_0, input]) => [_0, input], () => If(PatternGroup(input), ([_0, input]) => [_0, input], () => If(PatternText(input), ([_0, input]) => [_0, input], () => []))))))), ([_0, input]) => [S.PatternBaseMapping(_0), input]);\nexport const PatternGroup = (input) => If(If(Token.Const('(', input), ([_0, input]) => If(PatternBody(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.PatternGroupMapping(_0), input]);\nexport const PatternUnion = (input) => If(If(If(PatternTerm(input), ([_0, input]) => If(Token.Const('|', input), ([_1, input]) => If(PatternUnion(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(PatternTerm(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.PatternUnionMapping(_0), input]);\nexport const PatternTerm = (input) => If(If(PatternBase(input), ([_0, input]) => If(PatternBody(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.PatternTermMapping(_0), input]);\nexport const PatternBody = (input) => If(If(PatternUnion(input), ([_0, input]) => [_0, input], () => If(PatternTerm(input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.PatternBodyMapping(_0), input]);\nexport const Pattern = (input) => If(If(Token.Const('^', input), ([_0, input]) => If(PatternBody(input), ([_1, input]) => If(Token.Const('$', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.PatternMapping(_0), input]);\nexport const InterfaceDeclarationHeritageList_0 = (input, result = []) => If(If(Token.Const(',', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => InterfaceDeclarationHeritageList_0(input, [...result, _0]), () => [result, input]);\nexport const InterfaceDeclarationHeritageList = (input) => If(If(If(Type(input), ([_0, input]) => If(InterfaceDeclarationHeritageList_0(input), ([_1, input]) => If(If(Token.Const(',', input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.InterfaceDeclarationHeritageListMapping(_0), input]);\nexport const InterfaceDeclarationHeritage = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(InterfaceDeclarationHeritageList(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.InterfaceDeclarationHeritageMapping(_0), input]);\nexport const InterfaceDeclarationGeneric = (input) => If(If(Token.Const('interface', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(GenericParameters(input), ([_2, input]) => If(InterfaceDeclarationHeritage(input), ([_3, input]) => If(Properties(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.InterfaceDeclarationGenericMapping(_0), input]);\nexport const InterfaceDeclaration = (input) => If(If(Token.Const('interface', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(InterfaceDeclarationHeritage(input), ([_2, input]) => If(Properties(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.InterfaceDeclarationMapping(_0), input]);\nexport const TypeAliasDeclarationGeneric = (input) => If(If(Token.Const('type', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(GenericParameters(input), ([_2, input]) => If(Token.Const('=', input), ([_3, input]) => If(Type(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.TypeAliasDeclarationGenericMapping(_0), input]);\nexport const TypeAliasDeclaration = (input) => If(If(Token.Const('type', input), ([_0, input]) => If(Token.Ident(input), ([_1, input]) => If(Token.Const('=', input), ([_2, input]) => If(Type(input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.TypeAliasDeclarationMapping(_0), input]);\nexport const ExportKeyword = (input) => If(If(If(Token.Const('export', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExportKeywordMapping(_0), input]);\nexport const ModuleDeclarationDelimiter = (input) => If(If(If(Token.Const(';', input), ([_0, input]) => If(Token.Const('\\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Token.Const('\\n', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.ModuleDeclarationDelimiterMapping(_0), input]);\nexport const ModuleDeclarationList_0 = (input, result = []) => If(If(ModuleDeclarationDelimiter(input), ([_0, input]) => If(ModuleDeclaration(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ModuleDeclarationList_0(input, [...result, _0]), () => [result, input]);\nexport const ModuleDeclarationList = (input) => If(If(If(ModuleDeclaration(input), ([_0, input]) => If(ModuleDeclarationList_0(input), ([_1, input]) => If(If(ModuleDeclarationDelimiter(input), ([_0, input]) => [[_0], input], () => [[], input]), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ModuleDeclarationListMapping(_0), input]);\nexport const ModuleDeclaration = (input) => If(If(ExportKeyword(input), ([_0, input]) => If(If(InterfaceDeclarationGeneric(input), ([_0, input]) => [_0, input], () => If(InterfaceDeclaration(input), ([_0, input]) => [_0, input], () => If(TypeAliasDeclarationGeneric(input), ([_0, input]) => [_0, input], () => If(TypeAliasDeclaration(input), ([_0, input]) => [_0, input], () => [])))), ([_1, input]) => If(OptionalSemiColon(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ModuleDeclarationMapping(_0), input]);\nexport const Module = (input) => If(If(ModuleDeclaration(input), ([_0, input]) => If(ModuleDeclarationList(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ModuleMapping(_0), input]);\nexport const Script = (input) => If(If(Module(input), ([_0, input]) => [_0, input], () => If(GenericType(input), ([_0, input]) => [_0, input], () => If(Type(input), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.ScriptMapping(_0), input]);\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { IsTemplateLiteral, IsTemplateLiteralDeferred } from '../../types/template_literal.mjs';\nimport { IsBigInt, BigIntPattern } from '../../types/bigint.mjs';\nimport { IsString, StringPattern } from '../../types/string.mjs';\nimport { IsNumber, NumberPattern } from '../../types/number.mjs';\nimport { IsInteger, IntegerPattern } from '../../types/integer.mjs';\nimport { IsBoolean } from '../../types/boolean.mjs';\nimport { NeverPattern } from '../../types/never.mjs';\nimport { TemplateLiteralCreate } from './create.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nimport { TemplateLiteralAction } from './instantiate.mjs';\nfunction JoinString(input) {\n    return input.join('|');\n}\nfunction UnwrapTemplateLiteralPattern(pattern) {\n    return pattern.slice(1, pattern.length - 1);\n}\nfunction EncodeLiteral(value, right, pattern) {\n    return EncodeTypes(right, `${pattern}${value}`);\n}\nfunction EncodeBigInt(right, pattern) {\n    return EncodeTypes(right, `${pattern}${BigIntPattern}`);\n}\nfunction EncodeInteger(right, pattern) {\n    return EncodeTypes(right, `${pattern}${IntegerPattern}`);\n}\nfunction EncodeNumber(right, pattern) {\n    return EncodeTypes(right, `${pattern}${NumberPattern}`);\n}\nfunction EncodeBoolean(right, pattern) {\n    return EncodeType(Union([Literal('false'), Literal('true')]), right, pattern);\n}\nfunction EncodeString(right, pattern) {\n    return EncodeTypes(right, `${pattern}${StringPattern}`);\n}\nfunction EncodeTemplateLiteral(templatePattern, right, pattern) {\n    return EncodeTypes(right, `${pattern}${UnwrapTemplateLiteralPattern(templatePattern)}`);\n}\nfunction EncodeTemplateLiteralDeferred(types, right, pattern) {\n    const templateLiteral = TemplateLiteralAction(types, {});\n    const result = EncodeType(templateLiteral, right, pattern);\n    return result;\n}\nfunction EncodeEnum(values, right, pattern) {\n    const evaluated = EvaluateEnum(values);\n    return EncodeType(evaluated, right, pattern);\n}\nfunction EncodeUnion(types, right, pattern, result = []) {\n    return Guard.ShiftLeft(types, (head, tail) => EncodeUnion(tail, right, pattern, [...result, EncodeType(head, [], '')]), () => EncodeTypes(right, `${pattern}(${JoinString(result)})`));\n}\nfunction EncodeType(type, right, pattern) {\n    return (IsEnum(type) ? EncodeEnum(type.enum, right, pattern) :\n        IsInteger(type) ? EncodeInteger(right, pattern) :\n            IsLiteral(type) ? EncodeLiteral(type.const, right, pattern) :\n                IsBigInt(type) ? EncodeBigInt(right, pattern) :\n                    IsBoolean(type) ? EncodeBoolean(right, pattern) :\n                        IsNumber(type) ? EncodeNumber(right, pattern) :\n                            IsString(type) ? EncodeString(right, pattern) :\n                                IsTemplateLiteral(type) ? EncodeTemplateLiteral(type.pattern, right, pattern) :\n                                    IsTemplateLiteralDeferred(type) ? EncodeTemplateLiteralDeferred(type.parameters[0], right, pattern) :\n                                        IsUnion(type) ? EncodeUnion(type.anyOf, right, pattern) :\n                                            NeverPattern);\n}\nfunction EncodeTypes(types, pattern) {\n    return Guard.ShiftLeft(types, (left, right) => EncodeType(left, right, pattern), () => pattern);\n}\nfunction EncodePattern(types) {\n    const encoded = EncodeTypes(types, '');\n    const result = `^${encoded}$`;\n    return result;\n}\n/** Encodes a TemplateLiteral type sequence into a TemplateLiteral */\nexport function TemplateLiteralEncode(types) {\n    const pattern = EncodePattern(types);\n    const result = TemplateLiteralCreate(pattern);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { TemplateLiteralDeferred } from '../../types/template_literal.mjs';\nimport { TemplateLiteralEncode } from './encode.mjs';\nimport { InstantiateTypes, CanInstantiate } from '../instantiate.mjs';\nexport function TemplateLiteralAction(types, options) {\n    const result = CanInstantiate(types)\n        ? Memory.Update(TemplateLiteralEncode(types), {}, options)\n        : TemplateLiteralDeferred(types, options);\n    return result;\n}\nexport function TemplateLiteralInstantiate(context, state, types, options) {\n    const instantiatedTypes = InstantiateTypes(context, state, types);\n    return TemplateLiteralAction(instantiatedTypes, options);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Memory } from '../../system/system.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema, IsKind } from './schema.mjs';\nimport { Deferred } from './deferred.mjs';\nimport { ParseTemplateIntoTypes } from '../engine/patterns/template.mjs';\nimport { TemplateLiteralAction } from '../engine/template_literal/instantiate.mjs';\n/** Creates a deferred TemplateLiteral action. */\nexport function TemplateLiteralDeferred(types, options = {}) {\n    return Deferred('TemplateLiteral', [types], options);\n}\n/** Returns true if this value is a deferred Interface action. */\nexport function IsTemplateLiteralDeferred(value) {\n    return IsSchema(value)\n        && Guard.HasPropertyKey(value, 'action')\n        && Guard.IsEqual(value.action, 'TemplateLiteral');\n}\nexport function TemplateLiteralFromTypes(types) {\n    return TemplateLiteralAction(types, {});\n}\nexport function TemplateLiteralFromString(template) {\n    const types = ParseTemplateIntoTypes(template);\n    return TemplateLiteralFromTypes(types);\n}\n/** Creates a TemplateLiteral type. */\nexport function TemplateLiteral(input, options = {}) {\n    const type = Guard.IsString(input) ? TemplateLiteralFromString(input) : TemplateLiteralFromTypes(input);\n    return Memory.Update(type, {}, options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given value is TTemplateLiteral. */\nexport function IsTemplateLiteral(value) {\n    return IsKind(value, 'TemplateLiteral');\n}\n","import { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nexport function ExtendsUnion(inferred) {\n    return Memory.Create({ ['~kind']: 'ExtendsUnion' }, { inferred });\n}\nexport function IsExtendsUnion(value) {\n    return Guard.IsObject(value) &&\n        Guard.HasPropertyKey(value, '~kind') &&\n        Guard.HasPropertyKey(value, 'inferred') &&\n        Guard.IsEqual(value['~kind'], 'ExtendsUnion') &&\n        Guard.IsObject(value.inferred);\n}\nexport function ExtendsTrue(inferred) {\n    return Memory.Create({ ['~kind']: 'ExtendsTrue' }, { inferred });\n}\nexport function IsExtendsTrue(value) {\n    return Guard.IsObject(value) &&\n        Guard.HasPropertyKey(value, '~kind') &&\n        Guard.HasPropertyKey(value, 'inferred') &&\n        Guard.IsEqual(value['~kind'], 'ExtendsTrue') &&\n        Guard.IsObject(value.inferred);\n}\nexport function ExtendsFalse() {\n    return Memory.Create({ ['~kind']: 'ExtendsFalse' }, {});\n}\nexport function IsExtendsFalse(value) {\n    return Guard.IsObject(value) &&\n        Guard.HasPropertyKey(value, '~kind') &&\n        Guard.IsEqual(value['~kind'], 'ExtendsFalse');\n}\nexport function IsExtendsTrueLike(value) {\n    return IsExtendsUnion(value) || IsExtendsTrue(value);\n}\nexport function Match(result, true_, false_) {\n    return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsAny } from '../types/any.mjs';\nimport { IsDependent } from '../types/dependent.mjs';\nimport { IsEnum } from '../types/enum.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsIntersect } from '../types/intersect.mjs';\nimport { IsTemplateLiteral } from '../types/template_literal.mjs';\nimport { IsUnion } from '../types/union.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nimport { EvaluateEnum } from '../engine/evaluate/evaluate.mjs';\nimport { EvaluateTemplateLiteral } from '../engine/evaluate/evaluate.mjs';\nfunction ExtendsRightInfer(inferred, name, left, right) {\n    return Result.Match(ExtendsLeft(inferred, left, right), checkInferred => Result.ExtendsTrue(Memory.Assign(Memory.Assign(inferred, checkInferred), { [name]: left })), () => Result.ExtendsFalse());\n}\nfunction ExtendsRightAny(inferred, _left) {\n    return Result.ExtendsTrue(inferred);\n}\nfunction ExtendsRightDependent(inferred, left, if_, then_, else_) {\n    return Result.Match(ExtendsLeft(inferred, left, if_), inferred => Result.Match(ExtendsLeft(inferred, left, then_), inferred => Result.ExtendsTrue(inferred), () => Result.ExtendsFalse()), () => Result.Match(ExtendsLeft(inferred, left, else_), inferred => Result.ExtendsTrue(inferred), () => Result.ExtendsFalse()));\n}\nfunction ExtendsRightEnum(inferred, left, right) {\n    const evaluated = EvaluateEnum(right);\n    return ExtendsLeft(inferred, left, evaluated);\n}\nfunction ExtendsRightIntersect(inferred, left, right) {\n    return Guard.ShiftLeft(right, (head, tail) => Result.Match(ExtendsLeft(inferred, left, head), inferred => ExtendsRightIntersect(inferred, left, tail), () => Result.ExtendsFalse()), () => Result.ExtendsTrue(inferred));\n}\nfunction ExtendsRightTemplateLiteral(inferred, left, right) {\n    const evaluated = EvaluateTemplateLiteral(right);\n    return ExtendsLeft(inferred, left, evaluated);\n}\nfunction ExtendsRightUnion(inferred, left, right) {\n    return Guard.ShiftLeft(right, (head, tail) => Result.Match(ExtendsLeft(inferred, left, head), inferred => Result.ExtendsTrue(inferred), () => ExtendsRightUnion(inferred, left, tail)), () => Result.ExtendsFalse());\n}\nexport function ExtendsRight(inferred, left, right) {\n    return (IsAny(right) ? ExtendsRightAny(inferred, left) :\n        IsDependent(right) ? ExtendsRightDependent(inferred, left, right.if, right.then, right.else) :\n            IsEnum(right) ? ExtendsRightEnum(inferred, left, right.enum) :\n                IsInfer(right) ? ExtendsRightInfer(inferred, right.name, left, right.extends) :\n                    IsIntersect(right) ? ExtendsRightIntersect(inferred, left, right.allOf) :\n                        IsTemplateLiteral(right) ? ExtendsRightTemplateLiteral(inferred, left, right.pattern) :\n                            IsUnion(right) ? ExtendsRightUnion(inferred, left, right.anyOf) :\n                                IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n                                    Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsAny } from '../types/any.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsAny(inferred, left, right) {\n    return (IsInfer(right) ? ExtendsRight(inferred, left, right) :\n        IsAny(right) ? Result.ExtendsTrue(inferred) :\n            IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n                Result.ExtendsUnion(inferred));\n}\n","// deno-fmt-ignore-file\nimport { IsArray } from '../types/array.mjs';\nimport { IsImmutable } from '../types/_immutable.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nfunction ExtendsImmutable(left, right) {\n    const isImmutableLeft = IsImmutable(left);\n    const isImmutableRight = IsImmutable(right);\n    return (isImmutableLeft && isImmutableRight ? true :\n        !isImmutableLeft && isImmutableRight ? true :\n            isImmutableLeft && !isImmutableRight ? false :\n                true);\n}\nexport function ExtendsArray(inferred, arrayLeft, left, right) {\n    return (IsArray(right)\n        ? ExtendsImmutable(arrayLeft, right)\n            ? ExtendsLeft(inferred, left, right.items)\n            : Result.ExtendsFalse()\n        : ExtendsRight(inferred, arrayLeft, right));\n}\n","// deno-fmt-ignore-file\nimport { IsBigInt } from '../types/bigint.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsBigInt(inferred, left, right) {\n    return (IsBigInt(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsBoolean } from '../types/boolean.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsBoolean(inferred, left, right) {\n    return (IsBoolean(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsOptional } from '../types/_optional.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nfunction ParameterCompare(inferred, left, leftRest, right, rightRest) {\n    // Parameter extends Right on Left, except when infer Right  \n    const checkLeft = IsInfer(right) ? left : right;\n    const checkRight = IsInfer(right) ? right : left;\n    const isLeftOptional = IsOptional(left);\n    const isRightOptional = IsOptional(right);\n    return ((!isLeftOptional && isRightOptional)\n        ? Result.ExtendsFalse() // 'fail: left-required-but-right-is-optional'\n        : Result.Match(ExtendsLeft(inferred, checkLeft, checkRight), inferred => ExtendsParameters(inferred, leftRest, rightRest), () => Result.ExtendsFalse()) // 'fail: left-and-right-did-not-match'\n    );\n}\nfunction ParameterRight(inferred, left, leftRest, rightRest) {\n    return Guard.ShiftLeft(rightRest, (head, tail) => ParameterCompare(inferred, left, leftRest, head, tail), () => IsOptional(left) // 'right-did-not-have-enough-elements'\n        ? Result.ExtendsTrue(inferred) // 'ok: left was optional'\n        : Result.ExtendsFalse()); // 'fail: left was required'\n}\nfunction ParametersLeft(inferred, left, rightRest) {\n    return Guard.ShiftLeft(left, (head, tail) => ParameterRight(inferred, head, tail, rightRest), () => Result.ExtendsTrue(inferred)); // 'ok: no-more-elements-in-left'\n}\nexport function ExtendsParameters(inferred, left, right) {\n    return ParametersLeft(inferred, left, right);\n}\n","// deno-fmt-ignore-file\nimport { IsVoid } from '../types/void.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsReturnType(inferred, left, right) {\n    return (IsVoid(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsLeft(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../types/any.mjs';\nimport { IsConstructor } from '../types/constructor.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport * as Result from './result.mjs';\n// ------------------------------------------------------------------\n// Parameters | ReturnType\n// ------------------------------------------------------------------ \nimport { ExtendsParameters } from './parameters.mjs';\nimport { ExtendsReturnType } from './return_type.mjs';\nexport function ExtendsConstructor(inferred, parameters, returnType, right) {\n    return (IsAny(right) ? Result.ExtendsTrue(inferred) :\n        IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n            IsConstructor(right) ? Result.Match(ExtendsParameters(inferred, parameters, right['parameters']), inferred => ExtendsReturnType(inferred, returnType, right['instanceType']), () => Result.ExtendsFalse()) // 'not-a-parameter-match'\n                : Result.ExtendsFalse() // 'not-a-constructor'\n    );\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsDependent(inferred, if_, then_, else_, right) {\n    return Result.Match(ExtendsLeft(inferred, if_, right), () => ExtendsLeft(inferred, then_, right), () => ExtendsLeft(inferred, else_, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { EvaluateEnum } from '../engine/evaluate/evaluate.mjs';\nexport function ExtendsEnum(inferred, left, right) {\n    const evaluated = EvaluateEnum(left);\n    return ExtendsLeft(inferred, evaluated, right);\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../types/any.mjs';\nimport { IsFunction } from '../types/function.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport * as Result from './result.mjs';\n// ------------------------------------------------------------------\n// Parameters | ReturnType\n// ------------------------------------------------------------------ \nimport { ExtendsParameters } from './parameters.mjs';\nimport { ExtendsReturnType } from './return_type.mjs';\nexport function ExtendsFunction(inferred, parameters, returnType, right) {\n    return (IsAny(right) ? Result.ExtendsTrue(inferred) :\n        IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n            IsFunction(right) ? Result.Match(ExtendsParameters(inferred, parameters, right['parameters']), inferred => ExtendsReturnType(inferred, returnType, right['returnType']), () => Result.ExtendsFalse()) // 'not-a-parameter-match'\n                : Result.ExtendsFalse() // 'not-a-function'\n    );\n}\n","// deno-fmt-ignore-file\nimport { IsInteger } from '../types/integer.mjs';\nimport { IsNumber } from '../types/number.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsInteger(inferred, left, right) {\n    return (IsInteger(right) ? Result.ExtendsTrue(inferred) :\n        IsNumber(right) ? Result.ExtendsTrue(inferred) :\n            ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\n// ----------------------------------------------------------------------------\n// ExtendsIntersect\n//\n// This function evaluates the intersection and continues. This is different\n// to IntersectRight which MUST enumerate each type to derive Inferred. Left \n// side types do not infer so it should be ok to do this.\n//\n// ----------------------------------------------------------------------------\nimport { EvaluateIntersect } from '../engine/evaluate/index.mjs';\nexport function ExtendsIntersect(inferred, left, right) {\n    const evaluated = EvaluateIntersect(left);\n    return ExtendsLeft(inferred, evaluated, right);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Unreachable } from '../../system/unreachable/unreachable.mjs';\nimport { IsLiteral, Literal } from '../types/literal.mjs';\nimport { IsBigInt } from '../types/bigint.mjs';\nimport { IsBoolean } from '../types/boolean.mjs';\nimport { IsNumber } from '../types/number.mjs';\nimport { IsString } from '../types/string.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nfunction ExtendsLiteralValue(inferred, left, right) {\n    return (left === right\n        ? Result.ExtendsTrue(inferred)\n        : Result.ExtendsFalse());\n}\nfunction ExtendsLiteralBigInt(inferred, left, right) {\n    return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n        IsBigInt(right) ? Result.ExtendsTrue(inferred) :\n            ExtendsRight(inferred, Literal(left), right));\n}\nfunction ExtendsLiteralBoolean(inferred, left, right) {\n    return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n        IsBoolean(right) ? Result.ExtendsTrue(inferred) :\n            ExtendsRight(inferred, Literal(left), right));\n}\nfunction ExtendsLiteralNumber(inferred, left, right) {\n    return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n        IsNumber(right) ? Result.ExtendsTrue(inferred) :\n            ExtendsRight(inferred, Literal(left), right));\n}\nfunction ExtendsLiteralString(inferred, left, right) {\n    return (IsLiteral(right) ? ExtendsLiteralValue(inferred, left, right.const) :\n        IsString(right) ? Result.ExtendsTrue(inferred) :\n            ExtendsRight(inferred, Literal(left), right));\n}\nexport function ExtendsLiteral(inferred, left, right) {\n    return (Guard.IsBigInt(left.const) ? ExtendsLiteralBigInt(inferred, left.const, right) :\n        Guard.IsBoolean(left.const) ? ExtendsLiteralBoolean(inferred, left.const, right) :\n            Guard.IsNumber(left.const) ? ExtendsLiteralNumber(inferred, left.const, right) :\n                Guard.IsString(left.const) ? ExtendsLiteralString(inferred, left.const, right) :\n                    Unreachable() // ExtendsRight(inferred, left, right)\n    );\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { IsInfer } from '../types/infer.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsNever(inferred, left, right) {\n    return (IsInfer(right)\n        ? ExtendsRight(inferred, left, right)\n        : Result.ExtendsTrue(inferred));\n}\n","// deno-fmt-ignore-file\nimport { IsNull } from '../types/null.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsNull(inferred, left, right) {\n    return (IsNull(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsNumber } from '../types/number.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsNumber(inferred, left, right) {\n    return (IsNumber(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsRight(inferred, left, right));\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Unreachable } from '../../system/unreachable/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsOptional } from '../types/_optional.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsNever } from '../types/never.mjs';\nimport { IsObject, Object } from '../types/object.mjs';\nimport { IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { Union, IsUnion } from '../types/union.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nfunction ExtendsPropertyOptional(inferred, left, right) {\n    return (IsOptional(left)\n        ? IsOptional(right)\n            ? Result.ExtendsTrue(inferred)\n            : Result.ExtendsFalse()\n        : Result.ExtendsTrue(inferred));\n}\nfunction ExtendsProperty(inferred, left, right) {\n    return (\n    // Right TInfer<TNever> is TExtendsFalse\n    (IsInfer(right) && IsNever(right.extends))\n        ? Result.ExtendsFalse()\n        : Result.Match(ExtendsLeft(inferred, left, right), inferred => ExtendsPropertyOptional(inferred, left, right), () => Result.ExtendsFalse()));\n}\nfunction ExtractInferredProperties(keys, properties) {\n    return keys.reduce((result, key) => {\n        return key in properties\n            ? Result.IsExtendsTrueLike(properties[key])\n                // @ts-ignore 5.0.4 cannot see `.inferred`\n                ? { ...result, ...properties[key].inferred }\n                : Unreachable() // result\n            : Unreachable(); // result\n    }, {});\n}\nfunction ExtendsPropertiesComparer(inferred, left, right) {\n    const properties = {};\n    for (const rightKey of Guard.Keys(right)) {\n        properties[rightKey] = (rightKey in left\n            // We don't consider the exterior Inferred as part of the property check as\n            // we don't want the exterior Context to override the Inferred Context for\n            // the Property Key. This override behavior is observed in the following\n            // case we want the inferred A to shadow the exterior A.\n            //\n            // const A = Type.Script(`{ x: 1, y: 1 }`)\n            // const S = Type.Script({ A }, `{\n            //   [K in keyof A]: A extends { \n            //     x: infer A, \n            //     y: infer B \n            //   } ? [A, B]   <-- inferred 'A' shadows the exterior 'A'\n            //     : never\n            // }`)\n            ? ExtendsProperty({}, left[rightKey], right[rightKey])\n            // If the right key K is not in left, but the right property is optional\n            // then we say this property is permissable. This is because an optional\n            // property on right is the same as property missing in left. If the\n            // right is infer, then we just assign the extend type to inferred.\n            : IsOptional(right[rightKey])\n                ? IsInfer(right[rightKey])\n                    // @ts-ignore 5.0.1 - cannot observe extend in right[rightKey].extends\n                    ? Result.ExtendsTrue(Memory.Assign(inferred, { [right[rightKey].name]: right[rightKey].extends }))\n                    : Result.ExtendsTrue(inferred)\n                : Result.ExtendsFalse());\n    }\n    // Check if all properties are ExtendsTrueLike\n    const checked = Guard.Values(properties).every(result => Result.IsExtendsTrueLike(result));\n    // Extract inferred results from properties, but only if the check is true.\n    const extracted = checked ? ExtractInferredProperties(Guard.Keys(properties), properties) : {};\n    return (checked\n        ? Result.ExtendsTrue(extracted)\n        : Result.ExtendsFalse());\n}\nfunction ExtendsProperties(inferred, left, right) {\n    const compared = ExtendsPropertiesComparer(inferred, left, right);\n    return (Result.IsExtendsTrueLike(compared)\n        ? Result.ExtendsTrue(Memory.Assign(inferred, compared.inferred))\n        : Result.ExtendsFalse());\n}\nfunction ExtendsObjectToObject(inferred, left, right) {\n    return ExtendsProperties(inferred, left, right);\n}\nfunction RecordMergeInferred(left, right) {\n    return Guard.Keys(right).reduce((result, key) => {\n        return {\n            ...result, [key]: Guard.HasPropertyKey(left, key)\n                ? IsUnion(result[key])\n                    // @ts-ignore 5.0.4 cannot see `.anyOf`\n                    ? Union([...result[key].anyOf, right[key]])\n                    : Union([left[key], right[key]])\n                : right[key]\n        };\n    }, left);\n}\nfunction ExtendsRecordComparer(properties, keys, type, result) {\n    return Guard.ShiftLeft(keys, (left, right) => Result.Match(ExtendsLeft({}, properties[left], type), inferred => ExtendsRecordComparer(properties, right, type, RecordMergeInferred(result, inferred)), () => Result.ExtendsFalse()), () => Result.ExtendsTrue(result));\n}\nfunction ExtendsObjectToRecord(inferred, properties, _pattern, value) {\n    const keys = Guard.Keys(properties);\n    const result = ExtendsRecordComparer(properties, keys, value, inferred);\n    return result;\n}\nexport function ExtendsObject(inferred, left, right) {\n    return (IsRecord(right) ? ExtendsObjectToRecord(inferred, left, RecordPattern(right), RecordValue(right)) :\n        IsObject(right) ? ExtendsObjectToObject(inferred, left, right.properties) :\n            ExtendsRight(inferred, Object(left), right));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsAny } from '../types/any.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { IsObject } from '../types/object.mjs';\nimport { IsRecord, RecordPatternToType, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\nfunction FromObject(inferred, properties) {\n    return (Guard.IsEqual(Guard.Keys(properties).length, 0)\n        ? Result.ExtendsTrue(inferred)\n        : Result.ExtendsFalse());\n}\nfunction FromRecord(inferred, _leftKey, leftValue, _rightKey, rightValue) {\n    return ExtendsLeft(inferred, leftValue, rightValue);\n}\nexport function ExtendsRecord(inferred, leftPattern, leftValue, right) {\n    return (IsRecord(right) ? FromRecord(inferred, RecordPatternToType(leftPattern), leftValue, RecordPatternToType(RecordPattern(right)), RecordValue(right)) :\n        IsObject(right) ? FromObject(inferred, right.properties) :\n            IsAny(right) ? Result.ExtendsTrue(inferred) :\n                IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n                    Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { IsString } from '../types/string.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsString(inferred, left, right) {\n    return (IsString(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { IsSymbol } from '../types/symbol.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsSymbol(inferred, left, right) {\n    return (IsSymbol(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { EvaluateTemplateLiteral } from '../engine/evaluate/evaluate.mjs';\nexport function ExtendsTemplateLiteral(inferred, left, right) {\n    const evaluated = EvaluateTemplateLiteral(left);\n    return ExtendsLeft(inferred, evaluated, right);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Unreachable } from '../../system/unreachable/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsArray } from '../types/array.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { Tuple } from '../types/tuple.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { Union } from '../types/union.mjs';\n// ----------------------------------------------------------------------------\n// Operator\n// ----------------------------------------------------------------------------\nimport { IsInfer } from '../types/infer.mjs';\nimport { IsRest } from '../types/rest.mjs';\nimport * as Result from './result.mjs';\n// ----------------------------------------------------------------------------\n// Factory\n// ----------------------------------------------------------------------------\nexport function Inferrable(name, type) {\n    return Memory.Create({ '~kind': 'Inferrable' }, { name, type }, {});\n}\n// ----------------------------------------------------------------------------\n// Guard\n// ----------------------------------------------------------------------------\nexport function IsInferable(value) {\n    return Guard.IsObject(value)\n        && Guard.HasPropertyKey(value, '~kind')\n        && Guard.HasPropertyKey(value, 'name')\n        && Guard.HasPropertyKey(value, 'type')\n        && Guard.IsEqual(value[\"~kind\"], 'Inferrable')\n        && Guard.IsString(value.name)\n        && Guard.IsObject(value.type);\n}\nexport function TryRestInferable(type) {\n    return (IsRest(type)\n        ? IsInfer(type.items)\n            ? IsArray(type.items.extends) ? Inferrable(type.items.name, type.items.extends.items) :\n                IsUnknown(type.items.extends) ? Inferrable(type.items.name, type.items.extends) :\n                    undefined\n            : Unreachable() // undefined\n        : undefined);\n}\nexport function TryInferable(type) {\n    return (IsInfer(type) ? Inferrable(type.name, type.extends) :\n        undefined);\n}\n// function TryInferResults<Rest extends TSchema[], Right extends TSchema>(rest: [...Rest], right: Right, result: TSchema[] = []): TryInferResults<Rest, Right> {\n//   return Guard.ShiftLeft(rest, (head, tail) =>\n//     Result.Match(ExtendsLeft({}, head, right),\n//       () => TryInferResults(tail, right, [...result, head]), // Stack Overflow Here (Large Rest)\n//       () => undefined),\n//     () => result) as never\n// }\nfunction TryInferResults(rest, right) {\n    const result = [];\n    for (const head of rest) {\n        if (!Result.IsExtendsTrueLike(ExtendsLeft({}, head, right)))\n            return undefined;\n        result.push(head);\n    }\n    return result;\n}\nexport function InferTupleResult(inferred, name, left, right) {\n    const results = TryInferResults(left, right);\n    return (Guard.IsArray(results)\n        ? Result.ExtendsTrue(Memory.Assign(inferred, { [name]: Tuple(results) }))\n        : Result.ExtendsFalse());\n}\nexport function InferUnionResult(inferred, name, left, right) {\n    const results = TryInferResults(left, right);\n    return (Guard.IsArray(results)\n        ? Result.ExtendsTrue(Memory.Assign(inferred, { [name]: Union(results) }))\n        : Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from '../types/schema.mjs';\nimport { IsArray } from '../types/array.mjs';\nimport { IsTuple, Tuple } from '../types/tuple.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nimport { InstantiateElements } from '../engine/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\n// ----------------------------------------------------------------------------\n// Inference\n// ----------------------------------------------------------------------------\nimport { TryRestInferable, TryInferable, IsInferable, InferTupleResult, InferUnionResult } from './inference.mjs';\nfunction Reverse(types) {\n    return [...types].reverse();\n}\nfunction ApplyReverse(types, reversed) {\n    return (reversed ? Reverse(types) : types);\n}\nfunction Reversed(types) {\n    const first = types.length > 0 ? types[0] : undefined;\n    const inferrable = IsSchema(first) ? TryRestInferable(first) : undefined;\n    return IsSchema(inferrable);\n}\nfunction ElementsCompare(inferred, reversed, left, leftRest, right, rightRest) {\n    return Result.Match(ExtendsLeft(inferred, left, right), checkInferred => Elements(checkInferred, reversed, leftRest, rightRest), () => Result.ExtendsFalse()); // 'left-and-right-not-compared'\n}\nfunction ElementsLeft(inferred, reversed, leftRest, right, rightRest) {\n    const inferable = TryRestInferable(right);\n    return (\n    // Rest Inferrable Right Means we delegate to TInferTupleResult to Generate a Result\n    IsInferable(inferable)\n        ? InferTupleResult(inferred, inferable['name'], ApplyReverse(leftRest, reversed), inferable['type'])\n        : Guard.ShiftLeft(leftRest, (head, tail) => ElementsCompare(inferred, reversed, head, tail, right, rightRest), () => Result.ExtendsFalse()));\n}\nfunction ElementsRight(inferred, reversed, leftRest, rightRest) {\n    return Guard.ShiftLeft(rightRest, (head, tail) => ElementsLeft(inferred, reversed, leftRest, head, tail), () => Guard.IsEqual(leftRest.length, 0)\n        ? Result.ExtendsTrue(inferred) // 'Ok: right-empty-and-left-empty'\n        : Result.ExtendsFalse()); // 'Fail: right-empty-and-left-not-empty'\n}\nfunction Elements(inferred, reversed, leftRest, rightRest) {\n    return ElementsRight(inferred, reversed, leftRest, rightRest);\n}\nfunction ExtendsTupleToTuple(inferred, left, right) {\n    const instantiatedRight = InstantiateElements(inferred, State([], []), right);\n    const reversed = Reversed(instantiatedRight);\n    return Elements(inferred, reversed, ApplyReverse(left, reversed), ApplyReverse(instantiatedRight, reversed));\n}\n// function ExtendsTupleToArrayReduce<Inferred extends TProperties, Left extends TSchema[], Right extends TSchema>\n//   (inferred: Inferred, left: [...Left], right: Right):\n//     TExtendsTupleToArrayReduce<Inferred, Left, Right> {\n//   return (\n//     Guard.ShiftLeft(left, (head, tail) =>\n//       Result.Match(ExtendsLeft(inferred, head, right), inferred =>\n//         ExtendsTupleToArrayReduce(inferred, tail, right), // Stack Overflow Here (Large Left)\n//         () => Result.ExtendsFalse()),\n//       () => Result.ExtendsTrue(inferred))\n//   ) as never\n// }\nfunction ExtendsTupleToArrayReduce(inferred, left, right) {\n    for (const head of left) {\n        const result = ExtendsLeft(inferred, head, right);\n        if (!Result.IsExtendsTrueLike(result))\n            return result;\n        inferred = result.inferred; // (review-assign-to-argument)\n    }\n    return Result.ExtendsTrue(inferred);\n}\nfunction ExtendsTupleToArray(inferred, left, right) {\n    const inferrable = TryInferable(right);\n    return (IsInferable(inferrable)\n        ? InferUnionResult(inferred, inferrable['name'], left, inferrable['type'])\n        : ExtendsTupleToArrayReduce(inferred, left, right));\n}\nexport function ExtendsTuple(inferred, left, right) {\n    const instantiatedLeft = InstantiateElements(inferred, State([], []), left);\n    return (IsTuple(right) ? ExtendsTupleToTuple(inferred, instantiatedLeft, right.items) :\n        IsArray(right) ? ExtendsTupleToArray(inferred, instantiatedLeft, right.items) :\n            ExtendsRight(inferred, Tuple(instantiatedLeft), right));\n}\n","// deno-fmt-ignore-file\nimport { IsUndefined } from '../types/undefined.mjs';\nimport { IsVoid } from '../types/void.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsUndefined(inferred, left, right) {\n    return (IsVoid(right) ? Result.ExtendsTrue(inferred) :\n        IsUndefined(right) ? Result.ExtendsTrue(inferred) :\n            ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsUnion } from '../types/union.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport * as Result from './result.mjs';\n// ----------------------------------------------------------------------------\n// Inference\n// ----------------------------------------------------------------------------\nimport { IsInferable, TryInferable, InferUnionResult } from './inference.mjs';\nfunction ExtendsUnionSome(inferred, type, unionTypes) {\n    return Guard.ShiftLeft(unionTypes, (head, tail) => Result.Match(ExtendsLeft(inferred, type, head), inferred => Result.ExtendsTrue(inferred), () => ExtendsUnionSome(inferred, type, tail)), () => Result.ExtendsFalse());\n}\nfunction ExtendsUnionLeft(inferred, left, right) {\n    return Guard.ShiftLeft(left, (head, tail) => Result.Match(ExtendsUnionSome(inferred, head, right), inferred => ExtendsUnionLeft(inferred, tail, right), () => Result.ExtendsFalse()), () => Result.ExtendsTrue(inferred));\n}\nexport function ExtendsUnion(inferred, left, right) {\n    const inferrable = TryInferable(right);\n    return (IsInferable(inferrable)\n        // @ts-ignore 4.9.5 fails to see `type` property on inferrable\n        ? InferUnionResult(inferred, inferrable.name, left, inferrable.type)\n        : IsUnion(right)\n            ? ExtendsUnionLeft(inferred, left, right.anyOf)\n            : ExtendsUnionLeft(inferred, left, [right]));\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../types/any.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { IsInfer } from '../types/infer.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsUnknown(inferred, left, right) {\n    return (IsInfer(right) ? ExtendsRight(inferred, left, right) :\n        IsAny(right) ? Result.ExtendsTrue(inferred) :\n            IsUnknown(right) ? Result.ExtendsTrue(inferred) :\n                Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { IsVoid } from '../types/void.mjs';\nimport { ExtendsRight } from './extends_right.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsVoid(inferred, left, right) {\n    return (IsVoid(right)\n        ? Result.ExtendsTrue(inferred)\n        : ExtendsRight(inferred, left, right));\n}\n","// deno-fmt-ignore-file\nimport { ExtendsAny } from './any.mjs';\nimport { ExtendsArray } from './array.mjs';\nimport { ExtendsBigInt } from './bigint.mjs';\nimport { ExtendsBoolean } from './boolean.mjs';\nimport { ExtendsConstructor } from './constructor.mjs';\nimport { ExtendsDependent } from './dependent.mjs';\nimport { ExtendsEnum } from './enum.mjs';\nimport { ExtendsFunction } from './function.mjs';\nimport { ExtendsInteger } from './integer.mjs';\nimport { ExtendsIntersect } from './intersect.mjs';\nimport { ExtendsLiteral } from './literal.mjs';\nimport { ExtendsNever } from './never.mjs';\nimport { ExtendsNull } from './null.mjs';\nimport { ExtendsNumber } from './number.mjs';\nimport { ExtendsObject } from './object.mjs';\nimport { ExtendsRecord } from './record.mjs';\nimport { ExtendsString } from './string.mjs';\nimport { ExtendsSymbol } from './symbol.mjs';\nimport { ExtendsTemplateLiteral } from './template_literal.mjs';\nimport { ExtendsTuple } from './tuple.mjs';\nimport { ExtendsUndefined } from './undefined.mjs';\nimport { ExtendsUnion } from './union.mjs';\nimport { ExtendsUnknown } from './unknown.mjs';\nimport { ExtendsVoid } from './void.mjs';\n// ----------------------------------------------------------------------------\n// Types\n// ----------------------------------------------------------------------------\nimport { IsAny } from '../types/any.mjs';\nimport { IsArray } from '../types/array.mjs';\nimport { IsBigInt } from '../types/bigint.mjs';\nimport { IsBoolean } from '../types/boolean.mjs';\nimport { IsConstructor } from '../types/constructor.mjs';\nimport { IsDependent } from '../types/dependent.mjs';\nimport { IsEnum } from '../types/enum.mjs';\nimport { IsFunction } from '../types/function.mjs';\nimport { IsInteger } from '../types/integer.mjs';\nimport { IsIntersect } from '../types/intersect.mjs';\nimport { IsLiteral } from '../types/literal.mjs';\nimport { IsNever } from '../types/never.mjs';\nimport { IsNull } from '../types/null.mjs';\nimport { IsNumber } from '../types/number.mjs';\nimport { IsObject } from '../types/object.mjs';\nimport { IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { IsString } from '../types/string.mjs';\nimport { IsSymbol } from '../types/symbol.mjs';\nimport { IsTemplateLiteral } from '../types/template_literal.mjs';\nimport { IsTuple } from '../types/tuple.mjs';\nimport { IsUndefined } from '../types/undefined.mjs';\nimport { IsUnknown } from '../types/unknown.mjs';\nimport { IsUnion } from '../types/union.mjs';\nimport { IsVoid } from '../types/void.mjs';\nimport * as Result from './result.mjs';\nexport function ExtendsLeft(inferred, left, right) {\n    return (IsAny(left) ? ExtendsAny(inferred, left, right) :\n        IsArray(left) ? ExtendsArray(inferred, left, left.items, right) :\n            IsBigInt(left) ? ExtendsBigInt(inferred, left, right) :\n                IsBoolean(left) ? ExtendsBoolean(inferred, left, right) :\n                    IsConstructor(left) ? ExtendsConstructor(inferred, left.parameters, left.instanceType, right) :\n                        IsDependent(left) ? ExtendsDependent(inferred, left.if, left.then, left.else, right) :\n                            IsEnum(left) ? ExtendsEnum(inferred, left.enum, right) :\n                                IsFunction(left) ? ExtendsFunction(inferred, left.parameters, left.returnType, right) :\n                                    IsInteger(left) ? ExtendsInteger(inferred, left, right) :\n                                        IsIntersect(left) ? ExtendsIntersect(inferred, left.allOf, right) :\n                                            IsLiteral(left) ? ExtendsLiteral(inferred, left, right) :\n                                                IsNever(left) ? ExtendsNever(inferred, left, right) :\n                                                    IsNull(left) ? ExtendsNull(inferred, left, right) :\n                                                        IsNumber(left) ? ExtendsNumber(inferred, left, right) :\n                                                            IsObject(left) ? ExtendsObject(inferred, left.properties, right) :\n                                                                IsRecord(left) ? ExtendsRecord(inferred, RecordPattern(left), RecordValue(left), right) :\n                                                                    IsString(left) ? ExtendsString(inferred, left, right) :\n                                                                        IsSymbol(left) ? ExtendsSymbol(inferred, left, right) :\n                                                                            IsTemplateLiteral(left) ? ExtendsTemplateLiteral(inferred, left.pattern, right) :\n                                                                                IsTuple(left) ? ExtendsTuple(inferred, left.items, right) :\n                                                                                    IsUndefined(left) ? ExtendsUndefined(inferred, left, right) :\n                                                                                        IsUnion(left) ? ExtendsUnion(inferred, left.anyOf, right) :\n                                                                                            IsUnknown(left) ? ExtendsUnknown(inferred, left, right) :\n                                                                                                IsVoid(left) ? ExtendsVoid(inferred, left, right) :\n                                                                                                    Result.ExtendsFalse());\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { InterfaceDeferred } from '../../action/index.mjs';\nimport { CanInstantiate } from '../instantiate.mjs';\nimport { InstantiateProperties } from '../instantiate.mjs';\nimport { InstantiateTypes } from '../instantiate.mjs';\nfunction InterfaceOperation(heritage, properties) {\n    const result = EvaluateIntersect([...heritage, Object(properties)]);\n    return result;\n}\nexport function InterfaceAction(heritage, properties, options) {\n    const result = CanInstantiate(heritage)\n        ? Memory.Update(InterfaceOperation(heritage, properties), {}, options)\n        : InterfaceDeferred(heritage, properties, options);\n    return result;\n}\nexport function InterfaceInstantiate(context, state, heritage, properties, options) {\n    const instantiatedHeritage = InstantiateTypes(context, state, heritage);\n    const instantiatedProperties = InstantiateProperties(context, state, properties);\n    return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from '../types/schema.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { InterfaceAction } from '../engine/interface/instantiate.mjs';\n/** Creates a deferred Interface action. */\nexport function InterfaceDeferred(heritage, properties, options = {}) {\n    return Deferred('Interface', [heritage, properties], options);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if this value is a deferred Interface action. */\nexport function IsInterfaceDeferred(value) {\n    return IsSchema(value)\n        && Guard.HasPropertyKey(value, 'action')\n        && Guard.IsEqual(value.action, 'Interface');\n}\n/** Creates an Interface using the given heritage and properties. */\nexport function Interface(heritage, properties, options = {}) {\n    return InterfaceAction(heritage, properties, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsArray } from '../../types/array.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { PropertyValues } from '../../types/properties.mjs';\nimport { IsRecord, RecordValue } from '../../types/record.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { IsInterfaceDeferred } from '../../action/interface.mjs';\nfunction FromRef(stack, context, ref) {\n    return (stack.includes(ref)\n        ? true\n        : FromType([...stack, ref], context, context[ref]));\n}\nfunction FromProperties(stack, context, properties) {\n    const types = PropertyValues(properties);\n    return FromTypes(stack, context, types);\n}\nfunction FromTypes(stack, context, types) {\n    return Guard.ShiftLeft(types, (left, right) => FromType(stack, context, left)\n        ? true\n        : FromTypes(stack, context, right), () => false);\n}\nfunction FromType(stack, context, type) {\n    return (IsRef(type) ? FromRef(stack, context, type.$ref) :\n        IsArray(type) ? FromType(stack, context, type.items) :\n            IsConstructor(type) ? FromTypes(stack, context, [...type.parameters, type.instanceType]) :\n                IsFunction(type) ? FromTypes(stack, context, [...type.parameters, type.returnType]) :\n                    IsInterfaceDeferred(type) ? FromProperties(stack, context, type.parameters[1]) :\n                        IsIntersect(type) ? FromTypes(stack, context, type.allOf) :\n                            IsObject(type) ? FromProperties(stack, context, type.properties) :\n                                IsUnion(type) ? FromTypes(stack, context, type.anyOf) :\n                                    IsTuple(type) ? FromTypes(stack, context, type.items) :\n                                        IsRecord(type) ? FromType(stack, context, RecordValue(type)) :\n                                            false);\n}\n/** Performs a cyclic check on the given type. Initial key stack can be empty, but faster if specified */\nexport function CyclicCheck(stack, context, type) {\n    const result = FromType(stack, context, type);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { PropertyKeys } from '../../types/properties.mjs';\nimport { CyclicCheck } from './check.mjs';\nfunction ResolveCandidateKeys(context, keys) {\n    return keys.reduce((result, left) => {\n        return CyclicCheck([left], context, context[left])\n            ? [...result, left]\n            : result;\n    }, []);\n}\n/** Returns keys for context types that need to be transformed to TCyclic. */\nexport function CyclicCandidates(context) {\n    const keys = PropertyKeys(context);\n    const result = ResolveCandidateKeys(context, keys);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { IsArray } from '../../types/array.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { PropertyValues } from '../../types/properties.mjs';\nimport { IsRecord, RecordValue } from '../../types/record.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { IsInterfaceDeferred } from '../../action/interface.mjs';\nfunction FromRef(context, ref, result) {\n    return (result.includes(ref)\n        ? result\n        : ref in context\n            ? FromType(context, context[ref], [...result, ref])\n            : Unreachable());\n}\nfunction FromProperties(context, properties, result) {\n    const types = PropertyValues(properties);\n    return FromTypes(context, types, result);\n}\nfunction FromTypes(context, types, result) {\n    return types.reduce((result, left) => {\n        return FromType(context, left, result);\n    }, result);\n}\nfunction FromType(context, type, result) {\n    return (IsRef(type) ? FromRef(context, type.$ref, result) :\n        IsArray(type) ? FromType(context, type.items, result) :\n            IsConstructor(type) ? FromTypes(context, [...type.parameters, type.instanceType], result) :\n                IsFunction(type) ? FromTypes(context, [...type.parameters, type.returnType], result) :\n                    IsInterfaceDeferred(type) ? FromProperties(context, type.parameters[1], result) :\n                        IsIntersect(type) ? FromTypes(context, type.allOf, result) :\n                            IsObject(type) ? FromProperties(context, type.properties, result) :\n                                IsUnion(type) ? FromTypes(context, type.anyOf, result) :\n                                    IsTuple(type) ? FromTypes(context, type.items, result) :\n                                        IsRecord(type) ? FromType(context, RecordValue(type), result) :\n                                            result);\n}\n/** Returns dependent cyclic keys for the given type. This function is used to dead-type-eliminate (DTE) for initializing TCyclic types. */\nexport function CyclicDependencies(context, key, type) {\n    const result = FromType(context, type, [key]);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Any } from '../../types/any.mjs';\nimport { Array as _Array_, IsArray, ArrayOptions } from '../../types/array.mjs';\nimport { Constructor, IsConstructor } from '../../types/constructor.mjs';\nimport { Function as _Function_, IsFunction } from '../../types/function.mjs';\nimport { Intersect, IsIntersect } from '../../types/intersect.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { IsRecord, Record, RecordKey, RecordValue } from '../../types/record.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { Tuple, IsTuple } from '../../types/tuple.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { Unknown } from '../../types/unknown.mjs';\nfunction FromRef(_ref) {\n    return Any();\n}\nfunction FromProperties(properties) {\n    return Guard.Keys(properties).reduce((result, key) => {\n        return { ...result, [key]: FromType(properties[key]) };\n    }, {});\n}\nfunction FromTypes(types) {\n    return types.reduce((result, left) => {\n        return [...result, FromType(left)];\n    }, []);\n}\nfunction FromType(type) {\n    return (IsRef(type) ? FromRef(type.$ref) :\n        IsArray(type) ? _Array_(FromType(type.items), ArrayOptions(type)) :\n            IsConstructor(type) ? Constructor(FromTypes(type.parameters), FromType(type.instanceType)) :\n                IsFunction(type) ? _Function_(FromTypes(type.parameters), FromType(type.returnType)) :\n                    IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :\n                        IsObject(type) ? Object(FromProperties(type.properties)) :\n                            IsRecord(type) ? Record(RecordKey(type), FromType(RecordValue(type))) :\n                                IsUnion(type) ? Union(FromTypes(type.anyOf)) :\n                                    IsTuple(type) ? Tuple(FromTypes(type.items)) :\n                                        type);\n}\nfunction CyclicAnyFromParameters(defs, ref) {\n    return (ref in defs\n        ? FromType(defs[ref])\n        : Unknown());\n}\n/** Transforms TCyclic TRef's into TAny's. This function is used prior to TExtends checks to enable cyclics to be structurally checked and terminated (with TAny) at first point of recursion, what would otherwise be a recursive TRef.*/\nexport function CyclicExtends(type) {\n    return CyclicAnyFromParameters(type.$defs, type.$ref);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { CyclicDependencies } from '../cyclic/dependencies.mjs';\nimport { IsInterfaceDeferred } from '../../action/index.mjs';\nimport { InstantiateProperties } from '../instantiate.mjs';\nimport { InstantiateTypes } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nfunction CyclicInterface(context, heritage, properties) {\n    const instantiatedHeritage = InstantiateTypes(context, State([], []), heritage);\n    const instantiatedProperties = InstantiateProperties({}, State([], []), properties);\n    const evaluatedInterface = EvaluateIntersect([...instantiatedHeritage, Object(instantiatedProperties)]);\n    return evaluatedInterface;\n}\nfunction CyclicDefinitions(context, dependencies) {\n    const keys = Guard.Keys(context).filter(key => dependencies.includes(key));\n    return keys.reduce((result, key) => {\n        const type = context[key];\n        const instantiatedType = IsInterfaceDeferred(type) ? CyclicInterface(context, type.parameters[0], type.parameters[1]) : type;\n        return { ...result, [key]: instantiatedType };\n    }, {});\n}\nexport function InstantiateCyclic(context, ref, type) {\n    const dependencies = CyclicDependencies(context, ref, type);\n    const definitions = CyclicDefinitions(context, dependencies);\n    const result = Cyclic(definitions, ref);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Never } from '../../types/never.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nfunction Resolve(defs, ref) {\n    return (ref in defs\n        ? IsRef(defs[ref])\n            // @ts-ignore 5.0.4 - does not see $ref\n            ? Resolve(defs, defs[ref].$ref)\n            : defs[ref]\n        : Never());\n}\n/** Returns the target Type from the Defs or Never if target is non-resolvable */\nexport function CyclicTarget(defs, ref) {\n    const result = Resolve(defs, ref);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { IsCyclic } from '../types/cyclic.mjs';\nimport { Unknown } from '../types/unknown.mjs';\nimport { IsUnsafe } from '../types/unsafe.mjs';\nimport { ExtendsLeft } from './extends_left.mjs';\nimport { CyclicExtends } from '../engine/cyclic/index.mjs';\nfunction Canonical(type) {\n    return (IsCyclic(type) ? CyclicExtends(type) :\n        IsUnsafe(type) ? Unknown() :\n            type);\n}\n/** Performs a structural extends check on left and right types and yields inferred types on right if specified. */\nexport function Extends(inferred, left, right) {\n    const canonicalLeft = Canonical(left);\n    const canonicalRight = Canonical(right);\n    return ExtendsLeft(inferred, canonicalLeft, canonicalRight);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Extends, ExtendsResult } from \"../../extends/index.mjs\";\n// ------------------------------------------------------------------\n// TCompare\n// ------------------------------------------------------------------\nexport const CompareResultEqual = 0; // 'equal'\nexport const CompareResultDisjoint = 1; // 'disjoint'\nexport const CompareResultLeftInside = 2; // 'left-inside'\nexport const CompareResultRightInside = 3; // 'right-inside'\n/** Compares left and right types and determines their set relationship. */\nexport function Compare(left, right) {\n    const extendsCheck = [Extends({}, left, right), Extends({}, right, left)];\n    return (ExtendsResult.IsExtendsTrueLike(extendsCheck[0]) && ExtendsResult.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultEqual :\n        ExtendsResult.IsExtendsTrueLike(extendsCheck[0]) && ExtendsResult.IsExtendsFalse(extendsCheck[1]) ? CompareResultLeftInside :\n            ExtendsResult.IsExtendsFalse(extendsCheck[0]) && ExtendsResult.IsExtendsTrueLike(extendsCheck[1]) ? CompareResultRightInside :\n                CompareResultDisjoint);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsAny } from '../../types/any.mjs';\nimport { IsNever } from '../../types/never.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsUnknown } from '../../types/unknown.mjs';\nimport { Compare, CompareResultLeftInside, CompareResultEqual, CompareResultDisjoint } from './compare.mjs';\nimport { Flatten } from './flatten.mjs';\nimport { EvaluateType } from './evaluate.mjs';\nfunction BroadenFilter(type, types, result = [], all = types) {\n    return Guard.ShiftLeft(types, (left, right) => {\n        const compare = Compare(type, left);\n        return ((Guard.IsEqual(compare, CompareResultLeftInside) || Guard.IsEqual(compare, CompareResultEqual))\n            ? all // Left in set. Return original All set.\n            : Guard.IsEqual(compare, CompareResultDisjoint)\n                ? BroadenFilter(type, right, [...result, left], all) // Left is disjoint, keep it\n                : BroadenFilter(type, right, result, all) // Left in Type, drop it\n        );\n    }, () => [...result, type]); // Type broadest in set\n}\nfunction BroadenType(type, types, result) {\n    const evaluated = EvaluateType(type);\n    return (IsAny(evaluated) ? [evaluated] : // terminate (always the most broad)\n        IsUnknown(evaluated) ? [evaluated] : // terminate (always the most broad)\n            IsNever(evaluated) ? BroadenTypes(types, result) : // ignored: never is dropped\n                IsObject(evaluated) ? BroadenTypes(types, [...result, evaluated]) : // objects are always considered (too expensive to compare)\n                    BroadenTypes(types, BroadenFilter(evaluated, result)));\n}\nfunction BroadenTypes(types, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => (BroadenType(left, right, result)), () => result);\n}\n/** Broadens a set of types and returns either the most broad type, or union or disjoint types. */\nexport function Broaden(types) {\n    const broadened = BroadenTypes(types);\n    const flattened = Flatten(broadened);\n    return flattened;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { EvaluateType } from './evaluate.mjs';\nexport function EvaluateAction(type, options) {\n    const result = Memory.Update(EvaluateType(type), {}, options);\n    return result;\n}\nexport function EvaluateInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return EvaluateAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { IsDeferred } from '../../types/deferred.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsRef } from '../../types/ref.mjs';\n// ------------------------------------------------------------------\n// Infrastructure\n// ------------------------------------------------------------------\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nfunction CollectDistributionNames(expression, result = []) {\n    return (\n    // Conditional\n    IsDeferred(expression) && Guard.IsEqual(expression.action, 'Conditional')\n        ? IsRef(expression.parameters[0])\n            ? CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], [...result, expression.parameters[0]['$ref']]))\n            : CollectDistributionNames(expression.parameters[2], CollectDistributionNames(expression.parameters[3], result))\n        // Mapped\n        : IsDeferred(expression) && Guard.IsEqual(expression.action, 'Mapped')\n            ? (IsDeferred(expression.parameters[1]) && Guard.IsEqual(expression.parameters[1].action, 'KeyOf') && IsRef(expression.parameters[1].parameters[0]) ? [...result, expression.parameters[1].parameters[0]['$ref']] :\n                result) : result);\n}\nfunction BuildDistributionArray(parameters, names) {\n    return parameters.reduce((result, left) => [...result, names.includes(left.name)], []);\n}\nfunction ZipDistributionArray(arguments_, distributionArray, result = []) {\n    return Guard.ShiftLeft(arguments_, (argumentLeft, argumentRight) => Guard.ShiftLeft(distributionArray, (booleanLeft, booleanRight) => ZipDistributionArray(argumentRight, booleanRight, [...result, [booleanLeft, argumentLeft]]), () => result), () => result);\n}\nfunction CanonicalArgument(type) {\n    return (IsTemplateLiteral(type) ? EvaluateTemplateLiteral(type.pattern) :\n        IsEnum(type) ? EvaluateEnum(type.enum) :\n            type);\n}\nfunction Expand(type) {\n    const canonicalArgument = CanonicalArgument(type);\n    return (IsUnion(canonicalArgument)\n        ? [...canonicalArgument.anyOf]\n        : [canonicalArgument]);\n}\nfunction Append(current, type) {\n    return current.reduce((result, left) => [...result, [...left, type]], []);\n}\nfunction Cross(current, variants) {\n    return variants.reduce((result, left) => {\n        return [...result, ...Append(current, left)];\n    }, []);\n}\nfunction Distribute(zipped) {\n    return zipped.reduce((result, left) => {\n        return Guard.IsEqual(left[0], true)\n            ? Cross(result, Expand(left[1]))\n            : Cross(result, [left[1]]); // - no-expansion\n    }, [[]]);\n}\nexport function DistributeArguments(parameters, arguments_, expression) {\n    const distributionNames = CollectDistributionNames(expression);\n    const distributionArray = BuildDistributionArray(parameters, distributionNames);\n    const zippedArguments = ZipDistributionArray(arguments_, distributionArray);\n    return (IsDeferred(expression) && Guard.IsEqual(expression.action, 'Conditional')\n        ? Distribute(zippedArguments)\n        : IsDeferred(expression) && Guard.IsEqual(expression.action, 'Mapped')\n            ? Distribute(zippedArguments)\n            : [arguments_]);\n}\n","// deno-fmt-ignore-file\nimport { Generic, IsGeneric } from '../../types/generic.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { Never } from '../../types/never.mjs';\nfunction FromNotResolvable() {\n    return ['(not-resolvable)', Never()];\n}\nfunction FromNotGeneric() {\n    return ['(not-generic)', Never()];\n}\nfunction FromGeneric(name, parameters, expression) {\n    return [name, Generic(parameters, expression)];\n}\nfunction FromRef(context, ref, arguments_) {\n    return (ref in context\n        ? FromType(context, ref, context[ref], arguments_)\n        : FromNotResolvable());\n}\nfunction FromType(context, name, target, arguments_) {\n    return (IsGeneric(target) ? FromGeneric(name, target.parameters, target.expression) :\n        IsRef(target) ? FromRef(context, target.$ref, arguments_) :\n            FromNotGeneric());\n}\n/** Resolves a named generic target from the context, or returns TNever if it cannot be resolved or is not generic. */\nexport function ResolveTarget(context, target, arguments_) {\n    return FromType(context, '(anonymous)', target, arguments_);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { IsInfer } from '../../types/infer.mjs';\nimport { IsCall } from '../../types/call.mjs';\n// ------------------------------------------------------------------\n// AssertArgument\n// ------------------------------------------------------------------\nfunction AssertArgumentExtends(name, type, extends_) {\n    if (IsInfer(type) || IsCall(type) || ExtendsResult.IsExtendsTrueLike(Extends({}, type, extends_)))\n        return;\n    const cause = { parameter: name, expect: extends_, actual: type };\n    // @ts-ignore - no definition for { cause } options \n    throw new Error(`Argument for parameter ${name} does not satisfy constraint`, { cause });\n}\nfunction BindArgument(context, state, name, extends_, type) {\n    const instantiatedArgument = InstantiateType(context, state, type);\n    AssertArgumentExtends(name, instantiatedArgument, extends_);\n    return Memory.Assign(context, { [name]: instantiatedArgument });\n}\nfunction BindArguments(context, state, parameterLeft, parameterRight, arguments_) {\n    const instantiatedExtends = InstantiateType(context, state, parameterLeft.extends);\n    const instantiatedEquals = InstantiateType(context, state, parameterLeft.equals);\n    return Guard.ShiftLeft(arguments_, (left, right) => BindParameters(BindArgument(context, state, parameterLeft['name'], instantiatedExtends, left), state, parameterRight, right), () => BindParameters(BindArgument(context, state, parameterLeft['name'], instantiatedExtends, instantiatedEquals), state, parameterRight, []));\n}\nfunction BindParameters(context, state, parameters, arguments_) {\n    return Guard.ShiftLeft(parameters, (left, right) => BindArguments(context, state, left, right, arguments_), () => context);\n}\nexport function ResolveArgumentsContext(context, state, parameters, arguments_) {\n    return BindParameters(context, state, parameters, arguments_);\n}\n","// deno-fmt-ignore-file\nimport { Settings } from '../../../system/settings/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { CallConstruct } from '../../types/call.mjs';\nimport { Ref } from '../../types/ref.mjs';\nimport { IsGeneric } from '../../types/generic.mjs';\nimport { EvaluateUnion } from '../evaluate/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { InstantiateTypes } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\n// ------------------------------------------------------------------\n// Infrastructure\n// ------------------------------------------------------------------\nimport { DistributeArguments } from './distribute_arguments.mjs';\nimport { ResolveTarget } from './resolve_target.mjs';\nimport { ResolveArgumentsContext } from './resolve_arguments.mjs';\n// ------------------------------------------------------------------\n// InstantiationGuard\n// ------------------------------------------------------------------\nlet instantiationDepth = 0;\nlet instantiationCount = 0;\nfunction InstantiationAssert() {\n    if (Guard.IsLessThan(instantiationCount, Settings.Get().maxInstantiationCount))\n        return;\n    throw Error('Type instantiation is excessively deep and possibly infinite');\n}\nfunction InstantiationIncrement() {\n    InstantiationAssert();\n    instantiationCount++;\n    instantiationDepth++;\n}\nfunction InstantiationDecrement() {\n    instantiationDepth--;\n    if (Guard.IsEqual(instantiationDepth, 0))\n        instantiationCount = 0;\n}\nfunction Peek(state) {\n    const result = Guard.IsGreaterThan(state.callstack.length, 0) ? state.callstack[state.callstack.length - 1] : '';\n    return result;\n}\nfunction IsTailCall(state, name) {\n    const result = Guard.IsEqual(Peek(state), name);\n    return result;\n}\nfunction CallDispatch(context, state, target, parameters, expression, arguments_) {\n    InstantiationIncrement();\n    try {\n        const argumentsContext = ResolveArgumentsContext(context, state, parameters, arguments_);\n        const returnType = InstantiateType(argumentsContext, State([...state['callstack'], target['$ref']], state['visited']), expression);\n        return InstantiateType(argumentsContext, State([], []), returnType);\n    }\n    finally {\n        InstantiationDecrement();\n    }\n}\nfunction CallDistributed(context, state, target, parameters, expression, distributedArguments) {\n    return distributedArguments.reduce((result, arguments_) => {\n        const returnType = CallDispatch(context, state, target, parameters, expression, arguments_);\n        return [...result, returnType];\n    }, []);\n}\nfunction CallImmediate(context, state, target, parameters, expression, arguments_) {\n    const distributedArguments = DistributeArguments(parameters, arguments_, expression);\n    const returnTypes = CallDistributed(context, state, target, parameters, expression, distributedArguments);\n    const result = Guard.IsEqual(returnTypes.length, 1) ? returnTypes[0] : EvaluateUnion(returnTypes);\n    return result;\n}\nexport function CallInstantiate(context, state, target, arguments_) {\n    const instantiatedArguments = InstantiateTypes(context, state, arguments_);\n    const resolved = ResolveTarget(context, target, arguments_);\n    const name = resolved[0];\n    const type = resolved[1];\n    const result = (IsGeneric(type)\n        ? IsTailCall(state, name)\n            ? CallConstruct(Ref(name), instantiatedArguments)\n            : CallImmediate(context, state, Ref(name), type.parameters, type.expression, instantiatedArguments)\n        : CallConstruct(target, instantiatedArguments));\n    return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../system/memory/index.mjs';\nimport { IsKind } from './schema.mjs';\nimport { CallInstantiate } from '../engine/call/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\nexport function CallConstruct(target, arguments_) {\n    return Memory.Create({ ['~kind']: 'Call' }, { type: 'call', target, arguments: arguments_ }, {});\n}\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\n/** Creates a Call type. */\nexport function Call(target, arguments_) {\n    return CallInstantiate({}, State([], []), target, arguments_);\n}\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/** Returns true if the given type is a TCall. */\nexport function IsCall(value) {\n    return IsKind(value, 'Call');\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction RemoveImmutableOperation(type) {\n    return Memory.Discard(type, ['~immutable']);\n}\nexport function RemoveImmutableAction(type, options) {\n    const result = Memory.Update(RemoveImmutableOperation(type), {}, options);\n    return result;\n}\nexport function RemoveImmutableInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return RemoveImmutableAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nexport function ApplyMapping(mapping, value) {\n    return mapping(value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal } from '../../types/literal.mjs';\nimport { ApplyMapping } from './mapping.mjs';\nexport function FromLiteral(mapping, value) {\n    return (Guard.IsString(value)\n        ? Literal(ApplyMapping(mapping, value))\n        : Literal(value));\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/index.mjs';\nexport function FromTemplateLiteral(mapping, pattern) {\n    const evaluated = EvaluateTemplateLiteral(pattern);\n    const result = FromType(mapping, evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(mapping, types) {\n    const result = types.map(type => FromType(mapping, type));\n    return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromLiteral } from './from_literal.mjs';\nimport { FromTemplateLiteral } from './from_template_literal.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(mapping, type) {\n    return (IsLiteral(type) ? FromLiteral(mapping, type.const) :\n        IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) :\n            IsUnion(type) ? FromUnion(mapping, type.anyOf) :\n                type);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { CapitalizeAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Capitalize action. */\nexport function CapitalizeDeferred(type, options = {}) {\n    return Deferred('Capitalize', [type], options);\n}\n/** Applies a Capitalize action to the given type. */\nexport function Capitalize(type, options = {}) {\n    return CapitalizeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { LowercaseAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Lowercase action. */\nexport function LowercaseDeferred(type, options = {}) {\n    return Deferred('Lowercase', [type], options);\n}\n/** Applies a Lowercase action to the given type. */\nexport function Lowercase(type, options = {}) {\n    return LowercaseAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { UncapitalizeAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Uncapitalize action. */\nexport function UncapitalizeDeferred(type, options = {}) {\n    return Deferred('Uncapitalize', [type], options);\n}\n/** Applies a Uncapitalize action to the given type. */\nexport function Uncapitalize(type, options = {}) {\n    return UncapitalizeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { UppercaseAction } from '../engine/intrinsics/instantiate.mjs';\n/** Creates a deferred Uppercase action. */\nexport function UppercaseDeferred(type, options = {}) {\n    return Deferred('Uppercase', [type], options);\n}\n/** Applies a Uppercase action to the given type. */\nexport function Uppercase(type, options = {}) {\n    return UppercaseAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { CapitalizeDeferred } from '../../action/capitalize.mjs';\nimport { LowercaseDeferred } from '../../action/lowercase.mjs';\nimport { UncapitalizeDeferred } from '../../action/uncapitalize.mjs';\nimport { UppercaseDeferred } from '../../action/uppercase.mjs';\nconst CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1);\nconst LowercaseMapping = (input) => input.toLowerCase();\nconst UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1);\nconst UppercaseMapping = (input) => input.toUpperCase();\nexport function CapitalizeAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(FromType(CapitalizeMapping, type), {}, options)\n        : CapitalizeDeferred(type, options);\n    return result;\n}\nexport function LowercaseAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(FromType(LowercaseMapping, type), {}, options)\n        : LowercaseDeferred(type, options);\n    return result;\n}\nexport function UncapitalizeAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(FromType(UncapitalizeMapping, type), {}, options)\n        : UncapitalizeDeferred(type, options);\n    return result;\n}\nexport function UppercaseAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(FromType(UppercaseMapping, type), {}, options)\n        : UppercaseDeferred(type, options);\n    return result;\n}\nexport function CapitalizeInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return CapitalizeAction(instantiatedType, options);\n}\nexport function LowercaseInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return LowercaseAction(instantiatedType, options);\n}\nexport function UncapitalizeInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return UncapitalizeAction(instantiatedType, options);\n}\nexport function UppercaseInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return UppercaseAction(instantiatedType, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ConditionalAction } from '../engine/conditional/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\n/** Creates a deferred Conditional action. */\nexport function ConditionalDeferred(left, right, true_, false_, options = {}) {\n    return Deferred('Conditional', [left, right, true_, false_], options);\n}\n/** Applies a Conditional action to the given types. */\nexport function Conditional(left, right, true_, false_, options = {}) {\n    return ConditionalAction({}, State([], []), left, right, true_, false_, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Union } from '../../types/union.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { ConditionalDeferred } from '../../action/conditional.mjs';\nfunction ConditionalOperation(context, state, left, right, true_, false_) {\n    const extendsResult = Extends(context, left, right);\n    return (ExtendsResult.IsExtendsUnion(extendsResult) ? Union([InstantiateType(extendsResult.inferred, state, true_), InstantiateType(context, state, false_)]) :\n        ExtendsResult.IsExtendsTrue(extendsResult) ? InstantiateType(extendsResult.inferred, state, true_) :\n            InstantiateType(context, state, false_));\n}\nexport function ConditionalAction(context, state, left, right, true_, false_, options) {\n    const result = CanInstantiate([left, right])\n        ? Memory.Update(ConditionalOperation(context, state, left, right, true_, false_), {}, options)\n        : ConditionalDeferred(left, right, true_, false_, options);\n    return result;\n}\nexport function ConditionalInstantiate(context, state, left, right, true_, false_, options) {\n    const instantiatedLeft = InstantiateType(context, state, left);\n    const instantiatedRight = InstantiateType(context, state, right);\n    return ConditionalAction(context, state, instantiatedLeft, instantiatedRight, true_, false_, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ConstructorParametersAction } from '../engine/constructor_parameters/instantiate.mjs';\n/** Creates a deferred ConstructorParameters action. */\nexport function ConstructorParametersDeferred(type, options = {}) {\n    return Deferred('ConstructorParameters', [type], options);\n}\n/** Applies a ConstructorParameters action to a type. */\nexport function ConstructorParameters(type, options = {}) {\n    return ConstructorParametersAction(type, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { Tuple } from '../../types/tuple.mjs';\nimport { ConstructorParametersDeferred } from '../../action/constructor_parameters.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { InstantiateElements } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nfunction ConstructorParametersOperation(type) {\n    const parameters = IsConstructor(type) ? type['parameters'] : [];\n    const instantiatedParameters = InstantiateElements({}, State([], []), parameters);\n    const result = Tuple(instantiatedParameters);\n    return result;\n}\nexport function ConstructorParametersAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(ConstructorParametersOperation(type), {}, options)\n        : ConstructorParametersDeferred(type, options);\n    return result;\n}\nexport function ConstructorParametersInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return ConstructorParametersAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ExcludeAction } from '../engine/exclude/instantiate.mjs';\n/** Creates a deferred Exclude action. */\nexport function ExcludeDeferred(left, right, options = {}) {\n    return Deferred('Exclude', [left, right], options);\n}\n/** Applies a Exclude action using the given types */\nexport function Exclude(left, right, options = {}) {\n    return ExcludeAction(left, right, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { ExcludeDeferred } from '../../action/exclude.mjs';\nimport { ExcludeOperation } from './operation.mjs';\nexport function ExcludeAction(left, right, options) {\n    const result = CanInstantiate([left, right])\n        ? Memory.Update(ExcludeOperation(left, right), {}, options)\n        : ExcludeDeferred(left, right, options);\n    return result;\n}\nexport function ExcludeInstantiate(context, state, left, right, options) {\n    const instantiatedLeft = InstantiateType(context, state, left);\n    const instantiatedRight = InstantiateType(context, state, right);\n    return ExcludeAction(instantiatedLeft, instantiatedRight, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ExtractAction } from '../engine/extract/instantiate.mjs';\n/** Creates a deferred Extract action. */\nexport function ExtractDeferred(left, right, options = {}) {\n    return Deferred('Extract', [left, right], options);\n}\n/** Applies an Extract action using the given types. */\nexport function Extract(left, right, options = {}) {\n    return ExtractAction(left, right, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { EvaluateType } from '../evaluate/evaluate.mjs';\nimport { EvaluateUnion } from '../evaluate/evaluate.mjs';\nfunction ExtractType(left, right) {\n    const check = Extends({}, left, right);\n    const result = ExtendsResult.IsExtendsTrueLike(check) ? [left] : [];\n    return result;\n}\nfunction ExtractUnion(left, right, result = []) {\n    return Guard.ShiftLeft(left, (head, tail) => ExtractUnion(tail, right, [...result, ...ExtractType(head, right)]), () => result);\n}\nexport function ExtractOperation(left, right) {\n    const evaluated = EvaluateType(left);\n    const canonical = IsUnion(evaluated) ? evaluated.anyOf : [evaluated];\n    const remaining = ExtractUnion(canonical, right);\n    const result = EvaluateUnion(remaining);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { ExtractDeferred } from '../../action/extract.mjs';\nimport { ExtractOperation } from './operation.mjs';\nexport function ExtractAction(left, right, options) {\n    const result = CanInstantiate([left, right])\n        ? Memory.Update(ExtractOperation(left, right), {}, options)\n        : ExtractDeferred(left, right, options);\n    return result;\n}\nexport function ExtractInstantiate(context, state, left, right, options) {\n    const instantiatedLeft = InstantiateType(context, state, left);\n    const instantiatedRight = InstantiateType(context, state, right);\n    return ExtractAction(instantiatedLeft, instantiatedRight, options);\n}\n","// deno-fmt-ignore-file\nimport { Literal, IsLiteralValue } from '../../types/literal.mjs';\nimport { Union } from '../../types/union.mjs';\nfunction KeysToLiterals(keys) {\n    return keys.reduce((result, left) => {\n        return IsLiteralValue(left)\n            ? [...result, Literal(left)]\n            : result;\n    }, []);\n}\nexport function KeysToIndexer(keys) {\n    const literals = KeysToLiterals(keys);\n    const result = Union(literals);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeysToIndexer } from '../engine/helpers/keys_to_indexer.mjs';\nimport { IndexAction } from '../engine/indexed/instantiate.mjs';\n/** Creates a deferred Index action. */\nexport function IndexDeferred(type, indexer, options = {}) {\n    return Deferred('Index', [type, indexer], options);\n}\n/** Applies a Index action using the given types. */\nexport function Index(type, indexer_or_keys, options = {}) {\n    const indexer = Guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;\n    return IndexAction(type, indexer, options);\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n    const target = CyclicTarget(defs, ref);\n    const result = FromType(target);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n    const evaluated = EvaluateDependent(if_, then_, else_);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { EvaluatePropertyIntersect } from '../evaluate/property.mjs';\nfunction CollapseIntersectProperties(left, right) {\n    const leftKeys = Guard.Keys(left).filter((key) => !Guard.HasPropertyKey(right, key));\n    const rightKeys = Guard.Keys(right).filter((key) => !Guard.HasPropertyKey(left, key));\n    const sharedKeys = Guard.Keys(left).filter((key) => Guard.HasPropertyKey(right, key));\n    const leftProperties = leftKeys.reduce((result, key) => ({ ...result, [key]: left[key] }), {});\n    const rightProperties = rightKeys.reduce((result, key) => ({ ...result, [key]: right[key] }), {});\n    const sharedProperties = sharedKeys.reduce((result, key) => ({ ...result, [key]: EvaluatePropertyIntersect(left[key], right[key]) }), {});\n    const unique = Memory.Assign(leftProperties, rightProperties);\n    const shared = Memory.Assign(unique, sharedProperties);\n    return shared;\n}\nexport function FromIntersect(types) {\n    return types.reduce((result, left) => {\n        return CollapseIntersectProperties(result, FromType(left));\n    }, {});\n}\n","// deno-fmt-ignore-file\nexport function FromObject(properties) {\n    return properties;\n}\n","// deno-fmt-ignore-file\nimport { Tuple } from '../../types/tuple.mjs';\nimport { TupleToObject } from '../tuple/to_object.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(types) {\n    const object = TupleToObject(Tuple(types));\n    const result = FromType(object);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { EvaluatePropertyUnion } from '../evaluate/property.mjs';\nimport { FromType } from './from_type.mjs';\nfunction CollapseUnionProperties(left, right) {\n    const sharedKeys = Guard.Keys(left).filter((key) => key in right);\n    const result = sharedKeys.reduce((result, key) => {\n        return { ...result, [key]: EvaluatePropertyUnion(left[key], right[key]) };\n    }, {});\n    return result;\n}\nfunction ReduceVariants(types, result) {\n    return Guard.ShiftLeft(types, (left, right) => ReduceVariants(right, CollapseUnionProperties(result, FromType(left))), () => result);\n}\nexport function FromUnion(types) {\n    return Guard.ShiftLeft(types, (left, right) => ReduceVariants(right, FromType(left)), () => Unreachable());\n}\n// deno-coverage-ignore-stop\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(type) {\n    return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n        IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n            IsIntersect(type) ? FromIntersect(type.allOf) :\n                IsUnion(type) ? FromUnion(type.anyOf) :\n                    IsTuple(type) ? FromTuple(type.items) :\n                        IsObject(type) ? FromObject(type.properties) :\n                            {});\n}\n","// deno-fmt-ignore-file\nimport { Object } from '../../types/object.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Collapses a type into a TObject schema. This is a lossy fast path used to\n * normalize arbitrary TSchema types into a TObject structure. This function is\n * primarily used in indexing operations where a normalized object structure\n * is required. If the type cannot be collapsed, an empty object schema is returned.\n */\nexport function CollapseToObject(type) {\n    const properties = FromType(type);\n    const result = Object(properties);\n    return result;\n}\n","// deno-fmt-ignore-file\nconst integerKeyPattern = new RegExp('^(?:0|[1-9][0-9]*)$');\nexport function ConvertToIntegerKey(value) {\n    const normal = `${value}`;\n    return (integerKeyPattern.test(normal)\n        ? parseInt(normal)\n        : value);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Intersect, IsIntersect } from '../../types/intersect.mjs';\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { Number } from '../../types/number.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { ConvertToIntegerKey } from '../helpers/keys.mjs';\nfunction NormalizeLiteral(value) {\n    return Literal(ConvertToIntegerKey(value));\n}\nfunction NormalizeIndexerTypes(types) {\n    return types.map(type => NormalizeIndexer(type));\n}\nexport function NormalizeIndexer(type) {\n    return (IsIntersect(type) ? Intersect(NormalizeIndexerTypes(type.allOf)) :\n        IsUnion(type) ? Union(NormalizeIndexerTypes(type.anyOf)) :\n            IsLiteral(type) ? NormalizeLiteral(type.const) :\n                type);\n}\nexport function FromArray(type, indexer) {\n    const normalizedIndexer = NormalizeIndexer(indexer);\n    const check = Extends({}, normalizedIndexer, Number());\n    const result = (\n    // indexer\n    ExtendsResult.IsExtendsTrueLike(check)\n        ? type\n        // length (intrinsic)\n        : IsLiteral(indexer) && Guard.IsEqual(indexer.const, 'length')\n            ? Number()\n            : Never());\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n    const target = CyclicTarget(defs, ref);\n    const result = FromType(target);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n    const evaluated = EvaluateDependent(if_, then_, else_);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nexport function FromEnum(values) {\n    const evaluated = EvaluateEnum(values);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromIntersect(types) {\n    const evaluated = EvaluateIntersect(types);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nexport function FromLiteral(value) {\n    const result = [`${value}`];\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nexport function FromTemplateLiteral(pattern) {\n    const evaluated = EvaluateTemplateLiteral(pattern);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n    return types.reduce((result, left) => {\n        return [...result, ...FromType(left)];\n    }, []);\n}\n","// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsLiteral } from '../../types/literal.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromEnum } from './from_enum.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromLiteral } from './from_literal.mjs';\nimport { FromTemplateLiteral } from './from_template_literal.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(type) {\n    return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n        IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n            IsEnum(type) ? FromEnum(type.enum) :\n                IsIntersect(type) ? FromIntersect(type.allOf) :\n                    IsLiteral(type) ? FromLiteral(type.const) :\n                        IsTemplateLiteral(type) ? FromTemplateLiteral(type.pattern) :\n                            IsUnion(type) ? FromUnion(type.anyOf) :\n                                []);\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\n/**\n * Transforms a type meant as an Indexer into string[] array which is used by Indexable types\n * like Index, Pick and Omit to select from property keys. This function should only be used\n * for Object key selection, and not for Array / Tuple key selection as Array-Like structures\n * require TNumber indexing support.\n */\nexport function ToIndexableKeys(type) {\n    const result = FromType(type);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { IsArray, _Array_ } from '../../types/array.mjs';\nimport { IsConstructor, Constructor } from '../../types/constructor.mjs';\nimport { IsFunction, _Function_ } from '../../types/function.mjs';\nimport { IsIntersect, Intersect } from '../../types/intersect.mjs';\nimport { _Object_ } from '../../types/object.mjs';\nimport { IsTuple, Tuple } from '../../types/tuple.mjs';\nimport { IsThis } from '../../types/this.mjs';\nimport { IsUnion, Union } from '../../types/union.mjs';\nfunction FromTypes(properties, types) {\n    return types.map(type => FromType(properties, type));\n}\nexport function FromType(properties, type) {\n    return (IsArray(type) ? _Array_(FromType(properties, type.items)) :\n        IsConstructor(type) ? Constructor(FromTypes(properties, type.parameters), FromType(properties, type.instanceType)) :\n            IsFunction(type) ? _Function_(FromTypes(properties, type.parameters), FromType(properties, type.returnType)) :\n                IsTuple(type) ? Tuple(FromTypes(properties, type.items)) :\n                    IsUnion(type) ? Union(FromTypes(properties, type.anyOf)) :\n                        IsIntersect(type) ? Intersect(FromTypes(properties, type.allOf)) :\n                            IsThis(type) ? _Object_(properties) :\n                                type);\n}\nexport function ExpandThis(properties, type) {\n    const result = FromType(properties, type);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { IsNumber } from '../../types/number.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { PropertyKeys } from '../../types/properties.mjs';\nimport { EvaluateUnion } from '../evaluate/evaluate.mjs';\nimport { ToIndexableKeys } from '../indexable/to_indexable_keys.mjs';\nimport { IntegerKey } from '../../types/record.mjs';\nimport { ExpandThis } from '../this/expand_this.mjs';\nfunction IndexProperty(properties, key) {\n    const selectedType = key in properties ? properties[key] : Never();\n    const result = ExpandThis(properties, selectedType);\n    return result;\n}\nfunction IndexProperties(properties, keys) {\n    return keys.reduce((result, left) => {\n        return [...result, IndexProperty(properties, left)];\n    }, []);\n}\nfunction FromIndexer(properties, indexer) {\n    const keys = ToIndexableKeys(indexer);\n    const variants = IndexProperties(properties, keys);\n    const result = EvaluateUnion(variants);\n    return result;\n}\nconst NumericKeyPattern = new RegExp(IntegerKey);\nfunction NumericKeys(keys) {\n    const result = keys.filter(key => NumericKeyPattern.test(key));\n    return result;\n}\nfunction FromIndexerNumber(properties) {\n    const keys = PropertyKeys(properties);\n    const numericKeys = NumericKeys(keys);\n    const variants = IndexProperties(properties, numericKeys);\n    const result = EvaluateUnion(variants);\n    return result;\n}\nexport function FromObject(properties, indexer) {\n    const result = IsNumber(indexer) ? FromIndexerNumber(properties) : FromIndexer(properties, indexer);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Union, IsUnion } from '../../types/union.mjs';\nimport { Intersect, IsIntersect } from '../../types/intersect.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { ConvertToIntegerKey } from '../helpers/keys.mjs';\nfunction ConvertLiteral(value) {\n    return Literal(ConvertToIntegerKey(value));\n}\nfunction ArrayIndexerTypes(types) {\n    return types.map(type => FormatArrayIndexer(type));\n}\n/** Formats embedded integer-like strings on an Indexer to be number values inline with TS indexing | coercion behaviors. */\nexport function FormatArrayIndexer(type) {\n    return (IsIntersect(type) ? Intersect(ArrayIndexerTypes(type.allOf)) :\n        IsUnion(type) ? Union(ArrayIndexerTypes(type.anyOf)) :\n            IsLiteral(type) ? ConvertLiteral(type.const) :\n                type);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { IsNumber } from '../../types/number.mjs';\nimport { IsInteger } from '../../types/integer.mjs';\nimport { EvaluateUnionFast } from '../evaluate/evaluate.mjs';\nimport { Extends, ExtendsResult } from '../../extends/index.mjs';\nimport { FormatArrayIndexer } from './array_indexer.mjs';\nfunction IndexElementsWithIndexer(types, indexer) {\n    return types.reduceRight((result, right, index) => {\n        const check = Extends({}, Literal(index), indexer);\n        return ExtendsResult.IsExtendsTrueLike(check)\n            ? [right, ...result]\n            : result;\n    }, []);\n}\nfunction FromTupleWithIndexer(types, indexer) {\n    const formattedArrayIndexer = FormatArrayIndexer(indexer);\n    const elements = IndexElementsWithIndexer(types, formattedArrayIndexer);\n    return EvaluateUnionFast(elements);\n}\nfunction FromTupleWithoutIndexer(types) {\n    return EvaluateUnionFast(types);\n}\nexport function FromTuple(types, indexer) {\n    return (\n    // length (intrinsic)\n    IsLiteral(indexer) && Guard.IsEqual(indexer.const, 'length')\n        ? Literal(types.length)\n        // indexer\n        : IsNumber(indexer) || IsInteger(indexer)\n            ? FromTupleWithoutIndexer(types)\n            : FromTupleWithIndexer(types, indexer));\n}\n","// deno-fmt-ignore-file\nimport { IsArray } from '../../types/array.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nexport function FromType(type, indexer) {\n    return (IsArray(type) ? FromArray(type.items, indexer) :\n        IsObject(type) ? FromObject(type.properties, indexer) :\n            IsTuple(type) ? FromTuple(type.items, indexer) :\n                Never());\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { IndexDeferred } from '../../action/indexed.mjs';\nimport { CollapseToObject } from '../object/index.mjs';\nimport { FromType } from './from_type.mjs';\nfunction NormalizeType(type) {\n    const result = (IsCyclic(type) ||\n        IsDependent(type) ||\n        IsIntersect(type) ||\n        IsUnion(type)) ? CollapseToObject(type) : type;\n    return result;\n}\nexport function IndexAction(type, indexer, options) {\n    const result = CanInstantiate([type, indexer])\n        ? Memory.Update(FromType(NormalizeType(type), indexer), {}, options)\n        : IndexDeferred(type, indexer, options);\n    return result;\n}\nexport function IndexInstantiate(context, state, type, indexer, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    const instantiatedIndexer = InstantiateType(context, state, indexer);\n    return IndexAction(instantiatedType, instantiatedIndexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { InstanceTypeAction } from '../engine/instance_type/instantiate.mjs';\n/** Creates a deferred InstanceType action. */\nexport function InstanceTypeDeferred(type, options = {}) {\n    return Deferred('InstanceType', [type], options);\n}\n/** Applies a InstanceType action to the given type. */\nexport function InstanceType(type, options = {}) {\n    return InstanceTypeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsConstructor } from '../../types/constructor.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { InstanceTypeDeferred } from '../../action/instance_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nfunction InstanceTypeOperation(type) {\n    return (IsConstructor(type)\n        ? type['instanceType']\n        : Never());\n}\nexport function InstanceTypeAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(InstanceTypeOperation(type), {}, options)\n        : InstanceTypeDeferred(type, options);\n    return result;\n}\nexport function InstanceTypeInstantiate(context, state, type, options = {}) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return InstanceTypeAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeyOfAction } from '../engine/keyof/instantiate.mjs';\n/** Creates a deferred KeyOf action. */\nexport function KeyOfDeferred(type, options = {}) {\n    return Deferred('KeyOf', [type], options);\n}\n/** Applies a KeyOf action to the given type. */\nexport function KeyOf(type, options = {}) {\n    return KeyOfAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Number } from '../../types/number.mjs';\nimport { String } from '../../types/string.mjs';\nimport { Symbol } from '../../types/symbol.mjs';\nimport { Union } from '../../types/union.mjs';\nexport function FromAny() {\n    return Union([Number(), String(), Symbol()]);\n}\n","// deno-fmt-ignore-file\nimport { Number } from '../../types/number.mjs';\nexport function FromArray(_type) {\n    return Number();\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal, IsLiteralValue } from '../../types/literal.mjs';\nimport { ConvertToIntegerKey } from '../helpers/keys.mjs';\nimport { EvaluateUnionFast } from '../evaluate/evaluate.mjs';\nfunction FromPropertyKeys(keys) {\n    const result = keys.reduce((result, left) => {\n        return IsLiteralValue(left)\n            ? [...result, Literal(ConvertToIntegerKey(left))]\n            : Unreachable();\n    }, []);\n    return result;\n}\nexport function FromObject(properties) {\n    const propertyKeys = Guard.Keys(properties);\n    const variants = FromPropertyKeys(propertyKeys);\n    const result = EvaluateUnionFast(variants);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { RecordKey } from '../../types/record.mjs';\nexport function FromRecord(type) {\n    return RecordKey(type);\n}\n","// deno-fmt-ignore-file\nimport { Literal } from '../../types/literal.mjs';\nimport { EvaluateUnionFast } from '../evaluate/evaluate.mjs';\nexport function FromTuple(types) {\n    const result = types.map((_, index) => Literal(index));\n    return EvaluateUnionFast(result);\n}\n","// deno-fmt-ignore-file\nimport { IsAny } from '../../types/any.mjs';\nimport { IsArray } from '../../types/array.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsRecord } from '../../types/record.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\n// ------------------------------------------------------------------\n// Computed\n// ------------------------------------------------------------------\nimport { FromAny } from './from_any.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nexport function FromType(type) {\n    return (IsAny(type) ? FromAny() :\n        IsArray(type) ? FromArray(type.items) :\n            IsObject(type) ? FromObject(type.properties) :\n                IsRecord(type) ? FromRecord(type) :\n                    IsTuple(type) ? FromTuple(type.items) :\n                        Never());\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { KeyOfDeferred } from '../../action/keyof.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { CollapseToObject } from '../object/index.mjs';\n// ------------------------------------------------------------------\n// Computed\n// ------------------------------------------------------------------\nimport { FromType } from './from_type.mjs';\nfunction NormalizeType(type) {\n    const result = (IsCyclic(type) ||\n        IsDependent(type) ||\n        IsIntersect(type) ||\n        IsUnion(type)) ? CollapseToObject(type) : type;\n    return result;\n}\nexport function KeyOfAction(type, options) {\n    return (CanInstantiate([type])\n        ? Memory.Update(FromType(NormalizeType(type)), {}, options)\n        : KeyOfDeferred(type, options));\n}\nexport function KeyOfInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return KeyOfAction(instantiatedType, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { MappedAction } from '../engine/mapped/instantiate.mjs';\nimport { State } from '../engine/instantiate.mjs';\n/** Creates a deferred Mapped action. */\nexport function MappedDeferred(identifier, type, as, property, options = {}) {\n    return Deferred('Mapped', [identifier, type, as, property], options);\n}\n/** Applies a Mapped action using the given types. */\nexport function Mapped(identifier, type, as, property, options = {}) {\n    return MappedAction({}, State([], []), identifier, type, as, property, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Literal, IsLiteral } from '../../types/literal.mjs';\nimport { IsEnum } from '../../types/enum.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { EvaluateEnum } from '../evaluate/evaluate.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nfunction FromTemplateLiteral(pattern) {\n    const evaluated = EvaluateTemplateLiteral(pattern);\n    const result = FromType(evaluated);\n    return result;\n}\nfunction FromUnion(types) {\n    return types.reduce((result, left) => {\n        return [...result, ...FromType(left)];\n    }, []);\n}\nfunction FromEnum(values) {\n    const evaluated = EvaluateEnum(values);\n    const result = FromType(evaluated);\n    return result;\n}\nfunction FromLiteral(value) {\n    const result = Guard.IsNumber(value) ? [Literal(`${value}`)] : [Literal(value)];\n    return result;\n}\nfunction FromType(type) {\n    const result = (IsEnum(type) ? FromEnum(type.enum) :\n        IsLiteral(type) ? FromLiteral(type.const) :\n            IsTemplateLiteral(type) ? FromTemplateLiteral(type.pattern) :\n                IsUnion(type) ? FromUnion(type.anyOf) :\n                    [type]);\n    return result;\n}\nexport function MappedVariants(type) {\n    const result = FromType(type);\n    return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsLiteralNumber, IsLiteralString } from '../../types/literal.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { IsTemplateLiteral } from '../../types/template_literal.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nimport { EvaluateTemplateLiteral } from '../evaluate/evaluate.mjs';\nimport { MappedVariants } from './mapped_variants.mjs';\nfunction CanonicalAs(instantiatedAs) {\n    const result = IsTemplateLiteral(instantiatedAs)\n        ? EvaluateTemplateLiteral(instantiatedAs.pattern)\n        : instantiatedAs;\n    return result;\n}\nfunction MappedVariant(context, state, identifier, variant, as, property) {\n    const variantContext = Memory.Assign(context, { [identifier['name']]: variant });\n    const instantiatedAs = InstantiateType(variantContext, state, as);\n    const canonicalAs = CanonicalAs(instantiatedAs);\n    const instantiatedProperty = InstantiateType(variantContext, state, property);\n    return (IsLiteralNumber(canonicalAs) || IsLiteralString(canonicalAs)\n        ? { [canonicalAs.const]: instantiatedProperty }\n        : {});\n}\nfunction MappedProperties(context, state, identifier, variants, as, property) {\n    return variants.reduce((result, left) => {\n        return [...result, MappedVariant(context, state, identifier, left, as, property)];\n    }, []);\n}\nfunction MappedObjects(properties) {\n    return properties.reduce((result, left) => {\n        return [...result, Object(left)];\n    }, []);\n}\nexport function MappedOperation(context, state, identifier, type, as, property) {\n    const variants = MappedVariants(type);\n    const mappedProperties = MappedProperties(context, state, identifier, variants, as, property);\n    const mappedObjects = MappedObjects(mappedProperties);\n    const result = EvaluateIntersect(mappedObjects);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { MappedDeferred } from '../../action/mapped.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { MappedOperation } from './mapped_operation.mjs';\nexport function MappedAction(context, state, identifier, type, as, property, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(MappedOperation(context, state, identifier, type, as, property), {}, options)\n        : MappedDeferred(identifier, type, as, property, options);\n    return result;\n}\nexport function MappedInstantiate(context, state, identifier, type, as, property, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return MappedAction(context, state, identifier, instantiatedType, as, property, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { State } from '../instantiate.mjs';\n// ------------------------------------------------------------------\n// Module: Instantiation Infrastructure\n// ------------------------------------------------------------------\nimport { CyclicCandidates } from '../cyclic/candidates.mjs';\nimport { InstantiateCyclic } from '../cyclic/instantiate.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nfunction InstantiateCyclics(context, declarations, cyclicKeys) {\n    const declarationContext = Memory.Assign(context, declarations);\n    const declarationKeys = Guard.Keys(declarations).filter(key => cyclicKeys.includes(key));\n    return declarationKeys.reduce((result, key) => {\n        return { ...result, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };\n    }, {});\n}\nfunction InstantiateNonCyclics(context, declarations, cyclicKeys) {\n    const declarationContext = Memory.Assign(context, declarations);\n    const declarationKeys = Guard.Keys(declarations).filter(key => !cyclicKeys.includes(key));\n    return declarationKeys.reduce((result, key) => {\n        return { ...result, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };\n    }, {});\n}\nfunction InstantiateModule(context, declarations, options) {\n    const cyclicCandidates = CyclicCandidates(declarations);\n    const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);\n    const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);\n    const instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };\n    return Memory.Update(instantiatedModule, {}, options);\n}\nexport function ModuleInstantiate(context, _state, declarations, options) {\n    const instantiatedModule = InstantiateModule(context, declarations, options);\n    return instantiatedModule;\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { NonNullableAction } from '../engine/non_nullable/instantiate.mjs';\n/** Creates a deferred NonNullable action. */\nexport function NonNullableDeferred(type, options = {}) {\n    return Deferred('NonNullable', [type], options);\n}\n/** Applies a NonNullable action to the given type. */\nexport function NonNullable(type, options = {}) {\n    return NonNullableAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Null } from '../../types/null.mjs';\nimport { Undefined } from '../../types/undefined.mjs';\nimport { Union } from '../../types/union.mjs';\nimport { ExcludeAction } from '../exclude/instantiate.mjs';\nimport { NonNullableDeferred } from '../../action/non_nullable.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nfunction NonNullableOperation(type) {\n    const excluded = Union([Null(), Undefined()]);\n    return ExcludeAction(type, excluded, {});\n}\nexport function NonNullableAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(NonNullableOperation(type), {}, options)\n        : NonNullableDeferred(type, options);\n    return result;\n}\nexport function NonNullableInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return NonNullableAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeysToIndexer } from '../engine/helpers/keys_to_indexer.mjs';\nimport { OmitAction } from '../engine/omit/instantiate.mjs';\n/** Creates a deferred Omit action. */\nexport function OmitDeferred(type, indexer, options = {}) {\n    return Deferred('Omit', [type, indexer], options);\n}\n/** Applies a Omit action using the given types. */\nexport function Omit(type, indexer_or_keys, options = {}) {\n    const indexer = Guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;\n    return OmitAction(type, indexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../../system/unreachable/index.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { CollapseToObject } from '../object/index.mjs';\n// deno-coverage-ignore-start - symmetric unreachable\n/** Transforms a type into a TProperties used for indexing operations */\nexport function ToIndexable(type) {\n    const collapsed = CollapseToObject(type);\n    const result = IsObject(collapsed)\n        ? collapsed.properties\n        : Unreachable();\n    return result;\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { ToIndexableKeys } from '../indexable/to_indexable_keys.mjs';\nimport { ToIndexable } from '../indexable/to_indexable.mjs';\nfunction FromKeys(properties, keys) {\n    const result = Guard.Keys(properties).reduce((result, key) => {\n        return keys.includes(key) ? result : { ...result, [key]: properties[key] };\n    }, {});\n    return result;\n}\nexport function FromType(type, indexer) {\n    const indexable = ToIndexable(type);\n    const indexableKeys = ToIndexableKeys(indexer);\n    const omitted = FromKeys(indexable, indexableKeys);\n    const result = Object(omitted);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { OmitDeferred } from '../../action/omit.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { FromType } from './from_type.mjs';\nexport function OmitAction(type, indexer, options) {\n    const result = CanInstantiate([type, indexer])\n        ? Memory.Update(FromType(type, indexer), {}, options)\n        : OmitDeferred(type, indexer, options);\n    return result;\n}\nexport function OmitInstantiate(context, state, type, indexer, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    const instantiatedIndexer = InstantiateType(context, state, indexer);\n    return OmitAction(instantiatedType, instantiatedIndexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ParametersAction } from '../engine/parameters/instantiate.mjs';\n/** Creates a deferred Parameters action. */\nexport function ParametersDeferred(type, options = {}) {\n    return Deferred('Parameters', [type], options);\n}\n/** Applies a Parameters action to the given type. */\nexport function Parameters(type, options = {}) {\n    return ParametersAction(type, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { Tuple } from '../../types/tuple.mjs';\nimport { ParametersDeferred } from '../../action/parameters.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { InstantiateElements } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nfunction ParametersOperation(type) {\n    const parameters = IsFunction(type) ? type['parameters'] : [];\n    const instantiatedParameters = InstantiateElements({}, State([], []), parameters);\n    const result = Tuple(instantiatedParameters);\n    return result;\n}\nexport function ParametersAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(ParametersOperation(type), {}, options)\n        : ParametersDeferred(type, options);\n    return result;\n}\nexport function ParametersInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return ParametersAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { PartialAction } from '../engine/partial/instantiate.mjs';\n/** Creates a deferred Partial action. */\nexport function PartialDeferred(type, options = {}) {\n    return Deferred('Partial', [type], options);\n}\n/** Applies a Partial action to the given type. */\nexport function Partial(type, options = {}) {\n    return PartialAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n    const target = CyclicTarget(defs, ref);\n    const partial = FromType(target);\n    const result = Cyclic(Memory.Assign(defs, { [ref]: partial }), ref);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n    const evaluated = EvaluateDependent(if_, then_, else_);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nexport function FromIntersect(types) {\n    const evaluated = EvaluateIntersect(types);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n    const result = types.map(type => FromType(type));\n    return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { AddOptional } from '../../action/_add_optional.mjs';\nexport function FromObject(properties) {\n    const mapped = Guard.Keys(properties).reduce((result, left) => {\n        return { ...result, [left]: AddOptional(properties[left]) };\n    }, {});\n    const result = Object(mapped);\n    return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { FromObject } from './from_object.mjs';\nexport function FromType(type) {\n    return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n        IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n            IsIntersect(type) ? FromIntersect(type.allOf) :\n                IsUnion(type) ? FromUnion(type.anyOf) :\n                    IsObject(type) ? FromObject(type.properties) :\n                        Object({}));\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { PartialDeferred } from '../../action/partial.mjs';\nimport { FromType } from './from_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function PartialAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(FromType(type), {}, options)\n        : PartialDeferred(type, options);\n    return result;\n}\nexport function PartialInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return PartialAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Deferred } from '../types/deferred.mjs';\nimport { KeysToIndexer } from '../engine/helpers/keys_to_indexer.mjs';\nimport { PickAction } from '../engine/pick/instantiate.mjs';\n/** Creates a deferred Pick action. */\nexport function PickDeferred(type, indexer, options = {}) {\n    return Deferred('Pick', [type, indexer], options);\n}\n/** Applies a Pick action using the given types. */\nexport function Pick(type, indexer_or_keys, options = {}) {\n    const indexer = Guard.IsArray(indexer_or_keys) ? KeysToIndexer(indexer_or_keys) : indexer_or_keys;\n    return PickAction(type, indexer, options);\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { ToIndexableKeys } from '../indexable/to_indexable_keys.mjs';\nimport { ToIndexable } from '../indexable/to_indexable.mjs';\nfunction FromKeys(properties, keys) {\n    const result = Guard.Keys(properties).reduce((result, key) => {\n        return keys.includes(key) ? Memory.Assign(result, { [key]: properties[key] }) : result;\n    }, {});\n    return result;\n}\nexport function FromType(type, indexer) {\n    const indexable = ToIndexable(type);\n    const keys = ToIndexableKeys(indexer);\n    const applied = FromKeys(indexable, keys);\n    const result = Object(applied);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { PickDeferred } from '../../action/pick.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { FromType } from './from_type.mjs';\nexport function PickAction(type, indexer, options) {\n    const result = CanInstantiate([type, indexer])\n        ? Memory.Update(FromType(type, indexer), {}, options)\n        : PickDeferred(type, indexer, options);\n    return result;\n}\nexport function PickInstantiate(context, state, type, indexer, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    const instantiatedIndexer = InstantiateType(context, state, indexer);\n    return PickAction(instantiatedType, instantiatedIndexer, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ReadonlyObjectAction } from '../engine/readonly_object/instantiate.mjs';\n/** Creates a deferred ReadonlyType action. */\nexport function ReadonlyObjectDeferred(type, options = {}) {\n    return Deferred('ReadonlyObject', [type], options);\n}\n/** This type is an alias for TypeScript's `Readonly<T>` utility type. It will make all properties of a TObject readonly or marks an TArray or TTuple as immutable `readonly T[]`. */\nexport function ReadonlyObject(type, options = {}) {\n    return ReadonlyObjectAction(type, options);\n}\n// ------------------------------------------------------------------\n// Alias\n// ------------------------------------------------------------------\n/**\n * This type has been renamed to ReadonlyObject.\n * @deprecated\n*/\nexport const ReadonlyType = ReadonlyObject;\n","// deno-fmt-ignore-file\nimport { Array } from '../../types/array.mjs';\nimport { AddImmutable } from '../../action/_add_immutable.mjs';\nexport function FromArray(type) {\n    const result = AddImmutable(Array(type));\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n    const target = CyclicTarget(defs, ref);\n    const partial = FromType(target);\n    const result = Cyclic(Memory.Assign(defs, { [ref]: partial }), ref);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n    const evaluated = EvaluateDependent(if_, then_, else_);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nexport function FromIntersect(types) {\n    const evaluated = EvaluateIntersect(types);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { AddReadonly } from '../../action/_add_readonly.mjs';\nexport function FromObject(properties) {\n    const mapped = Guard.Keys(properties).reduce((result, left) => {\n        return { ...result, [left]: AddReadonly(properties[left]) };\n    }, {});\n    const result = Object(mapped);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Tuple } from '../../types/tuple.mjs';\nimport { AddImmutable } from '../../action/_add_immutable.mjs';\nexport function FromTuple(types) {\n    const result = AddImmutable(Tuple(types));\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n    const result = types.map(type => FromType(type));\n    return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { IsArray } from '../../types/array.mjs';\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { IsObject } from '../../types/object.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(type) {\n    return (IsArray(type) ? FromArray(type.items) :\n        IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n            IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n                IsIntersect(type) ? FromIntersect(type.allOf) :\n                    IsObject(type) ? FromObject(type.properties) :\n                        IsTuple(type) ? FromTuple(type.items) :\n                            IsUnion(type) ? FromUnion(type.anyOf) :\n                                type);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { ReadonlyObjectDeferred } from '../../action/readonly_object.mjs';\nimport { FromType } from './from_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function ReadonlyObjectAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(FromType(type), {}, options)\n        : ReadonlyObjectDeferred(type);\n    return result;\n}\nexport function ReadonlyObjectInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return ReadonlyObjectAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { InstantiateType } from '../instantiate.mjs';\nimport { State } from '../instantiate.mjs';\nexport function RefInstantiate(context, state, type, ref) {\n    return (state.visited.includes(ref)\n        ? type\n        : ref in context\n            ? InstantiateType(context, State(state['callstack'], [...state['visited'], ref]), context[ref])\n            : type);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { Cyclic } from '../../types/cyclic.mjs';\nimport { FromType } from './from_type.mjs';\nimport { CyclicTarget } from '../cyclic/target.mjs';\nexport function FromCyclic(defs, ref) {\n    const target = CyclicTarget(defs, ref);\n    const partial = FromType(target);\n    const result = Cyclic(Memory.Assign(defs, { [ref]: partial }), ref);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateDependent } from '../evaluate/evaluate.mjs';\nexport function FromDependent(if_, then_, else_) {\n    const evaluated = EvaluateDependent(if_, then_, else_);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { EvaluateIntersect } from '../evaluate/evaluate.mjs';\nexport function FromIntersect(types) {\n    const evaluated = EvaluateIntersect(types);\n    const result = FromType(evaluated);\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Union } from '../../types/union.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(types) {\n    const result = types.map(type => FromType(type));\n    return Union(result);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { RemoveOptionalAction } from '../engine/optional/instantiate_remove.mjs';\n/** Creates a deferred RemoveOptional action. */\nexport function RemoveOptionalDeferred(type, options = {}) {\n    return Deferred('RemoveOptional', [type], options);\n}\n/** Applies an RemoveOptional action to a type. */\nexport function RemoveOptional(type, options = {}) {\n    return RemoveOptionalAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Object } from '../../types/object.mjs';\nimport { RemoveOptional } from '../../action/_remove_optional.mjs';\nexport function FromObject(properties) {\n    const mapped = Guard.Keys(properties).reduce((result, left) => {\n        return { ...result, [left]: RemoveOptional(properties[left]) };\n    }, {});\n    const result = Object(mapped);\n    return result;\n}\n","// deno-lint-ignore-file ban-types\n// deno-fmt-ignore-file\nimport { IsCyclic } from '../../types/cyclic.mjs';\nimport { IsDependent } from '../../types/dependent.mjs';\nimport { IsIntersect } from '../../types/intersect.mjs';\nimport { Object, IsObject } from '../../types/object.mjs';\nimport { IsUnion } from '../../types/union.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDependent } from './from_dependent.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { FromObject } from './from_object.mjs';\nexport function FromType(type) {\n    return (IsCyclic(type) ? FromCyclic(type.$defs, type.$ref) :\n        IsDependent(type) ? FromDependent(type.if, type.then, type.else) :\n            IsIntersect(type) ? FromIntersect(type.allOf) :\n                IsUnion(type) ? FromUnion(type.anyOf) :\n                    IsObject(type) ? FromObject(type.properties) :\n                        Object({}));\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { RequiredAction } from '../engine/required/instantiate.mjs';\n/** Creates a deferred Required action. */\nexport function RequiredDeferred(type, options = {}) {\n    return Deferred('Required', [type], options);\n}\n/** Applies a Required action to the given type. */\nexport function Required(type, options = {}) {\n    return RequiredAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { RequiredDeferred } from '../../action/required.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nexport function RequiredAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(FromType(type), {}, options)\n        : RequiredDeferred(type, options);\n    return result;\n}\nexport function RequiredInstantiate(context, state, type, options) {\n    const instaniatedType = InstantiateType(context, state, type);\n    return RequiredAction(instaniatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { ReturnTypeAction } from '../engine/return_type/instantiate.mjs';\n/** Creates a deferred ReturnType action. */\nexport function ReturnTypeDeferred(type, options = {}) {\n    return Deferred('ReturnType', [type], options);\n}\n/** Applies a ReturnType action to the given type. */\nexport function ReturnType(type, options = {}) {\n    return ReturnTypeAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { IsFunction } from '../../types/function.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { ReturnTypeDeferred } from '../../action/return_type.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nfunction ReturnTypeOperation(type) {\n    return (IsFunction(type)\n        ? type['returnType']\n        : Never());\n}\nexport function ReturnTypeAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(ReturnTypeOperation(type), {}, options)\n        : ReturnTypeDeferred(type, options);\n    return result;\n}\nexport function ReturnTypeInstantiate(context, state, type, options = {}) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return ReturnTypeAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { WithAction } from '../engine/with/instantiate.mjs';\n/** Creates a deferred With action. */\nexport function WithDeferred(type, options) {\n    return Deferred('With', [type, options], {});\n}\n/** Applies annotation options to the given type. */\nexport function With(type, options) {\n    return WithAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType, CanInstantiate } from '../instantiate.mjs';\nimport { WithDeferred } from '../../action/with.mjs';\nexport function WithAction(type, options) {\n    const result = CanInstantiate([type])\n        ? Memory.Update(type, {}, options)\n        : WithDeferred(type, options);\n    return result;\n}\nexport function WithInstantiate(context, state, type, options) {\n    const instaniatedType = InstantiateType(context, state, type);\n    return WithAction(instaniatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { IsInfer } from '../../types/infer.mjs';\nimport { Never } from '../../types/never.mjs';\nimport { IsRest } from '../../types/rest.mjs';\nimport { IsRef } from '../../types/ref.mjs';\nimport { IsTuple } from '../../types/tuple.mjs';\nfunction SpreadElement(type) {\n    const result = (IsRest(type) ? (IsTuple(type.items) ? RestSpread(type.items.items) :\n        IsInfer(type.items) ? [type] :\n            IsRef(type.items) ? [type] :\n                [Never()]) : [type]);\n    return result;\n}\nexport function RestSpread(types) {\n    const result = types.reduce((result, left) => {\n        return [...result, ...SpreadElement(left)];\n    }, []);\n    return result;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Modifiers\n// ------------------------------------------------------------------\nimport { AddImmutableAction } from './immutable/instantiate_add.mjs';\nimport { AddReadonlyAction } from './readonly/instantiate_add.mjs';\nimport { AddOptionalAction } from './optional/instantiate_add.mjs';\nimport { _Array_, IsArray, ArrayOptions } from '../types/array.mjs';\nimport { Constructor, IsConstructor, ConstructorOptions } from '../types/constructor.mjs';\nimport { Deferred, IsDeferred } from '../types/deferred.mjs';\nimport { _Function_, IsFunction, FunctionOptions } from '../types/function.mjs';\nimport { IsCall } from '../types/call.mjs';\nimport { Dependent, IsDependent, DependentOptions } from '../types/dependent.mjs';\nimport { Intersect, IsIntersect, IntersectOptions } from '../types/intersect.mjs';\nimport { Object, IsObject, ObjectOptions } from '../types/object.mjs';\nimport { RecordFromPattern, IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';\nimport { Tuple, IsTuple, TupleOptions } from '../types/tuple.mjs';\nimport { Union, IsUnion, UnionOptions } from '../types/union.mjs';\nimport { IsRef } from '../types/ref.mjs';\nimport { Rest, IsRest } from '../types/rest.mjs';\n// ------------------------------------------------------------------\n// Modifier Instantiate\n// ------------------------------------------------------------------\nimport { AddImmutableInstantiate } from './immutable/instantiate_add.mjs';\nimport { RemoveImmutableInstantiate } from './immutable/instantiate_remove.mjs';\nimport { AddReadonlyInstantiate } from './readonly/instantiate_add.mjs';\nimport { RemoveReadonlyInstantiate } from './readonly/instantiate_remove.mjs';\nimport { AddOptionalInstantiate } from './optional/instantiate_add.mjs';\nimport { RemoveOptionalInstantiate } from './optional/instantiate_remove.mjs';\nimport { IsOptional } from '../types/_optional.mjs';\nimport { IsImmutable } from '../types/_immutable.mjs';\nimport { IsReadonly } from '../types/_readonly.mjs';\n// ------------------------------------------------------------------\n// Instantiate\n// ------------------------------------------------------------------\nimport { CallInstantiate } from './call/instantiate.mjs';\nimport { CapitalizeInstantiate } from './intrinsics/instantiate.mjs';\nimport { ConditionalInstantiate } from './conditional/index.mjs';\nimport { ConstructorParametersInstantiate } from './constructor_parameters/instantiate.mjs';\nimport { EvaluateInstantiate } from './evaluate/instantiate.mjs';\nimport { ExcludeInstantiate } from './exclude/instantiate.mjs';\nimport { ExtractInstantiate } from './extract/instantiate.mjs';\nimport { IndexInstantiate } from './indexed/instantiate.mjs';\nimport { InstanceTypeInstantiate } from './instance_type/instantiate.mjs';\nimport { InterfaceInstantiate } from './interface/instantiate.mjs';\nimport { KeyOfInstantiate } from './keyof/instantiate.mjs';\nimport { LowercaseInstantiate } from './intrinsics/instantiate.mjs';\nimport { MappedInstantiate } from './mapped/instantiate.mjs';\nimport { ModuleInstantiate } from './module/instantiate.mjs';\nimport { NonNullableInstantiate } from './non_nullable/instantiate.mjs';\nimport { OmitInstantiate } from './omit/instantiate.mjs';\nimport { ParametersInstantiate } from './parameters/instantiate.mjs';\nimport { PartialInstantiate } from './partial/instantiate.mjs';\nimport { PickInstantiate } from './pick/instantiate.mjs';\nimport { ReadonlyObjectInstantiate } from './readonly_object/instantiate.mjs';\nimport { RecordInstantiate } from './record/instantiate.mjs';\nimport { RefInstantiate } from './ref/instantiate.mjs';\nimport { RequiredInstantiate } from './required/instantiate.mjs';\nimport { ReturnTypeInstantiate } from './return_type/instantiate.mjs';\nimport { TemplateLiteralInstantiate } from './template_literal/instantiate.mjs';\nimport { UncapitalizeInstantiate } from './intrinsics/instantiate.mjs';\nimport { UppercaseInstantiate } from './intrinsics/instantiate.mjs';\nimport { WithInstantiate } from './with/instantiate.mjs';\nimport { RestSpread } from './rest/index.mjs';\nexport function State(callstack, visited) {\n    return { callstack, visited };\n}\nexport function CanInstantiate(types) {\n    return Guard.ShiftLeft(types, (left, right) => IsRef(left)\n        ? false\n        : CanInstantiate(right), () => true);\n}\nexport function InstantiateProperties(context, state, properties) {\n    return Guard.Keys(properties).reduce((result, key) => {\n        return { ...result, [key]: InstantiateType(context, state, properties[key]) };\n    }, {});\n}\nexport function InstantiateElements(context, state, types) {\n    const elements = InstantiateTypes(context, state, types);\n    const result = RestSpread(elements);\n    return result;\n}\nexport function InstantiateTypes(context, state, types) {\n    return types.map(type => InstantiateType(context, state, type));\n}\nfunction WithModifiers(type, instantiatedType) {\n    const withOptional = IsOptional(type) ? AddOptionalAction(instantiatedType, {}) : instantiatedType;\n    const withReadonly = IsReadonly(type) ? AddReadonlyAction(withOptional, {}) : withOptional;\n    const withImmutable = IsImmutable(type) ? AddImmutableAction(withReadonly, {}) : withReadonly;\n    return withImmutable;\n}\nfunction InstantiateDeferred(context, state, action, parameters, options) {\n    return (\n    // Modifiers\n    Guard.IsEqual(action, 'AddImmutable') ? AddImmutableInstantiate(context, state, parameters[0], options) :\n        Guard.IsEqual(action, 'RemoveImmutable') ? RemoveImmutableInstantiate(context, state, parameters[0], options) :\n            Guard.IsEqual(action, 'AddReadonly') ? AddReadonlyInstantiate(context, state, parameters[0], options) :\n                Guard.IsEqual(action, 'RemoveReadonly') ? RemoveReadonlyInstantiate(context, state, parameters[0], options) :\n                    Guard.IsEqual(action, 'AddOptional') ? AddOptionalInstantiate(context, state, parameters[0], options) :\n                        Guard.IsEqual(action, 'RemoveOptional') ? RemoveOptionalInstantiate(context, state, parameters[0], options) :\n                            // Actions\n                            Guard.IsEqual(action, 'Capitalize') ? CapitalizeInstantiate(context, state, parameters[0], options) :\n                                Guard.IsEqual(action, 'Conditional') ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :\n                                    Guard.IsEqual(action, 'ConstructorParameters') ? ConstructorParametersInstantiate(context, state, parameters[0], options) :\n                                        Guard.IsEqual(action, 'Evaluate') ? EvaluateInstantiate(context, state, parameters[0], options) :\n                                            Guard.IsEqual(action, 'Exclude') ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) :\n                                                Guard.IsEqual(action, 'Extract') ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) :\n                                                    Guard.IsEqual(action, 'Index') ? IndexInstantiate(context, state, parameters[0], parameters[1], options) :\n                                                        Guard.IsEqual(action, 'InstanceType') ? InstanceTypeInstantiate(context, state, parameters[0], options) :\n                                                            Guard.IsEqual(action, 'Interface') ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) :\n                                                                Guard.IsEqual(action, 'KeyOf') ? KeyOfInstantiate(context, state, parameters[0], options) :\n                                                                    Guard.IsEqual(action, 'Lowercase') ? LowercaseInstantiate(context, state, parameters[0], options) :\n                                                                        Guard.IsEqual(action, 'Mapped') ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :\n                                                                            Guard.IsEqual(action, 'Module') ? ModuleInstantiate(context, state, parameters[0], options) :\n                                                                                Guard.IsEqual(action, 'NonNullable') ? NonNullableInstantiate(context, state, parameters[0], options) :\n                                                                                    Guard.IsEqual(action, 'Pick') ? PickInstantiate(context, state, parameters[0], parameters[1], options) :\n                                                                                        Guard.IsEqual(action, 'Parameters') ? ParametersInstantiate(context, state, parameters[0], options) :\n                                                                                            Guard.IsEqual(action, 'Partial') ? PartialInstantiate(context, state, parameters[0], options) :\n                                                                                                Guard.IsEqual(action, 'Omit') ? OmitInstantiate(context, state, parameters[0], parameters[1], options) :\n                                                                                                    Guard.IsEqual(action, 'ReadonlyObject') ? ReadonlyObjectInstantiate(context, state, parameters[0], options) :\n                                                                                                        Guard.IsEqual(action, 'Record') ? RecordInstantiate(context, state, parameters[0], parameters[1], options) :\n                                                                                                            Guard.IsEqual(action, 'Required') ? RequiredInstantiate(context, state, parameters[0], options) :\n                                                                                                                Guard.IsEqual(action, 'ReturnType') ? ReturnTypeInstantiate(context, state, parameters[0], options) :\n                                                                                                                    Guard.IsEqual(action, 'TemplateLiteral') ? TemplateLiteralInstantiate(context, state, parameters[0], options) :\n                                                                                                                        Guard.IsEqual(action, 'Uncapitalize') ? UncapitalizeInstantiate(context, state, parameters[0], options) :\n                                                                                                                            Guard.IsEqual(action, 'Uppercase') ? UppercaseInstantiate(context, state, parameters[0], options) :\n                                                                                                                                Guard.IsEqual(action, 'With') ? WithInstantiate(context, state, parameters[0], parameters[1]) :\n                                                                                                                                    Deferred(action, parameters, options));\n}\nfunction InstantiateImmediate(context, state, type) {\n    const instantiatedType = (IsRef(type) ? RefInstantiate(context, state, type, type.$ref) :\n        IsArray(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) :\n            IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) :\n                IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) :\n                    IsFunction(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) :\n                        IsDependent(type) ? Dependent(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) :\n                            IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) :\n                                IsObject(type) ? Object(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) :\n                                    IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) :\n                                        IsRest(type) ? Rest(InstantiateType(context, state, type.items)) :\n                                            IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) :\n                                                IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) :\n                                                    type);\n    const withModifiers = WithModifiers(type, instantiatedType);\n    return withModifiers;\n}\nexport function InstantiateType(context, state, type) {\n    const result = IsDeferred(type)\n        ? InstantiateDeferred(context, state, type.action, type.parameters, type.options)\n        : InstantiateImmediate(context, state, type);\n    return result;\n}\n/** Instantiates computed schematics using the given context and type. */\nexport function Instantiate(context, type) {\n    return InstantiateType(context, State([], []), type);\n}\n","// deno-fmt-ignore-file\nimport { Memory } from '../../../system/memory/index.mjs';\nimport { InstantiateType } from '../instantiate.mjs';\nexport function AddImmutableAction(type, options) {\n    const result = Memory.Update(type, { '~immutable': true }, options);\n    return result;\n}\nexport function AddImmutableInstantiate(context, state, type, options) {\n    const instantiatedType = InstantiateType(context, state, type);\n    return AddImmutableAction(instantiatedType, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { AddImmutableAction } from '../engine/immutable/instantiate_add.mjs';\n/** Creates a deferred AddImmutable action. */\nexport function AddImmutableDeferred(type, options = {}) {\n    return Deferred('AddImmutable', [type], options);\n}\n/** Applies an AddImmutable action to a type. */\nexport function AddImmutable(type, options = {}) {\n    return AddImmutableAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Deferred } from '../types/deferred.mjs';\nimport { EvaluateAction } from '../engine/evaluate/instantiate.mjs';\n/** Creates a deferred Evaluate action. */\nexport function EvaluateDeferred(type, options = {}) {\n    return Deferred('Evaluate', [type], options);\n}\n/** Applies an Evaluate action to a type. */\nexport function Evaluate(type, options = {}) {\n    return EvaluateAction(type, options);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Compare, CompareResultRightInside, CompareResultDisjoint } from '../evaluate/compare.mjs';\nfunction Comparer(left, right) {\n    const compareResult = Compare(left, right);\n    return (Guard.IsEqual(compareResult, CompareResultRightInside) ? 1 :\n        Guard.IsEqual(compareResult, CompareResultDisjoint) ? 1 :\n            0);\n}\nfunction Insert(type, types, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => Guard.IsEqual(Comparer(type, left), 1)\n        ? Insert(type, right, [...result, left])\n        : [...result, type, ...types], () => [...result, type]);\n}\nfunction Sort(types, result = []) {\n    return Guard.ShiftLeft(types, (left, right) => Sort(right, Insert(left, result)), () => result);\n}\n/**\n * Priority sorts types in sequence of narrowest to broadest using an Insertion Sort\n * algorithm. This function is typically used to sequence types for union variant\n * checks to ensure that values are checked against the most narrow types before\n * the broadest, which in turn helps ensure order-independent Union checking.\n */\nexport function Priority(types) {\n    const result = Sort(types);\n    return result;\n}\n","import { Type } from \"typebox\";\n//#region src/schemas/profileIdentity.ts\n/**\n* The custom session entry the runtime journals when the active profile's\n* persona identity changes.\n*\n* A profile has always been prompt text only, so a cockpit had nothing to show\n* for it beyond the profile name already published as footer status. This entry\n* carries the persona's display name and avatar so the transcript can attribute\n* each assistant message to the persona that produced it.\n*\n* It rides Pi's `entry_appended` frames on the road the agent-model projection\n* already uses, so any RPC client sees the change live and on replay without a\n* new protocol.\n*\n* Unlike the minor-mode, context, and agent-model projections, this entry is\n* NOT a projection: it is transcript, positioned in journal order. A cockpit\n* folding it must keep every occurrence rather than collapsing to the latest\n* one, because a message written before a switch keeps the identity it was\n* written under. Collapsing would rewrite history.\n*/\nconst PO_PROFILE_IDENTITY_ENTRY_TYPE = \"po-profile-identity\";\n/**\n* Ceiling on the encoded icon, counted on the finished `data:` URL rather than\n* the file, so one number bounds both the journal entry and the transport.\n*\n* An avatar renders at 32 CSS pixels. This much room is already generous, and\n* the cap exists because the entry is replayed with the transcript: an oversize\n* icon is dropped and the persona keeps its name, never failing a profile load.\n*/\nconst PROFILE_ICON_MAX_DATA_URL_LENGTH = 262144;\nconst MAX_PROFILE_NAME_LENGTH = 128;\n/**\n* Image types allowed for a persona icon.\n*\n* Deliberately narrower than the cockpit's general media catalog: `image/svg+xml`\n* is excluded because an SVG rendered same-origin executes script, and the icon\n* path comes from user-authored persona front-matter. Do not reconcile this list\n* with the broader media type map.\n*/\nconst PROFILE_ICON_MIME_TYPES = [\n\t\"image/png\",\n\t\"image/jpeg\",\n\t\"image/gif\",\n\t\"image/webp\"\n];\nconst ProfileIdentityProjectionSchema = Type.Object({\n\tprofile: Type.Union([Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: MAX_PROFILE_NAME_LENGTH\n\t}), Type.Null()]),\n\tname: Type.Optional(Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: MAX_PROFILE_NAME_LENGTH\n\t})),\n\ticon: Type.Optional(Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: PROFILE_ICON_MAX_DATA_URL_LENGTH\n\t}))\n}, { additionalProperties: false });\n//#endregion\nexport { PO_PROFILE_IDENTITY_ENTRY_TYPE, PROFILE_ICON_MAX_DATA_URL_LENGTH, PROFILE_ICON_MIME_TYPES, ProfileIdentityProjectionSchema };\n\n//# sourceMappingURL=profileIdentity.mjs.map","import { recordTranscriptProjection } from \"../platformFiles/index.mjs\";\nimport \"../../schemas/profileIdentity.mjs\";\n//#region src/services/transcriptPages/index.ts\nconst PAGE_SIZE = 100;\nconst PAGE_BYTES = 8388608;\nconst MAX_PROJECTION_DEPTH = 100;\nconst OMITTED_TEXT = \"[Transcript content omitted: entry exceeds the page byte budget.]\";\nconst INTERNAL_CUSTOM_ENTRY_TYPES = [\n\t\"po-autocompact-state\",\n\t\"po-hook\",\n\t\"po-vibe-lint/state\"\n];\n/** A projected entry id: the record's sequence, then the message's position when the record holds several. */\nconst ENTRY_ID = /^\\d{1,15}(?::\\d{1,4})?$/u;\n/** Every message one record holds shares its sequence, so the first few scanned from it include the one asked for. */\nconst ENTRY_SCAN = 16;\n/** How deep under a message an image is looked for, such as an exec call's result inside its details. */\nconst MAX_IMAGE_DEPTH = 32;\nfunction isInlineImage(part) {\n\treturn typeof part === \"object\" && part !== null && part.type === \"image\" && typeof part.data === \"string\" && typeof part.mimeType === \"string\";\n}\n/**\n* A client copy of message content with each image sent by reference, unchanged when it has none.\n* Never mutates `content`: the saved entry and the messages the model reads keep the data.\n*/\nfunction referenceImages(entryId, content) {\n\tif (!Array.isArray(content) || !content.some(isInlineImage)) return content;\n\treturn content.map((part, index) => isInlineImage(part) ? {\n\t\ttype: \"image\",\n\t\tmimeType: part.mimeType,\n\t\tref: {\n\t\t\tentryId,\n\t\t\tpart: index\n\t\t}\n\t} : part);\n}\n/** A copy of `value` with each inline image under it sent by reference to its path, or `value` itself when it holds none. */\nfunction referenceNestedImages(entryId, value, path) {\n\tif (isInlineImage(value)) return {\n\t\ttype: \"image\",\n\t\tmimeType: value.mimeType,\n\t\tref: {\n\t\t\tentryId,\n\t\t\tpath\n\t\t}\n\t};\n\tif (typeof value !== \"object\" || value === null || path.length > MAX_IMAGE_DEPTH) return value;\n\tlet copy;\n\tfor (const [key, item] of Object.entries(value)) {\n\t\tconst next = referenceNestedImages(entryId, item, [...path, Array.isArray(value) ? Number(key) : key]);\n\t\tif (next === item) continue;\n\t\tcopy ??= Array.isArray(value) ? [...value] : { ...value };\n\t\tcopy[key] = next;\n\t}\n\treturn copy ?? value;\n}\n/**\n* A client copy of a message, or of a tool result shaped like one, with every image sent by reference: those in\n* `content` by part, any other, such as an exec call's result in `details`, by path. Unchanged when it has none.\n*/\nfunction referenceMessageImages(entryId, message) {\n\tif (typeof message !== \"object\" || message === null) return message;\n\tconst { content, details } = message;\n\tconst nextContent = referenceImages(entryId, content);\n\tconst nextDetails = referenceNestedImages(entryId, details, [\"details\"]);\n\tif (nextContent === content && nextDetails === details) return message;\n\treturn {\n\t\t...message,\n\t\t...nextContent === content ? {} : { content: nextContent },\n\t\t...nextDetails === details ? {} : { details: nextDetails }\n\t};\n}\n/** A client copy of one projected entry, its images by reference. */\nfunction referenceEntryImages(entry) {\n\tif (typeof entry !== \"object\" || entry === null) return entry;\n\tconst record = entry;\n\tif (record.type !== \"message\") return entry;\n\tconst message = referenceMessageImages(String(record.id), record.message);\n\treturn message === record.message ? entry : {\n\t\t...entry,\n\t\tmessage\n\t};\n}\n/** Browser projection only. Durable records and model context remain unchanged. */\nfunction projectTranscriptEntry(entry, omitContent = false) {\n\tentry = referenceEntryImages(entry);\n\tconst internal = entry.type === \"custom\" && INTERNAL_CUSTOM_ENTRY_TYPES.includes(entry.customType);\n\tif (!omitContent && !internal) {\n\t\tlet remaining = PAGE_BYTES;\n\t\tconst fits = (value, depth) => {\n\t\t\tif (depth > MAX_PROJECTION_DEPTH || --remaining < 0) return false;\n\t\t\tif (typeof value === \"string\") {\n\t\t\t\tif (value.length > remaining) return false;\n\t\t\t\tremaining -= Buffer.byteLength(value) + 2;\n\t\t\t\tconst escapes = /[\"\\\\\\u0000-\\u001f\\ud800-\\udfff]/gu;\n\t\t\t\tlet match;\n\t\t\t\twhile (remaining >= 0 && (match = escapes.exec(value))) {\n\t\t\t\t\tconst code = match[0].charCodeAt(0);\n\t\t\t\t\tremaining -= code >= 55296 ? 3 : code < 32 && ![\n\t\t\t\t\t\t8,\n\t\t\t\t\t\t9,\n\t\t\t\t\t\t10,\n\t\t\t\t\t\t12,\n\t\t\t\t\t\t13\n\t\t\t\t\t].includes(code) ? 5 : 1;\n\t\t\t\t}\n\t\t\t} else if (typeof value === \"number\") remaining -= Number.isFinite(value) ? String(value).length : 4;\n\t\t\telse if (typeof value === \"boolean\" || value === null) remaining -= value === false ? 5 : 4;\n\t\t\telse if (typeof value === \"object\") {\n\t\t\t\tremaining -= 2;\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tif (value.length > remaining) return false;\n\t\t\t\t\tfor (const item of value) if (!fits(item, depth + 1)) return false;\n\t\t\t\t} else for (const key in value) {\n\t\t\t\t\tif (!Object.hasOwn(value, key)) continue;\n\t\t\t\t\tif (!fits(key, depth + 1) || !fits(value[key], depth + 1)) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn remaining >= 0;\n\t\t};\n\t\tif (fits(entry, 0)) return JSON.parse(JSON.stringify(entry));\n\t}\n\tconst base = {\n\t\tid: entry.id,\n\t\tparentId: entry.parentId,\n\t\ttimestamp: entry.timestamp,\n\t\tseq: entry.seq,\n\t\ttype: entry.type,\n\t\tcontentOmitted: true\n\t};\n\tswitch (entry.type) {\n\t\tcase \"message\": return {\n\t\t\t...base,\n\t\t\tmessage: {\n\t\t\t\trole: entry.message.role,\n\t\t\t\tcontent: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: OMITTED_TEXT\n\t\t\t\t}],\n\t\t\t\ttimestamp: entry.timestamp,\n\t\t\t\t...entry.message.role === \"toolResult\" ? {\n\t\t\t\t\ttoolCallId: entry.message.toolCallId.slice(0, 256),\n\t\t\t\t\ttoolName: entry.message.toolName.slice(0, 256),\n\t\t\t\t\tisError: entry.message.isError\n\t\t\t\t} : {}\n\t\t\t}\n\t\t};\n\t\tcase \"custom\": return {\n\t\t\t...base,\n\t\t\tcustomType: entry.customType,\n\t\t\tdata: { contentOmitted: true }\n\t\t};\n\t\tcase \"compaction\": return {\n\t\t\t...base,\n\t\t\tsummary: OMITTED_TEXT,\n\t\t\ttokensBefore: entry.tokensBefore,\n\t\t\tretainedTail: [],\n\t\t\tfromHook: entry.fromHook\n\t\t};\n\t\tcase \"branch_summary\": return {\n\t\t\t...base,\n\t\t\tsummary: OMITTED_TEXT,\n\t\t\tfromHook: entry.fromHook\n\t\t};\n\t}\n}\n/** Most entry records read per storage call. */\nconst SCAN_BATCH = 100;\nfunction transcriptCursor(sessionId, lane, generation, seq, position) {\n\treturn Buffer.from(JSON.stringify([\n\t\tsessionId,\n\t\tlane,\n\t\tgeneration,\n\t\tseq,\n\t\t...position === void 0 ? [] : [position]\n\t])).toString(\"base64url\");\n}\n/** Multiple model messages from one durable record share its sequence number. */\nfunction entryPosition(entry) {\n\treturn entry.id.includes(\":\") ? Number(entry.id.slice(entry.id.lastIndexOf(\":\") + 1)) : 0;\n}\n/** One saved entry in full, images included: what a client reads to show an image it was sent by reference. */\nasync function readTranscriptEntry(lane, entryId, generation, context, onPageBytes) {\n\tif (typeof entryId !== \"string\" || !ENTRY_ID.test(entryId)) throw new Error(\"Invalid transcript entry\");\n\tconst seq = Number(entryId.split(\":\")[0]);\n\tconst entry = (await lane.findEntries({\n\t\torder: \"oldestFirst\",\n\t\tlimit: ENTRY_SCAN,\n\t\tcursor: { seq: seq - 1 }\n\t}, context)).find((row) => row.id === entryId);\n\tconst text = entry && JSON.stringify(entry);\n\tonPageBytes?.(text === void 0 ? 0 : Buffer.byteLength(text));\n\treturn {\n\t\tentries: text === void 0 ? [] : [JSON.parse(text)],\n\t\tcontext: [],\n\t\tstartCursor: null,\n\t\tendCursor: null,\n\t\tolderCursor: null,\n\t\tnewerCursor: null,\n\t\tgeneration\n\t};\n}\n/** Branch-relative keyset reads never materialize the complete conversation. */\nasync function readTranscriptPage(runtime, request, generation, context) {\n\tif (request.entryId !== void 0) return readTranscriptEntry(runtime.lane, request.entryId, generation, context, runtime.onPageBytes);\n\tconst limit = request.limit ?? PAGE_SIZE;\n\tif (!Number.isInteger(limit) || limit < 1 || limit > PAGE_SIZE) throw new Error(\"Transcript page limit must be between 1 and 100\");\n\tconst newer = request.direction === \"newer\";\n\tif (request.direction !== void 0 && ![\"older\", \"newer\"].includes(request.direction)) throw new Error(\"Invalid transcript direction\");\n\tlet seq;\n\tlet position;\n\tif (request.cursor !== void 0) {\n\t\tif (typeof request.cursor !== \"string\" || request.cursor.length > 1024) throw new Error(\"Invalid transcript cursor\");\n\t\tlet cursor;\n\t\ttry {\n\t\t\tcursor = JSON.parse(Buffer.from(request.cursor, \"base64url\").toString(\"utf8\"));\n\t\t} catch {\n\t\t\tthrow new Error(\"Invalid transcript cursor\");\n\t\t}\n\t\tif (!Array.isArray(cursor) || ![4, 5].includes(cursor.length) || cursor.length === 5 && (!Number.isSafeInteger(cursor[4]) || cursor[4] < 0) || cursor[0] !== runtime.sessionId || cursor[1] !== runtime.laneName || !Number.isSafeInteger(cursor[3]) || cursor[3] < 0) throw new Error(\"Invalid transcript cursor\");\n\t\tif (cursor[2] !== generation) throw new Error(\"STALE_TRANSCRIPT_CURSOR\");\n\t\tseq = cursor[3];\n\t\tposition = cursor[4];\n\t} else if (newer) throw new Error(\"Loading newer entries requires a cursor\");\n\tconst rows = await runtime.lane.findEntries({\n\t\torder: newer ? \"oldestFirst\" : \"newestFirst\",\n\t\tlimit: limit + 1,\n\t\t...seq === void 0 ? {} : { cursor: {\n\t\t\tseq,\n\t\t\t...position === void 0 ? {} : { position }\n\t\t} }\n\t}, context);\n\tconst history = rows.length ? await runtime.lane.readIdentities(context) : void 0;\n\tconst encode = (entry) => transcriptCursor(runtime.sessionId, runtime.laneName, generation, entry.seq, entryPosition(entry));\n\tconst selected = [];\n\tlet entryBytes = 0;\n\tlet page = {\n\t\tentries: [],\n\t\tcontext: [],\n\t\tstartCursor: null,\n\t\tendCursor: null,\n\t\tolderCursor: null,\n\t\tnewerCursor: null,\n\t\tgeneration\n\t};\n\tfor (const entry of rows.slice(0, limit)) {\n\t\tlet value = projectTranscriptEntry(entry);\n\t\tlet bytes = Buffer.byteLength(JSON.stringify(value));\n\t\trecordTranscriptProjection(bytes);\n\t\tselected.push({\n\t\t\tentry,\n\t\t\tvalue\n\t\t});\n\t\tconst ordered = newer ? selected : selected.toReversed();\n\t\tconst first = ordered[0].entry;\n\t\tconst last = ordered.at(-1).entry;\n\t\tconst identity = history?.items.findLast((item) => item.seq < first.seq);\n\t\tconst identityEntry = identity && {\n\t\t\tid: String(identity.seq),\n\t\t\tparentId: null,\n\t\t\ttimestamp: 0,\n\t\t\tseq: identity.seq,\n\t\t\ttype: \"custom\",\n\t\t\tcustomType: \"po-profile-identity\",\n\t\t\tdata: identity.data\n\t\t};\n\t\tlet identityValue = identityEntry && projectTranscriptEntry(identityEntry);\n\t\tif (identityValue) recordTranscriptProjection(Buffer.byteLength(JSON.stringify(identityValue)));\n\t\tif (identityValue && Buffer.byteLength(JSON.stringify(identityValue)) > PAGE_BYTES / 4) identityValue = projectTranscriptEntry(identityEntry, true);\n\t\tconst more = rows.length > selected.length;\n\t\tconst candidate = {\n\t\t\tentries: ordered.map((item) => item.value),\n\t\t\tcontext: identityValue ? [identityValue] : [],\n\t\t\tstartCursor: encode(first),\n\t\t\tendCursor: encode(last),\n\t\t\tolderCursor: newer || more ? encode(first) : null,\n\t\t\tnewerCursor: newer ? more ? encode(last) : null : seq !== void 0 ? encode(last) : null,\n\t\t\tgeneration\n\t\t};\n\t\tconst overhead = Buffer.byteLength(JSON.stringify({\n\t\t\t...candidate,\n\t\t\tentries: [],\n\t\t\trevision: Number.MAX_SAFE_INTEGER\n\t\t}));\n\t\tif (overhead + entryBytes + bytes + selected.length - 1 > PAGE_BYTES) {\n\t\t\tif (selected.length > 1) {\n\t\t\t\tselected.pop();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tvalue = projectTranscriptEntry(entry, true);\n\t\t\tbytes = Buffer.byteLength(JSON.stringify(value));\n\t\t\tselected[0].value = value;\n\t\t\tcandidate.entries = [value];\n\t\t\tif (overhead + bytes > PAGE_BYTES) throw new Error(\"Transcript entry identity exceeds the page byte budget\");\n\t\t}\n\t\tentryBytes += bytes;\n\t\tpage = candidate;\n\t}\n\truntime.onPageBytes?.(entryBytes);\n\treturn page;\n}\n/** Project only the current page, preserving raw ancestry even across page boundaries. */\nasync function* durableEntriesNewestFirst(scan, context) {\n\tlet cursor;\n\tdo {\n\t\tconst page = await scan({ order: \"descending\" }, SCAN_BATCH, cursor, context);\n\t\tconst oldest = page.items.at(-1);\n\t\tconst predecessor = oldest && page.next ? (await scan({ maxEntryId: oldest.id - 1 }, 1, void 0, context)).items[0] : void 0;\n\t\tconst entries = projectDurableEntries(page.items.toReversed(), predecessor ? String(predecessor.id) : null);\n\t\tfor (let index = entries.length - 1; index >= 0; index--) yield entries[index];\n\t\tcursor = page.next;\n\t} while (cursor);\n}\n/** The newest projected entry that matches, reading only the pages up to it. */\nasync function findNewestDurableEntry(scan, context, match) {\n\tfor await (const entry of durableEntriesNewestFirst(scan, context)) if (match(entry)) return entry;\n}\n/** Keyset reads of one conversation: only the pages that hold the requested entries load. */\nfunction durableTranscriptLane(scan, readIdentities) {\n\treturn {\n\t\tasync findEntries(query, context) {\n\t\t\tconst ascending = query.order === \"oldestFirst\";\n\t\t\tconst after = query.cursor?.seq;\n\t\t\tconst position = query.cursor?.position;\n\t\t\tconst range = ascending ? {\n\t\t\t\torder: \"ascending\",\n\t\t\t\t...after === void 0 ? {} : { minEntryId: after + (position === void 0 ? 1 : 0) }\n\t\t\t} : {\n\t\t\t\torder: \"descending\",\n\t\t\t\t...after === void 0 ? {} : { maxEntryId: after - (position === void 0 ? 1 : 0) }\n\t\t\t};\n\t\t\tconst limit = query.limit ?? Infinity;\n\t\t\tconst found = [];\n\t\t\tlet cursor;\n\t\t\tdo {\n\t\t\t\tconst scanned = await scan(range, Math.min(limit - found.length, SCAN_BATCH), cursor, context);\n\t\t\t\tconst entries = projectDurableEntries(ascending ? scanned.items : scanned.items.toReversed());\n\t\t\t\tfound.push(...(ascending ? entries : entries.toReversed()).filter((entry) => after === void 0 || position === void 0 || entry.seq !== after || (ascending ? entryPosition(entry) > position : entryPosition(entry) < position)));\n\t\t\t\tcursor = scanned.next;\n\t\t\t} while (cursor && found.length < limit);\n\t\t\treturn query.limit === void 0 ? found : found.slice(0, query.limit);\n\t\t},\n\t\treadIdentities\n\t};\n}\n/** Protocol identities are strings; durable record IDs remain numeric internally. */\nfunction projectDurableEntries(records, parentId = null) {\n\treturn records.flatMap((raw, index) => {\n\t\tconst data = raw.data && typeof raw.data === \"object\" && !Array.isArray(raw.data) ? raw.data : void 0;\n\t\tconst message = raw.model?.[0];\n\t\tconst timestamp = message && \"timestamp\" in message && typeof message.timestamp === \"number\" ? message.timestamp : typeof data?.timestamp === \"number\" ? data.timestamp : 0;\n\t\tconst base = {\n\t\t\tid: String(raw.id),\n\t\t\tparentId: index ? String(records[index - 1].id) : parentId,\n\t\t\ttimestamp,\n\t\t\tseq: Number(raw.id)\n\t\t};\n\t\tif (raw.kind === \"po.entry\" && data) return [{\n\t\t\t...data,\n\t\t\t...base\n\t\t}];\n\t\tif (raw.kind === \"pi.compaction\") {\n\t\t\tconst content = message?.content;\n\t\t\tconst summary = typeof content === \"string\" ? content : Array.isArray(content) ? content.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\") : \"\";\n\t\t\treturn [{\n\t\t\t\t...base,\n\t\t\t\ttype: \"compaction\",\n\t\t\t\tsummary,\n\t\t\t\ttokensBefore: 0,\n\t\t\t\tretainedTail: [],\n\t\t\t\tfromHook: false,\n\t\t\t\t...raw.head === void 0 ? {} : { firstKeptEntryId: String(raw.head) }\n\t\t\t}];\n\t\t}\n\t\tif (raw.model?.length) return raw.model.map((item, position) => ({\n\t\t\t...base,\n\t\t\tid: position === 0 ? base.id : `${base.id}:${position}`,\n\t\t\ttype: \"message\",\n\t\t\tmessage: item\n\t\t}));\n\t\treturn [{\n\t\t\t...base,\n\t\t\ttype: \"custom\",\n\t\t\tcustomType: raw.kind,\n\t\t\t...raw.data === void 0 ? {} : { data: raw.data }\n\t\t}];\n\t});\n}\n//#endregion\nexport { INTERNAL_CUSTOM_ENTRY_TYPES, durableEntriesNewestFirst, durableTranscriptLane, findNewestDurableEntry, projectDurableEntries, readTranscriptPage, referenceEntryImages, referenceImages, referenceMessageImages, transcriptCursor };\n\n//# sourceMappingURL=index.mjs.map","//#region src/services/contextUsage/index.ts\nfunction contextTokensOf(usage) {\n\treturn usage === void 0 ? null : usage.input + usage.cacheRead + usage.cacheWrite;\n}\n/** Undefined when the active model declares no window, the one case where no ratio exists. */\nfunction contextUsageOf(tokens, contextWindow) {\n\tif (contextWindow === void 0) return void 0;\n\treturn {\n\t\ttokens,\n\t\tcontextWindow,\n\t\tpercent: tokens === null ? null : Math.round(tokens / contextWindow * 100)\n\t};\n}\n//#endregion\nexport { contextTokensOf, contextUsageOf };\n\n//# sourceMappingURL=index.mjs.map","//#region src/services/piMessages/index.ts\nconst COMPACTION_SUMMARY_PREFIX = \"The conversation history before this point was compacted into the following summary:\\n\\n<summary>\\n\";\nconst COMPACTION_SUMMARY_SUFFIX = \"\\n</summary>\";\nconst BRANCH_SUMMARY_PREFIX = \"The following is a summary of a branch that this conversation came back from:\\n\\n<summary>\\n\";\nconst BRANCH_SUMMARY_SUFFIX = \"</summary>\";\nfunction bashExecutionToText(msg) {\n\tlet text = `Ran \\`${msg.command}\\`\\n`;\n\ttext += msg.output ? `\\`\\`\\`\\n${msg.output}\\n\\`\\`\\`` : \"(no output)\";\n\tif (msg.cancelled) text += \"\\n\\n(command cancelled)\";\n\telse if (msg.exitCode !== null && msg.exitCode !== void 0 && msg.exitCode !== 0) text += `\\n\\nCommand exited with code ${msg.exitCode}`;\n\tif (msg.truncated && msg.fullOutputPath) text += `\\n\\n[Output truncated. Full output: ${msg.fullOutputPath}]`;\n\treturn text;\n}\n/** Transform AgentMessages, including Pi's custom roles, to LLM-compatible Messages. */\nfunction convertToLlm(messages) {\n\treturn messages.map((m) => {\n\t\tswitch (m.role) {\n\t\t\tcase \"bashExecution\":\n\t\t\t\tif (m.excludeFromContext) return void 0;\n\t\t\t\treturn {\n\t\t\t\t\trole: \"user\",\n\t\t\t\t\tcontent: [{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: bashExecutionToText(m)\n\t\t\t\t\t}],\n\t\t\t\t\ttimestamp: m.timestamp\n\t\t\t\t};\n\t\t\tcase \"custom\": return {\n\t\t\t\trole: \"user\",\n\t\t\t\tcontent: typeof m.content === \"string\" ? [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: m.content\n\t\t\t\t}] : m.content,\n\t\t\t\ttimestamp: m.timestamp\n\t\t\t};\n\t\t\tcase \"branchSummary\": return {\n\t\t\t\trole: \"user\",\n\t\t\t\tcontent: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: BRANCH_SUMMARY_PREFIX + m.summary + BRANCH_SUMMARY_SUFFIX\n\t\t\t\t}],\n\t\t\t\ttimestamp: m.timestamp\n\t\t\t};\n\t\t\tcase \"compactionSummary\": return {\n\t\t\t\trole: \"user\",\n\t\t\t\tcontent: [{\n\t\t\t\t\ttype: \"text\",\n\t\t\t\t\ttext: COMPACTION_SUMMARY_PREFIX + m.summary + COMPACTION_SUMMARY_SUFFIX\n\t\t\t\t}],\n\t\t\t\ttimestamp: m.timestamp\n\t\t\t};\n\t\t\tcase \"system\":\n\t\t\tcase \"user\":\n\t\t\tcase \"assistant\":\n\t\t\tcase \"toolResult\": return m;\n\t\t\tdefault: return;\n\t\t}\n\t}).filter((m) => m !== void 0);\n}\n/**\n* Project one selected session entry into LLM/runtime messages.\n* Plain custom entries are display/state entries and do not participate in context.\n*/\nfunction sessionEntryToContextMessages(entry) {\n\tif (entry.type === \"message\") {\n\t\tconst message = entry.message;\n\t\tif (message.role === \"system\" && message.content == null) return [{\n\t\t\t...message,\n\t\t\tcontent: \"\"\n\t\t}];\n\t\tif ((message.role === \"user\" || message.role === \"assistant\" || message.role === \"toolResult\") && message.content == null) return [{\n\t\t\t...message,\n\t\t\tcontent: []\n\t\t}];\n\t\treturn [message];\n\t}\n\tif (entry.type === \"custom_message\") return [{\n\t\trole: \"custom\",\n\t\tcustomType: entry.customType,\n\t\tcontent: entry.content ?? [],\n\t\tdisplay: entry.display,\n\t\tdetails: entry.details,\n\t\ttimestamp: new Date(entry.timestamp).getTime()\n\t}];\n\tif (entry.type === \"branch_summary\" && entry.summary) return [{\n\t\trole: \"branchSummary\",\n\t\tsummary: entry.summary,\n\t\tfromId: entry.fromId,\n\t\ttimestamp: new Date(entry.timestamp).getTime()\n\t}];\n\tif (entry.type === \"compaction\") {\n\t\tconst summary = {\n\t\t\trole: \"compactionSummary\",\n\t\t\tsummary: entry.summary,\n\t\t\ttokensBefore: entry.tokensBefore,\n\t\t\ttimestamp: new Date(entry.timestamp).getTime()\n\t\t};\n\t\treturn entry.systemMessage ? [entry.systemMessage, summary] : [summary];\n\t}\n\treturn [];\n}\n//#endregion\nexport { convertToLlm, sessionEntryToContextMessages };\n\n//# sourceMappingURL=index.mjs.map","import { sessionEntryToContextMessages } from \"../piMessages/index.mjs\";\nfunction toIsoTimestamp(epochMilliseconds) {\n\treturn new Date(epochMilliseconds).toISOString();\n}\n/** Synthesize the Pi session header the harness has no direct equivalent for. */\nfunction toPiSessionHeader(input) {\n\treturn {\n\t\ttype: \"session\",\n\t\tversion: 3,\n\t\tid: input.id,\n\t\ttimestamp: toIsoTimestamp(input.createdAt),\n\t\tcwd: input.cwd,\n\t\t...input.parentSessionId === void 0 ? {} : { parentSession: input.parentSessionId }\n\t};\n}\n/** Convert one harness entry. Compactions require their retained boundary when the tail is non-empty. */\nfunction toPiSessionEntry(entry, firstKeptEntryId) {\n\tconst base = {\n\t\tid: entry.id,\n\t\tparentId: entry.parentId,\n\t\ttimestamp: toIsoTimestamp(entry.timestamp)\n\t};\n\tswitch (entry.type) {\n\t\tcase \"message\":\n\t\t\tif (entry.message.role === \"custom\") return {\n\t\t\t\t...base,\n\t\t\t\ttype: \"custom_message\",\n\t\t\t\tcustomType: entry.message.customType,\n\t\t\t\tcontent: entry.message.content,\n\t\t\t\tdisplay: entry.message.display,\n\t\t\t\t...entry.message.details === void 0 ? {} : { details: entry.message.details }\n\t\t\t};\n\t\t\treturn {\n\t\t\t\t...base,\n\t\t\t\ttype: \"message\",\n\t\t\t\tmessage: entry.message\n\t\t\t};\n\t\tcase \"compaction\": {\n\t\t\tconst retainedBoundary = firstKeptEntryId ?? (entry.retainedTail.length === 0 ? entry.parentId : null);\n\t\t\tif (retainedBoundary === null) return void 0;\n\t\t\treturn {\n\t\t\t\t...base,\n\t\t\t\ttype: \"compaction\",\n\t\t\t\tsummary: entry.summary,\n\t\t\t\tfirstKeptEntryId: retainedBoundary,\n\t\t\t\ttokensBefore: entry.tokensBefore,\n\t\t\t\tfromHook: entry.fromHook,\n\t\t\t\t...entry.details === void 0 ? {} : { details: entry.details },\n\t\t\t\t...entry.usage === void 0 ? {} : { usage: entry.usage }\n\t\t\t};\n\t\t}\n\t\tcase \"branch_summary\": {\n\t\t\tconst fromId = entry.fromId ?? entry.parentId;\n\t\t\tif (fromId === null) return void 0;\n\t\t\treturn {\n\t\t\t\t...base,\n\t\t\t\ttype: \"branch_summary\",\n\t\t\t\tfromId,\n\t\t\t\tsummary: entry.summary,\n\t\t\t\tfromHook: entry.fromHook,\n\t\t\t\t...entry.details === void 0 ? {} : { details: entry.details },\n\t\t\t\t...entry.usage === void 0 ? {} : { usage: entry.usage }\n\t\t\t};\n\t\t}\n\t\tcase \"custom\": return {\n\t\t\t...base,\n\t\t\ttype: \"custom\",\n\t\t\tcustomType: entry.customType,\n\t\t\t...entry.data === void 0 ? {} : { data: entry.data }\n\t\t};\n\t\tdefault: return;\n\t}\n}\n/** Convert every representable entry while deriving compaction boundaries from prior branch context. */\nfunction toPiSessionEntries(entries) {\n\tconst converted = [];\n\tfor (const entry of entries) {\n\t\tconst next = toPiSessionEntry(entry, entry.type === \"compaction\" ? entry.firstKeptEntryId ?? boundaryEntryId(converted, entry.retainedTail.length) : void 0);\n\t\tif (next !== void 0) converted.push(next);\n\t}\n\treturn converted;\n}\nfunction boundaryEntryId(branchEntries, retainedCount) {\n\tlet remaining = retainedCount;\n\tfor (let index = branchEntries.length - 1; index >= 0; index -= 1) {\n\t\tconst entry = branchEntries[index];\n\t\tif (entry === void 0) continue;\n\t\tif (remaining <= 0) return entry.id;\n\t\tremaining -= sessionEntryToContextMessages(entry).length;\n\t\tif (remaining <= 0) return entry.id;\n\t}\n\treturn branchEntries[0]?.id;\n}\n/** Header followed by every convertible entry, preserving input order. */\nfunction toPiFileEntries(header, entries) {\n\treturn [toPiSessionHeader(header), ...toPiSessionEntries(entries)];\n}\n/** Reverse direction, for mirroring extension-initiated writes back into the harness. */\nfunction fromPiSessionEntry(entry) {\n\tswitch (entry.type) {\n\t\tcase \"message\":\n\t\tcase \"compaction\":\n\t\tcase \"branch_summary\": return;\n\t\tcase \"custom\": return {\n\t\t\tcustomType: entry.customType,\n\t\t\tdata: entry.data\n\t\t};\n\t\tdefault: return {\n\t\t\tcustomType: `pi.${entry.type}`,\n\t\t\tdata: entry\n\t\t};\n\t}\n}\n//#endregion\nexport { fromPiSessionEntry, toPiFileEntries, toPiSessionEntries, toPiSessionEntry, toPiSessionHeader };\n\n//# sourceMappingURL=index.mjs.map","import { modelSettingsDirectory } from \"../piSettings/sync.mjs\";\nimport \"../../../runtimePiSettings.mjs\";\nimport { PO_CORDIS_SERVER_SERVICES, connectPoCordisHost } from \"../../../runtimeCordisHost.mjs\";\nimport { toPoHeadlessToolResult } from \"../../schemas/headless.mjs\";\nimport { SessionIdentityDoc, SessionMetadataDoc } from \"../durableSession/docs.mjs\";\nimport { durableEntriesNewestFirst, projectDurableEntries } from \"../transcriptPages/index.mjs\";\nimport { contextTokensOf, contextUsageOf } from \"../contextUsage/index.mjs\";\nimport { fromPiSessionEntry, toPiFileEntries, toPiSessionEntries, toPiSessionEntry } from \"../piSessionEntries/index.mjs\";\nimport { readFile } from \"node:fs/promises\";\nimport { BACKGROUND_CONTEXT } from \"@earendil-works/chord/context\";\nimport { DefaultPackageManager, DefaultResourceLoader, ExtensionRunner, ModelRegistry, SessionManager, SettingsManager, createEventBus, initTheme, loadSkills, sessionEntryToContextMessages } from \"@earendil-works/pi-coding-agent\";\nimport { isDeepStrictEqual } from \"node:util\";\n//#region src/services/piExtensionHost/index.ts\n/**\n* Extension entries of the packages listed under `packages` in Pi's settings.json.\n*\n* Resolve installed packages before passing their paths to Pi's resource loader with discovery\n* disabled. Only `packages` entries are taken: Pi's top-level `extensions` list can name Po\n* itself. Auto-discovered `extensions/` folders are not loaded. A package that is not installed\n* is skipped, never installed, so starting a session cannot trigger a network install.\n*/\nasync function resolvePiSettingsPackageEntries(options) {\n\ttry {\n\t\tconst agentDir = modelSettingsDirectory(options.agentDir, options.homeDirectory);\n\t\treturn (await new DefaultPackageManager({\n\t\t\tcwd: options.cwd,\n\t\t\tagentDir,\n\t\t\tsettingsManager: agentDir === options.agentDir ? options.settings : SettingsManager.create(options.cwd, agentDir)\n\t\t}).resolve(async (source) => {\n\t\t\toptions.onNotice?.(`Pi package ${source} is not installed; skipped. Install it with pi to load it here.`);\n\t\t\treturn \"skip\";\n\t\t})).extensions.filter((resource) => resource.enabled && resource.metadata.origin === \"package\").map((resource) => resource.path);\n\t} catch (error) {\n\t\toptions.onNotice?.(`Pi settings packages: ${error instanceof Error ? error.message : String(error)}`);\n\t\treturn [];\n\t}\n}\nasync function loadWithResourceLoader(options, events) {\n\tconst loader = new DefaultResourceLoader({\n\t\tcwd: options.cwd,\n\t\tagentDir: options.agentDir,\n\t\tsettingsManager: SettingsManager.inMemory(),\n\t\teventBus: events,\n\t\tadditionalExtensionPaths: [...options.extensionPaths],\n\t\tnoExtensions: true,\n\t\tnoSkills: true,\n\t\tnoPromptTemplates: true,\n\t\tnoThemes: true,\n\t\tnoContextFiles: true\n\t});\n\tawait loader.reload();\n\treturn loader.getExtensions();\n}\n/**\n* Load Pi extensions and apply their provider registrations to the model runtime.\n*\n* `pi.registerProvider` only queues into the extension runtime while extensions load; Pi drains\n* that queue in `ExtensionRunner.bindCore`. The runner cannot exist before the harness runtime,\n* and the harness runtime is built from an already-resolved model, so waiting for `bindCore`\n* would resolve the session's default model before extension providers exist and silently fall\n* back to the first available model. Draining the queue here puts provider registration ahead of\n* model resolution.\n*\n* The result is returned so `createPiExtensionHost` reuses it instead of discovering again, which\n* keeps every extension factory running exactly once.\n*/\nasync function preloadPiExtensions(options) {\n\tif (options.extensionPaths.length === 0) return void 0;\n\tconst events = createEventBus();\n\tconst result = await loadWithResourceLoader(options, events);\n\tfor (const failure of result.errors) options.onNotice?.(`Pi extension ${failure.path}: ${failure.error}`);\n\tconst registry = new ModelRegistry(options.models);\n\tconst report = (extensionPath, error) => options.onNotice?.(`Pi extension ${extensionPath}: provider registration failed: ${error instanceof Error ? error.message : String(error)}`);\n\tfor (const pending of result.runtime.pendingProviderRegistrations) try {\n\t\tregistry.registerProvider(pending.name, pending.config);\n\t} catch (error) {\n\t\treport(pending.extensionPath, error);\n\t}\n\tfor (const pending of result.runtime.pendingNativeProviderRegistrations) try {\n\t\tregistry.registerProvider(pending.provider);\n\t} catch (error) {\n\t\treport(pending.extensionPath, error);\n\t}\n\tresult.runtime.pendingProviderRegistrations = [];\n\tresult.runtime.pendingNativeProviderRegistrations = [];\n\treturn Object.assign(result, { events });\n}\n/**\n* The compaction boundary, named the way Pi names it.\n*\n* Pi identifies the cut by the first entry it keeps; a stored compaction entry carries the kept\n* messages inline instead. Counting whole entries back from the tip until the kept\n* messages are covered recovers the id, and {@link retainedTailFrom} is its exact\n* inverse, so an extension that echoes the id it was given gets its own tail back.\n*/\nfunction boundaryEntryId(branchEntries, retainedCount) {\n\tlet remaining = retainedCount;\n\tfor (let index = branchEntries.length - 1; index >= 0; index -= 1) {\n\t\tconst entry = branchEntries[index];\n\t\tif (entry === void 0) continue;\n\t\tif (remaining <= 0) return entry.id;\n\t\tremaining -= sessionEntryToContextMessages(entry).length;\n\t\tif (remaining <= 0) return entry.id;\n\t}\n\treturn branchEntries[0]?.id;\n}\n/** The messages an entry id keeps, which is what the harness stores on the compaction entry. */\nfunction retainedTailFrom(branchEntries, firstKeptEntryId) {\n\tconst index = branchEntries.findIndex((entry) => entry.id === firstKeptEntryId);\n\tif (index === -1) return [];\n\treturn branchEntries.slice(index).flatMap((entry) => sessionEntryToContextMessages(entry));\n}\n/** A live compaction is named by the harness's own cut, which counting cannot recover once the tail is empty. */\nfunction toPiCompactionPreparation(preparation) {\n\treturn {\n\t\tfirstKeptEntryId: preparation.firstKeptEntryId,\n\t\tmessagesToSummarize: preparation.messagesToSummarize,\n\t\tturnPrefixMessages: preparation.turnPrefixMessages,\n\t\tisSplitTurn: preparation.isSplitTurn,\n\t\ttokensBefore: preparation.tokensBefore,\n\t\t...preparation.previousSummary === void 0 ? {} : { previousSummary: preparation.previousSummary },\n\t\tfileOps: preparation.fileOps,\n\t\tsettings: preparation.settings\n\t};\n}\nfunction toHarnessCompactResult(result, branchEntries) {\n\treturn {\n\t\tsummary: result.summary,\n\t\ttokensBefore: result.tokensBefore,\n\t\tretainedTail: retainedTailFrom(branchEntries, result.firstKeptEntryId),\n\t\t...result.usage === void 0 ? {} : { usage: result.usage },\n\t\t...result.details === void 0 ? {} : { details: result.details }\n\t};\n}\nfunction piBranchEntries(entries) {\n\treturn toPiSessionEntries(entries);\n}\nasync function executePiTool(registered, runner, isActive, toolCallId, parameters, signal, onUpdate, alreadyPrepared = false) {\n\tconst definition = registered.definition;\n\tif (!isActive(definition.name)) throw new Error(`Tool '${definition.name}' is no longer active`);\n\tconst prepared = !alreadyPrepared && definition.prepareArguments ? definition.prepareArguments(parameters) : parameters;\n\tconst result = await definition.execute(toolCallId, prepared, signal, (partial) => onUpdate?.(toPoHeadlessToolResult(partial)), runner().createToolContext(toolCallId, signal));\n\treturn toPoHeadlessToolResult(result);\n}\nfunction toHarnessTool(registered, runner, isActive) {\n\tconst definition = registered.definition;\n\treturn {\n\t\tname: definition.name,\n\t\tlabel: definition.label ?? definition.name,\n\t\tdescription: definition.description,\n\t\tparameters: definition.parameters,\n\t\tprepareArguments: definition.prepareArguments,\n\t\t...definition.executionMode === void 0 ? {} : { executionMode: definition.executionMode },\n\t\tasync execute(toolCallId, parameters, onUpdate, _toolContext, _invocation, context) {\n\t\t\tconst result = await executePiTool(registered, runner, isActive, toolCallId, parameters, context.abortSignal, (partial) => onUpdate({\n\t\t\t\tcontent: partial.content,\n\t\t\t\tdetails: partial.details\n\t\t\t}), true);\n\t\t\tif (result.isError) {\n\t\t\t\tconst text = result.content.map((part) => part.type === \"text\" ? part.text : \"\").join(\"\\n\");\n\t\t\t\tthrow new Error(text || `Tool '${definition.name}' failed`);\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcontent: result.content,\n\t\t\t\tdetails: result.details\n\t\t\t};\n\t\t}\n\t};\n}\n/**\n* Resolves the skills Pi extensions contribute.\n*\n* Pi wires this through AgentSession's resource loader, which the headless server does not use,\n* so the pipeline is rebuilt here against the harness. Pi's own loader parses and validates the\n* frontmatter; only the body has to be read, because Pi's Skill record carries a path where the\n* harness wants inline content.\n*/\nasync function loadPiSkills(runner, cwd, agentDir, onNotice) {\n\tconst discovered = await runner.emitResourcesDiscover(cwd, \"startup\");\n\tif (discovered.skillPaths.length === 0) return [];\n\tconst loaded = loadSkills({\n\t\tcwd,\n\t\tagentDir,\n\t\tskillPaths: discovered.skillPaths.map((entry) => entry.path),\n\t\tincludeDefaults: false\n\t});\n\tfor (const diagnostic of loaded.diagnostics) onNotice?.(`Pi skill ${diagnostic.path}: ${diagnostic.message}`);\n\tconst resolved = [];\n\tfor (const skill of loaded.skills) try {\n\t\tresolved.push({\n\t\t\tname: skill.name,\n\t\t\tdescription: skill.description,\n\t\t\tcontent: await readFile(skill.filePath, \"utf8\"),\n\t\t\tfilePath: skill.filePath,\n\t\t\t...skill.disableModelInvocation ? { disableModelInvocation: true } : {}\n\t\t});\n\t} catch (error) {\n\t\tonNotice?.(`Pi skill ${skill.filePath}: ${error instanceof Error ? error.message : String(error)}`);\n\t}\n\treturn resolved;\n}\n/**\n* A SessionManager backed by the session the server already has open.\n*\n* Pi extensions read history through a SessionManager, which is JSONL backed, while the server\n* persists to SQLite through the harness. Rather than opening a second connection and taking a\n* second history lease, the manager is hydrated in memory from the live session and its writes\n* are mirrored back through the same harness runtime.\n*\n* `_persist` is public in Pi's source and in its shipped types, but it is not a documented\n* extension point, so the guard below turns a rename in a future Pi release into an immediate,\n* named failure instead of history that silently stops being recorded.\n*/\n/**\n* Pi's default theme, reached through public API only.\n*\n* The singleton lives in Pi's interactive theme module, which the package `exports` map does not\n* expose, so a deep import fails with ERR_PACKAGE_PATH_NOT_EXPORTED. A freshly constructed runner\n* still carries Pi's own no-op UI context, whose `theme` getter returns that singleton, so reading\n* it back before binding is the supported route. The getter throws until `initTheme` has run.\n*/\nfunction resolveDefaultTheme(runner) {\n\ttry {\n\t\treturn runner.getUIContext().theme;\n\t} catch {\n\t\tinitTheme(void 0, false);\n\t\treturn runner.getUIContext().theme;\n\t}\n}\n/**\n* Pi's extension UI surface, backed by the headless client the server already speaks.\n*\n* Dialogs, notifications and status text have a real transport, so they are wired through. The\n* members that need a live TUI (custom components, widgets, footer, header, editor component,\n* autocomplete, terminal input, themes) have no headless equivalent and degrade to the same no-ops\n* Pi's own RPC mode uses, rather than throwing into extension code that checked `hasUI` first.\n*/\nfunction createHeadlessUiContext(client, theme) {\n\tconst ask = async (request, signal) => {\n\t\tconst target = client();\n\t\tif (target === void 0) return void 0;\n\t\treturn await target.request(request, signal);\n\t};\n\treturn {\n\t\tasync select(title, options, opts) {\n\t\t\tconst answer = await ask({\n\t\t\t\tkind: \"select\",\n\t\t\t\ttitle,\n\t\t\t\toptions: options.map((option) => ({\n\t\t\t\t\tlabel: option,\n\t\t\t\t\tvalue: option\n\t\t\t\t}))\n\t\t\t}, opts?.signal);\n\t\t\treturn typeof answer === \"string\" ? answer : void 0;\n\t\t},\n\t\tasync confirm(title, message, opts) {\n\t\t\treturn await ask({\n\t\t\t\tkind: \"confirm\",\n\t\t\t\ttitle,\n\t\t\t\tmessage\n\t\t\t}, opts?.signal) === true;\n\t\t},\n\t\tasync input(title, _placeholder, opts) {\n\t\t\tconst answer = await ask({\n\t\t\t\tkind: \"input\",\n\t\t\t\ttitle\n\t\t\t}, opts?.signal);\n\t\t\treturn typeof answer === \"string\" ? answer : void 0;\n\t\t},\n\t\tasync editor(title, prefill) {\n\t\t\tconst answer = await ask({\n\t\t\t\tkind: \"input\",\n\t\t\t\ttitle,\n\t\t\t\tmultiline: true,\n\t\t\t\t...prefill === void 0 ? {} : { initialValue: prefill }\n\t\t\t});\n\t\t\treturn typeof answer === \"string\" ? answer : void 0;\n\t\t},\n\t\tnotify(message, type) {\n\t\t\tif (message.length === 0) return;\n\t\t\tclient()?.notify({\n\t\t\t\tbody: message,\n\t\t\t\t...type === void 0 ? {} : { level: type }\n\t\t\t});\n\t\t},\n\t\tsetStatus(key, text) {\n\t\t\tclient()?.setStatus(key, text);\n\t\t},\n\t\tpasteToEditor(text) {\n\t\t\tclient()?.appendComposerText?.(text);\n\t\t},\n\t\tonTerminalInput: () => () => {},\n\t\tsetWorkingMessage: () => {},\n\t\tsetWorkingVisible: () => {},\n\t\tsetWorkingIndicator: () => {},\n\t\tsetHiddenThinkingLabel: () => {},\n\t\tsetWidget: () => {},\n\t\tsetFooter: () => {},\n\t\tsetHeader: () => {},\n\t\tsetTitle: () => {},\n\t\tcustom: async () => void 0,\n\t\tsetEditorText: () => {},\n\t\tgetEditorText: () => \"\",\n\t\taddAutocompleteProvider: () => {},\n\t\tsetEditorComponent: () => {},\n\t\tgetEditorComponent: () => void 0,\n\t\ttheme,\n\t\tgetAllThemes: () => [],\n\t\tgetTheme: () => void 0,\n\t\tsetTheme: () => ({\n\t\t\tsuccess: false,\n\t\t\terror: \"Themes are not available in the headless server\"\n\t\t}),\n\t\tgetToolsExpanded: () => false,\n\t\tsetToolsExpanded: () => {}\n\t};\n}\n/** Read suffix candidates until the latest compaction's retained boundary is proven. */\nasync function readPiWindow(runtime) {\n\tconst state = await runtime.readResumeStatistics();\n\tconst pinned = /* @__PURE__ */ new Map();\n\tfor (const entry of await runtime.readCustomSnapshots()) if (entry.type === \"custom\" && typeof entry.customType === \"string\") pinned.set(entry.customType, entry);\n\tconst contextTokens = state?.contextTokens ?? null;\n\tlet first = state?.complete ? state.firstPiEntry ?? void 0 : void 0;\n\tconst hasBoundary = state?.complete ? state.hasContextBoundary : Boolean(await runtime.harness.commit((tx) => tx.latestHeadMarker(runtime.lane.id), BACKGROUND_CONTEXT));\n\tif (!state?.complete && hasBoundary) {\n\t\tlet cursor;\n\t\tlet parentId = null;\n\t\tdo {\n\t\t\tconst page = await runtime.scanEntries({ order: \"ascending\" }, 1, cursor, BACKGROUND_CONTEXT);\n\t\t\tfor (const entry of projectDurableEntries(page.items, parentId)) if (toPiSessionEntry(entry, entry.type === \"compaction\" ? entry.firstKeptEntryId : void 0)) {\n\t\t\t\tfirst = {\n\t\t\t\t\tid: entry.id,\n\t\t\t\t\tseq: entry.seq\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (first) break;\n\t\t\tparentId = page.items.at(-1) ? String(page.items.at(-1).id) : parentId;\n\t\t\tcursor = page.next;\n\t\t} while (cursor);\n\t}\n\tconst markers = /* @__PURE__ */ new Map();\n\tconst scan = () => durableEntriesNewestFirst(async (query, limit, cursor, context) => {\n\t\tconst page = await runtime.scanEntries(query, limit, cursor, context);\n\t\tfor (const raw of page.items) if (raw.kind === \"po.entry\" && raw.head === raw.id) markers.set(Number(raw.id), (raw.model?.length ?? 1) - 1);\n\t\treturn page;\n\t}, BACKGROUND_CONTEXT);\n\tlet pending = [];\n\tconst resolved = /* @__PURE__ */ new Map();\n\tlet latest;\n\tlet start;\n\tif (hasBoundary) for await (const entry of scan()) {\n\t\tconst converted = toPiSessionEntry(entry, entry.type === \"compaction\" ? entry.firstKeptEntryId ?? (first !== void 0 && entry.seq > first.seq ? first.id : void 0) : void 0);\n\t\tfor (const boundary of pending) {\n\t\t\tif (boundary.id !== void 0 ? entry.id !== boundary.id : converted === void 0) continue;\n\t\t\tif (boundary.id === void 0 && boundary.remaining > 0) boundary.remaining -= sessionEntryToContextMessages(converted).length;\n\t\t\tif (boundary.id === void 0 && boundary.remaining > 0) continue;\n\t\t\tresolved.set(boundary.compactionId, entry.id);\n\t\t\tif (boundary.compactionId === latest?.id) start = Math.min(entry.seq, latest.seq);\n\t\t}\n\t\tpending = pending.filter((boundary) => !resolved.has(boundary.compactionId));\n\t\tif (start !== void 0) pending = pending.filter((boundary) => boundary.seq >= start);\n\t\tif (start !== void 0 && entry.seq < start && pending.length === 0) break;\n\t\tconst retained = latest === void 0 ? markers.get(entry.seq) : void 0;\n\t\tif (retained !== void 0 && entry.type === \"message\") {\n\t\t\tlatest = {\n\t\t\t\tid: entry.id,\n\t\t\t\tseq: entry.seq\n\t\t\t};\n\t\t\tif (retained === 0) start = entry.seq;\n\t\t\telse pending.push({\n\t\t\t\tcompactionId: entry.id,\n\t\t\t\tseq: entry.seq,\n\t\t\t\tremaining: retained\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (entry.type !== \"compaction\" || converted === void 0 || start !== void 0 && entry.seq < start) continue;\n\t\tlatest ??= {\n\t\t\tid: entry.id,\n\t\t\tseq: entry.seq\n\t\t};\n\t\tif (entry.firstKeptEntryId === entry.id) {\n\t\t\tresolved.set(entry.id, entry.id);\n\t\t\tif (entry.id === latest.id) start = entry.seq;\n\t\t} else pending.push({\n\t\t\tcompactionId: entry.id,\n\t\t\tseq: entry.seq,\n\t\t\t...entry.firstKeptEntryId === void 0 ? {} : { id: entry.firstKeptEntryId },\n\t\t\tremaining: entry.retainedTail.length\n\t\t});\n\t}\n\tfor (const boundary of pending) {\n\t\tif (boundary.id !== void 0 || first === void 0) continue;\n\t\tresolved.set(boundary.compactionId, first.id);\n\t\tif (boundary.compactionId === latest?.id) start = Math.min(first.seq, latest.seq);\n\t}\n\tconst window = (await runtime.readEntriesFrom(start ?? 0)).entries.map((entry) => entry.type === \"compaction\" && resolved.has(entry.id) ? {\n\t\t...entry,\n\t\tfirstKeptEntryId: resolved.get(entry.id)\n\t} : entry);\n\tconst ids = new Set(window.map((entry) => entry.id));\n\tconst olderPins = [...pinned.values()].filter((entry) => !ids.has(entry.id)).sort((a, b) => a.seq - b.seq);\n\tlet parentId = null;\n\treturn {\n\t\tentries: [...olderPins, ...window].map((entry, index) => {\n\t\t\tconst next = index <= olderPins.length ? {\n\t\t\t\t...entry,\n\t\t\t\tparentId\n\t\t\t} : entry;\n\t\t\tparentId = next.id;\n\t\t\treturn next;\n\t\t}),\n\t\tleafId: window.at(-1)?.id ?? null,\n\t\tcontextTokens\n\t};\n}\n/** The Pi 1.3 private transition also used by SessionManager's own branch rewrite. */\nfunction replacePiEntries(manager, entries) {\n\tconst internal = manager;\n\tif (!Array.isArray(internal.fileEntries) || typeof internal._buildIndex !== \"function\") throw new Error(\"Pi's SessionManager no longer exposes fileEntries/_buildIndex; the window bridge must be updated\");\n\tinternal.fileEntries = [manager.getHeader(), ...entries];\n\tinternal._buildIndex();\n}\n/** Drop summarized payloads, keeping the latest older custom state for each type. */\nfunction windowPiEntries(entries) {\n\tconst compaction = entries.findLast((entry) => entry.type === \"compaction\");\n\tif (compaction === void 0) return [...entries];\n\tconst boundary = entries.findIndex((entry) => entry.id === compaction.firstKeptEntryId);\n\tif (boundary <= 0) return [...entries];\n\tconst pinned = /* @__PURE__ */ new Map();\n\tfor (const entry of entries.slice(0, Math.min(boundary, entries.findIndex((item) => item.id === compaction.id)))) if (entry.type === \"custom\") {\n\t\tpinned.delete(entry.customType);\n\t\tpinned.set(entry.customType, entry);\n\t}\n\tconst start = Math.min(boundary, entries.findIndex((entry) => entry.id === compaction.id));\n\tconst suffix = entries.slice(start);\n\tfor (const entry of suffix) if (entry.type === \"custom\") pinned.delete(entry.customType);\n\tlet parentId = null;\n\tconst pins = [...pinned.values()];\n\treturn [...pins, ...suffix].map((entry, index) => {\n\t\tconst next = index <= pins.length ? {\n\t\t\t...entry,\n\t\t\tparentId\n\t\t} : entry;\n\t\tparentId = next.id;\n\t\treturn next;\n\t});\n}\nconst bridgedSessionSync = /* @__PURE__ */ new WeakMap();\nasync function createBridgedSessionManager(runtime, cwd, onNotice, branchEntries) {\n\tconst identity = await runtime.session.snapshot(SessionIdentityDoc, BACKGROUND_CONTEXT);\n\tconst storedMetadata = await runtime.session.snapshot(SessionMetadataDoc, BACKGROUND_CONTEXT);\n\tconst metadata = {\n\t\tid: runtime.sessionId,\n\t\tcwd: storedMetadata?.workspaceRoot || cwd,\n\t\tcreatedAt: identity?.createdAt ?? Date.now(),\n\t\tparentSessionId: identity?.parentSessionId || void 0\n\t};\n\tconst entries = branchEntries ?? (await readPiWindow(runtime)).entries;\n\tconst header = {\n\t\tid: metadata.id,\n\t\tcwd: metadata.cwd ?? cwd,\n\t\tcreatedAt: metadata.createdAt,\n\t\t...metadata.parentSessionId === void 0 ? {} : { parentSessionId: metadata.parentSessionId }\n\t};\n\tconst manager = SessionManager.inMemory(header.cwd, {\n\t\tid: metadata.id,\n\t\t...metadata.parentSessionId === void 0 ? {} : { parentSession: metadata.parentSessionId }\n\t}, toPiFileEntries(header, entries));\n\tif (typeof manager._persist !== \"function\") throw new Error(\"Pi's SessionManager no longer exposes '_persist'; the headless session bridge must be updated\");\n\tconst append = manager._appendEntry;\n\tif (typeof append !== \"function\") throw new Error(\"Pi's SessionManager no longer exposes '_appendEntry'; the live session bridge must be updated\");\n\tlet syncingHarnessEntry = false;\n\tconst pendingMirrors = [];\n\tconst harnessToPiId = /* @__PURE__ */ new Map();\n\tconst piToHarnessId = /* @__PURE__ */ new Map();\n\tconst persist = manager._persist.bind(manager);\n\tmanager._persist = (entry) => {\n\t\tpersist(entry);\n\t\tif (syncingHarnessEntry) return;\n\t\tconst mirrored = fromPiSessionEntry(entry);\n\t\tif (mirrored === void 0) return;\n\t\tconst pending = {\n\t\t\tentry,\n\t\t\tmirrored\n\t\t};\n\t\tpendingMirrors.push(pending);\n\t\truntime.appendCustomEntry(mirrored.customType, mirrored.data).catch((error) => {\n\t\t\tonNotice?.(`Pi session write for '${mirrored.customType}' was not mirrored: ${error instanceof Error ? error.message : String(error)}`);\n\t\t});\n\t};\n\tconst resolvePiId = (entryId) => {\n\t\tif (entryId === null) return null;\n\t\treturn harnessToPiId.get(entryId) ?? entryId;\n\t};\n\tconst sync = {\n\t\tappend(entry) {\n\t\t\tif (manager.getEntry(resolvePiId(entry.id) ?? entry.id) !== void 0) return;\n\t\t\tif (entry.type === \"custom\") {\n\t\t\t\tconst pendingIndex = pendingMirrors.findIndex((pending) => pending.mirrored.customType === entry.customType && isDeepStrictEqual(pending.mirrored.data, entry.data));\n\t\t\t\tif (pendingIndex !== -1) {\n\t\t\t\t\tconst pending = pendingMirrors.splice(pendingIndex, 1)[0];\n\t\t\t\t\tif (pending !== void 0) {\n\t\t\t\t\t\tharnessToPiId.set(entry.id, pending.entry.id);\n\t\t\t\t\t\tpiToHarnessId.set(pending.entry.id, entry.id);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst converted = entry.type === \"compaction\" ? toPiSessionEntry(entry, entry.firstKeptEntryId === void 0 ? boundaryEntryId(manager.getBranch(), entry.retainedTail.length) : resolvePiId(entry.firstKeptEntryId) ?? void 0) : toPiSessionEntry(entry);\n\t\t\tif (converted === void 0) return;\n\t\t\tconst parentId = resolvePiId(converted.parentId);\n\t\t\tsyncingHarnessEntry = true;\n\t\t\ttry {\n\t\t\t\tappend.call(manager, parentId === converted.parentId ? converted : {\n\t\t\t\t\t...converted,\n\t\t\t\t\tparentId\n\t\t\t\t});\n\t\t\t} finally {\n\t\t\t\tsyncingHarnessEntry = false;\n\t\t\t}\n\t\t\tif (entry.type === \"compaction\") sync.compact();\n\t\t},\n\t\tcompact() {\n\t\t\tconst compacted = windowPiEntries(manager.getBranch());\n\t\t\tconst ids = new Set(compacted.map((item) => item.id));\n\t\t\tlet parentId = compacted.at(-1)?.id ?? null;\n\t\t\tfor (const { entry: local } of pendingMirrors) {\n\t\t\t\tif (ids.has(local.id)) continue;\n\t\t\t\tcompacted.push({\n\t\t\t\t\t...local,\n\t\t\t\t\tparentId\n\t\t\t\t});\n\t\t\t\tparentId = local.id;\n\t\t\t}\n\t\t\treplacePiEntries(manager, compacted);\n\t\t},\n\t\treplace(entries, preserve = []) {\n\t\t\tfor (const entry of entries) sync.append(entry);\n\t\t\tconst byId = new Map(toPiSessionEntries(entries).map((entry) => [entry.id, entry]));\n\t\t\tconst converted = entries.flatMap((raw) => {\n\t\t\t\tconst entry = byId.get(raw.id) ?? manager.getEntry(resolvePiId(raw.id) ?? raw.id);\n\t\t\t\tif (entry === void 0) return [];\n\t\t\t\tconst existing = manager.getEntry(resolvePiId(raw.id) ?? raw.id);\n\t\t\t\tconst id = resolvePiId(raw.id) ?? raw.id;\n\t\t\t\tconst parentId = resolvePiId(raw.parentId);\n\t\t\t\treturn [{\n\t\t\t\t\t...existing ?? entry,\n\t\t\t\t\tid,\n\t\t\t\t\tparentId,\n\t\t\t\t\t...entry.type === \"compaction\" ? { firstKeptEntryId: resolvePiId(entry.firstKeptEntryId) } : {}\n\t\t\t\t}];\n\t\t\t});\n\t\t\tconst ids = new Set(converted.map((entry) => entry.id));\n\t\t\tconst locals = [...preserve, ...pendingMirrors.map((pending) => pending.entry)].filter((entry) => {\n\t\t\t\tif (ids.has(entry.id)) return false;\n\t\t\t\tids.add(entry.id);\n\t\t\t\treturn true;\n\t\t\t});\n\t\t\tlet parentId = converted.at(-1)?.id ?? null;\n\t\t\tfor (const entry of locals) {\n\t\t\t\tconverted.push({\n\t\t\t\t\t...entry,\n\t\t\t\t\tparentId\n\t\t\t\t});\n\t\t\t\tparentId = entry.id;\n\t\t\t}\n\t\t\treplacePiEntries(manager, converted);\n\t\t},\n\t\tpending: () => pendingMirrors.map((pending) => pending.entry),\n\t\tlocalLeaf(durableLeaf) {\n\t\t\tconst locals = new Set(pendingMirrors.map((pending) => pending.entry.id));\n\t\t\tlet parentId = durableLeaf;\n\t\t\twhile (parentId !== null && locals.has(parentId)) parentId = manager.getEntry(parentId)?.parentId ?? null;\n\t\t\tconst parents = /* @__PURE__ */ new Map();\n\t\t\tfor (const { entry } of pendingMirrors) {\n\t\t\t\tparents.set(entry.id, parentId);\n\t\t\t\tparentId = entry.id;\n\t\t\t}\n\t\t\tif (manager.getEntries().some((entry) => parents.has(entry.id) && entry.parentId !== parents.get(entry.id))) replacePiEntries(manager, manager.getEntries().map((entry) => parents.has(entry.id) ? {\n\t\t\t\t...entry,\n\t\t\t\tparentId: parents.get(entry.id)\n\t\t\t} : entry));\n\t\t\treturn pendingMirrors.at(-1)?.entry.id ?? null;\n\t\t},\n\t\ttoHarnessId: (entryId) => piToHarnessId.get(entryId) ?? entryId,\n\t\ttoPiId: resolvePiId\n\t};\n\tbridgedSessionSync.set(manager, sync);\n\treturn manager;\n}\nfunction createPiExtensionHost(options) {\n\tconst { cwd, agentDir, models, runtime, preload } = options;\n\tlet runner;\n\tlet sessionManager;\n\tlet sessionSync;\n\tlet backfill;\n\tlet backfillEpoch = 0;\n\tlet windowedCompaction;\n\tconst resetBackfill = () => {\n\t\tbackfill = void 0;\n\t\tbackfillEpoch++;\n\t};\n\tlet tools = [];\n\tlet skills = [];\n\tlet registered = [];\n\tlet activeNames = /* @__PURE__ */ new Set();\n\tlet unsubscribeEvents;\n\tlet unsubscribeLifecycle;\n\tlet cordisConnection;\n\tlet contextTokens = null;\n\tlet currentOperation = null;\n\tlet nativeQueuedMessages = 0;\n\tlet retainedQueuedMessages = 0;\n\tlet pendingRead = 0;\n\tlet logicalLoopActive = false;\n\tlet turnIndex = 0;\n\tlet runMessages = [];\n\tconst turnEntryIds = /* @__PURE__ */ new Set();\n\tconst toolArguments = /* @__PURE__ */ new Map();\n\t/** Whether the compaction now running came from a Pi extension rather than the harness. */\n\tlet compactionFromExtension = false;\n\t/**\n\t* Set once shutdown begins. The session disposes its runtime before extensions see\n\t* session_shutdown, so tool changes made from that handler have no runtime to reach.\n\t*/\n\tlet shuttingDown = false;\n\tconst report = (source, error) => options.onNotice?.(`Pi extension ${source}: ${error instanceof Error ? error.message : String(error)}`);\n\tconst activeTools = () => tools.filter((tool) => activeNames.has(tool.name));\n\tconst requireRunner = () => {\n\t\tif (runner === void 0) throw new Error(\"The Pi extension host is not loaded\");\n\t\treturn runner;\n\t};\n\t/**\n\t* Where one custom message goes, following Pi's own order in `sendCustomMessage`.\n\t*\n\t* `nextTurn` is staged before considering triggerTurn, even when it is false.\n\t* Otherwise a running turn takes the message unless the caller opted out; an\n\t* idle agent is woken only when the caller asked for a turn.\n\t* Pi's remaining branch, deferring an append made mid-turn, needs no counterpart:\n\t* the lane already holds a write until the operation reaches a safe commit point.\n\t*/\n\tconst deliverMessage = (message, sendOptions) => {\n\t\tif (sendOptions?.deliverAs === \"nextTurn\") return runtime.submitInternalMessage(message, \"nextTurn\");\n\t\tif (sendOptions?.triggerTurn === false) return runtime.appendMessage(message);\n\t\tif (currentOperation === \"run\" || sendOptions?.triggerTurn === true) return runtime.submitInternalMessage(message, sendOptions?.deliverAs === \"steer\" || currentOperation === \"run\" && sendOptions?.deliverAs === void 0 ? \"steer\" : \"followUp\");\n\t\treturn runtime.appendMessage(message);\n\t};\n\tconst actions = {\n\t\tsendMessage: (message, sendOptions) => {\n\t\t\tconst custom = {\n\t\t\t\trole: \"custom\",\n\t\t\t\tcustomType: message.customType,\n\t\t\t\tcontent: message.content ?? [],\n\t\t\t\tdisplay: message.display,\n\t\t\t\t...message.details === void 0 ? {} : { details: message.details },\n\t\t\t\ttimestamp: Date.now()\n\t\t\t};\n\t\t\tdeliverMessage(custom, sendOptions).catch((error) => report(\"send_message\", error));\n\t\t},\n\t\tsendUserMessage: (content, sendOptions) => {\n\t\t\tconst deliver = async () => {\n\t\t\t\tif (currentOperation === \"run\" && sendOptions?.deliverAs === void 0) throw new Error(\"sendUserMessage during streaming requires deliverAs: steer or followUp\");\n\t\t\t\tconst text = typeof content === \"string\" ? content : content.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\\n\");\n\t\t\t\tif (sendOptions?.expandPromptTemplates && await runtime.dispatchCommand(text)) return;\n\t\t\t\tconst message = {\n\t\t\t\t\trole: \"user\",\n\t\t\t\t\tcontent,\n\t\t\t\t\ttimestamp: Date.now()\n\t\t\t\t};\n\t\t\t\t(await runtime.submitInternalMessage(message, sendOptions?.deliverAs === \"steer\" ? \"steer\" : \"followUp\")).settled.catch((error) => report(\"send_user_message\", error));\n\t\t\t};\n\t\t\tdeliver().catch((error) => report(\"send_user_message\", error));\n\t\t},\n\t\tappendEntry: (customType, data) => {\n\t\t\truntime.appendCustomEntry(customType, data).catch((error) => report(\"append_entry\", error));\n\t\t},\n\t\tsetSessionName: (name) => {\n\t\t\truntime.setName(name).catch((error) => report(\"set_session_name\", error));\n\t\t},\n\t\tgetSessionName: () => void 0,\n\t\tgetSettings: () => options.settings.getSettings(),\n\t\tsetLabel: (entryId, label) => {\n\t\t\truntime.setLabel(sessionSync?.toHarnessId(entryId) ?? entryId, label).catch((error) => report(\"set_label\", error));\n\t\t},\n\t\tgetActiveTools: () => activeTools().map((tool) => tool.name),\n\t\tgetAllTools: () => registered.map((tool) => ({\n\t\t\tname: tool.definition.name,\n\t\t\tdescription: tool.definition.description,\n\t\t\tparameters: tool.definition.parameters,\n\t\t\texposure: tool.definition.exposure ?? \"direct\",\n\t\t\t...tool.definition.promptGuidelines === void 0 ? {} : { promptGuidelines: tool.definition.promptGuidelines },\n\t\t\tsourceInfo: tool.sourceInfo\n\t\t})),\n\t\tsetActiveTools: (names) => {\n\t\t\tconst known = new Set(registered.map((tool) => tool.definition.name));\n\t\t\tactiveNames = new Set(names.filter((name) => known.has(name)));\n\t\t\tif (!shuttingDown) options.onActiveToolsChanged?.();\n\t\t},\n\t\trefreshTools: () => {\n\t\t\tif (!shuttingDown) options.onActiveToolsChanged?.();\n\t\t},\n\t\tgetCommands: () => [],\n\t\tsetModel: async (model) => {\n\t\t\tawait runtime.setModel({\n\t\t\t\tprovider: model.provider,\n\t\t\t\tid: model.id\n\t\t\t});\n\t\t\treturn true;\n\t\t},\n\t\tgetThinkingLevel: () => options.getThinkingLevel(),\n\t\tsetThinkingLevel: (level) => {\n\t\t\truntime.setThinkingLevel(level).catch((error) => report(\"set_thinking_level\", error));\n\t\t}\n\t};\n\tconst contextActions = {\n\t\tgetModel: () => options.getModel(),\n\t\tgetScopedModels: () => [],\n\t\tisIdle: () => currentOperation !== \"run\" && currentOperation !== \"compaction\",\n\t\tisProjectTrusted: () => true,\n\t\tgetSignal: () => void 0,\n\t\tabort: () => {\n\t\t\truntime.abort().catch((error) => report(\"abort\", error));\n\t\t},\n\t\thasPendingMessages: () => nativeQueuedMessages > 0 || retainedQueuedMessages > 0,\n\t\tshutdown: () => {\n\t\t\truntime.stop();\n\t\t},\n\t\tgetContextUsage: () => contextUsageOf(contextTokens, options.getModel()?.contextWindow),\n\t\tcompact: () => {\n\t\t\truntime.compact().catch((error) => report(\"compact\", error));\n\t\t},\n\t\tgetSystemPrompt: () => \"\"\n\t};\n\tconst piCompactionEntry = async (entryId) => {\n\t\tconst { entries } = await runtime.readEntriesFrom(Number(entryId));\n\t\tconst converted = sessionManager?.getEntry(entryId) ?? toPiSessionEntries(entries).find((entry) => entry.id === entryId);\n\t\treturn converted?.type === \"compaction\" ? converted : void 0;\n\t};\n\tconst turnBoundaryContext = () => {\n\t\tconst projection = sessionManager?.buildSessionProjection();\n\t\tconst contextEntries = projection?.entries ?? [];\n\t\tconst contextMessages = projection?.messages ?? [];\n\t\treturn {\n\t\t\tcontextEntries,\n\t\t\tcontextMessages,\n\t\t\tllmMessages: contextMessages.filter((message) => message.role !== \"bashExecution\"),\n\t\t\tpendingMessages: [],\n\t\t\tcanContinue: contextMessages.at(-1)?.role !== \"assistant\"\n\t\t};\n\t};\n\t/** Harness events, translated into Pi events in AgentSession order. */\n\tconst handleHarnessEvent = async (event) => {\n\t\tswitch (event.type) {\n\t\t\tcase \"run_start\":\n\t\t\t\tcurrentOperation = \"run\";\n\t\t\t\tif (logicalLoopActive) return;\n\t\t\t\tlogicalLoopActive = true;\n\t\t\t\tturnIndex = 0;\n\t\t\t\trunMessages = [];\n\t\t\t\tturnEntryIds.clear();\n\t\t\t\ttoolArguments.clear();\n\t\t\t\tawait runner?.emit({ type: \"agent_start\" });\n\t\t\t\treturn;\n\t\t\tcase \"run_resume\":\n\t\t\t\tcurrentOperation = \"run\";\n\t\t\t\treturn;\n\t\t\tcase \"turn_start\":\n\t\t\t\tturnEntryIds.clear();\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"turn_start\",\n\t\t\t\t\tturnIndex,\n\t\t\t\t\ttimestamp: Date.now()\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"message_start\":\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"message_start\",\n\t\t\t\t\tmessage: event.message\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"message_update\":\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"message_update\",\n\t\t\t\t\tmessage: event.message,\n\t\t\t\t\tassistantMessageEvent: event.event\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"message_end\":\n\t\t\t\tif (event.runId !== void 0) runMessages.push(event.message);\n\t\t\t\tif (event.message.role === \"assistant\") contextTokens = contextTokensOf(event.message.usage);\n\t\t\t\tawait runner?.emitMessageEnd({\n\t\t\t\t\ttype: \"message_end\",\n\t\t\t\t\tmessage: event.message\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"tool_execution_start\":\n\t\t\t\ttoolArguments.set(event.toolCallId, event.args);\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"tool_execution_start\",\n\t\t\t\t\ttoolCallId: event.toolCallId,\n\t\t\t\t\ttoolName: event.toolName,\n\t\t\t\t\targs: event.args\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"tool_execution_update\":\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"tool_execution_update\",\n\t\t\t\t\ttoolCallId: event.toolCallId,\n\t\t\t\t\ttoolName: event.toolName,\n\t\t\t\t\targs: toolArguments.get(event.toolCallId),\n\t\t\t\t\tpartialResult: event.partialResult\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"tool_execution_end\":\n\t\t\t\ttoolArguments.delete(event.toolCallId);\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"tool_execution_end\",\n\t\t\t\t\ttoolCallId: event.toolCallId,\n\t\t\t\t\ttoolName: event.toolName,\n\t\t\t\t\tresult: event.result,\n\t\t\t\t\tisError: event.isError\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"entry_appended\":\n\t\t\t\tsessionSync?.append(event.entry);\n\t\t\t\tif (event.entry.type === \"message\") turnEntryIds.add(event.entry.id);\n\t\t\t\treturn;\n\t\t\tcase \"queue_update\":\n\t\t\t\tnativeQueuedMessages = event.queues.filter((item) => item.kind !== \"write\").length;\n\t\t\t\treturn;\n\t\t\tcase \"turn_end\": {\n\t\t\t\tconst entries = (sessionManager?.getBranch() ?? []).filter((entry) => turnEntryIds.has(sessionSync?.toHarnessId(entry.id) ?? entry.id));\n\t\t\t\tturnEntryIds.clear();\n\t\t\t\tconst messageEntryId = entries.findLast((entry) => entry?.type === \"message\" && entry.message.role === \"assistant\")?.id;\n\t\t\t\tconst toolResultEntryIds = event.toolResults.map((result) => entries.findLast((entry) => entry?.type === \"message\" && entry.message.role === \"toolResult\" && entry.message.toolCallId === result.toolCallId)?.id);\n\t\t\t\tif (messageEntryId === void 0 || toolResultEntryIds.some((id) => id === void 0)) {\n\t\t\t\t\treport(\"turn_end\", /* @__PURE__ */ new Error(\"The persisted current-turn entries were not available for the Pi boundary\"));\n\t\t\t\t\tturnIndex += 1;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tawait runner?.emitBoundary({\n\t\t\t\t\ttype: \"turn_end\",\n\t\t\t\t\tturnIndex,\n\t\t\t\t\tmessage: event.message,\n\t\t\t\t\ttoolResults: event.toolResults,\n\t\t\t\t\tmessageEntryId,\n\t\t\t\t\ttoolResultEntryIds,\n\t\t\t\t\toutcome: event.message.stopReason === \"aborted\" ? \"aborted\" : event.message.stopReason === \"error\" ? \"error\" : \"completed\"\n\t\t\t\t}, turnBoundaryContext);\n\t\t\t\tturnIndex += 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcase \"run_end\": {\n\t\t\t\tif (event.successorActive) return;\n\t\t\t\t++pendingRead;\n\t\t\t\tconst state = await runtime.readState();\n\t\t\t\t++pendingRead;\n\t\t\t\tif (!shuttingDown) retainedQueuedMessages = Number(state.pendingMessageCount) || 0;\n\t\t\t\tcurrentOperation = null;\n\t\t\t\tif (logicalLoopActive) {\n\t\t\t\t\tlogicalLoopActive = false;\n\t\t\t\t\tawait runner?.emit({\n\t\t\t\t\t\ttype: \"agent_end\",\n\t\t\t\t\t\tmessages: runMessages\n\t\t\t\t\t});\n\t\t\t\t\tawait runner?.emit({\n\t\t\t\t\t\ttype: \"agent_settled\",\n\t\t\t\t\t\taborted: event.aborted === true\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\trunMessages = [];\n\t\t\t\tturnEntryIds.clear();\n\t\t\t\ttoolArguments.clear();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcase \"compaction_start\":\n\t\t\t\tcurrentOperation = \"compaction\";\n\t\t\t\treturn;\n\t\t\tcase \"compaction_end\": {\n\t\t\t\tcurrentOperation = null;\n\t\t\t\tconst fromExtension = compactionFromExtension;\n\t\t\t\tcompactionFromExtension = false;\n\t\t\t\tif (event.status !== \"completed\") {\n\t\t\t\t\tawait runner?.emit({\n\t\t\t\t\t\ttype: \"session_compact_failed\",\n\t\t\t\t\t\treason: event.reason,\n\t\t\t\t\t\t...event.status === \"failed\" ? { errorMessage: event.error?.message } : {},\n\t\t\t\t\t\taborted: event.status === \"aborted\",\n\t\t\t\t\t\twillRetry: event.reason === \"overflow\",\n\t\t\t\t\t\tfromExtension\n\t\t\t\t\t});\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcontextTokens = null;\n\t\t\t\tif (!runner?.hasHandlers(\"session_compact\")) return;\n\t\t\t\tif (event.entryId !== void 0 && event.entryId !== windowedCompaction && sessionManager !== void 0) {\n\t\t\t\t\tconst lane = runtime.lane;\n\t\t\t\t\tconst epoch = backfillEpoch;\n\t\t\t\t\tconst before = new Set(sessionManager.getEntries().map((entry) => entry.id));\n\t\t\t\t\tconst pending = sessionSync?.pending() ?? [];\n\t\t\t\t\tconst window = await readPiWindow(runtime);\n\t\t\t\t\tif (epoch !== backfillEpoch || runtime.lane !== lane) return;\n\t\t\t\t\tsessionSync?.replace(window.entries, [...pending, ...sessionManager.getEntries().filter((entry) => !before.has(entry.id))]);\n\t\t\t\t\twindowedCompaction = window.entries.findLast((entry) => entry.type === \"compaction\")?.id;\n\t\t\t\t}\n\t\t\t\tconst compactionEntry = event.entryId === void 0 ? void 0 : await piCompactionEntry(event.entryId);\n\t\t\t\tif (compactionEntry === void 0) return;\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"session_compact\",\n\t\t\t\t\tcompactionEntry,\n\t\t\t\t\tfromExtension,\n\t\t\t\t\treason: event.reason,\n\t\t\t\t\twillRetry: event.reason === \"overflow\"\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcase \"navigation_start\":\n\t\t\t\tresetBackfill();\n\t\t\t\tturnEntryIds.clear();\n\t\t\t\tcurrentOperation = \"navigation\";\n\t\t\t\treturn;\n\t\t\tcase \"navigation_end\": {\n\t\t\t\tresetBackfill();\n\t\t\t\tcurrentOperation = null;\n\t\t\t\tif (event.status !== \"completed\") return;\n\t\t\t\tif (sessionManager !== void 0) {\n\t\t\t\t\tconst lane = runtime.lane;\n\t\t\t\t\tconst epoch = backfillEpoch;\n\t\t\t\t\tconst before = new Set(sessionManager.getEntries().map((entry) => entry.id));\n\t\t\t\t\tconst pending = sessionSync?.pending() ?? [];\n\t\t\t\t\tconst window = await readPiWindow(runtime);\n\t\t\t\t\tif (epoch !== backfillEpoch || runtime.lane !== lane) return;\n\t\t\t\t\tsessionSync?.replace(window.entries, [...pending, ...sessionManager.getEntries().filter((entry) => !before.has(entry.id))]);\n\t\t\t\t\tcontextTokens = window.contextTokens;\n\t\t\t\t\twindowedCompaction = window.entries.findLast((entry) => entry.type === \"compaction\")?.id;\n\t\t\t\t}\n\t\t\t\tconst newLeafId = sessionSync?.toPiId(event.tipId) ?? event.tipId;\n\t\t\t\tconst oldLeafId = sessionSync?.toPiId(event.fromTipId) ?? event.fromTipId;\n\t\t\t\tif (newLeafId === null) sessionManager?.resetLeaf();\n\t\t\t\telse if (sessionManager?.getEntry(newLeafId) !== void 0) sessionManager.branch(newLeafId);\n\t\t\t\tconst leaf = newLeafId === null ? void 0 : sessionManager?.getEntry(newLeafId);\n\t\t\t\tawait runner?.emit({\n\t\t\t\t\ttype: \"session_tree\",\n\t\t\t\t\tnewLeafId,\n\t\t\t\t\toldLeafId,\n\t\t\t\t\t...leaf?.type === \"branch_summary\" ? { summaryEntry: leaf } : {}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcase \"value_update\":\n\t\t\t\tif (event.value === \"session_name\") await runner?.emit({\n\t\t\t\t\ttype: \"session_info_changed\",\n\t\t\t\t\tname: event.name\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tcase \"config_update\":\n\t\t\t\tif (event.property === \"model\") {\n\t\t\t\t\tconst model = models.getModel(event.value.provider, event.value.modelId);\n\t\t\t\t\tconst previous = event.previous;\n\t\t\t\t\tconst previousModel = typeof previous?.provider === \"string\" && typeof previous.modelId === \"string\" ? models.getModel(previous.provider, previous.modelId) : void 0;\n\t\t\t\t\tif (model !== void 0) await runner?.emit({\n\t\t\t\t\t\ttype: \"model_select\",\n\t\t\t\t\t\tmodel,\n\t\t\t\t\t\tpreviousModel,\n\t\t\t\t\t\tsource: \"set\"\n\t\t\t\t\t});\n\t\t\t\t} else if (event.property === \"thinkingLevel\") await runner?.emit({\n\t\t\t\t\ttype: \"thinking_level_select\",\n\t\t\t\t\tlevel: event.value,\n\t\t\t\t\tpreviousLevel: event.previous\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\tdefault: return;\n\t\t}\n\t};\n\tconst onHarnessEvent = (event) => handleHarnessEvent(event).catch((error) => report(`event '${event.type}'`, error));\n\tconst transformContext = async (messages) => {\n\t\tif (runner === void 0) return messages;\n\t\tconst lane = runtime.lane;\n\t\tconst startedNonEmpty = sessionManager !== void 0 && sessionManager.getLeafId() !== null;\n\t\tif (!startedNonEmpty || backfill?.lane !== lane) resetBackfill();\n\t\tconst previous = backfill;\n\t\tconst epoch = backfillEpoch;\n\t\tlet beforeSweep = previous === void 0 ? new Set(sessionManager?.getEntries().map((entry) => entry.id)) : void 0;\n\t\tlet pendingAtSweep = previous === void 0 ? sessionSync?.pending() ?? [] : [];\n\t\tlet swept = previous === void 0;\n\t\tlet raw = previous === void 0 ? await readPiWindow(runtime) : await runtime.readEntriesFrom(previous.seq);\n\t\tconst compaction = raw.entries.findLast((entry) => entry.type === \"compaction\");\n\t\tif (previous !== void 0 && (raw.entries[0]?.seq !== previous.seq || compaction !== void 0 && compaction.id !== windowedCompaction)) {\n\t\t\tbeforeSweep = new Set(sessionManager?.getEntries().map((entry) => entry.id));\n\t\t\tpendingAtSweep = sessionSync?.pending() ?? [];\n\t\t\traw = await readPiWindow(runtime);\n\t\t\tswept = true;\n\t\t}\n\t\tconst { entries, leafId } = raw;\n\t\tif (epoch === backfillEpoch && runtime.lane === lane) {\n\t\t\tif (swept && entries.length > 0) sessionSync?.replace(entries, [...pendingAtSweep, ...sessionManager?.getEntries().filter((entry) => !beforeSweep?.has(entry.id)) ?? []]);\n\t\t\telse {\n\t\t\t\tfor (const entry of entries) sessionSync?.append(entry);\n\t\t\t\tconst leaf = sessionSync?.toPiId(leafId) ?? leafId;\n\t\t\t\tif (leaf !== null && sessionManager?.getEntry(leaf) !== void 0) sessionManager?.branch(leaf);\n\t\t\t\tif (entries.some((entry) => entry.type === \"compaction\")) sessionSync?.compact();\n\t\t\t}\n\t\t\tif (swept) windowedCompaction = entries.findLast((entry) => entry.type === \"compaction\")?.id;\n\t\t}\n\t\tconst leaf = sessionSync?.localLeaf(sessionManager?.getLeafId() ?? null) ?? (swept ? sessionManager?.getLeafId() : void 0) ?? sessionSync?.toPiId(leafId) ?? leafId;\n\t\tif (epoch === backfillEpoch && runtime.lane === lane && sessionManager && leaf !== null && sessionManager.getEntry(leaf) !== void 0) sessionManager.branch(leaf);\n\t\tconst seq = entries.at(-1)?.seq;\n\t\tconst transformed = runner.hasHandlers(\"context\") || runner.hasHandlers(\"context_with_system\") ? await runner.emitContext(messages) : messages;\n\t\tif (startedNonEmpty && epoch === backfillEpoch && runtime.lane === lane && backfill === previous) backfill = seq === void 0 ? void 0 : {\n\t\t\tlane,\n\t\t\tseq\n\t\t};\n\t\treturn transformed;\n\t};\n\tconst beforeCompaction = async (event) => {\n\t\tif (runner === void 0 || !runner.hasHandlers(\"session_before_compact\")) return void 0;\n\t\tconst branchEntries = piBranchEntries((await readPiWindow(runtime)).entries);\n\t\tconst result = await runner.emit({\n\t\t\ttype: \"session_before_compact\",\n\t\t\tpreparation: toPiCompactionPreparation(event.preparation),\n\t\t\tbranchEntries,\n\t\t\t...event.customInstructions === void 0 ? {} : { customInstructions: event.customInstructions },\n\t\t\treason: event.reason,\n\t\t\twillRetry: event.reason === \"overflow\",\n\t\t\tsignal: new AbortController().signal\n\t\t});\n\t\tif (result?.cancel === true) return { decline: true };\n\t\tif (result?.compaction === void 0) return void 0;\n\t\tcompactionFromExtension = true;\n\t\treturn { compaction: toHarnessCompactResult(result.compaction, branchEntries) };\n\t};\n\treturn {\n\t\ttransformContext,\n\t\tbeforeCompaction,\n\t\tget tools() {\n\t\t\treturn activeTools();\n\t\t},\n\t\tget toolGuidance() {\n\t\t\treturn registered.filter((tool) => activeNames.has(tool.definition.name)).map((tool) => ({\n\t\t\t\tname: tool.definition.name,\n\t\t\t\t...tool.definition.promptSnippet === void 0 ? {} : { promptSnippet: tool.definition.promptSnippet },\n\t\t\t\t...tool.definition.promptGuidelines === void 0 ? {} : { promptGuidelines: tool.definition.promptGuidelines }\n\t\t\t}));\n\t\t},\n\t\tget skills() {\n\t\t\treturn skills;\n\t\t},\n\t\tgetService(name) {\n\t\t\treturn cordisConnection?.root.get(name);\n\t\t},\n\t\texecuteTool(name, toolCallId, parameters, signal, onUpdate) {\n\t\t\tconst tool = registered.find((entry) => entry.definition.name === name);\n\t\t\tif (tool === void 0) throw new Error(`Unknown Pi extension tool '${name}'`);\n\t\t\treturn executePiTool(tool, requireRunner, (candidate) => activeNames.has(candidate), toolCallId, parameters, signal, onUpdate);\n\t\t},\n\t\tasync load() {\n\t\t\tif (runner !== void 0) throw new Error(\"The Pi extension host was loaded more than once\");\n\t\t\tif (preload === void 0 || preload.extensions.length === 0) return;\n\t\t\tconst window = await readPiWindow(runtime);\n\t\t\tconst { entries } = window;\n\t\t\tcontextTokens = window.contextTokens;\n\t\t\twindowedCompaction = entries.findLast((entry) => entry.type === \"compaction\")?.id;\n\t\t\tconst loaded = [...preload.extensions];\n\t\t\tsessionManager = await createBridgedSessionManager(runtime, cwd, options.onNotice, entries);\n\t\t\tconst manager = sessionManager;\n\t\t\tsessionSync = bridgedSessionSync.get(manager);\n\t\t\tif (sessionSync === void 0) throw new Error(\"The live Pi session bridge was not initialized\");\n\t\t\trunner = new ExtensionRunner(loaded, preload.runtime, cwd, manager, new ModelRegistry(models));\n\t\t\trunner.setUIContext(createHeadlessUiContext(options.client, resolveDefaultTheme(runner)), \"rpc\");\n\t\t\trunner.bindCore(actions, contextActions);\n\t\t\tregistered = loaded.flatMap((extension) => [...extension.tools.values()]);\n\t\t\ttools = registered.map((tool) => toHarnessTool(tool, requireRunner, (name) => activeNames.has(name)));\n\t\t\tactiveNames = new Set(tools.map((tool) => tool.name));\n\t\t\tunsubscribeEvents = runtime.onEvent(onHarnessEvent);\n\t\t\tcurrentOperation = (await runtime.readLifecycle()).operation?.kind ?? null;\n\t\t\tretainedQueuedMessages = Number((await runtime.readState()).pendingMessageCount) || 0;\n\t\t\tunsubscribeLifecycle = runtime.onPresentationFrame((frame) => {\n\t\t\t\tif (frame.type !== \"lifecycle_update\" || !frame.lifecycle || typeof frame.lifecycle !== \"object\") return;\n\t\t\t\tconst lifecycle = frame.lifecycle;\n\t\t\t\tconst read = ++pendingRead;\n\t\t\t\truntime.readState().then((state) => {\n\t\t\t\t\tif (!shuttingDown && read === pendingRead) retainedQueuedMessages = Number(state.pendingMessageCount) || 0;\n\t\t\t\t}).catch((error) => report(\"pending_messages\", error));\n\t\t\t\tcurrentOperation = lifecycle.operation?.kind ?? null;\n\t\t\t});\n\t\t\tif (preload.events !== void 0) {\n\t\t\t\tcordisConnection = await connectPoCordisHost({ events: preload.events }, \"headless-pi-extension-host\", { optional: true });\n\t\t\t\tif (cordisConnection !== void 0 && options.serverServices !== void 0) {\n\t\t\t\t\tif (options.serverServices.sessionId !== runtime.sessionId) throw new Error(\"Server services belong to a different session\");\n\t\t\t\t\tcordisConnection.root.provide(PO_CORDIS_SERVER_SERVICES, options.serverServices);\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait runner.emit({\n\t\t\t\ttype: \"session_start\",\n\t\t\t\treason: \"startup\"\n\t\t\t});\n\t\t\tskills = await loadPiSkills(runner, cwd, agentDir, options.onNotice);\n\t\t},\n\t\tasync shutdown() {\n\t\t\tresetBackfill();\n\t\t\tshuttingDown = true;\n\t\t\tpendingRead++;\n\t\t\tunsubscribeEvents?.();\n\t\t\tunsubscribeEvents = void 0;\n\t\t\tunsubscribeLifecycle?.();\n\t\t\tunsubscribeLifecycle = void 0;\n\t\t\tsessionSync = void 0;\n\t\t\tsessionManager = void 0;\n\t\t\trunMessages = [];\n\t\t\tturnEntryIds.clear();\n\t\t\ttoolArguments.clear();\n\t\t\tconst connection = cordisConnection;\n\t\t\tcordisConnection = void 0;\n\t\t\ttry {\n\t\t\t\tif (runner !== void 0) await runner.emit({\n\t\t\t\t\ttype: \"session_shutdown\",\n\t\t\t\t\treason: \"quit\"\n\t\t\t\t});\n\t\t\t} finally {\n\t\t\t\tawait connection?.dispose();\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\nexport { createBridgedSessionManager, createPiExtensionHost, preloadPiExtensions, resolvePiSettingsPackageEntries };\n\n//# sourceMappingURL=index.mjs.map","import { defineServiceContract } from \"./serverScope.mjs\";\n//#region src/schemas/packageApi.ts\nconst PO_API_SCOPES = [\n\t\"global\",\n\t\"workspace\",\n\t\"session\"\n];\n/** Canonical public prefix. Scope selection never falls through to a parent. */\nfunction poApiMountPath(mount) {\n\tif (mount.scope === \"global\") return \"/api/plugins\";\n\tif (mount.scope === \"workspace\") return `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/plugins`;\n\tif (!mount.workspaceId) throw new Error(\"A session API path requires its workspace identity.\");\n\treturn `/api/workspaces/${encodeURIComponent(mount.workspaceId)}/sessions/${encodeURIComponent(mount.sessionId)}/plugins`;\n}\n/** Only canonical resource paths may select a protocol listener. */\nfunction parsePoSocketPath(pathname) {\n\tif (pathname === \"/api/ws\") return { scope: \"global\" };\n\tconst match = /^\\/api\\/workspaces\\/([^/]+)(?:\\/sessions\\/([^/]+))?\\/ws$/u.exec(pathname);\n\tif (!match) return void 0;\n\ttry {\n\t\tconst workspaceId = decodeURIComponent(match[1]);\n\t\treturn match[2] === void 0 ? {\n\t\t\tscope: \"workspace\",\n\t\t\tworkspaceId\n\t\t} : {\n\t\t\tscope: \"session\",\n\t\t\tworkspaceId,\n\t\t\tsessionId: decodeURIComponent(match[2])\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\n/** The segment an API is mounted under, below this prefix. */\nconst PO_API_ROUTE_PREFIX = \"/api/plugins\";\n/** Selects the hub API bundle that owns the named cockpit session. */\nconst PO_HUB_API_SESSION_QUERY_PARAM = \"hubSession\";\n/** Trusted caller headers written only by the cockpit-to-session proxy. */\nconst PO_API_CALLER_LOCALITY_HEADER = \"x-po-api-caller-locality\";\nconst PO_API_CALLER_DEVICE_ID_HEADER = \"x-po-api-caller-device-id\";\nconst PO_API_CALLER_STEP_UP_HEADER = \"x-po-api-caller-step-up\";\n/** Set only after destination verification, never accepted from an untrusted proxy. */\nconst PO_API_CALLER_FEDERATION_HEADER = \"x-po-api-caller-federation\";\nconst PO_API_CALLER_HEADERS = [\n\tPO_API_CALLER_LOCALITY_HEADER,\n\tPO_API_CALLER_DEVICE_ID_HEADER,\n\tPO_API_CALLER_STEP_UP_HEADER,\n\tPO_API_CALLER_FEDERATION_HEADER\n];\nfunction federationCallerFrom(headers) {\n\tconst raw = headers.get(PO_API_CALLER_FEDERATION_HEADER);\n\tif (raw === null) return void 0;\n\ttry {\n\t\tconst value = JSON.parse(raw);\n\t\tif (typeof value.principal?.issuer !== \"string\" || !value.principal.issuer || typeof value.principal.subject !== \"string\" || !value.principal.subject || typeof value.org !== \"string\" || !value.org || typeof value.device?.keyId !== \"string\" || !value.device.keyId || value.via !== void 0 && (typeof value.via.callingHostId !== \"string\" || !value.via.callingHostId || typeof value.via.grantId !== \"string\" || !value.via.grantId)) return void 0;\n\t\treturn {\n\t\t\tprincipal: {\n\t\t\t\tissuer: value.principal.issuer,\n\t\t\t\tsubject: value.principal.subject\n\t\t\t},\n\t\t\torg: value.org,\n\t\t\tdevice: { keyId: value.device.keyId },\n\t\t\t...value.via ? { via: { ...value.via } } : {}\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\n/** Reads the proxy-authenticated caller identity, rejecting partial or contradictory stamps. */\nfunction poApiCallerFrom(headers) {\n\tconst federation = federationCallerFrom(headers);\n\tif (headers.has(\"x-po-api-caller-federation\") && !federation) return void 0;\n\tconst locality = headers.get(PO_API_CALLER_LOCALITY_HEADER);\n\tconst deviceId = headers.get(PO_API_CALLER_DEVICE_ID_HEADER);\n\tconst stepUp = headers.get(PO_API_CALLER_STEP_UP_HEADER);\n\tif (locality === \"local\") return deviceId === null && stepUp === \"not-required\" && !federation ? {\n\t\tlocality,\n\t\tstepUp\n\t} : void 0;\n\tif (locality === \"remote\" && deviceId !== null && deviceId !== \"\" && (stepUp === \"not-required\" || stepUp === \"verified\" || stepUp === \"unavailable\")) return {\n\t\tlocality,\n\t\tdeviceId,\n\t\tstepUp,\n\t\t...federation\n\t};\n}\nconst PO_EDIT_PRESENCE_SERVICE = \"po/edit-presence\";\nconst PO_EDIT_PRESENCE_CONTRACT = defineServiceContract(PO_EDIT_PRESENCE_SERVICE, { scope: \"workspace\" });\n/** Why shareFile rejects while the host has no public tunnel origin. */\nconst PO_SHARE_FILE_REMOTE_OFF_MESSAGE = \"Remote access is off, so Po cannot share files with remote MCP servers. Turn it on and retry.\";\n//#endregion\nexport { PO_API_CALLER_DEVICE_ID_HEADER, PO_API_CALLER_FEDERATION_HEADER, PO_API_CALLER_HEADERS, PO_API_CALLER_LOCALITY_HEADER, PO_API_CALLER_STEP_UP_HEADER, PO_API_ROUTE_PREFIX, PO_API_SCOPES, PO_EDIT_PRESENCE_CONTRACT, PO_EDIT_PRESENCE_SERVICE, PO_HUB_API_SESSION_QUERY_PARAM, PO_SHARE_FILE_REMOTE_OFF_MESSAGE, parsePoSocketPath, poApiCallerFrom, poApiMountPath };\n\n//# sourceMappingURL=packageApi.mjs.map","import { piAgentDirectory } from \"./src/services/piSettings/core.mjs\";\nimport \"./runtimePiSettings.mjs\";\nimport { randomUUID } from \"node:crypto\";\nimport { mkdir } from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { DatabaseSync } from \"node:sqlite\";\nimport { setTimeout as setTimeout$1 } from \"node:timers/promises\";\n//#region src/services/executionBudget/index.ts\nconst MAX_QUEUED_JOBS = 128;\nconst RETRY_MS = 100;\nfunction busy(error) {\n\treturn error instanceof Error && /database (?:is )?(?:locked|busy)/i.test(error.message);\n}\nfunction alive(pid) {\n\tif (pid === null || !Number.isSafeInteger(pid) || pid < 1) return false;\n\ttry {\n\t\tprocess.kill(pid, 0);\n\t\treturn true;\n\t} catch (error) {\n\t\treturn !(error instanceof Error && \"code\" in error && error.code === \"ESRCH\");\n\t}\n}\n/** A local FIFO with atomic host-wide permits. SQLite never waits on its calling thread. */\nfunction createExecutionBudget(limit = 2, databasePath = \":memory:\") {\n\tif (!Number.isSafeInteger(limit) || limit < 1) throw new RangeError(\"Heavy-job limit must be a positive integer\");\n\tconst owned = /* @__PURE__ */ new Set();\n\tconst released = /* @__PURE__ */ new Set();\n\tconst queue = [];\n\tlet database;\n\tlet directoryReady;\n\tlet closed = false;\n\tlet draining = false;\n\tlet timer;\n\tconst connection = () => {\n\t\tif (database) return database;\n\t\tconst next = new DatabaseSync(databasePath, { timeout: 0 });\n\t\ttry {\n\t\t\tnext.exec(\"PRAGMA journal_mode=WAL; PRAGMA synchronous=NORMAL; CREATE TABLE IF NOT EXISTS execution_leases (token TEXT PRIMARY KEY, owner_pid INTEGER NOT NULL, child_pid INTEGER, job_limit INTEGER NOT NULL)\");\n\t\t\tdatabase = next;\n\t\t\treturn next;\n\t\t} catch (error) {\n\t\t\tnext.close();\n\t\t\tthrow error;\n\t\t}\n\t};\n\tconst claim = () => {\n\t\tif (owned.size >= limit) return void 0;\n\t\tlet db;\n\t\tlet transaction = false;\n\t\ttry {\n\t\t\tdb = connection();\n\t\t\tdb.exec(\"BEGIN IMMEDIATE\");\n\t\t\ttransaction = true;\n\t\t\tconst rows = db.prepare(\"SELECT token, owner_pid, child_pid, job_limit FROM execution_leases\").all();\n\t\t\tconst live = [];\n\t\t\tfor (const row of rows) if (alive(row.owner_pid) || alive(row.child_pid)) live.push(row);\n\t\t\telse db.prepare(\"DELETE FROM execution_leases WHERE token = ?\").run(row.token);\n\t\t\tconst effectiveLimit = Math.min(limit, ...live.map((row) => row.job_limit));\n\t\t\tconst token = live.length < effectiveLimit ? randomUUID() : void 0;\n\t\t\tif (token) db.prepare(\"INSERT INTO execution_leases VALUES (?, ?, NULL, ?)\").run(token, process.pid, limit);\n\t\t\tdb.exec(\"COMMIT\");\n\t\t\ttransaction = false;\n\t\t\treturn token;\n\t\t} catch (error) {\n\t\t\tif (transaction) db?.exec(\"ROLLBACK\");\n\t\t\tif (busy(error)) return void 0;\n\t\t\tthrow error;\n\t\t}\n\t};\n\tconst lease = (token) => {\n\t\towned.add(token);\n\t\tconst release = () => {\n\t\t\tif (!owned.has(token) || released.has(token)) return;\n\t\t\treleased.add(token);\n\t\t\tdrain();\n\t\t};\n\t\trelease.attachProcess = async (pid) => {\n\t\t\tif (!Number.isSafeInteger(pid) || pid < 1) throw new RangeError(\"Child PID must be a positive integer\");\n\t\t\tfor (let attempt = 0;; attempt += 1) {\n\t\t\t\tif (!owned.has(token) || released.has(token)) return;\n\t\t\t\ttry {\n\t\t\t\t\tconnection().prepare(\"UPDATE execution_leases SET child_pid = ? WHERE token = ?\").run(pid, token);\n\t\t\t\t\treturn;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!busy(error) || attempt >= 49) throw error;\n\t\t\t\t\tawait setTimeout$1(RETRY_MS);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn release;\n\t};\n\tconst schedule = () => {\n\t\tif (timer) {\n\t\t\tif (queue.length) timer.ref();\n\t\t\telse timer.unref();\n\t\t\treturn;\n\t\t}\n\t\tif (!queue.length && !released.size) return;\n\t\ttimer = setTimeout(() => {\n\t\t\ttimer = void 0;\n\t\t\tdrain();\n\t\t}, RETRY_MS);\n\t\tif (!queue.length) timer.unref();\n\t};\n\tconst drain = () => {\n\t\tif (draining) return;\n\t\tdraining = true;\n\t\ttry {\n\t\t\tfor (const token of released) try {\n\t\t\t\tconnection().prepare(\"DELETE FROM execution_leases WHERE token = ?\").run(token);\n\t\t\t\treleased.delete(token);\n\t\t\t\towned.delete(token);\n\t\t\t} catch (error) {\n\t\t\t\tif (!busy(error)) for (const waiter of queue.splice(0)) {\n\t\t\t\t\twaiter.detach();\n\t\t\t\t\twaiter.reject(error);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\twhile (!closed && queue.length && owned.size < limit) {\n\t\t\t\tconst waiter = queue[0];\n\t\t\t\ttry {\n\t\t\t\t\tconst token = claim();\n\t\t\t\t\tif (!token) break;\n\t\t\t\t\tqueue.shift();\n\t\t\t\t\twaiter.detach();\n\t\t\t\t\twaiter.resolve(lease(token));\n\t\t\t\t} catch (error) {\n\t\t\t\t\tqueue.shift();\n\t\t\t\t\twaiter.detach();\n\t\t\t\t\twaiter.reject(error);\n\t\t\t\t}\n\t\t\t}\n\t\t} finally {\n\t\t\tdraining = false;\n\t\t\tif (!queue.length && !released.size && timer) {\n\t\t\t\tclearTimeout(timer);\n\t\t\t\ttimer = void 0;\n\t\t\t}\n\t\t\tif (closed && !owned.size) {\n\t\t\t\tdatabase?.close();\n\t\t\t\tdatabase = void 0;\n\t\t\t}\n\t\t\tschedule();\n\t\t}\n\t};\n\treturn {\n\t\tasync acquire(signal) {\n\t\t\tif (closed) throw new Error(\"The host execution budget is closed\");\n\t\t\tsignal?.throwIfAborted();\n\t\t\tif (databasePath !== \":memory:\") {\n\t\t\t\tawait (directoryReady ??= mkdir(path.dirname(databasePath), {\n\t\t\t\t\trecursive: true,\n\t\t\t\t\tmode: 448\n\t\t\t\t}).catch((error) => {\n\t\t\t\t\tdirectoryReady = void 0;\n\t\t\t\t\tthrow error;\n\t\t\t\t}));\n\t\t\t\tif (closed) throw new Error(\"The host execution budget is closed\");\n\t\t\t\tsignal?.throwIfAborted();\n\t\t\t}\n\t\t\tif (!queue.length) {\n\t\t\t\tconst token = claim();\n\t\t\t\tif (token) return lease(token);\n\t\t\t}\n\t\t\tif (queue.length >= MAX_QUEUED_JOBS) throw new Error(\"The host heavy-job queue is full\");\n\t\t\treturn new Promise((resolve, reject) => {\n\t\t\t\tconst onAbort = () => {\n\t\t\t\t\tconst index = queue.indexOf(waiter);\n\t\t\t\t\tif (index >= 0) queue.splice(index, 1);\n\t\t\t\t\twaiter.detach();\n\t\t\t\t\treject(signal?.reason);\n\t\t\t\t\tdrain();\n\t\t\t\t};\n\t\t\t\tconst waiter = {\n\t\t\t\t\tsignal,\n\t\t\t\t\tresolve,\n\t\t\t\t\treject,\n\t\t\t\t\tdetach: () => signal?.removeEventListener(\"abort\", onAbort)\n\t\t\t\t};\n\t\t\t\tqueue.push(waiter);\n\t\t\t\tsignal?.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\t\tif (signal?.aborted) onAbort();\n\t\t\t\telse schedule();\n\t\t\t});\n\t\t},\n\t\tgetSnapshot: () => ({\n\t\t\trunning: owned.size,\n\t\t\tqueued: queue.length,\n\t\t\tlimit\n\t\t}),\n\t\tclose() {\n\t\t\tif (closed) return;\n\t\t\tclosed = true;\n\t\t\tfor (const waiter of queue.splice(0)) {\n\t\t\t\twaiter.detach();\n\t\t\t\twaiter.reject(/* @__PURE__ */ new Error(\"The host execution budget is closed\"));\n\t\t\t}\n\t\t\tdrain();\n\t\t}\n\t};\n}\n/** Reused across standalone sessions in a process; server-owned sessions pass their budget explicitly. */\nconst processBudgets = /* @__PURE__ */ new Map();\nfunction budgetConfig(environment) {\n\treturn {\n\t\tfile: environment.PO_RUNNER_BUDGET_DB ?? path.join(piAgentDirectory(environment, environment.HOME ?? os.homedir()), \"execution-budget.db\"),\n\t\tlimit: Number(environment.PO_RUNNER_MAX_HEAVY_JOBS ?? 2)\n\t};\n}\n/** An independently owned handle sharing the same host-wide SQLite admission. */\nfunction createServerExecutionBudget(environment) {\n\tconst { file, limit } = budgetConfig(environment);\n\treturn createExecutionBudget(limit, file);\n}\nfunction sharedExecutionBudget(environment) {\n\tconst { file, limit } = budgetConfig(environment);\n\tconst key = `${file}:${limit}`;\n\tlet budget = processBudgets.get(key);\n\tif (!budget) {\n\t\tbudget = createExecutionBudget(limit, file);\n\t\tconst close = budget.close.bind(budget);\n\t\tbudget.close = () => {\n\t\t\tprocessBudgets.delete(key);\n\t\t\tclose();\n\t\t};\n\t\tprocessBudgets.set(key, budget);\n\t}\n\treturn budget;\n}\n//#endregion\nexport { createExecutionBudget, createServerExecutionBudget, sharedExecutionBudget };\n\n//# sourceMappingURL=executionBudget.mjs.map","const e=`/bundle-manifest.json`,t=2,n=`/index.html`,r=`/composition.js`,i=`text/javascript`,a=4194304,o=/^\\/[A-Za-z0-9._-]+\\.js$/u,s=/^po\\/[a-z0-9-]+\\/v[1-9][0-9]*$/u,c=/^[0-9a-f]{64}$/u,l=/^[A-Za-z0-9_-]+$/u,u=/^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$/u;function d(e,t){let n=Object.keys(e).sort();return n.length===t.length&&n.every((e,n)=>e===t[n])}function f(e,t){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=t}function p(e){return typeof e!=`string`||e.length<2||!e.startsWith(`/`)||e.includes(`\\\\`)||e.includes(`\\0`)||e.includes(`?`)||e.includes(`#`)||/[^\\x21-\\x7e]/u.test(e)||e.includes(`//`)||/%(?![0-9a-f]{2})/iu.test(e)||/%(?:2e|2f|5c)/iu.test(e)?!1:e.split(`/`).slice(1).every(e=>e!==``&&e!==`.`&&e!==`..`)}function m(e){let t=[...e.assets].sort((e,t)=>e.path<t.path?-1:+(e.path>t.path)).map(e=>`${e.path}\\0${e.sha256}\\0${String(e.byteLength)}\\0${e.contentType}`);return[String(e.version),String(e.revision),String(e.builtAt),...t].join(`\n`)}function h(e,t){if(!s.test(e))throw Error(`invalid attestation tag: ${e}`);if(!Array.isArray(t)||!t.every(e=>typeof e==`string`))throw Error(`invalid attestation fields for ${e}`);return new TextEncoder().encode(`${e}\\n${JSON.stringify(t)}`)}function g(e,t,r){return r===`web`?t.has(n):r===`native`&&e.every(e=>o.test(e.path)&&e.contentType===`text/javascript`&&e.byteLength<=4194304)}function _(e,t=`web`){if(typeof e!=`object`||!e||!d(e,[`assets`,`builtAt`,`revision`,`version`]))return!1;let n=e;if(n.version!==2||!f(n.revision,1)||!f(n.builtAt,0)||!Array.isArray(n.assets)||n.assets.length===0)return!1;let r=/* @__PURE__ */ new Set;for(let e of n.assets){if(typeof e!=`object`||!e||!d(e,[`byteLength`,`contentType`,`path`,`sha256`]))return!1;let t=e;if(!p(t.path)||r.has(t.path)||typeof t.sha256!=`string`||!c.test(t.sha256)||!f(t.byteLength,0)||typeof t.contentType!=`string`||!u.test(t.contentType))return!1;r.add(t.path)}return g(n.assets,r,t)}function v(e,t=`web`){if(typeof e!=`object`||!e||!d(e,[`manifest`,`publicKey`,`signature`]))return!1;let n=e;return _(n.manifest,t)&&typeof n.signature==`string`&&n.signature.length===86&&l.test(n.signature)&&typeof n.publicKey==`string`&&n.publicKey.length<=512&&l.test(n.publicKey)}function y(e,t){return e.assets.find(e=>e.path===t)}function b(e,t){return y(e,t)?.sha256}export{s as ATTESTATION_TAG,e as BUNDLE_MANIFEST_ROUTE,t as BUNDLE_MANIFEST_VERSION,a as NATIVE_COMPOSITION_MAX_BYTES,i as NATIVE_ENTRY_CONTENT_TYPE,r as NATIVE_ENTRY_PATH,n as WEB_ENTRY_PATH,y as assetFor,h as attestationBytes,m as canonicalManifest,b as digestFor,_ as isBundleManifest,v as isSignedBundleManifest};\n//# sourceMappingURL=bundleManifest.mjs.map","import { API_BASE_PATH, KIND_QUERY_PARAM, NAME_QUERY_PARAM } from \"./src/constants/contextApi.mjs\";\nimport { findContextItem, readContextDetail } from \"./contextDetailStore.mjs\";\n//#region src/server/contextApi.ts\n/**\n* What one row of the composition actually is, on request.\n*\n* The context panel prices every tool and skill the session carries, and the\n* figure is only half an answer: the reader deciding whether a package earns\n* its thousand tokens wants the prose and the schema behind it. Those are too\n* large to push, and they are wanted one row at a time, so they are served\n* here instead and fetched on the click.\n*\n* The agent writes the store; this reads it. The two are separate processes\n* and the inventory only exists inside the agent, which is the same split\n* every other package-owned API in the repository lives with.\n*/\nfunction json(body, status) {\n\treturn new Response(JSON.stringify(body), {\n\t\tstatus,\n\t\theaders: { \"content-type\": \"application/json; charset=utf-8\" }\n\t});\n}\nfunction isItemKind(value) {\n\treturn value === \"tool\" || value === \"skill\" || value === \"prompt\";\n}\nfunction createContextApi(options = {}) {\n\tconst readDetail = options.readDetail ?? readContextDetail;\n\treturn {\n\t\tfetch(request) {\n\t\t\tconst url = new URL(request.url);\n\t\t\tif (url.pathname !== \"/item\" && url.pathname !== \"/current\") return json({ error: \"No such route.\" }, 404);\n\t\t\tif (request.method !== \"GET\") return json({ error: \"Only GET is served here.\" }, 405);\n\t\t\tif (options.sessionId === void 0) return json({ error: \"This host serves no session.\" }, 404);\n\t\t\tconst itemKind = url.searchParams.get(KIND_QUERY_PARAM);\n\t\t\tconst name = url.searchParams.get(NAME_QUERY_PARAM);\n\t\t\tif (url.pathname === \"/item\") {\n\t\t\t\tif (!isItemKind(itemKind)) return json({ error: \"Ask for a tool, a skill, or the prompt.\" }, 400);\n\t\t\t\tif (name === null || name === \"\") return json({ error: \"Name the item to describe.\" }, 400);\n\t\t\t}\n\t\t\tconst file = options.readDetail ? options.readDetail(options.sessionId, options.environment) : options.environment === void 0 ? void 0 : readDetail(options.sessionId, options.environment);\n\t\t\tif (file === void 0) return json({ error: \"This session has not reported its composition yet.\" }, 404);\n\t\t\tif (url.pathname === \"/current\") {\n\t\t\t\tif (file.projection === void 0) return json({ error: \"This session has not reported its projection yet.\" }, 404);\n\t\t\t\treturn json(file.projection, 200);\n\t\t\t}\n\t\t\tif (!isItemKind(itemKind) || name === null) return json({ error: \"Invalid item.\" }, 400);\n\t\t\tconst item = findContextItem(file, itemKind, name);\n\t\t\tif (item === void 0) return json({ error: `The session carries no ${itemKind} called ${name}.` }, 404);\n\t\t\treturn json({\n\t\t\t\trevision: file.revision,\n\t\t\t\titem\n\t\t\t}, 200);\n\t\t},\n\t\tclose: () => {}\n\t};\n}\nconst api = {\n\tbasePath: API_BASE_PATH,\n\tstart(context) {\n\t\treturn createContextApi({\n\t\t\t...context.sessionId === void 0 ? {} : { sessionId: context.sessionId },\n\t\t\t...context.environment === void 0 ? {} : { environment: context.environment }\n\t\t});\n\t}\n};\n//#endregion\nexport { api, createContextApi };\n\n//# sourceMappingURL=runtimeContextApi.mjs.map","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains an '~refine` keyword\n * @specification None\n */\nexport function IsRefine(value) {\n    return Guard.HasPropertyKey(value, '~refine')\n        && Guard.IsArray(value[\"~refine\"])\n        && Guard.Every(value['~refine'], 0, value => Guard.IsObject(value)\n            && Guard.HasPropertyKey(value, 'check')\n            && Guard.HasPropertyKey(value, 'error')\n            && Guard.IsFunction(value.check)\n            && Guard.IsFunction(value.error));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n/** Returns true if this value is object like */\nexport function IsSchemaObject(value) {\n    return Guard.IsObject(value) && !Guard.IsArray(value);\n}\n/** Returns true if this value is a boolean */\nexport function IsSchemaBoolean(value) {\n    return Guard.IsBoolean(value);\n}\n/** Returns true if this value is schema like */\nexport function IsSchema(value) {\n    return IsSchemaObject(value) || IsSchemaBoolean(value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from '../types/schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid additionalItems property\n * @specification Json Schema 7\n */\nexport function IsAdditionalItems(schema) {\n    return Guard.HasPropertyKey(schema, 'additionalItems')\n        && IsSchema(schema.additionalItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid additionalProperties property\n * @specification Json Schema 7\n */\nexport function IsAdditionalProperties(schema) {\n    return Guard.HasPropertyKey(schema, 'additionalProperties')\n        && IsSchema(schema.additionalProperties);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid allOf property\n * @specification Json Schema 7\n */\nexport function IsAllOf(schema) {\n    return Guard.HasPropertyKey(schema, 'allOf')\n        && Guard.IsArray(schema.allOf)\n        && schema.allOf.every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $anchor property\n */\nexport function IsAnchor(schema) {\n    return Guard.HasPropertyKey(schema, '$anchor')\n        && Guard.IsString(schema.$anchor);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid anyOf property\n * @specification Json Schema 7\n */\nexport function IsAnyOf(schema) {\n    return Guard.HasPropertyKey(schema, 'anyOf')\n        && Guard.IsArray(schema.anyOf)\n        && schema.anyOf.every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid const property\n * @specification Json Schema 7\n */\nexport function IsConst(value) {\n    return Guard.HasPropertyKey(value, 'const');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid contains property\n * @specification Json Schema 7\n */\nexport function IsContains(schema) {\n    return Guard.HasPropertyKey(schema, 'contains')\n        && IsSchema(schema.contains);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid contentMediaType property\n * @specification Json Schema 7\n */\nexport function IsDefault(schema) {\n    return Guard.HasPropertyKey(schema, 'default');\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid dependencies property\n * @specification Json Schema 7\n */\nexport function IsDependencies(schema) {\n    return Guard.HasPropertyKey(schema, 'dependencies')\n        && Guard.IsObject(schema.dependencies)\n        && Object.values(schema.dependencies).every(value => IsSchema(value)\n            || (Guard.IsArray(value) && value.every(value => Guard.IsString(value))));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid dependentRequired property\n * @specification Json Schema 2019-09\n */\nexport function IsDependentRequired(schema) {\n    return Guard.HasPropertyKey(schema, 'dependentRequired')\n        && Guard.IsObject(schema.dependentRequired)\n        && Object.values(schema.dependentRequired).every(value => Guard.IsArray(value)\n            && value.every(value => Guard.IsString(value)));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid dependentRequired property\n * @specification Json Schema 2019-09\n */\nexport function IsDependentSchemas(schema) {\n    return Guard.HasPropertyKey(schema, 'dependentSchemas')\n        && Guard.IsObject(schema.dependentSchemas)\n        && Object.values(schema.dependentSchemas).every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $dynamicAnchor property\n */\nexport function IsDynamicAnchor(schema) {\n    return Guard.HasPropertyKey(schema, '$dynamicAnchor')\n        && Guard.IsString(schema.$dynamicAnchor);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $dynamicRef property\n */\nexport function IsDynamicRef(schema) {\n    return Guard.HasPropertyKey(schema, '$dynamicRef')\n        && Guard.IsString(schema.$dynamicRef);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid else property\n * @specification Json Schema 7\n */\nexport function IsElse(schema) {\n    return Guard.HasPropertyKey(schema, 'else')\n        && IsSchema(schema.else);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid enum property\n * @specification Json Schema 7\n */\nexport function IsEnum(schema) {\n    return Guard.HasPropertyKey(schema, 'enum')\n        && Guard.IsArray(schema.enum);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid exclusiveMaximum property\n * @specification Json Schema 7\n */\nexport function IsExclusiveMaximum(schema) {\n    return Guard.HasPropertyKey(schema, 'exclusiveMaximum')\n        && (Guard.IsNumber(schema.exclusiveMaximum) || Guard.IsBigInt(schema.exclusiveMaximum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid exclusiveMinimum property\n * @specification Json Schema 7\n */\nexport function IsExclusiveMinimum(schema) {\n    return Guard.HasPropertyKey(schema, 'exclusiveMinimum')\n        && (Guard.IsNumber(schema.exclusiveMinimum) || Guard.IsBigInt(schema.exclusiveMinimum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid format property\n * @specification Json Schema 7\n */\nexport function IsFormat(schema) {\n    return Guard.HasPropertyKey(schema, 'format')\n        && Guard.IsString(schema.format);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $id property\n * @specification Json Schema 7\n */\nexport function IsId(schema) {\n    return Guard.HasPropertyKey(schema, '$id')\n        && Guard.IsString(schema.$id);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $id property\n * @specification Json Schema 7\n */\nexport function IsIf(schema) {\n    return Guard.HasPropertyKey(schema, 'if')\n        && IsSchema(schema.if);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid items property\n * @specification Json Schema 7\n */\nexport function IsItems(schema) {\n    return Guard.HasPropertyKey(schema, 'items')\n        && (IsSchema(schema.items)\n            || (Guard.IsArray(schema.items)\n                && schema.items.every(value => {\n                    return IsSchema(value);\n                })));\n}\n/** Returns true if this schema is a sized items variant */\nexport function IsItemsSized(schema) {\n    return IsItems(schema) && Guard.IsArray(schema.items);\n}\n/** Returns true if this schema is a unsized items variant */\nexport function IsItemsUnsized(schema) {\n    return IsItems(schema) && !Guard.IsArray(schema.items);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maximum property\n * @specification Json Schema 7\n */\nexport function IsMaximum(schema) {\n    return Guard.HasPropertyKey(schema, 'maximum')\n        && (Guard.IsNumber(schema.maximum) || Guard.IsBigInt(schema.maximum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxContains property\n * @specification Json Schema 2019-09\n */\nexport function IsMaxContains(schema) {\n    return Guard.HasPropertyKey(schema, 'maxContains')\n        && Guard.IsNumber(schema.maxContains);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxItems property\n * @specification Json Schema 7\n */\nexport function IsMaxItems(schema) {\n    return Guard.HasPropertyKey(schema, 'maxItems')\n        && Guard.IsNumber(schema.maxItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxLength property\n * @specification Json Schema 7\n */\nexport function IsMaxLength(schema) {\n    return Guard.HasPropertyKey(schema, 'maxLength')\n        && Guard.IsNumber(schema.maxLength);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxProperties property\n * @specification Json Schema 7\n */\nexport function IsMaxProperties(schema) {\n    return Guard.HasPropertyKey(schema, 'maxProperties')\n        && Guard.IsNumber(schema.maxProperties);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minimum property\n * @specification Json Schema 7\n */\nexport function IsMinimum(schema) {\n    return Guard.HasPropertyKey(schema, 'minimum')\n        && (Guard.IsNumber(schema.minimum) || Guard.IsBigInt(schema.minimum));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid maxContains property\n * @specification Json Schema 2019-09\n */\nexport function IsMinContains(schema) {\n    return Guard.HasPropertyKey(schema, 'minContains')\n        && Guard.IsNumber(schema.minContains);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minItems property\n * @specification Json Schema 7\n */\nexport function IsMinItems(schema) {\n    return Guard.HasPropertyKey(schema, 'minItems')\n        && Guard.IsNumber(schema.minItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minLength property\n * @specification Json Schema 7\n */\nexport function IsMinLength(schema) {\n    return Guard.HasPropertyKey(schema, 'minLength')\n        && Guard.IsNumber(schema.minLength);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid minProperties property\n * @specification Json Schema 7\n */\nexport function IsMinProperties(schema) {\n    return Guard.HasPropertyKey(schema, 'minProperties')\n        && Guard.IsNumber(schema.minProperties);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid multipleOf property\n * @specification Json Schema 7\n */\nexport function IsMultipleOf(schema) {\n    return Guard.HasPropertyKey(schema, 'multipleOf')\n        && (Guard.IsNumber(schema.multipleOf) || Guard.IsBigInt(schema.multipleOf));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid not property\n * @specification Json Schema 7\n */\nexport function IsNot(schema) {\n    return Guard.HasPropertyKey(schema, 'not')\n        && IsSchema(schema.not);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid oneOf property\n * @specification Json Schema 7\n */\nexport function IsOneOf(schema) {\n    return Guard.HasPropertyKey(schema, 'oneOf')\n        && Guard.IsArray(schema.oneOf)\n        && schema.oneOf.every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid pattern property\n * @specification Json Schema 7\n */\nexport function IsPattern(schema) {\n    return Guard.HasPropertyKey(schema, 'pattern')\n        && (Guard.IsString(schema.pattern)\n            || schema.pattern instanceof RegExp);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid patternProperties property\n * @specification Json Schema 7\n */\nexport function IsPatternProperties(schema) {\n    return Guard.HasPropertyKey(schema, 'patternProperties')\n        && Guard.IsObject(schema.patternProperties)\n        && Object.values(schema.patternProperties).every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid prefixItems property\n */\nexport function IsPrefixItems(schema) {\n    return Guard.HasPropertyKey(schema, 'prefixItems')\n        && Guard.IsArray(schema.prefixItems)\n        && schema.prefixItems.every(schema => IsSchema(schema));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid properties property\n * @specification Json Schema 7\n */\nexport function IsProperties(schema) {\n    return Guard.HasPropertyKey(schema, 'properties')\n        && Guard.IsObject(schema.properties)\n        && Object.values(schema.properties).every(value => IsSchema(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid propertyNames property\n * @specification Json Schema 7\n */\nexport function IsPropertyNames(schema) {\n    return Guard.HasPropertyKey(schema, 'propertyNames')\n        && (Guard.IsObject(schema.propertyNames)\n            || IsSchema(schema.propertyNames));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $recursiveAnchor property\n */\nexport function IsRecursiveAnchor(schema) {\n    return Guard.HasPropertyKey(schema, '$recursiveAnchor')\n        && Guard.IsBoolean(schema.$recursiveAnchor);\n}\n/**\n * Returns true if the schema contains a valid $recursiveAnchor property that is true\n */\nexport function IsRecursiveAnchorTrue(schema) {\n    return IsRecursiveAnchor(schema)\n        && Guard.IsEqual(schema.$recursiveAnchor, true);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $recursiveRef property\n */\nexport function IsRecursiveRef(schema) {\n    return Guard.HasPropertyKey(schema, '$recursiveRef')\n        && Guard.IsString(schema.$recursiveRef);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid $ref property\n * @specification Json Schema 7\n */\nexport function IsRef(schema) {\n    return Guard.HasPropertyKey(schema, '$ref')\n        && Guard.IsString(schema.$ref);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid required property\n * @specification Json Schema 7\n */\nexport function IsRequired(schema) {\n    return Guard.HasPropertyKey(schema, 'required')\n        && Guard.IsArray(schema.required)\n        && schema.required.every(value => Guard.IsString(value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid then property\n * @specification Json Schema 7\n */\nexport function IsThen(schema) {\n    return Guard.HasPropertyKey(schema, 'then')\n        && IsSchema(schema.then);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid type property\n * @specification Json Schema 7\n */\nexport function IsType(schema) {\n    return Guard.HasPropertyKey(schema, 'type')\n        && (Guard.IsString(schema.type)\n            || (Guard.IsArray(schema.type)\n                && schema.type.every(value => Guard.IsString(value))));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid uniqueItems property\n * @specification Json Schema 7\n */\nexport function IsUniqueItems(schema) {\n    return Guard.HasPropertyKey(schema, 'uniqueItems')\n        && Guard.IsBoolean(schema.uniqueItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid unevaluatedItems property\n * @specification Json Schema 2019-09\n */\nexport function IsUnevaluatedItems(schema) {\n    return Guard.HasPropertyKey(schema, 'unevaluatedItems')\n        && IsSchema(schema.unevaluatedItems);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\n/**\n * Returns true if the schema contains a valid unevaluatedProperties property\n * @specification Json Schema 2019-09\n */\nexport function IsUnevaluatedProperties(schema) {\n    return Guard.HasPropertyKey(schema, 'unevaluatedProperties')\n        && IsSchema(schema.unevaluatedProperties);\n}\n","// deno-fmt-ignore-file\nimport { Settings } from '../../system/settings/index.mjs';\nimport * as Schema from '../types/index.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// HasUnevaluated\n// ------------------------------------------------------------------\nfunction HasUnevaluatedFromObject(value) {\n    return (Schema.IsUnevaluatedItems(value)\n        || Schema.IsUnevaluatedProperties(value)\n        || G.Some(G.Keys(value), key => HasUnevaluatedFromUnknown(value[key])));\n}\nfunction HasUnevaluatedFromArray(value) {\n    return G.Some(value, value => HasUnevaluatedFromUnknown(value));\n}\nfunction HasUnevaluatedFromUnknown(value) {\n    return (G.IsArray(value) ? HasUnevaluatedFromArray(value) :\n        G.IsObject(value) ? HasUnevaluatedFromObject(value) :\n            false);\n}\nexport function HasUnevaluated(context, schema) {\n    return HasUnevaluatedFromUnknown(schema) || G.Some(G.Keys(context), key => HasUnevaluatedFromUnknown(context[key]));\n}\n// ------------------------------------------------------------------\n// BuildContext\n// ------------------------------------------------------------------\nexport class BuildContext {\n    constructor(hasUnevaluated) {\n        this.hasUnevaluated = hasUnevaluated;\n    }\n    UseUnevaluated() {\n        return this.hasUnevaluated;\n    }\n    // ----------------------------------------------------------------\n    // Stack\n    // ----------------------------------------------------------------\n    Push() {\n        return E.Call(E.Member('context', 'Push'), []);\n    }\n    Pop() {\n        return E.Call(E.Member('context', 'Pop'), []);\n    }\n    // ----------------------------------------------------------------\n    // Top\n    // ----------------------------------------------------------------\n    AddIndex(index) {\n        return E.Call(E.Member('context', 'AddIndex'), [index]);\n    }\n    AddKey(key) {\n        return E.Call(E.Member('context', 'AddKey'), [key]);\n    }\n    Merge(results) {\n        return E.Call(E.Member('context', 'Merge'), [results]);\n    }\n}\n// ------------------------------------------------------------------\n// CheckContext\n// ------------------------------------------------------------------\nexport class CheckContext {\n    constructor() {\n        const indices = new Set();\n        const keys = new Set();\n        this.stack = [{ indices, keys }];\n    }\n    // ----------------------------------------------------------------\n    // Stack\n    // ----------------------------------------------------------------\n    Push() {\n        const indices = new Set();\n        const keys = new Set();\n        this.stack.push({ indices, keys });\n        return true;\n    }\n    Pop() {\n        this.stack.pop();\n        return true;\n    }\n    // ----------------------------------------------------------------\n    // Top\n    // ----------------------------------------------------------------\n    AddIndex(index) {\n        this.GetIndices().add(index);\n        return true;\n    }\n    AddKey(key) {\n        this.GetKeys().add(key);\n        return true;\n    }\n    GetIndices() {\n        const top = this.stack[this.stack.length - 1];\n        return top.indices;\n    }\n    GetKeys() {\n        const top = this.stack[this.stack.length - 1];\n        return top.keys;\n    }\n    Merge(results) {\n        for (const context of results) {\n            context.GetIndices().forEach(value => this.GetIndices().add(value));\n            context.GetKeys().forEach(value => this.GetKeys().add(value));\n        }\n        return true;\n    }\n}\n// ------------------------------------------------------------------\n// ErrorContext\n// ------------------------------------------------------------------\nexport class ErrorContext extends CheckContext {\n    constructor() {\n        super();\n        this.errors = [];\n    }\n    // ----------------------------------------------------------------\n    // Public\n    // ----------------------------------------------------------------\n    AtCapacity() {\n        return this.errors.length >= Settings.Get().maxErrors;\n    }\n    AddError(keyword, schemaPath, instancePath, params) {\n        return this.AddErrorObject({ keyword, schemaPath, instancePath, params });\n    }\n    AddErrors(error) {\n        error.forEach(error => this.AddErrorObject(error));\n        return false;\n    }\n    GetErrors() {\n        return this.errors;\n    }\n    // ----------------------------------------------------------------\n    // Private\n    // ----------------------------------------------------------------\n    AddErrorObject(error) {\n        if (!this.AtCapacity())\n            this.errors.push(error);\n        return false;\n    }\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildRefineMultiple(_stack, _context, schema, value) {\n    const external = Externals.CreateVariable(schema['~refine']);\n    return E.Every(external, E.Constant(0), ['refinement', '_'], E.Call(E.Member('refinement', 'check'), [value]));\n}\nfunction BuildRefineSingle(_stack, _context, schema, value) {\n    const external = Externals.CreateVariable(schema['~refine'][0]);\n    return E.Call(E.Member(external, 'check'), [value]);\n}\nexport function BuildRefine(_stack, _context, schema, value) {\n    return G.IsEqual(schema['~refine'].length, 1)\n        ? BuildRefineSingle(_stack, _context, schema, value)\n        : BuildRefineMultiple(_stack, _context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRefine(_stack, _context, schema, value) {\n    return G.Every(schema['~refine'], 0, (refinement, _) => refinement.check(value));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRefine(_stack, context, schemaPath, instancePath, schema, value) {\n    return G.EveryAll(schema['~refine'], 0, (refinement, index) => {\n        return refinement.check(value) ||\n            context.AddError('~refine', schemaPath, instancePath, { index, message: refinement.error(value) });\n    });\n}\n","import { Guard } from '../../guard/index.mjs';\nimport * as Schema from '../types/index.mjs';\n// ------------------------------------------------------------------\n// DefaultUri\n// ------------------------------------------------------------------\nexport const DefaultUri = 'urn:typebox:root';\n// ------------------------------------------------------------------\n// NextUri\n//\n// Resolves a relative or absolute ref against a base URI or URN.\n// Hierarchical bases (http, https, etc.) resolve using the normal\n// URL rules. URN bases have no path to resolve against, so the ref\n// is appended after the base's last ':' segment instead.\n// ------------------------------------------------------------------\nexport function NextUri(ref, base) {\n    return (URL.canParse(ref, base)) ? new URL(ref, base) : Guard.IsEqual(base, DefaultUri) ? new URL(`${base}:${ref}`) : new URL(`${base.slice(0, base.lastIndexOf(':'))}:${ref}`);\n}\n// ------------------------------------------------------------------\n// Stack\n//\n// Creates the root frame a schema traversal starts from.\n// ------------------------------------------------------------------\nexport function Stack(context, schema) {\n    const base = Schema.IsSchemaObject(schema) && Schema.IsId(schema) ? NextUri(schema.$id, DefaultUri).href : DefaultUri;\n    return {\n        context,\n        schema,\n        lexicalSchema: schema,\n        lexicalBase: base,\n        resourceBase: base,\n        referenceBase: base,\n        ids: [],\n        useResourceBaseForReference: true,\n        recursiveAnchor: undefined,\n        dynamicAnchors: [],\n        resourceEntries: new Map(),\n        pendingResource: true,\n        enteredResource: false\n    };\n}\n// ------------------------------------------------------------------\n// RegisterResourceAnchors\n//\n// Collects $dynamicAnchor schemas reachable from a resource root,\n// stopping at nested $id boundaries which own their own anchors.\n// ------------------------------------------------------------------\nfunction RegisterResourceAnchors(anchors, schema, isRoot = true) {\n    if (Schema.IsSchemaBoolean(schema))\n        return anchors;\n    if (Array.isArray(schema))\n        return schema.reduce((result, item) => RegisterResourceAnchors(result, item, false), anchors);\n    if (!Schema.IsSchemaObject(schema))\n        return anchors;\n    if (!isRoot && Schema.IsId(schema))\n        return anchors;\n    const next = !isRoot && Schema.IsDynamicAnchor(schema) ? [...anchors, schema] : anchors;\n    return Object.keys(schema).reduce((result, key) => RegisterResourceAnchors(result, schema[key], false), next);\n}\n// ------------------------------------------------------------------\n// ResourceEntry\n//\n// A ref crossing (Resolve.Ref) may have marked `schema` as the entry\n// point of a retrieved/legacy resource. If so the frame resets to\n// that resource's base/root instead of chaining onto the parent.\n// ------------------------------------------------------------------\nfunction ResourceEntry(stack, schema) {\n    return stack.resourceEntries.get(schema);\n}\nfunction NextEnteredResource(stack, schema) {\n    return stack.enteredResource || ResourceEntry(stack, schema) !== undefined;\n}\n// ------------------------------------------------------------------\n// NextStack\n//\n// Each Next* helper below computes one XStack field in isolation from\n// the previous frame and the schema being pushed.\n// ------------------------------------------------------------------\nfunction IsRelativeId(schema) {\n    return !/^[A-Za-z][A-Za-z0-9+.-]*:/.test(schema.$id);\n}\nfunction NextIds(stack, schema) {\n    return Schema.IsId(schema) ? [...stack.ids, schema] : stack.ids;\n}\nfunction NextRecursiveAnchor(stack, schema) {\n    return stack.recursiveAnchor ?? (Schema.IsRecursiveAnchorTrue(schema) ? schema : undefined);\n}\nfunction NextDynamicAnchors(stack, schema) {\n    const registered = Schema.IsId(schema) ? RegisterResourceAnchors(stack.dynamicAnchors, schema) : stack.dynamicAnchors;\n    return Schema.IsDynamicAnchor(schema) ? [...registered, schema] : registered;\n}\nfunction NextPendingResource(stack, schema) {\n    return Schema.IsId(schema) ? false : stack.pendingResource;\n}\nfunction NextLexicalBase(stack, schema) {\n    const entry = ResourceEntry(stack, schema);\n    if (entry)\n        return entry.base;\n    return Schema.IsId(schema) ? NextUri(schema.$id, stack.lexicalBase).href : stack.lexicalBase;\n}\nfunction NextResourceBase(stack, schema) {\n    const entry = ResourceEntry(stack, schema);\n    if (entry)\n        return entry.base;\n    return (Schema.IsId(schema) && stack.pendingResource) ? NextUri(schema.$id, stack.resourceBase).href : stack.resourceBase;\n}\nfunction NextUseResourceBaseForReference(stack, schema) {\n    return Schema.IsId(schema) ? !IsRelativeId(schema) : stack.useResourceBaseForReference;\n}\nfunction NextReferenceBase(stack, schema) {\n    const isRetrieved = NextEnteredResource(stack, schema);\n    const useResourceBaseForReference = NextUseResourceBaseForReference(stack, schema);\n    return (isRetrieved || useResourceBaseForReference) ? NextResourceBase(stack, schema) : NextLexicalBase(stack, schema);\n}\nfunction NextLexicalSchema(stack, schema) {\n    const entry = ResourceEntry(stack, schema);\n    if (entry)\n        return entry.root;\n    return Schema.IsId(schema) ? schema : stack.lexicalSchema;\n}\n// ------------------------------------------------------------------\n// NextStack | HasStackKeywords (Optimization)\n//\n// HasStackKeywords narrows schema to an object and checks whether it\n// carries $id, $dynamicAnchor, a first-seen $recursiveAnchor, or a\n// resource-entry point. When none apply, NextStack skips the frame\n// rebuild and returns the parent stack as-is.\n// ------------------------------------------------------------------\nfunction HasStackKeywords(stack, schema) {\n    return Schema.IsSchemaObject(schema) && (Schema.IsId(schema) ||\n        Schema.IsDynamicAnchor(schema) ||\n        (Guard.IsUndefined(stack.recursiveAnchor) && Schema.IsRecursiveAnchorTrue(schema)) ||\n        !Guard.IsUndefined(ResourceEntry(stack, schema)));\n}\nexport function NextStack(stack, schema) {\n    return HasStackKeywords(stack, schema)\n        ? {\n            ...stack,\n            ids: NextIds(stack, schema),\n            dynamicAnchors: NextDynamicAnchors(stack, schema),\n            recursiveAnchor: NextRecursiveAnchor(stack, schema),\n            pendingResource: NextPendingResource(stack, schema),\n            lexicalBase: NextLexicalBase(stack, schema),\n            resourceBase: NextResourceBase(stack, schema),\n            useResourceBaseForReference: NextUseResourceBaseForReference(stack, schema),\n            referenceBase: NextReferenceBase(stack, schema),\n            lexicalSchema: NextLexicalSchema(stack, schema),\n            enteredResource: NextEnteredResource(stack, schema)\n        }\n        : stack;\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Unique from './_unique.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n    return Schema.IsItems(schema) && G.IsArray(schema.items);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildAdditionalItemsStandard(stack, context, schema, value) {\n    const [item, index] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    const isSchema = BuildSchemaPushStack(stack, context, schema.additionalItems, item);\n    const isLength = E.IsLessThan(index, E.Constant(schema.items.length));\n    const addIndex = context.AddIndex(index);\n    return E.Every(value, E.Constant(0), [item, index], E.Or(isLength, E.And(isSchema, addIndex)));\n}\nfunction BuildAdditionalItemsFast(stack, context, schema, value) {\n    const [item, index] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    const isSchema = BuildSchemaPushStack(stack, context, schema.additionalItems, item);\n    const isLength = E.IsLessThan(index, E.Constant(schema.items.length));\n    return E.Every(value, E.Constant(0), [item, index], E.Or(isLength, isSchema));\n}\nexport function BuildAdditionalItems(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return E.Constant(true);\n    return context.UseUnevaluated()\n        ? BuildAdditionalItemsStandard(stack, context, schema, value)\n        : BuildAdditionalItemsFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAdditionalItems(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return true;\n    const isAdditionalItems = G.Every(value, 0, (item, index) => {\n        return G.IsLessThan(index, schema.items.length)\n            || (CheckSchemaPushStack(stack, context, schema.additionalItems, item) && context.AddIndex(index));\n    });\n    return isAdditionalItems;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAdditionalItems(stack, context, schemaPath, instancePath, schema, value) {\n    if (!IsValid(schema))\n        return true;\n    const isAdditionalItems = G.Every(value, 0, (item, index) => {\n        const nextSchemaPath = `${schemaPath}/additionalItems`;\n        const nextInstancePath = `${instancePath}/${index}`;\n        return G.IsLessThan(index, schema.items.length) ||\n            (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.additionalItems, item) && context.AddIndex(index));\n    });\n    return isAdditionalItems;\n}\n","// ------------------------------------------------------------------\n// EncodeFragment\n//\n// We use this function to encode instancePath and schemaPath path\n// fragments for errors. We need this encoding such that callers\n// can use Pointer to deref error targets. We should consider adding\n// this to the Pointer module as Pointer.Encode(...) (review)\n// ------------------------------------------------------------------\nexport function EncodeFragment(fragment) {\n    return fragment.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n","/** Standard RegExp with Unicode */\nexport function UnicodeRegExp(pattern) {\n    return new RegExp(pattern, 'u');\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Unique from './_unique.mjs';\nimport * as Externals from './_externals.mjs';\nimport * as Pathing from './_pathing.mjs';\nimport { UnicodeRegExp } from './_regexp.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\n// ------------------------------------------------------------------\n// Optimization: IsAdditionalPropertiesIgnored\n//\n// We can ignore additionalProperties if the schema is true-like and\n// we are not in an unevaluated context, noting that additional\n// properties are considered tracked, evaluated keys.\n// ------------------------------------------------------------------\nfunction IsAdditionalPropertiesIgnored(context, additionalProperties) {\n    return !context.UseUnevaluated() &&\n        (G.IsEqual(additionalProperties, true) ||\n            (G.IsObject(additionalProperties) && G.IsEqual(G.Keys(additionalProperties).length, 0)));\n}\n// ------------------------------------------------------------------\n// Optimization: GetPropertiesPattern\n//\n// Constructs a regular expression that matches all property keys\n// and pattern properties defined in a schema. This approach unifies\n// handling of both property types, avoiding separate logic paths.\n//\n// If no keys or patterns are present, it returns a pattern that\n// matches nothing: '(?!)'.\n//\n// ------------------------------------------------------------------\nfunction GetPropertyKeyAsPattern(key) {\n    const escaped = key.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n    return `^${escaped}$`;\n}\nfunction GetPropertiesPattern(schema) {\n    const patterns = [];\n    if (Schema.IsPatternProperties(schema))\n        patterns.push(...G.Keys(schema.patternProperties));\n    if (Schema.IsProperties(schema))\n        patterns.push(...G.Keys(schema.properties).map(GetPropertyKeyAsPattern));\n    return G.IsEqual(patterns.length, 0) ? '(?!)' : `(${patterns.join('|')})`;\n}\n// ------------------------------------------------------------------\n// BuildAdditionalPropertiesFast (AdditionalProperties False)\n//\n// - AdditionalProperties is explicitly set to false,\n// - The schema uses only Properties (no PatternProperties),\n// - Required contains exactly the keys in Properties.\n//\n// ------------------------------------------------------------------\nfunction HasExactRequiredProperties(schema) {\n    const keys = G.Keys(schema.properties);\n    return G.IsEqual(keys.length, schema.required.length)\n        && G.Every(keys, 0, (key) => schema.required.includes(key));\n}\nfunction CanAdditionalPropertiesFast(_context, schema, _value) {\n    return Schema.IsRequired(schema)\n        && Schema.IsProperties(schema)\n        && !Schema.IsPatternProperties(schema)\n        && G.IsEqual(schema.additionalProperties, false)\n        && HasExactRequiredProperties(schema);\n}\nfunction BuildAdditionalPropertiesFast(_context, schema, value) {\n    return E.IsEqual(E.Member(E.Call(E.Member('Object', 'getOwnPropertyNames'), [value]), 'length'), E.Constant(schema.required.length));\n}\n// ------------------------------------------------------------------\n// BuildAdditionalPropertiesStandard\n// ------------------------------------------------------------------\nfunction BuildAdditionalPropertiesStandard(stack, context, schema, value) {\n    const [key, _index] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    const regexp = Externals.CreateVariable(UnicodeRegExp(GetPropertiesPattern(schema)));\n    const isSchema = BuildSchemaPushStack(stack, context, schema.additionalProperties, `${value}[${key}]`);\n    const isKey = E.Call(E.Member(regexp, 'test'), [key]);\n    const addKey = context.AddKey(key);\n    const guarded = context.UseUnevaluated() ? E.Or(isKey, E.And(isSchema, addKey)) : E.Or(isKey, isSchema);\n    const result = E.Every(E.Keys(value), E.Constant(0), [key, _index], guarded);\n    return result;\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildAdditionalProperties(stack, context, schema, value) {\n    if (IsAdditionalPropertiesIgnored(context, schema.additionalProperties))\n        return E.Constant(true);\n    return CanAdditionalPropertiesFast(context, schema, value)\n        ? BuildAdditionalPropertiesFast(context, schema, value)\n        : BuildAdditionalPropertiesStandard(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAdditionalProperties(stack, context, schema, value) {\n    const regexp = UnicodeRegExp(GetPropertiesPattern(schema));\n    const isAdditionalProperties = G.Every(G.Keys(value), 0, (key, _index) => {\n        return regexp.test(key) ||\n            (CheckSchemaPushStack(stack, context, schema.additionalProperties, value[key]) && context.AddKey(key));\n    });\n    return isAdditionalProperties;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAdditionalProperties(stack, context, schemaPath, instancePath, schema, value) {\n    const regexp = UnicodeRegExp(GetPropertiesPattern(schema));\n    const additionalProperties = [];\n    const isAdditionalProperties = G.EveryAll(G.Keys(value), 0, (key, _index) => {\n        const nextSchemaPath = `${schemaPath}/additionalProperties`;\n        const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n        const isAdditionalProperty = regexp.test(key) ||\n            (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.additionalProperties, value[key]) && context.AddKey(key));\n        if (!isAdditionalProperty)\n            additionalProperties.push(key);\n        return isAdditionalProperty;\n    });\n    return isAdditionalProperties ||\n        context.AddError('additionalProperties', schemaPath, instancePath, { additionalProperties });\n}\n","// deno-fmt-ignore-file\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { Reducer } from './_reducer.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildAllOfStandard(stack, context, schema, value) {\n    return Reducer(stack, context, schema.allOf, value, E.IsEqual(E.Member('results', 'length'), E.Constant(schema.allOf.length)));\n}\nfunction BuildAllOfFast(stack, context, schema, value) {\n    return E.ReduceAnd(schema.allOf.map((schema) => BuildSchema(stack, context, schema, value)));\n}\nexport function BuildAllOf(stack, context, schema, value) {\n    return context.UseUnevaluated()\n        ? BuildAllOfStandard(stack, context, schema, value)\n        : BuildAllOfFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAllOf(stack, context, schema, value) {\n    const results = schema.allOf.reduce((result, schema) => {\n        const nextContext = new CheckContext();\n        return CheckSchema(stack, nextContext, schema, value) ? [...result, nextContext] : result;\n    }, []);\n    return G.IsEqual(results.length, schema.allOf.length) && context.Merge(results);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAllOf(stack, context, schemaPath, instancePath, schema, value) {\n    const failedContexts = [];\n    const results = schema.allOf.reduce((result, schema, index) => {\n        const nextSchemaPath = `${schemaPath}/allOf/${index}`;\n        const nextContext = new ErrorContext();\n        const isSchema = ErrorSchema(stack, nextContext, nextSchemaPath, instancePath, schema, value);\n        if (!isSchema)\n            failedContexts.push(nextContext);\n        return isSchema ? [...result, nextContext] : result;\n    }, []);\n    const isAllOf = G.IsEqual(results.length, schema.allOf.length) && context.Merge(results);\n    if (!isAllOf)\n        failedContexts.forEach(failed => context.AddErrors(failed.GetErrors()));\n    return isAllOf;\n}\n","// deno-fmt-ignore-file\nimport { Reducer } from './_reducer.mjs';\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildAnyOfStandard(stack, context, schema, value) {\n    return Reducer(stack, context, schema.anyOf, value, E.IsGreaterThan(E.Member('results', 'length'), E.Constant(0)));\n}\nfunction BuildAnyOfFast(stack, context, schema, value) {\n    return E.ReduceOr(schema.anyOf.map((schema) => BuildSchema(stack, context, schema, value)));\n}\nexport function BuildAnyOf(stack, context, schema, value) {\n    return context.UseUnevaluated()\n        ? BuildAnyOfStandard(stack, context, schema, value)\n        : BuildAnyOfFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckAnyOf(stack, context, schema, value) {\n    const results = schema.anyOf.reduce((result, schema) => {\n        const nextContext = new CheckContext();\n        return CheckSchema(stack, nextContext, schema, value) ? [...result, nextContext] : result;\n    }, []);\n    return G.IsGreaterThan(results.length, 0) && context.Merge(results);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorAnyOf(stack, context, schemaPath, instancePath, schema, value) {\n    const failedContexts = [];\n    const results = schema.anyOf.reduce((result, schema, index) => {\n        const nextContext = new ErrorContext();\n        const nextSchemaPath = `${schemaPath}/anyOf/${index}`;\n        const isSchema = ErrorSchema(stack, nextContext, nextSchemaPath, instancePath, schema, value);\n        if (!isSchema)\n            failedContexts.push(nextContext);\n        return isSchema ? [...result, nextContext] : result;\n    }, []);\n    const isAnyOf = G.IsGreaterThan(results.length, 0) && context.Merge(results);\n    if (!isAnyOf)\n        failedContexts.forEach(failed => context.AddErrors(failed.GetErrors()));\n    return isAnyOf || context.AddError('anyOf', schemaPath, instancePath, {});\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildSchemaBoolean(_stack, _context, schema, _value) {\n    return schema ? E.Constant(true) : E.Constant(false);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckSchemaBoolean(_stack, _context, schema, _value) {\n    return schema;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorSchemaBoolean(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckSchemaBoolean(stack, context, schema, value) ||\n        context.AddError('boolean', schemaPath, instancePath, {});\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildConst(_stack, _context, schema, value) {\n    return G.IsValueLike(schema.const)\n        ? E.IsEqual(value, E.Constant(schema.const))\n        : E.IsDeepEqual(value, Externals.CreateVariable(schema.const));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckConst(_stack, _context, schema, value) {\n    return G.IsValueLike(schema.const)\n        ? G.IsEqual(value, schema.const)\n        : G.IsDeepEqual(value, schema.const);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function ErrorConst(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckConst(stack, context, schema, value) ||\n        context.AddError('const', schemaPath, instancePath, { allowedValue: schema.const });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Unique from './_unique.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Invalid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n    return !(Schema.IsMinContains(schema) && G.IsEqual(schema.minContains, 0));\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildContainsStandard(stack, context, schema, value) {\n    const [item, index] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    const isLength = E.Not(E.IsEqual(E.Member(value, 'length'), E.Constant(0)));\n    const isSome = E.SomeAll(value, [item, index], E.And(BuildSchema(stack, context, schema.contains, item), context.AddIndex(index)));\n    return E.And(isLength, isSome);\n}\nfunction BuildContainsFast(stack, context, schema, value) {\n    const [item] = [Unique.CreateUnique()];\n    const isLength = E.Not(E.IsEqual(E.Member(value, 'length'), E.Constant(0)));\n    const isSome = E.Some(value, [item, '_'], BuildSchema(stack, context, schema.contains, item));\n    return E.And(isLength, isSome);\n}\nexport function BuildContains(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return E.Constant(true);\n    return context.UseUnevaluated()\n        ? BuildContainsStandard(stack, context, schema, value)\n        : BuildContainsFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckContains(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return true;\n    return !G.IsEqual(value.length, 0) && G.SomeAll(value, (item, index) => {\n        return CheckSchema(stack, context, schema.contains, item) && context.AddIndex(index);\n    });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorContains(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckContains(stack, context, schema, value) ||\n        context.AddError('contains', schemaPath, instancePath, { minContains: 1 });\n}\n","// deno-fmt-ignore-file\nimport * as Pathing from './_pathing.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDependencies(stack, context, schema, value) {\n    const isLength = E.IsEqual(E.Member(E.Keys(value), 'length'), E.Constant(0));\n    const isEveryDependency = E.ReduceAnd(G.Entries(schema.dependencies).map(([key, schema]) => {\n        const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n        const isSchema = BuildSchema(stack, context, schema, value);\n        const isEveryKey = (schema) => E.ReduceAnd(schema.map((key) => E.HasPropertyKey(value, E.Constant(key))));\n        return E.Or(notKey, G.IsArray(schema) ? isEveryKey(schema) : isSchema);\n    }));\n    return E.Or(isLength, isEveryDependency);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDependencies(stack, context, schema, value) {\n    const isLength = G.IsEqual(G.Keys(value).length, 0);\n    const isEvery = G.Every(G.Entries(schema.dependencies), 0, ([key, schema]) => {\n        return !G.HasPropertyKey(value, key) || (G.IsArray(schema)\n            ? schema.every((key) => G.HasPropertyKey(value, key))\n            : CheckSchema(stack, context, schema, value));\n    });\n    return isLength || isEvery;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDependencies(stack, context, schemaPath, instancePath, schema, value) {\n    const isLength = G.IsEqual(G.Keys(value).length, 0);\n    const isEvery = G.EveryAll(G.Entries(schema.dependencies), 0, ([key, schema]) => {\n        const nextSchemaPath = `${schemaPath}/dependencies/${Pathing.EncodeFragment(key)}`;\n        return !G.HasPropertyKey(value, key) || (G.IsArray(schema)\n            ? schema.every((dependency) => G.HasPropertyKey(value, dependency) ||\n                context.AddError('dependencies', schemaPath, instancePath, { property: key, dependencies: schema }))\n            : ErrorSchema(stack, context, nextSchemaPath, instancePath, schema, value));\n    });\n    return isLength || isEvery;\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDependentRequired(_stack, _context, schema, value) {\n    const isLength = E.IsEqual(E.Member(E.Keys(value), 'length'), E.Constant(0));\n    const isEvery = E.ReduceAnd(G.Entries(schema.dependentRequired).map(([key, keys]) => {\n        const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n        const everyKey = E.ReduceAnd(keys.map((key) => E.HasPropertyKey(value, E.Constant(key))));\n        return E.Or(notKey, everyKey);\n    }));\n    return E.Or(isLength, isEvery);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDependentRequired(_stack, _context, schema, value) {\n    const isLength = G.IsEqual(G.Keys(value).length, 0);\n    const isEvery = G.Every(G.Entries(schema.dependentRequired), 0, ([key, keys]) => {\n        return !G.HasPropertyKey(value, key) ||\n            keys.every((key) => G.HasPropertyKey(value, key));\n    });\n    return isLength || isEvery;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDependentRequired(_stack, context, schemaPath, instancePath, schema, value) {\n    const isLength = G.IsEqual(G.Keys(value).length, 0);\n    const isEveryEntry = G.EveryAll(G.Entries(schema.dependentRequired), 0, ([key, keys]) => {\n        return !G.HasPropertyKey(value, key) || G.EveryAll(keys, 0, (dependency) => G.HasPropertyKey(value, dependency) ||\n            context.AddError('dependentRequired', schemaPath, instancePath, { property: key, dependencies: keys }));\n    });\n    return isLength || isEveryEntry;\n}\n","// deno-fmt-ignore-file\nimport * as Pathing from './_pathing.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDependentSchemas(stack, context, schema, value) {\n    const isLength = E.IsEqual(E.Member(E.Keys(value), 'length'), E.Constant(0));\n    const isEvery = E.ReduceAnd(G.Entries(schema.dependentSchemas).map(([key, schema]) => {\n        const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n        const isSchema = BuildSchema(stack, context, schema, value);\n        return E.Or(notKey, isSchema);\n    }));\n    return E.Or(isLength, isEvery);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDependentSchemas(stack, context, schema, value) {\n    const isLength = G.IsEqual(G.Keys(value).length, 0);\n    const isEvery = G.Every(G.Entries(schema.dependentSchemas), 0, ([key, schema]) => {\n        return !G.HasPropertyKey(value, key) ||\n            CheckSchema(stack, context, schema, value);\n    });\n    return isLength || isEvery;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDependentSchemas(stack, context, schemaPath, instancePath, schema, value) {\n    const isLength = G.IsEqual(G.Keys(value).length, 0);\n    const isEvery = G.EveryAll(G.Entries(schema.dependentSchemas), 0, ([key, schema]) => {\n        const nextSchemaPath = `${schemaPath}/dependentSchemas/${Pathing.EncodeFragment(key)}`;\n        return !G.HasPropertyKey(value, key) ||\n            ErrorSchema(stack, context, nextSchemaPath, instancePath, schema, value);\n    });\n    return isLength || isEvery;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Throw\n// ------------------------------------------------------------------\nfunction Throw(message) {\n    throw Error(message);\n}\nfunction ThrowUnsafePropertyKey() {\n    Throw('Pointer contains unsafe property key');\n}\nfunction ThrowCannotSetRoot() {\n    Throw('Cannot set value');\n}\n// ------------------------------------------------------------------\n// Indices\n// ------------------------------------------------------------------\nexport function Indices(pointer) {\n    const indices = pointer.split('/').map(index => index.replace(/~1/g, '/').replace(/~0/g, '~'));\n    return indices[0] === '' ? indices.slice(1) : indices;\n}\n// ------------------------------------------------------------------\n// Has\n// ------------------------------------------------------------------\nexport function Has(value, pointer) {\n    let current = value;\n    for (const index of Indices(pointer)) {\n        if (!Guard.IsObject(current) || !Guard.HasPropertyKey(current, index))\n            return false;\n        current = current[index];\n    }\n    return true;\n}\n// ------------------------------------------------------------------\n// Get\n// ------------------------------------------------------------------\nexport function Get(value, pointer) {\n    let current = value;\n    for (const index of Indices(pointer)) {\n        if (!Guard.IsObject(current) || Guard.IsUnsafePropertyKey(index))\n            return undefined;\n        current = current[index];\n    }\n    return current;\n}\n// ------------------------------------------------------------------\n// Get\n// ------------------------------------------------------------------\nfunction Parent(value, indices, last) {\n    let current = value;\n    for (const index of indices) {\n        if (Guard.IsUnsafePropertyKey(index))\n            ThrowUnsafePropertyKey();\n        current = Guard.IsObject(current) ? current[index] : undefined;\n    }\n    if (Guard.IsUnsafePropertyKey(last))\n        ThrowUnsafePropertyKey();\n    if (!Guard.IsObject(current))\n        ThrowCannotSetRoot();\n    return current;\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\nexport function Set(value, pointer, next) {\n    const indices = Indices(pointer);\n    const last = indices.pop();\n    if (Guard.IsUndefined(last))\n        ThrowCannotSetRoot();\n    Parent(value, indices, last)[last] = next;\n    return value;\n}\n// ------------------------------------------------------------------\n// Delete\n// ------------------------------------------------------------------\nexport function Delete(value, pointer) {\n    const indices = Indices(pointer);\n    const last = indices.pop();\n    if (Guard.IsUndefined(last))\n        ThrowCannotSetRoot();\n    const parent = Parent(value, indices, last);\n    if (Guard.IsArray(parent) && /^(0|[1-9]\\d*)$/.test(last)) {\n        parent.splice(Number(last), 1);\n    }\n    else {\n        delete parent[last];\n    }\n    return value;\n}\n","import { Guard } from '../../guard/index.mjs';\nimport { Pointer } from '../pointer/index.mjs';\nimport * as Schema from '../types/index.mjs';\nimport * as Stack from '../engine/_stack.mjs';\n// ------------------------------------------------------------------\n// Helpers\n//\n// Utilities to compute schema base URIs, normalize absolute URLs,\n// strip URL fragments for canonical hrefs, find target base URIs,\n// resolve $ref root schemas, and identify JSON pointers vs anchors.\n// ------------------------------------------------------------------\nfunction RelativeBase(schema, base) {\n    return Schema.IsSchemaObject(schema) && Schema.IsId(schema) ? Stack.NextUri(schema.$id, base.href) : base;\n}\nfunction AbsoluteBase(base) {\n    return Stack.NextUri(base, Stack.DefaultUri);\n}\nfunction CanonicalHref(url) {\n    return url.href.split('#')[0];\n}\nfunction Base(schema, base, target) {\n    return SearchBase(schema, AbsoluteBase(base), target);\n}\nfunction RefRoot(stack, ref) {\n    return (ref.$ref.startsWith('#') || stack.enteredResource) ? stack.lexicalSchema : stack.schema;\n}\nfunction IsPointerFragment(fragment) {\n    return fragment.startsWith('#/');\n}\n// ------------------------------------------------------------------\n// Search\n//\n// Recursive tree walks that locate things by identity, not URL.\n// SearchDynamicAnchor finds a node with a matching $dynamicAnchor.\n// SearchBase finds a specific target schema (by reference) and\n// returns its base URI, tracking $id rebasing as it descends.\n// ------------------------------------------------------------------\nfunction SearchDynamicAnchor(schema, name) {\n    if (Guard.IsObject(schema) && Schema.IsDynamicAnchor(schema) && Guard.IsEqual(schema.$dynamicAnchor, name)) {\n        return schema;\n    }\n    if (Guard.IsObject(schema)) {\n        for (const key of Guard.Keys(schema)) {\n            const result = SearchDynamicAnchor(schema[key], name);\n            if (result)\n                return result;\n        }\n    }\n    return undefined;\n}\nfunction SearchBase(schema, base, target) {\n    if (Guard.IsEqual(schema, target))\n        return base.href;\n    const nextBase = RelativeBase(schema, base);\n    if (Guard.IsArray(schema)) {\n        for (const item of schema) {\n            const result = SearchBase(item, nextBase, target);\n            if (!Guard.IsUndefined(result))\n                return result;\n        }\n    }\n    else if (Guard.IsObject(schema)) {\n        for (const key of Guard.Keys(schema)) {\n            const result = SearchBase(schema[key], nextBase, target);\n            if (!Guard.IsUndefined(result))\n                return result;\n        }\n    }\n    return undefined;\n}\n// ------------------------------------------------------------------\n// Match\n//\n// Tests whether a schema node is what a reference URL points to.\n// MatchSchemaObject checks a single node in order: $id, $anchor,\n// $dynamicAnchor, then JSON pointer/hash. MatchFromArray,\n// MatchFromObject, and Match recurse through the tree to try every\n// node, skipping const and enum since their values are user data,\n// not schema.\n// ------------------------------------------------------------------\nfunction MatchWithHash(schema, ref) {\n    if (ref.href.endsWith('#'))\n        return schema;\n    if (!ref.hash.startsWith('#'))\n        return undefined;\n    const fragment = decodeURIComponent(ref.hash.slice(1));\n    if (!fragment.startsWith('/'))\n        return undefined;\n    return Pointer.Get(schema, fragment);\n}\nfunction MatchWithId(schema, base, ref) {\n    if (!Schema.IsId(schema))\n        return undefined;\n    if (Guard.IsEqual(schema.$id, ref.hash))\n        return schema;\n    const absoluteRef = new URL(ref.href, base.href);\n    if (Guard.IsEqual(base.pathname, absoluteRef.pathname))\n        return ref.hash.startsWith('#') ? MatchWithHash(schema, ref) : schema;\n    return undefined;\n}\nfunction MatchWithAnchor(schema, base, ref) {\n    if (!Schema.IsAnchor(schema))\n        return undefined;\n    const absoluteAnchor = new URL(`#${schema.$anchor}`, base.href);\n    const absoluteRef = new URL(ref.href, base.href);\n    return Guard.IsEqual(absoluteAnchor.href, absoluteRef.href) ? schema : undefined;\n}\nfunction MatchWithDynamicAnchor(schema, base, ref) {\n    if (!Schema.IsDynamicAnchor(schema))\n        return undefined;\n    const absoluteAnchor = new URL(`#${schema.$dynamicAnchor}`, base.href);\n    const absoluteRef = new URL(ref.href, base.href);\n    const isMatch = Guard.IsEqual(absoluteAnchor.href, absoluteRef.href);\n    return isMatch ? schema : undefined;\n}\nfunction MatchSchemaObject(schema, base, ref) {\n    if (!Schema.IsSchemaObject(schema))\n        return undefined;\n    return MatchWithId(schema, base, ref) ??\n        MatchWithAnchor(schema, base, ref) ??\n        MatchWithDynamicAnchor(schema, base, ref) ??\n        MatchWithHash(schema, ref);\n}\nfunction MatchFromArray(schema, base, ref) {\n    if (!Guard.IsArray(schema))\n        return undefined;\n    return schema.reduce((result, item) => {\n        const match = Match(item, base, ref);\n        return !Guard.IsUndefined(match) ? match : result;\n    }, undefined);\n}\nfunction MatchFromObject(schema, base, ref) {\n    if (!Guard.IsObject(schema))\n        return undefined;\n    return Guard.Keys(schema).reduce((result, key) => {\n        if (Guard.IsEqual(key, 'const') || Guard.IsEqual(key, 'enum'))\n            return result;\n        const match = Match(schema[key], base, ref);\n        return !Guard.IsUndefined(match) ? match : result;\n    }, undefined);\n}\nfunction Match(schema, base, ref) {\n    const relativeBase = RelativeBase(schema, base);\n    return MatchSchemaObject(schema, relativeBase, ref) ??\n        MatchFromArray(schema, relativeBase, ref) ??\n        MatchFromObject(schema, relativeBase, ref);\n}\n// ------------------------------------------------------------------\n// Resource\n//\n// Wraps RefInternal to check whether the resolved schema is itself\n// a resource root (carries its own $id). Used by FindResolvedResource\n// to tell a boundary hit from a landing inside a resource.\n// ------------------------------------------------------------------\nfunction Resource(context, schema, base, ref) {\n    const result = RefInternal(context, schema, base, ref);\n    return Schema.IsSchemaObject(result) && Schema.IsId(result) ? result : undefined;\n}\n// ------------------------------------------------------------------\n// FindDeferredResource\n//\n// Legacy Draft-4 schemas (no $schema keyword) treat a nested $id as\n// an in-place base change, not a new resource. A local ('#...') ref\n// landing at a different base than the current one needs a stack\n// entry so later lookups use the right base.\n// ------------------------------------------------------------------\nfunction FindDeferredResourceLegacy(stack, ref, schema) {\n    if (!ref.$ref.startsWith('#'))\n        return undefined;\n    if (!Schema.IsSchemaObject(stack.schema) || Guard.HasPropertyKey(stack.schema, '$schema'))\n        return undefined;\n    const targetBase = Base(stack.lexicalSchema, stack.referenceBase, schema);\n    if (Guard.IsUndefined(targetBase) || Guard.IsEqual(targetBase, stack.referenceBase))\n        return undefined;\n    return { target: schema, base: targetBase, root: /* safe-object-root */ stack.lexicalSchema };\n}\nfunction FindDeferredResourceModern(stack, canonical, schema) {\n    const remoteRoot = stack.context[canonical];\n    if (!Schema.IsSchemaObject(remoteRoot))\n        return undefined;\n    return { target: schema, base: canonical, root: remoteRoot };\n}\nfunction FindDeferredResource(stack, ref, schema, canonical, isRemote) {\n    const remote = isRemote ? FindDeferredResourceModern(stack, canonical, schema) : undefined;\n    return Guard.IsUndefined(remote) ? FindDeferredResourceLegacy(stack, ref, schema) : remote;\n}\n// ------------------------------------------------------------------\n// FindResolvedResource\n//\n// Handles a ref that crossed into a different resource but landed\n// on a schema without that resource's $id (e.g. a pointer into the\n// middle of a remote document). Enters the enclosing resource so\n// lexical/base lookups behave as if traversal walked in from its top.\n// ------------------------------------------------------------------\nfunction FindResolvedResource(stack, canonical, schema) {\n    if (Schema.IsId(schema))\n        return undefined;\n    const resource = Resource(stack.context, /* safe-object-root */ stack.schema, stack.referenceBase, canonical);\n    if (!resource || stack.ids.includes(resource))\n        return undefined;\n    return { resource };\n}\n// ------------------------------------------------------------------\n// RefInternal\n//\n// Shared lookup used by Ref, RecursiveRef, and DynamicRef. Tries,\n// in order: exact match in the pre-registered context, then a local\n// search within the given schema, then a search in a remote\n// document. Returns just the schema; caller-specific bookkeeping\n// (deferred/resolved resources) happens one level up.\n// ------------------------------------------------------------------\nfunction RefInternalWithContext(context, ref) {\n    return Guard.HasPropertyKey(context, ref) ? context[ref] : undefined;\n}\nfunction RefInternalWithLocal(schema, base, ref) {\n    return Match(schema, base, ref);\n}\nfunction RefInternalWithRemote(context, base, ref) {\n    const canonicalHref = CanonicalHref(ref);\n    if (!Guard.HasPropertyKey(context, canonicalHref) || Guard.IsEqual(canonicalHref, CanonicalHref(base)))\n        return undefined;\n    const remoteSchema = context[canonicalHref];\n    const remoteBase = RelativeBase(remoteSchema, new URL(canonicalHref));\n    return Guard.IsEqual(ref.hash, '') ? remoteSchema : Match(remoteSchema, remoteBase, ref);\n}\nfunction RefInternal(context, schema, base, ref) {\n    const absoluteBase = AbsoluteBase(base);\n    const target = Stack.NextUri(ref, absoluteBase.href);\n    return RefInternalWithContext(context, ref) ??\n        RefInternalWithLocal(schema, absoluteBase, target) ??\n        RefInternalWithRemote(context, absoluteBase, target);\n}\n// ------------------------------------------------------------------\n// RefNextStack\n//\n// Computes the next stack state from any deferred or resolved\n// resource found while following a $ref, carrying existing stack\n// state forward rather than rebuilding it.\n// ------------------------------------------------------------------\nfunction RefNextStackDeferred(stack, deferredResource) {\n    if (!deferredResource)\n        return stack;\n    const resourceEntries = new Map(stack.resourceEntries);\n    resourceEntries.set(deferredResource.target, { base: deferredResource.base, root: deferredResource.root });\n    return { ...stack, resourceEntries };\n}\nfunction RefNextStackResolved(stack, resolvedResource) {\n    return resolvedResource ? Stack.NextStack(stack, resolvedResource.resource) : stack;\n}\nfunction RefNextStack(stack, pendingResource, deferredResource, resolvedResource) {\n    const withDeferred = RefNextStackDeferred({ ...stack, pendingResource }, deferredResource);\n    const withResolved = RefNextStackResolved(withDeferred, resolvedResource);\n    return withResolved;\n}\n// ------------------------------------------------------------------\n// RefResult\n//\n// Builds the final XRefResult. RefResultFound gets the canonical\n// URL, checks if it's remote from the current resource, and looks\n// for a deferred or resolved resource crossing accordingly.\n// RefResultNotFound just advances pendingResource if a schema was\n// found without crossing into a resource.\n// ------------------------------------------------------------------\nfunction RefResultFound(stack, ref, schema) {\n    const canonical = CanonicalHref(Stack.NextUri(ref.$ref, stack.referenceBase));\n    const isRemote = !Guard.IsEqual(canonical, stack.resourceBase);\n    const deferredResource = FindDeferredResource(stack, ref, schema, canonical, isRemote);\n    const resolvedResource = isRemote ? FindResolvedResource(stack, canonical, schema) : undefined;\n    return { schema, stack: RefNextStack(stack, true, deferredResource, resolvedResource) };\n}\nfunction RefResultNotFound(stack, schema) {\n    return { schema, stack: RefNextStack(stack, !Guard.IsUndefined(schema)) };\n}\n// ------------------------------------------------------------------\n// Ref\n//\n// Picks the root to resolve against, and returns a XRefResult\n// containing the resolved schema and the next stack state for\n// subsequent evaluation.\n// ------------------------------------------------------------------\nexport function Ref(stack, ref) {\n    const schema = RefInternal(stack.context, RefRoot(stack, ref), stack.referenceBase, ref.$ref);\n    return Schema.IsSchemaObject(schema) ? RefResultFound(stack, ref, schema) : RefResultNotFound(stack, schema);\n}\n// ------------------------------------------------------------------\n// RecursiveRef: Draft 2019-09\n//\n// If a $recursiveAnchor is active in scope, it's used as the root\n// instead of the lexical schema, letting the ref bind to the\n// outermost applicable schema rather than the innermost.\n// ------------------------------------------------------------------\nfunction IsRecursiveAnchorInScope(stack) {\n    return Schema.IsSchemaObject(stack.lexicalSchema) && Schema.IsRecursiveAnchorTrue(stack.lexicalSchema);\n}\nexport function RecursiveRef(stack, recursiveRef) {\n    const schema = IsRecursiveAnchorInScope(stack) ? stack.recursiveAnchor : stack.lexicalSchema;\n    return RefInternal(stack.context, schema, stack.lexicalBase, recursiveRef.$recursiveRef);\n}\n// ------------------------------------------------------------------\n// DynamicRef: Draft 2020-12\n//\n// FindScopedDynamicAnchor checks anchors tracked on the stack first,\n// then falls back to a full tree search. If RefInternal finds a target\n// directly, DynamicRefWhenFound only continues the scoped search when\n// that target itself has a $dynamicAnchor. If RefInternal finds nothing,\n// DynamicRefWhenNotFound goes straight to a scoped anchor search\n// by name.\n// ------------------------------------------------------------------\nfunction DynamicRefFragment(stack, dynamicRef) {\n    return Stack.NextUri(dynamicRef.$dynamicRef, AbsoluteBase(stack.lexicalBase).href).hash;\n}\nfunction FindScopedDynamicAnchor(stack, name) {\n    return stack.dynamicAnchors.find((anchor) => Guard.IsEqual(anchor.$dynamicAnchor, name)) ?? SearchDynamicAnchor(stack.schema, name);\n}\nfunction DynamicRefWhenFound(stack, dynamicRef, fragmentTarget) {\n    if (!Schema.IsSchemaObject(fragmentTarget) || !Schema.IsDynamicAnchor(fragmentTarget))\n        return fragmentTarget;\n    const fragment = DynamicRefFragment(stack, dynamicRef);\n    return IsPointerFragment(fragment) ? fragmentTarget : FindScopedDynamicAnchor(stack, fragmentTarget.$dynamicAnchor);\n}\nfunction DynamicRefWhenNotFound(stack, dynamicRef) {\n    const fragment = DynamicRefFragment(stack, dynamicRef);\n    // (review): We never observe this condition, but should be able to reach here in coverage.\n    // if (IsPointerFragment(fragment) || !fragment.startsWith('#')) return undefined\n    return FindScopedDynamicAnchor(stack, decodeURIComponent(fragment.slice(1)));\n}\nexport function DynamicRef(stack, dynamicRef) {\n    const fragmentRoot = dynamicRef.$dynamicRef.startsWith('#') ? stack.lexicalSchema : stack.schema;\n    const fragmentTarget = RefInternal(stack.context, fragmentRoot, stack.lexicalBase, dynamicRef.$dynamicRef);\n    return Guard.IsUndefined(fragmentTarget) ? DynamicRefWhenNotFound(stack, dynamicRef) : DynamicRefWhenFound(stack, dynamicRef, fragmentTarget);\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Functions from './_functions.mjs';\nimport { Resolve } from '../resolve/index.mjs';\nimport { CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildDynamicRef(stack, context, schema, value) {\n    const target = Resolve.DynamicRef(stack, schema) ?? false;\n    const nextStack = target ? { ...stack, pendingResource: true } : stack;\n    return Functions.CreateFunction(nextStack, context, target, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckDynamicRef(stack, context, schema, value) {\n    const target = Resolve.DynamicRef(stack, schema) ?? false;\n    const nextStack = target ? { ...stack, pendingResource: true } : stack;\n    return (Schema.IsSchema(target) && CheckSchema(nextStack, context, target, value));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorDynamicRef(stack, context, schemaPath, instancePath, schema, value) {\n    const target = Resolve.DynamicRef(stack, schema) ?? false;\n    const nextStack = target ? { ...stack, pendingResource: true } : stack;\n    return (Schema.IsSchema(target) && ErrorSchema(nextStack, context, schemaPath, instancePath, target, value));\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildEnum(_stack, _context, schema, value) {\n    return E.ReduceOr(schema.enum.map(option => {\n        if (G.IsValueLike(option))\n            return E.IsEqual(value, E.Constant(option));\n        const variable = Externals.CreateVariable(option);\n        return E.IsDeepEqual(value, variable);\n    }));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckEnum(_stack, _context, schema, value) {\n    return G.Some(schema.enum, option => G.IsValueLike(option)\n        ? G.IsEqual(value, option)\n        : G.IsDeepEqual(value, option));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorEnum(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckEnum(stack, context, schema, value) ||\n        context.AddError('enum', schemaPath, instancePath, { allowedValues: schema.enum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildExclusiveMaximum(_stack, _context, schema, value) {\n    return E.IsLessThan(value, E.Constant(schema.exclusiveMaximum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckExclusiveMaximum(_stack, _context, schema, value) {\n    return G.IsLessThan(value, schema.exclusiveMaximum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorExclusiveMaximum(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckExclusiveMaximum(stack, context, schema, value) ||\n        context.AddError('exclusiveMaximum', schemaPath, instancePath, { comparison: '<', limit: schema.exclusiveMaximum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildExclusiveMinimum(_stack, _context, schema, value) {\n    return E.IsGreaterThan(value, E.Constant(schema.exclusiveMinimum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckExclusiveMinimum(_stack, _context, schema, value) {\n    return G.IsGreaterThan(value, schema.exclusiveMinimum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorExclusiveMinimum(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckExclusiveMinimum(stack, context, schema, value) ||\n        context.AddError('exclusiveMinimum', schemaPath, instancePath, { comparison: '>', limit: schema.exclusiveMinimum });\n}\n","const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nconst DATE = /^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/;\nfunction IsLeapYear(year) {\n    return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n/**\n * Returns true if the value is a ISO8601 Date component string\n * @description https://datatracker.ietf.org/doc/html/rfc3339\n * @example `2020-12-12`\n */\nexport function IsDate(value) {\n    const matches = DATE.exec(value);\n    if (!matches)\n        return false;\n    const year = +matches[1];\n    const month = +matches[2];\n    const day = +matches[3];\n    return month >= 1 && month <= 12 && day >= 1 && day <= (month === 2 && IsLeapYear(year) ? 29 : DAYS[month]);\n}\n","const TIME = /^(\\d\\d):(\\d\\d):(\\d\\d)(?:\\.\\d+)?(?:([Zz])|([+-])(\\d\\d):(\\d\\d))?$/;\n/**\n * Returns true if the value is an ISO time string\n * @specification https://datatracker.ietf.org/doc/html/rfc3339\n */\nexport function IsTime(value, strictTimeZone = true) {\n    const matches = TIME.exec(value);\n    if (!matches)\n        return false;\n    // Require timezone offset or 'Z'/'z' when strictTimeZone is true\n    if (strictTimeZone && !matches[4] && !matches[5])\n        return false;\n    const hr = +matches[1];\n    const min = +matches[2];\n    const sec = +matches[3];\n    if (hr > 23 || min > 59 || sec > 60)\n        return false;\n    if (matches[5]) {\n        const tzH = +matches[6];\n        const tzM = +matches[7];\n        if (tzH > 23 || tzM > 59)\n            return false;\n    }\n    if (sec < 60)\n        return true;\n    // Leap second handling: must normalize to 23:59:60 UTC (1439 total UTC minutes)\n    const tzSign = matches[5] === '-' ? -1 : 1;\n    const tzH = +(matches[6] || 0);\n    const tzM = +(matches[7] || 0);\n    const totalUtcMin = (hr * 60 + min) - tzSign * (tzH * 60 + tzM);\n    return (totalUtcMin % 1440 + 1440) % 1440 === 1439;\n}\n","import { IsDate } from './date.mjs';\nimport { IsTime } from './time.mjs';\n/**\n * Returns true if the value is a ISO8601 DateTime string\n * @specification https://datatracker.ietf.org/doc/html/rfc3339\n * @example `2020-12-12T20:20:40+00:00`\n */\nexport function IsDateTime(value) {\n    const dateTime = value.split(/T/i);\n    return dateTime.length === 2 && IsDate(dateTime[0]) && IsTime(dateTime[1]);\n}\n","const Duration = /^P((\\d+Y(\\d+M(\\d+D)?)?|\\d+M(\\d+D)?|\\d+D)(T(\\d+H(\\d+M(\\d+S)?)?|\\d+M(\\d+S)?|\\d+S))?|T(\\d+H(\\d+M(\\d+S)?)?|\\d+M(\\d+S)?|\\d+S)|\\d+W)$/;\n/**\n * Returns true if the value is a valid duration.\n * @specification https://www.rfc-editor.org/rfc/rfc3339.html#appendix-A\n */\nexport function IsDuration(value) {\n    return Duration.test(value);\n}\n","const Email = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[^\"\\\\]|\\\\[\\x20-\\x7e])*\")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\\])$/i;\n/**\n * Returns true if the value is an Email\n * @specification https://datatracker.ietf.org/doc/html/rfc5322\n */\nexport function IsEmail(value) {\n    return Email.test(value);\n}\n","// deno-fmt-ignore-file\n// -------------------------------------------------------------------\n// Validation Rules\n// -------------------------------------------------------------------\nexport const RE_RULE_HYPHEN_PLACEMENT = /^(?!-).*(?<!-)$/;\nexport const RE_RULE_NOT_RESERVED_ACE = /^(?!..--)/;\nexport const RE_ASCII_LDH = /^[a-zA-Z0-9-]*$/;\n// -------------------------------------------------------------------\n// ASCII & Encoding\n// -------------------------------------------------------------------\nexport const RE_ASCII = /^\\p{ASCII}*$/u;\nexport const RE_NON_ASCII = /[^\\p{ASCII}]/u;\n// -------------------------------------------------------------------\n// Structural & Unicode Controls\n// -------------------------------------------------------------------\nexport const RE_HIGH_SURROGATE = /[\\u{d800}-\\u{dbff}]/u;\nexport const RE_REGIONAL_INDICATOR = /[\\u{1f1e6}-\\u{1f1ff}]/u;\nexport const RE_VARIATION_SELECTOR = /[\\u{fe00}-\\u{fe0f}]/u;\nexport const RE_ZERO_WIDTH_JOINER = /\\u{200d}/u;\n// -------------------------------------------------------------------\n// Numbers & Digits\n// -------------------------------------------------------------------\nexport const RE_ASCII_DIGIT = /[0-9]/;\nexport const RE_ARABIC_INDIC_DIGIT = /[\\u{0660}-\\u{0669}]/u;\nexport const RE_EXT_ARABIC_INDIC_DIGIT = /[\\u{06f0}-\\u{06f9}]/u;\n// -------------------------------------------------------------------\n// Separators\n// -------------------------------------------------------------------\nexport const RE_COMMON_SEPARATOR = /[\\u{002e}\\u{002c}\\u{003a}\\u{002f}]/u;\nexport const RE_EUROPEAN_SEPARATOR = /[\\u{002d}\\u{002b}]/u;\n// -------------------------------------------------------------------\n// General Categories\n// -------------------------------------------------------------------\nexport const RE_MARK_NONSPACING = /\\p{Mn}/u;\nexport const RE_MARK_SPACING_COMBINING = /\\p{Mc}/u;\nexport const RE_MARK_ENCLOSING = /\\p{Me}/u;\nexport const RE_COMBINING_MARK = /[\\p{Mn}\\p{Mc}\\p{Me}]/u;\nexport const RE_LETTER = /\\p{L}/u;\nexport const RE_NUMBER_DECIMAL = /\\p{Nd}/u;\n// -------------------------------------------------------------------\n// Scripts\n// -------------------------------------------------------------------\nexport const RE_SCRIPT_GREEK = /\\p{Script=Greek}/u;\nexport const RE_SCRIPT_HEBREW = /\\p{Script=Hebrew}/u;\nexport const RE_SCRIPT_JAPANESE = /[\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Han}]/u;\nexport const RE_SCRIPT_ARABIC_LETTER = /[\\p{Script=Arabic}\\p{Script=Syriac}\\p{Script=Thaana}\\p{Script=Mandaic}]/u;\n// -------------------------------------------------------------------\n// RFC Specifications & Context Exceptions\n// -------------------------------------------------------------------\nexport const RE_VIRAMA = /[\\u{094d}\\u{09cd}\\u{0a4d}\\u{0acd}\\u{0b4d}\\u{0bcd}\\u{0c4d}\\u{0ccd}\\u{0d3b}\\u{0d3c}\\u{0d4d}\\u{0dca}\\u{1b44}\\u{1baa}\\u{1bab}\\u{a9c0}\\u{11046}\\u{1107f}\\u{110b9}\\u{11133}\\u{11134}\\u{111c0}\\u{11235}\\u{1134d}\\u{11442}\\u{114c2}\\u{115bf}\\u{1163f}\\u{116b6}\\u{11c3f}\\u{11d44}\\u{11d45}]/u;\nexport const RE_RFC5892_DISALLOWED = /[\\u{0640}\\u{07fa}\\u{302e}\\u{302f}\\u{3031}\\u{3032}\\u{3033}\\u{3034}\\u{3035}\\u{303b}]/u;\nexport const RE_CONTEXTO_EXCEPTIONS = /[\\u{00b7}\\u{0375}\\u{05f3}\\u{05f4}\\u{200c}\\u{200d}\\u{30fb}]/u;\nexport const RE_PVALID_EXCEPTIONS = /[\\u{00df}\\u{03c2}\\u{06fd}\\u{06fe}\\u{0f0b}\\u{3007}]/u;\n// -------------------------------------------------------------------\n// Composite Patterns\n// -------------------------------------------------------------------\nexport const RE_EUROPEAN_NUMBER = new RegExp([\n    RE_ASCII_DIGIT,\n    RE_EXT_ARABIC_INDIC_DIGIT\n].map((regexp) => regexp.source).join('|'), 'u');\nexport const RE_PERMITTED_CATEGORY = new RegExp([\n    RE_LETTER,\n    RE_EUROPEAN_SEPARATOR,\n    RE_COMMON_SEPARATOR,\n    RE_NUMBER_DECIMAL,\n    RE_MARK_NONSPACING,\n    RE_MARK_SPACING_COMBINING,\n    RE_CONTEXTO_EXCEPTIONS,\n    RE_PVALID_EXCEPTIONS\n].map((regexp) => regexp.source).join('|'), 'u');\n","import * as Pattern from '../pattern/pattern.mjs';\n// -------------------------------------------------------------------\n// Validates an ASCII LDH label per RFC 5891 §4.2.3.1\n// -------------------------------------------------------------------\nexport function IsAsciiLabel(value) {\n    return (Pattern.RE_RULE_HYPHEN_PLACEMENT.test(value) &&\n        Pattern.RE_RULE_NOT_RESERVED_ACE.test(value) &&\n        Pattern.RE_ASCII_LDH.test(value));\n}\n","import * as Pattern from '../pattern/pattern.mjs';\n// ------------------------------------------------------------------\n// PunyCode (RFC 3492)\n// ------------------------------------------------------------------\nconst PUNYCODE_BASE = 36;\nconst PUNYCODE_TMIN = 1;\nconst PUNYCODE_TMAX = 26;\nconst PUNYCODE_SKEW = 38;\nconst PUNYCODE_DAMP = 700;\nconst PUNYCODE_INITIAL_BIAS = 72;\nconst PUNYCODE_INITIAL_N = 128;\n// ------------------------------------------------------------------\n// ThrowDontCare\n// ------------------------------------------------------------------\nfunction ThrowDontCare() {\n    throw null;\n}\n// ------------------------------------------------------------------\n// IsAcePrefixed\n// ------------------------------------------------------------------\nexport function IsAcePrefixed(value) {\n    return value.toLowerCase().startsWith('xn--');\n}\n// ------------------------------------------------------------------\n// Adapt\n// ------------------------------------------------------------------\nfunction Adapt(delta, numPoints, firstTime) {\n    delta = firstTime ? Math.floor(delta / PUNYCODE_DAMP) : delta >> 1;\n    delta += Math.floor(delta / numPoints);\n    let k = 0;\n    while (delta > (((PUNYCODE_BASE - PUNYCODE_TMIN) * PUNYCODE_TMAX) >> 1)) {\n        delta = Math.floor(delta / (PUNYCODE_BASE - PUNYCODE_TMIN));\n        k += PUNYCODE_BASE;\n    }\n    return k + Math.floor(((PUNYCODE_BASE - PUNYCODE_TMIN + 1) * delta) / (delta + PUNYCODE_SKEW));\n}\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nexport function Decode(value) {\n    const output = [];\n    let n = PUNYCODE_INITIAL_N;\n    let i = 0;\n    let bias = PUNYCODE_INITIAL_BIAS;\n    const delimIdx = value.lastIndexOf('-');\n    if (delimIdx > 0) {\n        for (let j = 0; j < delimIdx; j++) {\n            const cp = value.charCodeAt(j);\n            if (cp >= 128)\n                ThrowDontCare(); // throw new Error('Invalid punycode: non-basic before delimiter')\n            output.push(cp);\n        }\n    }\n    let inIdx = delimIdx < 0 ? 0 : delimIdx + 1;\n    while (inIdx < value.length) {\n        const oldi = i;\n        let w = 1;\n        let k = PUNYCODE_BASE;\n        while (true) {\n            if (inIdx >= value.length)\n                ThrowDontCare(); // throw new Error('Invalid punycode: unexpected end of input')\n            const ch = value.charCodeAt(inIdx++);\n            let digit;\n            if (ch >= 0x61 && ch <= 0x7a)\n                digit = ch - 0x61; // a-z => 0-25\n            else if (ch >= 0x30 && ch <= 0x39)\n                digit = ch - 0x30 + 26; // 0-9 => 26-35\n            // else if (ch >= 0x41 && ch <= 0x5a) digit = ch - 0x41 // A-Z => 0-25 // (no-spec-coverage)\n            else\n                ThrowDontCare(); // throw new Error('Invalid punycode: bad digit character')\n            i += digit * w;\n            const t = k <= bias ? PUNYCODE_TMIN : k >= bias + PUNYCODE_TMAX ? PUNYCODE_TMAX : k - bias;\n            if (digit < t)\n                break;\n            w *= PUNYCODE_BASE - t;\n            k += PUNYCODE_BASE;\n        }\n        const outLen = output.length + 1;\n        bias = Adapt(i - oldi, outLen, oldi === 0);\n        n += Math.floor(i / outLen);\n        i %= outLen;\n        output.splice(i, 0, n);\n        i++;\n    }\n    return String.fromCodePoint(...output);\n}\n// ------------------------------------------------------------------\n// DigitToChar\n// ------------------------------------------------------------------\nfunction DigitToChar(digit) {\n    return digit < 26 ? String.fromCharCode(digit + 0x61) : String.fromCharCode(digit - 26 + 0x30);\n}\n// ------------------------------------------------------------------\n// Encode\n//\n// Encodes a Unicode string into its Punycode payload (the part that\n// follows the 'xn--' ACE prefix). Used to compute the true A-label\n// length of a U-label, since the 63-octet label length limit (RFC\n// 5891 §4.2.4) applies to the encoded form, not the code point count.\n// ------------------------------------------------------------------\nconst RE_REPLACE_NON_ASCII = new RegExp(Pattern.RE_NON_ASCII.source, 'gu');\nexport function Encode(input) {\n    // Extract basic ASCII characters and set initial output array state\n    const basic = input.replace(RE_REPLACE_NON_ASCII, '');\n    const basicLength = basic.length;\n    const result = basicLength > 0 ? [basic, '-'] : [];\n    // Extract unicode codepoints\n    const codePoints = Array.from(input, (char) => char.codePointAt(0));\n    let n = PUNYCODE_INITIAL_N;\n    let delta = 0;\n    let bias = PUNYCODE_INITIAL_BIAS;\n    let handledCPCount = basicLength;\n    while (handledCPCount < codePoints.length) {\n        let m = Infinity;\n        for (const cp of codePoints) {\n            if (cp >= n && cp < m)\n                m = cp;\n        }\n        delta += (m - n) * (handledCPCount + 1);\n        n = m;\n        for (const cp of codePoints) {\n            if (cp < n)\n                delta++;\n            if (cp === n) {\n                let q = delta;\n                for (let k = PUNYCODE_BASE;; k += PUNYCODE_BASE) {\n                    const t = k <= bias ? PUNYCODE_TMIN : k >= bias + PUNYCODE_TMAX ? PUNYCODE_TMAX : k - bias;\n                    if (q < t)\n                        break;\n                    const digit = t + ((q - t) % (PUNYCODE_BASE - t));\n                    result.push(DigitToChar(digit));\n                    q = Math.floor((q - t) / (PUNYCODE_BASE - t));\n                }\n                result.push(DigitToChar(q));\n                bias = Adapt(delta, handledCPCount + 1, handledCPCount === basicLength);\n                delta = 0;\n                handledCPCount++;\n            }\n        }\n        delta++;\n        n++;\n    }\n    return result.join('');\n}\n","// deno-fmt-ignore-file\nimport * as FormatPuny from './puny.mjs';\nimport * as Pattern from '../pattern/pattern.mjs';\n// ------------------------------------------------------------------\n// LOCAL REGEX: Allowed Bidi classes per direction (RFC 5893)\n// ------------------------------------------------------------------\nconst RE_RTL_ALLOWED = /^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/;\nconst RE_LTR_ALLOWED = /^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/;\nconst RE_RTL_CLASSES = /^(?:R|AL|AN)$/;\n// ------------------------------------------------------------------\n// HasBidiChars\n//\n// Decodes a punycode label to its Unicode form (if it is one) and\n// checks whether the result is an RTL label per RFC 5893 §1.4.\n// ------------------------------------------------------------------\nexport function HasBidiChars(value) {\n    if (FormatPuny.IsAcePrefixed(value)) {\n        try {\n            return HasRightToLeftCharacters(FormatPuny.Decode(value.slice(4).toLowerCase()));\n        }\n        catch {\n            return false;\n        }\n    }\n    return HasRightToLeftCharacters(value);\n}\n// ------------------------------------------------------------------\n// GetBidiClass\n// ------------------------------------------------------------------\nfunction GetBidiClass(codePoint) {\n    const char = String.fromCodePoint(codePoint);\n    return (Pattern.RE_EUROPEAN_NUMBER.test(char) ? 'EN' :\n        Pattern.RE_ARABIC_INDIC_DIGIT.test(char) ? 'AN' :\n            // Pattern.RE_EUROPEAN_SEPARATOR.test(char) ? 'ES' : // (no-spec-coverage)\n            // Pattern.RE_COMMON_SEPARATOR.test(char) ? 'CS' : // (no-spec-coverage)\n            Pattern.RE_MARK_NONSPACING.test(char) ? 'NSM' :\n                Pattern.RE_SCRIPT_HEBREW.test(char) ? 'R' :\n                    Pattern.RE_SCRIPT_ARABIC_LETTER.test(char) ? 'AL' :\n                        Pattern.RE_LETTER.test(char) ? 'L' :\n                            'ON');\n}\n// ------------------------------------------------------------------\n// HasRightToLeftCharacters\n//\n// Per RFC 5893 §1.4: \"An RTL label is a label that contains at least\n// one character of type R, AL, or AN.\" Used to determine whether a\n// domain name is a \"Bidi domain name\" (RFC 5893 §1.4), in which case\n// the Bidi Rule applies to every label in the domain.\n// ------------------------------------------------------------------\nexport function HasRightToLeftCharacters(value) {\n    for (const ch of value)\n        if (RE_RTL_CLASSES.test(GetBidiClass(ch.codePointAt(0))))\n            return true;\n    return false;\n}\n// ------------------------------------------------------------------\n// SatisfiesBidiRule\n// ------------------------------------------------------------------\nexport function SatisfiesBidiRule(value) {\n    let isRtl = false;\n    let allowed = RE_LTR_ALLOWED;\n    let sawEN = false;\n    let sawAN = false;\n    let isFirst = true;\n    // let lastClass: string | null = null // (no-spec-coverage)\n    for (const ch of value) {\n        const bidiClass = GetBidiClass(ch.codePointAt(0));\n        if (isFirst) {\n            // 1. The first character must be a character with Bidi property L, R, or AL.\n            if (bidiClass !== 'L' && bidiClass !== 'R' && bidiClass !== 'AL')\n                return false;\n            isRtl = bidiClass === 'R' || bidiClass === 'AL';\n            allowed = isRtl ? RE_RTL_ALLOWED : RE_LTR_ALLOWED;\n            isFirst = false;\n        }\n        // 2 / 5. Only characters in the allowed set for this direction may appear.\n        if (!allowed.test(bidiClass))\n            return false;\n        if (bidiClass === 'EN')\n            sawEN = true;\n        else if (bidiClass === 'AN')\n            sawAN = true;\n        // if (bidiClass !== 'NSM') lastClass = bidiClass // (no-spec-coverage)\n    }\n    if (isRtl && sawEN && sawAN)\n        return false; // spec coverage path\n    // (no-spec-coverage)\n    // if (isRtl) {\n    //   // 3. The end of the label must be R, AL, EN, or AN (ignoring trailing NSM).\n    //   // if (lastClass !== 'R' && lastClass !== 'AL' && lastClass !== 'EN' && lastClass !== 'AN') return false\n    //   // 4. If an EN is present, no AN may be present, and vice versa.\n    //   if (sawEN && sawAN) return false\n    // } else {\n    //   // 6. The end of the label must be L or EN (ignoring trailing NSM).\n    //   // if (lastClass !== 'L' && lastClass !== 'EN') return false\n    // }\n    return true;\n}\n","import * as Pattern from '../pattern/pattern.mjs';\nimport * as FormatBidi from '../format/bidi.mjs';\nimport * as FormatPuny from '../format/puny.mjs';\n// ------------------------------------------------------------------\n// ExceedsMaxALabelLength\n//\n// RFC 5890 §2.3.2.1: an A-label (the ACE-encoded form of a label,\n// \"xn--\" + punycode) must not exceed 63 octets. Only labels\n// containing non-ASCII characters need checking - a pure-ASCII label\n// has no \"xn--\" prefix and is used as-is, so its punycode-encoded\n// length is irrelevant. The ASCII check is a cheap short-circuit that\n// avoids running the punycode encoder on labels that don't need it.\n// ------------------------------------------------------------------\nfunction ExceedsMaxALabelLength(value) {\n    return Pattern.RE_NON_ASCII.test(value) && FormatPuny.Encode(value).length + 4 > 63;\n}\n// ------------------------------------------------------------------\n// HasInvalidHyphens\n//\n// RFC 5891 §4.2.3.2: label must not start or end with a hyphen, and\n// must not have hyphens in the 3rd and 4th codepoint positions (the\n// ACE prefix reservation, e.g. \"xn--\"). Operates on `chars` (the\n// per-codepoint string array) rather than raw string indices so\n// supplementary-plane characters earlier in the label don't throw\n// off the codepoint-position count.\n// ------------------------------------------------------------------\nfunction HasInvalidHyphens(chars) {\n    if (chars[0] === '-' || chars[chars.length - 1] === '-')\n        return true;\n    return chars.slice(2).join('').startsWith('--');\n}\n// ------------------------------------------------------------------\n// IsUnicodeLabel\n// ------------------------------------------------------------------\nexport function IsUnicodeLabel(value) {\n    // RFC 5890 §2.3.2.1: Ensure Max Length\n    if (ExceedsMaxALabelLength(value))\n        return false;\n    // RFC 5893 - Bidi Rule (applies whenever this label itself is RTL)\n    if (FormatBidi.HasRightToLeftCharacters(value) && !FormatBidi.SatisfiesBidiRule(value))\n        return false;\n    const chars = [...value];\n    const codePoints = chars.map((c) => c.codePointAt(0));\n    const length = codePoints.length;\n    // RFC 5891 §4.2.3.2: Hyphen rules\n    if (HasInvalidHyphens(chars))\n        return false;\n    // RFC 5891 §4.2.3.2 - Must not begin with a combining mark\n    if (Pattern.RE_COMBINING_MARK.test(chars[0]))\n        return false;\n    let hasJapanese = false;\n    // let hasArabicIndic = false // (no-spec-coverage)\n    // let hasExtendedArabicIndic = false // (no-spec-coverage)\n    for (let i = 0; i < length; i++) {\n        const codePoint = codePoints[i];\n        const char = chars[i];\n        // 1. DISALLOWED exceptions\n        if (Pattern.RE_RFC5892_DISALLOWED.test(char))\n            return false;\n        // 1b. General category (PVALID) enforcement\n        if (!Pattern.RE_PERMITTED_CATEGORY.test(char))\n            return false;\n        // 2. Collect Flags\n        if (Pattern.RE_SCRIPT_JAPANESE.test(char))\n            hasJapanese = true;\n        // if (Pattern.RE_ARABIC_INDIC_DIGIT.test(char)) hasArabicIndic = true  // (no-spec-coverage)\n        // if (Pattern.RE_EXT_ARABIC_INDIC_DIGIT.test(char)) hasExtendedArabicIndic = true  // (no-spec-coverage)\n        // 3. CONTEXTO / CONTEXTJ Neighbor Rules\n        const prev = codePoints[i - 1], next = codePoints[i + 1];\n        switch (codePoint) {\n            case 0x00b7:\n                if (prev !== 0x006c || next !== 0x006c)\n                    return false;\n                break; // MIDDLE DOT (Catalan)\n            case 0x0375:\n                if (!next || !Pattern.RE_SCRIPT_GREEK.test(chars[i + 1]))\n                    return false;\n                break; // Greek KERAIA\n            case 0x05f3:\n            case 0x05f4:\n                if (!prev || !Pattern.RE_SCRIPT_HEBREW.test(chars[i - 1]))\n                    return false;\n                break; // Hebrew GERESH\n            case 0x200c: // ZWNJ - RFC 5892 Appendix A.1\n                // Note: Full validation requires a Unicode joining type table. We reject\n                // only when preceded by ASCII (U+0000-U+007F), which can never satisfy\n                // the Virama or cursive-joining rules.\n                if (!prev || (prev < 0x0080 && !Pattern.RE_VIRAMA.test(chars[i - 1])))\n                    return false;\n                break;\n            case 0x200d: // ZWJ: RFC 5892 Appendix A.2\n                if (!prev || !Pattern.RE_VIRAMA.test(chars[i - 1]))\n                    return false;\n                break;\n            case 0x30fb: // Checked at end via hasJapanese\n                break; // KATAKANA MIDDLE DOT\n        }\n    }\n    // 4. Global Context Validations (Post-loop)\n    // RFC 5892 Appendix A.7 - Katakana Middle Dot requirement\n    if (value.includes('\\u30fb') && !hasJapanese)\n        return false;\n    // RFC 5892 Appendix A.8/A.9 - Mixing Arabic Digits\n    // if (hasArabicIndic && hasExtendedArabicIndic) return false // (no-spec-coverage)\n    return true;\n}\n","import * as FormatPuny from '../format/puny.mjs';\nimport * as LabelUnicode from './unicode.mjs';\nimport * as Pattern from '../pattern/pattern.mjs';\n// ------------------------------------------------------------------\n// IsPunyLabel\n// ------------------------------------------------------------------\nexport function IsPunyLabel(value) {\n    if (!FormatPuny.IsAcePrefixed(value))\n        return false;\n    try {\n        const body = value.slice(4).toLowerCase();\n        // A payload consisting of only a hyphen, or starting with the delimiter\n        // (like \"-9uc\"), has 0 basic ASCII characters preceding it and is malformed.\n        if (body.lastIndexOf('-') === 0)\n            return false;\n        const decoded = FormatPuny.Decode(body);\n        // RFC 5890 §2.3.2.1 - a U-label must contain at least one non-ASCII\n        // character. Code-unit level check: any non-ASCII codepoint has at least\n        // one UTF-16 unit >= 0x80 (surrogate halves included), so no need to\n        // decode codepoints or allocate a character array to answer this.\n        if (!Pattern.RE_NON_ASCII.test(decoded))\n            return false;\n        return LabelUnicode.IsUnicodeLabel(decoded);\n    }\n    catch {\n        return false;\n    }\n}\n","import * as LabelAscii from './label/ascii.mjs';\nimport * as LabelPuny from './label/puny.mjs';\nfunction IsValidLabelLength(value) {\n    return value.length > 0 && value.length <= 63;\n}\nfunction IsLabel(value) {\n    return IsValidLabelLength(value) && (LabelPuny.IsPunyLabel(value) ||\n        LabelAscii.IsAsciiLabel(value));\n}\nexport function IsHostname(value) {\n    if (value.length === 0 || value.length > 253)\n        return false;\n    if (value.charCodeAt(value.length - 1) === 46)\n        return false;\n    return value.split('.').every((label) => IsLabel(label));\n}\n","import * as FormatBidi from './format/bidi.mjs';\nimport * as LabelUnicode from './label/unicode.mjs';\nimport * as LabelPuny from './label/puny.mjs';\n// ------------------------------------------------------------------\n// IsLabel\n// ------------------------------------------------------------------\nfunction IsValidLabelLength(value) {\n    return value.length > 0 && value.length <= 63;\n}\nfunction IsLabel(value) {\n    return IsValidLabelLength(value) && (LabelPuny.IsPunyLabel(value) ||\n        LabelUnicode.IsUnicodeLabel(value));\n}\n// ------------------------------------------------------------------\n// NormalizeHostname\n//\n// Normalizes a hostname for label validation. Maps fullwidth\n// codepoints to their ASCII equivalent (e.g. 'ａ' U+FF41 maps to\n// 'a'), then normalizes for NFC such that equivalent codepoint\n// sequences can be uniformly compared. It also removes codepoints\n// that IDNA mapping ignores, and converts full stop variants to\n// ASCII '.' so the hostname can be split into labels.\n// ------------------------------------------------------------------\nfunction NormalizeHostname(value) {\n    return value\n        .replace(/[\\uff01-\\uff5e]/g, (char) => String.fromCharCode(char.charCodeAt(0) - 0xfee0)) // RE_FULLWIDTH_MAPPING\n        .normalize('NFC')\n        .replace(/[\\u00ad\\u034f\\u180b-\\u180d\\u200b\\ufe00-\\ufe0f\\u{e0100}-\\u{e01ef}]/gu, '') // RE_IGNORED_MAPPING\n        .replace(/[\\u002E\\u3002\\uFF0E\\uFF61]/g, '.'); // RE_FULL_STOP_MAPPING\n}\n// ------------------------------------------------------------------\n// IsIdnHostname\n// ------------------------------------------------------------------\nexport function IsIdnHostname(value) {\n    if (value.length === 0 || value.includes(' '))\n        return false;\n    const normalized = NormalizeHostname(value);\n    if (normalized.length > 253)\n        return false;\n    const labels = normalized.split('.');\n    const hasBidiChars = labels.some((label) => FormatBidi.HasBidiChars(label));\n    return labels.every((label) => IsLabel(label) && (!hasBidiChars || FormatBidi.SatisfiesBidiRule(label)));\n}\n","import * as Idna from './idna/index.mjs';\n/**\n * Returns true if the value is a valid hostname.\n * @specification https://tools.ietf.org/html/rfc1123\n * @specification https://tools.ietf.org/html/rfc5891\n * @specification https://tools.ietf.org/html/rfc5892\n */\nexport function IsHostname(value) {\n    return Idna.IsHostname(value);\n}\n","const IdnEmail = /^(?:[A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+(?:\\.[A-Za-z0-9!#$%&'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+)*|\"(?:[^\"\\\\]|\\\\.)*\")@[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-)(?:\\.[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-))*$/iu;\n/**\n * Returns true if the value is an IdnEmail\n * @specification https://datatracker.ietf.org/doc/html/rfc4952\n * @specification https://datatracker.ietf.org/doc/html/rfc6531\n */\nexport function IsIdnEmail(value) {\n    return IdnEmail.test(value.normalize('NFC'));\n}\n","import * as Idna from './idna/index.mjs';\n/**\n * Returns true if the value is a valid internationalized (IDN) hostname.\n * @specification https://datatracker.ietf.org/doc/html/rfc5890\n * @specification https://tools.ietf.org/html/rfc5891\n * @specification https://tools.ietf.org/html/rfc5892\n * @specification https://tools.ietf.org/html/rfc5893\n */\nexport function IsIdnHostname(value) {\n    return Idna.IsIdnHostname(value);\n}\n","const IPv4 = /^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)$/;\n/**\n * Returns true if the value is an IPv4 address\n * @specification https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2\n */\nexport function IsIPv4(value) {\n    return IPv4.test(value);\n}\n","const IPv6 = /^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;\n/**\n * Returns true if the value is an IPv6 address\n * @specification https://datatracker.ietf.org/doc/html/rfc4291#section-2.2\n */\nexport function IsIPv6(value) {\n    return IPv6.test(value);\n}\n","// deno-lint-ignore-file no-control-regex\n// Rejects unencoded spaces (0x20), backslashes, control characters (0x00-0x1F, 0x7F), or malformed percent-encodings\nconst InvalidIriChars = /[\\x00-\\x20\\x7F\\\\]|%(?![0-9a-fA-F]{2})/;\n// Detects malformed scheme/authority patterns lacking a colon (e.g. \"httpx//example.com\")\nconst MalformedScheme = /^[a-zA-Z][a-zA-Z0-9+\\-.]*\\/\\//;\n/**\n * Returns true if the value is an IRI reference\n * @specification https://tools.ietf.org/html/rfc3987\n */\nexport function IsIriReference(value) {\n    return (!InvalidIriChars.test(value) &&\n        !MalformedScheme.test(value) &&\n        URL.canParse(value, 'http://example.com'));\n}\n","// deno-lint-ignore-file no-control-regex\n// ------------------------------------------------------------------\n//\n// Removed by the following PR\n//\n// https://github.com/json-schema-org/JSON-Schema-Test-Suite/pull/1176\n//\n// NarrowIpvFuture\n//\n// Substitutes an IPvFuture address with a standard IPv6 loopback\n// address ([::1]). We do this because the native URL.canParse\n// (WHATWG standard) rejects IPvFuture literals, which are\n// otherwise valid in RFC 3987. Because regex substitution can\n// be expensive on large strings, this operation is strictly\n// limited to inputs under a defined length threshold.\n//\n// ------------------------------------------------------------------\n//\n// const IpvFutureMatchMaxLength = 2048\n// const IpvFutureMatch = /\\[[vV][0-9a-fA-F]+\\.[^\\]]+\\]/ // Guarded By IpvFutureMatchMaxLength\n//\n// function NarrowIpvFuture(value: string): string {\n//   return value.length < IpvFutureMatchMaxLength ? value.replace(IpvFutureMatch, '[::1]') : value\n// }\n//\n// ------------------------------------------------------------------\nconst InvalidIriChars = /[\\x00-\\x20<>\\^`{|}\\\\]/;\nconst InvalidPercentEncoding = /%(?![0-9a-fA-F]{2})/;\n/**\n * Returns true if the value is a valid Internationalized Resource Identifier.\n * @specification https://datatracker.ietf.org/doc/html/rfc3987\n */\nexport function IsIri(value) {\n    // 1. Reject strings containing unencoded whitespace or illegal control characters.\n    if (InvalidIriChars.test(value))\n        return false;\n    // 2. Reject malformed percent-encoding triplets.\n    if (InvalidPercentEncoding.test(value))\n        return false;\n    // 3. Delegate to the native URL parser, patching the IPvFuture edge case beforehand.\n    return URL.canParse(value);\n}\n","const JsonPointerUriFragment = /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;\n/**\n * Returns true if the value is a json pointer uri fragment\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsJsonPointerUriFragment(value) {\n    return JsonPointerUriFragment.test(value);\n}\n","const JsonPointer = /^(?:\\/(?:[^~/]|~0|~1)*)*$/;\n/**\n * Returns true if the value is a json pointer\n * @specification https://datatracker.ietf.org/doc/html/rfc6901\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsJsonPointer(value) {\n    return JsonPointer.test(value);\n}\n","/**\n * Returns true if the value is a regular expression string pattern\n * @specification https://ecma-international.org/ecma-262\n */\nexport function IsRegex(value) {\n    try {\n        new RegExp(value, 'u');\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\n","const RelativeJsonPointer = /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/;\n/**\n * Returns true if the value is a relative JSON Pointer\n * @specification https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer/\n * @source https://github.com/ajv-validator/ajv-formats\n */\nexport function IsRelativeJsonPointer(value) {\n    return RelativeJsonPointer.test(value);\n}\n","const UriReference = /^(?:[a-z][a-z0-9+\\-.]*:(?:\\/\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:[\\da-f]{1,4}:){6}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|::(?:[\\da-f]{1,4}:){5}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){4}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,1}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){3}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,2}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){2}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[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|(?:(?:[\\da-f]{1,4}:){0,5}[\\da-f]{1,4})?::[\\da-f]{1,4}|(?:(?:[\\da-f]{1,4}:){0,6}[\\da-f]{1,4})?::)|v[0-9a-f]+\\.[-a-z0-9._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n/**\n * Returns true if the value is a valid Uri Reference.\n * @specification https://tools.ietf.org/html/rfc3986\n */\nexport function IsUriReference(value) {\n    return UriReference.test(value);\n}\n","// deno-lint-ignore-file no-control-regex\nconst UriTemplate = /^(?:(?:[^\\x00-\\x20\"<>%\\\\^`{|}\\x7f]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\\d{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\\d{0,3}|\\*)?)*\\})*$/i;\n/**\n * Returns true if the value is a valid Uri Template\n * @specification https://datatracker.ietf.org/doc/html/rfc6570\n */\nexport function IsUriTemplate(value) {\n    return UriTemplate.test(value);\n}\n","const Uri = /^[a-z][a-z0-9+\\-.]*:(?:\\/\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\\[(?:(?:(?:[\\da-f]{1,4}:){6}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|::(?:[\\da-f]{1,4}:){5}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){4}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,1}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){3}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,2}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:){2}(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,3}[\\da-f]{1,4})?::[\\da-f]{1,4}:(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,4}[\\da-f]{1,4})?::(?:[\\da-f]{1,4}:[\\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d))|(?:(?:[\\da-f]{1,4}:){0,5}[\\da-f]{1,4})?::[\\da-f]{1,4}|(?:(?:[\\da-f]{1,4}:){0,6}[\\da-f]{1,4})?::)|v[0-9a-f]+\\.[-a-z0-9._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n/**\n * Returns true if the value is a valid Uniform Resource Identifier.\n * @specification https://tools.ietf.org/html/rfc3986\n */\nexport function IsUri(value) {\n    return Uri.test(value);\n}\n","/**\n * Returns true if the value is a valid Uniform Resource Locator\n * @specification https://datatracker.ietf.org/doc/html/rfc3986\n * @specification https://datatracker.ietf.org/doc/html/rfc3987\n */\nexport function IsUrl(value) {\n    return URL.canParse(value);\n}\n","const Uuid = /^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;\n/**\n * Returns true if the value is a uuid\n * @specification https://www.rfc-editor.org/info/rfc4122/\n * @specification https://www.rfc-editor.org/info/rfc9562/\n */\nexport function IsUuid(value) {\n    return Uuid.test(value);\n}\n","import { IsDateTime } from './date_time.mjs';\nimport { IsDate } from './date.mjs';\nimport { IsDuration } from './duration.mjs';\nimport { IsEmail } from './email.mjs';\nimport { IsHostname } from './hostname.mjs';\nimport { IsIdnEmail } from './idn_email.mjs';\nimport { IsIdnHostname } from './idn_hostname.mjs';\nimport { IsIPv4 } from './ipv4.mjs';\nimport { IsIPv6 } from './ipv6.mjs';\nimport { IsIriReference } from './iri_reference.mjs';\nimport { IsIri } from './iri.mjs';\nimport { IsJsonPointerUriFragment } from './json_pointer_uri_fragment.mjs';\nimport { IsJsonPointer } from './json_pointer.mjs';\nimport { IsRegex } from './regex.mjs';\nimport { IsRelativeJsonPointer } from './relative_json_pointer.mjs';\nimport { IsTime } from './time.mjs';\nimport { IsUriReference } from './uri_reference.mjs';\nimport { IsUriTemplate } from './uri_template.mjs';\nimport { IsUri } from './uri.mjs';\nimport { IsUrl } from './url.mjs';\nimport { IsUuid } from './uuid.mjs';\n// ------------------------------------------------------------------\n// Formats\n// ------------------------------------------------------------------\nconst formats = new Map();\n// ------------------------------------------------------------------\n// Clear\n// ------------------------------------------------------------------\n/** Clears all entries */\nexport function Clear() {\n    formats.clear();\n}\n// ------------------------------------------------------------------\n// Entries\n// ------------------------------------------------------------------\n/** Returns format entries in this registry */\nexport function Entries() {\n    return [...formats.entries()];\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\n/** Sets a format */\nexport function Set(format, check) {\n    formats.set(format, check);\n}\n// ------------------------------------------------------------------\n// Has\n// ------------------------------------------------------------------\n/** Returns true if the registry has this format */\nexport function Has(format) {\n    return formats.has(format);\n}\n// ------------------------------------------------------------------\n// Get\n// ------------------------------------------------------------------\n/** Gets a format or undefined if not exists */\nexport function Get(format) {\n    return formats.get(format);\n}\n// ------------------------------------------------------------------\n// Test\n// ------------------------------------------------------------------\n/** Tests a value against a format, if the format is not registered, true */\nexport function Test(format, value) {\n    return formats.get(format)?.(value) ?? true;\n}\n// ------------------------------------------------------------------\n// Reset\n// ------------------------------------------------------------------\n/** Resets all formats to defaults */\nexport function Reset() {\n    Clear();\n    formats.set('date-time', IsDateTime);\n    formats.set('date', IsDate);\n    formats.set('duration', IsDuration);\n    formats.set('email', IsEmail);\n    formats.set('hostname', IsHostname);\n    formats.set('idn-email', IsIdnEmail);\n    formats.set('idn-hostname', IsIdnHostname);\n    formats.set('ipv4', IsIPv4);\n    formats.set('ipv6', IsIPv6);\n    formats.set('iri-reference', IsIriReference);\n    formats.set('iri', IsIri);\n    formats.set('json-pointer-uri-fragment', IsJsonPointerUriFragment);\n    formats.set('json-pointer', IsJsonPointer);\n    formats.set('regex', IsRegex);\n    formats.set('relative-json-pointer', IsRelativeJsonPointer);\n    formats.set('time', IsTime);\n    formats.set('uri-reference', IsUriReference);\n    formats.set('uri-template', IsUriTemplate);\n    formats.set('uri', IsUri);\n    formats.set('url', IsUrl);\n    formats.set('uuid', IsUuid);\n}\nReset();\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { Format } from '../../format/index.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build (Remote)\n// ------------------------------------------------------------------\n// export function BuildFormat(_stack: Stack.XStack, _context: BuildContext, schema: Schema.XFormat, value: string): string {\n//   return E.Call(E.Member('Format', 'Test'), [E.Constant(schema.format), value])\n// }\n// ------------------------------------------------------------------\n// Build (Inline)\n// ------------------------------------------------------------------\nexport function BuildFormat(_stack, _context, schema, value) {\n    return Format.Has(schema.format) ? E.Call(Externals.CreateVariable(Format.Get(schema.format)), [value]) : E.Constant(true);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckFormat(_stack, _context, schema, value) {\n    return Format.Test(schema.format, value);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorFormat(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckFormat(stack, context, schema, value) ||\n        context.AddError('format', schemaPath, instancePath, { format: schema.format });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildIf(stack, context, schema, value) {\n    const thenSchema = Schema.IsThen(schema) ? schema.then : true;\n    const elseSchema = Schema.IsElse(schema) ? schema.else : true;\n    return E.Ternary(BuildSchema(stack, context, schema.if, value), BuildSchema(stack, context, thenSchema, value), BuildSchema(stack, context, elseSchema, value));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckIf(stack, context, schema, value) {\n    const thenSchema = Schema.IsThen(schema) ? schema.then : true;\n    const elseSchema = Schema.IsElse(schema) ? schema.else : true;\n    return CheckSchema(stack, context, schema.if, value)\n        ? CheckSchema(stack, context, thenSchema, value)\n        : CheckSchema(stack, context, elseSchema, value);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorIf(stack, context, schemaPath, instancePath, schema, value) {\n    const thenSchema = Schema.IsThen(schema) ? schema.then : true;\n    const elseSchema = Schema.IsElse(schema) ? schema.else : true;\n    const trueContext = new ErrorContext();\n    const isIf = ErrorSchema(stack, trueContext, `${schemaPath}/if`, instancePath, schema.if, value)\n        ? ErrorSchema(stack, trueContext, `${schemaPath}/then`, instancePath, thenSchema, value) ||\n            context.AddError('if', schemaPath, instancePath, { failingKeyword: 'then' })\n        : ErrorSchema(stack, context, `${schemaPath}/else`, instancePath, elseSchema, value) ||\n            context.AddError('if', schemaPath, instancePath, { failingKeyword: 'else' });\n    if (isIf)\n        context.Merge([trueContext]);\n    return isIf;\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Unique from './_unique.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// ItemsSized\n// ------------------------------------------------------------------\nfunction BuildItemsSizedStandard(stack, context, schema, value) {\n    return E.ReduceAnd(schema.items.map((schema, index) => {\n        const isLength = E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(index));\n        const isSchema = BuildSchemaPushStack(stack, context, schema, `${value}[${index}]`);\n        const addIndex = context.AddIndex(E.Constant(index));\n        return E.Or(isLength, E.And(isSchema, addIndex));\n    }));\n}\nfunction BuildItemsSizedFast(stack, context, schema, value) {\n    return E.ReduceAnd(schema.items.map((schema, index) => {\n        const isLength = E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(index));\n        const isSchema = BuildSchemaPushStack(stack, context, schema, `${value}[${index}]`);\n        return E.Or(isLength, isSchema);\n    }));\n}\nfunction BuildItemsSized(stack, context, schema, value) {\n    return context.UseUnevaluated()\n        ? BuildItemsSizedStandard(stack, context, schema, value)\n        : BuildItemsSizedFast(stack, context, schema, value);\n}\nfunction CheckItemsSized(stack, context, schema, value) {\n    return G.Every(schema.items, 0, (schema, index) => {\n        return G.IsLessEqualThan(value.length, index)\n            || (CheckSchemaPushStack(stack, context, schema, value[index]) && context.AddIndex(index));\n    });\n}\nfunction ErrorItemsSized(stack, context, schemaPath, instancePath, schema, value) {\n    return G.EveryAll(schema.items, 0, (schema, index) => {\n        const nextSchemaPath = `${schemaPath}/items/${index}`;\n        const nextInstancePath = `${instancePath}/${index}`;\n        return G.IsLessEqualThan(value.length, index)\n            || (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value[index]) && context.AddIndex(index));\n    });\n}\n// ------------------------------------------------------------------\n// ItemsUnsized\n// ------------------------------------------------------------------\nfunction BuildItemsUnsizedStandard(stack, context, schema, value) {\n    const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n    const [item] = [Unique.CreateUnique()];\n    const isSchema = BuildSchemaPushStack(stack, context, schema.items, item);\n    const addIndex = context.AddIndex('index');\n    return E.Every(value, E.Constant(offset), [item, 'index'], E.And(isSchema, addIndex));\n}\nfunction BuildItemsUnsizedFast(stack, context, schema, value) {\n    const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n    const [item] = [Unique.CreateUnique()];\n    const isSchema = BuildSchemaPushStack(stack, context, schema.items, item);\n    return E.Every(value, E.Constant(offset), [item, 'index'], isSchema);\n}\nfunction BuildItemsUnsized(stack, context, schema, value) {\n    return context.UseUnevaluated()\n        ? BuildItemsUnsizedStandard(stack, context, schema, value)\n        : BuildItemsUnsizedFast(stack, context, schema, value);\n}\nfunction CheckItemsUnsized(stack, context, schema, value) {\n    const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n    return G.Every(value, offset, (element, index) => {\n        return CheckSchemaPushStack(stack, context, schema.items, element)\n            && context.AddIndex(index);\n    });\n}\nfunction ErrorItemsUnsized(stack, context, schemaPath, instancePath, schema, value) {\n    const offset = Schema.IsPrefixItems(schema) ? schema.prefixItems.length : 0;\n    return G.EveryAll(value, offset, (element, index) => {\n        const nextSchemaPath = `${schemaPath}/items`;\n        const nextInstancePath = `${instancePath}/${index}`;\n        return ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema.items, element)\n            && context.AddIndex(index);\n    });\n}\n// ------------------------------------------------------------------\n// Items\n// ------------------------------------------------------------------\nexport function BuildItems(stack, context, schema, value) {\n    return Schema.IsItemsSized(schema) ? BuildItemsSized(stack, context, schema, value) : BuildItemsUnsized(stack, context, schema, value);\n}\nexport function CheckItems(stack, context, schema, value) {\n    return Schema.IsItemsSized(schema) ? CheckItemsSized(stack, context, schema, value) : CheckItemsUnsized(stack, context, schema, value);\n}\nexport function ErrorItems(stack, context, schemaPath, instancePath, schema, value) {\n    return Schema.IsItemsSized(schema) ? ErrorItemsSized(stack, context, schemaPath, instancePath, schema, value) : ErrorItemsUnsized(stack, context, schemaPath, instancePath, schema, value);\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Unique from './_unique.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n    return Schema.IsContains(schema);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxContains(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return E.Constant(true);\n    const [item] = [Unique.CreateUnique()];\n    const count = E.Counted(value, [item, '_'], BuildSchema(stack, context, schema.contains, item));\n    return E.IsLessEqualThan(count, E.Constant(schema.maxContains));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxContains(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return true;\n    const count = G.Counted(value, (item) => CheckSchema(stack, context, schema.contains, item));\n    return G.IsLessEqualThan(count, schema.maxContains);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaxContains(stack, context, schemaPath, instancePath, schema, value) {\n    const minContains = Schema.IsMinContains(schema) ? schema.minContains : 1;\n    return CheckMaxContains(stack, context, schema, value) ||\n        context.AddError('contains', schemaPath, instancePath, { minContains, maxContains: schema.maxContains });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaximum(_stack, _context, schema, value) {\n    return E.IsLessEqualThan(value, E.Constant(schema.maximum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaximum(_stack, _context, schema, value) {\n    return G.IsLessEqualThan(value, schema.maximum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaximum(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMaximum(stack, context, schema, value) ||\n        context.AddError('maximum', schemaPath, instancePath, { comparison: '<=', limit: schema.maximum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxItems(_stack, _context, schema, value) {\n    return E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(schema.maxItems));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxItems(_stack, _context, schema, value) {\n    return G.IsLessEqualThan(value.length, schema.maxItems);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaxItems(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMaxItems(stack, context, schema, value) ||\n        context.AddError('maxItems', schemaPath, instancePath, { limit: schema.maxItems });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxLength(_stack, _context, schema, value) {\n    return E.IsMaxLength(value, E.Constant(schema.maxLength));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxLength(_stack, _context, schema, value) {\n    return G.IsMaxLength(value, schema.maxLength);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMaxLength(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMaxLength(stack, context, schema, value) ||\n        context.AddError('maxLength', schemaPath, instancePath, { limit: schema.maxLength });\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMaxProperties(_stack, _context, schema, value) {\n    return E.IsLessEqualThan(E.Member(E.Keys(value), 'length'), E.Constant(schema.maxProperties));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMaxProperties(_stack, _context, schema, value) {\n    return G.IsLessEqualThan(G.Keys(value).length, schema.maxProperties);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function ErrorMaxProperties(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMaxProperties(stack, context, schema, value) ||\n        context.AddError('maxProperties', schemaPath, instancePath, { limit: schema.maxProperties });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Unique from './_unique.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n    return Schema.IsContains(schema);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildMinContainsStandard(stack, context, schema, value) {\n    const [item, index] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    const count = E.Counted(value, [item, index], E.And(BuildSchema(stack, context, schema.contains, item), context.AddIndex(index)));\n    return E.IsGreaterEqualThan(count, E.Constant(schema.minContains));\n}\nfunction BuildMinContainsFast(stack, context, schema, value) {\n    const [item] = [Unique.CreateUnique()];\n    const count = E.Counted(value, [item, '_'], BuildSchema(stack, context, schema.contains, item));\n    return E.IsGreaterEqualThan(count, E.Constant(schema.minContains));\n}\nexport function BuildMinContains(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return E.Constant(true);\n    return context.UseUnevaluated()\n        ? BuildMinContainsStandard(stack, context, schema, value)\n        : BuildMinContainsFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinContains(stack, context, schema, value) {\n    if (!IsValid(schema))\n        return true;\n    const count = G.Counted(value, (item, index) => CheckSchema(stack, context, schema.contains, item) && context.AddIndex(index));\n    return G.IsGreaterEqualThan(count, schema.minContains);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinContains(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMinContains(stack, context, schema, value) ||\n        context.AddError('contains', schemaPath, instancePath, { minContains: schema.minContains });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinimum(_stack, _context, schema, value) {\n    return E.IsGreaterEqualThan(value, E.Constant(schema.minimum));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinimum(_stack, _context, schema, value) {\n    return G.IsGreaterEqualThan(value, schema.minimum);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinimum(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMinimum(stack, context, schema, value) ||\n        context.AddError('minimum', schemaPath, instancePath, { comparison: '>=', limit: schema.minimum });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinItems(_stack, _context, schema, value) {\n    return E.IsGreaterEqualThan(E.Member(value, 'length'), E.Constant(schema.minItems));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinItems(_stack, _context, schema, value) {\n    return G.IsGreaterEqualThan(value.length, schema.minItems);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinItems(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMinItems(stack, context, schema, value) ||\n        context.AddError('minItems', schemaPath, instancePath, { limit: schema.minItems });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinLength(_stack, _context, schema, value) {\n    return E.IsMinLength(value, E.Constant(schema.minLength));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinLength(_stack, _context, schema, value) {\n    return G.IsMinLength(value, schema.minLength);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinLength(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMinLength(stack, context, schema, value) ||\n        context.AddError('minLength', schemaPath, instancePath, { limit: schema.minLength });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMinProperties(_stack, _context, schema, value) {\n    return E.IsGreaterEqualThan(E.Member(E.Keys(value), 'length'), E.Constant(schema.minProperties));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMinProperties(_stack, _context, schema, value) {\n    return G.IsGreaterEqualThan(G.Keys(value).length, schema.minProperties);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMinProperties(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMinProperties(stack, context, schema, value) ||\n        context.AddError('minProperties', schemaPath, instancePath, { limit: schema.minProperties });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildMultipleOf(_stack, _context, schema, value) {\n    return E.MultipleOf(value, E.Constant(schema.multipleOf));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckMultipleOf(_stack, _context, schema, value) {\n    return G.IsMultipleOf(value, schema.multipleOf);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorMultipleOf(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckMultipleOf(stack, context, schema, value) ||\n        context.AddError('multipleOf', schemaPath, instancePath, { multipleOf: schema.multipleOf });\n}\n","// deno-fmt-ignore-file\nimport { Reducer } from './_reducer.mjs';\nimport { CheckContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema } from './schema.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildNotStandard(stack, context, schema, value) {\n    return Reducer(stack, context, [schema.not], value, E.Not(E.IsEqual(E.Member('results', 'length'), E.Constant(1))));\n}\nfunction BuildNotFast(stack, context, schema, value) {\n    return E.Not(BuildSchema(stack, context, schema.not, value));\n}\nexport function BuildNot(stack, context, schema, value) {\n    return context.UseUnevaluated()\n        ? BuildNotStandard(stack, context, schema, value)\n        : BuildNotFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckNot(stack, context, schema, value) {\n    const nextContext = new CheckContext();\n    const isSchema = !CheckSchema(stack, nextContext, schema.not, value);\n    const isNot = isSchema && context.Merge([nextContext]);\n    return isNot;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorNot(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckNot(stack, context, schema, value) ||\n        context.AddError('not', schemaPath, instancePath, {});\n}\n","// deno-fmt-ignore-file\nimport { Reducer } from './_reducer.mjs';\nimport * as Unique from './_unique.mjs';\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nfunction BuildOneOfStandard(stack, context, schema, value) {\n    return Reducer(stack, context, schema.oneOf, value, E.IsEqual(E.Member('results', 'length'), E.Constant(1)));\n}\nfunction BuildOneOfFast(stack, context, schema, value) {\n    const [result] = [Unique.CreateUnique()];\n    const results = E.ArrayLiteral(schema.oneOf.map((schema) => BuildSchema(stack, context, schema, value)));\n    const count = E.Counted(results, [result, '_'], E.IsEqual(result, E.Constant(true)));\n    return E.IsEqual(count, E.Constant(1));\n}\nexport function BuildOneOf(stack, context, schema, value) {\n    return context.UseUnevaluated()\n        ? BuildOneOfStandard(stack, context, schema, value)\n        : BuildOneOfFast(stack, context, schema, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckOneOf(stack, context, schema, value) {\n    const passedContexts = schema.oneOf.reduce((result, schema) => {\n        const nextContext = new CheckContext();\n        return CheckSchema(stack, nextContext, schema, value) ? [...result, nextContext] : result;\n    }, []);\n    return G.IsEqual(passedContexts.length, 1) && context.Merge(passedContexts);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorOneOf(stack, context, schemaPath, instancePath, schema, value) {\n    const failedContexts = [];\n    const passingSchemas = [];\n    const passedContexts = schema.oneOf.reduce((result, schema, index) => {\n        const nextContext = new ErrorContext();\n        const nextSchemaPath = `${schemaPath}/oneOf/${index}`;\n        const isSchema = ErrorSchema(stack, nextContext, nextSchemaPath, instancePath, schema, value);\n        if (isSchema)\n            passingSchemas.push(index);\n        if (!isSchema)\n            failedContexts.push(nextContext);\n        return isSchema ? [...result, nextContext] : result;\n    }, []);\n    const isOneOf = G.IsEqual(passedContexts.length, 1) && context.Merge(passedContexts);\n    if (!isOneOf && G.IsEqual(passingSchemas.length, 0))\n        failedContexts.forEach(failed => context.AddErrors(failed.GetErrors()));\n    return isOneOf || context.AddError('oneOf', schemaPath, instancePath, { passingSchemas });\n}\n","// deno-fmt-ignore-file\nimport * as Externals from './_externals.mjs';\nimport { UnicodeRegExp } from './_regexp.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPattern(_stack, _context, schema, value) {\n    const regexp = Externals.CreateVariable(G.IsString(schema.pattern) ? UnicodeRegExp(schema.pattern) : schema.pattern);\n    return E.Call(E.Member(regexp, 'test'), [value]);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPattern(_stack, _context, schema, value) {\n    const regexp = G.IsString(schema.pattern) ? UnicodeRegExp(schema.pattern) : schema.pattern;\n    return regexp.test(value);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPattern(stack, context, schemaPath, instancePath, schema, value) {\n    return CheckPattern(stack, context, schema, value) ||\n        context.AddError('pattern', schemaPath, instancePath, { pattern: schema.pattern });\n}\n","// deno-fmt-ignore-file\nimport * as Unique from './_unique.mjs';\nimport * as Externals from './_externals.mjs';\nimport * as Pathing from './_pathing.mjs';\nimport { UnicodeRegExp } from './_regexp.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPatternProperties(stack, context, schema, value) {\n    return E.ReduceAnd(G.Entries(schema.patternProperties).map(([pattern, schema]) => {\n        const [key, prop] = [Unique.CreateUnique(), Unique.CreateUnique()];\n        const regexp = Externals.CreateVariable(UnicodeRegExp(pattern));\n        const notKey = E.Not(E.Call(E.Member(regexp, 'test'), [key]));\n        const isSchema = BuildSchemaPushStack(stack, context, schema, prop);\n        const addKey = context.AddKey(key);\n        const guarded = context.UseUnevaluated() ? E.Or(notKey, E.And(isSchema, addKey)) : E.Or(notKey, isSchema);\n        return E.Every(E.Entries(value), E.Constant(0), [`[${key}, ${prop}]`, '_'], guarded);\n    }));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPatternProperties(stack, context, schema, value) {\n    return G.Every(G.Entries(schema.patternProperties), 0, ([pattern, schema]) => {\n        const regexp = UnicodeRegExp(pattern);\n        return G.Every(G.Entries(value), 0, ([key, prop]) => {\n            return !regexp.test(key) || CheckSchemaPushStack(stack, context, schema, prop) && context.AddKey(key);\n        });\n    });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPatternProperties(stack, context, schemaPath, instancePath, schema, value) {\n    return G.EveryAll(G.Entries(schema.patternProperties), 0, ([pattern, schema]) => {\n        const nextSchemaPath = `${schemaPath}/patternProperties/${Pathing.EncodeFragment(pattern)}`;\n        const regexp = UnicodeRegExp(pattern);\n        return G.EveryAll(G.Entries(value), 0, ([key, value]) => {\n            const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n            const notKey = !regexp.test(key);\n            return notKey || ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value) && context.AddKey(key);\n        });\n    });\n}\n","// deno-fmt-ignore-file\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPrefixItems(stack, context, schema, value) {\n    return E.ReduceAnd(schema.prefixItems.map((schema, index) => {\n        const isLength = E.IsLessEqualThan(E.Member(value, 'length'), E.Constant(index));\n        const isSchema = BuildSchemaPushStack(stack, context, schema, `${value}[${index}]`);\n        const addIndex = context.AddIndex(E.Constant(index));\n        const guarded = context.UseUnevaluated() ? E.And(isSchema, addIndex) : isSchema;\n        return E.Or(isLength, guarded);\n    }));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPrefixItems(stack, context, schema, value) {\n    return G.IsEqual(value.length, 0) || G.Every(schema.prefixItems, 0, (schema, index) => {\n        return G.IsLessEqualThan(value.length, index)\n            || (CheckSchemaPushStack(stack, context, schema, value[index]) && context.AddIndex(index));\n    });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPrefixItems(stack, context, schemaPath, instancePath, schema, value) {\n    return G.IsEqual(value.length, 0) || G.EveryAll(schema.prefixItems, 0, (schema, index) => {\n        const nextSchemaPath = `${schemaPath}/prefixItems/${index}`;\n        const nextInstancePath = `${instancePath}/${index}`;\n        return G.IsLessEqualThan(value.length, index)\n            || (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value[index]) && context.AddIndex(index));\n    });\n}\n","import { Settings } from '../../system/settings/index.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// IsExactOptional\n// ------------------------------------------------------------------\nexport function IsExactOptional(required, key) {\n    return required.includes(key) || Settings.Get().exactOptionalPropertyTypes;\n}\n// ------------------------------------------------------------------\n// ExactOptionalBuild\n// ------------------------------------------------------------------\nexport function InexactOptionalBuild(value, key) {\n    return E.IsUndefined(E.Member(value, key));\n}\n// ------------------------------------------------------------------\n// ExactOptionalCheck\n// ------------------------------------------------------------------\nexport function InexactOptionalCheck(value, key) {\n    return G.IsUndefined(value[key]);\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Pathing from './_pathing.mjs';\nimport { BuildSchemaPushStack, CheckSchemaPushStack, ErrorSchemaPushStack } from './schema.mjs';\nimport { InexactOptionalCheck, InexactOptionalBuild, IsExactOptional } from './_exact_optional.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildProperties(stack, context, schema, value) {\n    const required = Schema.IsRequired(schema) ? schema.required : [];\n    const everyKey = G.Entries(schema.properties).map(([key, schema]) => {\n        const notKey = E.Not(E.HasPropertyKey(value, E.Constant(key)));\n        const isSchema = BuildSchemaPushStack(stack, context, schema, E.Member(value, key));\n        const addKey = context.AddKey(E.Constant(key));\n        const guarded = context.UseUnevaluated() ? E.And(isSchema, addKey) : isSchema;\n        // --------------------------------------------------------------\n        // Optimization\n        //\n        // If a key is required, we can skip the `notKey` check since this\n        // condition is already enforced by Required. This optimization is\n        // only valid when Required is evaluated before Properties.\n        //\n        // --------------------------------------------------------------\n        const isProperty = required.includes(key) ? guarded : E.Or(notKey, guarded);\n        // --------------------------------------------------------------\n        // ExactOptionalProperties\n        //\n        // By default, TypeScript allows optional properties to be assigned\n        // undefined. This is a bit misleading, since 'optional' is usually\n        // understood to mean 'the key may be absent', not 'the key may be\n        // present with an undefined value'.\n        //\n        // The 'IsExactOptional' check returns false by default, matching\n        // TypeScript's behavior. When exactOptionalPropertyTypes is enabled\n        // in tsconfig.json, TypeBox can be configured to use the stricter \n        // semantics via System settings:\n        //\n        //   Settings.Set({ exactOptionalPropertyTypes: true })\n        //\n        // --------------------------------------------------------------\n        return IsExactOptional(required, key)\n            ? isProperty\n            : E.Or(InexactOptionalBuild(value, key), isProperty);\n    });\n    return E.ReduceAnd(everyKey);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckProperties(stack, context, schema, value) {\n    const required = Schema.IsRequired(schema) ? schema.required : [];\n    const isProperties = G.Every(G.Entries(schema.properties), 0, ([key, schema]) => {\n        const isProperty = !G.HasPropertyKey(value, key) || (CheckSchemaPushStack(stack, context, schema, value[key]) && context.AddKey(key));\n        return IsExactOptional(required, key)\n            ? isProperty\n            : InexactOptionalCheck(value, key) || isProperty;\n    });\n    return isProperties;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorProperties(stack, context, schemaPath, instancePath, schema, value) {\n    const required = Schema.IsRequired(schema) ? schema.required : [];\n    const isProperties = G.EveryAll(G.Entries(schema.properties), 0, ([key, schema]) => {\n        const nextSchemaPath = `${schemaPath}/properties/${Pathing.EncodeFragment(key)}`;\n        const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n        // Defer error generation for IsExactOptional\n        const isProperty = () => (!G.HasPropertyKey(value, key) || (ErrorSchemaPushStack(stack, context, nextSchemaPath, nextInstancePath, schema, value[key]) && context.AddKey(key)));\n        return IsExactOptional(required, key)\n            ? isProperty()\n            : InexactOptionalCheck(value, key) || isProperty();\n    });\n    return isProperties;\n}\n","// deno-fmt-ignore-file\nimport * as Pathing from './_pathing.mjs';\nimport * as Unique from './_unique.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildPropertyNames(stack, context, schema, value) {\n    const [key, _index] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    return E.Every(E.Keys(value), E.Constant(0), [key, _index], BuildSchema(stack, context, schema.propertyNames, key));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckPropertyNames(stack, context, schema, value) {\n    return G.Every(G.Keys(value), 0, (key, _index) => CheckSchema(stack, context, schema.propertyNames, key));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorPropertyNames(stack, context, schemaPath, instancePath, schema, value) {\n    const propertyNames = [];\n    const isPropertyNames = G.EveryAll(G.Keys(value), 0, (key, _index) => {\n        const nextInstancePath = `${instancePath}/${Pathing.EncodeFragment(key)}`;\n        const nextSchemaPath = `${schemaPath}/propertyNames`;\n        const isPropertyName = ErrorSchema(stack, context, nextSchemaPath, nextInstancePath, schema.propertyNames, key);\n        if (!isPropertyName)\n            propertyNames.push(key);\n        return isPropertyName;\n    });\n    return isPropertyNames ||\n        context.AddError('propertyNames', schemaPath, instancePath, { propertyNames });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport * as Functions from './_functions.mjs';\nimport { Resolve } from '../resolve/index.mjs';\nimport { CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildRecursiveRef(stack, context, schema, value) {\n    const target = Resolve.RecursiveRef(stack, schema) ?? false;\n    const nextStack = target ? { ...stack, pendingResource: true } : stack;\n    return Functions.CreateFunction(nextStack, context, target, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRecursiveRef(stack, context, schema, value) {\n    const target = Resolve.RecursiveRef(stack, schema) ?? false;\n    const nextStack = target ? { ...stack, pendingResource: true } : stack;\n    return (Schema.IsSchema(target) && CheckSchema(nextStack, context, target, value));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRecursiveRef(stack, context, schemaPath, instancePath, schema, value) {\n    const target = Resolve.RecursiveRef(stack, schema) ?? false;\n    const nextStack = target ? { ...stack, pendingResource: true } : stack;\n    return (Schema.IsSchema(target) && ErrorSchema(nextStack, context, schemaPath, instancePath, target, value));\n}\n","// deno-fmt-ignore-file\nimport * as Functions from './_functions.mjs';\nimport * as Schema from '../types/index.mjs';\nimport { Resolve } from '../resolve/index.mjs';\nimport { CheckContext, ErrorContext } from './_context.mjs';\nimport { EmitGuard as E } from '../../guard/index.mjs';\nimport { CheckSchema, ErrorSchema } from './schema.mjs';\n// ------------------------------------------------------------------\n// BuildRef\n// ------------------------------------------------------------------\nfunction BuildRefStandard(stack, context, target, value) {\n    const interior = E.ArrowFunction(['context', 'value'], Functions.CreateFunction(stack, context, target, 'value'));\n    const exterior = E.ArrowFunction(['context', 'value'], E.Statements([\n        E.ConstDeclaration('nextContext', E.New('CheckContext', [])),\n        E.ConstDeclaration('result', E.Call(interior, ['nextContext', 'value'])),\n        E.If('result', context.Merge('[nextContext]')),\n        E.Return('result')\n    ]));\n    return E.Call(exterior, ['context', value]);\n}\nfunction BuildRefFast(stack, context, target, value) {\n    return Functions.CreateFunction(stack, context, target, value);\n}\nexport function BuildRef(stack, context, schema, value) {\n    const result = Resolve.Ref(stack, schema);\n    const target = result.schema ?? false;\n    return context.UseUnevaluated()\n        ? BuildRefStandard(result.stack, context, target, value)\n        : BuildRefFast(result.stack, context, target, value);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRef(stack, context, schema, value) {\n    const result = Resolve.Ref(stack, schema);\n    const target = result.schema ?? false;\n    const nextContext = new CheckContext();\n    const valid = (Schema.IsSchema(target) && CheckSchema(result.stack, nextContext, target, value));\n    if (valid)\n        context.Merge([nextContext]);\n    return valid;\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRef(stack, context, schemaPath, instancePath, schema, value) {\n    const result = Resolve.Ref(stack, schema);\n    const target = result.schema ?? false;\n    const nextContext = new ErrorContext();\n    const valid = (Schema.IsSchema(target) && ErrorSchema(result.stack, nextContext, schemaPath, instancePath, target, value));\n    if (valid)\n        context.Merge([nextContext]);\n    if (!valid)\n        context.AddErrors(nextContext.GetErrors());\n    return valid;\n}\n","// deno-fmt-ignore-file\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildRequired(_stack, _context, schema, value) {\n    return E.ReduceAnd(schema.required.map((key) => E.HasPropertyKey(value, E.Constant(key))));\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckRequired(_stack, _context, schema, value) {\n    return G.Every(schema.required, 0, (key) => G.HasPropertyKey(value, key));\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorRequired(_stack, context, schemaPath, instancePath, schema, value) {\n    const requiredProperties = [];\n    const isRequired = G.EveryAll(schema.required, 0, (key) => {\n        const hasKey = G.HasPropertyKey(value, key);\n        if (!hasKey)\n            requiredProperties.push(key);\n        return hasKey;\n    });\n    return isRequired ||\n        context.AddError('required', schemaPath, instancePath, { requiredProperties });\n}\n","// deno-fmt-ignore-file\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// TypeName\n// ------------------------------------------------------------------\nfunction BuildTypeName(_stack, _context, type, value) {\n    return (\n    // jsonschema\n    G.IsEqual(type, 'object') ? E.IsObjectNotArray(value) :\n        G.IsEqual(type, 'array') ? E.IsArray(value) :\n            G.IsEqual(type, 'boolean') ? E.IsBoolean(value) :\n                G.IsEqual(type, 'integer') ? E.IsInteger(value) :\n                    G.IsEqual(type, 'number') ? E.IsNumber(value) :\n                        G.IsEqual(type, 'null') ? E.IsNull(value) :\n                            G.IsEqual(type, 'string') ? E.IsString(value) :\n                                // xschema\n                                G.IsEqual(type, 'bigint') ? E.IsBigInt(value) :\n                                    G.IsEqual(type, 'constructor') ? E.IsConstructor(value) :\n                                        G.IsEqual(type, 'function') ? E.IsFunction(value) :\n                                            G.IsEqual(type, 'symbol') ? E.IsSymbol(value) :\n                                                G.IsEqual(type, 'undefined') ? E.IsUndefined(value) :\n                                                    G.IsEqual(type, 'void') ? E.IsUndefined(value) :\n                                                        E.Constant(true));\n}\nfunction CheckTypeName(_stack, _context, type, _schema, value) {\n    return (\n    // jsonschema\n    G.IsEqual(type, 'object') ? G.IsObjectNotArray(value) :\n        G.IsEqual(type, 'array') ? G.IsArray(value) :\n            G.IsEqual(type, 'boolean') ? G.IsBoolean(value) :\n                G.IsEqual(type, 'integer') ? G.IsInteger(value) :\n                    G.IsEqual(type, 'number') ? G.IsNumber(value) :\n                        G.IsEqual(type, 'null') ? G.IsNull(value) :\n                            G.IsEqual(type, 'string') ? G.IsString(value) :\n                                // xschema\n                                G.IsEqual(type, 'bigint') ? G.IsBigInt(value) :\n                                    G.IsEqual(type, 'constructor') ? G.IsConstructor(value) :\n                                        G.IsEqual(type, 'function') ? G.IsFunction(value) :\n                                            G.IsEqual(type, 'symbol') ? G.IsSymbol(value) :\n                                                G.IsEqual(type, 'undefined') ? G.IsUndefined(value) :\n                                                    G.IsEqual(type, 'void') ? G.IsUndefined(value) :\n                                                        true);\n}\n// ------------------------------------------------------------------\n// TypeNames\n// ------------------------------------------------------------------\nfunction BuildTypeNames(stack, context, typenames, value) {\n    return E.ReduceOr(typenames.map(type => BuildTypeName(stack, context, type, value)));\n}\nfunction CheckTypeNames(stack, context, types, schema, value) {\n    return G.Some(types, type => CheckTypeName(stack, context, type, schema, value));\n}\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\nexport function BuildType(stack, context, schema, value) {\n    return G.IsArray(schema.type) ? BuildTypeNames(stack, context, schema.type, value) : BuildTypeName(stack, context, schema.type, value);\n}\nexport function CheckType(stack, context, schema, value) {\n    return G.IsArray(schema.type) ? CheckTypeNames(stack, context, schema.type, schema, value) : CheckTypeName(stack, context, schema.type, schema, value);\n}\nexport function ErrorType(stack, context, schemaPath, instancePath, schema, value) {\n    const isType = G.IsArray(schema.type) ? CheckTypeNames(stack, context, schema.type, schema, value) : CheckTypeName(stack, context, schema.type, schema, value);\n    return isType ||\n        context.AddError('type', schemaPath, instancePath, { type: schema.type });\n}\n","// deno-fmt-ignore-file\nimport * as Unique from './_unique.mjs';\nimport { ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildUnevaluatedItems(stack, context, schema, value) {\n    const [index, item] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    const indices = E.Call(E.Member('context', 'GetIndices'), []);\n    const hasIndex = E.Call(E.Member('indices', 'has'), [index]);\n    const isSchema = BuildSchema(stack, context, schema.unevaluatedItems, item);\n    const addIndex = E.Call(E.Member('context', 'AddIndex'), [index]);\n    const isEvery = E.Every(value, E.Constant(0), [item, index], E.And(E.Or(hasIndex, isSchema), addIndex));\n    return E.Call(E.ArrowFunction(['context'], E.Statements([\n        E.ConstDeclaration('indices', indices),\n        E.Return(isEvery)\n    ])), ['context']);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckUnevaluatedItems(stack, context, schema, value) {\n    const indices = context.GetIndices();\n    return G.Every(value, 0, (item, index) => {\n        return (indices.has(index) || CheckSchema(stack, context, schema.unevaluatedItems, item))\n            && context.AddIndex(index);\n    });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorUnevaluatedItems(stack, context, schemaPath, instancePath, schema, value) {\n    const indices = context.GetIndices();\n    const unevaluatedItems = [];\n    const isUnevaluatedItems = G.EveryAll(value, 0, (item, index) => {\n        const nextContext = new ErrorContext();\n        const isEvaluatedItem = (indices.has(index) || ErrorSchema(stack, nextContext, schemaPath, instancePath, schema.unevaluatedItems, item))\n            && context.AddIndex(index);\n        if (!isEvaluatedItem)\n            unevaluatedItems.push(index);\n        return isEvaluatedItem;\n    });\n    return isUnevaluatedItems ||\n        context.AddError('unevaluatedItems', schemaPath, instancePath, { unevaluatedItems });\n}\n","// deno-fmt-ignore-file\nimport * as Unique from './_unique.mjs';\nimport { ErrorContext } from './_context.mjs';\nimport { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';\nimport { Guard as G, EmitGuard as E } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildUnevaluatedProperties(stack, context, schema, value) {\n    const [key, prop] = [Unique.CreateUnique(), Unique.CreateUnique()];\n    const keys = E.Call(E.Member('context', 'GetKeys'), []);\n    const hasKey = E.Call(E.Member('keys', 'has'), [key]);\n    const addKey = E.Call(E.Member('context', 'AddKey'), [key]);\n    const isSchema = BuildSchema(stack, context, schema.unevaluatedProperties, prop);\n    const isEvery = E.Every(E.Entries(value), E.Constant(0), [`[${key}, ${prop}]`, '_'], E.Or(hasKey, E.And(isSchema, addKey)));\n    return E.Call(E.ArrowFunction(['context'], E.Statements([\n        E.ConstDeclaration('keys', keys),\n        E.Return(isEvery)\n    ])), ['context']);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckUnevaluatedProperties(stack, context, schema, value) {\n    const keys = context.GetKeys();\n    return G.Every(G.Entries(value), 0, ([key, prop]) => {\n        return keys.has(key)\n            || (CheckSchema(stack, context, schema.unevaluatedProperties, prop) && context.AddKey(key));\n    });\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorUnevaluatedProperties(stack, context, schemaPath, instancePath, schema, value) {\n    const keys = context.GetKeys();\n    const unevaluatedProperties = [];\n    const isUnevaluatedProperties = G.EveryAll(G.Entries(value), 0, ([key, prop]) => {\n        const nextContext = new ErrorContext();\n        const isEvaluatedProperty = keys.has(key)\n            || (ErrorSchema(stack, nextContext, schemaPath, instancePath, schema.unevaluatedProperties, prop) && context.AddKey(key));\n        if (!isEvaluatedProperty)\n            unevaluatedProperties.push(key);\n        return isEvaluatedProperty;\n    });\n    return isUnevaluatedProperties ||\n        context.AddError('unevaluatedProperties', schemaPath, instancePath, { unevaluatedProperties });\n}\n","// deno-fmt-ignore-file\nimport { Hashing } from '../../system/hashing/index.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Valid\n// ------------------------------------------------------------------\nfunction IsValid(schema) {\n    return !G.IsEqual(schema.uniqueItems, false);\n}\n// ------------------------------------------------------------------\n// Build\n// ------------------------------------------------------------------\nexport function BuildUniqueItems(_stack, _context, schema, value) {\n    if (!IsValid(schema))\n        return E.Constant(true);\n    const set = E.Member(E.New('Set', [E.Call(E.Member(value, 'map'), [E.Member('Hashing', 'Hash')])]), 'size');\n    const isLength = E.Member(value, 'length');\n    return E.IsEqual(set, isLength);\n}\n// ------------------------------------------------------------------\n// Check\n// ------------------------------------------------------------------\nexport function CheckUniqueItems(_stack, _context, schema, value) {\n    if (!IsValid(schema))\n        return true;\n    const set = new Set(value.map(Hashing.Hash)).size;\n    const isLength = value.length;\n    return G.IsEqual(set, isLength);\n}\n// ------------------------------------------------------------------\n// Error\n// ------------------------------------------------------------------\nexport function ErrorUniqueItems(_stack, context, schemaPath, instancePath, schema, value) {\n    if (!IsValid(schema))\n        return true;\n    const set = new Set();\n    const duplicateItems = value.reduce((result, value, index) => {\n        const hash = Hashing.Hash(value);\n        if (set.has(hash))\n            return [...result, index];\n        set.add(hash);\n        return result;\n    }, []);\n    const isUniqueItems = G.IsEqual(duplicateItems.length, 0);\n    return isUniqueItems ||\n        context.AddError('uniqueItems', schemaPath, instancePath, { duplicateItems });\n}\n","// deno-fmt-ignore-file\nimport * as Schema from '../types/index.mjs';\nimport { BuildRefine, CheckRefine, ErrorRefine } from './_refine.mjs';\nimport * as Stack from './_stack.mjs';\nimport { EmitGuard as E, Guard as G } from '../../guard/index.mjs';\nimport { BuildAdditionalItems, CheckAdditionalItems, ErrorAdditionalItems } from './additionalItems.mjs';\nimport { BuildAdditionalProperties, CheckAdditionalProperties, ErrorAdditionalProperties } from './additionalProperties.mjs';\nimport { BuildAllOf, CheckAllOf, ErrorAllOf } from './allOf.mjs';\nimport { BuildAnyOf, CheckAnyOf, ErrorAnyOf } from './anyOf.mjs';\nimport { BuildSchemaBoolean, CheckSchemaBoolean, ErrorSchemaBoolean } from './boolean.mjs';\nimport { BuildConst, CheckConst, ErrorConst } from './const.mjs';\nimport { BuildContains, CheckContains, ErrorContains } from './contains.mjs';\nimport { BuildDependencies, CheckDependencies, ErrorDependencies } from './dependencies.mjs';\nimport { BuildDependentRequired, CheckDependentRequired, ErrorDependentRequired } from './dependentRequired.mjs';\nimport { BuildDependentSchemas, CheckDependentSchemas, ErrorDependentSchemas } from './dependentSchemas.mjs';\nimport { BuildDynamicRef, CheckDynamicRef, ErrorDynamicRef } from './dynamicRef.mjs';\nimport { BuildEnum, CheckEnum, ErrorEnum } from './enum.mjs';\nimport { BuildExclusiveMaximum, CheckExclusiveMaximum, ErrorExclusiveMaximum } from './exclusiveMaximum.mjs';\nimport { BuildExclusiveMinimum, CheckExclusiveMinimum, ErrorExclusiveMinimum } from './exclusiveMinimum.mjs';\nimport { BuildFormat, CheckFormat, ErrorFormat } from './format.mjs';\nimport { BuildIf, CheckIf, ErrorIf } from './if.mjs';\nimport { BuildItems, CheckItems, ErrorItems } from './items.mjs';\nimport { BuildMaxContains, CheckMaxContains, ErrorMaxContains } from './maxContains.mjs';\nimport { BuildMaximum, CheckMaximum, ErrorMaximum } from './maximum.mjs';\nimport { BuildMaxItems, CheckMaxItems, ErrorMaxItems } from './maxItems.mjs';\nimport { BuildMaxLength, CheckMaxLength, ErrorMaxLength } from './maxLength.mjs';\nimport { BuildMaxProperties, CheckMaxProperties, ErrorMaxProperties } from './maxProperties.mjs';\nimport { BuildMinContains, CheckMinContains, ErrorMinContains } from './minContains.mjs';\nimport { BuildMinimum, CheckMinimum, ErrorMinimum } from './minimum.mjs';\nimport { BuildMinItems, CheckMinItems, ErrorMinItems } from './minItems.mjs';\nimport { BuildMinLength, CheckMinLength, ErrorMinLength } from './minLength.mjs';\nimport { BuildMinProperties, CheckMinProperties, ErrorMinProperties } from './minProperties.mjs';\nimport { BuildMultipleOf, CheckMultipleOf, ErrorMultipleOf } from './multipleOf.mjs';\nimport { BuildNot, CheckNot, ErrorNot } from './not.mjs';\nimport { BuildOneOf, CheckOneOf, ErrorOneOf } from './oneOf.mjs';\nimport { BuildPattern, CheckPattern, ErrorPattern } from './pattern.mjs';\nimport { BuildPatternProperties, CheckPatternProperties, ErrorPatternProperties } from './patternProperties.mjs';\nimport { BuildPrefixItems, CheckPrefixItems, ErrorPrefixItems } from './prefixItems.mjs';\nimport { BuildProperties, CheckProperties, ErrorProperties } from './properties.mjs';\nimport { BuildPropertyNames, CheckPropertyNames, ErrorPropertyNames } from './propertyNames.mjs';\nimport { BuildRecursiveRef, CheckRecursiveRef, ErrorRecursiveRef } from './recursiveRef.mjs';\nimport { BuildRef, CheckRef, ErrorRef } from './ref.mjs';\nimport { BuildRequired, CheckRequired, ErrorRequired } from './required.mjs';\nimport { BuildType, CheckType, ErrorType } from './type.mjs';\nimport { BuildUnevaluatedItems, CheckUnevaluatedItems, ErrorUnevaluatedItems } from './unevaluatedItems.mjs';\nimport { BuildUnevaluatedProperties, CheckUnevaluatedProperties, ErrorUnevaluatedProperties } from './unevaluatedProperties.mjs';\nimport { BuildUniqueItems, CheckUniqueItems, ErrorUniqueItems } from './uniqueItems.mjs';\n// ----------------------------------------------------------------\n// HasTypeName (Optimization)\n//\n// We only consider a schema as having a type name when the schema \n// has a single type string, or when every element in the type \n// array is the same. For a type array, we must treat multi-variant \n// types as unions and therefore can NOT use an optimized forward \n// type check.\n//\n// ----------------------------------------------------------------\nfunction HasTypeName(schema, typename) {\n    return (Schema.IsType(schema) &&\n        ((G.IsArray(schema.type) &&\n            G.IsGreaterThan(schema.type.length, 0) &&\n            G.Every(schema.type, 0, type => G.IsEqual(type, typename))) ||\n            G.IsEqual(schema.type, typename)));\n}\n// ----------------------------------------------------------------\n// HasObject\n// ----------------------------------------------------------------\nfunction HasObjectType(schema) {\n    return HasTypeName(schema, 'object');\n}\nfunction HasObjectKeywords(schema) {\n    return Schema.IsSchemaObject(schema) && (Schema.IsAdditionalProperties(schema) ||\n        Schema.IsDependencies(schema) ||\n        Schema.IsDependentRequired(schema) ||\n        Schema.IsDependentSchemas(schema) ||\n        Schema.IsProperties(schema) ||\n        Schema.IsPatternProperties(schema) ||\n        Schema.IsPropertyNames(schema) ||\n        Schema.IsMinProperties(schema) ||\n        Schema.IsMaxProperties(schema) ||\n        Schema.IsRequired(schema) ||\n        Schema.IsUnevaluatedProperties(schema));\n}\n// ----------------------------------------------------------------\n// HasArray\n// ----------------------------------------------------------------\nfunction HasArrayType(schema) {\n    return HasTypeName(schema, 'array');\n}\nfunction HasArrayKeywords(schema) {\n    return Schema.IsSchemaObject(schema) && (Schema.IsAdditionalItems(schema) ||\n        Schema.IsItems(schema) ||\n        Schema.IsContains(schema) ||\n        Schema.IsMaxContains(schema) ||\n        Schema.IsMaxItems(schema) ||\n        Schema.IsMinContains(schema) ||\n        Schema.IsMinItems(schema) ||\n        Schema.IsPrefixItems(schema) ||\n        Schema.IsUnevaluatedItems(schema) ||\n        Schema.IsUniqueItems(schema));\n}\n// ----------------------------------------------------------------\n// HasString\n// ----------------------------------------------------------------\nfunction HasStringType(schema) {\n    return HasTypeName(schema, 'string');\n}\nfunction HasStringKeywords(schema) {\n    return Schema.IsSchemaObject(schema) && (Schema.IsMinLength(schema) ||\n        Schema.IsMaxLength(schema) ||\n        Schema.IsFormat(schema) ||\n        Schema.IsPattern(schema));\n}\n// ----------------------------------------------------------------\n// HasNumber\n// ----------------------------------------------------------------\nfunction HasNumberType(schema) {\n    return HasTypeName(schema, 'number') || HasTypeName(schema, 'bigint');\n}\nfunction HasNumberKeywords(schema) {\n    return Schema.IsSchemaObject(schema) && (Schema.IsMinimum(schema) ||\n        Schema.IsMaximum(schema) ||\n        Schema.IsExclusiveMaximum(schema) ||\n        Schema.IsExclusiveMinimum(schema) ||\n        Schema.IsMultipleOf(schema));\n}\n// ----------------------------------------------------------------\n// Build\n// ----------------------------------------------------------------\nexport function BuildSchemaPushStack(stack, context, schema, value) {\n    return context.UseUnevaluated()\n        ? E.And(E.And(context.Push(), BuildSchema(stack, context, schema, value)), context.Pop())\n        : BuildSchema(stack, context, schema, value);\n}\nexport function BuildSchema(stack, context, schema, value) {\n    const current = Stack.NextStack(stack, schema);\n    const conditions = [];\n    if (Schema.IsSchemaBoolean(schema))\n        return BuildSchemaBoolean(current, context, schema, value);\n    if (Schema.IsType(schema))\n        conditions.push(BuildType(current, context, schema, value));\n    if (HasObjectKeywords(schema)) {\n        const constraints = [];\n        if (Schema.IsRequired(schema))\n            constraints.push(BuildRequired(current, context, schema, value));\n        if (Schema.IsAdditionalProperties(schema))\n            constraints.push(BuildAdditionalProperties(current, context, schema, value));\n        if (Schema.IsDependencies(schema))\n            constraints.push(BuildDependencies(current, context, schema, value));\n        if (Schema.IsDependentRequired(schema))\n            constraints.push(BuildDependentRequired(current, context, schema, value));\n        if (Schema.IsDependentSchemas(schema))\n            constraints.push(BuildDependentSchemas(current, context, schema, value));\n        if (Schema.IsPatternProperties(schema))\n            constraints.push(BuildPatternProperties(current, context, schema, value));\n        if (Schema.IsProperties(schema))\n            constraints.push(BuildProperties(current, context, schema, value));\n        if (Schema.IsPropertyNames(schema))\n            constraints.push(BuildPropertyNames(current, context, schema, value));\n        if (Schema.IsMinProperties(schema))\n            constraints.push(BuildMinProperties(current, context, schema, value));\n        if (Schema.IsMaxProperties(schema))\n            constraints.push(BuildMaxProperties(current, context, schema, value));\n        const reduced = E.ReduceAnd(constraints);\n        const guarded = E.Or(E.Not(E.IsObjectNotArray(value)), reduced);\n        conditions.push(HasObjectType(schema) ? reduced : guarded);\n    }\n    if (HasArrayKeywords(schema)) {\n        const constraints = [];\n        if (Schema.IsAdditionalItems(schema))\n            constraints.push(BuildAdditionalItems(current, context, schema, value));\n        if (Schema.IsContains(schema))\n            constraints.push(BuildContains(current, context, schema, value));\n        if (Schema.IsItems(schema))\n            constraints.push(BuildItems(current, context, schema, value));\n        if (Schema.IsMinContains(schema))\n            constraints.push(BuildMinContains(current, context, schema, value));\n        if (Schema.IsMaxContains(schema))\n            constraints.push(BuildMaxContains(current, context, schema, value));\n        if (Schema.IsMinItems(schema))\n            constraints.push(BuildMinItems(current, context, schema, value));\n        if (Schema.IsMaxItems(schema))\n            constraints.push(BuildMaxItems(current, context, schema, value));\n        if (Schema.IsPrefixItems(schema))\n            constraints.push(BuildPrefixItems(current, context, schema, value));\n        if (Schema.IsUniqueItems(schema))\n            constraints.push(BuildUniqueItems(current, context, schema, value));\n        const reduced = E.ReduceAnd(constraints);\n        const guarded = E.Or(E.Not(E.IsArray(value)), reduced);\n        conditions.push(HasArrayType(schema) ? reduced : guarded);\n    }\n    if (HasStringKeywords(schema)) {\n        const constraints = [];\n        if (Schema.IsMinLength(schema))\n            constraints.push(BuildMinLength(current, context, schema, value));\n        if (Schema.IsMaxLength(schema))\n            constraints.push(BuildMaxLength(current, context, schema, value));\n        if (Schema.IsFormat(schema))\n            constraints.push(BuildFormat(current, context, schema, value));\n        if (Schema.IsPattern(schema))\n            constraints.push(BuildPattern(current, context, schema, value));\n        const reduced = E.ReduceAnd(constraints);\n        const guarded = E.Or(E.Not(E.IsString(value)), reduced);\n        conditions.push(HasStringType(schema) ? reduced : guarded);\n    }\n    if (HasNumberKeywords(schema)) {\n        const constraints = [];\n        if (Schema.IsExclusiveMinimum(schema))\n            constraints.push(BuildExclusiveMinimum(current, context, schema, value));\n        if (Schema.IsExclusiveMaximum(schema))\n            constraints.push(BuildExclusiveMaximum(current, context, schema, value));\n        if (Schema.IsMinimum(schema))\n            constraints.push(BuildMinimum(current, context, schema, value));\n        if (Schema.IsMaximum(schema))\n            constraints.push(BuildMaximum(current, context, schema, value));\n        if (Schema.IsMultipleOf(schema))\n            constraints.push(BuildMultipleOf(current, context, schema, value));\n        const reduced = E.ReduceAnd(constraints);\n        const guarded = E.Or(E.Not(E.Or(E.IsNumber(value), E.IsBigInt(value))), reduced);\n        conditions.push(HasNumberType(schema) ? reduced : guarded);\n    }\n    if (Schema.IsRef(schema))\n        conditions.push(BuildRef(current, context, schema, value));\n    if (Schema.IsRecursiveRef(schema))\n        conditions.push(BuildRecursiveRef(current, context, schema, value));\n    if (Schema.IsDynamicRef(schema))\n        conditions.push(BuildDynamicRef(current, context, schema, value));\n    if (Schema.IsConst(schema))\n        conditions.push(BuildConst(current, context, schema, value));\n    if (Schema.IsEnum(schema))\n        conditions.push(BuildEnum(current, context, schema, value));\n    if (Schema.IsIf(schema))\n        conditions.push(BuildIf(current, context, schema, value));\n    if (Schema.IsNot(schema))\n        conditions.push(BuildNot(current, context, schema, value));\n    if (Schema.IsAllOf(schema))\n        conditions.push(BuildAllOf(current, context, schema, value));\n    if (Schema.IsAnyOf(schema))\n        conditions.push(BuildAnyOf(current, context, schema, value));\n    if (Schema.IsOneOf(schema))\n        conditions.push(BuildOneOf(current, context, schema, value));\n    if (Schema.IsUnevaluatedItems(schema))\n        conditions.push(E.Or(E.Not(E.IsArray(value)), BuildUnevaluatedItems(current, context, schema, value)));\n    if (Schema.IsUnevaluatedProperties(schema))\n        conditions.push(E.Or(E.Not(E.IsObject(value)), BuildUnevaluatedProperties(current, context, schema, value)));\n    if (Schema.IsRefine(schema))\n        conditions.push(BuildRefine(current, context, schema, value));\n    const result = E.ReduceAnd(conditions);\n    return result;\n}\n// ----------------------------------------------------------------\n// Check\n// ----------------------------------------------------------------\nexport function CheckSchemaPushStack(stack, context, schema, value) {\n    return (context.Push() && CheckSchema(stack, context, schema, value)) && context.Pop();\n}\nexport function CheckSchema(stack, context, schema, value) {\n    const current = Stack.NextStack(stack, schema);\n    const result = Schema.IsSchemaBoolean(schema) ? CheckSchemaBoolean(current, context, schema, value) : ((!Schema.IsType(schema) || CheckType(current, context, schema, value)) &&\n        (!(G.IsObject(value) && !G.IsArray(value)) || ((!Schema.IsRequired(schema) || CheckRequired(current, context, schema, value)) &&\n            (!Schema.IsAdditionalProperties(schema) || CheckAdditionalProperties(current, context, schema, value)) &&\n            (!Schema.IsDependencies(schema) || CheckDependencies(current, context, schema, value)) &&\n            (!Schema.IsDependentRequired(schema) || CheckDependentRequired(current, context, schema, value)) &&\n            (!Schema.IsDependentSchemas(schema) || CheckDependentSchemas(current, context, schema, value)) &&\n            (!Schema.IsPatternProperties(schema) || CheckPatternProperties(current, context, schema, value)) &&\n            (!Schema.IsProperties(schema) || CheckProperties(current, context, schema, value)) &&\n            (!Schema.IsPropertyNames(schema) || CheckPropertyNames(current, context, schema, value)) &&\n            (!Schema.IsMinProperties(schema) || CheckMinProperties(current, context, schema, value)) &&\n            (!Schema.IsMaxProperties(schema) || CheckMaxProperties(current, context, schema, value)))) &&\n        (!G.IsArray(value) || ((!Schema.IsAdditionalItems(schema) || CheckAdditionalItems(current, context, schema, value)) &&\n            (!Schema.IsContains(schema) || CheckContains(current, context, schema, value)) &&\n            (!Schema.IsItems(schema) || CheckItems(current, context, schema, value)) &&\n            (!Schema.IsMinContains(schema) || CheckMinContains(current, context, schema, value)) &&\n            (!Schema.IsMaxContains(schema) || CheckMaxContains(current, context, schema, value)) &&\n            (!Schema.IsMinItems(schema) || CheckMinItems(current, context, schema, value)) &&\n            (!Schema.IsMaxItems(schema) || CheckMaxItems(current, context, schema, value)) &&\n            (!Schema.IsPrefixItems(schema) || CheckPrefixItems(current, context, schema, value)) &&\n            (!Schema.IsUniqueItems(schema) || CheckUniqueItems(current, context, schema, value)))) &&\n        (!G.IsString(value) || ((!Schema.IsMinLength(schema) || CheckMinLength(current, context, schema, value)) &&\n            (!Schema.IsMaxLength(schema) || CheckMaxLength(current, context, schema, value)) &&\n            (!Schema.IsFormat(schema) || CheckFormat(current, context, schema, value)) &&\n            (!Schema.IsPattern(schema) || CheckPattern(current, context, schema, value)))) &&\n        (!(G.IsNumber(value) || G.IsBigInt(value)) || ((!Schema.IsExclusiveMinimum(schema) || CheckExclusiveMinimum(current, context, schema, value)) &&\n            (!Schema.IsExclusiveMaximum(schema) || CheckExclusiveMaximum(current, context, schema, value)) &&\n            (!Schema.IsMinimum(schema) || CheckMinimum(current, context, schema, value)) &&\n            (!Schema.IsMaximum(schema) || CheckMaximum(current, context, schema, value)) &&\n            (!Schema.IsMultipleOf(schema) || CheckMultipleOf(current, context, schema, value)))) &&\n        (!Schema.IsRef(schema) || CheckRef(current, context, schema, value)) &&\n        (!Schema.IsRecursiveRef(schema) || CheckRecursiveRef(current, context, schema, value)) &&\n        (!Schema.IsDynamicRef(schema) || CheckDynamicRef(current, context, schema, value)) &&\n        (!Schema.IsConst(schema) || CheckConst(current, context, schema, value)) &&\n        (!Schema.IsEnum(schema) || CheckEnum(current, context, schema, value)) &&\n        (!Schema.IsIf(schema) || CheckIf(current, context, schema, value)) &&\n        (!Schema.IsNot(schema) || CheckNot(current, context, schema, value)) &&\n        (!Schema.IsAllOf(schema) || CheckAllOf(current, context, schema, value)) &&\n        (!Schema.IsAnyOf(schema) || CheckAnyOf(current, context, schema, value)) &&\n        (!Schema.IsOneOf(schema) || CheckOneOf(current, context, schema, value)) &&\n        (!Schema.IsUnevaluatedItems(schema) || (!G.IsArray(value) || CheckUnevaluatedItems(current, context, schema, value))) &&\n        (!Schema.IsUnevaluatedProperties(schema) || (!G.IsObject(value) || CheckUnevaluatedProperties(current, context, schema, value))) &&\n        (!Schema.IsRefine(schema) || CheckRefine(current, context, schema, value)));\n    return result;\n}\n// ----------------------------------------------------------------\n// Error\n// ----------------------------------------------------------------\nexport function ErrorSchemaPushStack(stack, context, schemaPath, instancePath, schema, value) {\n    return (context.Push() && ErrorSchema(stack, context, schemaPath, instancePath, schema, value)) && context.Pop();\n}\nexport function ErrorSchema(stack, context, schemaPath, instancePath, schema, value) {\n    // Optimization: We can safely terminate here when the context is at capacity because we are unable to\n    // append additional errors. It is worth being mindful that logical keywords such as allOf, anyOf,\n    // oneOf pass a new context per operand, so the capacity check applies per context, not across the\n    // full set of errors accumulated by the schema as a whole. (review)\n    if (context.AtCapacity())\n        return false;\n    const current = Stack.NextStack(stack, schema);\n    const result = (Schema.IsSchemaBoolean(schema)) ? ErrorSchemaBoolean(current, context, schemaPath, instancePath, schema, value) : (!!(+(!Schema.IsType(schema) || ErrorType(current, context, schemaPath, instancePath, schema, value)) &\n        +(!(G.IsObject(value) && !G.IsArray(value)) || !!(+(!Schema.IsRequired(schema) || ErrorRequired(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsAdditionalProperties(schema) || ErrorAdditionalProperties(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsDependencies(schema) || ErrorDependencies(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsDependentRequired(schema) || ErrorDependentRequired(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsDependentSchemas(schema) || ErrorDependentSchemas(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsPatternProperties(schema) || ErrorPatternProperties(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsProperties(schema) || ErrorProperties(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsPropertyNames(schema) || ErrorPropertyNames(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMinProperties(schema) || ErrorMinProperties(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMaxProperties(schema) || ErrorMaxProperties(current, context, schemaPath, instancePath, schema, value)))) &\n        +(!G.IsArray(value) || !!(+(!Schema.IsAdditionalItems(schema) || ErrorAdditionalItems(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsContains(schema) || ErrorContains(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsItems(schema) || ErrorItems(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMinContains(schema) || ErrorMinContains(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMaxContains(schema) || ErrorMaxContains(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMinItems(schema) || ErrorMinItems(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMaxItems(schema) || ErrorMaxItems(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsPrefixItems(schema) || ErrorPrefixItems(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsUniqueItems(schema) || ErrorUniqueItems(current, context, schemaPath, instancePath, schema, value)))) &\n        +(!G.IsString(value) || !!(+(!Schema.IsMinLength(schema) || ErrorMinLength(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMaxLength(schema) || ErrorMaxLength(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsFormat(schema) || ErrorFormat(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsPattern(schema) || ErrorPattern(current, context, schemaPath, instancePath, schema, value)))) &\n        +(!(G.IsNumber(value) || G.IsBigInt(value)) || !!(+(!Schema.IsExclusiveMinimum(schema) || ErrorExclusiveMinimum(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsExclusiveMaximum(schema) || ErrorExclusiveMaximum(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMinimum(schema) || ErrorMinimum(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMaximum(schema) || ErrorMaximum(current, context, schemaPath, instancePath, schema, value)) &\n            +(!Schema.IsMultipleOf(schema) || ErrorMultipleOf(current, context, schemaPath, instancePath, schema, value)))) &\n        +(!Schema.IsRef(schema) || ErrorRef(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsRecursiveRef(schema) || ErrorRecursiveRef(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsDynamicRef(schema) || ErrorDynamicRef(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsConst(schema) || ErrorConst(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsEnum(schema) || ErrorEnum(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsIf(schema) || ErrorIf(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsNot(schema) || ErrorNot(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsAllOf(schema) || ErrorAllOf(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsAnyOf(schema) || ErrorAnyOf(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsOneOf(schema) || ErrorOneOf(current, context, schemaPath, instancePath, schema, value)) &\n        +(!Schema.IsUnevaluatedItems(schema) || (!G.IsArray(value) || ErrorUnevaluatedItems(current, context, schemaPath, instancePath, schema, value))) &\n        +(!Schema.IsUnevaluatedProperties(schema) || (!G.IsObject(value) || ErrorUnevaluatedProperties(current, context, schemaPath, instancePath, schema, value)))) &&\n        (!Schema.IsRefine(schema) || ErrorRefine(current, context, schemaPath, instancePath, schema, value)));\n    return result;\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../system/arguments/index.mjs';\nimport { Get as GetLocalizationFunction } from '../system/locale/_config.mjs';\nimport * as Engine from './engine/index.mjs';\n/** Returns an array of validation errors for the given value. */\nexport function Errors(...args) {\n    const [context, schema, value] = Arguments.Match(args, {\n        3: (context, schema, value) => [context, schema, value],\n        2: (schema, value) => [{}, schema, value]\n    });\n    const stack = Engine.Stack(context, schema);\n    const errorContext = new Engine.ErrorContext();\n    const result = Engine.ErrorSchema(stack, errorContext, '#', '', schema, value);\n    const errors = errorContext.GetErrors();\n    const locale = GetLocalizationFunction();\n    const localized = errors.map(error => ({ ...error, message: locale(error) }));\n    return [result, localized];\n}\n","import { Get } from './settings.mjs';\n// ------------------------------------------------------------------\n// TempMaxErrors\n// ------------------------------------------------------------------\nlet TempMaxErrors = 0;\n// ------------------------------------------------------------------\n// [Internal] EnableParseErrors\n// ------------------------------------------------------------------\nexport function EnableParseErrors() {\n    const settings = Get();\n    TempMaxErrors = settings.maxErrors;\n    settings.maxErrors = settings.maxParseErrors;\n}\n// ------------------------------------------------------------------\n// [Internal] DisableParseErrors\n// ------------------------------------------------------------------\nexport function DisableParseErrors() {\n    const settings = Get();\n    settings.maxErrors = TempMaxErrors;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Arguments } from '../system/arguments/index.mjs';\nimport * as Engine from './engine/index.mjs';\n/** Checks a value against the provided schema */\nexport function Check(...args) {\n    const [context, schema, value] = Arguments.Match(args, {\n        3: (context, schema, value) => [context, schema, value],\n        2: (schema, value) => [{}, schema, value]\n    });\n    const stack = Engine.Stack(context, schema);\n    const checkContext = new Engine.CheckContext();\n    return Engine.CheckSchema(stack, checkContext, schema, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Check as SchemaCheck } from '../../schema/index.mjs';\n/** Checks a value matches the provided type. */\nexport function Check(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value]\n    });\n    return SchemaCheck(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Errors as SchemaErrors } from '../../schema/index.mjs';\n/** Returns an array of validation errors for the given value. */\nexport function Errors(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value],\n    });\n    const [_, errors] = SchemaErrors(context, type, value);\n    return errors;\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\n// ------------------------------------------------------------------\n// AssertError\n// ------------------------------------------------------------------\nexport class AssertError extends Error {\n    constructor(source, value, errors) {\n        super(source);\n        Object.defineProperty(this, 'cause', {\n            value: { source, errors, value },\n            writable: false,\n            configurable: false,\n            enumerable: false\n        });\n    }\n}\n/** Asserts the a value matches the given type. This function returns a TypeScript type asserts predicate and will throw AssertError if value does not match. */\nexport function Assert(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value]\n    });\n    const check = Check(context, type, value);\n    if (!check)\n        throw new AssertError('Assert', value, Errors(context, type, value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromArray(context, type, value) {\n    if (!Guard.IsArray(value))\n        return value;\n    return value.map((value) => FromType(context, type.items, value));\n}\n","// deno-fmt-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromCyclic(context, type, value) {\n    return FromType({ ...context, ...type.$defs }, Ref(type.$ref), value);\n}\n","// deno-fmt-ignore-file\nimport { Evaluate, Instantiate, IsObject, With } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\n// ------------------------------------------------------------------\n// EvaluateIntersection\n// ------------------------------------------------------------------\nfunction EvaluateIntersection(context, type) {\n    // Note: reinterpret unevaluatedProperties as additionalProperties\n    const additionalProperties = Guard.HasPropertyKey(type, 'unevaluatedProperties')\n        ? { additionalProperties: type.unevaluatedProperties }\n        : {};\n    const instantiated = Instantiate(context, type);\n    const evaluated = Evaluate(instantiated);\n    return IsObject(evaluated)\n        ? With(evaluated, additionalProperties)\n        : evaluated;\n}\n// ------------------------------------------------------------------\n// FromIntersection\n// ------------------------------------------------------------------\nexport function FromIntersect(context, type, value) {\n    // Note: Evaluate and route back to FromType in evaluated form (likely an Object)\n    const evaluated = EvaluateIntersection(context, type);\n    return FromType(context, evaluated, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nexport function GetAdditionalProperties(type) {\n    const additionalProperties = Guard.HasPropertyKey(type, 'additionalProperties') ? type.additionalProperties : undefined;\n    return additionalProperties;\n}\n","// deno-fmt-ignore-file\nimport { IsSchema } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Check } from '../check/index.mjs';\nimport { GetAdditionalProperties } from './additional.mjs';\n// ------------------------------------------------------------------\n// FromObject\n// ------------------------------------------------------------------\nexport function FromObject(context, type, value) {\n    if (!Guard.IsObject(value) || Guard.IsArray(value))\n        return value;\n    const additionalProperties = GetAdditionalProperties(type);\n    for (const key of Guard.Keys(value)) {\n        if (Guard.HasPropertyKey(type.properties, key) && IsSchema(type.properties[key])) {\n            value[key] = FromType(context, type.properties[key], value[key]);\n            continue;\n        }\n        const unknownCheck = \n        // 1. additionalProperties: true\n        (Guard.IsBoolean(additionalProperties) && Guard.IsEqual(additionalProperties, true))\n            // 2. additionalProperties: TSchema\n            || IsSchema(additionalProperties) && Check(context, additionalProperties, value[key]);\n        if (unknownCheck) {\n            value[key] = FromType(context, additionalProperties, value[key]);\n            continue;\n        }\n        delete value[key];\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\nimport { IsSchema, RecordPattern, RecordValue } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Check } from '../check/index.mjs';\nimport { GetAdditionalProperties } from './additional.mjs';\n// ------------------------------------------------------------------\n// FromRecord\n// ------------------------------------------------------------------\nexport function FromRecord(context, type, value) {\n    if (!Guard.IsObject(value))\n        return value;\n    const additionalProperties = GetAdditionalProperties(type);\n    const [recordPattern, recordValue] = [new RegExp(RecordPattern(type)), RecordValue(type)];\n    for (const key of Guard.Keys(value)) {\n        if (recordPattern.test(key)) {\n            value[key] = FromType(context, recordValue, value[key]);\n            continue;\n        }\n        const unknownCheck = \n        // 1. additionalProperties: true\n        (Guard.IsBoolean(additionalProperties) && Guard.IsEqual(additionalProperties, true))\n            // 2. additionalProperties: TSchema\n            || IsSchema(additionalProperties) && Check(context, additionalProperties, value[key]);\n        if (unknownCheck) {\n            value[key] = FromType(context, additionalProperties, value[key]);\n            continue;\n        }\n        delete value[key];\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromRef(context, type, value) {\n    return Guard.HasPropertyKey(context, type.$ref)\n        ? FromType(context, context[type.$ref], value)\n        : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(context, schema, value) {\n    if (!Guard.IsArray(value))\n        return value;\n    const length = Math.min(value.length, schema.items.length);\n    for (let index = 0; index < length; index++) {\n        value[index] = FromType(context, schema.items[index], value[index]);\n    }\n    return Guard.IsGreaterThan(value.length, length)\n        ? value.slice(0, length)\n        : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard, GlobalsGuard } from '../../guard/index.mjs';\n// ------------------------------------------------------------------\n// ClassInstance\n//\n// TypeBox does not clone arbitrary class instances. Class instances\n// cannot be safely cloned without potentially breaking private\n// members of the instance.\n//\n// ------------------------------------------------------------------\nfunction FromClassInstance(value) {\n    return value; // atomic\n}\n// ------------------------------------------------------------------\n// SchemaObject\n//\n// Schema objects have non-enumerable properties that MUST be preserved \n// on Clone. The following is the optimal path these objects.\n// ------------------------------------------------------------------\nfunction IsSchemaObject(value) {\n    return (Guard.HasPropertyKey(value, '~kind') ||\n        Guard.HasPropertyKey(value, '~unsafe'));\n}\nfunction FromSchemaObject(value) {\n    const result = {};\n    for (const key of Guard.Keys(value)) {\n        if (Guard.IsUnsafePropertyKey(key))\n            continue; // (ignore: prototype-pollution)\n        const descriptor = Object.getOwnPropertyDescriptor(value, key); // safe-name!\n        descriptor.value = FromValue(descriptor.value);\n        if (Guard.IsEqual(descriptor.enumerable, true)) {\n            result[key] = descriptor.value;\n        }\n        else {\n            Object.defineProperty(result, key, descriptor);\n        }\n    }\n    return result;\n}\n// ------------------------------------------------------------------\n// PlainObject\n// ------------------------------------------------------------------\nfunction FromPlainObject(value) {\n    const result = {};\n    for (const key of Guard.Keys(value)) {\n        if (Guard.IsUnsafePropertyKey(key))\n            continue; // (ignore: prototype-pollution)\n        result[key] = FromValue(value[key]);\n    }\n    for (const key of Guard.Symbols(value)) {\n        result[key] = FromValue(value[key]);\n    }\n    return result;\n}\n// ------------------------------------------------------------------\n// Object\n// ------------------------------------------------------------------\nfunction FromObject(value) {\n    return (Guard.IsClassInstance(value) ? FromClassInstance(value) :\n        IsSchemaObject(value) ? FromSchemaObject(value) :\n            FromPlainObject(value));\n}\n// ------------------------------------------------------------------\n// Array\n// ------------------------------------------------------------------\nfunction FromArray(value) {\n    return value.map((element) => FromValue(element));\n}\n// ------------------------------------------------------------------\n// TypeArray\n// ------------------------------------------------------------------\nfunction FromTypedArray(value) {\n    return value.slice();\n}\n// ------------------------------------------------------------------\n// RegExp\n// ------------------------------------------------------------------\nfunction FromRegExp(value) {\n    return new RegExp(value.source, value.flags);\n}\n// ------------------------------------------------------------------\n// Map\n// ------------------------------------------------------------------\nfunction FromMap(value) {\n    return new Map(FromValue([...value.entries()]));\n}\n// ------------------------------------------------------------------\n// Set\n// ------------------------------------------------------------------\nfunction FromSet(value) {\n    return new Set(FromValue([...value.values()]));\n}\nfunction FromValue(value) {\n    return (GlobalsGuard.IsTypeArray(value) ? FromTypedArray(value) :\n        GlobalsGuard.IsRegExp(value) ? FromRegExp(value) :\n            GlobalsGuard.IsMap(value) ? FromMap(value) :\n                GlobalsGuard.IsSet(value) ? FromSet(value) :\n                    Guard.IsArray(value) ? FromArray(value) :\n                        Guard.IsObject(value) ? FromObject(value) :\n                            value);\n}\n// ------------------------------------------------------------------\n// Deep\n// ------------------------------------------------------------------\n/** Returns a deep Clone of the given value. This function is similar to structuredClone() but also supports deep cloning instances of Map, Set and TypeArray. */\nexport function Deep(value) {\n    return FromValue(value);\n}\n","// deno-fmt-ignore-file\nimport { Deep } from '../../system/memory/deep.mjs';\n/**\n * Returns a deep Clone of the given value. This function is similar to `structuredClone()`,\n * but also supports deep cloning `Map`, `Set`, and `TypeArray` instances. This function can also be used\n * to clone TypeBox types while retaining their enumerable and non-enumerable properties.\n */\nexport function Clone(value) {\n    return Deep(value);\n}\n","// deno-fmt-ignore-file\nimport { Check } from '../check/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(context, type, value) {\n    for (const schema of type.anyOf) {\n        const clean = FromType(context, schema, Clone(value));\n        if (Check(context, schema, clean))\n            return clean;\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\nimport * as T from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(context, type, value) {\n    return (T.IsArray(type) ? FromArray(context, type, value) :\n        T.IsCyclic(type) ? FromCyclic(context, type, value) :\n            T.IsIntersect(type) ? FromIntersect(context, type, value) :\n                T.IsObject(type) ? FromObject(context, type, value) :\n                    T.IsRecord(type) ? FromRecord(context, type, value) :\n                        T.IsRef(type) ? FromRef(context, type, value) :\n                            T.IsTuple(type) ? FromTuple(context, type, value) :\n                                T.IsUnion(type) ? FromUnion(context, type, value) :\n                                    value);\n}\n","// deno-fmt-ignore-file\nimport Guard from '../../guard/index.mjs';\nimport { Memory } from '../../system/memory/index.mjs';\nimport { Array as _Array_, ArrayOptions, IsArray } from '../../type/index.mjs';\nimport { Intersect, IsIntersect } from '../../type/index.mjs';\nimport { IsObject, Object as _Object_ } from '../../type/index.mjs';\nimport { IsRecord, Record, RecordPattern, RecordValue } from '../../type/index.mjs';\nimport { String } from '../../type/index.mjs';\nimport { IsTuple, Tuple } from '../../type/index.mjs';\nimport { IsUnion, Union } from '../../type/index.mjs';\nimport { Priority } from '../../type/index.mjs';\n// ------------------------------------------------------------------\n// Modifiers (Mutable)\n//\n// Prioritized types lose `~modifier` properties and additional constraints\n// (e.g. additionalProperties) during the mapping phase and need to be\n// reassigned afterward. We previously used a mutable assignment on this\n// function, however `immutableTypes: true` caused errors. We use the \n// Memory.Assign to ensure modifiers are retained and we preserve type\n// configurations (review)\n//\n// ------------------------------------------------------------------\nfunction Modifiers(type, next) {\n    return Memory.Assign(type, next);\n}\n// ------------------------------------------------------------------\n// Properties\n// ------------------------------------------------------------------\nfunction FromProperties(properties) {\n    const result = {};\n    for (const key of Guard.Keys(properties))\n        result[key] = FromType(properties[key]);\n    return result;\n}\n// ------------------------------------------------------------------\n// FromRecordKey\n//\n// This is required because RecordKey(...) returns a canonical\n// decoded type derived from the pattern. When the pattern is an\n// unrecognized user-defined one, the result falls through to\n// TString (^.*$) and the user-defined pattern is lost. This\n// function ensures the exact pattern is retained.\n// ------------------------------------------------------------------\nfunction FromRecordKey(type) {\n    return String({ pattern: RecordPattern(type) });\n}\n// ------------------------------------------------------------------\n// PriorityTypes\n// ------------------------------------------------------------------\nfunction FromPriorityTypes(types) {\n    return FromTypes(Priority(types));\n}\n// ------------------------------------------------------------------\n// Types\n// ------------------------------------------------------------------\nfunction FromTypes(types) {\n    return types.map((type) => FromType(type));\n}\n// ------------------------------------------------------------------\n// Type\n// ------------------------------------------------------------------\nfunction FromType(type) {\n    const next = (IsArray(type) ? _Array_(FromType(type.items), ArrayOptions(type)) :\n        IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :\n            IsUnion(type) ? Union(FromPriorityTypes(type.anyOf)) :\n                IsObject(type) ? _Object_(FromProperties(type.properties)) :\n                    IsRecord(type) ? Record(FromRecordKey(type), FromType(RecordValue(type))) :\n                        IsTuple(type) ? Tuple(FromTypes(type.items)) :\n                            type);\n    return Modifiers(type, next);\n}\n// ------------------------------------------------------------------\n// UnionPrioritySort\n// ------------------------------------------------------------------\n/**\n * (Type-Preprocessor) Recursively reorders Union variants from narrowest to broadest, ensuring\n * more specific types (e.g. Literal) are evaluated before broader types (e.g. String). Used\n * prior to Clean, Decode, and Encode operations.\n */\nexport function UnionPrioritySort(type) {\n    const result = FromType(type);\n    return result;\n}\n","import { Arguments, Settings } from '../../system/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { UnionPrioritySort } from '../shared/union_priority_sort.mjs';\n/**\n * Cleans a value by removing non-evaluated properties and elements as derived from the provided type.\n * This function returns unknown so callers should Check the return value before use. This function\n * mutates the provided value. If mutation is not wanted, you should Clone the value before passing\n * to this function.\n */\nexport function Clean(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value]\n    });\n    const sorted = Settings.Get().unionPrioritySort ? UnionPrioritySort(type) : type;\n    return FromType(context, sorted, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\n// ------------------------------------------------------------------\n// Guard\n// ------------------------------------------------------------------\nexport function IsOk(value) {\n    return Guard.IsObject(value) && Guard.HasPropertyKey(value, 'value');\n}\n// ------------------------------------------------------------------\n// Factory\n// ------------------------------------------------------------------\nexport function Ok(value) {\n    return { value };\n}\nexport function Fail() {\n    return undefined;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok } from './try_result.mjs';\nexport function TryArray(value) {\n    return Guard.IsArray(value) ? Ok(value) : Ok([value]);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n    return Guard.IsEqual(value, true) ? Ok(BigInt(1)) : Ok(BigInt(0));\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nconst bigintPattern = /^-?(0|[1-9]\\d*)n$/;\nconst decimalPattern = /^-?(0|[1-9]\\d*)\\.\\d+$/;\nconst integerPattern = /^-?(0|[1-9]\\d*)$/;\nfunction IsStringBigIntLike(value) {\n    return bigintPattern.test(value);\n}\nfunction IsStringDecimalLike(value) {\n    return decimalPattern.test(value);\n}\nfunction IsStringIntegerLike(value) {\n    return integerPattern.test(value);\n}\nfunction FromString(value) {\n    const lowercase = value.toLowerCase();\n    return (IsStringBigIntLike(value) ? Ok(BigInt(value.slice(0, value.length - 1))) :\n        IsStringDecimalLike(value) ? Ok(BigInt(value.split('.')[0])) :\n            IsStringIntegerLike(value) ? Ok(BigInt(value)) :\n                Guard.IsEqual(lowercase, 'false') ? Ok(BigInt(0)) :\n                    Guard.IsEqual(lowercase, 'true') ? Ok(BigInt(1)) :\n                        Fail());\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryBigInt(value) {\n    return (Guard.IsBigInt(value) ? Ok(value) :\n        Guard.IsBoolean(value) ? FromBoolean(value) :\n            Guard.IsNumber(value) ? Ok(BigInt(Math.trunc(value))) :\n                Guard.IsNull(value) ? Ok(BigInt(0)) :\n                    Guard.IsString(value) ? FromString(value) :\n                        Guard.IsUndefined(value) ? Ok(BigInt(0)) :\n                            Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n    return (Guard.IsEqual(value, BigInt(0)) ? Ok(false) :\n        Guard.IsEqual(value, BigInt(1)) ? Ok(true) :\n            Fail());\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n    return (Guard.IsEqual(value, 0) ? Ok(false) :\n        Guard.IsEqual(value, 1) ? Ok(true) :\n            Fail());\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n    return (Guard.IsEqual(value.toLowerCase(), 'false') ? Ok(false) :\n        Guard.IsEqual(value.toLowerCase(), 'true') ? Ok(true) :\n            Guard.IsEqual(value, '0') ? Ok(false) :\n                Guard.IsEqual(value, '1') ? Ok(true) :\n                    Fail());\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryBoolean(value) {\n    return (Guard.IsBigInt(value) ? FromBigInt(value) :\n        Guard.IsBoolean(value) ? Ok(value) :\n            Guard.IsNumber(value) ? FromNumber(value) :\n                Guard.IsNull(value) ? Ok(false) :\n                    Guard.IsString(value) ? FromString(value) :\n                        Guard.IsUndefined(value) ? Ok(false) :\n                            Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n    return Guard.IsEqual(value, BigInt(0)) ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n    return Guard.IsEqual(value, false) ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n    return Guard.IsEqual(value, 0) ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n    const lowercase = value.toLowerCase();\n    const predicate = Guard.IsEqual(lowercase, 'undefined')\n        || Guard.IsEqual(lowercase, 'null')\n        || Guard.IsEqual(value, '')\n        || Guard.IsEqual(value, '0');\n    return predicate ? Ok(null) : Fail();\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryNull(value) {\n    return (Guard.IsBigInt(value) ? FromBigInt(value) :\n        Guard.IsBoolean(value) ? FromBoolean(value) :\n            Guard.IsNumber(value) ? FromNumber(value) :\n                Guard.IsNull(value) ? Ok(null) :\n                    Guard.IsString(value) ? FromString(value) :\n                        Guard.IsUndefined(value) ? Ok(null) :\n                            Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail, IsOk } from './try_result.mjs';\nimport { TryBigInt } from './try_bigint.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nconst maxBigInt = BigInt(Number.MAX_SAFE_INTEGER);\nconst minBigInt = BigInt(Number.MIN_SAFE_INTEGER);\nfunction FromBigInt(value) {\n    return (value <= maxBigInt && value >= minBigInt) ? Ok(Number(value)) : Fail();\n}\nfunction FromBoolean(value) {\n    return Ok(value ? 1 : 0);\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n    const coerced = +value;\n    if (Guard.IsNumber(coerced))\n        return Ok(coerced);\n    const lowercase = value.toLowerCase();\n    if (Guard.IsEqual(lowercase, 'false'))\n        return Ok(0);\n    if (Guard.IsEqual(lowercase, 'true'))\n        return Ok(1);\n    const result = TryBigInt(value);\n    if (IsOk(result))\n        return (result.value <= maxBigInt && result.value >= minBigInt) ? Ok(Number(result.value)) : Fail();\n    return Fail();\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryNumber(value) {\n    return (Guard.IsBigInt(value) ? FromBigInt(value) :\n        Guard.IsBoolean(value) ? FromBoolean(value) :\n            Guard.IsNumber(value) ? Ok(value) :\n                Guard.IsNull(value) ? Ok(0) :\n                    Guard.IsString(value) ? FromString(value) :\n                        Guard.IsUndefined(value) ? Ok(0) :\n                            Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\nexport function TryString(value) {\n    return (Guard.IsBigInt(value) ? Ok(value.toString()) :\n        Guard.IsBoolean(value) ? Ok(value.toString()) :\n            Guard.IsNumber(value) ? Ok(value.toString()) :\n                Guard.IsNull(value) ? Ok('null') :\n                    Guard.IsString(value) ? Ok(value) :\n                        Guard.IsUndefined(value) ? Ok('') :\n                            Fail());\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../../guard/index.mjs';\nimport { Ok, Fail } from './try_result.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromBigInt(value) {\n    return Guard.IsEqual(value, BigInt(0)) ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromBoolean(value) {\n    return Guard.IsEqual(value, false) ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromNumber(value) {\n    return Guard.IsEqual(value, 0) ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromString(value) {\n    const lowercase = value.toLowerCase();\n    const predicate = Guard.IsEqual(lowercase, 'undefined')\n        || Guard.IsEqual(lowercase, 'null')\n        || Guard.IsEqual(value, '')\n        || Guard.IsEqual(value, '0');\n    return predicate ? Ok(undefined) : Fail();\n}\n// ------------------------------------------------------------------\n// Try\n// ------------------------------------------------------------------\nexport function TryUndefined(value) {\n    return (Guard.IsBigInt(value) ? FromBigInt(value) :\n        Guard.IsBoolean(value) ? FromBoolean(value) :\n            Guard.IsNumber(value) ? FromNumber(value) :\n                Guard.IsNull(value) ? Ok(undefined) :\n                    Guard.IsString(value) ? FromString(value) :\n                        Guard.IsUndefined(value) ? Ok(value) :\n                            Fail());\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { Try } from './try/index.mjs';\nexport function FromArray(context, type, value) {\n    const result = Try.TryArray(value);\n    return result.value.map(value => FromType(context, type.items, value));\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromBigInt(_context, _type, value) {\n    const result = Try.TryBigInt(value);\n    return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromBoolean(_context, _type, value) {\n    const result = Try.TryBoolean(value);\n    return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromCyclic(context, type, value) {\n    return FromType({ ...context, ...type.$defs }, Ref(type.$ref), value);\n}\n","// deno-fmt-ignore-file\nimport { Evaluate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromEnum(context, type, value) {\n    return FromType(context, Evaluate(type), value);\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromInteger(_context, _type, value) {\n    const result = Try.TryNumber(value);\n    return Try.IsOk(result) ? Math.trunc(result.value) : value;\n}\n","// deno-fmt-ignore-file\nimport { Evaluate, Instantiate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromIntersect(context, type, value) {\n    const instantiated = Instantiate(context, type);\n    const evaluated = Evaluate(instantiated);\n    return FromType(context, evaluated, value);\n}\n","// deno-fmt-ignore-file\nimport { Unreachable } from '../../system/unreachable/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { IsLiteralBigInt, IsLiteralBoolean, IsLiteralNumber, IsLiteralString } from '../../type/index.mjs';\nimport { Try } from './try/index.mjs';\n// ------------------------------------------------------------------\n// BigInt\n// ------------------------------------------------------------------\nfunction FromLiteralBigInt(_context, type, value) {\n    const result = Try.TryBigInt(value);\n    return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// ------------------------------------------------------------------\n// Boolean\n// ------------------------------------------------------------------\nfunction FromLiteralBoolean(_context, type, value) {\n    const result = Try.TryBoolean(value);\n    return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// ------------------------------------------------------------------\n// Number\n// ------------------------------------------------------------------\nfunction FromLiteralNumber(_context, type, value) {\n    const result = Try.TryNumber(value);\n    return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// ------------------------------------------------------------------\n// String\n// ------------------------------------------------------------------\nfunction FromLiteralString(_context, type, value) {\n    const result = Try.TryString(value);\n    return Try.IsOk(result) && Guard.IsEqual(type.const, result.value) ? result.value : value;\n}\n// deno-coverage-ignore-start - unreachable | guarded\nexport function FromLiteral(context, type, value) {\n    if (Guard.IsEqual(type.const, value))\n        return value;\n    return (IsLiteralBigInt(type) ? FromLiteralBigInt(context, type, value) :\n        IsLiteralBoolean(type) ? FromLiteralBoolean(context, type, value) :\n            IsLiteralNumber(type) ? FromLiteralNumber(context, type, value) :\n                IsLiteralString(type) ? FromLiteralString(context, type, value) :\n                    Unreachable());\n}\n// deno-coverage-ignore-stop\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromNull(_context, _type, value) {\n    const result = Try.TryNull(value);\n    return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromNumber(_context, _type, value) {\n    const result = Try.TryNumber(value);\n    return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Used by Object and Record Types. The entries are derived from the known\n * properties obtained from 'properties' and 'patternProperties' respectively.\n */\nexport function FromAdditionalProperties(context, entries, additionalProperties, value) {\n    const keys = Guard.Keys(value);\n    for (const [regexp, _] of entries) {\n        for (const key of keys) {\n            if (!regexp.test(key)) {\n                value[key] = FromType(context, additionalProperties, value[key]);\n            }\n        }\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsOptional } from '../../type/index.mjs';\n// ------------------------------------------------------------------\n// IsOptionalUndefined\n//\n// Indicates whether a key should be excluded from processing when it is \n// defined as optional in the schema and its corresponding value is undefined. \n// This case cannot be reliably distinguished from an omitted key, and therefore \n// introduces ambiguity between a key that is not provided and one that is \n// explicitly assigned an undefined value.\n// ------------------------------------------------------------------\nexport function IsOptionalUndefined(property, key, value) {\n    return IsOptional(property) && Guard.IsUndefined(value[key]);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { FromAdditionalProperties } from './from_additional.mjs';\nimport { IsOptionalUndefined } from '../shared/optional_undefined.mjs';\n// ------------------------------------------------------------------\n// FromProperties\n// ------------------------------------------------------------------\nfunction FromProperties(context, type, value) {\n    const entries = Guard.EntriesRegExp(type.properties);\n    const keys = Guard.Keys(value);\n    for (const [regexp, property] of entries) {\n        for (const key of keys) {\n            // Ignore for non-present or optional-undefined\n            if (!regexp.test(key) || IsOptionalUndefined(property, key, value))\n                continue;\n            value[key] = FromType(context, property, value[key]);\n        }\n    }\n    return (Guard.HasPropertyKey(type, 'additionalProperties') && Guard.IsObject(type.additionalProperties)\n        ? FromAdditionalProperties(context, entries, type.additionalProperties, value)\n        : value);\n}\nexport function FromObject(context, type, value) {\n    return Guard.IsObjectNotArray(value)\n        ? FromProperties(context, type, value)\n        : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { FromAdditionalProperties } from './from_additional.mjs';\nfunction FromPatternProperties(context, type, value) {\n    const entries = Guard.EntriesRegExp(type.patternProperties);\n    const keys = Guard.Keys(value);\n    for (const [regexp, schema] of entries) {\n        for (const key of keys) {\n            if (regexp.test(key)) {\n                value[key] = FromType(context, schema, value[key]);\n            }\n        }\n    }\n    return (Guard.HasPropertyKey(type, 'additionalProperties') && Guard.IsObject(type.additionalProperties)\n        ? FromAdditionalProperties(context, entries, type.additionalProperties, value)\n        : value);\n}\nexport function FromRecord(context, type, value) {\n    return Guard.IsObjectNotArray(value)\n        ? FromPatternProperties(context, type, value)\n        : value;\n}\n","// deno-fmt-ignore-file\nimport { FromType } from './from_type.mjs';\nimport { Guard } from '../../guard/index.mjs';\nexport function FromRef(context, type, value) {\n    return (Guard.HasPropertyKey(context, type.$ref)\n        ? FromType(context, context[type.$ref], value)\n        : value);\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromString(_context, _type, value) {\n    const result = Try.TryString(value);\n    return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Evaluate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTemplateLiteral(context, type, value) {\n    return FromType(context, Evaluate(type), value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(context, type, value) {\n    if (!Guard.IsArray(value))\n        return value;\n    for (let index = 0; index < Math.min(type.items.length, value.length); index++) {\n        value[index] = FromType(context, type.items[index], value[index]);\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromUndefined(_context, _type, value) {\n    const result = Try.TryUndefined(value);\n    return Try.IsOk(result) ? result.value : value;\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(context, type, value) {\n    const matched = type.anyOf.some(type => Check(context, type, value));\n    if (matched)\n        return value;\n    const candidates = type.anyOf.map(type => FromType(context, type, Clone(value)));\n    const selected = candidates.find(value => Check(context, type, value));\n    return Guard.IsUndefined(selected) ? value : selected;\n}\n","// deno-fmt-ignore-file\nimport { Try } from './try/index.mjs';\nexport function FromVoid(_context, _type, value) {\n    const result = Try.TryUndefined(value);\n    return Try.IsOk(result) ? (void 0) : value;\n}\n","// deno-fmt-ignore-file\nimport * as Type from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromBigInt } from './from_bigint.mjs';\nimport { FromBoolean } from './from_boolean.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromEnum } from './from_enum.mjs';\nimport { FromInteger } from './from_integer.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromLiteral } from './from_literal.mjs';\nimport { FromNull } from './from_null.mjs';\nimport { FromNumber } from './from_number.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromString } from './from_string.mjs';\nimport { FromTemplateLiteral } from './from_template_literal.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUndefined } from './from_undefined.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { FromVoid } from './from_void.mjs';\nexport function FromType(context, type, value) {\n    return (Type.IsArray(type) ? FromArray(context, type, value) :\n        Type.IsBigInt(type) ? FromBigInt(context, type, value) :\n            Type.IsBoolean(type) ? FromBoolean(context, type, value) :\n                Type.IsCyclic(type) ? FromCyclic(context, type, value) :\n                    Type.IsEnum(type) ? FromEnum(context, type, value) :\n                        Type.IsInteger(type) ? FromInteger(context, type, value) :\n                            Type.IsIntersect(type) ? FromIntersect(context, type, value) :\n                                Type.IsLiteral(type) ? FromLiteral(context, type, value) :\n                                    Type.IsNull(type) ? FromNull(context, type, value) :\n                                        Type.IsNumber(type) ? FromNumber(context, type, value) :\n                                            Type.IsObject(type) ? FromObject(context, type, value) :\n                                                Type.IsRecord(type) ? FromRecord(context, type, value) :\n                                                    Type.IsRef(type) ? FromRef(context, type, value) :\n                                                        Type.IsString(type) ? FromString(context, type, value) :\n                                                            Type.IsTemplateLiteral(type) ? FromTemplateLiteral(context, type, value) :\n                                                                Type.IsTuple(type) ? FromTuple(context, type, value) :\n                                                                    Type.IsUndefined(type) ? FromUndefined(context, type, value) :\n                                                                        Type.IsUnion(type) ? FromUnion(context, type, value) :\n                                                                            Type.IsVoid(type) ? FromVoid(context, type, value) :\n                                                                                value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Converts a value to the given type, coercing interior values if a reasonable conversion is possible. This\n * function returns unknown so callers should Check the return value before use. This function mutates the\n * provided value. If mutation is not wanted, you should Clone the value before passing to this function.\n */\nexport function Convert(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value],\n    });\n    return FromType(context, type, value);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromArray(context, type, value) {\n    if (!Guard.IsArray(value))\n        return value;\n    for (let i = 0; i < value.length; i++) {\n        value[i] = FromType(context, type.items, value[i]);\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromCyclic(context, type, value) {\n    return FromType({ ...context, ...type.$defs }, Ref(type.$ref), value);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Clone } from '../clone/index.mjs';\n// ------------------------------------------------------------------\n// FromDefault\n// ------------------------------------------------------------------\nexport function FromDefault(type, value) {\n    // we only use defaults when values are undefined, exit early\n    if (!Guard.IsUndefined(value))\n        return value;\n    return Guard.IsFunction(type.default) ? type.default() : Clone(type.default);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Evaluate, Instantiate } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromIntersect(context, type, value) {\n    const instantiated = Instantiate(context, type);\n    const evaluated = Evaluate(instantiated);\n    return FromType(context, evaluated, value);\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { IsOptional } from '../../type/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { IsAdditionalProperties } from '../../schema/types/index.mjs';\nexport function FromObject(context, type, value) {\n    if (!Guard.IsObject(value))\n        return value;\n    const knownPropertyKeys = Guard.Keys(type.properties);\n    // Properties\n    for (const key of knownPropertyKeys) {\n        // Resolve Value for Property\n        const propertyValue = FromType(context, type.properties[key], value[key]);\n        // Ambiguious Undefined: If the value is undefined, the type is optional there's no default. ignore.\n        const isUnassignableUndefined = Guard.IsUndefined(propertyValue) && (IsOptional(type.properties[key]) || !Guard.HasPropertyKey(type.properties[key], 'default'));\n        if (isUnassignableUndefined)\n            continue;\n        // Assign\n        value[key] = propertyValue;\n    }\n    // return if not additional properties\n    if (!IsAdditionalProperties(type) || Guard.IsBoolean(type.additionalProperties))\n        return value;\n    // AdditionalProperties\n    for (const key of Guard.Keys(value)) {\n        if (knownPropertyKeys.includes(key))\n            continue;\n        value[key] = FromType(context, type.additionalProperties, value[key]);\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { RecordPattern, RecordValue } from '../../type/index.mjs';\nimport { IsAdditionalProperties, IsDefault } from '../../schema/types/index.mjs';\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromRecord(context, type, value) {\n    if (!Guard.IsObject(value))\n        return value;\n    // PatternProperties\n    const [recordKey, recordValue] = [new RegExp(RecordPattern(type)), RecordValue(type)];\n    for (const key of Guard.Keys(value)) {\n        if (!(recordKey.test(key) && IsDefault(recordValue)))\n            continue;\n        value[key] = FromType(context, recordValue, value[key]);\n    }\n    // AdditionalProperties\n    if (!IsAdditionalProperties(type))\n        return value;\n    for (const key of Guard.Keys(value)) {\n        if (recordKey.test(key))\n            continue;\n        value[key] = FromType(context, type.additionalProperties, value[key]);\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromRef(context, type, value) {\n    return Guard.HasPropertyKey(context, type.$ref)\n        ? FromType(context, context[type.$ref], value)\n        : value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromTuple(context, schema, value) {\n    if (!Guard.IsArray(value))\n        return value;\n    const [items, max] = [schema.items, Math.max(schema.items.length, value.length)];\n    for (let i = 0; i < max; i++) {\n        if (i < items.length)\n            value[i] = FromType(context, items[i], value[i]);\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { Check } from '../check/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { FromType } from './from_type.mjs';\nexport function FromUnion(context, schema, value) {\n    for (const inner of schema.anyOf) {\n        const result = FromType(context, inner, Clone(value));\n        if (Check(context, inner, result)) {\n            return result;\n        }\n    }\n    return value;\n}\n","// deno-fmt-ignore-file\n// deno-lint-ignore-file\nimport { IsDefault } from '../../schema/index.mjs';\nimport * as T from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromDefault } from './from_default.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nexport function FromType(context, type, value) {\n    const defaulted = IsDefault(type) ? FromDefault(type, value) : value;\n    return (T.IsArray(type) ? FromArray(context, type, defaulted) :\n        T.IsCyclic(type) ? FromCyclic(context, type, defaulted) :\n            T.IsIntersect(type) ? FromIntersect(context, type, defaulted) :\n                T.IsObject(type) ? FromObject(context, type, defaulted) :\n                    T.IsRecord(type) ? FromRecord(context, type, defaulted) :\n                        T.IsRef(type) ? FromRef(context, type, defaulted) :\n                            T.IsTuple(type) ? FromTuple(context, type, defaulted) :\n                                T.IsUnion(type) ? FromUnion(context, type, defaulted) :\n                                    defaulted);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\nimport { FromType } from './from_type.mjs';\n/**\n * Patches missing properties on the value using default annotations specified on the provided type. This\n * function returns unknown so callers should Check the return value before use. This function mutates the\n * provided value. If mutation is not wanted, you should Clone the value before passing to this function.\n */\nexport function Default(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value],\n    });\n    return FromType(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments } from '../../system/arguments/index.mjs';\n// ------------------------------------------------------------------\n// Pipeline\n// ------------------------------------------------------------------\n/** Creates a value processing pipeline. */\nexport function Pipeline(pipeline) {\n    return (...args) => {\n        const [context, type, value] = Arguments.Match(args, {\n            3: (context, type, value) => [context, type, value],\n            2: (type, value) => [{}, type, value],\n        });\n        return pipeline.reduce((result, func) => func(context, type, result), value);\n    };\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { IsCodec } from '../../type/index.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(_context, type, value) {\n    return type['~codec'].decode(value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(_context, type, value) {\n    return type['~codec'].encode(value);\n}\n// ------------------------------------------------------------------\n// Callback\n// ------------------------------------------------------------------\nexport function Callback(direction, context, type, value) {\n    if (!IsCodec(type))\n        return value;\n    return Guard.IsEqual(direction, 'Decode')\n        ? Decode(context, type, value)\n        : Encode(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n    if (!Guard.IsArray(value))\n        return value;\n    for (let i = 0; i < value.length; i++) {\n        value[i] = FromType(direction, context, type.items, value[i]);\n    }\n    return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n    const exterior = Callback(direction, context, type, value);\n    if (!Guard.IsArray(exterior))\n        return exterior;\n    for (let i = 0; i < exterior.length; i++) {\n        exterior[i] = FromType(direction, context, type.items, exterior[i]);\n    }\n    return exterior;\n}\n// ------------------------------------------------------------------\n// FromArray\n// ------------------------------------------------------------------\nexport function FromArray(direction, context, type, value) {\n    return Guard.IsEqual(direction, 'Decode')\n        ? Decode(direction, context, type, value)\n        : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Ref } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\nexport function FromCyclic(direction, context, type, value) {\n    value = FromType(direction, { ...context, ...type.$defs }, Ref(type.$ref), value);\n    return Callback(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Clean } from '../clean/index.mjs';\n// ------------------------------------------------------------------\n// MergeInteriors\n//\n// Merges all interior operand results into a single object. Each\n// subsequent operand's properties override those of prior operands.\n//\n// ------------------------------------------------------------------\nfunction MergeInteriors(interiors) {\n    return interiors.reduce((results, interior) => ({ ...results, ...interior }), {});\n}\n// ------------------------------------------------------------------\n// NonMatchingInterior\n//\n// Used when Intersect operands do not all produce Objects. Returns\n// the first interior result that differs from the original value,\n// indicating a Codec has transformed the data. If no operand\n// produced a change, defaults to the first interior result.\n//\n// ------------------------------------------------------------------\nfunction NonMatchingInterior(value, interiors) {\n    for (const interior of interiors)\n        if (!Guard.IsDeepEqual(value, interior))\n            return interior;\n    return value; // value-unchanged\n}\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n    if (Guard.IsEqual(type.allOf.length, 0))\n        return Callback(direction, context, type, value);\n    const interiors = type.allOf.map((schema) => FromType(direction, context, schema, Clean(schema, Clone(value))));\n    const structural = interiors.every((result) => Guard.IsObject(result));\n    const exterior = structural ? MergeInteriors(interiors) : NonMatchingInterior(value, interiors);\n    return Callback(direction, context, type, exterior);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n    if (Guard.IsEqual(type.allOf.length, 0))\n        return Callback(direction, context, type, value);\n    const exterior = Callback(direction, context, type, value);\n    const interiors = type.allOf.map((schema) => FromType(direction, context, schema, Clean(schema, Clone(exterior))));\n    const structural = interiors.every((result) => Guard.IsObject(result));\n    if (structural)\n        return MergeInteriors(interiors);\n    return NonMatchingInterior(exterior, interiors);\n}\nexport function FromIntersect(direction, context, type, value) {\n    return Guard.IsEqual(direction, 'Decode') ? Decode(direction, context, type, value) : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\nimport { IsOptionalUndefined } from '../shared/optional_undefined.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n    if (!Guard.IsObjectNotArray(value))\n        return value;\n    for (const key of Guard.Keys(type.properties)) {\n        // Ignore for non-present or optional-undefined\n        if (!Guard.HasPropertyKey(value, key) || IsOptionalUndefined(type.properties[key], key, value))\n            continue;\n        value[key] = FromType(direction, context, type.properties[key], value[key]);\n    }\n    return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n    const exterior = Callback(direction, context, type, value);\n    if (!Guard.IsObjectNotArray(exterior))\n        return exterior;\n    for (const key of Guard.Keys(type.properties)) {\n        // Ignore for non-present or optional-undefined\n        if (!Guard.HasPropertyKey(exterior, key) || IsOptionalUndefined(type.properties[key], key, exterior))\n            continue;\n        exterior[key] = FromType(direction, context, type.properties[key], exterior[key]);\n    }\n    return exterior;\n}\n// ------------------------------------------------------------------\n// FromObject\n// ------------------------------------------------------------------\nexport function FromObject(direction, context, type, value) {\n    return Guard.IsEqual(direction, 'Decode')\n        ? Decode(direction, context, type, value)\n        : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { RecordPattern, RecordValue } from '../../type/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n    if (!Guard.IsObjectNotArray(value))\n        return value;\n    const regexp = new RegExp(RecordPattern(type));\n    for (const key of Guard.Keys(value)) {\n        if (!regexp.test(key))\n            continue;\n        value[key] = FromType(direction, context, RecordValue(type), value[key]);\n    }\n    return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n    const exterior = Callback(direction, context, type, value);\n    if (!Guard.IsObjectNotArray(exterior))\n        return exterior;\n    const regexp = new RegExp(RecordPattern(type));\n    for (const key of Guard.Keys(exterior)) {\n        if (!regexp.test(key))\n            continue;\n        exterior[key] = FromType(direction, context, RecordValue(type), exterior[key]);\n    }\n    return exterior;\n}\nexport function FromRecord(direction, context, type, value) {\n    return Guard.IsEqual(direction, 'Decode')\n        ? Decode(direction, context, type, value)\n        : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// ResolveRef\n// ------------------------------------------------------------------\nfunction ResolveRef(direction, context, type, value) {\n    return Guard.HasPropertyKey(context, type.$ref)\n        ? FromType(direction, context, context[type.$ref], value)\n        : value;\n}\n// ------------------------------------------------------------------\n// FromRef\n//\n// Decode and Encode apply the Callback and the referenced type's\n// codec pipeline in opposite orders, since the two operations are\n// inverses of each other.\n//\n// Decode: referenced type resolves first, Callback runs after.\n//   wire value -> resolve $ref -> Callback -> decoded value\n//\n// Encode: Callback runs first, referenced type resolves after.\n//   encoded value -> Callback -> resolve $ref -> wire value\n//\n// ------------------------------------------------------------------\nexport function FromRef(direction, context, type, value) {\n    return Guard.IsEqual(direction, 'Decode')\n        ? Callback(direction, context, type, ResolveRef(direction, context, type, value))\n        : ResolveRef(direction, context, type, Callback(direction, context, type, value));\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Callback } from './callback.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n    if (!Guard.IsArray(value))\n        return value;\n    for (let i = 0; i < Math.min(type.items.length, value.length); i++) {\n        value[i] = FromType(direction, context, type.items[i], value[i]);\n    }\n    return Callback(direction, context, type, value);\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n    const exterior = Callback(direction, context, type, value);\n    if (!Guard.IsArray(exterior))\n        return value;\n    for (let i = 0; i < Math.min(type.items.length, exterior.length); i++) {\n        exterior[i] = FromType(direction, context, type.items[i], exterior[i]);\n    }\n    return exterior;\n}\nexport function FromTuple(direction, context, type, value) {\n    return Guard.IsEqual(direction, 'Decode')\n        ? Decode(direction, context, type, value)\n        : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Guard } from '../../guard/index.mjs';\nimport { Callback } from './callback.mjs';\nimport { FromType } from './from_type.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Check } from '../check/index.mjs';\n// ------------------------------------------------------------------\n// Decode\n// ------------------------------------------------------------------\nfunction Decode(direction, context, type, value) {\n    for (const schema of type.anyOf) {\n        if (!Check(context, schema, value))\n            continue;\n        const variant = FromType(direction, context, schema, value);\n        return Callback(direction, context, type, variant);\n    }\n    return value;\n}\n// ------------------------------------------------------------------\n// Encode\n// ------------------------------------------------------------------\nfunction Encode(direction, context, type, value) {\n    const exterior = Callback(direction, context, type, value);\n    for (const schema of type.anyOf) {\n        const variant = FromType(direction, context, schema, Clone(exterior));\n        if (!Check(context, schema, variant))\n            continue;\n        return variant;\n    }\n    return exterior;\n}\n// ------------------------------------------------------------------\n// FromUnion\n// ------------------------------------------------------------------\nexport function FromUnion(direction, context, type, value) {\n    return Guard.IsEqual(direction, 'Decode')\n        ? Decode(direction, context, type, value)\n        : Encode(direction, context, type, value);\n}\n","// deno-fmt-ignore-file\nimport * as Type from '../../type/index.mjs';\nimport { FromArray } from './from_array.mjs';\nimport { FromCyclic } from './from_cyclic.mjs';\nimport { FromIntersect } from './from_intersect.mjs';\nimport { FromObject } from './from_object.mjs';\nimport { FromRecord } from './from_record.mjs';\nimport { FromRef } from './from_ref.mjs';\nimport { FromTuple } from './from_tuple.mjs';\nimport { FromUnion } from './from_union.mjs';\nimport { Callback } from './callback.mjs';\nexport function FromType(direction, context, type, value) {\n    return (Type.IsArray(type) ? FromArray(direction, context, type, value) :\n        Type.IsCyclic(type) ? FromCyclic(direction, context, type, value) :\n            Type.IsIntersect(type) ? FromIntersect(direction, context, type, value) :\n                Type.IsObject(type) ? FromObject(direction, context, type, value) :\n                    Type.IsRecord(type) ? FromRecord(direction, context, type, value) :\n                        Type.IsRef(type) ? FromRef(direction, context, type, value) :\n                            Type.IsTuple(type) ? FromTuple(direction, context, type, value) :\n                                Type.IsUnion(type) ? FromUnion(direction, context, type, value) :\n                                    Callback(direction, context, type, value));\n}\n","// deno-fmt-ignore-file\nimport { Arguments, Settings } from '../../system/index.mjs';\nimport { AssertError } from '../assert/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\nimport { Clean } from '../clean/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Convert } from '../convert/index.mjs';\nimport { Default } from '../default/index.mjs';\nimport { Pipeline } from '../pipeline/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { UnionPrioritySort } from '../shared/union_priority_sort.mjs';\n// ------------------------------------------------------------------\n// Assert\n// ------------------------------------------------------------------\nexport class DecodeError extends AssertError {\n    constructor(value, errors) {\n        super('Decode', value, errors);\n    }\n}\nfunction Assert(context, type, value) {\n    if (!Check(context, type, value))\n        throw new DecodeError(value, Errors(context, type, value));\n    return value;\n}\n// ------------------------------------------------------------------\n// DecodeUnsafe\n// ------------------------------------------------------------------\n/** Executes Decode callbacks only */\nexport function DecodeUnsafe(context, type, value) {\n    const sorted = Settings.Get().unionPrioritySort ? UnionPrioritySort(type) : type;\n    return FromType('Decode', context, sorted, value);\n}\n// ------------------------------------------------------------------\n// Decoder\n// ------------------------------------------------------------------\nconst Decoder = Pipeline([\n    (_context, _type, value) => Clone(value),\n    (context, type, value) => Default(context, type, value),\n    (context, type, value) => Convert(context, type, value),\n    (context, type, value) => Clean(context, type, value),\n    (context, type, value) => Assert(context, type, value),\n    (context, type, value) => DecodeUnsafe(context, type, value)\n]);\n/** Decodes a value with the given type. */\nexport function Decode(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value],\n    });\n    return Decoder(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { Arguments, Settings } from '../../system/index.mjs';\nimport { AssertError } from '../assert/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\nimport { Clean } from '../clean/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Convert } from '../convert/index.mjs';\nimport { Default } from '../default/index.mjs';\nimport { Pipeline } from '../pipeline/index.mjs';\nimport { FromType } from './from_type.mjs';\nimport { UnionPrioritySort } from '../shared/union_priority_sort.mjs';\n// ------------------------------------------------------------------\n// Assert\n// ------------------------------------------------------------------\nexport class EncodeError extends AssertError {\n    constructor(value, errors) {\n        super('Encode', value, errors);\n    }\n}\nfunction Assert(context, type, value) {\n    if (!Check(context, type, value))\n        throw new EncodeError(value, Errors(context, type, value));\n    return value;\n}\n// ------------------------------------------------------------------\n// EncodeUnsafe\n// ------------------------------------------------------------------\n/** Executes Encode callbacks only */\nexport function EncodeUnsafe(context, type, value) {\n    const sorted = Settings.Get().unionPrioritySort ? UnionPrioritySort(type) : type;\n    return FromType('Encode', context, sorted, value);\n}\n// ------------------------------------------------------------------\n// Encoder\n// ------------------------------------------------------------------\nconst Encoder = Pipeline([\n    (_context, _type, value) => Clone(value),\n    (context, type, value) => EncodeUnsafe(context, type, value),\n    (context, type, value) => Default(context, type, value),\n    (context, type, value) => Convert(context, type, value),\n    (context, type, value) => Clean(context, type, value),\n    (context, type, value) => Assert(context, type, value),\n]);\n/** Encodes a value with the given type. */\nexport function Encode(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value],\n    });\n    return Encoder(context, type, value);\n}\n","// deno-fmt-ignore-file\nimport { EnableParseErrors, DisableParseErrors } from '../../system/settings/internal.mjs';\nimport { Arguments, Settings } from '../../system/index.mjs';\nimport { AssertError } from '../assert/index.mjs';\nimport { Check } from '../check/index.mjs';\nimport { Errors } from '../errors/index.mjs';\nimport { Clean } from '../clean/index.mjs';\nimport { Clone } from '../clone/index.mjs';\nimport { Convert } from '../convert/index.mjs';\nimport { Default } from '../default/index.mjs';\nimport { Pipeline } from '../pipeline/index.mjs';\n// ------------------------------------------------------------------\n// Assert\n// ------------------------------------------------------------------\nexport class ParseError extends AssertError {\n    constructor(value, errors) {\n        super('Parse', value, errors);\n    }\n}\nfunction Assert(context, type, value) {\n    EnableParseErrors();\n    const errors = Errors(context, type, value);\n    DisableParseErrors();\n    if (!Check(context, type, value))\n        throw new ParseError(value, errors);\n    return value;\n}\n// ------------------------------------------------------------------\n// Parser\n// ------------------------------------------------------------------\nexport const Parser = Pipeline([\n    (_context, _type, value) => Clone(value),\n    (context, type, value) => Default(context, type, value),\n    (context, type, value) => Convert(context, type, value),\n    (context, type, value) => Clean(context, type, value),\n    (context, type, value) => Assert(context, type, value)\n]);\n/**  Parses a value with the given type. */\nexport function Parse(...args) {\n    const [context, type, value] = Arguments.Match(args, {\n        3: (context, type, value) => [context, type, value],\n        2: (type, value) => [{}, type, value],\n    });\n    const checked = Check(context, type, value);\n    if (checked)\n        return value;\n    if (Settings.Get().correctiveParse)\n        return Parser(context, type, value);\n    EnableParseErrors();\n    const errors = Errors(context, type, value);\n    DisableParseErrors();\n    throw new ParseError(value, errors);\n}\n","// deno-fmt-ignore-file\nimport * as T from '../../type/index.mjs';\nexport const Insert = T.Object({\n    type: T.Literal('insert'),\n    path: T.String(),\n    value: T.Unknown(),\n});\nexport const Update = Object({\n    type: T.Literal('update'),\n    path: T.String(),\n    value: T.Unknown(),\n});\nexport const Delete = T.Object({\n    type: T.Literal('delete'),\n    path: T.String(),\n});\nexport const Edit = T.Union([Insert, Update, Delete]);\n","import { defineServiceContract } from \"./serverScope.mjs\";\nimport { Type } from \"typebox\";\nimport { Check, Errors } from \"typebox/value\";\n//#region src/schemas/help.ts\n/** Provider-owned Cordis service for the live Help catalog. */\nconst PO_HELP_SERVICE = \"po/help\";\nconst PO_HELP_WHEN = {\n\tstate: { \"minor-mode\": \"help\" },\n\tattribution: {\n\t\tkind: \"minor\",\n\t\tmode: \"help\"\n\t}\n};\nconst PO_PACKAGE_HEALTH_SERVICE = \"po/package-health\";\nconst PO_PACKAGE_HEALTH_CONTRACT = defineServiceContract(PO_PACKAGE_HEALTH_SERVICE, { scope: \"global\" });\n/** The host's package health, or undefined when this host keeps none (edge, tests). */\nfunction readPoPackageHealth(context) {\n\treturn context.get(PO_PACKAGE_HEALTH_SERVICE);\n}\nconst PO_SELF_IMPROVE_SERVICE = \"po/self-improve\";\nconst PO_SELF_IMPROVE_CONTRACT = defineServiceContract(PO_SELF_IMPROVE_SERVICE, { scope: \"global\" });\n/** The host's self-improve service, or undefined where the host binds none (edge, tests). */\nfunction readPoSelfImprove(context) {\n\treturn context.get(PO_SELF_IMPROVE_SERVICE);\n}\nconst PO_HELP_MAX_CONTRIBUTORS = 32;\nconst PO_HELP_MAX_SKILLS = 64;\nconst PO_HELP_MAX_DIAGNOSTICS = 64;\nconst PO_HELP_MAX_DESCRIPTION_LENGTH = 512;\nconst PO_HELP_MAX_DIAGNOSTIC_LENGTH = 512;\nconst MAX_SOURCE_LENGTH = 128;\nconst MAX_SKILL_NAME_LENGTH = 64;\nconst MAX_MODULE_URL_LENGTH = 4096;\nconst MAX_IDENTIFIER_LENGTH = 256;\nconst PO_HELP_ERROR_CODE = {\n\tcontributorLimit: \"HELP_CONTRIBUTOR_LIMIT\",\n\tdisposed: \"HELP_DISPOSED\",\n\tduplicateSkill: \"HELP_DUPLICATE_SKILL\",\n\tinactiveSnapshot: \"HELP_INACTIVE_SNAPSHOT\",\n\tinvalidContribution: \"HELP_INVALID_CONTRIBUTION\",\n\tinvalidGeneration: \"HELP_INVALID_GENERATION\",\n\tinvalidSnapshot: \"HELP_INVALID_SNAPSHOT\"\n};\nvar PoHelpError = class extends Error {\n\tcode;\n\tconstructor(code, message) {\n\t\tsuper(message);\n\t\tthis.name = \"PoHelpError\";\n\t\tthis.code = code;\n\t}\n};\nconst PoHelpSourceSchema = Type.String({\n\tminLength: 1,\n\tmaxLength: MAX_SOURCE_LENGTH,\n\tpattern: \"^[A-Za-z0-9@][A-Za-z0-9@/._:-]*$\"\n});\nconst PoHelpSkillNameSchema = Type.String({\n\tminLength: 1,\n\tmaxLength: MAX_SKILL_NAME_LENGTH,\n\tpattern: \"^[a-z0-9][a-z0-9-]*$\"\n});\nconst PoHelpSkillDescriptorSchema = Type.Object({\n\tname: PoHelpSkillNameSchema,\n\tdescription: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: 512\n\t})\n}, { additionalProperties: false });\nconst PoHelpContributionSchema = Type.Object({\n\tsource: PoHelpSourceSchema,\n\tmoduleUrl: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: MAX_MODULE_URL_LENGTH\n\t}),\n\tskills: Type.Array(PoHelpSkillDescriptorSchema, {\n\t\tminItems: 1,\n\t\tmaxItems: 64\n\t})\n}, { additionalProperties: false });\nconst GenerationSchema = Type.String({\n\tminLength: 1,\n\tmaxLength: MAX_IDENTIFIER_LENGTH\n});\nconst PoHelpActivationSchema = Type.Union([\n\tType.Literal(\"inactive\"),\n\tType.Literal(\"activating\"),\n\tType.Literal(\"active\"),\n\tType.Literal(\"degraded\")\n]);\nconst PoHelpSkillSchema = Type.Object({\n\tsource: PoHelpSourceSchema,\n\tname: PoHelpSkillNameSchema,\n\tdescription: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: 512\n\t}),\n\tfilePath: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: MAX_MODULE_URL_LENGTH\n\t}),\n\tbaseDir: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: MAX_MODULE_URL_LENGTH\n\t})\n}, { additionalProperties: false });\nconst PoHelpDiagnosticSchema = Type.Object({\n\tsource: Type.Optional(PoHelpSourceSchema),\n\tcode: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: 64,\n\t\tpattern: \"^[A-Z0-9_]+$\"\n\t}),\n\tmessage: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: 512\n\t})\n}, { additionalProperties: false });\nconst PoHelpSnapshotSchema = Type.Object({\n\thostGeneration: GenerationSchema,\n\trevision: Type.Integer({ minimum: 0 }),\n\tactivation: PoHelpActivationSchema,\n\tskills: Type.Array(PoHelpSkillSchema, { maxItems: 64 }),\n\tdiagnostics: Type.Array(PoHelpDiagnosticSchema, { maxItems: 64 })\n}, { additionalProperties: false });\nfunction schemaFailure(schema, value) {\n\tconst [first] = Errors(schema, value);\n\treturn first ? ` at ${first.instancePath || \"/\"}: ${first.message}` : \"\";\n}\nfunction cloneContribution(contribution) {\n\treturn {\n\t\tsource: contribution.source,\n\t\tmoduleUrl: contribution.moduleUrl,\n\t\tskills: contribution.skills.map((skill) => ({ ...skill }))\n\t};\n}\nfunction cloneSnapshot(snapshot) {\n\treturn {\n\t\t...snapshot,\n\t\tskills: snapshot.skills.map((skill) => ({ ...skill })),\n\t\tdiagnostics: snapshot.diagnostics.map((diagnostic) => ({ ...diagnostic }))\n\t};\n}\nfunction validateContribution(contribution) {\n\tif (!Check(PoHelpContributionSchema, contribution)) throw new PoHelpError(PO_HELP_ERROR_CODE.invalidContribution, `Invalid Help contribution${schemaFailure(PoHelpContributionSchema, contribution)}.`);\n\tconst names = /* @__PURE__ */ new Set();\n\tfor (const skill of contribution.skills) {\n\t\tif (names.has(skill.name)) throw new PoHelpError(PO_HELP_ERROR_CODE.duplicateSkill, `Help contribution '${contribution.source}' declares duplicate skill '${skill.name}'.`);\n\t\tnames.add(skill.name);\n\t}\n\treturn cloneContribution(contribution);\n}\n/** Creates the provider-owned Help service value for one Cordis session. */\nfunction createPoHelpService(generation) {\n\tif (!Check(GenerationSchema, generation)) throw new PoHelpError(PO_HELP_ERROR_CODE.invalidGeneration, \"Po Help requires a valid generation.\");\n\tconst contributions = /* @__PURE__ */ new Map();\n\tconst contributionListeners = /* @__PURE__ */ new Set();\n\tconst snapshotListeners = /* @__PURE__ */ new Set();\n\tlet registrationSequence = 0;\n\tlet disposed = false;\n\tlet skillInventory;\n\tlet snapshot = {\n\t\thostGeneration: generation,\n\t\trevision: 0,\n\t\tactivation: \"inactive\",\n\t\tskills: [],\n\t\tdiagnostics: []\n\t};\n\tconst ensureActive = () => {\n\t\tif (disposed) throw new PoHelpError(PO_HELP_ERROR_CODE.disposed, \"The Po Help service is disposed.\");\n\t};\n\tconst list = () => [...contributions.values()].map(({ contribution }) => cloneContribution(contribution)).sort((left, right) => left.source.localeCompare(right.source));\n\tconst notifyContributions = () => {\n\t\tconst value = list();\n\t\tfor (const listener of contributionListeners) listener(value);\n\t};\n\treturn Object.freeze({\n\t\tgeneration,\n\t\tregister(contribution) {\n\t\t\tensureActive();\n\t\t\tconst validated = validateContribution(contribution);\n\t\t\tif (!contributions.has(validated.source) && contributions.size >= 32) throw new PoHelpError(PO_HELP_ERROR_CODE.contributorLimit, `Help accepts at most 32 contributors.`);\n\t\t\tregistrationSequence += 1;\n\t\t\tconst token = Symbol(validated.source);\n\t\t\tconst registrationGeneration = `${generation}:help:${registrationSequence}`;\n\t\t\tcontributions.set(validated.source, {\n\t\t\t\ttoken,\n\t\t\t\tgeneration: registrationGeneration,\n\t\t\t\tcontribution: validated\n\t\t\t});\n\t\t\tnotifyContributions();\n\t\t\tlet registrationDisposed = false;\n\t\t\treturn Object.freeze({\n\t\t\t\tsource: validated.source,\n\t\t\t\tgeneration: registrationGeneration,\n\t\t\t\tdispose() {\n\t\t\t\t\tif (registrationDisposed) return;\n\t\t\t\t\tregistrationDisposed = true;\n\t\t\t\t\tif (contributions.get(validated.source)?.token !== token) return;\n\t\t\t\t\tcontributions.delete(validated.source);\n\t\t\t\t\tnotifyContributions();\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tlistContributions: list,\n\t\tsubscribeContributions(listener) {\n\t\t\tensureActive();\n\t\t\tcontributionListeners.add(listener);\n\t\t\treturn () => contributionListeners.delete(listener);\n\t\t},\n\t\tgetSnapshot: () => cloneSnapshot(snapshot),\n\t\tpublish(draft) {\n\t\t\tensureActive();\n\t\t\tif (draft.activation === \"inactive\" && draft.skills.length > 0) throw new PoHelpError(PO_HELP_ERROR_CODE.inactiveSnapshot, \"Inactive Help snapshots cannot expose skills.\");\n\t\t\tconst next = {\n\t\t\t\thostGeneration: generation,\n\t\t\t\trevision: snapshot.revision + 1,\n\t\t\t\tactivation: draft.activation,\n\t\t\t\tskills: draft.skills.map((skill) => ({ ...skill })),\n\t\t\t\tdiagnostics: draft.diagnostics.map((diagnostic) => ({ ...diagnostic }))\n\t\t\t};\n\t\t\tif (!Check(PoHelpSnapshotSchema, next)) throw new PoHelpError(PO_HELP_ERROR_CODE.invalidSnapshot, `Invalid Help snapshot${schemaFailure(PoHelpSnapshotSchema, next)}.`);\n\t\t\tsnapshot = next;\n\t\t\tconst published = cloneSnapshot(snapshot);\n\t\t\tfor (const listener of snapshotListeners) listener(cloneSnapshot(published));\n\t\t\treturn published;\n\t\t},\n\t\tsubscribeSnapshot(listener) {\n\t\t\tensureActive();\n\t\t\tsnapshotListeners.add(listener);\n\t\t\treturn () => snapshotListeners.delete(listener);\n\t\t},\n\t\tbindSkillInventory(read) {\n\t\t\tensureActive();\n\t\t\tconst token = Symbol(\"help-skill-inventory\");\n\t\t\tskillInventory = {\n\t\t\t\ttoken,\n\t\t\t\tread\n\t\t\t};\n\t\t\treturn () => {\n\t\t\t\tif (skillInventory?.token === token) skillInventory = void 0;\n\t\t\t};\n\t\t},\n\t\tasync inspectSkills() {\n\t\t\tif (disposed) return void 0;\n\t\t\tif (snapshot.activation === \"inactive\") return [];\n\t\t\tconst reader = skillInventory;\n\t\t\tif (!reader) return void 0;\n\t\t\tconst revision = snapshot.revision;\n\t\t\tconst paths = await reader.read();\n\t\t\tif (disposed || reader !== skillInventory || revision !== snapshot.revision || paths === void 0) return void 0;\n\t\t\tconst accepted = new Set(paths);\n\t\t\treturn snapshot.skills.filter((skill) => accepted.has(skill.filePath)).map((skill) => ({ ...skill }));\n\t\t},\n\t\tdispose() {\n\t\t\tif (disposed) return;\n\t\t\tdisposed = true;\n\t\t\tskillInventory = void 0;\n\t\t\tcontributions.clear();\n\t\t\tcontributionListeners.clear();\n\t\t\tsnapshotListeners.clear();\n\t\t}\n\t});\n}\nfunction readPoHelpService(context) {\n\treturn context.get(PO_HELP_SERVICE);\n}\nfunction requirePoHelpService(context) {\n\tconst service = readPoHelpService(context);\n\tif (!service) throw new Error(\"Po Help is unavailable. Load @agimon-ai/po-help.\");\n\treturn service;\n}\n//#endregion\nexport { PO_HELP_ERROR_CODE, PO_HELP_MAX_CONTRIBUTORS, PO_HELP_MAX_DESCRIPTION_LENGTH, PO_HELP_MAX_DIAGNOSTICS, PO_HELP_MAX_DIAGNOSTIC_LENGTH, PO_HELP_MAX_SKILLS, PO_HELP_SERVICE, PO_HELP_WHEN, PO_PACKAGE_HEALTH_CONTRACT, PO_PACKAGE_HEALTH_SERVICE, PO_SELF_IMPROVE_CONTRACT, PO_SELF_IMPROVE_SERVICE, PoHelpActivationSchema, PoHelpContributionSchema, PoHelpDiagnosticSchema, PoHelpError, PoHelpSkillDescriptorSchema, PoHelpSkillNameSchema, PoHelpSkillSchema, PoHelpSnapshotSchema, PoHelpSourceSchema, createPoHelpService, readPoHelpService, readPoPackageHealth, readPoSelfImprove, requirePoHelpService };\n\n//# sourceMappingURL=help.mjs.map","import { a as globalPoConfigDirectory } from \"./core-BOyti7Xw.mjs\";\nimport \"./config-C-dgx_54.mjs\";\nimport { n as readPoConfigSources, t as readPoConfigSourcesAsync } from \"./layeredConfig-DMXpx0Rh.mjs\";\nimport path from \"node:path\";\nimport { getOrThrow, nodeHost } from \"@agimon-ai/po-core/platform\";\nimport crypto from \"node:crypto\";\nimport fs from \"node:fs\";\nconst CACHE_DIRECTORY = \"plugin-cache\";\nconst PLUGIN_ID_SEGMENT = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;\nconst NPM_PACKAGE_NAME = /^(?:@[a-z0-9][a-z0-9._-]*\\/)?[a-z0-9][a-z0-9._-]*$/;\nconst LEGACY_PLUGIN_MANIFEST_PATHS = [\n\t\".codex-plugin/plugin.json\",\n\t\".claude-plugin/plugin.json\",\n\t\".cursor-plugin/plugin.json\"\n];\nconst MARKETPLACE_MANIFEST_RELATIVE_PATHS = [\n\t\".agents/plugins/marketplace.json\",\n\t\".agents/plugins/api_marketplace.json\",\n\t\".claude-plugin/marketplace.json\",\n\t\".cursor-plugin/marketplace.json\"\n];\nfunction isRecord$1(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction requireRecord$1(value, label) {\n\tif (!isRecord$1(value)) throw new Error(`${label} must be an object`);\n\treturn value;\n}\nfunction optionalString$1(value, label) {\n\tif (value === void 0) return void 0;\n\tif (typeof value !== \"string\" || !value.trim()) throw new Error(`${label} must be a non-empty string`);\n\treturn value.trim();\n}\nfunction requireString$1(value, label) {\n\tconst result = optionalString$1(value, label);\n\tif (!result) throw new Error(`${label} must be a non-empty string`);\n\treturn result;\n}\nfunction assertOnlyKeys$1(record, allowed, label) {\n\tconst unexpected = Object.keys(record).filter((key) => !allowed.includes(key));\n\tif (unexpected.length > 0) throw new Error(`${label} contains unsupported field \"${unexpected[0]}\"`);\n}\nfunction validatePluginIdSegment(value, label) {\n\tif (!PLUGIN_ID_SEGMENT.test(value)) throw new Error(`${label} must start with an alphanumeric character and contain only alphanumerics, ., _, or -`);\n}\nfunction validatePluginId(value, label) {\n\tconst segments = value.split(\"@\");\n\tif (segments.length > 2 || segments.some((segment) => !PLUGIN_ID_SEGMENT.test(segment))) throw new Error(`${label} must be a plugin name or plugin@marketplace identifier`);\n}\nfunction normalizeRemoteSubdirectory(value, label) {\n\tconst raw = optionalString$1(value, label);\n\tif (!raw) return void 0;\n\tconst normalized = raw.replaceAll(\"\\\\\", \"/\").replace(/^\\.\\//, \"\");\n\tif (normalized.startsWith(\"/\") || normalized.split(\"/\").some((segment) => segment === \"\" || segment === \".\" || segment === \"..\")) throw new Error(`${label} must stay within the remote repository root`);\n\treturn normalized;\n}\nfunction normalizeGitUrl(value, baseDirectory, label) {\n\tconst url = requireString$1(value, label);\n\tif (/^(?:https?|ssh|file):\\/\\//.test(url) || /^git@[^:]+:.+/.test(url) || path.isAbsolute(url)) return url;\n\tif (url.startsWith(\"./\") || url.startsWith(\".\\\\\")) {\n\t\tconst relative = url.replaceAll(\"\\\\\", \"/\").slice(2);\n\t\tif (!relative || relative.split(\"/\").some((segment) => segment === \"\" || segment === \".\" || segment === \"..\")) throw new Error(`${label} must stay within its declaring root`);\n\t\treturn path.resolve(baseDirectory, relative);\n\t}\n\tif (/^[A-Za-z0-9_.-]+\\/[A-Za-z0-9_.-]+(?:\\.git)?$/.test(url)) return `https://github.com/${url.endsWith(\".git\") ? url : `${url}.git`}`;\n\tthrow new Error(`${label} is not a supported Git URL`);\n}\nfunction resolveMarketplaceLocalPath(rawPath, marketplace, label) {\n\tif (rawPath === \".\" || rawPath === \"./\") return marketplace.root;\n\tconst cursorMarketplace = marketplace.manifestPath.endsWith(\".cursor-plugin/marketplace.json\");\n\tconst relative = rawPath.startsWith(\"./\") ? rawPath.slice(2) : cursorMarketplace ? rawPath : void 0;\n\tif (!relative) throw new Error(`${label} must start with ./`);\n\tconst normalized = relative.replaceAll(\"\\\\\", \"/\");\n\tif (normalized.split(\"/\").some((segment) => segment === \"\" || segment === \".\" || segment === \"..\")) throw new Error(`${label} must stay within the marketplace root`);\n\treturn path.resolve(marketplace.root, normalized);\n}\nfunction parseSourceObject(value, baseDirectory, label, marketplace) {\n\tconst sourceType = requireString$1(value.source, `${label}.source`);\n\tif (sourceType === \"local\") {\n\t\tassertOnlyKeys$1(value, [\n\t\t\t\"source\",\n\t\t\t\"path\",\n\t\t\t\"description\"\n\t\t], label);\n\t\tconst rawPath = requireString$1(value.path, `${label}.path`);\n\t\treturn {\n\t\t\ttype: \"local\",\n\t\t\tpath: marketplace ? resolveMarketplaceLocalPath(rawPath, marketplace, `${label}.path`) : path.resolve(baseDirectory, rawPath)\n\t\t};\n\t}\n\tif (sourceType === \"url\" || sourceType === \"git-subdir\") {\n\t\tassertOnlyKeys$1(value, [\n\t\t\t\"source\",\n\t\t\t\"url\",\n\t\t\t\"path\",\n\t\t\t\"ref\",\n\t\t\t\"sha\",\n\t\t\t\"description\"\n\t\t], label);\n\t\tconst remotePath = normalizeRemoteSubdirectory(value.path, `${label}.path`);\n\t\tif (sourceType === \"git-subdir\" && !remotePath) throw new Error(`${label}.path must be a non-empty string for git-subdir sources`);\n\t\tconst ref = optionalString$1(value.ref, `${label}.ref`);\n\t\tconst sha = optionalString$1(value.sha, `${label}.sha`);\n\t\treturn {\n\t\t\ttype: \"git\",\n\t\t\turl: normalizeGitUrl(value.url, marketplace?.root ?? baseDirectory, `${label}.url`),\n\t\t\t...remotePath ? { path: remotePath } : {},\n\t\t\t...ref ? { ref } : {},\n\t\t\t...sha ? { sha } : {}\n\t\t};\n\t}\n\tif (sourceType === \"npm\") {\n\t\tassertOnlyKeys$1(value, [\n\t\t\t\"source\",\n\t\t\t\"package\",\n\t\t\t\"version\",\n\t\t\t\"registry\",\n\t\t\t\"description\"\n\t\t], label);\n\t\tconst packageName = requireString$1(value.package, `${label}.package`);\n\t\tif (!NPM_PACKAGE_NAME.test(packageName)) throw new Error(`${label}.package must be a valid npm package name`);\n\t\tconst version = optionalString$1(value.version, `${label}.version`);\n\t\tconst registry = optionalString$1(value.registry, `${label}.registry`);\n\t\treturn {\n\t\t\ttype: \"npm\",\n\t\t\tpackage: packageName,\n\t\t\t...version ? { version } : {},\n\t\t\t...registry ? { registry } : {}\n\t\t};\n\t}\n\tthrow new Error(`${label}.source must be local, url, git-subdir, or npm`);\n}\nfunction parsePluginSource(value, baseDirectory, label, marketplace) {\n\tif (typeof value === \"string\") {\n\t\tconst rawPath = requireString$1(value, label);\n\t\treturn {\n\t\t\ttype: \"local\",\n\t\t\tpath: marketplace ? resolveMarketplaceLocalPath(rawPath, marketplace, label) : path.resolve(baseDirectory, rawPath)\n\t\t};\n\t}\n\treturn parseSourceObject(requireRecord$1(value, label), baseDirectory, label, marketplace);\n}\nfunction parseConfiguredEntry(value, baseDirectory, label) {\n\tif (typeof value === \"string\") return { source: parsePluginSource(value, baseDirectory, label) };\n\tconst record = requireRecord$1(value, label);\n\tconst description = optionalString$1(record.description, `${label}.description`);\n\tif (record.source === void 0 && typeof record.path === \"string\") {\n\t\tassertOnlyKeys$1(record, [\"path\", \"description\"], label);\n\t\treturn {\n\t\t\tsource: {\n\t\t\t\ttype: \"local\",\n\t\t\t\tpath: path.resolve(baseDirectory, requireString$1(record.path, `${label}.path`))\n\t\t\t},\n\t\t\t...description ? { description } : {}\n\t\t};\n\t}\n\tif (typeof record.source === \"string\" && ![\n\t\t\"local\",\n\t\t\"url\",\n\t\t\"git-subdir\",\n\t\t\"npm\"\n\t].includes(record.source)) {\n\t\tassertOnlyKeys$1(record, [\"source\", \"description\"], label);\n\t\treturn {\n\t\t\tsource: parsePluginSource(record.source, baseDirectory, `${label}.source`),\n\t\t\t...description ? { description } : {}\n\t\t};\n\t}\n\tif (isRecord$1(record.source)) {\n\t\tassertOnlyKeys$1(record, [\"source\", \"description\"], label);\n\t\treturn {\n\t\t\tsource: parsePluginSource(record.source, baseDirectory, `${label}.source`),\n\t\t\t...description ? { description } : {}\n\t\t};\n\t}\n\treturn {\n\t\tsource: parseSourceObject(record, baseDirectory, label),\n\t\t...description ? { description } : {}\n\t};\n}\nfunction marketplaceRootFromManifest(manifestPath) {\n\tconst normalized = path.resolve(manifestPath);\n\tfor (const relativePath of MARKETPLACE_MANIFEST_RELATIVE_PATHS) {\n\t\tconst suffix = path.normalize(relativePath);\n\t\tif (!normalized.endsWith(suffix)) continue;\n\t\tlet root = normalized;\n\t\tfor (const _segment of relativePath.split(\"/\")) root = path.dirname(root);\n\t\treturn root;\n\t}\n}\nfunction parseJsonRecord(text, filePath, label) {\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(text);\n\t} catch (error) {\n\t\tthrow new Error(`${label} at ${filePath} is invalid JSON: ${error instanceof Error ? error.message : String(error)}`);\n\t}\n\treturn requireRecord$1(parsed, `${label} at ${filePath}`);\n}\n/** True when a root plugin.json opts into the Agent Plugins schema, which outranks legacy manifests. */\nfunction isAgentPluginRootManifest(text) {\n\tconst parsed = JSON.parse(text);\n\treturn (isRecord$1(parsed) && typeof parsed.$schema === \"string\" ? parsed.$schema : void 0)?.startsWith(\"https://agent-plugins.org/schemas/\") ?? false;\n}\nfunction manifestMetadataFromRecord(manifestPath, manifest) {\n\tconst schema = optionalString$1(manifest.$schema, `${manifestPath}.$schema`);\n\tconst name = optionalString$1(manifest.name, `${manifestPath}.name`);\n\tconst version = optionalString$1(manifest.version, `${manifestPath}.version`);\n\tconst description = optionalString$1(manifest.description, `${manifestPath}.description`);\n\treturn {\n\t\tpath: manifestPath,\n\t\t...name ? { name } : {},\n\t\t...version ? { version } : {},\n\t\t...description ? { description } : {},\n\t\t...schema?.startsWith(\"https://agent-plugins.org/schemas/\") ? { agentPluginSchema: schema } : {}\n\t};\n}\n/** Entry for a discovered plugin root, or undefined after recording why its name is invalid. */\nfunction discoveredPluginEntry(pluginRoot, manifest, diagnostics) {\n\tconst name = manifest.name ?? path.basename(pluginRoot);\n\ttry {\n\t\tvalidatePluginIdSegment(name, `Plugin name in ${manifest.path}`);\n\t} catch (error) {\n\t\tdiagnostics.push(error instanceof Error ? error.message : String(error));\n\t\treturn;\n\t}\n\treturn {\n\t\tname,\n\t\tentry: {\n\t\t\tsource: {\n\t\t\t\ttype: \"local\",\n\t\t\t\tpath: pluginRoot\n\t\t\t},\n\t\t\t...manifest.description ? { description: manifest.description } : {},\n\t\t\tmanifest\n\t\t}\n\t};\n}\nfunction parseMarketplaceDocument(marketplace, document) {\n\tconst name = requireString$1(document.name, `${marketplace.manifestPath}.name`);\n\tvalidatePluginIdSegment(name, `${marketplace.manifestPath}.name`);\n\tif (!Array.isArray(document.plugins)) throw new Error(`${marketplace.manifestPath}.plugins must be an array`);\n\treturn {\n\t\tname,\n\t\tplugins: document.plugins\n\t};\n}\n/** One marketplace plugin, or undefined when an earlier entry already claimed its id. Throws on invalid input. */\nfunction parseMarketplacePlugin(marketplace, document, index, entries) {\n\tconst label = `${marketplace.manifestPath}.plugins[${index}]`;\n\tconst plugin = requireRecord$1(document.plugins[index], label);\n\tconst pluginName = requireString$1(plugin.name, `${label}.name`);\n\tvalidatePluginIdSegment(pluginName, `${label}.name`);\n\tconst id = `${pluginName}@${document.name}`;\n\tif (Object.hasOwn(entries, id)) return void 0;\n\tconst source = parsePluginSource(plugin.source, marketplace.root, `${label}.source`, marketplace);\n\tconst description = optionalString$1(plugin.description, `${label}.description`);\n\treturn {\n\t\tid,\n\t\tsource,\n\t\t...description ? { description } : {}\n\t};\n}\nfunction catalogEntry(source, description, manifest, marketplace) {\n\tconst resolvedDescription = description ?? manifest?.description;\n\treturn {\n\t\tsource,\n\t\t...marketplace ? { marketplace } : {},\n\t\t...resolvedDescription ? { description: resolvedDescription } : {},\n\t\t...manifest ? { manifest } : {}\n\t};\n}\nfunction parseConfiguredRoots(source) {\n\tif (source.value === void 0) return [];\n\tconst document = requireRecord$1(source.value, `plugins in ${source.filePath}`);\n\tassertOnlyKeys$1(document, [\"roots\", \"entries\"], `plugins in ${source.filePath}`);\n\tif (document.roots === void 0) return [];\n\tif (!Array.isArray(document.roots)) throw new Error(`plugins.roots in ${source.filePath} must be an array`);\n\treturn document.roots.map((root, index) => path.resolve(source.baseDirectory, requireString$1(root, `plugins.roots[${index}] in ${source.filePath}`)));\n}\n/** Validates the configured `plugins.entries` of one source. Throws on the first invalid entry. */\nfunction parseConfiguredEntries(source) {\n\tif (source.value === void 0) return [];\n\tconst document = requireRecord$1(source.value, `plugins in ${source.filePath}`);\n\tif (document.entries === void 0) return [];\n\tconst configuredEntries = requireRecord$1(document.entries, `plugins.entries in ${source.filePath}`);\n\treturn Object.entries(configuredEntries).map(([name, value]) => {\n\t\tvalidatePluginId(name, `Plugin entry \"${name}\" in ${source.filePath}`);\n\t\treturn {\n\t\t\tname,\n\t\t\t...parseConfiguredEntry(value, source.baseDirectory, `plugins.entries.${name} in ${source.filePath}`)\n\t\t};\n\t});\n}\nfunction pluginDirectoryForSource(source, homePoDirectory) {\n\tif (source.type === \"local\") return source.path;\n\tconst identity = source.type === \"git\" ? [\n\t\t\"git\",\n\t\tsource.url,\n\t\tsource.path ?? \"\",\n\t\tsource.ref ?? \"\",\n\t\tsource.sha ?? \"\"\n\t] : [\n\t\t\"npm\",\n\t\tsource.package,\n\t\tsource.version ?? \"\",\n\t\tsource.registry ?? \"\"\n\t];\n\tconst digest = crypto.createHash(\"sha256\").update(JSON.stringify(identity)).digest(\"hex\");\n\treturn path.join(homePoDirectory, CACHE_DIRECTORY, digest);\n}\nfunction isRemotePluginSource(source) {\n\treturn source.type !== \"local\";\n}\n//#endregion\n//#region src/services/pluginCatalog/sync.ts\nfunction isFile$1(filePath) {\n\treturn fs.existsSync(filePath) && fs.statSync(filePath).isFile();\n}\nfunction findMarketplace$1(rootOrManifest) {\n\tif (isFile$1(rootOrManifest)) {\n\t\tconst root = marketplaceRootFromManifest(rootOrManifest);\n\t\treturn root ? {\n\t\t\tmanifestPath: path.resolve(rootOrManifest),\n\t\t\troot\n\t\t} : void 0;\n\t}\n\tfor (const relativePath of MARKETPLACE_MANIFEST_RELATIVE_PATHS) {\n\t\tconst manifestPath = path.join(rootOrManifest, relativePath);\n\t\tif (isFile$1(manifestPath)) return {\n\t\t\tmanifestPath: path.resolve(manifestPath),\n\t\t\troot: path.resolve(rootOrManifest)\n\t\t};\n\t}\n}\n/**\n* Matches Codex manifest precedence, including schema-gated root plugin.json.\n* @deprecated Node-only sync shim; use findPluginManifestPathAsync. Removed in M2.\n*/\nfunction findPluginManifestPath(pluginRoot) {\n\tconst rootManifest = path.join(pluginRoot, \"plugin.json\");\n\ttry {\n\t\tconst metadata = fs.lstatSync(rootManifest);\n\t\tif (metadata.isSymbolicLink() || !metadata.isFile()) return void 0;\n\t\tif (isAgentPluginRootManifest(fs.readFileSync(rootManifest, \"utf8\"))) return rootManifest;\n\t} catch {}\n\treturn LEGACY_PLUGIN_MANIFEST_PATHS.map((relativePath) => path.join(pluginRoot, relativePath)).find(isFile$1);\n}\nfunction readPluginManifestMetadata$1(pluginRoot, diagnostics) {\n\tconst manifestPath = findPluginManifestPath(pluginRoot);\n\tif (!manifestPath) return void 0;\n\ttry {\n\t\treturn manifestMetadataFromRecord(manifestPath, parseJsonRecord(fs.readFileSync(manifestPath, \"utf8\"), manifestPath, \"Plugin manifest\"));\n\t} catch (error) {\n\t\tdiagnostics.push(error instanceof Error ? error.message : String(error));\n\t\treturn { path: manifestPath };\n\t}\n}\nfunction discoverPluginRoot$1(pluginRoot, entries, diagnostics) {\n\tconst diagnosticCount = diagnostics.length;\n\tconst manifest = readPluginManifestMetadata$1(pluginRoot, diagnostics);\n\tif (!manifest || diagnostics.length !== diagnosticCount) return false;\n\tconst discovered = discoveredPluginEntry(pluginRoot, manifest, diagnostics);\n\tif (!discovered) return false;\n\tentries[discovered.name] = discovered.entry;\n\treturn true;\n}\nfunction discoverPluginFolder$1(root, entries, diagnostics) {\n\tif (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) return 0;\n\tif (findPluginManifestPath(root)) return discoverPluginRoot$1(root, entries, diagnostics) ? 1 : 0;\n\tlet discovered = 0;\n\tconst children = fs.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).sort((left, right) => left.name.localeCompare(right.name));\n\tfor (const child of children) if (discoverPluginRoot$1(path.join(root, child.name), entries, diagnostics)) discovered += 1;\n\treturn discovered;\n}\nfunction parseMarketplace$1(marketplace, entries, diagnostics) {\n\tconst document = parseMarketplaceDocument(marketplace, parseJsonRecord(fs.readFileSync(marketplace.manifestPath, \"utf8\"), marketplace.manifestPath, \"Marketplace manifest\"));\n\tfor (let index = 0; index < document.plugins.length; index += 1) try {\n\t\tconst plugin = parseMarketplacePlugin(marketplace, document, index, entries);\n\t\tif (!plugin) continue;\n\t\tconst manifest = plugin.source.type === \"local\" ? readPluginManifestMetadata$1(plugin.source.path, diagnostics) : void 0;\n\t\tentries[plugin.id] = catalogEntry(plugin.source, plugin.description, manifest, document.name);\n\t} catch (error) {\n\t\tdiagnostics.push(error instanceof Error ? error.message : String(error));\n\t}\n}\n/** @deprecated Node-only sync shim; use loadPluginCatalogAsync. Removed in M2. */\nfunction loadPluginCatalog(sources, repoRoot, homeDirectory) {\n\tconst diagnostics = [];\n\tconst entries = {};\n\tconst roots = [...new Set(sources.flatMap(parseConfiguredRoots))];\n\tconst candidates = [\n\t\thomeDirectory,\n\t\trepoRoot,\n\t\t...roots\n\t];\n\tconst marketplaces = [];\n\tconst seenMarketplaces = /* @__PURE__ */ new Set();\n\tfor (const candidate of candidates) {\n\t\tconst marketplace = findMarketplace$1(candidate);\n\t\tif (!marketplace) continue;\n\t\tif (seenMarketplaces.has(marketplace.manifestPath)) continue;\n\t\tseenMarketplaces.add(marketplace.manifestPath);\n\t\tmarketplaces.push(marketplace.manifestPath);\n\t\ttry {\n\t\t\tparseMarketplace$1(marketplace, entries, diagnostics);\n\t\t} catch (error) {\n\t\t\tdiagnostics.push(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\tfor (const root of roots) {\n\t\tif (findMarketplace$1(root)) continue;\n\t\tif (discoverPluginFolder$1(root, entries, diagnostics) === 0) diagnostics.push(`Plugin root contains neither a supported marketplace nor discoverable plugins: ${root}`);\n\t}\n\tfor (const source of sources) for (const parsed of parseConfiguredEntries(source)) {\n\t\tconst manifest = parsed.source.type === \"local\" ? readPluginManifestMetadata$1(parsed.source.path, diagnostics) : void 0;\n\t\tentries[parsed.name] = catalogEntry(parsed.source, parsed.description, manifest);\n\t}\n\treturn {\n\t\troots,\n\t\tmarketplaces,\n\t\tentries,\n\t\tdiagnostics\n\t};\n}\n//#endregion\n//#region src/services/pluginCatalog/index.ts\n/** Kind of the file a path names after following symbolic links, or undefined when nothing is there. */\nasync function resolvedKind(fs, filePath, context) {\n\tconst info = await fs.fileInfo(filePath, context);\n\tif (!info.ok) {\n\t\tif (info.error.code === \"not_found\") return void 0;\n\t\tthrow info.error;\n\t}\n\tif (info.value.kind !== \"symlink\") return info.value.kind;\n\tconst target = await fs.canonicalPath(filePath, context);\n\tif (!target.ok && target.error.code === \"not_found\") return void 0;\n\tconst targetInfo = await fs.fileInfo(getOrThrow(target), context);\n\tif (!targetInfo.ok && targetInfo.error.code === \"not_found\") return void 0;\n\treturn getOrThrow(targetInfo).kind;\n}\nasync function isFile(fs, filePath, context) {\n\treturn await resolvedKind(fs, filePath, context) === \"file\";\n}\nasync function findMarketplace(fs, rootOrManifest, context) {\n\tif (await isFile(fs, rootOrManifest, context)) {\n\t\tconst root = marketplaceRootFromManifest(rootOrManifest);\n\t\treturn root ? {\n\t\t\tmanifestPath: path.resolve(rootOrManifest),\n\t\t\troot\n\t\t} : void 0;\n\t}\n\tfor (const relativePath of MARKETPLACE_MANIFEST_RELATIVE_PATHS) {\n\t\tconst manifestPath = path.join(rootOrManifest, relativePath);\n\t\tif (await isFile(fs, manifestPath, context)) return {\n\t\t\tmanifestPath: path.resolve(manifestPath),\n\t\t\troot: path.resolve(rootOrManifest)\n\t\t};\n\t}\n}\nasync function readText(fs, filePath, context) {\n\treturn getOrThrow(await fs.readTextFile(filePath, context));\n}\n/** Matches Codex manifest precedence, including schema-gated root plugin.json. */\nasync function findPluginManifestPathAsync(fs, pluginRoot, context) {\n\tconst rootManifest = path.join(pluginRoot, \"plugin.json\");\n\ttry {\n\t\tif (getOrThrow(await fs.fileInfo(rootManifest, context)).kind !== \"file\") return void 0;\n\t\tif (isAgentPluginRootManifest(await readText(fs, rootManifest, context))) return rootManifest;\n\t} catch {}\n\tfor (const relativePath of LEGACY_PLUGIN_MANIFEST_PATHS) {\n\t\tconst manifestPath = path.join(pluginRoot, relativePath);\n\t\tif (await isFile(fs, manifestPath, context)) return manifestPath;\n\t}\n}\nasync function readPluginManifestMetadata(fs, pluginRoot, diagnostics, context) {\n\tconst manifestPath = await findPluginManifestPathAsync(fs, pluginRoot, context);\n\tif (!manifestPath) return void 0;\n\ttry {\n\t\treturn manifestMetadataFromRecord(manifestPath, parseJsonRecord(await readText(fs, manifestPath, context), manifestPath, \"Plugin manifest\"));\n\t} catch (error) {\n\t\tdiagnostics.push(error instanceof Error ? error.message : String(error));\n\t\treturn { path: manifestPath };\n\t}\n}\nasync function discoverPluginRoot(fs, pluginRoot, entries, diagnostics, context) {\n\tconst diagnosticCount = diagnostics.length;\n\tconst manifest = await readPluginManifestMetadata(fs, pluginRoot, diagnostics, context);\n\tif (!manifest || diagnostics.length !== diagnosticCount) return false;\n\tconst discovered = discoveredPluginEntry(pluginRoot, manifest, diagnostics);\n\tif (!discovered) return false;\n\tentries[discovered.name] = discovered.entry;\n\treturn true;\n}\nasync function discoverPluginFolder(fs, root, entries, diagnostics, context) {\n\tif (await resolvedKind(fs, root, context) !== \"directory\") return 0;\n\tif (await findPluginManifestPathAsync(fs, root, context)) return await discoverPluginRoot(fs, root, entries, diagnostics, context) ? 1 : 0;\n\tlet discovered = 0;\n\tconst children = getOrThrow(await fs.listDir(root, context)).filter((entry) => entry.kind === \"directory\").sort((left, right) => left.name.localeCompare(right.name));\n\tfor (const child of children) if (await discoverPluginRoot(fs, path.join(root, child.name), entries, diagnostics, context)) discovered += 1;\n\treturn discovered;\n}\nasync function parseMarketplace(fs, marketplace, entries, diagnostics, context) {\n\tconst document = parseMarketplaceDocument(marketplace, parseJsonRecord(await readText(fs, marketplace.manifestPath, context), marketplace.manifestPath, \"Marketplace manifest\"));\n\tfor (let index = 0; index < document.plugins.length; index += 1) try {\n\t\tconst plugin = parseMarketplacePlugin(marketplace, document, index, entries);\n\t\tif (!plugin) continue;\n\t\tconst manifest = plugin.source.type === \"local\" ? await readPluginManifestMetadata(fs, plugin.source.path, diagnostics, context) : void 0;\n\t\tentries[plugin.id] = catalogEntry(plugin.source, plugin.description, manifest, document.name);\n\t} catch (error) {\n\t\tdiagnostics.push(error instanceof Error ? error.message : String(error));\n\t}\n}\n/** Builds the plugin catalog from home, repo, and configured roots through the injected file system. */\nasync function loadPluginCatalogAsync(fs, sources, repoRoot, homeDirectory, context) {\n\tconst diagnostics = [];\n\tconst entries = {};\n\tconst roots = [...new Set(sources.flatMap(parseConfiguredRoots))];\n\tconst candidates = [\n\t\thomeDirectory,\n\t\trepoRoot,\n\t\t...roots\n\t];\n\tconst marketplaces = [];\n\tconst seenMarketplaces = /* @__PURE__ */ new Set();\n\tfor (const candidate of candidates) {\n\t\tconst marketplace = await findMarketplace(fs, candidate, context);\n\t\tif (!marketplace) continue;\n\t\tif (seenMarketplaces.has(marketplace.manifestPath)) continue;\n\t\tseenMarketplaces.add(marketplace.manifestPath);\n\t\tmarketplaces.push(marketplace.manifestPath);\n\t\ttry {\n\t\t\tawait parseMarketplace(fs, marketplace, entries, diagnostics, context);\n\t\t} catch (error) {\n\t\t\tdiagnostics.push(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\tfor (const root of roots) {\n\t\tif (await findMarketplace(fs, root, context)) continue;\n\t\tif (await discoverPluginFolder(fs, root, entries, diagnostics, context) === 0) diagnostics.push(`Plugin root contains neither a supported marketplace nor discoverable plugins: ${root}`);\n\t}\n\tfor (const source of sources) for (const parsed of parseConfiguredEntries(source)) {\n\t\tconst manifest = parsed.source.type === \"local\" ? await readPluginManifestMetadata(fs, parsed.source.path, diagnostics, context) : void 0;\n\t\tentries[parsed.name] = catalogEntry(parsed.source, parsed.description, manifest);\n\t}\n\treturn {\n\t\troots,\n\t\tmarketplaces,\n\t\tentries,\n\t\tdiagnostics\n\t};\n}\n//#endregion\n//#region src/services/domains/completion.ts\nconst NAME_DELIMITER = \",\";\n/** Splits comma-joined selections and expands aliases into concrete domain names. */\nfunction expandDomainNames(manifest, domainNames) {\n\treturn domainNames.flatMap((raw) => raw.split(NAME_DELIMITER).map((name) => name.trim()).filter(Boolean)).flatMap((name) => manifest.aliases[name] ?? [name]);\n}\nfunction domainCompletionPrefix(textBeforeCursor) {\n\treturn textBeforeCursor.match(/^\\/domains\\s+(?:[^\\s,]+,)*([^\\s,]*)$/)?.[1];\n}\nfunction domainCompletionItems(domainNames, query) {\n\tconst normalizedQuery = query.toLowerCase();\n\treturn domainNames.filter((name) => name.toLowerCase().startsWith(normalizedQuery)).map((name) => ({\n\t\tvalue: name,\n\t\tlabel: name\n\t}));\n}\n//#endregion\n//#region src/services/domains/core.ts\nconst DOMAINS_FILE = \"domains.yaml\";\nconst UNKNOWN_DOMAIN_ERROR = \"Unknown domain\";\nconst UNKNOWN_PLUGIN_ERROR = \"Unknown plugin\";\nconst MISSING_PLUGIN_DIRECTORY_ERROR = \"Plugin directory does not exist\";\nconst DEFAULT_DOMAINS_PATH = \".po/domains.yaml\";\nconst SUPPORTED_AGENT_PLUGIN_SCHEMA = \"https://agent-plugins.org/schemas/1.0.0/plugin.schema.json\";\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction requireRecord(value, label) {\n\tif (!isRecord(value)) throw new Error(`${label} must be an object`);\n\treturn value;\n}\nfunction assertOnlyKeys(record, allowed, label) {\n\tconst unexpected = Object.keys(record).filter((key) => !allowed.includes(key));\n\tif (unexpected.length > 0) throw new Error(`${label} contains unsupported field \"${unexpected[0]}\"`);\n}\nfunction requireString(value, label) {\n\tif (typeof value !== \"string\" || !value.trim()) throw new Error(`${label} must be a non-empty string`);\n\treturn value.trim();\n}\nfunction optionalString(value, label) {\n\tif (value === void 0) return void 0;\n\treturn requireString(value, label);\n}\nfunction parseStringArray(value, label) {\n\tif (!Array.isArray(value)) throw new Error(`${label} must be an array of non-empty strings`);\n\treturn [...new Set(value.map((entry, index) => requireString(entry, `${label}[${index}]`)))];\n}\nfunction parseOptionalBoolean(value, label) {\n\tif (value === void 0) return void 0;\n\tif (typeof value !== \"boolean\") throw new Error(`${label} must be a boolean`);\n\treturn value;\n}\nfunction parseDefaultDomains(value) {\n\treturn parseStringArray(value, `defaultDomains in ${DEFAULT_DOMAINS_PATH}`);\n}\nfunction parseDomainPlugin(value, label) {\n\tif (typeof value === \"string\") return requireString(value, label);\n\tconst plugin = requireRecord(value, label);\n\tassertOnlyKeys(plugin, [\n\t\t\"name\",\n\t\t\"skills\",\n\t\t\"agents\",\n\t\t\"hooks\",\n\t\t\"mcp\"\n\t], label);\n\tconst skills = plugin.skills === void 0 ? void 0 : parseStringArray(plugin.skills, `${label}.skills`);\n\tconst agents = plugin.agents === void 0 ? void 0 : parseStringArray(plugin.agents, `${label}.agents`);\n\tconst hooks = parseOptionalBoolean(plugin.hooks, `${label}.hooks`);\n\tconst mcp = parseOptionalBoolean(plugin.mcp, `${label}.mcp`);\n\treturn {\n\t\tname: requireString(plugin.name, `${label}.name`),\n\t\t...skills ? { skills } : {},\n\t\t...agents ? { agents } : {},\n\t\t...hooks === void 0 ? {} : { hooks },\n\t\t...mcp === void 0 ? {} : { mcp }\n\t};\n}\nfunction parseMcpAllowlist(value, label) {\n\tconst mcp = requireRecord(value, label);\n\tassertOnlyKeys(mcp, [\"servers\", \"proxy\"], label);\n\treturn {\n\t\t...mcp.servers === void 0 ? {} : { servers: parseStringArray(mcp.servers, `${label}.servers`) },\n\t\t...mcp.proxy === void 0 ? {} : { proxy: parseStringArray(mcp.proxy, `${label}.proxy`) }\n\t};\n}\nfunction parseDomain(value, label) {\n\tconst domain = requireRecord(value, label);\n\tassertOnlyKeys(domain, [\n\t\t\"description\",\n\t\t\"plugins\",\n\t\t\"mcp\",\n\t\t\"sharedSkills\"\n\t], label);\n\tconst description = optionalString(domain.description, `${label}.description`);\n\tif (domain.plugins !== void 0 && !Array.isArray(domain.plugins)) throw new Error(`${label}.plugins must be an array`);\n\tconst sharedSkills = parseOptionalBoolean(domain.sharedSkills, `${label}.sharedSkills`);\n\treturn {\n\t\t...description ? { description } : {},\n\t\t...Array.isArray(domain.plugins) ? { plugins: domain.plugins.map((plugin, index) => parseDomainPlugin(plugin, `${label}.plugins[${index}]`)) } : {},\n\t\t...domain.mcp === void 0 ? {} : { mcp: parseMcpAllowlist(domain.mcp, `${label}.mcp`) },\n\t\t...sharedSkills === void 0 ? {} : { sharedSkills }\n\t};\n}\nfunction parseAliases(value, label) {\n\tif (value === void 0) return {};\n\tconst aliases = requireRecord(value, label);\n\treturn Object.fromEntries(Object.entries(aliases).map(([name, domains]) => [name, parseStringArray(domains, `${label}.${name}`)]));\n}\n/**\n* Folds domain sources in precedence order.\n*\n* Named domains and explicit plugin entries are replaced by later repository\n* definitions. Configured roots accumulate, with exact marketplace manifests\n* deduplicated in discovery order. Explicit entries override discovered IDs.\n*/\nfunction summarizeDomainSources(sources) {\n\tconst aliases = {};\n\tconst domains = {};\n\tlet defaultDomains;\n\tfor (const source of sources) {\n\t\tconst document = requireRecord(source.document, source.filePath);\n\t\tassertOnlyKeys(document, [\n\t\t\t\"plugins\",\n\t\t\t\"domains\",\n\t\t\t\"aliases\",\n\t\t\t\"defaultDomains\"\n\t\t], source.filePath);\n\t\tObject.assign(aliases, parseAliases(document.aliases, `aliases in ${source.filePath}`));\n\t\tif (document.domains !== void 0) {\n\t\t\tconst sourceDomains = requireRecord(document.domains, `domains in ${source.filePath}`);\n\t\t\tfor (const [name, definition] of Object.entries(sourceDomains)) domains[name] = {\n\t\t\t\t...parseDomain(definition, `domains.${name} in ${source.filePath}`),\n\t\t\t\tbaseDirectory: source.baseDirectory\n\t\t\t};\n\t\t}\n\t\tif (Object.hasOwn(document, \"defaultDomains\")) defaultDomains = parseDefaultDomains(document.defaultDomains);\n\t}\n\tconst catalogSources = sources.map((source) => ({\n\t\tfilePath: source.filePath,\n\t\tbaseDirectory: source.baseDirectory,\n\t\tvalue: requireRecord(source.document, source.filePath).plugins\n\t}));\n\treturn {\n\t\taliases,\n\t\tdomains,\n\t\tdefaultDomains,\n\t\tcatalogSources\n\t};\n}\n/** Joins the summary with its plugin catalog and checks the default domains exist. */\nfunction completeDomainManifest(summary, plugins) {\n\tconst { aliases, domains, defaultDomains } = summary;\n\tif (defaultDomains) {\n\t\tfor (const name of expandDomainNames({\n\t\t\tplugins,\n\t\t\tdomains,\n\t\t\taliases\n\t\t}, defaultDomains)) if (!Object.hasOwn(domains, name)) throw new Error(`Unknown default domain \"${name}\" in ${DEFAULT_DOMAINS_PATH}`);\n\t}\n\treturn {\n\t\tplugins,\n\t\tdomains,\n\t\taliases,\n\t\t...defaultDomains ? { defaultDomains } : {}\n\t};\n}\nfunction domainNamesOf(manifest) {\n\treturn [.../* @__PURE__ */ new Set([...Object.keys(manifest.domains), ...Object.keys(manifest.aliases)])].sort();\n}\n/**\n* Whether to include .claude/skills as shared fallbacks.\n*\n* Shared skills are included unless every selected domain opts out, so mixing a\n* trimmed domain with an untrimmed one cannot strip the untrimmed one's skills.\n*/\nfunction sharedSkillsFor(manifest, domainNames) {\n\tconst expanded = expandDomainNames(manifest, domainNames);\n\tif (expanded.length === 0) return true;\n\treturn expanded.some((name) => manifest.domains[name]?.sharedSkills !== false);\n}\nfunction missingPluginDirectoryMessage(directory) {\n\treturn `${MISSING_PLUGIN_DIRECTORY_ERROR}: ${directory}`;\n}\n/** Plans named domain plugins, preserving each subset filter, then explicit directories. */\nfunction pluginEntrySteps(manifest, domainNames, explicitDirectories, homeDirectory) {\n\tconst steps = [];\n\tconst homePoDirectory = globalPoConfigDirectory(homeDirectory);\n\tfor (const domainName of expandDomainNames(manifest, domainNames)) {\n\t\tconst domain = manifest.domains[domainName];\n\t\tif (!domain) return [...steps, { error: `${UNKNOWN_DOMAIN_ERROR}: ${domainName}` }];\n\t\tfor (const selection of domain.plugins ?? []) {\n\t\t\tconst isSubset = typeof selection !== \"string\";\n\t\t\tconst pluginName = isSubset ? selection.name : selection;\n\t\t\tconst plugin = manifest.plugins.entries[pluginName];\n\t\t\tif (!plugin) return [...steps, { error: `${UNKNOWN_PLUGIN_ERROR} \"${pluginName}\" referenced by domain \"${domainName}\"` }];\n\t\t\tconst directory = pluginDirectoryForSource(plugin.source, homePoDirectory);\n\t\t\tsteps.push({\n\t\t\t\tmustBeDirectory: plugin.source.type === \"local\",\n\t\t\t\tentry: {\n\t\t\t\t\tname: pluginName,\n\t\t\t\t\tdirectory,\n\t\t\t\t\tdomain: domainName,\n\t\t\t\t\tsource: plugin.source,\n\t\t\t\t\t...plugin.manifest ? { manifest: plugin.manifest } : {},\n\t\t\t\t\t...plugin.manifest?.agentPluginSchema === SUPPORTED_AGENT_PLUGIN_SCHEMA ? { skillDiscovery: \"direct-children\" } : {},\n\t\t\t\t\t...isSubset && selection.skills ? { skills: selection.skills } : {},\n\t\t\t\t\t...isSubset && selection.agents ? { agents: selection.agents } : {},\n\t\t\t\t\t...isSubset && selection.hooks !== void 0 ? { hooks: selection.hooks } : {},\n\t\t\t\t\t...isSubset && selection.mcp !== void 0 ? { mcp: selection.mcp } : {}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tfor (const configuredDirectory of explicitDirectories) {\n\t\tconst directory = path.resolve(configuredDirectory);\n\t\tsteps.push({\n\t\t\tmustBeDirectory: true,\n\t\t\tentry: {\n\t\t\t\tname: path.basename(directory),\n\t\t\t\tdirectory,\n\t\t\t\tsource: {\n\t\t\t\t\ttype: \"local\",\n\t\t\t\t\tpath: directory\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\treturn steps;\n}\nconst PO_DOMAINS_ENV = \"PO_DOMAINS\";\nconst DEFAULT_DOMAIN = \"default\";\nconst MARKETING_MAJOR_MODE = \"marketing\";\nfunction parseDomainList(value) {\n\treturn value.split(\",\").map((entry) => entry.trim()).filter(Boolean);\n}\n/**\n* Domains selected when the caller names none.\n*\n* Configuration keeps this axis independent of the major mode. The\n* major-mode-derived choice is retained only as the compatibility fallback for\n* domains files that declare no defaultDomains.\n*/\nfunction defaultDomainsForMajorMode(majorMode, environment, defaultDomains) {\n\tconst inherited = environment[PO_DOMAINS_ENV];\n\tif (inherited !== void 0) return parseDomainList(inherited);\n\tif (defaultDomains !== void 0) return [...defaultDomains];\n\treturn parseDomainList(majorMode === MARKETING_MAJOR_MODE ? MARKETING_MAJOR_MODE : DEFAULT_DOMAIN);\n}\n//#endregion\n//#region src/services/domains/sync.ts\n/**\n* Reads domains and plugin catalogs from global and repository configs.\n*\n* @deprecated Node-only sync shim; use loadDomainsAsync. Removed in M2.\n*/\nfunction loadDomains(repoRoot, homeDirectory = nodeHost.homeDirectory()) {\n\tconst summary = summarizeDomainSources(readPoConfigSources(DOMAINS_FILE, repoRoot, homeDirectory));\n\treturn completeDomainManifest(summary, loadPluginCatalog(summary.catalogSources, repoRoot, homeDirectory));\n}\n/** @deprecated Node-only sync shim; use listDomainNamesAsync. Removed in M2. */\nfunction listDomainNames(repoRoot, homeDirectory) {\n\treturn domainNamesOf(loadDomains(repoRoot, homeDirectory));\n}\n/** @deprecated Node-only sync shim; use resolveSharedSkillsAsync. Removed in M2. */\nfunction resolveSharedSkills(repoRoot, domainNames, homeDirectory) {\n\treturn sharedSkillsFor(loadDomains(repoRoot, homeDirectory), domainNames);\n}\n/** @deprecated Node-only sync shim; use resolvePluginEntriesAsync. Removed in M2. */\nfunction resolvePluginEntries(repoRoot, domainNames, explicitDirectories, homeDirectory = nodeHost.homeDirectory()) {\n\tconst manifest = loadDomains(repoRoot, homeDirectory);\n\tconst entries = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const step of pluginEntrySteps(manifest, domainNames, explicitDirectories, homeDirectory)) {\n\t\tif (\"error\" in step) throw new Error(step.error);\n\t\tconst { directory } = step.entry;\n\t\tif (step.mustBeDirectory && (!fs.existsSync(directory) || !fs.statSync(directory).isDirectory())) throw new Error(missingPluginDirectoryMessage(directory));\n\t\tif (seen.has(directory)) continue;\n\t\tseen.add(directory);\n\t\tentries.push(step.entry);\n\t}\n\treturn entries;\n}\n/** @deprecated Node-only sync shim; use resolvePluginDirectoriesAsync. Removed in M2. */\nfunction resolvePluginDirectories(repoRoot, domainNames, explicitDirectories, homeDirectory) {\n\treturn resolvePluginEntries(repoRoot, domainNames, explicitDirectories, homeDirectory).map((entry) => entry.directory);\n}\n//#endregion\n//#region src/services/domains/index.ts\n/** Whether a path names a directory after following symbolic links. */\nasync function isDirectory(fs, filePath, context) {\n\tconst info = await fs.fileInfo(filePath, context);\n\tif (!info.ok) {\n\t\tif (info.error.code === \"not_found\") return false;\n\t\tthrow info.error;\n\t}\n\tif (info.value.kind !== \"symlink\") return info.value.kind === \"directory\";\n\tconst target = await fs.canonicalPath(filePath, context);\n\tif (!target.ok && target.error.code === \"not_found\") return false;\n\tconst targetInfo = await fs.fileInfo(getOrThrow(target), context);\n\tif (!targetInfo.ok && targetInfo.error.code === \"not_found\") return false;\n\treturn getOrThrow(targetInfo).kind === \"directory\";\n}\n/**\n* Reads domains and plugin catalogs from global and repository configs over a FileSystem.\n*\n* Named domains and explicit plugin entries are replaced by later repository\n* definitions. Configured roots accumulate, with exact marketplace manifests\n* deduplicated in discovery order. Explicit entries override discovered IDs.\n*/\nasync function loadDomainsAsync(fs, repoRoot, context, homeDirectory = nodeHost.homeDirectory()) {\n\tconst summary = summarizeDomainSources(await readPoConfigSourcesAsync(fs, DOMAINS_FILE, repoRoot, context, homeDirectory));\n\treturn completeDomainManifest(summary, await loadPluginCatalogAsync(fs, summary.catalogSources, repoRoot, homeDirectory, context));\n}\nasync function listDomainNamesAsync(fs, repoRoot, context, homeDirectory) {\n\treturn domainNamesOf(await loadDomainsAsync(fs, repoRoot, context, homeDirectory));\n}\n/**\n* Whether to include .claude/skills as shared fallbacks.\n*\n* Shared skills are included unless every selected domain opts out, so mixing a\n* trimmed domain with an untrimmed one cannot strip the untrimmed one's skills.\n*/\nasync function resolveSharedSkillsAsync(fs, repoRoot, domainNames, context, homeDirectory) {\n\treturn sharedSkillsFor(await loadDomainsAsync(fs, repoRoot, context, homeDirectory), domainNames);\n}\n/** Resolves named domain plugins while preserving each subset filter. */\nasync function resolvePluginEntriesAsync(fs, repoRoot, domainNames, explicitDirectories, context, homeDirectory = nodeHost.homeDirectory()) {\n\tconst manifest = await loadDomainsAsync(fs, repoRoot, context, homeDirectory);\n\tconst entries = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const step of pluginEntrySteps(manifest, domainNames, explicitDirectories, homeDirectory)) {\n\t\tif (\"error\" in step) throw new Error(step.error);\n\t\tconst { directory } = step.entry;\n\t\tif (step.mustBeDirectory && !await isDirectory(fs, directory, context)) throw new Error(missingPluginDirectoryMessage(directory));\n\t\tif (seen.has(directory)) continue;\n\t\tseen.add(directory);\n\t\tentries.push(step.entry);\n\t}\n\treturn entries;\n}\nasync function resolvePluginDirectoriesAsync(fs, repoRoot, domainNames, explicitDirectories, context, homeDirectory) {\n\treturn (await resolvePluginEntriesAsync(fs, repoRoot, domainNames, explicitDirectories, context, homeDirectory)).map((entry) => entry.directory);\n}\n//#endregion\nexport { findPluginManifestPathAsync as _, resolveSharedSkillsAsync as a, isRemotePluginSource as b, resolvePluginDirectories as c, DEFAULT_DOMAIN as d, PO_DOMAINS_ENV as f, expandDomainNames as g, domainCompletionPrefix as h, resolvePluginEntriesAsync as i, resolvePluginEntries as l, domainCompletionItems as m, loadDomainsAsync as n, listDomainNames as o, defaultDomainsForMajorMode as p, resolvePluginDirectoriesAsync as r, loadDomains as s, listDomainNamesAsync as t, resolveSharedSkills as u, findPluginManifestPath as v, pluginDirectoryForSource as x, MARKETPLACE_MANIFEST_RELATIVE_PATHS as y };\n\n//# sourceMappingURL=domains-DYqoL3VY.mjs.map","export { PO_PROFILE_IDENTITY_ENTRY_TYPE, PROFILE_ICON_MAX_DATA_URL_LENGTH, PROFILE_ICON_MIME_TYPES, ProfileIdentityProjectionSchema } from \"./src/schemas/profileIdentity.mjs\";\n","import { n as readPoConfigSources, t as readPoConfigSourcesAsync } from \"./layeredConfig-DMXpx0Rh.mjs\";\nimport path from \"node:path\";\nimport { getOrThrow, nodeHost, readTextIfExists } from \"@agimon-ai/po-core/platform\";\nimport fs from \"node:fs\";\nimport { parse } from \"yaml\";\nimport os from \"node:os\";\nimport { Buffer as Buffer$1 } from \"node:buffer\";\nimport { PROFILE_ICON_MAX_DATA_URL_LENGTH } from \"@agimon-ai/po-core/profileIdentity\";\n//#region src/services/personaFrontMatter/index.ts\n/**\n* Optional identity a persona declares at the top of its `profile.md`.\n*\n* A profile used to be prompt text only, so there was nowhere to say who the\n* persona is or how it should sound. Front-matter puts that beside the persona\n* text it describes, which is the only place that works for both explicit\n* `profiles.yaml` entries and folders found by root discovery.\n*\n* Recognition is deliberately narrow. Personas that exist today were written\n* without any of this, and one of them may legitimately open with a horizontal\n* rule, so a leading fence alone is not enough to claim the block. A block is\n* only treated as identity when it is fenced at the very first line, closed,\n* parses as a mapping, and declares at least one field this contract owns.\n* Anything else is passed through byte for byte.\n*/\nconst FENCE = \"---\";\nconst OWNED_KEYS = [\n\t\"name\",\n\t\"icon\",\n\t\"voice\"\n];\nfunction isRecord$1(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction readVoice(value) {\n\tif (!isRecord$1(value)) return void 0;\n\tconst voice = typeof value.voice === \"string\" && value.voice.trim().length > 0 ? value.voice.trim() : void 0;\n\tconst rate = typeof value.rate === \"number\" && Number.isFinite(value.rate) ? value.rate : void 0;\n\tif (voice === void 0 && rate === void 0) return void 0;\n\treturn {\n\t\t...voice === void 0 ? {} : { voice },\n\t\t...rate === void 0 ? {} : { rate }\n\t};\n}\nfunction readFrontMatter(parsed) {\n\tconst name = typeof parsed.name === \"string\" && parsed.name.trim().length > 0 ? parsed.name.trim() : void 0;\n\tconst icon = typeof parsed.icon === \"string\" && parsed.icon.trim().length > 0 ? parsed.icon.trim() : void 0;\n\tconst voice = readVoice(parsed.voice);\n\tif (name === void 0 && icon === void 0 && voice === void 0) return void 0;\n\treturn {\n\t\t...name === void 0 ? {} : { name },\n\t\t...icon === void 0 ? {} : { icon },\n\t\t...voice === void 0 ? {} : { voice }\n\t};\n}\n/**\n* Splits a recognised identity block off a persona document.\n*\n* Never throws: a malformed avatar must not make a persona unloadable, so an\n* unparseable or unrecognised block leaves the document exactly as it arrived.\n*/\nfunction parsePersonaFrontMatter(content) {\n\tconst lines = content.split(\"\\n\");\n\tif (lines[0]?.trimEnd() !== FENCE) return { body: content };\n\tconst closingIndex = lines.findIndex((line, index) => index > 0 && line.trimEnd() === FENCE);\n\tif (closingIndex === -1) return { body: content };\n\tlet parsed;\n\ttry {\n\t\tparsed = parse(lines.slice(1, closingIndex).join(\"\\n\"));\n\t} catch {\n\t\treturn { body: content };\n\t}\n\tif (!isRecord$1(parsed)) return { body: content };\n\tif (!OWNED_KEYS.some((key) => Object.hasOwn(parsed, key))) return { body: content };\n\tconst frontMatter = readFrontMatter(parsed);\n\tif (!frontMatter) return { body: content };\n\treturn {\n\t\tfrontMatter,\n\t\tbody: lines.slice(closingIndex + 1).join(\"\\n\")\n\t};\n}\n//#endregion\n//#region src/services/personaIcon/core.ts\n/**\n* Pure half of persona icon loading: confinement and image sniffing. The\n* readers in `index.ts` (async, over a FileSystem) and `sync.ts` (Node shim)\n* only resolve paths and fetch bytes.\n*/\nconst PARENT_DIRECTORY$1 = \"..\";\n/**\n* Magic-byte signatures, checked instead of trusting the filename.\n*\n* `image/svg+xml` is absent on purpose: an SVG rendered same-origin executes\n* script, and the author of this path is whoever wrote the persona. Do not add\n* it to match the cockpit's broader media catalog.\n*/\nconst SIGNATURES = [\n\t{\n\t\tmime: \"image/png\",\n\t\ttest: (b) => b.length > 8 && b.subarray(0, 8).equals(Buffer$1.from([\n\t\t\t137,\n\t\t\t80,\n\t\t\t78,\n\t\t\t71,\n\t\t\t13,\n\t\t\t10,\n\t\t\t26,\n\t\t\t10\n\t\t]))\n\t},\n\t{\n\t\tmime: \"image/jpeg\",\n\t\ttest: (b) => b.length > 3 && b[0] === 255 && b[1] === 216 && b[2] === 255\n\t},\n\t{\n\t\tmime: \"image/gif\",\n\t\ttest: (b) => b.length > 6 && b.subarray(0, 6).toString(\"latin1\").startsWith(\"GIF8\")\n\t},\n\t{\n\t\tmime: \"image/webp\",\n\t\ttest: (b) => b.length > 12 && b.subarray(0, 4).toString(\"latin1\") === \"RIFF\" && b.subarray(8, 12).toString(\"latin1\") === \"WEBP\"\n\t}\n];\n/** True when `realIconPath` lies inside `realPersonaPath` (both already canonical). */\nfunction isInsidePersona(realPersonaPath, realIconPath) {\n\tconst relative = path.relative(realPersonaPath, realIconPath);\n\treturn !(relative === PARENT_DIRECTORY$1 || relative.startsWith(`${PARENT_DIRECTORY$1}${path.sep}`) || path.isAbsolute(relative));\n}\n/** A bounded `data:` URL for an allowed image, or undefined. */\nfunction iconDataUrl(content) {\n\tconst bytes = Buffer$1.from(content.buffer, content.byteOffset, content.byteLength);\n\tconst mime = SIGNATURES.find((signature) => signature.test(bytes))?.mime;\n\tif (!mime) return void 0;\n\tconst dataUrl = `data:${mime};base64,${bytes.toString(\"base64\")}`;\n\treturn dataUrl.length > PROFILE_ICON_MAX_DATA_URL_LENGTH ? void 0 : dataUrl;\n}\n//#endregion\n//#region src/services/personaIcon/sync.ts\n/**\n* Resolves an icon declared in persona front-matter, or undefined when it is\n* missing, unreadable, not an allowed image, escapes the persona directory, or\n* exceeds the data-URL ceiling.\n*\n* @deprecated Node-only sync shim; use readPersonaIconAsync. Removed in M2.\n*/\nfunction readPersonaIcon(personaPath, iconRelative) {\n\tif (path.isAbsolute(iconRelative)) return void 0;\n\ttry {\n\t\tconst realPersonaPath = fs.realpathSync(personaPath);\n\t\tconst iconPath = path.resolve(realPersonaPath, iconRelative);\n\t\tif (!fs.existsSync(iconPath)) return void 0;\n\t\tconst realIconPath = fs.realpathSync(iconPath);\n\t\tif (!isInsidePersona(realPersonaPath, realIconPath)) return void 0;\n\t\tif (!fs.statSync(realIconPath).isFile()) return void 0;\n\t\treturn iconDataUrl(fs.readFileSync(realIconPath));\n\t} catch {\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/services/personaIcon/index.ts\n/**\n* Reads a persona icon into a bounded `data:` URL.\n*\n* The icon travels inside the journalled identity entry rather than through an\n* HTTP route. A route would leave a request-time filesystem resolution reachable\n* from the browser for the life of a session, defended on every request forever;\n* this resolves the path once, server side, at the moment the profile loads.\n*\n* The path comes from user-authored front-matter, so it is confined the same way\n* `buildPersonaPrompt` confines persona files: a symlink must not read outside\n* the persona directory.\n*\n* Every failure is silent and returns undefined. An avatar is decoration, and a\n* broken one must never stop a persona from loading. That includes a host whose\n* filesystem lacks the persona entirely, such as the edge.\n*/\nasync function readPersonaIconAsync(fs, personaPath, iconRelative, context) {\n\tif (path.isAbsolute(iconRelative)) return void 0;\n\ttry {\n\t\tconst realPersonaPath = getOrThrow(await fs.canonicalPath(personaPath, context));\n\t\tconst iconPath = path.resolve(realPersonaPath, iconRelative);\n\t\tif (!getOrThrow(await fs.exists(iconPath, context))) return void 0;\n\t\tconst realIconPath = getOrThrow(await fs.canonicalPath(iconPath, context));\n\t\tif (!isInsidePersona(realPersonaPath, realIconPath)) return void 0;\n\t\tif (getOrThrow(await fs.fileInfo(realIconPath, context)).kind !== \"file\") return void 0;\n\t\treturn iconDataUrl(getOrThrow(await fs.readBinaryFile(realIconPath, context)));\n\t} catch {\n\t\treturn;\n\t}\n}\n//#endregion\n//#region src/services/profileBinding/index.ts\nconst BINDING_KEYS = /* @__PURE__ */ new Set([\n\t\"provider\",\n\t\"organizationId\",\n\t\"mailboxId\",\n\t\"credentialRef\",\n\t\"secrets\",\n\t\"browser\"\n]);\nconst SECRET_KEYS = /* @__PURE__ */ new Set([\n\t\"credentialId\",\n\t\"field\",\n\t\"purposes\",\n\t\"allowedOrigins\"\n]);\nconst BROWSER_KEYS = /* @__PURE__ */ new Set([\n\t\"profileName\",\n\t\"allowedOrigins\",\n\t\"mode\",\n\t\"proxySecret\"\n]);\nconst PURPOSES = /* @__PURE__ */ new Set([\n\t\"browser\",\n\t\"proxy\",\n\t\"env\"\n]);\nconst BROWSER_MODES = /* @__PURE__ */ new Set([\n\t\"playwright\",\n\t\"extension\",\n\t\"stealth\"\n]);\nconst ALIAS_PATTERN = /^[A-Z][A-Z0-9_]{0,63}$/;\nconst FIELD_PATTERN = /^(?:[A-Za-z][A-Za-z0-9_.-]{0,63}|profileSecret:[A-Z][A-Z0-9_]{0,63})$/;\nconst BROWSER_PROFILE_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;\nfunction record(value, location, keys) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw new Error(`${location} must be a mapping`);\n\tif (keys && Object.keys(value).some((key) => !keys.has(key))) throw new Error(`${location} contains unsupported metadata`);\n\treturn value;\n}\nfunction reference(value, location) {\n\tif (typeof value !== \"string\" || value.length === 0 || value.length > 256 || /\\s/.test(value)) throw new Error(`${location} must be a non-empty reference without whitespace`);\n\treturn value;\n}\nfunction origins(value, location) {\n\tif (!Array.isArray(value) || value.length === 0) throw new Error(`${location} must contain exact HTTP(S) origins`);\n\tconst result = value.map((entry) => {\n\t\tif (typeof entry !== \"string\") throw new Error(`${location} must contain exact HTTP(S) origins`);\n\t\tlet url;\n\t\ttry {\n\t\t\turl = new URL(entry);\n\t\t} catch {\n\t\t\tthrow new Error(`${location} must contain exact HTTP(S) origins`);\n\t\t}\n\t\tif (url.protocol !== \"https:\" && url.protocol !== \"http:\" || url.origin !== entry || url.username || url.password) throw new Error(`${location} must contain exact HTTP(S) origins`);\n\t\treturn entry;\n\t});\n\treturn Object.freeze([...new Set(result)]);\n}\nfunction purposes(value, location) {\n\tif (value === void 0) return Object.freeze([\"browser\"]);\n\tif (!Array.isArray(value) || value.length === 0 || value.some((entry) => typeof entry !== \"string\" || !PURPOSES.has(entry)) || new Set(value).size !== value.length) throw new Error(`${location} must list distinct purposes: browser, proxy or env`);\n\treturn Object.freeze([...value]);\n}\nfunction browser(value, location) {\n\tconst entry = record(value, location, BROWSER_KEYS);\n\tif (typeof entry.profileName !== \"string\" || !BROWSER_PROFILE_PATTERN.test(entry.profileName)) throw new Error(`${location}.profileName must be a safe browser profile name`);\n\tif (entry.mode !== void 0 && (typeof entry.mode !== \"string\" || !BROWSER_MODES.has(entry.mode))) throw new Error(`${location}.mode must be playwright, extension or stealth`);\n\tif (entry.proxySecret !== void 0 && (typeof entry.proxySecret !== \"string\" || !ALIAS_PATTERN.test(entry.proxySecret))) throw new Error(`${location}.proxySecret must be an uppercase alias name`);\n\treturn Object.freeze({\n\t\tprofileName: entry.profileName,\n\t\tallowedOrigins: origins(entry.allowedOrigins, `${location}.allowedOrigins`),\n\t\t...entry.mode === void 0 ? {} : { mode: entry.mode },\n\t\t...entry.proxySecret === void 0 ? {} : { proxySecret: entry.proxySecret }\n\t});\n}\n/** Validates and deeply freezes a detached metadata snapshot. No provider SDK or secret is loaded. */\nfunction parseProfileBinding(value, location = \"Profile integration\") {\n\tconst entry = record(value, location, BINDING_KEYS);\n\tconst sourceSecrets = record(entry.secrets, `${location}.secrets`);\n\tconst secrets = {};\n\tfor (const [alias, value] of Object.entries(sourceSecrets)) {\n\t\tif (!ALIAS_PATTERN.test(alias)) throw new Error(`${location}.secrets requires uppercase alias names`);\n\t\tconst secret = record(value, `${location}.secrets.${alias}`, SECRET_KEYS);\n\t\tif (typeof secret.field !== \"string\" || !FIELD_PATTERN.test(secret.field)) throw new Error(`${location}.secrets.${alias}.field must be a credential field name`);\n\t\tconst secretPurposes = purposes(secret.purposes, `${location}.secrets.${alias}.purposes`);\n\t\tconst forBrowser = secretPurposes.includes(\"browser\");\n\t\tconst emptyOrigins = Array.isArray(secret.allowedOrigins) && secret.allowedOrigins.length === 0;\n\t\tif (!forBrowser && secret.allowedOrigins !== void 0 && !emptyOrigins) throw new Error(`${location}.secrets.${alias}.allowedOrigins requires the browser purpose`);\n\t\tsecrets[alias] = Object.freeze({\n\t\t\tcredentialId: reference(secret.credentialId, `${location}.secrets.${alias}.credentialId`),\n\t\t\tfield: secret.field,\n\t\t\tpurposes: secretPurposes,\n\t\t\tallowedOrigins: forBrowser ? origins(secret.allowedOrigins, `${location}.secrets.${alias}.allowedOrigins`) : Object.freeze([])\n\t\t});\n\t}\n\tconst browserBinding = entry.browser === void 0 ? void 0 : browser(entry.browser, `${location}.browser`);\n\tif (browserBinding && Object.values(secrets).some((secret) => secret.allowedOrigins.some((origin) => !browserBinding.allowedOrigins.includes(origin)))) throw new Error(`${location} secret origins must be included in browser.allowedOrigins`);\n\tif (browserBinding?.proxySecret !== void 0 && !secrets[browserBinding.proxySecret]?.purposes.includes(\"proxy\")) throw new Error(`${location}.browser.proxySecret must name a proxy-purpose secret`);\n\treturn Object.freeze({\n\t\tprovider: reference(entry.provider, `${location}.provider`),\n\t\torganizationId: reference(entry.organizationId, `${location}.organizationId`),\n\t\tmailboxId: reference(entry.mailboxId, `${location}.mailboxId`),\n\t\tcredentialRef: reference(entry.credentialRef, `${location}.credentialRef`),\n\t\tsecrets: Object.freeze(secrets),\n\t\t...browserBinding === void 0 ? {} : { browser: browserBinding }\n\t});\n}\n//#endregion\n//#region src/services/profiles/core.ts\n/** Files that make up one repository persona, concatenated in this order. */\nconst PERSONA_FILES = [\n\t\"profile.md\",\n\t\"SOUL.md\",\n\t\"AGENTS.md\"\n];\n/** The persona file that may carry an identity block; the others are prose only. */\nconst PERSONA_IDENTITY_FILE = \"profile.md\";\nconst PROFILE_KEYS = /* @__PURE__ */ new Set([\n\t\"persona\",\n\t\"env\",\n\t\"integration\"\n]);\nconst PROFILE_CATALOG_KEYS = /* @__PURE__ */ new Set([\n\t\"roots\",\n\t\"entries\",\n\t\"defaultProfile\"\n]);\nconst SIDECAR_KEYS = /* @__PURE__ */ new Set([\n\t\"version\",\n\t\"env\",\n\t\"integration\"\n]);\nconst SIDECAR_VERSION = 1;\nconst SIDECAR_MAX_BYTES = 65536;\nconst PROFILES_FILE = \"profiles.yaml\";\n/** Optional nonsecret sidecar beside a discovered persona, validated like an explicit entry. */\nconst PROFILE_SIDECAR_FILE = \"profile.yaml\";\nconst PROFILES_ROOT_KEY = \"profiles\";\nconst AGENTS_DIRECTORY = \"agents\";\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isPathInside(root, candidate) {\n\tconst relative = path.relative(root, candidate);\n\treturn relative === \"\" || !path.isAbsolute(relative) && relative !== \"..\" && !relative.startsWith(`..${path.sep}`);\n}\nfunction parseEnvironment(name, value) {\n\tif (value === void 0) return {};\n\tif (!isRecord(value)) throw new Error(`Profile \"${name}\" env must be a string mapping`);\n\tconst environment = {};\n\tfor (const [key, entry] of Object.entries(value)) {\n\t\tif (typeof entry !== \"string\") throw new Error(`Profile \"${name}\" env.${key} must be a string`);\n\t\tif (entry.includes(\"${secret.\") || entry.includes(\"${secrets.\")) throw new Error(`Profile \"${name}\" env cannot contain secret aliases`);\n\t\tenvironment[key] = entry;\n\t}\n\treturn environment;\n}\n/** Strict v1 sidecar parse. YAML errors are reported generically so source text never reaches a diagnostic. */\nfunction parseProfileSidecar(name, text) {\n\tif (Buffer.byteLength(text) > SIDECAR_MAX_BYTES) throw new Error(`Profile \"${name}\" ${PROFILE_SIDECAR_FILE} is too large`);\n\tlet document;\n\ttry {\n\t\tdocument = parse(text);\n\t} catch {\n\t\tthrow new Error(`Profile \"${name}\" ${PROFILE_SIDECAR_FILE} is not valid YAML`);\n\t}\n\tif (!isRecord(document)) throw new Error(`Profile \"${name}\" ${PROFILE_SIDECAR_FILE} must be a mapping`);\n\tif (Object.keys(document).some((key) => !SIDECAR_KEYS.has(key))) throw new Error(`Profile \"${name}\" ${PROFILE_SIDECAR_FILE} may only set version, env and integration`);\n\tif (document.version !== SIDECAR_VERSION) throw new Error(`Profile \"${name}\" ${PROFILE_SIDECAR_FILE} must declare version: ${SIDECAR_VERSION}`);\n\treturn {\n\t\tenv: parseEnvironment(name, document.env),\n\t\t...document.integration === void 0 ? {} : { integration: parseProfileBinding(document.integration, `Profile \"${name}\" integration`) }\n\t};\n}\nfunction sidecarDiagnostic(filePath, profile, error) {\n\treturn {\n\t\tfilePath,\n\t\tprofile,\n\t\tmessage: error instanceof Error ? error.message : `Profile \"${profile}\" is invalid`\n\t};\n}\nfunction parseProfileRoots(value, filePath, baseDirectory) {\n\tif (value === void 0) return [];\n\tif (!Array.isArray(value)) throw new Error(`profiles.roots in ${filePath} must be an array`);\n\treturn value.map((entry, index) => {\n\t\tif (typeof entry !== \"string\" || entry.trim().length === 0) throw new Error(`profiles.roots[${index}] in ${filePath} must be a non-empty string`);\n\t\treturn path.resolve(baseDirectory, entry.trim());\n\t});\n}\nfunction parseProfileLayer(source) {\n\tif (!isRecord(source.document) || !isRecord(source.document[PROFILES_ROOT_KEY])) throw new Error(`${source.filePath} must contain a profiles mapping`);\n\tconst unsupportedDocumentKeys = Object.keys(source.document).filter((key) => key !== PROFILES_ROOT_KEY);\n\tif (unsupportedDocumentKeys.length > 0) throw new Error(`${source.filePath} may only contain profiles; unsupported: ${unsupportedDocumentKeys.join(\", \")}`);\n\tconst profiles = source.document[PROFILES_ROOT_KEY];\n\tif (!(Object.hasOwn(profiles, \"roots\") || Object.hasOwn(profiles, \"entries\"))) return {\n\t\tfilePath: source.filePath,\n\t\tbaseDirectory: source.baseDirectory,\n\t\troots: [],\n\t\tentries: profiles\n\t};\n\tconst unsupportedCatalogKeys = Object.keys(profiles).filter((key) => !PROFILE_CATALOG_KEYS.has(key));\n\tif (unsupportedCatalogKeys.length > 0) throw new Error(`profiles in ${source.filePath} may only contain roots, entries and defaultProfile; unsupported: ${unsupportedCatalogKeys.join(\", \")}`);\n\tif (profiles.defaultProfile !== void 0 && (typeof profiles.defaultProfile !== \"string\" || profiles.defaultProfile.trim().length === 0)) throw new Error(`profiles.defaultProfile in ${source.filePath} must be a non-empty string`);\n\tif (profiles.entries !== void 0 && !isRecord(profiles.entries)) throw new Error(`profiles.entries in ${source.filePath} must be a mapping`);\n\treturn {\n\t\tfilePath: source.filePath,\n\t\tbaseDirectory: source.baseDirectory,\n\t\troots: parseProfileRoots(profiles.roots, source.filePath, source.baseDirectory),\n\t\tentries: profiles.entries ?? {},\n\t\t...profiles.defaultProfile === void 0 ? {} : { defaultProfile: String(profiles.defaultProfile).trim() }\n\t};\n}\n/**\n* Shape checks for one explicit entry. The caller checks the persona on disk,\n* then `profileFromDraft` parses env and integration, keeping the error order.\n*/\nfunction draftProfileEntry(personaRoot, configuredRoots, name, value) {\n\tif (!isRecord(value)) throw new Error(`Profile \"${name}\" must be a mapping`);\n\tconst unsupported = Object.keys(value).filter((key) => !PROFILE_KEYS.has(key));\n\tif (unsupported.length > 0) throw new Error(`Profile \"${name}\" may only set persona, env and integration; unsupported: ${unsupported.join(\", \")}`);\n\tif (typeof value.persona !== \"string\" || value.persona.trim().length === 0) throw new Error(`Profile \"${name}\" must set a persona`);\n\tif (path.isAbsolute(value.persona)) throw new Error(`Profile \"${name}\" persona must be relative to the config that declares it`);\n\tconst persona = value.persona;\n\tconst personaPath = path.resolve(personaRoot, persona);\n\tconst lexicalRoots = [path.resolve(personaRoot, AGENTS_DIRECTORY), ...configuredRoots].filter((root) => isPathInside(root, personaPath));\n\tif (lexicalRoots.length === 0) throw outsideAllowedRoot(name);\n\treturn {\n\t\tname,\n\t\tpersona,\n\t\tpersonaPath,\n\t\tlexicalRoots,\n\t\tvalue\n\t};\n}\nfunction outsideAllowedRoot(name) {\n\treturn /* @__PURE__ */ new Error(`Profile \"${name}\" persona must stay inside agents/ or a configured profile root`);\n}\nfunction missingPersona(name, persona) {\n\treturn /* @__PURE__ */ new Error(`Profile \"${name}\" references a missing persona: ${persona}`);\n}\n/**\n* An identity block is not persona text, so a profile.md holding nothing else\n* leaves the persona empty. Say that, rather than claiming the file is unreadable.\n*/\nfunction emptyPersona(name, persona, declaresIdentity) {\n\treturn /* @__PURE__ */ new Error(declaresIdentity ? `Profile \"${name}\" persona declares identity front-matter but no persona text: ${persona}` : `Profile \"${name}\" persona has no readable persona files: ${persona}`);\n}\nfunction profileFromDraft(draft, personaRoot, presentation) {\n\tconst { name, value } = draft;\n\treturn {\n\t\tname,\n\t\tpersona: draft.persona,\n\t\tpersonaRoot,\n\t\tenv: parseEnvironment(name, value.env),\n\t\t...value.integration === void 0 ? {} : { integration: parseProfileBinding(value.integration, `Profile \"${name}\" integration`) },\n\t\t...presentation\n\t};\n}\nfunction presentationFrom(frontMatter, icon) {\n\tconst identity = {\n\t\t...frontMatter.name === void 0 ? {} : { name: frontMatter.name },\n\t\t...icon === void 0 ? {} : { icon }\n\t};\n\treturn {\n\t\t...identity.name === void 0 && identity.icon === void 0 ? {} : { identity },\n\t\t...frontMatter.voice === void 0 ? {} : { voice: frontMatter.voice }\n\t};\n}\n/** Rejects a persona file whose real path left the persona directory. */\nfunction assertPersonaFileInside(personaPath, realFilePath, personaDirectory, file) {\n\tconst relativeFilePath = path.relative(personaPath, realFilePath);\n\tif (relativeFilePath === \"..\" || relativeFilePath.startsWith(`..${path.sep}`)) throw new Error(`Persona file must stay inside ${personaDirectory}: ${file}`);\n}\n/** The text one persona file contributes. Only profile.md may declare identity, so only profile.md is stripped. */\nfunction personaFileSection(file, raw) {\n\treturn (file === \"profile.md\" ? parsePersonaFrontMatter(raw).body : raw).trim();\n}\nfunction personaPromptFromSections(personaDirectory, sections) {\n\tif (sections.length === 0) return void 0;\n\treturn [`[PERSONA] You are operating as the person described below (source: ${personaDirectory}).`, ...sections].join(\"\\n\\n\");\n}\n/** Builds a profile from in-memory persona text. Nothing is read from disk, so it has no persona root or icon. */\nfunction inlineProfile(input) {\n\tconst { name, source, files } = input;\n\tconst read = (file) => Object.hasOwn(files, file) ? files[file] : void 0;\n\tconst sections = PERSONA_FILES.flatMap((file) => {\n\t\tconst raw = read(file);\n\t\tconst section = raw === void 0 ? \"\" : personaFileSection(file, raw);\n\t\treturn section ? [section] : [];\n\t});\n\tconst identityText = read(PERSONA_IDENTITY_FILE);\n\tconst frontMatter = identityText === void 0 ? void 0 : parsePersonaFrontMatter(identityText).frontMatter;\n\tconst personaPrompt = personaPromptFromSections(source, sections);\n\tif (!personaPrompt) throw emptyPersona(name, source, frontMatter !== void 0);\n\treturn {\n\t\tname,\n\t\tpersona: source,\n\t\tpersonaRoot: \"\",\n\t\tenv: parseEnvironment(name, input.env),\n\t\t...input.integration === void 0 ? {} : { integration: parseProfileBinding(input.integration, `Profile \"${name}\" integration`) },\n\t\t...frontMatter === void 0 ? {} : presentationFrom(frontMatter, void 0),\n\t\tpersonaPrompt\n\t};\n}\nfunction sortProfiles(byName) {\n\treturn [...byName.values()].sort((left, right) => left.name.localeCompare(right.name));\n}\n/** A repository declaration replaces a personal one; an unknown name is an error, not a fallback. */\nfunction catalogDefaultProfile(layers, profiles) {\n\tlet defaultProfile;\n\tfor (const layer of layers) if (layer.defaultProfile !== void 0) defaultProfile = layer.defaultProfile;\n\tif (defaultProfile !== void 0 && !profiles.some((profile) => profile.name === defaultProfile)) throw new Error(`profiles.defaultProfile names an unknown profile: ${defaultProfile}`);\n\treturn defaultProfile;\n}\n/** Applies profile environment defaults and returns only the values it contributed. */\nfunction applyProfileEnvironment(environment, defaults) {\n\tconst applied = {};\n\tfor (const [key, value] of Object.entries(defaults)) {\n\t\tif (environment[key] !== void 0) continue;\n\t\tenvironment[key] = value;\n\t\tapplied[key] = value;\n\t}\n\treturn applied;\n}\n/** Replaces environment defaults previously contributed by another profile. */\nfunction replaceProfileEnvironment(environment, previous, next) {\n\tfor (const [key, value] of Object.entries(previous)) if (environment[key] === value) delete environment[key];\n\treturn applyProfileEnvironment(environment, next);\n}\n//#endregion\n//#region src/services/profiles/sync.ts\nconst TEXT_ENCODING = \"utf8\";\nfunction parseProfile$1(personaRoot, configuredRoots, name, value) {\n\tconst draft = draftProfileEntry(personaRoot, configuredRoots, name, value);\n\tif (!fs.existsSync(draft.personaPath) || !fs.statSync(draft.personaPath).isDirectory()) throw missingPersona(name, draft.persona);\n\tconst realPersonaPath = fs.realpathSync(draft.personaPath);\n\tif (!draft.lexicalRoots.some((root) => isPathInside(fs.realpathSync(root), realPersonaPath))) throw outsideAllowedRoot(name);\n\tif (!buildPersonaPrompt(personaRoot, draft.persona)) throw emptyPersona(name, draft.persona, readPersonaFrontMatter$1(personaRoot, draft.persona) !== void 0);\n\treturn profileFromDraft(draft, personaRoot, readPersonaPresentation$1(personaRoot, draft.persona));\n}\nfunction containsPersonaFile$1(directory) {\n\treturn PERSONA_FILES.some((file) => {\n\t\ttry {\n\t\t\treturn fs.lstatSync(path.join(directory, file)).isFile();\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t});\n}\n/** Reads the optional sidecar, which must be a regular file whose real path stays in the persona directory. */\nfunction readSidecar$1(name, realDirectory) {\n\tconst filePath = path.join(realDirectory, PROFILE_SIDECAR_FILE);\n\tif (!fs.existsSync(filePath)) return { env: {} };\n\tconst realFilePath = fs.realpathSync(filePath);\n\tif (!isPathInside(realDirectory, realFilePath) || !fs.statSync(realFilePath).isFile()) throw new Error(`Profile \"${name}\" ${PROFILE_SIDECAR_FILE} must be a file inside the persona directory`);\n\treturn parseProfileSidecar(name, fs.readFileSync(realFilePath, TEXT_ENCODING));\n}\nfunction discoverProfile$1(directory, configuredRoot, personaRoot, diagnostics) {\n\tif (!containsPersonaFile$1(directory)) return void 0;\n\tconst name = path.basename(directory);\n\ttry {\n\t\tconst realConfiguredRoot = fs.realpathSync(configuredRoot);\n\t\tconst realDirectory = fs.realpathSync(directory);\n\t\tif (!isPathInside(realConfiguredRoot, realDirectory)) return void 0;\n\t\tconst persona = path.relative(personaRoot, directory) || \".\";\n\t\tif (!buildPersonaPrompt(personaRoot, persona)) return void 0;\n\t\tlet sidecar;\n\t\ttry {\n\t\t\tsidecar = readSidecar$1(name, realDirectory);\n\t\t} catch (error) {\n\t\t\tdiagnostics.push(sidecarDiagnostic(path.join(directory, PROFILE_SIDECAR_FILE), name, error));\n\t\t\treturn;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpersona,\n\t\t\tpersonaRoot,\n\t\t\t...sidecar,\n\t\t\t...readPersonaPresentation$1(personaRoot, persona)\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction discoverProfileRoot$1(root, personaRoot, diagnostics) {\n\tif (!fs.existsSync(root) || !fs.statSync(root).isDirectory()) throw new Error(`Configured profile root is not a directory: ${root}`);\n\tconst rootProfile = discoverProfile$1(root, root, personaRoot, diagnostics);\n\tif (rootProfile) return [rootProfile];\n\treturn fs.readdirSync(root, { withFileTypes: true }).filter((entry) => entry.isDirectory()).sort((left, right) => left.name.localeCompare(right.name)).flatMap((entry) => {\n\t\tconst profile = discoverProfile$1(path.join(root, entry.name), root, personaRoot, diagnostics);\n\t\treturn profile ? [profile] : [];\n\t});\n}\nfunction readProfileLayers$1(repoRoot, homeDirectory) {\n\treturn readPoConfigSources(PROFILES_FILE, repoRoot, homeDirectory).map(parseProfileLayer);\n}\nfunction profilesFromLayers$1(layers, diagnostics = []) {\n\tconst byName = /* @__PURE__ */ new Map();\n\tfor (const layer of layers) for (const root of layer.roots) for (const profile of discoverProfileRoot$1(root, layer.baseDirectory, diagnostics)) byName.set(profile.name, profile);\n\tfor (const layer of layers) for (const [name, value] of Object.entries(layer.entries)) byName.set(name, parseProfile$1(layer.baseDirectory, layer.roots, name, value));\n\treturn sortProfiles(byName);\n}\n/**\n* Loads profiles from the global and repository configs, repository last.\n*\n* Configured roots accumulate and inspect themselves or their direct-child\n* directories for persona files. Later discoveries replace earlier names, and\n* explicit entries replace discoveries. Legacy flat profile mappings remain\n* accepted as explicit entries.\n*\n* @deprecated Node-only sync shim; use loadProfilesAsync. Removed in M2.\n*/\nfunction loadProfiles(repoRoot, homeDirectory = os.homedir()) {\n\treturn profilesFromLayers$1(readProfileLayers$1(repoRoot, homeDirectory));\n}\n/**\n* The profile catalog: every resolved profile, plus the name a launch starts on\n* when the caller names none.\n*\n* `defaultProfile` mirrors `defaultMajorMode` in modes.yaml and `defaultDomains`\n* in domains.yaml, so each selection axis declares its default in its own\n* catalog. A repository declaration replaces a personal one. An unknown name is\n* an error rather than a silent fallback: a typo that quietly starts the session\n* with no persona is worse than a refused launch.\n*\n* @deprecated Node-only sync shim; use loadProfileCatalogAsync. Removed in M2.\n*/\nfunction loadProfileCatalog(repoRoot, homeDirectory = os.homedir()) {\n\tconst layers = readProfileLayers$1(repoRoot, homeDirectory);\n\tconst diagnostics = [];\n\tconst profiles = profilesFromLayers$1(layers, diagnostics);\n\tconst defaultProfile = catalogDefaultProfile(layers, profiles);\n\treturn {\n\t\tprofiles,\n\t\t...defaultProfile === void 0 ? {} : { defaultProfile },\n\t\t...diagnostics.length === 0 ? {} : { diagnostics }\n\t};\n}\n/**\n* Resolves one selected profile and fails clearly when its name is unknown.\n*\n* @deprecated Node-only sync shim; use resolveProfileAsync. Removed in M2.\n*/\nfunction resolveProfile(repoRoot, name, homeDirectory) {\n\tconst profile = loadProfiles(repoRoot, homeDirectory).find((candidate) => candidate.name === name);\n\tif (!profile) throw new Error(`Unknown profile: ${name}`);\n\treturn profile;\n}\n/** @deprecated Node-only sync shim; use listProfileNamesAsync. Removed in M2. */\nfunction listProfileNames(repoRoot, homeDirectory) {\n\treturn loadProfiles(repoRoot, homeDirectory).map((profile) => profile.name);\n}\nfunction readPersonaPresentation$1(personaRoot, personaDirectory) {\n\tconst frontMatter = readPersonaFrontMatter$1(personaRoot, personaDirectory);\n\tif (!frontMatter) return {};\n\treturn presentationFrom(frontMatter, frontMatter.icon === void 0 ? void 0 : readPersonaIcon(path.join(personaRoot, personaDirectory), frontMatter.icon));\n}\nfunction readPersonaFrontMatter$1(personaRoot, personaDirectory) {\n\ttry {\n\t\tconst personaPath = fs.realpathSync(path.join(personaRoot, personaDirectory));\n\t\tconst filePath = path.join(personaPath, PERSONA_IDENTITY_FILE);\n\t\tif (!fs.existsSync(filePath)) return void 0;\n\t\treturn parsePersonaFrontMatter(fs.readFileSync(fs.realpathSync(filePath), TEXT_ENCODING)).frontMatter;\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* Builds the persona system-prompt block, or undefined when nothing is readable.\n*\n* @deprecated Node-only sync shim; use buildPersonaPromptAsync. Removed in M2.\n*/\nfunction buildPersonaPrompt(personaRoot, personaDirectory) {\n\tconst sections = [];\n\tconst personaPath = fs.realpathSync(path.join(personaRoot, personaDirectory));\n\tfor (const file of PERSONA_FILES) {\n\t\tconst filePath = path.join(personaPath, file);\n\t\tif (!fs.existsSync(filePath)) continue;\n\t\tconst realFilePath = fs.realpathSync(filePath);\n\t\tassertPersonaFileInside(personaPath, realFilePath, personaDirectory, file);\n\t\tconst content = personaFileSection(file, fs.readFileSync(realFilePath, TEXT_ENCODING));\n\t\tif (content) sections.push(content);\n\t}\n\treturn personaPromptFromSections(personaDirectory, sections);\n}\n//#endregion\n//#region src/services/profiles/index.ts\n/** Profile reads over a FileSystem; the Node shims in `./sync` give the same answers from node:fs. */\nconst realPath = async (fs, target, context) => getOrThrow(await fs.canonicalPath(target, context));\nconst exists = async (fs, target, context) => getOrThrow(await fs.exists(target, context));\n/** Whether a path is a directory once links are followed, as `statSync().isDirectory()`. */\nasync function isDirectory(fs, target, context) {\n\tif (!await exists(fs, target, context)) return false;\n\treturn getOrThrow(await fs.fileInfo(await realPath(fs, target, context), context)).kind === \"directory\";\n}\nasync function readPersonaFrontMatter(fs, personaRoot, personaDirectory, context) {\n\ttry {\n\t\tconst personaPath = await realPath(fs, path.join(personaRoot, personaDirectory), context);\n\t\tconst filePath = path.join(personaPath, PERSONA_IDENTITY_FILE);\n\t\tif (!await exists(fs, filePath, context)) return void 0;\n\t\tconst text = await readTextIfExists(fs, await realPath(fs, filePath, context), context);\n\t\treturn text === void 0 ? void 0 : parsePersonaFrontMatter(text).frontMatter;\n\t} catch {\n\t\treturn;\n\t}\n}\nasync function readPersonaPresentation(fs, personaRoot, personaDirectory, context) {\n\tconst frontMatter = await readPersonaFrontMatter(fs, personaRoot, personaDirectory, context);\n\tif (!frontMatter) return {};\n\treturn presentationFrom(frontMatter, frontMatter.icon === void 0 ? void 0 : await readPersonaIconAsync(fs, path.join(personaRoot, personaDirectory), frontMatter.icon, context));\n}\n/** Builds the persona system-prompt block, or undefined when nothing is readable. */\nasync function buildPersonaPromptAsync(fs, personaRoot, personaDirectory, context) {\n\tconst sections = [];\n\tconst personaPath = await realPath(fs, path.join(personaRoot, personaDirectory), context);\n\tfor (const file of PERSONA_FILES) {\n\t\tconst filePath = path.join(personaPath, file);\n\t\tif (!await exists(fs, filePath, context)) continue;\n\t\tconst realFilePath = await realPath(fs, filePath, context);\n\t\tassertPersonaFileInside(personaPath, realFilePath, personaDirectory, file);\n\t\tconst content = personaFileSection(file, getOrThrow(await fs.readTextFile(realFilePath, context)));\n\t\tif (content) sections.push(content);\n\t}\n\treturn personaPromptFromSections(personaDirectory, sections);\n}\nasync function parseProfile(fs, personaRoot, configuredRoots, name, value, context) {\n\tconst draft = draftProfileEntry(personaRoot, configuredRoots, name, value);\n\tif (!await isDirectory(fs, draft.personaPath, context)) throw missingPersona(name, draft.persona);\n\tconst realPersonaPath = await realPath(fs, draft.personaPath, context);\n\tlet allowed = false;\n\tfor (const root of draft.lexicalRoots) if (isPathInside(await realPath(fs, root, context), realPersonaPath)) {\n\t\tallowed = true;\n\t\tbreak;\n\t}\n\tif (!allowed) throw outsideAllowedRoot(name);\n\tif (!await buildPersonaPromptAsync(fs, personaRoot, draft.persona, context)) {\n\t\tconst declaresIdentity = await readPersonaFrontMatter(fs, personaRoot, draft.persona, context) !== void 0;\n\t\tthrow emptyPersona(name, draft.persona, declaresIdentity);\n\t}\n\treturn profileFromDraft(draft, personaRoot, await readPersonaPresentation(fs, personaRoot, draft.persona, context));\n}\nasync function containsPersonaFile(fs, directory, context) {\n\tfor (const file of PERSONA_FILES) {\n\t\tconst info = await fs.fileInfo(path.join(directory, file), context);\n\t\tif (info.ok && info.value.kind === \"file\") return true;\n\t}\n\treturn false;\n}\n/** Reads the optional sidecar, which must be a regular file whose real path stays in the persona directory. */\nasync function readSidecar(fs, name, realDirectory, context) {\n\tconst filePath = path.join(realDirectory, PROFILE_SIDECAR_FILE);\n\tif (!await exists(fs, filePath, context)) return { env: {} };\n\tconst realFilePath = await realPath(fs, filePath, context);\n\tif (!isPathInside(realDirectory, realFilePath) || getOrThrow(await fs.fileInfo(realFilePath, context)).kind !== \"file\") throw new Error(`Profile \"${name}\" ${PROFILE_SIDECAR_FILE} must be a file inside the persona directory`);\n\treturn parseProfileSidecar(name, getOrThrow(await fs.readTextFile(realFilePath, context)));\n}\nasync function discoverProfile(fs, directory, configuredRoot, personaRoot, diagnostics, context) {\n\tif (!await containsPersonaFile(fs, directory, context)) return void 0;\n\tconst name = path.basename(directory);\n\ttry {\n\t\tconst realConfiguredRoot = await realPath(fs, configuredRoot, context);\n\t\tconst realDirectory = await realPath(fs, directory, context);\n\t\tif (!isPathInside(realConfiguredRoot, realDirectory)) return void 0;\n\t\tconst persona = path.relative(personaRoot, directory) || \".\";\n\t\tif (!await buildPersonaPromptAsync(fs, personaRoot, persona, context)) return void 0;\n\t\tlet sidecar;\n\t\ttry {\n\t\t\tsidecar = await readSidecar(fs, name, realDirectory, context);\n\t\t} catch (error) {\n\t\t\tdiagnostics.push(sidecarDiagnostic(path.join(directory, PROFILE_SIDECAR_FILE), name, error));\n\t\t\treturn;\n\t\t}\n\t\treturn {\n\t\t\tname,\n\t\t\tpersona,\n\t\t\tpersonaRoot,\n\t\t\t...sidecar,\n\t\t\t...await readPersonaPresentation(fs, personaRoot, persona, context)\n\t\t};\n\t} catch {\n\t\treturn;\n\t}\n}\nasync function discoverProfileRoot(fs, root, personaRoot, diagnostics, context) {\n\tif (!await isDirectory(fs, root, context)) throw new Error(`Configured profile root is not a directory: ${root}`);\n\tconst rootProfile = await discoverProfile(fs, root, root, personaRoot, diagnostics, context);\n\tif (rootProfile) return [rootProfile];\n\tconst directories = getOrThrow(await fs.listDir(root, context)).filter((entry) => entry.kind === \"directory\").sort((left, right) => left.name.localeCompare(right.name));\n\tconst profiles = [];\n\tfor (const entry of directories) {\n\t\tconst profile = await discoverProfile(fs, path.join(root, entry.name), root, personaRoot, diagnostics, context);\n\t\tif (profile) profiles.push(profile);\n\t}\n\treturn profiles;\n}\nasync function readProfileLayers(fs, repoRoot, context, homeDirectory) {\n\treturn (await readPoConfigSourcesAsync(fs, PROFILES_FILE, repoRoot, context, homeDirectory)).map(parseProfileLayer);\n}\nasync function profilesFromLayers(fs, layers, context, diagnostics = []) {\n\tconst byName = /* @__PURE__ */ new Map();\n\tfor (const layer of layers) for (const root of layer.roots) for (const profile of await discoverProfileRoot(fs, root, layer.baseDirectory, diagnostics, context)) byName.set(profile.name, profile);\n\tfor (const layer of layers) for (const [name, value] of Object.entries(layer.entries)) byName.set(name, await parseProfile(fs, layer.baseDirectory, layer.roots, name, value, context));\n\treturn sortProfiles(byName);\n}\n/**\n* Loads profiles from the global and repository configs, repository last.\n*\n* Configured roots accumulate and inspect themselves or their direct-child\n* directories for persona files. Later discoveries replace earlier names, and\n* explicit entries replace discoveries. Legacy flat profile mappings remain\n* accepted as explicit entries.\n*/\nasync function loadProfilesAsync(fs, repoRoot, context, homeDirectory = nodeHost.homeDirectory()) {\n\treturn profilesFromLayers(fs, await readProfileLayers(fs, repoRoot, context, homeDirectory), context);\n}\n/** The profile catalog plus the name a launch starts on when the caller names none. */\nasync function loadProfileCatalogAsync(fs, repoRoot, context, homeDirectory = nodeHost.homeDirectory()) {\n\tconst layers = await readProfileLayers(fs, repoRoot, context, homeDirectory);\n\tconst diagnostics = [];\n\tconst profiles = await profilesFromLayers(fs, layers, context, diagnostics);\n\tconst defaultProfile = catalogDefaultProfile(layers, profiles);\n\treturn {\n\t\tprofiles,\n\t\t...defaultProfile === void 0 ? {} : { defaultProfile },\n\t\t...diagnostics.length === 0 ? {} : { diagnostics }\n\t};\n}\n/** Resolves one selected profile and fails clearly when its name is unknown. */\nasync function resolveProfileAsync(fs, repoRoot, name, context, homeDirectory) {\n\tconst profile = (await loadProfilesAsync(fs, repoRoot, context, homeDirectory)).find((candidate) => candidate.name === name);\n\tif (!profile) throw new Error(`Unknown profile: ${name}`);\n\treturn profile;\n}\nasync function listProfileNamesAsync(fs, repoRoot, context, homeDirectory) {\n\treturn (await loadProfilesAsync(fs, repoRoot, context, homeDirectory)).map((profile) => profile.name);\n}\n//#endregion\nexport { readPersonaIcon as _, resolveProfileAsync as a, loadProfileCatalog as c, PERSONA_FILES as d, applyProfileEnvironment as f, readPersonaIconAsync as g, parseProfileBinding as h, loadProfilesAsync as i, loadProfiles as l, replaceProfileEnvironment as m, listProfileNamesAsync as n, buildPersonaPrompt as o, inlineProfile as p, loadProfileCatalogAsync as r, listProfileNames as s, buildPersonaPromptAsync as t, resolveProfile as u, parsePersonaFrontMatter as v };\n\n//# sourceMappingURL=profiles-CbTR2tNE.mjs.map","import { Type } from \"typebox\";\nimport { Check } from \"typebox/value\";\n//#region src/schemas/approvalPrompt.ts\n/** Caps on the plain text an approval carries, applied by the gate and checked again on every hop. */\nconst PO_APPROVAL_TEXT_LIMITS = Object.freeze({\n\ttitle: 120,\n\tsummary: 600,\n\tdetails: 12,\n\tlabel: 60,\n\tvalue: 300,\n\tname: 200\n});\nconst L = PO_APPROVAL_TEXT_LIMITS;\nconst Name = Type.String({\n\tminLength: 1,\n\tmaxLength: L.name\n});\nconst PoApprovalPromptSchema = Type.Object({\n\tid: Name,\n\ttoolCallId: Name,\n\toperation: Type.Object({\n\t\tkind: Type.Union([Type.Literal(\"tool\"), Type.Literal(\"codemode\")]),\n\t\tname: Name\n\t}),\n\trequirement: Type.Union([Type.Literal(\"ask\"), Type.Literal(\"human\")]),\n\ttitle: Type.String({\n\t\tminLength: 1,\n\t\tmaxLength: L.title\n\t}),\n\tsummary: Type.String({ maxLength: L.summary }),\n\tdetails: Type.Optional(Type.Array(Type.Object({\n\t\tlabel: Type.String({ maxLength: L.label }),\n\t\tvalue: Type.String({ maxLength: L.value })\n\t}), { maxItems: L.details }))\n});\n/**\n* The marker of an approval dialog on every hop (client frame, hub attention, app prompt). Returns a copy holding only\n* the known bounded fields, or undefined for anything else, so a malformed envelope falls back to the plain dialog.\n*/\nfunction parsePoApprovalPrompt(value) {\n\tif (!Check(PoApprovalPromptSchema, value)) return void 0;\n\treturn {\n\t\tid: value.id,\n\t\ttoolCallId: value.toolCallId,\n\t\toperation: {\n\t\t\tkind: value.operation.kind,\n\t\t\tname: value.operation.name\n\t\t},\n\t\trequirement: value.requirement,\n\t\ttitle: value.title,\n\t\tsummary: value.summary,\n\t\t...value.details === void 0 ? {} : { details: value.details.map((detail) => ({\n\t\t\tlabel: detail.label,\n\t\t\tvalue: detail.value\n\t\t})) }\n\t};\n}\n/**\n* Direct event (per session) carrying the one pending approval Voice may read aloud, or null when there is\n* none or more than one. The bounded description only; Voice answers through the approval route.\n*/\nconst PO_APPROVAL_VOICE_EVENT = \"po/approval-voice\";\n//#endregion\nexport { PO_APPROVAL_TEXT_LIMITS, PO_APPROVAL_VOICE_EVENT, PoApprovalPromptSchema, parsePoApprovalPrompt };\n\n//# sourceMappingURL=approvalPrompt.mjs.map","//#region src/alien.ts\nconst NONE = 0;\nconst MUTABLE = 1;\nconst WATCHING = 2;\nconst RECURSED_CHECK = 4;\nconst RECURSED = 8;\nconst DIRTY = 16;\nconst PENDING = 32;\n/* @__NO_SIDE_EFFECTS__ */\nfunction createReactiveSystem({ update, notify, unwatched }) {\n\treturn {\n\t\tlink,\n\t\tunlink,\n\t\tpropagate,\n\t\tcheckDirty,\n\t\tshallowPropagate\n\t};\n\tfunction link(dep, sub, version) {\n\t\tconst prevDep = sub.depsTail;\n\t\tif (prevDep !== void 0 && prevDep.dep === dep) return;\n\t\tconst nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;\n\t\tif (nextDep !== void 0 && nextDep.dep === dep) {\n\t\t\tnextDep.version = version;\n\t\t\tsub.depsTail = nextDep;\n\t\t\treturn;\n\t\t}\n\t\tconst prevSub = dep.subsTail;\n\t\tif (prevSub !== void 0 && prevSub.version === version && prevSub.sub === sub) return;\n\t\tconst newLink = sub.depsTail = dep.subsTail = {\n\t\t\tversion,\n\t\t\tdep,\n\t\t\tsub,\n\t\t\tprevDep,\n\t\t\tnextDep,\n\t\t\tprevSub,\n\t\t\tnextSub: void 0\n\t\t};\n\t\tif (nextDep !== void 0) nextDep.prevDep = newLink;\n\t\tif (prevDep !== void 0) prevDep.nextDep = newLink;\n\t\telse sub.deps = newLink;\n\t\tif (prevSub !== void 0) prevSub.nextSub = newLink;\n\t\telse dep.subs = newLink;\n\t}\n\tfunction unlink(link, sub = link.sub) {\n\t\tconst dep = link.dep;\n\t\tconst prevDep = link.prevDep;\n\t\tconst nextDep = link.nextDep;\n\t\tconst nextSub = link.nextSub;\n\t\tconst prevSub = link.prevSub;\n\t\tif (nextDep !== void 0) nextDep.prevDep = prevDep;\n\t\telse sub.depsTail = prevDep;\n\t\tif (prevDep !== void 0) prevDep.nextDep = nextDep;\n\t\telse sub.deps = nextDep;\n\t\tif (nextSub !== void 0) nextSub.prevSub = prevSub;\n\t\telse dep.subsTail = prevSub;\n\t\tif (prevSub !== void 0) prevSub.nextSub = nextSub;\n\t\telse if ((dep.subs = nextSub) === void 0) unwatched(dep);\n\t\treturn nextDep;\n\t}\n\tfunction propagate(link) {\n\t\tlet next = link.nextSub;\n\t\tlet stack;\n\t\ttop: do {\n\t\t\tconst sub = link.sub;\n\t\t\tlet flags = sub.flags;\n\t\t\tif (!(flags & 60)) sub.flags = flags | 32;\n\t\t\telse if (!(flags & (4 | 8))) flags = 0;\n\t\t\telse if (!(flags & 4)) sub.flags = flags & ~8 | 32;\n\t\t\telse if (!(flags & (16 | 32)) && isValidLink(link, sub)) {\n\t\t\t\tsub.flags = flags | (8 | 32);\n\t\t\t\tflags &= 1;\n\t\t\t} else flags = 0;\n\t\t\tif (flags & 2) notify(sub);\n\t\t\tif (flags & 1) {\n\t\t\t\tconst subSubs = sub.subs;\n\t\t\t\tif (subSubs !== void 0) {\n\t\t\t\t\tconst nextSub = (link = subSubs).nextSub;\n\t\t\t\t\tif (nextSub !== void 0) {\n\t\t\t\t\t\tstack = {\n\t\t\t\t\t\t\tvalue: next,\n\t\t\t\t\t\t\tprev: stack\n\t\t\t\t\t\t};\n\t\t\t\t\t\tnext = nextSub;\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((link = next) !== void 0) {\n\t\t\t\tnext = link.nextSub;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\twhile (stack !== void 0) {\n\t\t\t\tlink = stack.value;\n\t\t\t\tstack = stack.prev;\n\t\t\t\tif (link !== void 0) {\n\t\t\t\t\tnext = link.nextSub;\n\t\t\t\t\tcontinue top;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\t} while (true);\n\t}\n\tfunction checkDirty(link, sub) {\n\t\tlet stack;\n\t\tlet checkDepth = 0;\n\t\tlet dirty = false;\n\t\ttop: do {\n\t\t\tconst dep = link.dep;\n\t\t\tconst flags = dep.flags;\n\t\t\tif (sub.flags & 16) dirty = true;\n\t\t\telse if ((flags & (1 | 16)) === (1 | 16)) {\n\t\t\t\tif (update(dep)) {\n\t\t\t\t\tconst subs = dep.subs;\n\t\t\t\t\tif (subs.nextSub !== void 0) shallowPropagate(subs);\n\t\t\t\t\tdirty = true;\n\t\t\t\t}\n\t\t\t} else if ((flags & (1 | 32)) === (1 | 32)) {\n\t\t\t\tif (link.nextSub !== void 0 || link.prevSub !== void 0) stack = {\n\t\t\t\t\tvalue: link,\n\t\t\t\t\tprev: stack\n\t\t\t\t};\n\t\t\t\tlink = dep.deps;\n\t\t\t\tsub = dep;\n\t\t\t\t++checkDepth;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!dirty) {\n\t\t\t\tconst nextDep = link.nextDep;\n\t\t\t\tif (nextDep !== void 0) {\n\t\t\t\t\tlink = nextDep;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (checkDepth--) {\n\t\t\t\tconst firstSub = sub.subs;\n\t\t\t\tconst hasMultipleSubs = firstSub.nextSub !== void 0;\n\t\t\t\tif (hasMultipleSubs) {\n\t\t\t\t\tlink = stack.value;\n\t\t\t\t\tstack = stack.prev;\n\t\t\t\t} else link = firstSub;\n\t\t\t\tif (dirty) {\n\t\t\t\t\tif (update(sub)) {\n\t\t\t\t\t\tif (hasMultipleSubs) shallowPropagate(firstSub);\n\t\t\t\t\t\tsub = link.sub;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tdirty = false;\n\t\t\t\t} else sub.flags &= ~32;\n\t\t\t\tsub = link.sub;\n\t\t\t\tconst nextDep = link.nextDep;\n\t\t\t\tif (nextDep !== void 0) {\n\t\t\t\t\tlink = nextDep;\n\t\t\t\t\tcontinue top;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dirty;\n\t\t} while (true);\n\t}\n\tfunction shallowPropagate(link) {\n\t\tdo {\n\t\t\tconst sub = link.sub;\n\t\t\tconst flags = sub.flags;\n\t\t\tif ((flags & (32 | 16)) === 32) {\n\t\t\t\tsub.flags = flags | 16;\n\t\t\t\tif ((flags & (2 | 4)) === 2) notify(sub);\n\t\t\t}\n\t\t} while ((link = link.nextSub) !== void 0);\n\t}\n\tfunction isValidLink(checkLink, sub) {\n\t\tlet link = sub.depsTail;\n\t\twhile (link !== void 0) {\n\t\t\tif (link === checkLink) return true;\n\t\t\tlink = link.prevDep;\n\t\t}\n\t\treturn false;\n\t}\n}\n\n//#endregion\nexport { createReactiveSystem };\n//# sourceMappingURL=alien.js.map","import { createReactiveSystem } from \"./alien.js\";\n\n//#region src/atom.ts\nfunction toObserver(nextHandler, errorHandler, completionHandler) {\n\tconst isObserver = typeof nextHandler === \"object\";\n\tconst self = isObserver ? nextHandler : void 0;\n\treturn {\n\t\tnext: (isObserver ? nextHandler.next : nextHandler)?.bind(self),\n\t\terror: (isObserver ? nextHandler.error : errorHandler)?.bind(self),\n\t\tcomplete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)\n\t};\n}\nconst queuedEffects = [];\nlet cycle = 0;\nconst { link, unlink, propagate, checkDirty, shallowPropagate } = /* @__PURE__ */ createReactiveSystem({\n\tupdate(atom) {\n\t\treturn atom._update();\n\t},\n\tnotify(effect) {\n\t\tqueuedEffects[queuedEffectsLength++] = effect;\n\t\teffect.flags &= ~2;\n\t},\n\tunwatched(atom) {\n\t\tif (atom.depsTail !== void 0) {\n\t\t\tatom.depsTail = void 0;\n\t\t\tatom.flags = 1 | 16;\n\t\t\tpurgeDeps(atom);\n\t\t}\n\t}\n});\nlet notifyIndex = 0;\nlet queuedEffectsLength = 0;\nlet activeSub;\nlet batchDepth = 0;\nfunction batch(fn) {\n\ttry {\n\t\t++batchDepth;\n\t\tfn();\n\t} finally {\n\t\tif (!--batchDepth) flush();\n\t}\n}\nfunction purgeDeps(sub) {\n\tconst depsTail = sub.depsTail;\n\tlet dep = depsTail !== void 0 ? depsTail.nextDep : sub.deps;\n\twhile (dep !== void 0) dep = unlink(dep, sub);\n}\nfunction flush() {\n\tif (batchDepth > 0) return;\n\twhile (notifyIndex < queuedEffectsLength) {\n\t\tconst effect = queuedEffects[notifyIndex];\n\t\tqueuedEffects[notifyIndex++] = void 0;\n\t\teffect.notify();\n\t}\n\tnotifyIndex = 0;\n\tqueuedEffectsLength = 0;\n}\nfunction createAsyncAtom(getValue, options) {\n\tconst ref = {};\n\tconst atom = createAtom(() => {\n\t\tgetValue().then((data) => {\n\t\t\tconst internalAtom = ref.current;\n\t\t\tif (internalAtom._update({\n\t\t\t\tstatus: \"done\",\n\t\t\t\tdata\n\t\t\t})) {\n\t\t\t\tconst subs = internalAtom.subs;\n\t\t\t\tif (subs !== void 0) {\n\t\t\t\t\tpropagate(subs);\n\t\t\t\t\tshallowPropagate(subs);\n\t\t\t\t\tflush();\n\t\t\t\t}\n\t\t\t}\n\t\t}, (error) => {\n\t\t\tconst internalAtom = ref.current;\n\t\t\tif (internalAtom._update({\n\t\t\t\tstatus: \"error\",\n\t\t\t\terror\n\t\t\t})) {\n\t\t\t\tconst subs = internalAtom.subs;\n\t\t\t\tif (subs !== void 0) {\n\t\t\t\t\tpropagate(subs);\n\t\t\t\t\tshallowPropagate(subs);\n\t\t\t\t\tflush();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn { status: \"pending\" };\n\t}, options);\n\tref.current = atom;\n\treturn atom;\n}\nfunction createAtom(valueOrFn, options) {\n\tconst isComputed = typeof valueOrFn === \"function\";\n\tconst getter = valueOrFn;\n\tconst atom = {\n\t\t_snapshot: isComputed ? void 0 : valueOrFn,\n\t\tsubs: void 0,\n\t\tsubsTail: void 0,\n\t\tdeps: void 0,\n\t\tdepsTail: void 0,\n\t\tflags: isComputed ? 0 : 1,\n\t\tget() {\n\t\t\tif (activeSub !== void 0) link(atom, activeSub, cycle);\n\t\t\treturn atom._snapshot;\n\t\t},\n\t\tsubscribe(observerOrFn) {\n\t\t\tconst obs = toObserver(observerOrFn);\n\t\t\tconst observed = { current: false };\n\t\t\tconst e = effect(() => {\n\t\t\t\tatom.get();\n\t\t\t\tif (!observed.current) observed.current = true;\n\t\t\t\telse {\n\t\t\t\t\tactiveSub = void 0;\n\t\t\t\t\tobs.next?.(atom._snapshot);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn { unsubscribe: () => {\n\t\t\t\te.stop();\n\t\t\t} };\n\t\t},\n\t\t_update(getValue) {\n\t\t\tconst prevSub = activeSub;\n\t\t\tconst compare = options?.compare ?? Object.is;\n\t\t\tif (isComputed) {\n\t\t\t\tactiveSub = atom;\n\t\t\t\t++cycle;\n\t\t\t\tatom.depsTail = void 0;\n\t\t\t} else if (getValue === void 0) return false;\n\t\t\tif (isComputed) atom.flags = 1 | 4;\n\t\t\ttry {\n\t\t\t\tconst oldValue = atom._snapshot;\n\t\t\t\tconst newValue = typeof getValue === \"function\" ? getValue(oldValue) : getValue === void 0 && isComputed ? getter(oldValue) : getValue;\n\t\t\t\tif (oldValue === void 0 || !compare(oldValue, newValue)) {\n\t\t\t\t\tatom._snapshot = newValue;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} finally {\n\t\t\t\tactiveSub = prevSub;\n\t\t\t\tif (isComputed) atom.flags &= ~4;\n\t\t\t\tpurgeDeps(atom);\n\t\t\t}\n\t\t}\n\t};\n\tif (isComputed) {\n\t\tatom.flags = 1 | 16;\n\t\tatom.get = function() {\n\t\t\tconst flags = atom.flags;\n\t\t\tif (flags & 16 || flags & 32 && checkDirty(atom.deps, atom)) {\n\t\t\t\tif (atom._update()) {\n\t\t\t\t\tconst subs = atom.subs;\n\t\t\t\t\tif (subs !== void 0) shallowPropagate(subs);\n\t\t\t\t}\n\t\t\t} else if (flags & 32) atom.flags = flags & ~32;\n\t\t\tif (activeSub !== void 0) link(atom, activeSub, cycle);\n\t\t\treturn atom._snapshot;\n\t\t};\n\t} else atom.set = function(valueOrFn) {\n\t\tif (atom._update(valueOrFn)) {\n\t\t\tconst subs = atom.subs;\n\t\t\tif (subs !== void 0) {\n\t\t\t\tpropagate(subs);\n\t\t\t\tshallowPropagate(subs);\n\t\t\t\tflush();\n\t\t\t}\n\t\t}\n\t};\n\treturn atom;\n}\nfunction effect(fn) {\n\tconst run = () => {\n\t\tconst prevSub = activeSub;\n\t\tactiveSub = effectObj;\n\t\t++cycle;\n\t\teffectObj.depsTail = void 0;\n\t\teffectObj.flags = 2 | 4;\n\t\ttry {\n\t\t\treturn fn();\n\t\t} finally {\n\t\t\tactiveSub = prevSub;\n\t\t\teffectObj.flags &= ~4;\n\t\t\tpurgeDeps(effectObj);\n\t\t}\n\t};\n\tconst effectObj = {\n\t\tdeps: void 0,\n\t\tdepsTail: void 0,\n\t\tsubs: void 0,\n\t\tsubsTail: void 0,\n\t\tflags: 2 | 4,\n\t\tnotify() {\n\t\t\tconst flags = this.flags;\n\t\t\tif (flags & 16 || flags & 32 && checkDirty(this.deps, this)) run();\n\t\t\telse this.flags = 2;\n\t\t},\n\t\tstop() {\n\t\t\tthis.flags = 0;\n\t\t\tthis.depsTail = void 0;\n\t\t\tpurgeDeps(this);\n\t\t}\n\t};\n\trun();\n\treturn effectObj;\n}\n\n//#endregion\nexport { batch, createAsyncAtom, createAtom, flush, toObserver };\n//# sourceMappingURL=atom.js.map","import { createAtom, toObserver } from \"./atom.js\";\n\n//#region src/store.ts\nvar Store = class {\n\tconstructor(valueOrFn, actionsFactory) {\n\t\tthis.atom = createAtom(valueOrFn);\n\t\tthis.get = this.get.bind(this);\n\t\tthis.setState = this.setState.bind(this);\n\t\tthis.subscribe = this.subscribe.bind(this);\n\t\tif (actionsFactory) this.actions = actionsFactory(this);\n\t}\n\tsetState(updater) {\n\t\tthis.atom.set(updater);\n\t}\n\tget state() {\n\t\treturn this.atom.get();\n\t}\n\tget() {\n\t\treturn this.state;\n\t}\n\tsubscribe(observerOrFn) {\n\t\treturn this.atom.subscribe(toObserver(observerOrFn));\n\t}\n};\nvar ReadonlyStore = class {\n\tconstructor(valueOrFn) {\n\t\tthis.atom = createAtom(valueOrFn);\n\t}\n\tget state() {\n\t\treturn this.atom.get();\n\t}\n\tget() {\n\t\treturn this.state;\n\t}\n\tsubscribe(observerOrFn) {\n\t\treturn this.atom.subscribe(toObserver(observerOrFn));\n\t}\n};\nfunction createStore(valueOrFn, actions) {\n\tif (typeof valueOrFn === \"function\") return new ReadonlyStore(valueOrFn);\n\tif (actions) return new Store(valueOrFn, actions);\n\treturn new Store(valueOrFn);\n}\n\n//#endregion\nexport { ReadonlyStore, Store, createStore };\n//# sourceMappingURL=store.js.map","import { Store } from \"@tanstack/store\";\n//#region src/web/services/hubRevisions/index.ts\n/**\n* The host's revision topics, pushed over the hub socket instead of polled.\n*\n* Each topic is a counter the host raises when its data changes. A view reads its topic and fetches\n* again when the counter moves, and on first render. Topics read `global:<name>` (prefixed by the host\n* id on the phone, `<hostId>/global:<name>`) or `workspace:<workspaceId>:<name>` with the workspace id\n* as this client already knows it.\n*\n* No runtime React here: server code value-imports `/web` and `/native`, where react is an optional peer.\n* A view reads a topic as render state with\n* `useSyncExternalStore((listener) => subscribeHubRevision(topic, listener), () => hubRevision(topic))`.\n*/\n/** Topics by the socket that delivered them, so one host's reconnect never clears another's. */\nconst store = new Store({});\n/** The topic of host-wide data such as remote access; `hostId` only where one client holds several hosts. */\nfunction globalRevisionTopic(name, hostId) {\n\treturn hostId === void 0 ? `global:${name}` : `${hostId}/global:${name}`;\n}\n/** The topic of one workspace's data, keyed by the workspace id this client uses. */\nfunction workspaceRevisionTopic(workspaceId, name) {\n\treturn `workspace:${workspaceId}:${name}`;\n}\n/** Replaces every topic one socket delivered. Called by the host shell, never by a plugin. */\nfunction setHubRevisions(source, revisions) {\n\tstore.setState((state) => ({\n\t\t...state,\n\t\t[source]: revisions\n\t}));\n}\n/** The topic's counter, 0 until the host first raises it or when the host cannot push. */\nfunction hubRevision(topic) {\n\tfor (const revisions of Object.values(store.state)) {\n\t\tconst value = revisions[topic];\n\t\tif (value !== void 0) return value;\n\t}\n\treturn 0;\n}\n/** Calls `listener` whenever the topic's counter moves. */\nfunction subscribeHubRevision(topic, listener) {\n\tlet current = hubRevision(topic);\n\tconst { unsubscribe } = store.subscribe(() => {\n\t\tconst next = hubRevision(topic);\n\t\tif (next === current) return;\n\t\tcurrent = next;\n\t\tlistener();\n\t});\n\treturn unsubscribe;\n}\n//#endregion\nexport { globalRevisionTopic, hubRevision, setHubRevisions, subscribeHubRevision, workspaceRevisionTopic };\n\n//# sourceMappingURL=index.mjs.map","//#region src/constants/nativeHost.ts\n/**\n* The only modules a native composition may import at runtime.\n*\n* Defined once here. The CLI native build marks exactly these as external and\n* fails on any other bare import, and the po-native shell builds a frozen module\n* map whose keys must equal this list plus the Unistyles component paths.\n*/\n/** Bare specifiers the shell provides to every native composition. */\nconst NATIVE_HOST_MODULES = [\n\t\"react\",\n\t\"react/jsx-runtime\",\n\t\"react/jsx-dev-runtime\",\n\t\"react-native\",\n\t\"react-native-unistyles\",\n\t\"@tanstack/store\",\n\t\"@agimon-ai/po-core/native\",\n\t\"@agimon-ai/po-native-components\",\n\t\"@agimon-ai/po-native-components/shell\",\n\t\"@gorhom/bottom-sheet\",\n\t\"expo-symbols\",\n\t\"expo-haptics\",\n\t\"expo-clipboard\",\n\t\"@expo/vector-icons/MaterialIcons\",\n\t\"@shopify/flash-list\",\n\t\"@react-native-segmented-control/segmented-control\",\n\t\"react-native-safe-area-context\"\n];\n/** Prefix of the component imports the Unistyles Babel plugin generates. */\nconst NATIVE_UNISTYLES_COMPONENT_PREFIX = \"react-native-unistyles/components/native/\";\n/**\n* Every component under `components/native/` in react-native-unistyles 3.5.2. The Babel plugin can emit\n* all of them, including `NativeText` and `NativeView` for the `unstable_Native*` aliases.\n*/\nconst NATIVE_UNISTYLES_COMPONENTS = [\n\t\"ActivityIndicator\",\n\t\"Animated\",\n\t\"FlatList\",\n\t\"Image\",\n\t\"ImageBackground\",\n\t\"KeyboardAvoidingView\",\n\t\"NativeText\",\n\t\"NativeView\",\n\t\"Pressable\",\n\t\"RefreshControl\",\n\t\"SafeAreaView\",\n\t\"ScrollView\",\n\t\"SectionList\",\n\t\"Switch\",\n\t\"Text\",\n\t\"TextInput\",\n\t\"TouchableHighlight\",\n\t\"TouchableOpacity\",\n\t\"View\",\n\t\"VirtualizedList\"\n];\n/** The complete host module list: the bare modules plus one specifier per Unistyles component. */\nconst NATIVE_HOST_MODULE_IDS = [...NATIVE_HOST_MODULES, ...NATIVE_UNISTYLES_COMPONENTS.map((name) => `${NATIVE_UNISTYLES_COMPONENT_PREFIX}${name}`)];\n//#endregion\nexport { NATIVE_HOST_MODULES, NATIVE_HOST_MODULE_IDS, NATIVE_UNISTYLES_COMPONENTS, NATIVE_UNISTYLES_COMPONENT_PREFIX };\n\n//# sourceMappingURL=nativeHost.mjs.map","import { createRequire } from \"node:module\";\n//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, \"default\") ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\nvar __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();\n//#endregion\n//#region src/webcontainer-fallback.cjs\nvar require_webcontainer_fallback = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst fs = __require(\"node:fs\");\n\tconst childProcess = __require(\"node:child_process\");\n\tconst version = JSON.parse(fs.readFileSync(__require.resolve(\"rolldown/package.json\"), \"utf-8\")).version;\n\tconst baseDir = `/tmp/rolldown-${version}`;\n\tconst bindingEntry = `${baseDir}/node_modules/@rolldown/binding-wasm32-wasi/rolldown-binding.wasi.cjs`;\n\tif (!fs.existsSync(bindingEntry)) {\n\t\tconst bindingPkg = `@rolldown/binding-wasm32-wasi@${version}`;\n\t\tfs.rmSync(baseDir, {\n\t\t\trecursive: true,\n\t\t\tforce: true\n\t\t});\n\t\tfs.mkdirSync(baseDir, { recursive: true });\n\t\tconsole.log(`[rolldown] Downloading ${bindingPkg} on WebContainer...`);\n\t\tchildProcess.execFileSync(\"pnpm\", [\"i\", bindingPkg], {\n\t\t\tcwd: baseDir,\n\t\t\tstdio: \"inherit\"\n\t\t});\n\t}\n\tmodule.exports = __require(bindingEntry);\n}));\n//#endregion\n//#region src/binding.cjs\nvar require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { readFileSync } = __require(\"fs\");\n\tlet nativeBinding = null;\n\tlet __napiLoadedBindingTarget = \"native\";\n\tconst loadErrors = [];\n\tconst isMusl = () => {\n\t\tlet musl = false;\n\t\tif (process.platform === \"linux\") {\n\t\t\tmusl = isMuslFromFilesystem();\n\t\t\tif (musl === null) musl = isMuslFromReport();\n\t\t\tif (musl === null) musl = isMuslFromChildProcess();\n\t\t}\n\t\treturn musl;\n\t};\n\tconst isFileMusl = (f) => f.includes(\"libc.musl-\") || f.includes(\"ld-musl-\");\n\tconst isMuslFromFilesystem = () => {\n\t\ttry {\n\t\t\treturn readFileSync(\"/usr/bin/ldd\", \"utf-8\").includes(\"musl\");\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t};\n\tconst isMuslFromReport = () => {\n\t\tlet report = null;\n\t\tif (process.report && typeof process.report.getReport === \"function\") {\n\t\t\tprocess.report.excludeNetwork = true;\n\t\t\treport = process.report.getReport();\n\t\t}\n\t\tif (!report) return null;\n\t\tif (report.header && report.header.glibcVersionRuntime) return false;\n\t\tif (Array.isArray(report.sharedObjects)) {\n\t\t\tif (report.sharedObjects.some(isFileMusl)) return true;\n\t\t}\n\t\treturn false;\n\t};\n\tconst isMuslFromChildProcess = () => {\n\t\ttry {\n\t\t\treturn __require(\"child_process\").execSync(\"ldd --version\", { encoding: \"utf8\" }).includes(\"musl\");\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\tfunction requireNative() {\n\t\tif (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) try {\n\t\t\tconst overrideBinding = __require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);\n\t\t\t__napiLoadedBindingTarget = overrideBinding && typeof overrideBinding.__napiBindingTarget === \"string\" ? overrideBinding.__napiBindingTarget : \"native\";\n\t\t\treturn overrideBinding;\n\t\t} catch (err) {\n\t\t\tloadErrors.push(err);\n\t\t}\n\t\telse if (process.platform === \"android\") {\n\t\t\tif (process.arch === \"arm64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.android-arm64.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-android-arm64\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-android-arm64/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"arm\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.android-arm-eabi.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-android-arm-eabi\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-android-arm-eabi/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Android ${process.arch}`));\n\t\t} else if (process.platform === \"win32\") {\n\t\t\tif (process.arch === \"x64\") {\n\t\t\t\tif (process.config && process.config.variables && process.config.variables.shlib_suffix === \"dll.a\" || process.config && process.config.variables && process.config.variables.node_target_type === \"shared_library\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.win32-x64-gnu.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-win32-x64-gnu\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-win32-x64-gnu/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.win32-x64-msvc.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-win32-x64-msvc\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-win32-x64-msvc/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"ia32\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.win32-ia32-msvc.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-win32-ia32-msvc\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-win32-ia32-msvc/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"arm64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.win32-arm64-msvc.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-win32-arm64-msvc\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-win32-arm64-msvc/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Windows: ${process.arch}`));\n\t\t} else if (process.platform === \"darwin\") {\n\t\t\ttry {\n\t\t\t\treturn __require(\"./rolldown-binding.darwin-universal.node\");\n\t\t\t} catch (e) {\n\t\t\t\tloadErrors.push(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconst binding = __require(\"@rolldown/binding-darwin-universal\");\n\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-darwin-universal/package.json\").version;\n\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\treturn binding;\n\t\t\t} catch (e) {\n\t\t\t\tloadErrors.push(e);\n\t\t\t}\n\t\t\tif (process.arch === \"x64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.darwin-x64.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-darwin-x64\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-darwin-x64/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"arm64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.darwin-arm64.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-darwin-arm64\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-darwin-arm64/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on macOS: ${process.arch}`));\n\t\t} else if (process.platform === \"freebsd\") {\n\t\t\tif (process.arch === \"x64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.freebsd-x64.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-freebsd-x64\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-freebsd-x64/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"arm64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.freebsd-arm64.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-freebsd-arm64\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-freebsd-arm64/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));\n\t\t} else if (process.platform === \"linux\") {\n\t\t\tif (process.arch === \"x64\") {\n\t\t\t\tif (isMusl()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-x64-musl.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-x64-musl\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-x64-musl/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"../rolldown-binding.linux-x64-gnu.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-x64-gnu\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-x64-gnu/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"arm64\") {\n\t\t\t\tif (isMusl()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-arm64-musl.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-arm64-musl\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-arm64-musl/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-arm64-gnu.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-arm64-gnu\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-arm64-gnu/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"arm\") {\n\t\t\t\tif (isMusl()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-arm-musleabihf.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-arm-musleabihf\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-arm-musleabihf/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-arm-gnueabihf.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-arm-gnueabihf\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-arm-gnueabihf/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"loong64\") {\n\t\t\t\tif (isMusl()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-loong64-musl.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-loong64-musl\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-loong64-musl/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-loong64-gnu.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-loong64-gnu\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-loong64-gnu/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"riscv64\") {\n\t\t\t\tif (isMusl()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-riscv64-musl.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-riscv64-musl\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-riscv64-musl/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn __require(\"./rolldown-binding.linux-riscv64-gnu.node\");\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-riscv64-gnu\");\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-riscv64-gnu/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t\treturn binding;\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"ppc64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.linux-ppc64-gnu.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-ppc64-gnu\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-ppc64-gnu/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"s390x\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.linux-s390x-gnu.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-linux-s390x-gnu\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-linux-s390x-gnu/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Linux: ${process.arch}`));\n\t\t} else if (process.platform === \"openharmony\") {\n\t\t\tif (process.arch === \"arm64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.openharmony-arm64.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-openharmony-arm64\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-openharmony-arm64/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"x64\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.openharmony-x64.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-openharmony-x64\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-openharmony-x64/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else if (process.arch === \"arm\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn __require(\"./rolldown-binding.openharmony-arm.node\");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconst binding = __require(\"@rolldown/binding-openharmony-arm\");\n\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-openharmony-arm/package.json\").version;\n\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") throw new Error(`Native binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\treturn binding;\n\t\t\t\t} catch (e) {\n\t\t\t\t\tloadErrors.push(e);\n\t\t\t\t}\n\t\t\t} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));\n\t\t} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));\n\t}\n\tfunction createLoadErrorChain(errors) {\n\t\treturn errors.reduce((previous, current) => {\n\t\t\tlet message;\n\t\t\ttry {\n\t\t\t\tmessage = current && typeof current.message === \"string\" ? current.message : String(current);\n\t\t\t} catch {\n\t\t\t\tmessage = \"Unknown error\";\n\t\t\t}\n\t\t\tconst error = new Error(message);\n\t\t\terror.cause = previous;\n\t\t\treturn error;\n\t\t}, null);\n\t}\n\tconst __napiWasiFlavors = [\"wasm32-wasi\"];\n\tconst __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR;\n\tconst __napiWasiFlavorRequested = typeof __napiWasiFlavor === \"string\" && __napiWasiFlavor.length > 0;\n\tif (__napiWasiFlavorRequested && __napiWasiFlavors.indexOf(__napiWasiFlavor) === -1) throw new Error(\"Unsupported WASI flavor \\\"\" + __napiWasiFlavor + \"\\\". Available flavors: \" + __napiWasiFlavors.join(\", \"));\n\tconst forceWasiError = process.env.NAPI_RS_FORCE_WASI === \"error\";\n\tconst forceWasi = process.env.NAPI_RS_FORCE_WASI === \"true\" || forceWasiError || __napiWasiFlavorRequested;\n\tif (!forceWasi) nativeBinding = requireNative();\n\tif (!nativeBinding || forceWasi) {\n\t\tlet wasiBinding = null;\n\t\tlet wasiBindingLoaded = false;\n\t\tconst wasiBindingErrors = [];\n\t\tconst __napiWasiResolveCandidate = (specifier, isPackage, localArtifacts) => {\n\t\t\ttry {\n\t\t\t\t__require.resolve(specifier);\n\t\t\t} catch (resolveError) {\n\t\t\t\tif (!resolveError || resolveError.code !== \"MODULE_NOT_FOUND\") throw resolveError;\n\t\t\t\tif (isPackage) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\t__require.resolve(specifier + \"/package.json\");\n\t\t\t\t\t} catch (packageError) {\n\t\t\t\t\t\tif (packageError && packageError.code === \"MODULE_NOT_FOUND\") return resolveError;\n\t\t\t\t\t\tthrow resolveError;\n\t\t\t\t\t}\n\t\t\t\t\tthrow resolveError;\n\t\t\t\t}\n\t\t\t\treturn resolveError;\n\t\t\t}\n\t\t\tif (localArtifacts) {\n\t\t\t\tlet artifactError = null;\n\t\t\t\tfor (let i = 0; i < localArtifacts.length; i++) try {\n\t\t\t\t\t__require.resolve(localArtifacts[i]);\n\t\t\t\t\treturn null;\n\t\t\t\t} catch (resolveError) {\n\t\t\t\t\tif (!resolveError || resolveError.code !== \"MODULE_NOT_FOUND\") throw resolveError;\n\t\t\t\t\tartifactError = resolveError;\n\t\t\t\t}\n\t\t\t\treturn artifactError;\n\t\t\t}\n\t\t\treturn null;\n\t\t};\n\t\tif (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === \"wasm32-wasi\")) {\n\t\t\tlet candidateError = null;\n\t\t\tlet candidateFailed = false;\n\t\t\ttry {\n\t\t\t\tcandidateError = __napiWasiResolveCandidate(\"./rolldown-binding.wasi.cjs\", false, [\"./rolldown-binding.wasm32-wasi.debug.wasm\", \"./rolldown-binding.wasm32-wasi.wasm\"]);\n\t\t\t\tcandidateFailed = candidateError !== null;\n\t\t\t\tif (!candidateFailed) {\n\t\t\t\t\twasiBinding = __require(\"../rolldown-binding.wasi.cjs\");\n\t\t\t\t\tnativeBinding = wasiBinding;\n\t\t\t\t\t__napiLoadedBindingTarget = \"wasm32-wasi\";\n\t\t\t\t\twasiBindingLoaded = true;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tcandidateError = err;\n\t\t\t\tcandidateFailed = true;\n\t\t\t}\n\t\t\tif (candidateFailed) {\n\t\t\t\twasiBindingErrors.push(candidateError);\n\t\t\t\tloadErrors.push(candidateError);\n\t\t\t}\n\t\t}\n\t\tif (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === \"wasm32-wasi\")) {\n\t\t\tlet candidateError = null;\n\t\t\tlet candidateFailed = false;\n\t\t\ttry {\n\t\t\t\tcandidateError = __napiWasiResolveCandidate(\"@rolldown/binding-wasm32-wasi\", true, void 0);\n\t\t\t\tcandidateFailed = candidateError !== null;\n\t\t\t\tif (!candidateFailed) {\n\t\t\t\t\tif (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== \"0\") {\n\t\t\t\t\t\tconst bindingPackageVersion = __require(\"@rolldown/binding-wasm32-wasi/package.json\").version;\n\t\t\t\t\t\tif (bindingPackageVersion !== \"1.2.14\") throw new Error(`WASI binding package version mismatch, expected 1.2.14 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);\n\t\t\t\t\t}\n\t\t\t\t\twasiBinding = __require(\"@rolldown/binding-wasm32-wasi\");\n\t\t\t\t\tnativeBinding = wasiBinding;\n\t\t\t\t\t__napiLoadedBindingTarget = \"wasm32-wasi\";\n\t\t\t\t\twasiBindingLoaded = true;\n\t\t\t\t}\n\t\t\t} catch (err) {\n\t\t\t\tcandidateError = err;\n\t\t\t\tcandidateFailed = true;\n\t\t\t}\n\t\t\tif (candidateFailed) {\n\t\t\t\twasiBindingErrors.push(candidateError);\n\t\t\t\tloadErrors.push(candidateError);\n\t\t\t}\n\t\t}\n\t\tif (!wasiBindingLoaded && forceWasi && !forceWasiError && !__napiWasiFlavorRequested) nativeBinding = requireNative();\n\t\tif ((forceWasiError || __napiWasiFlavorRequested) && !wasiBindingLoaded) {\n\t\t\tconst error = /* @__PURE__ */ new Error(__napiWasiFlavorRequested ? \"WASI binding for flavor \\\"\" + __napiWasiFlavor + \"\\\" not found\" : \"WASI binding not found and NAPI_RS_FORCE_WASI is set to error\");\n\t\t\terror.cause = createLoadErrorChain(wasiBindingErrors);\n\t\t\tthrow error;\n\t\t}\n\t}\n\tif (!nativeBinding && globalThis.process?.versions?.[\"webcontainer\"]) try {\n\t\tnativeBinding = require_webcontainer_fallback();\n\t\t__napiLoadedBindingTarget = \"wasm32-wasi\";\n\t} catch (err) {\n\t\tloadErrors.push(err);\n\t}\n\tif (!nativeBinding) {\n\t\tif (loadErrors.length > 0) {\n\t\t\tconst error = /* @__PURE__ */ new Error(\"Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.\");\n\t\t\terror.cause = createLoadErrorChain(loadErrors);\n\t\t\tthrow error;\n\t\t}\n\t\tthrow new Error(`Failed to load native binding`);\n\t}\n\tfunction __napiStampBindingTarget(exportsObject, target) {\n\t\tif (Object.prototype.hasOwnProperty.call(exportsObject, \"__napiBindingTarget\")) {\n\t\t\tif (exportsObject.__napiBindingTarget === target) return target;\n\t\t\tconst error = /* @__PURE__ */ new Error(\"`__napiBindingTarget` is reserved by the generated binding loader, but the loaded binding already exports it. Rename the export, e.g. #[napi(js_name = \\\"...\\\")].\");\n\t\t\terror.code = \"ERR_NAPI_BINDING_TARGET_CONFLICT\";\n\t\t\tthrow error;\n\t\t}\n\t\tif (!Object.isExtensible(exportsObject)) return target;\n\t\ttry {\n\t\t\tObject.defineProperty(exportsObject, \"__napiBindingTarget\", {\n\t\t\t\tconfigurable: true,\n\t\t\t\tenumerable: true,\n\t\t\t\tvalue: target,\n\t\t\t\twritable: true\n\t\t\t});\n\t\t} catch {}\n\t\treturn target;\n\t}\n\tmodule.exports.__napiBindingTarget = __napiStampBindingTarget(nativeBinding, __napiLoadedBindingTarget);\n\tmodule.exports = nativeBinding;\n\tmodule.exports.LegalCommentsMode = nativeBinding.LegalCommentsMode;\n\tmodule.exports.minify = nativeBinding.minify;\n\tmodule.exports.minifySync = nativeBinding.minifySync;\n\tmodule.exports.Severity = nativeBinding.Severity;\n\tmodule.exports.ParseResult = nativeBinding.ParseResult;\n\tmodule.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;\n\tmodule.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;\n\tmodule.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;\n\tmodule.exports.ImportNameKind = nativeBinding.ImportNameKind;\n\tmodule.exports.parse = nativeBinding.parse;\n\tmodule.exports.parseSync = nativeBinding.parseSync;\n\tmodule.exports.rawTransferSupported = nativeBinding.rawTransferSupported;\n\tmodule.exports.ResolverFactory = nativeBinding.ResolverFactory;\n\tmodule.exports.EnforceExtension = nativeBinding.EnforceExtension;\n\tmodule.exports.ModuleType = nativeBinding.ModuleType;\n\tmodule.exports.sync = nativeBinding.sync;\n\tmodule.exports.HelperMode = nativeBinding.HelperMode;\n\tmodule.exports.isolatedDeclaration = nativeBinding.isolatedDeclaration;\n\tmodule.exports.isolatedDeclarationSync = nativeBinding.isolatedDeclarationSync;\n\tmodule.exports.moduleRunnerTransform = nativeBinding.moduleRunnerTransform;\n\tmodule.exports.moduleRunnerTransformSync = nativeBinding.moduleRunnerTransformSync;\n\tmodule.exports.transform = nativeBinding.transform;\n\tmodule.exports.transformSync = nativeBinding.transformSync;\n\tmodule.exports.BindingBundleEndEventData = nativeBinding.BindingBundleEndEventData;\n\tmodule.exports.BindingBundleErrorEventData = nativeBinding.BindingBundleErrorEventData;\n\tmodule.exports.BindingBundler = nativeBinding.BindingBundler;\n\tmodule.exports.BindingCallableBuiltinPlugin = nativeBinding.BindingCallableBuiltinPlugin;\n\tmodule.exports.BindingChunkingContext = nativeBinding.BindingChunkingContext;\n\tmodule.exports.BindingDecodedMap = nativeBinding.BindingDecodedMap;\n\tmodule.exports.BindingDevEngine = nativeBinding.BindingDevEngine;\n\tmodule.exports.BindingLoadPluginContext = nativeBinding.BindingLoadPluginContext;\n\tmodule.exports.BindingMagicString = nativeBinding.BindingMagicString;\n\tmodule.exports.BindingModuleInfo = nativeBinding.BindingModuleInfo;\n\tmodule.exports.BindingNormalizedOptions = nativeBinding.BindingNormalizedOptions;\n\tmodule.exports.BindingOutputAsset = nativeBinding.BindingOutputAsset;\n\tmodule.exports.BindingOutputChunk = nativeBinding.BindingOutputChunk;\n\tmodule.exports.BindingPluginContext = nativeBinding.BindingPluginContext;\n\tmodule.exports.BindingRenderedChunk = nativeBinding.BindingRenderedChunk;\n\tmodule.exports.BindingRenderedChunkMeta = nativeBinding.BindingRenderedChunkMeta;\n\tmodule.exports.BindingRenderedModule = nativeBinding.BindingRenderedModule;\n\tmodule.exports.BindingSourceMap = nativeBinding.BindingSourceMap;\n\tmodule.exports.BindingTransformPluginContext = nativeBinding.BindingTransformPluginContext;\n\tmodule.exports.BindingWatcher = nativeBinding.BindingWatcher;\n\tmodule.exports.BindingWatcherBundler = nativeBinding.BindingWatcherBundler;\n\tmodule.exports.BindingWatcherChangeData = nativeBinding.BindingWatcherChangeData;\n\tmodule.exports.BindingWatcherEvent = nativeBinding.BindingWatcherEvent;\n\tmodule.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;\n\tmodule.exports.TraceSubscriberGuard = nativeBinding.TraceSubscriberGuard;\n\tmodule.exports.TsconfigCache = nativeBinding.TsconfigCache;\n\tmodule.exports.BindingAttachDebugInfo = nativeBinding.BindingAttachDebugInfo;\n\tmodule.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;\n\tmodule.exports.BindingChunkModuleOrderBy = nativeBinding.BindingChunkModuleOrderBy;\n\tmodule.exports.BindingErrorStage = nativeBinding.BindingErrorStage;\n\tmodule.exports.BindingLogLevel = nativeBinding.BindingLogLevel;\n\tmodule.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;\n\tmodule.exports.BindingPropertyReadSideEffects = nativeBinding.BindingPropertyReadSideEffects;\n\tmodule.exports.BindingPropertyWriteSideEffects = nativeBinding.BindingPropertyWriteSideEffects;\n\tmodule.exports.BindingRebuildStrategy = nativeBinding.BindingRebuildStrategy;\n\tmodule.exports.collapseSourcemaps = nativeBinding.collapseSourcemaps;\n\tmodule.exports.enhancedTransform = nativeBinding.enhancedTransform;\n\tmodule.exports.enhancedTransformSync = nativeBinding.enhancedTransformSync;\n\tmodule.exports.FilterTokenKind = nativeBinding.FilterTokenKind;\n\tmodule.exports.getNativeMemoryStats = nativeBinding.getNativeMemoryStats;\n\tmodule.exports.initTraceSubscriber = nativeBinding.initTraceSubscriber;\n\tmodule.exports.registerPlugins = nativeBinding.registerPlugins;\n\tmodule.exports.resetNativeMemoryStats = nativeBinding.resetNativeMemoryStats;\n\tmodule.exports.resolveTsconfig = nativeBinding.resolveTsconfig;\n\tmodule.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;\n\tmodule.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;\n}));\n//#endregion\nexport { __toESM as n, require_binding as t };\n","//#region src/utils/code-frame.ts\nfunction spaces(index) {\n\tlet result = \"\";\n\twhile (index--) result += \" \";\n\treturn result;\n}\nfunction tabsToSpaces(value) {\n\treturn value.replace(/^\\t+/, (match) => match.split(\"\t\").join(\"  \"));\n}\nconst LINE_TRUNCATE_LENGTH = 120;\nconst MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;\nconst ELLIPSIS = \"...\";\nfunction getCodeFrame(source, line, column) {\n\tlet lines = source.split(\"\\n\");\n\tif (line > lines.length) return \"\";\n\tconst maxLineLength = Math.max(tabsToSpaces(lines[line - 1].slice(0, column)).length + MIN_CHARACTERS_SHOWN_AFTER_LOCATION + 3, LINE_TRUNCATE_LENGTH);\n\tconst frameStart = Math.max(0, line - 3);\n\tlet frameEnd = Math.min(line + 2, lines.length);\n\tlines = lines.slice(frameStart, frameEnd);\n\twhile (!/\\S/.test(lines[lines.length - 1])) {\n\t\tlines.pop();\n\t\tframeEnd -= 1;\n\t}\n\tconst digits = String(frameEnd).length;\n\treturn lines.map((sourceLine, index) => {\n\t\tconst isErrorLine = frameStart + index + 1 === line;\n\t\tlet lineNumber = String(index + frameStart + 1);\n\t\twhile (lineNumber.length < digits) lineNumber = ` ${lineNumber}`;\n\t\tlet displayedLine = tabsToSpaces(sourceLine);\n\t\tif (displayedLine.length > maxLineLength) displayedLine = `${displayedLine.slice(0, maxLineLength - 3)}${ELLIPSIS}`;\n\t\tif (isErrorLine) {\n\t\t\tconst indicator = spaces(digits + 2 + tabsToSpaces(sourceLine.slice(0, column)).length) + \"^\";\n\t\t\treturn `${lineNumber}: ${displayedLine}\\n${indicator}`;\n\t\t}\n\t\treturn `${lineNumber}: ${displayedLine}`;\n\t}).join(\"\\n\");\n}\n//#endregion\n//#region src/log/locate-character/index.js\n/** @typedef {import('./types').Location} Location */\n/**\n* @param {import('./types').Range} range\n* @param {number} index\n*/\nfunction rangeContains(range, index) {\n\treturn range.start <= index && index < range.end;\n}\n/**\n* @param {string} source\n* @param {import('./types').Options} [options]\n*/\nfunction getLocator(source, options = {}) {\n\tconst { offsetLine = 0, offsetColumn = 0 } = options;\n\tlet start = 0;\n\tconst ranges = source.split(\"\\n\").map((line, i) => {\n\t\tconst end = start + line.length + 1;\n\t\t/** @type {import('./types').Range} */\n\t\tconst range = {\n\t\t\tstart,\n\t\t\tend,\n\t\t\tline: i\n\t\t};\n\t\tstart = end;\n\t\treturn range;\n\t});\n\tlet i = 0;\n\t/**\n\t* @param {string | number} search\n\t* @param {number} [index]\n\t* @returns {Location | undefined}\n\t*/\n\tfunction locator(search, index) {\n\t\tif (typeof search === \"string\") search = source.indexOf(search, index ?? 0);\n\t\tif (search === -1) return void 0;\n\t\tlet range = ranges[i];\n\t\tconst d = search >= range.end ? 1 : -1;\n\t\twhile (range) {\n\t\t\tif (rangeContains(range, search)) return {\n\t\t\t\tline: offsetLine + range.line,\n\t\t\t\tcolumn: offsetColumn + search - range.start,\n\t\t\t\tcharacter: search\n\t\t\t};\n\t\t\ti += d;\n\t\t\trange = ranges[i];\n\t\t}\n\t}\n\treturn locator;\n}\n/**\n* @param {string} source\n* @param {string | number} search\n* @param {import('./types').Options} [options]\n* @returns {Location | undefined}\n*/\nfunction locate(source, search, options) {\n\treturn getLocator(source, options)(search, options && options.startIndex);\n}\n//#endregion\n//#region src/log/logs.ts\nconst INVALID_LOG_POSITION = \"INVALID_LOG_POSITION\";\nconst PLUGIN_ERROR = \"PLUGIN_ERROR\";\nconst INPUT_HOOK_IN_OUTPUT_PLUGIN = \"INPUT_HOOK_IN_OUTPUT_PLUGIN\";\nconst CYCLE_LOADING = \"CYCLE_LOADING\";\nconst MULTIPLE_WATCHER_OPTION = \"MULTIPLE_WATCHER_OPTION\";\nconst MISSING_CODE_SPLITTING_GROUP_DEBUG_NAME = \"MISSING_CODE_SPLITTING_GROUP_DEBUG_NAME\";\nconst PARSE_ERROR = \"PARSE_ERROR\";\nconst VALIDATION_ERROR = \"VALIDATION_ERROR\";\nfunction logParseError(message, id, pos) {\n\treturn {\n\t\tcode: PARSE_ERROR,\n\t\tid,\n\t\tmessage,\n\t\tpos\n\t};\n}\nfunction logFailedValidation(message) {\n\treturn {\n\t\tcode: VALIDATION_ERROR,\n\t\tmessage\n\t};\n}\nfunction logInvalidLogPosition(pluginName) {\n\treturn {\n\t\tcode: INVALID_LOG_POSITION,\n\t\tmessage: `Plugin \"${pluginName}\" tried to add a file position to a log or warning. This is only supported in the \"transform\" hook at the moment and will be ignored.`\n\t};\n}\nfunction logInputHookInOutputPlugin(pluginName, hookName) {\n\treturn {\n\t\tcode: INPUT_HOOK_IN_OUTPUT_PLUGIN,\n\t\tmessage: `The \"${hookName}\" hook used by the output plugin ${pluginName} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`\n\t};\n}\nfunction logCycleLoading(pluginName, moduleId) {\n\treturn {\n\t\tcode: CYCLE_LOADING,\n\t\tmessage: `Found the module \"${moduleId}\" cycle loading at ${pluginName} plugin, it maybe blocking fetching modules.`\n\t};\n}\nfunction logMultipleWatcherOption() {\n\treturn {\n\t\tcode: MULTIPLE_WATCHER_OPTION,\n\t\tmessage: `Found multiple watcher options at watch options, using first one to start watcher.`\n\t};\n}\nfunction logMissingCodeSplittingGroupDebugName(groupPath) {\n\treturn {\n\t\tcode: MISSING_CODE_SPLITTING_GROUP_DEBUG_NAME,\n\t\tmessage: `\\`${groupPath}.name\\` is a function. Set \\`${groupPath}.debugName\\` so the bundler timing report can identify this group.`\n\t};\n}\nfunction logPluginError(error, plugin, { hook, id } = {}) {\n\ttry {\n\t\tconst code = error.code;\n\t\tif (!error.pluginCode && code != null && (typeof code !== \"string\" || !code.startsWith(\"PLUGIN_\"))) error.pluginCode = code;\n\t\terror.code = PLUGIN_ERROR;\n\t\terror.plugin = plugin;\n\t\tif (hook) error.hook = hook;\n\t\tif (id) error.id = id;\n\t} catch (_) {} finally {\n\t\treturn error;\n\t}\n}\nfunction error(base) {\n\tif (!(base instanceof Error)) {\n\t\tbase = Object.assign(new Error(base.message), base);\n\t\tObject.defineProperty(base, \"name\", {\n\t\t\tvalue: \"RolldownError\",\n\t\t\twritable: true\n\t\t});\n\t}\n\tthrow base;\n}\nfunction augmentCodeLocation(properties, pos, source, id) {\n\tif (typeof pos === \"object\") {\n\t\tconst { line, column } = pos;\n\t\tproperties.loc = {\n\t\t\tcolumn,\n\t\t\tfile: id,\n\t\t\tline\n\t\t};\n\t} else {\n\t\tproperties.pos = pos;\n\t\tconst location = locate(source, pos, { offsetLine: 1 });\n\t\tif (!location) return;\n\t\tconst { line, column } = location;\n\t\tproperties.loc = {\n\t\t\tcolumn,\n\t\t\tfile: id,\n\t\t\tline\n\t\t};\n\t}\n\tif (properties.frame === void 0) {\n\t\tconst { line, column } = properties.loc;\n\t\tproperties.frame = getCodeFrame(source, line, column);\n\t}\n}\n//#endregion\nexport { logInputHookInOutputPlugin as a, logMultipleWatcherOption as c, locate as d, getCodeFrame as f, logFailedValidation as i, logParseError as l, error as n, logInvalidLogPosition as o, logCycleLoading as r, logMissingCodeSplittingGroupDebugName as s, augmentCodeLocation as t, logPluginError as u };\n","import { n as __toESM, t as require_binding } from \"./binding-CUpfdq6A.mjs\";\nimport { n as error, u as logPluginError } from \"./logs-D6uA606S.mjs\";\n//#region src/builtin-plugin/utils.ts\nvar import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);\nvar BuiltinPlugin = class {\n\tname;\n\t_options;\n\t/** Vite-specific option to control plugin ordering */\n\tenforce;\n\tconstructor(name, _options) {\n\t\tthis.name = name;\n\t\tthis._options = _options;\n\t}\n};\nfunction makeBuiltinPluginCallable(plugin) {\n\tlet callablePlugin = new import_binding.BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));\n\tconst wrappedPlugin = plugin;\n\tfor (const key in callablePlugin) {\n\t\tconst wrappedHook = async function(...args) {\n\t\t\ttry {\n\t\t\t\treturn await callablePlugin[key](...args);\n\t\t\t} catch (e) {\n\t\t\t\tif (e instanceof Error && !e.stack?.includes(\"at \")) Error.captureStackTrace(e, wrappedPlugin[key]);\n\t\t\t\treturn error(logPluginError(e, plugin.name, {\n\t\t\t\t\thook: key,\n\t\t\t\t\tid: key === \"transform\" ? args[2] : void 0\n\t\t\t\t}));\n\t\t\t}\n\t\t};\n\t\tconst order = callablePlugin.getOrder(key);\n\t\tif (order == void 0) wrappedPlugin[key] = wrappedHook;\n\t\telse wrappedPlugin[key] = {\n\t\t\thandler: wrappedHook,\n\t\t\torder\n\t\t};\n\t}\n\treturn wrappedPlugin;\n}\nfunction bindingifyBuiltInPlugin(plugin) {\n\treturn {\n\t\t__name: plugin.name,\n\t\toptions: plugin._options\n\t};\n}\nfunction bindingifyManifestPlugin(plugin, pluginContextData) {\n\tconst { isOutputOptionsForLegacyChunks, ...options } = plugin._options;\n\treturn {\n\t\t__name: plugin.name,\n\t\toptions: {\n\t\t\t...options,\n\t\t\tisLegacy: isOutputOptionsForLegacyChunks ? (opts) => {\n\t\t\t\treturn isOutputOptionsForLegacyChunks(pluginContextData.getOutputOptions(opts));\n\t\t\t} : void 0\n\t\t}\n\t};\n}\n//#endregion\n//#region src/utils/normalize-string-or-regex.ts\nfunction normalizedStringOrRegex(pattern) {\n\tif (!pattern) return;\n\tif (!isReadonlyArray(pattern)) return [pattern];\n\treturn pattern;\n}\nfunction isReadonlyArray(input) {\n\treturn Array.isArray(input);\n}\n//#endregion\nexport { makeBuiltinPluginCallable as a, bindingifyManifestPlugin as i, BuiltinPlugin as n, bindingifyBuiltInPlugin as r, normalizedStringOrRegex as t };\n","//#region src/utils/misc.ts\nfunction arraify(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\nfunction isPromiseLike(value) {\n\treturn value && (typeof value === \"object\" || typeof value === \"function\") && typeof value.then === \"function\";\n}\nfunction unimplemented(info) {\n\tif (info) throw new Error(`unimplemented: ${info}`);\n\tthrow new Error(\"unimplemented\");\n}\nfunction unreachable(info) {\n\tif (info) throw new Error(`unreachable: ${info}`);\n\tthrow new Error(\"unreachable\");\n}\nfunction unsupported(info) {\n\tthrow new Error(`UNSUPPORTED: ${info}`);\n}\nfunction noop(..._args) {}\nconst ABSOLUTE_PATH_REGEX = /^(?:\\/|(?:[A-Za-z]:)?[/\\\\|])/;\n/**\n* Whether `name` is a path fragment — an absolute or relative path. Emitted file\n* names, `[name]` substitutions and file-name patterns can be neither.\n*/\nfunction isPathFragment(name) {\n\treturn name[0] === \"/\" || name[0] === \".\" && (name[1] === \"/\" || name[1] === \".\") || ABSOLUTE_PATH_REGEX.test(name);\n}\n//#endregion\nexport { unimplemented as a, noop as i, isPathFragment as n, unreachable as o, isPromiseLike as r, unsupported as s, arraify as t };\n","import { t as require_binding } from \"./binding-CUpfdq6A.mjs\";\n//#region src/types/sourcemap.ts\nfunction bindingifySourcemap(map) {\n\tif (map == null) return;\n\treturn { inner: typeof map === \"string\" ? map : {\n\t\tfile: map.file ?? void 0,\n\t\tmappings: map.mappings,\n\t\tsourceRoot: \"sourceRoot\" in map ? map.sourceRoot ?? void 0 : void 0,\n\t\tsources: map.sources?.map((s) => s ?? void 0),\n\t\tsourcesContent: map.sourcesContent?.map((s) => s ?? void 0),\n\t\tnames: map.names,\n\t\tignoreList: map.ignoreList,\n\t\tx_google_ignoreList: map.x_google_ignoreList,\n\t\tdebugId: \"debugId\" in map ? map.debugId : void 0\n\t} };\n}\nrequire_binding();\nfunction unwrapBindingResult(container) {\n\tif (typeof container === \"object\" && container !== null && \"isBindingErrors\" in container && container.isBindingErrors) throw aggregateBindingErrorsIntoJsError(container.errors);\n\treturn container;\n}\nfunction normalizeBindingResult(container) {\n\tif (typeof container === \"object\" && container !== null && \"isBindingErrors\" in container && container.isBindingErrors) return aggregateBindingErrorsIntoJsError(container.errors);\n\treturn container;\n}\nfunction normalizeBindingError(e) {\n\treturn e.type === \"JsError\" ? e.field0 : Object.assign(/* @__PURE__ */ new Error(), {\n\t\tcode: e.field0.kind,\n\t\tkind: e.field0.kind,\n\t\tmessage: e.field0.message,\n\t\tid: e.field0.id,\n\t\texporter: e.field0.exporter,\n\t\tloc: e.field0.loc,\n\t\tpos: e.field0.pos,\n\t\tstack: void 0\n\t});\n}\nfunction aggregateBindingErrorsIntoJsError(rawErrors) {\n\tconst errors = rawErrors.map(normalizeBindingError);\n\tlet summary = `Build failed with ${errors.length} error${errors.length < 2 ? \"\" : \"s\"}:\\n`;\n\tfor (let i = 0; i < errors.length; i++) {\n\t\tsummary += \"\\n\";\n\t\tif (i >= 5) {\n\t\t\tsummary += \"...\";\n\t\t\tbreak;\n\t\t}\n\t\tsummary += getErrorMessage(errors[i]);\n\t}\n\tconst wrapper = new Error(summary);\n\tObject.defineProperty(wrapper, \"errors\", {\n\t\tconfigurable: true,\n\t\tenumerable: true,\n\t\tget: () => errors,\n\t\tset: (value) => Object.defineProperty(wrapper, \"errors\", {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: true,\n\t\t\tvalue\n\t\t})\n\t});\n\treturn wrapper;\n}\nfunction getErrorMessage(e) {\n\tif (Object.hasOwn(e, \"kind\")) return e.message;\n\tlet s = \"\";\n\tif (e.plugin) s += `[plugin ${e.plugin}]`;\n\tconst id = e.id ?? e.loc?.file;\n\tif (id) {\n\t\ts += \" \" + id;\n\t\tif (e.loc) s += `:${e.loc.line}:${e.loc.column}`;\n\t}\n\tif (s) s += \"\\n\";\n\tconst message = `${e.name ?? \"Error\"}: ${e.message}`;\n\ts += message;\n\tif (e.frame) s = joinNewLine(s, e.frame);\n\tif (e.stack) s = joinNewLine(s, e.stack.replace(message, \"\"));\n\tif (e.cause) {\n\t\ts = joinNewLine(s, \"Caused by:\");\n\t\ts = joinNewLine(s, getErrorMessage(e.cause).split(\"\\n\").map((line) => \"  \" + line).join(\"\\n\"));\n\t}\n\treturn s;\n}\nfunction joinNewLine(s1, s2) {\n\treturn s1.replace(/\\n+$/, \"\") + \"\\n\" + s2.replace(/^\\n+/, \"\");\n}\n//#endregion\nexport { bindingifySourcemap as a, unwrapBindingResult as i, normalizeBindingError as n, normalizeBindingResult as r, aggregateBindingErrorsIntoJsError as t };\n","import { n as __toESM, t as require_binding } from \"./binding-CUpfdq6A.mjs\";\n//#region ../../node_modules/.pnpm/oxc-parser@0.154.0/node_modules/oxc-parser/src-js/wrap.js\nvar import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);\nfunction wrap(result) {\n\tlet program, module, comments, errors;\n\treturn {\n\t\tget program() {\n\t\t\tif (!program) program = jsonParseAst(result.program);\n\t\t\treturn program;\n\t\t},\n\t\tget module() {\n\t\t\tif (!module) module = result.module;\n\t\t\treturn module;\n\t\t},\n\t\tget comments() {\n\t\t\tif (!comments) comments = result.comments;\n\t\t\treturn comments;\n\t\t},\n\t\tget errors() {\n\t\t\tif (!errors) errors = result.errors;\n\t\t\treturn errors;\n\t\t}\n\t};\n}\nfunction jsonParseAst(programJson) {\n\tconst { node: program, fixes } = JSON.parse(programJson);\n\tfor (const fixPath of fixes) applyFix(program, fixPath);\n\treturn program;\n}\nfunction applyFix(program, fixPath) {\n\tlet node = program;\n\tfor (const key of fixPath) node = node[key];\n\tif (node.bigint) node.value = BigInt(node.bigint);\n\telse try {\n\t\tnode.value = RegExp(node.regex.pattern, node.regex.flags);\n\t} catch {}\n}\n//#endregion\n//#region src/utils/parse.ts\n/**\n* Parse JS/TS source asynchronously on a separate thread.\n*\n* Note that not all of the workload can happen on a separate thread.\n* Parsing on Rust side does happen in a separate thread, but deserialization of the AST to JS objects\n* has to happen on current thread. This synchronous deserialization work typically outweighs\n* the asynchronous parsing by a factor of between 3 and 20.\n*\n* i.e. the majority of the workload cannot be parallelized by using this method.\n*\n* Generally {@linkcode parseSync} is preferable to use as it does not have the overhead of spawning a thread.\n* If you need to parallelize parsing multiple files, it is recommended to use worker threads.\n*\n* @category Utilities\n*/\nasync function parse(filename, sourceText, options) {\n\treturn wrap(await (0, import_binding.parse)(filename, sourceText, options));\n}\n/**\n* Parse JS/TS source synchronously on current thread.\n*\n* This is generally preferable over {@linkcode parse} (async) as it does not have the overhead\n* of spawning a thread, and the majority of the workload cannot be parallelized anyway\n* (see {@linkcode parse} documentation for details).\n*\n* If you need to parallelize parsing multiple files, it is recommended to use worker threads\n* with {@linkcode parseSync} rather than using {@linkcode parse}.\n*\n* @category Utilities\n*/\nfunction parseSync(filename, sourceText, options) {\n\treturn wrap((0, import_binding.parseSync)(filename, sourceText, options));\n}\n//#endregion\nexport { parseSync as n, parse as t };\n","import { d as locate, f as getCodeFrame, l as logParseError, n as error, t as augmentCodeLocation } from \"./shared/logs-D6uA606S.mjs\";\nimport { n as parseSync, t as parse } from \"./shared/parse-BFmj01mi.mjs\";\n//#region src/parse-ast-index.ts\nfunction wrap(result, filename, sourceText) {\n\tif (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);\n\treturn result.program;\n}\nfunction normalizeParseError(filename, sourceText, errors) {\n\tlet message = `Parse failed with ${errors.length} error${errors.length < 2 ? \"\" : \"s\"}:\\n`;\n\tconst pos = errors[0]?.labels?.[0]?.start;\n\tfor (let i = 0; i < errors.length; i++) {\n\t\tif (i >= 5) {\n\t\t\tmessage += \"\\n...\";\n\t\t\tbreak;\n\t\t}\n\t\tconst e = errors[i];\n\t\tmessage += e.message + \"\\n\" + e.labels.map((label) => {\n\t\t\tconst location = locate(sourceText, label.start, { offsetLine: 1 });\n\t\t\tif (!location) return;\n\t\t\treturn getCodeFrame(sourceText, location.line, location.column);\n\t\t}).filter(Boolean).join(\"\\n\");\n\t}\n\tconst log = logParseError(message, filename, pos);\n\tif (pos !== void 0 && filename) augmentCodeLocation(log, pos, sourceText, filename);\n\treturn error(log);\n}\nconst defaultParserOptions = {\n\tlang: \"js\",\n\tpreserveParens: false\n};\n/**\n* Parse code synchronously and return the AST.\n*\n* This function is similar to Rollup's `parseAst` function.\n* Prefer using {@linkcode parseSync} instead of this function as it has more information in the return value.\n*\n* @category Utilities\n*/\nfunction parseAst(sourceText, options, filename) {\n\treturn wrap(parseSync(filename ?? \"file.js\", sourceText, {\n\t\t...defaultParserOptions,\n\t\t...options\n\t}), filename, sourceText);\n}\n/**\n* Parse code asynchronously and return the AST.\n*\n* This function is similar to Rollup's `parseAstAsync` function.\n* Prefer using {@linkcode parseAsync} instead of this function as it has more information in the return value.\n*\n* @category Utilities\n*/\nasync function parseAstAsync(sourceText, options, filename) {\n\treturn wrap(await parse(filename ?? \"file.js\", sourceText, {\n\t\t...defaultParserOptions,\n\t\t...options\n\t}), filename, sourceText);\n}\n//#endregion\nexport { parseAst, parseAstAsync };\n","//#region src/utils.ts\nconst postfixRE = /[?#].*$/;\nfunction cleanUrl(url) {\n\treturn url.replace(postfixRE, \"\");\n}\nfunction extractQueryWithoutFragment(url) {\n\tconst questionMarkIndex = url.indexOf(\"?\");\n\tif (questionMarkIndex === -1) return \"\";\n\tconst fragmentIndex = url.indexOf(\"#\", questionMarkIndex);\n\tif (fragmentIndex === -1) return url.substring(questionMarkIndex);\n\telse return url.substring(questionMarkIndex, fragmentIndex);\n}\n//#endregion\n//#region src/filter/composable-filters.ts\nvar And = class {\n\tkind;\n\targs;\n\tconstructor(...args) {\n\t\tif (args.length === 0) throw new Error(\"`And` expects at least one operand\");\n\t\tthis.args = args;\n\t\tthis.kind = \"and\";\n\t}\n};\nvar Or = class {\n\tkind;\n\targs;\n\tconstructor(...args) {\n\t\tif (args.length === 0) throw new Error(\"`Or` expects at least one operand\");\n\t\tthis.args = args;\n\t\tthis.kind = \"or\";\n\t}\n};\nvar Not = class {\n\tkind;\n\texpr;\n\tconstructor(expr) {\n\t\tthis.expr = expr;\n\t\tthis.kind = \"not\";\n\t}\n};\nvar Id = class {\n\tkind;\n\tpattern;\n\tparams;\n\tconstructor(pattern, params) {\n\t\tthis.pattern = pattern;\n\t\tthis.kind = \"id\";\n\t\tthis.params = params ?? { cleanUrl: false };\n\t}\n};\nvar ImporterId = class {\n\tkind;\n\tpattern;\n\tparams;\n\tconstructor(pattern, params) {\n\t\tthis.pattern = pattern;\n\t\tthis.kind = \"importerId\";\n\t\tthis.params = params ?? { cleanUrl: false };\n\t}\n};\nvar ModuleType = class {\n\tkind;\n\tpattern;\n\tconstructor(pattern) {\n\t\tthis.pattern = pattern;\n\t\tthis.kind = \"moduleType\";\n\t}\n};\nvar Code = class {\n\tkind;\n\tpattern;\n\tconstructor(expr) {\n\t\tthis.pattern = expr;\n\t\tthis.kind = \"code\";\n\t}\n};\nvar Query = class {\n\tkind;\n\tkey;\n\tpattern;\n\tconstructor(key, pattern) {\n\t\tthis.pattern = pattern;\n\t\tthis.key = key;\n\t\tthis.kind = \"query\";\n\t}\n};\nvar Include = class {\n\tkind;\n\texpr;\n\tconstructor(expr) {\n\t\tthis.expr = expr;\n\t\tthis.kind = \"include\";\n\t}\n};\nvar Exclude = class {\n\tkind;\n\texpr;\n\tconstructor(expr) {\n\t\tthis.expr = expr;\n\t\tthis.kind = \"exclude\";\n\t}\n};\nfunction and(...args) {\n\treturn new And(...args);\n}\nfunction or(...args) {\n\treturn new Or(...args);\n}\nfunction not(expr) {\n\treturn new Not(expr);\n}\nfunction id(pattern, params) {\n\treturn new Id(pattern, params);\n}\nfunction importerId(pattern, params) {\n\treturn new ImporterId(pattern, params);\n}\nfunction moduleType(pattern) {\n\treturn new ModuleType(pattern);\n}\nfunction code(pattern) {\n\treturn new Code(pattern);\n}\nfunction query(key, pattern) {\n\treturn new Query(key, pattern);\n}\nfunction include(expr) {\n\treturn new Include(expr);\n}\nfunction exclude(expr) {\n\treturn new Exclude(expr);\n}\n/**\n* convert a queryObject to FilterExpression like\n* ```js\n*   and(query(k1, v1), query(k2, v2))\n* ```\n* @param queryFilterObject The query filter object needs to be matched.\n* @returns a `And` FilterExpression\n*/\nfunction queries(queryFilter) {\n\treturn and(...Object.entries(queryFilter).map(([key, value]) => {\n\t\treturn new Query(key, value);\n\t}));\n}\nfunction interpreter(exprs, code, id, moduleType, importerId) {\n\tlet arr = [];\n\tif (Array.isArray(exprs)) arr = exprs;\n\telse arr = [exprs];\n\treturn interpreterImpl(arr, code, id, moduleType, importerId);\n}\nfunction interpreterImpl(expr, code, id, moduleType, importerId, ctx = {}) {\n\tlet hasInclude = false;\n\tfor (const e of expr) switch (e.kind) {\n\t\tcase \"include\":\n\t\t\thasInclude = true;\n\t\t\tif (exprInterpreter(e.expr, code, id, moduleType, importerId, ctx)) return true;\n\t\t\tbreak;\n\t\tcase \"exclude\":\n\t\t\tif (exprInterpreter(e.expr, code, id, moduleType, importerId, ctx)) return false;\n\t\t\tbreak;\n\t}\n\treturn !hasInclude;\n}\nfunction exprInterpreter(expr, code, id, moduleType, importerId, ctx = {}) {\n\tswitch (expr.kind) {\n\t\tcase \"and\": return expr.args.every((e) => exprInterpreter(e, code, id, moduleType, importerId, ctx));\n\t\tcase \"or\": return expr.args.some((e) => exprInterpreter(e, code, id, moduleType, importerId, ctx));\n\t\tcase \"not\": return !exprInterpreter(expr.expr, code, id, moduleType, importerId, ctx);\n\t\tcase \"id\": {\n\t\t\tif (id === void 0) throw new Error(\"`id` is required for `id` expression\");\n\t\t\tlet idToMatch = id;\n\t\t\tif (expr.params.cleanUrl) idToMatch = cleanUrl(idToMatch);\n\t\t\treturn typeof expr.pattern === \"string\" ? idToMatch === expr.pattern : expr.pattern.test(idToMatch);\n\t\t}\n\t\tcase \"importerId\": {\n\t\t\tif (importerId === void 0) return false;\n\t\t\tlet importerIdToMatch = importerId;\n\t\t\tif (expr.params.cleanUrl) importerIdToMatch = cleanUrl(importerIdToMatch);\n\t\t\treturn typeof expr.pattern === \"string\" ? importerIdToMatch === expr.pattern : expr.pattern.test(importerIdToMatch);\n\t\t}\n\t\tcase \"moduleType\":\n\t\t\tif (moduleType === void 0) throw new Error(\"`moduleType` is required for `moduleType` expression\");\n\t\t\treturn moduleType === expr.pattern;\n\t\tcase \"code\":\n\t\t\tif (code === void 0) throw new Error(\"`code` is required for `code` expression\");\n\t\t\treturn typeof expr.pattern === \"string\" ? code.includes(expr.pattern) : expr.pattern.test(code);\n\t\tcase \"query\": {\n\t\t\tif (id === void 0) throw new Error(\"`id` is required for `Query` expression\");\n\t\t\tif (!ctx.urlSearchParamsCache) {\n\t\t\t\tlet queryString = extractQueryWithoutFragment(id);\n\t\t\t\tctx.urlSearchParamsCache = new URLSearchParams(queryString);\n\t\t\t}\n\t\t\tlet urlParams = ctx.urlSearchParamsCache;\n\t\t\tif (typeof expr.pattern === \"boolean\") if (expr.pattern) return urlParams.has(expr.key);\n\t\t\telse return !urlParams.has(expr.key);\n\t\t\telse if (typeof expr.pattern === \"string\") return urlParams.get(expr.key) === expr.pattern;\n\t\t\telse return expr.pattern.test(urlParams.get(expr.key) ?? \"\");\n\t\t}\n\t\tdefault: throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`);\n\t}\n}\n//#endregion\n//#region src/filter/filter-vite-plugins.ts\n/**\n* Filters out Vite plugins that have `apply: 'serve'` set.\n*\n* Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`\n* are intended only for Vite's dev server and should be excluded from the build process.\n*\n* @param plugins - Array of plugins (can include nested arrays)\n* @returns Filtered array with serve-only plugins removed\n*\n* @example\n* ```ts\n* import { defineConfig } from 'rolldown';\n* import { filterVitePlugins } from '@rolldown/pluginutils';\n* import viteReact from '@vitejs/plugin-react';\n*\n* export default defineConfig({\n*   plugins: filterVitePlugins([\n*     viteReact(),\n*     {\n*       name: 'dev-only',\n*       apply: 'serve', // This will be filtered out\n*       // ...\n*     }\n*   ])\n* });\n* ```\n*/\nfunction filterVitePlugins(plugins) {\n\tif (!plugins) return [];\n\tconst pluginArray = Array.isArray(plugins) ? plugins : [plugins];\n\tconst result = [];\n\tfor (const plugin of pluginArray) {\n\t\tif (!plugin) continue;\n\t\tif (Array.isArray(plugin)) {\n\t\t\tresult.push(...filterVitePlugins(plugin));\n\t\t\tcontinue;\n\t\t}\n\t\tconst pluginWithApply = plugin;\n\t\tif (\"apply\" in pluginWithApply) {\n\t\t\tconst applyValue = pluginWithApply.apply;\n\t\t\tif (typeof applyValue === \"function\") try {\n\t\t\t\tif (applyValue({}, {\n\t\t\t\t\tcommand: \"build\",\n\t\t\t\t\tmode: \"production\"\n\t\t\t\t})) result.push(plugin);\n\t\t\t} catch {\n\t\t\t\tresult.push(plugin);\n\t\t\t}\n\t\t\telse if (applyValue === \"serve\") continue;\n\t\t\telse result.push(plugin);\n\t\t} else result.push(plugin);\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/filter/simple-filters.ts\n/**\n* Constructs a RegExp that matches the exact string specified.\n*\n* This is useful for plugin hook filters.\n*\n* @param str the string to match.\n* @param flags flags for the RegExp.\n*\n* @example\n* ```ts\n* import { exactRegex } from '@rolldown/pluginutils';\n* const plugin = {\n*   name: 'plugin',\n*   resolveId: {\n*     filter: { id: exactRegex('foo') },\n*     handler(id) {} // will only be called for `foo`\n*   }\n* }\n* ```\n*/\nfunction exactRegex(str, flags) {\n\treturn new RegExp(`^${escapeRegex(str)}$`, flags);\n}\n/**\n* Constructs a RegExp that matches a value that has the specified prefix.\n*\n* This is useful for plugin hook filters.\n*\n* @param str the string to match.\n* @param flags flags for the RegExp.\n*\n* @example\n* ```ts\n* import { prefixRegex } from '@rolldown/pluginutils';\n* const plugin = {\n*   name: 'plugin',\n*   resolveId: {\n*     filter: { id: prefixRegex('foo') },\n*     handler(id) {} // will only be called for IDs starting with `foo`\n*   }\n* }\n* ```\n*/\nfunction prefixRegex(str, flags) {\n\treturn new RegExp(`^${escapeRegex(str)}`, flags);\n}\nconst escapeRegexRE = /[-/\\\\^$*+?.()|[\\]{}]/g;\nfunction escapeRegex(str) {\n\treturn str.replace(escapeRegexRE, \"\\\\$&\");\n}\nfunction makeIdFiltersToMatchWithQuery(input) {\n\tif (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);\n\treturn input.map((i) => makeIdFilterToMatchWithQuery(i));\n}\nfunction makeIdFilterToMatchWithQuery(input) {\n\tif (typeof input === \"string\") return `${input}{?*,}`;\n\treturn makeRegexIdFilterToMatchWithQuery(input);\n}\nfunction makeRegexIdFilterToMatchWithQuery(input) {\n\treturn new RegExp(input.source.replace(/(?<!\\\\)\\$/g, \"(?:\\\\?.*)?$\"), input.flags);\n}\n//#endregion\nexport { queries as _, and as a, exprInterpreter as c, include as d, interpreter as f, or as g, not as h, filterVitePlugins as i, id as l, moduleType as m, makeIdFiltersToMatchWithQuery as n, code as o, interpreterImpl as p, prefixRegex as r, exclude as s, exactRegex as t, importerId as u, query as v };\n","import { n as __toESM, t as require_binding } from \"./binding-CUpfdq6A.mjs\";\nimport { i as logFailedValidation, n as error, o as logInvalidLogPosition, r as logCycleLoading, t as augmentCodeLocation, u as logPluginError } from \"./logs-D6uA606S.mjs\";\nimport { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from \"./normalize-string-or-regex-COVDiCTB.mjs\";\nimport { i as noop, n as isPathFragment, o as unreachable, s as unsupported, t as arraify } from \"./misc-DOSKtd97.mjs\";\nimport { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from \"./error-CBG33oNV.mjs\";\nimport { parseAst } from \"../parse-ast-index.mjs\";\nimport path from \"node:path\";\nimport * as filter from \"@rolldown/pluginutils\";\nimport fsp from \"node:fs/promises\";\n//#region package.json\nvar version = \"1.2.14\";\nvar package_default = {\n\tname: \"rolldown\",\n\tversion,\n\tdescription: \"Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.\",\n\tkeywords: [\n\t\t\"bundler\",\n\t\t\"esbuild\",\n\t\t\"parcel\",\n\t\t\"rolldown\",\n\t\t\"rollup\",\n\t\t\"webpack\"\n\t],\n\thomepage: \"https://rolldown.rs/\",\n\tbugs: { \"url\": \"https://github.com/rolldown/rolldown/issues\" },\n\tlicense: \"MIT\",\n\trepository: {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+https://github.com/rolldown/rolldown.git\",\n\t\t\"directory\": \"packages/rolldown\"\n\t},\n\tbin: { \"rolldown\": \"./bin/cli.mjs\" },\n\tfiles: [\n\t\t\"bin\",\n\t\t\"cli\",\n\t\t\"dist\",\n\t\t\"LICENSE\",\n\t\t\"THIRD-PARTY-LICENSE\",\n\t\t\"!dist/*.node\"\n\t],\n\ttype: \"module\",\n\tmain: \"./dist/index.mjs\",\n\tmodule: \"./dist/index.mjs\",\n\ttypes: \"./dist/index.d.mts\",\n\timports: { \"#parallel-plugin-worker\": \"./dist/parallel-plugin-worker.mjs\" },\n\texports: {\n\t\t\".\": {\n\t\t\t\"dev\": \"./src/index.ts\",\n\t\t\t\"default\": \"./dist/index.mjs\"\n\t\t},\n\t\t\"./config\": {\n\t\t\t\"dev\": \"./src/config.ts\",\n\t\t\t\"default\": \"./dist/config.mjs\"\n\t\t},\n\t\t\"./experimental\": {\n\t\t\t\"dev\": \"./src/experimental-index.ts\",\n\t\t\t\"default\": \"./dist/experimental-index.mjs\"\n\t\t},\n\t\t\"./experimental/runtime-types\": { \"types\": \"./dist/experimental-runtime-types.d.ts\" },\n\t\t\"./experimental/runtime\": {\n\t\t\t\"types\": \"./dist/experimental-runtime.d.ts\",\n\t\t\t\"default\": \"./dist/experimental-runtime.mjs\"\n\t\t},\n\t\t\"./filter\": {\n\t\t\t\"dev\": \"./src/filter-index.ts\",\n\t\t\t\"default\": \"./dist/filter-index.mjs\"\n\t\t},\n\t\t\"./getLogFilter\": {\n\t\t\t\"dev\": \"./src/get-log-filter.ts\",\n\t\t\t\"default\": \"./dist/get-log-filter.mjs\"\n\t\t},\n\t\t\"./parallelPlugin\": {\n\t\t\t\"dev\": \"./src/parallel-plugin.ts\",\n\t\t\t\"default\": \"./dist/parallel-plugin.mjs\"\n\t\t},\n\t\t\"./parseAst\": {\n\t\t\t\"dev\": \"./src/parse-ast-index.ts\",\n\t\t\t\"default\": \"./dist/parse-ast-index.mjs\"\n\t\t},\n\t\t\"./package.json\": \"./package.json\",\n\t\t\"./plugins\": {\n\t\t\t\"dev\": \"./src/plugins-index.ts\",\n\t\t\t\"default\": \"./dist/plugins-index.mjs\"\n\t\t},\n\t\t\"./utils\": {\n\t\t\t\"dev\": \"./src/utils-index.ts\",\n\t\t\t\"default\": \"./dist/utils-index.mjs\"\n\t\t}\n\t},\n\tpublishConfig: {\n\t\t\"exports\": {\n\t\t\t\".\": \"./dist/index.mjs\",\n\t\t\t\"./config\": \"./dist/config.mjs\",\n\t\t\t\"./experimental\": \"./dist/experimental-index.mjs\",\n\t\t\t\"./experimental/runtime-types\": { \"types\": \"./dist/experimental-runtime-types.d.ts\" },\n\t\t\t\"./experimental/runtime\": {\n\t\t\t\t\"types\": \"./dist/experimental-runtime.d.ts\",\n\t\t\t\t\"default\": \"./dist/experimental-runtime.mjs\"\n\t\t\t},\n\t\t\t\"./filter\": \"./dist/filter-index.mjs\",\n\t\t\t\"./getLogFilter\": \"./dist/get-log-filter.mjs\",\n\t\t\t\"./parallelPlugin\": \"./dist/parallel-plugin.mjs\",\n\t\t\t\"./parseAst\": \"./dist/parse-ast-index.mjs\",\n\t\t\t\"./package.json\": \"./package.json\",\n\t\t\t\"./plugins\": \"./dist/plugins-index.mjs\",\n\t\t\t\"./utils\": \"./dist/utils-index.mjs\"\n\t\t},\n\t\t\"access\": \"public\",\n\t\t\"registry\": \"https://registry.npmjs.org/\"\n\t},\n\tscripts: {\n\t\t\"# Scrips for binding #\": \"_\",\n\t\t\"artifacts\": \"napi artifacts --cwd ./src --package-json-path ../package.json -o=../artifacts --npm-dir ../npm\",\n\t\t\"build-binding\": \"oxnode ./build-binding.ts\",\n\t\t\"build-binding:release\": \"pnpm build-binding --release\",\n\t\t\"build-binding:profile\": \"pnpm build-binding --profile profile --features chrome-tracing\",\n\t\t\"build-binding:wasi\": \"pnpm build-binding --target wasm32-wasip1-threads\",\n\t\t\"build-binding:wasi:release\": \"pnpm build-binding --profile release-wasi --target wasm32-wasip1-threads\",\n\t\t\"# Scrips for node #\": \"_\",\n\t\t\"build-node\": \"node --enable-source-maps --import @oxc-node/core/register -C dev ./build.ts\",\n\t\t\"build-types-check\": \"tsc -p ./tsconfig.check.json\",\n\t\t\"build-js-glue\": \"pnpm run --sequential '/^build-(node|types-check)$/'\",\n\t\t\"build-native:debug\": \"pnpm run --sequential '/^build-(binding|js-glue)$/'\",\n\t\t\"build-native:release\": \"pnpm run --sequential '/^build-(binding:release|js-glue)$/'\",\n\t\t\"build-native:profile\": \"pnpm run build-binding:profile && pnpm run build-js-glue\",\n\t\t\"build-native:memory-profile\": \"pnpm run build-binding:profile --features default_global_allocator && pnpm run build-js-glue\",\n\t\t\"build-wasi:debug\": \"TARGET='rolldown-wasi' pnpm run --sequential '/^build-(binding|binding:wasi|node)$/'\",\n\t\t\"build-wasi:release\": \"TARGET='rolldown-wasi' pnpm run --sequential '/^build-(binding|binding:wasi:release|node)$/'\",\n\t\t\"build-browser-pkg:debug\": \"TARGET='browser' pnpm run --sequential '/^build-(binding:wasi|node)$/'\",\n\t\t\"build-browser-pkg:release\": \"TARGET='browser' pnpm run --sequential '/^build-(binding:wasi:release|node)$/'\",\n\t\t\"# Scrips for docs #\": \"_\",\n\t\t\"prepublishOnly\": \"napi pre-publish -t npm --no-gh-release ${NAPI_DRY_RUN:+--dry-run} ${NAPI_SKIP_OPTIONAL_PUBLISH:+--skip-optional-publish}\",\n\t\t\"publint\": \"publint .\"\n\t},\n\tdependencies: {\n\t\t\"@oxc-project/types\": \"catalog:\",\n\t\t\"@rolldown/pluginutils\": \"catalog:\"\n\t},\n\tdevDependencies: {\n\t\t\"@emnapi/core\": \"catalog:\",\n\t\t\"@emnapi/runtime\": \"catalog:\",\n\t\t\"@napi-rs/cli\": \"catalog:\",\n\t\t\"@napi-rs/wasm-runtime\": \"catalog:\",\n\t\t\"@oxc-node/cli\": \"catalog:\",\n\t\t\"cac\": \"catalog:\",\n\t\t\"consola\": \"catalog:\",\n\t\t\"emnapi\": \"catalog:\",\n\t\t\"execa\": \"catalog:\",\n\t\t\"fresh-import\": \"catalog:\",\n\t\t\"glob\": \"catalog:\",\n\t\t\"oxc-parser\": \"catalog:\",\n\t\t\"pathe\": \"catalog:\",\n\t\t\"remeda\": \"catalog:\",\n\t\t\"rolldown\": \"workspace:*\",\n\t\t\"rolldown-plugin-dts\": \"catalog:\",\n\t\t\"rollup\": \"catalog:\",\n\t\t\"signal-exit\": \"catalog:\",\n\t\t\"source-map\": \"catalog:\",\n\t\t\"typescript\": \"catalog:\",\n\t\t\"valibot\": \"catalog:\"\n\t},\n\tnapi: {\n\t\t\"binaryName\": \"rolldown-binding\",\n\t\t\"dtsHeader\": \"type MaybePromise<T> = T | Promise<T>\\ntype Nullable<T> = T | null | undefined\\ntype VoidNullable<T = void> = T | null | undefined | void\\nexport type BindingStringOrRegex = string | RegExp\\nexport type BindingResult<T> = { errors: BindingError[], isBindingErrors: boolean } | T\\n\\n\",\n\t\t\"packageName\": \"@rolldown/binding\",\n\t\t\"targets\": [\n\t\t\t\"aarch64-apple-darwin\",\n\t\t\t\"aarch64-linux-android\",\n\t\t\t\"aarch64-pc-windows-msvc\",\n\t\t\t\"aarch64-unknown-linux-gnu\",\n\t\t\t\"aarch64-unknown-linux-musl\",\n\t\t\t\"aarch64-unknown-linux-ohos\",\n\t\t\t\"armv7-linux-androideabi\",\n\t\t\t\"armv7-unknown-linux-gnueabihf\",\n\t\t\t\"powerpc64le-unknown-linux-gnu\",\n\t\t\t\"s390x-unknown-linux-gnu\",\n\t\t\t\"wasm32-wasip1-threads\",\n\t\t\t\"x86_64-apple-darwin\",\n\t\t\t\"x86_64-pc-windows-msvc\",\n\t\t\t\"x86_64-unknown-freebsd\",\n\t\t\t\"x86_64-unknown-linux-gnu\",\n\t\t\t\"x86_64-unknown-linux-musl\"\n\t\t],\n\t\t\"wasm\": {\n\t\t\t\"initialMemory\": 16384,\n\t\t\t\"browser\": {\n\t\t\t\t\"fs\": true,\n\t\t\t\t\"asyncInit\": true,\n\t\t\t\t\"errorEvent\": true\n\t\t\t}\n\t\t}\n\t},\n\tengines: { \"node\": \"^20.19.0 || >=22.12.0\" }\n};\n//#endregion\n//#region src/constants/version.ts\n/**\n* The version of Rolldown.\n* @example `'1.0.0'`\n*\n* @category Plugin APIs\n*/\nconst VERSION = version;\n//#endregion\n//#region src/log/logging.ts\nconst LOG_LEVEL_SILENT = \"silent\";\nconst LOG_LEVEL_ERROR = \"error\";\nconst LOG_LEVEL_WARN = \"warn\";\nconst LOG_LEVEL_INFO = \"info\";\nconst LOG_LEVEL_DEBUG = \"debug\";\nconst logLevelPriority = {\n\t[LOG_LEVEL_DEBUG]: 0,\n\t[LOG_LEVEL_INFO]: 1,\n\t[LOG_LEVEL_WARN]: 2,\n\t[LOG_LEVEL_SILENT]: 3\n};\n//#endregion\n//#region src/log/log-handler.ts\nconst normalizeLog = (log) => typeof log === \"string\" ? { message: log } : typeof log === \"function\" ? normalizeLog(log()) : log;\nfunction getLogHandler(level, code, logger, pluginName, logLevel) {\n\tif (logLevelPriority[level] < logLevelPriority[logLevel]) return noop;\n\treturn (log, pos) => {\n\t\tif (pos != null) logger(LOG_LEVEL_WARN, logInvalidLogPosition(pluginName));\n\t\tlog = normalizeLog(log);\n\t\tif (log.code && !log.pluginCode) log.pluginCode = log.code;\n\t\tlog.code = code;\n\t\tlog.plugin = pluginName;\n\t\tlogger(level, log);\n\t};\n}\n//#endregion\n//#region src/utils/normalize-hook.ts\nfunction normalizeHook(hook) {\n\tif (typeof hook === \"function\" || typeof hook === \"string\") return {\n\t\thandler: hook,\n\t\toptions: {},\n\t\tmeta: {}\n\t};\n\tif (typeof hook === \"object\" && hook !== null) {\n\t\tconst { handler, order, ...options } = hook;\n\t\treturn {\n\t\t\thandler,\n\t\t\toptions,\n\t\t\tmeta: { order }\n\t\t};\n\t}\n\tunreachable(\"Invalid hook type\");\n}\n//#endregion\n//#region src/utils/parallel-plugin.ts\n/**\n* Returns the `_parallel` marker of a parallel plugin, or `undefined` if the\n* given plugin is not one.\n*\n* Detection is descriptor-based instead of using the `in` operator: only an\n* own data property named `_parallel` with the expected shape counts. This\n* avoids false positives from inherited or accessor `_parallel` properties on\n* regular plugins, and guarantees that callers can safely read `fileUrl` and\n* `options` from the returned value.\n*/\nfunction getParallelPluginInfo(plugin) {\n\tif (plugin === null || typeof plugin !== \"object\") return;\n\tconst descriptor = Object.getOwnPropertyDescriptor(plugin, \"_parallel\");\n\tif (!descriptor || !(\"value\" in descriptor)) return;\n\tconst parallel = descriptor.value;\n\tif (parallel === null || typeof parallel !== \"object\" || typeof parallel.fileUrl !== \"string\") return;\n\treturn parallel;\n}\n//#endregion\n//#region src/plugin/minimal-plugin-context.ts\nvar MinimalPluginContextImpl = class {\n\tpluginName;\n\thookName;\n\tinfo;\n\twarn;\n\tdebug;\n\tmeta;\n\tconstructor(onLog, logLevel, pluginName, watchMode, hookName) {\n\t\tthis.pluginName = pluginName;\n\t\tthis.hookName = hookName;\n\t\tthis.debug = getLogHandler(LOG_LEVEL_DEBUG, \"PLUGIN_LOG\", onLog, pluginName, logLevel);\n\t\tthis.info = getLogHandler(LOG_LEVEL_INFO, \"PLUGIN_LOG\", onLog, pluginName, logLevel);\n\t\tthis.warn = getLogHandler(LOG_LEVEL_WARN, \"PLUGIN_WARNING\", onLog, pluginName, logLevel);\n\t\tthis.meta = {\n\t\t\trollupVersion: \"4.23.0\",\n\t\t\trolldownVersion: VERSION,\n\t\t\twatchMode\n\t\t};\n\t}\n\terror(e) {\n\t\treturn error(logPluginError(normalizeLog(e), this.pluginName, { hook: this.hookName }));\n\t}\n};\n//#endregion\n//#region src/types/plain-object-like.ts\nvar import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);\nconst LAZY_FIELDS_KEY = Symbol(\"__lazy_fields__\");\n/**\n* Base class for classes that use `@lazyProp` decorated properties.\n*\n* **Design Pattern in Rolldown:**\n* This is a common pattern in Rolldown due to its three-layer architecture:\n* TypeScript API → NAPI Bindings → Rust Core\n*\n* **Why we use getters:**\n* For performance - to lazily fetch data from Rust bindings only when needed,\n* rather than eagerly fetching all data during object construction.\n*\n* **The problem:**\n* Getters defined on class prototypes are non-enumerable by default, which breaks:\n* - Object spread operators ({...obj})\n* - Object.keys() and similar methods\n* - Standard JavaScript object semantics\n*\n* **The solution:**\n* This base class automatically converts `@lazyProp` decorated getters into\n* own enumerable getters on each instance during construction.\n*\n* **Result:**\n* Objects get both lazy-loading performance benefits AND plain JavaScript object behavior.\n*\n* @example\n* ```typescript\n* class MyClass extends PlainObjectLike {\n*   @lazyProp\n*   get myProp() {\n*     return fetchFromRustBinding();\n*   }\n* }\n* ```\n*/\nvar PlainObjectLike = class {\n\tconstructor() {\n\t\tsetupLazyProperties(this);\n\t}\n};\n/**\n* Set up lazy properties as own getters on an instance.\n* This is called automatically by the `PlainObjectLike` base class constructor.\n*\n* @param instance - The instance to set up lazy properties on\n* @internal\n*/\nfunction setupLazyProperties(instance) {\n\tconst lazyFields = instance.constructor[LAZY_FIELDS_KEY];\n\tif (!lazyFields) return;\n\tfor (const [propertyKey, originalGetter] of lazyFields.entries()) {\n\t\tlet cachedValue;\n\t\tlet hasValue = false;\n\t\tObject.defineProperty(instance, propertyKey, {\n\t\t\tget() {\n\t\t\t\tif (!hasValue) {\n\t\t\t\t\tcachedValue = originalGetter.call(this);\n\t\t\t\t\thasValue = true;\n\t\t\t\t}\n\t\t\t\treturn cachedValue;\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n}\n/**\n* Get all lazy field names from a class instance.\n*\n* @param instance - Instance to inspect\n* @returns Set of lazy property names\n*/\nfunction getLazyFields(instance) {\n\tconst lazyFields = instance.constructor[LAZY_FIELDS_KEY];\n\treturn lazyFields ? new Set(lazyFields.keys()) : /* @__PURE__ */ new Set();\n}\n//#endregion\n//#region src/decorators/lazy.ts\n/**\n* Decorator that marks a getter as lazy-evaluated and cached.\n*\n* **What \"lazy\" means here:**\n* 1. Data is lazily fetched from Rust bindings only when the property is accessed (not eagerly on construction)\n* 2. Once fetched, the data is cached for subsequent accesses (performance optimization)\n* 3. Despite being a getter, it behaves like a plain object property (enumerable, appears in Object.keys())\n*\n* **Important**: Properties decorated with `@lazyProp` are defined as own enumerable\n* properties on each instance (not on the prototype). This ensures they:\n* - Appear in Object.keys() and Object.getOwnPropertyNames()\n* - Are included in object spreads ({...obj})\n* - Are enumerable in for...in loops\n*\n* Classes using this decorator must extend `PlainObjectLike` base class.\n*\n* @example\n* ```typescript\n* class MyClass extends PlainObjectLike {\n*   @lazyProp\n*   get expensiveValue() {\n*     return someExpensiveComputation();\n*   }\n* }\n* ```\n*/\nfunction lazyProp(target, propertyKey, descriptor) {\n\tif (!target.constructor[LAZY_FIELDS_KEY]) target.constructor[LAZY_FIELDS_KEY] = /* @__PURE__ */ new Map();\n\tconst originalGetter = descriptor.get;\n\ttarget.constructor[LAZY_FIELDS_KEY].set(propertyKey, originalGetter);\n\treturn {\n\t\tenumerable: false,\n\t\tconfigurable: true\n\t};\n}\n//#endregion\n//#region src/utils/asset-source.ts\nfunction transformAssetSource(bindingAssetSource) {\n\treturn bindingAssetSource.inner;\n}\nfunction bindingAssetSource(source) {\n\treturn { inner: source };\n}\n//#endregion\n//#region \\0@oxc-project+runtime@0.154.0/helpers/esm/decorate.js\nfunction __decorate(decorators, target, key, desc) {\n\tvar c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n\tif (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n\telse for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n\treturn c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n//#endregion\n//#region src/types/output-asset-impl.ts\nvar OutputAssetImpl = class extends PlainObjectLike {\n\tbindingAsset;\n\ttype = \"asset\";\n\tconstructor(bindingAsset) {\n\t\tsuper();\n\t\tthis.bindingAsset = bindingAsset;\n\t}\n\tget fileName() {\n\t\treturn this.bindingAsset.getFileName();\n\t}\n\tget originalFileName() {\n\t\treturn this.bindingAsset.getOriginalFileName() || null;\n\t}\n\tget originalFileNames() {\n\t\treturn this.bindingAsset.getOriginalFileNames();\n\t}\n\tget name() {\n\t\treturn this.bindingAsset.getName() ?? void 0;\n\t}\n\tget names() {\n\t\treturn this.bindingAsset.getNames();\n\t}\n\tget source() {\n\t\treturn transformAssetSource(this.bindingAsset.getSource());\n\t}\n\t__rolldown_external_memory_handle__(keepDataAlive) {\n\t\tif (keepDataAlive) this.#evaluateAllLazyFields();\n\t\treturn this.bindingAsset.dropInner();\n\t}\n\t#evaluateAllLazyFields() {\n\t\tfor (const field of getLazyFields(this)) this[field];\n\t}\n};\n__decorate([lazyProp], OutputAssetImpl.prototype, \"fileName\", null);\n__decorate([lazyProp], OutputAssetImpl.prototype, \"originalFileName\", null);\n__decorate([lazyProp], OutputAssetImpl.prototype, \"originalFileNames\", null);\n__decorate([lazyProp], OutputAssetImpl.prototype, \"name\", null);\n__decorate([lazyProp], OutputAssetImpl.prototype, \"names\", null);\n__decorate([lazyProp], OutputAssetImpl.prototype, \"source\", null);\n//#endregion\n//#region src/utils/transform-rendered-module.ts\nfunction transformToRenderedModule(bindingRenderedModule) {\n\treturn {\n\t\tget code() {\n\t\t\treturn bindingRenderedModule.code;\n\t\t},\n\t\tget renderedLength() {\n\t\t\treturn bindingRenderedModule.code?.length || 0;\n\t\t},\n\t\tget renderedExports() {\n\t\t\treturn bindingRenderedModule.renderedExports;\n\t\t}\n\t};\n}\n//#endregion\n//#region src/utils/transform-rendered-chunk.ts\nfunction transformRenderedChunk(chunk) {\n\tlet modules = null;\n\treturn {\n\t\ttype: \"chunk\",\n\t\tget name() {\n\t\t\treturn chunk.name;\n\t\t},\n\t\tget isEntry() {\n\t\t\treturn chunk.isEntry;\n\t\t},\n\t\tget isDynamicEntry() {\n\t\t\treturn chunk.isDynamicEntry;\n\t\t},\n\t\tget facadeModuleId() {\n\t\t\treturn chunk.facadeModuleId;\n\t\t},\n\t\tget moduleIds() {\n\t\t\treturn chunk.moduleIds;\n\t\t},\n\t\tget exports() {\n\t\t\treturn chunk.exports;\n\t\t},\n\t\tget fileName() {\n\t\t\treturn chunk.fileName;\n\t\t},\n\t\tget imports() {\n\t\t\treturn chunk.imports;\n\t\t},\n\t\tget dynamicImports() {\n\t\t\treturn chunk.dynamicImports;\n\t\t},\n\t\tget modules() {\n\t\t\tif (!modules) modules = transformChunkModules(chunk.modules);\n\t\t\treturn modules;\n\t\t}\n\t};\n}\nfunction transformChunkModules(modules) {\n\tconst result = {};\n\tfor (let i = 0; i < modules.values.length; i++) {\n\t\tlet key = modules.keys[i];\n\t\tconst mod = modules.values[i];\n\t\tresult[key] = transformToRenderedModule(mod);\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/types/output-chunk-impl.ts\nvar OutputChunkImpl = class extends PlainObjectLike {\n\tbindingChunk;\n\ttype = \"chunk\";\n\tconstructor(bindingChunk) {\n\t\tsuper();\n\t\tthis.bindingChunk = bindingChunk;\n\t}\n\tget fileName() {\n\t\treturn this.bindingChunk.getFileName();\n\t}\n\tget name() {\n\t\treturn this.bindingChunk.getName();\n\t}\n\tget exports() {\n\t\treturn this.bindingChunk.getExports();\n\t}\n\tget isEntry() {\n\t\treturn this.bindingChunk.getIsEntry();\n\t}\n\tget facadeModuleId() {\n\t\treturn this.bindingChunk.getFacadeModuleId() || null;\n\t}\n\tget isDynamicEntry() {\n\t\treturn this.bindingChunk.getIsDynamicEntry();\n\t}\n\tget sourcemapFileName() {\n\t\treturn this.bindingChunk.getSourcemapFileName() || null;\n\t}\n\tget preliminaryFileName() {\n\t\treturn this.bindingChunk.getPreliminaryFileName();\n\t}\n\tget code() {\n\t\treturn this.bindingChunk.getCode();\n\t}\n\tget modules() {\n\t\treturn transformChunkModules(this.bindingChunk.getModules());\n\t}\n\tget imports() {\n\t\treturn this.bindingChunk.getImports();\n\t}\n\tget dynamicImports() {\n\t\treturn this.bindingChunk.getDynamicImports();\n\t}\n\tget moduleIds() {\n\t\treturn this.bindingChunk.getModuleIds();\n\t}\n\tget map() {\n\t\tconst mapString = this.bindingChunk.getMap();\n\t\treturn mapString ? transformToRollupSourceMap(mapString) : null;\n\t}\n\t__rolldown_external_memory_handle__(keepDataAlive) {\n\t\tif (keepDataAlive) this.#evaluateAllLazyFields();\n\t\treturn this.bindingChunk.dropInner();\n\t}\n\t#evaluateAllLazyFields() {\n\t\tfor (const field of getLazyFields(this)) this[field];\n\t}\n};\n__decorate([lazyProp], OutputChunkImpl.prototype, \"fileName\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"name\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"exports\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"isEntry\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"facadeModuleId\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"isDynamicEntry\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"sourcemapFileName\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"preliminaryFileName\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"code\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"modules\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"imports\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"dynamicImports\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"moduleIds\", null);\n__decorate([lazyProp], OutputChunkImpl.prototype, \"map\", null);\n//#endregion\n//#region src/utils/transform-to-rollup-output.ts\nfunction transformToRollupSourceMap(map) {\n\tconst obj = {\n\t\t...JSON.parse(map),\n\t\ttoString() {\n\t\t\treturn JSON.stringify(obj);\n\t\t},\n\t\ttoUrl() {\n\t\t\treturn `data:application/json;charset=utf-8;base64,${Buffer.from(obj.toString(), \"utf-8\").toString(\"base64\")}`;\n\t\t}\n\t};\n\tObject.defineProperty(obj, \"x_google_ignoreList\", {\n\t\tget: () => obj.ignoreList,\n\t\tset: (value) => {\n\t\t\tobj.ignoreList = value;\n\t\t}\n\t});\n\treturn obj;\n}\nfunction transformToRollupOutputChunk(bindingChunk) {\n\treturn new OutputChunkImpl(bindingChunk);\n}\nfunction transformToMutableRollupOutputChunk(bindingChunk, changed) {\n\tconst chunk = {\n\t\ttype: \"chunk\",\n\t\tget code() {\n\t\t\treturn bindingChunk.getCode();\n\t\t},\n\t\tfileName: bindingChunk.getFileName(),\n\t\tname: bindingChunk.getName(),\n\t\tget modules() {\n\t\t\treturn transformChunkModules(bindingChunk.getModules());\n\t\t},\n\t\tget imports() {\n\t\t\treturn bindingChunk.getImports();\n\t\t},\n\t\tget dynamicImports() {\n\t\t\treturn bindingChunk.getDynamicImports();\n\t\t},\n\t\texports: bindingChunk.getExports(),\n\t\tisEntry: bindingChunk.getIsEntry(),\n\t\tfacadeModuleId: bindingChunk.getFacadeModuleId() || null,\n\t\tisDynamicEntry: bindingChunk.getIsDynamicEntry(),\n\t\tget moduleIds() {\n\t\t\treturn bindingChunk.getModuleIds();\n\t\t},\n\t\tget map() {\n\t\t\tconst map = bindingChunk.getMap();\n\t\t\treturn map ? transformToRollupSourceMap(map) : null;\n\t\t},\n\t\tsourcemapFileName: bindingChunk.getSourcemapFileName() || null,\n\t\tpreliminaryFileName: bindingChunk.getPreliminaryFileName()\n\t};\n\tconst cache = {};\n\treturn new Proxy(chunk, {\n\t\tget(target, p) {\n\t\t\tif (p in cache) return cache[p];\n\t\t\tconst value = target[p];\n\t\t\tcache[p] = value;\n\t\t\treturn value;\n\t\t},\n\t\tset(_target, p, newValue) {\n\t\t\tcache[p] = newValue;\n\t\t\tchanged.updated.add(bindingChunk.getFileName());\n\t\t\treturn true;\n\t\t},\n\t\thas(target, p) {\n\t\t\tif (p in cache) return true;\n\t\t\treturn p in target;\n\t\t}\n\t});\n}\nfunction transformToRollupOutputAsset(bindingAsset) {\n\treturn new OutputAssetImpl(bindingAsset);\n}\nfunction transformToMutableRollupOutputAsset(bindingAsset, changed) {\n\tconst asset = {\n\t\ttype: \"asset\",\n\t\tfileName: bindingAsset.getFileName(),\n\t\toriginalFileName: bindingAsset.getOriginalFileName() || null,\n\t\toriginalFileNames: bindingAsset.getOriginalFileNames(),\n\t\tget source() {\n\t\t\treturn transformAssetSource(bindingAsset.getSource());\n\t\t},\n\t\tname: bindingAsset.getName() ?? void 0,\n\t\tnames: bindingAsset.getNames()\n\t};\n\tconst cache = {};\n\treturn new Proxy(asset, {\n\t\tget(target, p) {\n\t\t\tif (p in cache) return cache[p];\n\t\t\tconst value = target[p];\n\t\t\tcache[p] = value;\n\t\t\treturn value;\n\t\t},\n\t\tset(_target, p, newValue) {\n\t\t\tcache[p] = newValue;\n\t\t\tchanged.updated.add(bindingAsset.getFileName());\n\t\t\treturn true;\n\t\t}\n\t});\n}\nfunction transformToRollupOutput(output) {\n\tconst { chunks, assets } = output;\n\tconst transformed = { output: [...chunks.map((chunk) => transformToRollupOutputChunk(chunk)), ...assets.map((asset) => transformToRollupOutputAsset(asset))] };\n\tif (output.mangleCache !== void 0) transformed.mangleCache = output.mangleCache;\n\treturn transformed;\n}\nfunction transformToMutableRollupOutput(output, changed) {\n\tconst { chunks, assets } = output;\n\treturn { output: [...chunks.map((chunk) => transformToMutableRollupOutputChunk(chunk, changed)), ...assets.map((asset) => transformToMutableRollupOutputAsset(asset, changed))] };\n}\nfunction transformToOutputBundle(context, output, changed) {\n\tconst bundle = Object.fromEntries(transformToMutableRollupOutput(output, changed).output.map((item) => [item.fileName, item]));\n\treturn new Proxy(bundle, {\n\t\tset(_target, _p, _newValue, _receiver) {\n\t\t\tconst originalStackTraceLimit = Error.stackTraceLimit;\n\t\t\tError.stackTraceLimit = 2;\n\t\t\tconst message = \"This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored. https://rollupjs.org/plugin-development/#generatebundle:~:text=DANGER,this.emitFile.\";\n\t\t\tconst stack = (/* @__PURE__ */ new Error(message)).stack ?? message;\n\t\t\tError.stackTraceLimit = originalStackTraceLimit;\n\t\t\tcontext.warn({\n\t\t\t\tmessage: stack,\n\t\t\t\tcode: \"UNSUPPORTED_BUNDLE_ASSIGNMENT\"\n\t\t\t});\n\t\t\treturn true;\n\t\t},\n\t\tdeleteProperty(target, property) {\n\t\t\tif (typeof property === \"string\") changed.deleted.add(property);\n\t\t\tdelete target[property];\n\t\t\treturn true;\n\t\t}\n\t});\n}\nfunction collectChangedBundle(changed, bundle) {\n\tconst changes = {};\n\tfor (const key in bundle) {\n\t\tif (changed.deleted.has(key) || !changed.updated.has(key)) continue;\n\t\tconst item = bundle[key];\n\t\tif (item.type === \"asset\") changes[key] = {\n\t\t\tfilename: item.fileName,\n\t\t\toriginalFileNames: item.originalFileNames,\n\t\t\tsource: bindingAssetSource(item.source),\n\t\t\tnames: item.names\n\t\t};\n\t\telse changes[key] = {\n\t\t\tcode: item.code,\n\t\t\tfilename: item.fileName,\n\t\t\tname: item.name,\n\t\t\tisEntry: item.isEntry,\n\t\t\texports: item.exports,\n\t\t\tmodules: {},\n\t\t\timports: item.imports,\n\t\t\tdynamicImports: item.dynamicImports,\n\t\t\tfacadeModuleId: item.facadeModuleId || void 0,\n\t\t\tisDynamicEntry: item.isDynamicEntry,\n\t\t\tmoduleIds: item.moduleIds,\n\t\t\tmap: bindingifySourcemap(item.map),\n\t\t\tsourcemapFilename: item.sourcemapFileName || void 0,\n\t\t\tpreliminaryFilename: item.preliminaryFileName\n\t\t};\n\t}\n\treturn {\n\t\tchanges,\n\t\tdeleted: changed.deleted\n\t};\n}\n//#endregion\n//#region src/options/normalized-input-options.ts\nvar NormalizedInputOptionsImpl = class extends PlainObjectLike {\n\tonLog;\n\tinputPlugins;\n\tinner;\n\tconstructor(inner, onLog, inputPlugins) {\n\t\tsuper();\n\t\tthis.onLog = onLog;\n\t\tthis.inputPlugins = inputPlugins;\n\t\tthis.inner = inner;\n\t}\n\tget shimMissingExports() {\n\t\treturn this.inner.shimMissingExports;\n\t}\n\tget input() {\n\t\treturn this.inner.input;\n\t}\n\tget cwd() {\n\t\treturn this.inner.cwd;\n\t}\n\tget platform() {\n\t\treturn this.inner.platform;\n\t}\n\tget context() {\n\t\treturn this.inner.context;\n\t}\n\tget plugins() {\n\t\treturn this.inputPlugins;\n\t}\n};\n__decorate([lazyProp], NormalizedInputOptionsImpl.prototype, \"shimMissingExports\", null);\n__decorate([lazyProp], NormalizedInputOptionsImpl.prototype, \"input\", null);\n__decorate([lazyProp], NormalizedInputOptionsImpl.prototype, \"cwd\", null);\n__decorate([lazyProp], NormalizedInputOptionsImpl.prototype, \"platform\", null);\n__decorate([lazyProp], NormalizedInputOptionsImpl.prototype, \"context\", null);\n//#endregion\n//#region src/options/normalized-output-options.ts\nvar NormalizedOutputOptionsImpl = class extends PlainObjectLike {\n\tinner;\n\toutputOptions;\n\tnormalizedOutputPlugins;\n\tconstructor(inner, outputOptions, normalizedOutputPlugins) {\n\t\tsuper();\n\t\tthis.inner = inner;\n\t\tthis.outputOptions = outputOptions;\n\t\tthis.normalizedOutputPlugins = normalizedOutputPlugins;\n\t}\n\tget dir() {\n\t\treturn this.inner.dir ?? void 0;\n\t}\n\tget charset() {\n\t\treturn this.inner.charset;\n\t}\n\tget entryFileNames() {\n\t\treturn this.inner.entryFilenames || this.outputOptions.entryFileNames;\n\t}\n\tget chunkFileNames() {\n\t\treturn this.inner.chunkFilenames || this.outputOptions.chunkFileNames;\n\t}\n\tget assetFileNames() {\n\t\treturn this.inner.assetFilenames || this.outputOptions.assetFileNames;\n\t}\n\tget format() {\n\t\treturn this.inner.format;\n\t}\n\tget exports() {\n\t\treturn this.inner.exports;\n\t}\n\tget sourcemap() {\n\t\treturn this.inner.sourcemap;\n\t}\n\tget sourcemapFileNames() {\n\t\treturn this.inner.sourcemapFilenames || this.outputOptions.sourcemapFileNames;\n\t}\n\tget sourcemapBaseUrl() {\n\t\treturn this.inner.sourcemapBaseUrl ?? void 0;\n\t}\n\tget shimMissingExports() {\n\t\treturn this.inner.shimMissingExports;\n\t}\n\tget name() {\n\t\treturn this.inner.name ?? void 0;\n\t}\n\tget file() {\n\t\treturn this.inner.file ?? void 0;\n\t}\n\tget codeSplitting() {\n\t\treturn this.inner.codeSplitting;\n\t}\n\t/**\n\t* @deprecated Use `codeSplitting` instead.\n\t*/\n\tget inlineDynamicImports() {\n\t\treturn !this.inner.codeSplitting;\n\t}\n\tget dynamicImportInCjs() {\n\t\treturn this.inner.dynamicImportInCjs;\n\t}\n\tget externalLiveBindings() {\n\t\treturn this.inner.externalLiveBindings;\n\t}\n\tget banner() {\n\t\treturn normalizeAddon(this.outputOptions.banner);\n\t}\n\tget footer() {\n\t\treturn normalizeAddon(this.outputOptions.footer);\n\t}\n\tget postBanner() {\n\t\treturn normalizeAddon(this.outputOptions.postBanner);\n\t}\n\tget postFooter() {\n\t\treturn normalizeAddon(this.outputOptions.postFooter);\n\t}\n\tget intro() {\n\t\treturn normalizeAddon(this.outputOptions.intro);\n\t}\n\tget outro() {\n\t\treturn normalizeAddon(this.outputOptions.outro);\n\t}\n\tget esModule() {\n\t\treturn this.inner.esModule;\n\t}\n\tget extend() {\n\t\treturn this.inner.extend;\n\t}\n\tget globals() {\n\t\treturn this.inner.globals || this.outputOptions.globals;\n\t}\n\tget paths() {\n\t\treturn this.outputOptions.paths;\n\t}\n\tget hashCharacters() {\n\t\treturn this.inner.hashCharacters;\n\t}\n\tget sourcemapDebugIds() {\n\t\treturn this.inner.sourcemapDebugIds;\n\t}\n\tget sourcemapExcludeSources() {\n\t\treturn this.inner.sourcemapExcludeSources;\n\t}\n\tget sourcemapIgnoreList() {\n\t\treturn this.outputOptions.sourcemapIgnoreList;\n\t}\n\tget sourcemapPathTransform() {\n\t\treturn this.outputOptions.sourcemapPathTransform;\n\t}\n\tget minify() {\n\t\tlet ret = this.inner.minify;\n\t\tif (typeof ret === \"object\" && ret !== null) {\n\t\t\tdelete ret[\"codegen\"];\n\t\t\tdelete ret[\"module\"];\n\t\t\tdelete ret[\"sourcemap\"];\n\t\t}\n\t\treturn ret;\n\t}\n\tget legalComments() {\n\t\treturn this.inner.legalComments;\n\t}\n\tget comments() {\n\t\tconst c = this.inner.comments;\n\t\treturn {\n\t\t\tlegal: c.legal ?? true,\n\t\t\tannotation: c.annotation ?? true,\n\t\t\tjsdoc: c.jsdoc ?? true\n\t\t};\n\t}\n\tget polyfillRequire() {\n\t\treturn this.inner.polyfillRequire;\n\t}\n\tget plugins() {\n\t\treturn this.normalizedOutputPlugins;\n\t}\n\tget preserveModules() {\n\t\treturn this.inner.preserveModules;\n\t}\n\tget preserveModulesRoot() {\n\t\treturn this.inner.preserveModulesRoot;\n\t}\n\tget virtualDirname() {\n\t\treturn this.inner.virtualDirname;\n\t}\n\tget topLevelVar() {\n\t\treturn this.inner.topLevelVar ?? false;\n\t}\n\tget minifyInternalExports() {\n\t\treturn this.inner.minifyInternalExports ?? false;\n\t}\n};\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"dir\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"charset\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"entryFileNames\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"chunkFileNames\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"assetFileNames\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"format\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"exports\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"sourcemap\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"sourcemapFileNames\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"sourcemapBaseUrl\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"shimMissingExports\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"name\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"file\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"codeSplitting\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"inlineDynamicImports\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"dynamicImportInCjs\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"externalLiveBindings\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"banner\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"footer\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"postBanner\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"postFooter\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"intro\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"outro\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"esModule\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"extend\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"globals\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"paths\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"hashCharacters\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"sourcemapDebugIds\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"sourcemapExcludeSources\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"sourcemapIgnoreList\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"sourcemapPathTransform\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"minify\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"legalComments\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"comments\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"polyfillRequire\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"plugins\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"preserveModules\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"preserveModulesRoot\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"virtualDirname\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"topLevelVar\", null);\n__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, \"minifyInternalExports\", null);\nfunction normalizeAddon(value) {\n\tif (typeof value === \"function\") return value;\n\treturn () => value || \"\";\n}\n//#endregion\n//#region src/utils/transform-module-info.ts\nfunction transformModuleInfo(info, option) {\n\treturn {\n\t\tget ast() {\n\t\t\treturn unsupported(\"ModuleInfo#ast\");\n\t\t},\n\t\tget code() {\n\t\t\treturn info.code;\n\t\t},\n\t\tid: info.id,\n\t\timporters: info.importers,\n\t\tdynamicImporters: info.dynamicImporters,\n\t\timportedIds: info.importedIds,\n\t\tdynamicallyImportedIds: info.dynamicallyImportedIds,\n\t\texports: info.exports,\n\t\tisEntry: info.isEntry,\n\t\tinputFormat: info.inputFormat,\n\t\t...option\n\t};\n}\n//#endregion\n//#region src/plugin/plugin-context-data.ts\nvar PluginContextData = class {\n\tonLog;\n\toutputOptions;\n\tnormalizedInputPlugins;\n\tnormalizedOutputPlugins;\n\tmoduleOptionMap = /* @__PURE__ */ new Map();\n\tresolveOptionsMap = /* @__PURE__ */ new Map();\n\tloadModulePromiseMap = /* @__PURE__ */ new Map();\n\trenderedChunkMeta = null;\n\tnormalizedInputOptions = null;\n\tnormalizedOutputOptions = null;\n\tconstructor(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins) {\n\t\tthis.onLog = onLog;\n\t\tthis.outputOptions = outputOptions;\n\t\tthis.normalizedInputPlugins = normalizedInputPlugins;\n\t\tthis.normalizedOutputPlugins = normalizedOutputPlugins;\n\t}\n\tupdateModuleOption(id, option) {\n\t\tconst existing = this.moduleOptionMap.get(id);\n\t\tif (existing) {\n\t\t\tif (option.moduleSideEffects != null) existing.moduleSideEffects = option.moduleSideEffects;\n\t\t\tif (option.meta != null) Object.assign(existing.meta, option.meta);\n\t\t\tif (option.invalidate != null) existing.invalidate = option.invalidate;\n\t\t} else {\n\t\t\tthis.moduleOptionMap.set(id, option);\n\t\t\treturn option;\n\t\t}\n\t\treturn existing;\n\t}\n\tgetModuleOption(id) {\n\t\tconst option = this.moduleOptionMap.get(id);\n\t\tif (!option) {\n\t\t\tconst raw = {\n\t\t\t\tmoduleSideEffects: null,\n\t\t\t\tmeta: {}\n\t\t\t};\n\t\t\tthis.moduleOptionMap.set(id, raw);\n\t\t\treturn raw;\n\t\t}\n\t\treturn option;\n\t}\n\tgetModuleInfo(id, context) {\n\t\tconst bindingInfo = context.getModuleInfo(id);\n\t\tif (bindingInfo) {\n\t\t\tconst info = transformModuleInfo(bindingInfo, this.getModuleOption(id));\n\t\t\treturn this.proxyModuleInfo(id, info);\n\t\t}\n\t\treturn null;\n\t}\n\tproxyModuleInfo(id, info) {\n\t\tlet moduleSideEffects = info.moduleSideEffects;\n\t\tObject.defineProperty(info, \"moduleSideEffects\", {\n\t\t\tget() {\n\t\t\t\treturn moduleSideEffects;\n\t\t\t},\n\t\t\tset: (v) => {\n\t\t\t\tthis.updateModuleOption(id, {\n\t\t\t\t\tmoduleSideEffects: v,\n\t\t\t\t\tmeta: info.meta,\n\t\t\t\t\tinvalidate: true\n\t\t\t\t});\n\t\t\t\tmoduleSideEffects = v;\n\t\t\t}\n\t\t});\n\t\treturn info;\n\t}\n\tgetModuleIds(context) {\n\t\treturn context.getModuleIds().values();\n\t}\n\tsaveResolveOptions(options) {\n\t\tconst index = this.resolveOptionsMap.size;\n\t\tthis.resolveOptionsMap.set(index, options);\n\t\treturn index;\n\t}\n\tgetSavedResolveOptions(receipt) {\n\t\treturn this.resolveOptionsMap.get(receipt);\n\t}\n\tremoveSavedResolveOptions(receipt) {\n\t\tthis.resolveOptionsMap.delete(receipt);\n\t}\n\tsetRenderChunkMeta(meta) {\n\t\tthis.renderedChunkMeta = meta;\n\t}\n\tgetRenderChunkMeta() {\n\t\treturn this.renderedChunkMeta;\n\t}\n\tgetInputOptions(opts) {\n\t\tthis.normalizedInputOptions ??= new NormalizedInputOptionsImpl(opts, this.onLog, this.normalizedInputPlugins);\n\t\treturn this.normalizedInputOptions;\n\t}\n\tgetOutputOptions(opts) {\n\t\tthis.normalizedOutputOptions ??= new NormalizedOutputOptionsImpl(opts, this.outputOptions, this.normalizedOutputPlugins);\n\t\treturn this.normalizedOutputOptions;\n\t}\n\tclear() {\n\t\tthis.renderedChunkMeta = null;\n\t\tthis.loadModulePromiseMap.clear();\n\t}\n};\n//#endregion\n//#region src/binding-magic-string.ts\nObject.defineProperty(import_binding.BindingMagicString.prototype, \"isRolldownMagicString\", {\n\tvalue: true,\n\twritable: false,\n\tconfigurable: false\n});\nfunction assertString(content, msg) {\n\tif (typeof content !== \"string\") throw new TypeError(msg);\n}\nconst nativeAppend = import_binding.BindingMagicString.prototype.append;\nconst nativePrepend = import_binding.BindingMagicString.prototype.prepend;\nconst nativeAppendLeft = import_binding.BindingMagicString.prototype.appendLeft;\nconst nativeAppendRight = import_binding.BindingMagicString.prototype.appendRight;\nconst nativePrependLeft = import_binding.BindingMagicString.prototype.prependLeft;\nconst nativePrependRight = import_binding.BindingMagicString.prototype.prependRight;\nconst nativeOverwrite = import_binding.BindingMagicString.prototype.overwrite;\nconst nativeUpdate = import_binding.BindingMagicString.prototype.update;\nimport_binding.BindingMagicString.prototype.append = function(content) {\n\tassertString(content, \"outro content must be a string\");\n\treturn nativeAppend.call(this, content);\n};\nimport_binding.BindingMagicString.prototype.prepend = function(content) {\n\tassertString(content, \"outro content must be a string\");\n\treturn nativePrepend.call(this, content);\n};\nimport_binding.BindingMagicString.prototype.appendLeft = function(index, content) {\n\tassertString(content, \"inserted content must be a string\");\n\treturn nativeAppendLeft.call(this, index, content);\n};\nimport_binding.BindingMagicString.prototype.appendRight = function(index, content) {\n\tassertString(content, \"inserted content must be a string\");\n\treturn nativeAppendRight.call(this, index, content);\n};\nimport_binding.BindingMagicString.prototype.prependLeft = function(index, content) {\n\tassertString(content, \"inserted content must be a string\");\n\treturn nativePrependLeft.call(this, index, content);\n};\nimport_binding.BindingMagicString.prototype.prependRight = function(index, content) {\n\tassertString(content, \"inserted content must be a string\");\n\treturn nativePrependRight.call(this, index, content);\n};\nimport_binding.BindingMagicString.prototype.overwrite = function(start, end, content, options) {\n\tassertString(content, \"replacement content must be a string\");\n\treturn nativeOverwrite.call(this, start, end, content, options);\n};\nimport_binding.BindingMagicString.prototype.update = function(start, end, content, options) {\n\tassertString(content, \"replacement content must be a string\");\n\treturn nativeUpdate.call(this, start, end, content, options);\n};\nconst nativeReplace = import_binding.BindingMagicString.prototype.replace;\nconst nativeReplaceAll = import_binding.BindingMagicString.prototype.replaceAll;\nimport_binding.BindingMagicString.prototype.replace = function(searchValue, replacement) {\n\tif (typeof searchValue === \"string\") return nativeReplace.call(this, searchValue, replacement);\n\tif (searchValue.global) searchValue.lastIndex = 0;\n\tconst lastMatchEnd = this.replaceRegex(searchValue, replacement);\n\tif (searchValue.global) searchValue.lastIndex = 0;\n\telse if (searchValue.sticky) searchValue.lastIndex = lastMatchEnd === -1 ? 0 : lastMatchEnd;\n\treturn this;\n};\nimport_binding.BindingMagicString.prototype.replaceAll = function(searchValue, replacement) {\n\tif (typeof searchValue === \"string\") return nativeReplaceAll.call(this, searchValue, replacement);\n\tif (!searchValue.global) throw new TypeError(\"MagicString.prototype.replaceAll called with a non-global RegExp argument\");\n\tsearchValue.lastIndex = 0;\n\tthis.replaceRegex(searchValue, replacement);\n\tsearchValue.lastIndex = 0;\n\treturn this;\n};\n/**\n* A native MagicString implementation powered by Rust.\n*\n* @experimental\n*/\nconst RolldownMagicString = import_binding.BindingMagicString;\n//#endregion\n//#region src/utils/transform-sourcemap.ts\nfunction isEmptySourcemapFiled(array) {\n\tif (!array) return true;\n\tif (array.length === 0 || !array[0]) return true;\n\treturn false;\n}\nfunction normalizeTransformHookSourcemap(id, originalCode, rawMap) {\n\tif (!rawMap) return;\n\tlet map = typeof rawMap === \"object\" ? rawMap : JSON.parse(rawMap);\n\tif (isEmptySourcemapFiled(map.sourcesContent)) map.sourcesContent = [originalCode];\n\tif (isEmptySourcemapFiled(map.sources) || map.sources && map.sources.length === 1 && map.sources[0] !== id) map.sources = [id];\n\treturn map;\n}\n//#endregion\n//#region ../../node_modules/.pnpm/remeda@2.50.0/node_modules/remeda/dist/lazyDataLastImpl--3B10z3s.js\nfunction e(e, t, n) {\n\tlet r = (n) => e(n, ...t);\n\treturn n === void 0 ? r : Object.assign(r, {\n\t\tlazy: n,\n\t\tlazyArgs: t\n\t});\n}\n//#endregion\n//#region ../../node_modules/.pnpm/remeda@2.50.0/node_modules/remeda/dist/purry.js\nfunction t$1(t, n, r) {\n\tlet i = t.length - n.length;\n\tif (i === 0) return t(...n);\n\tif (i === 1) return e(t, n, r);\n\tthrow Error(`Wrong number of arguments`);\n}\n//#endregion\n//#region ../../node_modules/.pnpm/remeda@2.50.0/node_modules/remeda/dist/partition.js\nfunction t(...t) {\n\treturn t$1(n, t);\n}\nconst n = (e, t) => {\n\tlet n = [[], []];\n\tfor (let [r, i] of e.entries()) t(i, r, e) ? n[0].push(i) : n[1].push(i);\n\treturn n;\n};\n//#endregion\n//#region src/plugin/bindingify-hook-filter.ts\nfunction generalHookFilterMatcherToFilterExprs(matcher, stringKind) {\n\tif (typeof matcher === \"string\" || matcher instanceof RegExp) return [filter.include(generateAtomMatcher(stringKind, matcher))];\n\tif (Array.isArray(matcher)) return matcher.map((m) => filter.include(generateAtomMatcher(stringKind, m)));\n\tlet ret = [];\n\tif (matcher.exclude) ret.push(...arraify(matcher.exclude).map((m) => filter.exclude(generateAtomMatcher(stringKind, m))));\n\tif (matcher.include) ret.push(...arraify(matcher.include).map((m) => filter.include(generateAtomMatcher(stringKind, m))));\n\treturn ret;\n}\nfunction generateAtomMatcher(kind, matcher) {\n\treturn kind === \"code\" ? filter.code(matcher) : filter.id(matcher);\n}\nfunction transformFilterMatcherToFilterExprs(filterOption) {\n\tif (!filterOption) return;\n\tif (Array.isArray(filterOption)) return filterOption;\n\tconst { id, code, moduleType } = filterOption;\n\tlet ret = [];\n\tlet idIncludes = [];\n\tlet idExcludes = [];\n\tlet codeIncludes = [];\n\tlet codeExcludes = [];\n\tif (id) [idIncludes, idExcludes] = t(generalHookFilterMatcherToFilterExprs(id, \"id\") ?? [], (m) => m.kind === \"include\");\n\tif (code) [codeIncludes, codeExcludes] = t(generalHookFilterMatcherToFilterExprs(code, \"code\") ?? [], (m) => m.kind === \"include\");\n\tret.push(...idExcludes);\n\tret.push(...codeExcludes);\n\tlet andExprList = [];\n\tif (moduleType) {\n\t\tlet moduleTypes = Array.isArray(moduleType) ? moduleType : moduleType.include ?? [];\n\t\tandExprList.push(filter.or(...moduleTypes.map((m) => filter.moduleType(m))));\n\t}\n\tif (idIncludes.length) andExprList.push(filter.or(...idIncludes.map((item) => item.expr)));\n\tif (codeIncludes.length) andExprList.push(filter.or(...codeIncludes.map((item) => item.expr)));\n\tif (andExprList.length) ret.push(filter.include(filter.and(...andExprList)));\n\treturn ret;\n}\nfunction bindingifyGeneralHookFilter(stringKind, pattern) {\n\tlet filterExprs = generalHookFilterMatcherToFilterExprs(pattern, stringKind);\n\tlet ret = [];\n\tif (filterExprs) ret = filterExprs.map(bindingifyFilterExpr);\n\treturn ret.length > 0 ? { value: ret } : void 0;\n}\nfunction bindingifyFilterExpr(expr) {\n\tlet list = [];\n\tbindingifyFilterExprImpl(expr, list);\n\treturn list;\n}\nfunction containsImporterId(expr) {\n\tswitch (expr.kind) {\n\t\tcase \"and\":\n\t\tcase \"or\": return expr.args.some(containsImporterId);\n\t\tcase \"not\":\n\t\tcase \"include\":\n\t\tcase \"exclude\": return containsImporterId(expr.expr);\n\t\tcase \"importerId\": return true;\n\t\tdefault: return false;\n\t}\n}\nfunction assertNoImporterId(filterExprs, hookName) {\n\tif (filterExprs?.some(containsImporterId)) throw new Error(`The \\`importerId\\` filter can only be used with the \\`resolveId\\` hook, but it was used with the \\`${hookName}\\` hook.`);\n}\nfunction containsStringId(expr) {\n\tswitch (expr.kind) {\n\t\tcase \"and\":\n\t\tcase \"or\": return expr.args.some(containsStringId);\n\t\tcase \"not\":\n\t\tcase \"include\":\n\t\tcase \"exclude\": return containsStringId(expr.expr);\n\t\tcase \"id\": return typeof expr.pattern === \"string\";\n\t\tdefault: return false;\n\t}\n}\nfunction assertNoStringId(filterExprs, hookName) {\n\tif (filterExprs?.some(containsStringId)) throw new Error(`A string \\`id\\` filter is not supported for the \\`${hookName}\\` hook, because its \\`id\\` is the import specifier rather than a resolved path. Use a RegExp instead.`);\n}\nfunction bindingifyFilterExprImpl(expr, list) {\n\tswitch (expr.kind) {\n\t\tcase \"and\": {\n\t\t\tlet args = expr.args;\n\t\t\tfor (let i = args.length - 1; i >= 0; i--) bindingifyFilterExprImpl(args[i], list);\n\t\t\tlist.push({\n\t\t\t\tkind: \"And\",\n\t\t\t\tpayload: args.length\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"or\": {\n\t\t\tlet args = expr.args;\n\t\t\tfor (let i = args.length - 1; i >= 0; i--) bindingifyFilterExprImpl(args[i], list);\n\t\t\tlist.push({\n\t\t\t\tkind: \"Or\",\n\t\t\t\tpayload: args.length\n\t\t\t});\n\t\t\tbreak;\n\t\t}\n\t\tcase \"not\":\n\t\t\tbindingifyFilterExprImpl(expr.expr, list);\n\t\t\tlist.push({ kind: \"Not\" });\n\t\t\tbreak;\n\t\tcase \"id\":\n\t\t\tlist.push({\n\t\t\t\tkind: \"Id\",\n\t\t\t\tpayload: expr.pattern\n\t\t\t});\n\t\t\tif (expr.params.cleanUrl) list.push({ kind: \"CleanUrl\" });\n\t\t\tbreak;\n\t\tcase \"importerId\":\n\t\t\tlist.push({\n\t\t\t\tkind: \"ImporterId\",\n\t\t\t\tpayload: expr.pattern\n\t\t\t});\n\t\t\tif (expr.params.cleanUrl) list.push({ kind: \"CleanUrl\" });\n\t\t\tbreak;\n\t\tcase \"moduleType\":\n\t\t\tlist.push({\n\t\t\t\tkind: \"ModuleType\",\n\t\t\t\tpayload: expr.pattern\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"code\":\n\t\t\tlist.push({\n\t\t\t\tkind: \"Code\",\n\t\t\t\tpayload: expr.pattern\n\t\t\t});\n\t\t\tbreak;\n\t\tcase \"include\":\n\t\t\tbindingifyFilterExprImpl(expr.expr, list);\n\t\t\tlist.push({ kind: \"Include\" });\n\t\t\tbreak;\n\t\tcase \"exclude\":\n\t\t\tbindingifyFilterExprImpl(expr.expr, list);\n\t\t\tlist.push({ kind: \"Exclude\" });\n\t\t\tbreak;\n\t\tcase \"query\":\n\t\t\tlist.push({\n\t\t\t\tkind: \"QueryKey\",\n\t\t\t\tpayload: expr.key\n\t\t\t});\n\t\t\tlist.push({\n\t\t\t\tkind: \"QueryValue\",\n\t\t\t\tpayload: expr.pattern\n\t\t\t});\n\t\t\tbreak;\n\t\tdefault: throw new Error(`Unknown filter expression: ${expr}`);\n\t}\n}\nfunction bindingifyResolveIdFilter(filterOption) {\n\tif (!filterOption) return;\n\tconst filterExprs = Array.isArray(filterOption) ? filterOption : filterOption.id ? generalHookFilterMatcherToFilterExprs(filterOption.id, \"id\") : void 0;\n\tassertNoStringId(filterExprs, \"resolveId\");\n\tif (!filterExprs) return;\n\tconst value = filterExprs.map(bindingifyFilterExpr);\n\treturn value.length > 0 ? { value } : void 0;\n}\nfunction bindingifyLoadFilter(filterOption) {\n\tif (!filterOption) return;\n\tif (Array.isArray(filterOption)) {\n\t\tassertNoImporterId(filterOption, \"load\");\n\t\treturn { value: filterOption.map(bindingifyFilterExpr) };\n\t}\n\treturn filterOption.id ? bindingifyGeneralHookFilter(\"id\", filterOption.id) : void 0;\n}\nfunction bindingifyTransformFilter(filterOption) {\n\tif (!filterOption) return;\n\tlet filterExprs = transformFilterMatcherToFilterExprs(filterOption);\n\tassertNoImporterId(filterExprs, \"transform\");\n\tlet ret = [];\n\tif (filterExprs) ret = filterExprs.map(bindingifyFilterExpr);\n\treturn { value: ret.length > 0 ? ret : void 0 };\n}\nfunction bindingifyRenderChunkFilter(filterOption) {\n\tif (!filterOption) return;\n\tif (Array.isArray(filterOption)) {\n\t\tassertNoImporterId(filterOption, \"renderChunk\");\n\t\treturn { value: filterOption.map(bindingifyFilterExpr) };\n\t}\n\treturn filterOption.code ? bindingifyGeneralHookFilter(\"code\", filterOption.code) : void 0;\n}\n//#endregion\n//#region src/plugin/bindingify-plugin-hook-meta.ts\nfunction bindingifyPluginHookMeta(options) {\n\treturn { order: bindingPluginOrder(options.order) };\n}\nfunction bindingPluginOrder(order) {\n\tswitch (order) {\n\t\tcase \"post\": return import_binding.BindingPluginOrder.Post;\n\t\tcase \"pre\": return import_binding.BindingPluginOrder.Pre;\n\t\tcase null:\n\t\tcase void 0: return;\n\t\tdefault: throw new Error(`Unknown plugin order: ${order}`);\n\t}\n}\nfunction bindingifyHook(hook, build) {\n\tif (!hook) return {};\n\tconst normalized = normalizeHook(hook);\n\treturn {\n\t\t...build(normalized),\n\t\tmeta: bindingifyPluginHookMeta(normalized.meta)\n\t};\n}\n//#endregion\n//#region src/plugin/fs.ts\nconst fsModule = {\n\tappendFile: fsp.appendFile,\n\tcopyFile: fsp.copyFile,\n\tmkdir: fsp.mkdir,\n\tmkdtemp: fsp.mkdtemp,\n\treaddir: fsp.readdir,\n\treadFile: fsp.readFile,\n\trealpath: fsp.realpath,\n\trename: fsp.rename,\n\trmdir: fsp.rmdir,\n\tstat: fsp.stat,\n\tlstat: fsp.lstat,\n\tunlink: fsp.unlink,\n\twriteFile: fsp.writeFile\n};\n//#endregion\n//#region src/plugin/plugin-context.ts\nvar PluginContextImpl = class extends MinimalPluginContextImpl {\n\toutputOptions;\n\tcontext;\n\tdata;\n\tonLog;\n\tcurrentLoadingModule;\n\tfs = fsModule;\n\tgetModuleInfo;\n\tconstructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {\n\t\tsuper(onLog, logLevel, plugin.name, watchMode);\n\t\tthis.outputOptions = outputOptions;\n\t\tthis.context = context;\n\t\tthis.data = data;\n\t\tthis.onLog = onLog;\n\t\tthis.currentLoadingModule = currentLoadingModule;\n\t\tthis.getModuleInfo = (id) => this.data.getModuleInfo(id, context);\n\t}\n\tasync load(options) {\n\t\tconst id = options.id;\n\t\tif (id === this.currentLoadingModule) this.onLog(LOG_LEVEL_WARN, logCycleLoading(this.pluginName, this.currentLoadingModule));\n\t\tconst moduleInfo = this.data.getModuleInfo(id, this.context);\n\t\tif (moduleInfo && moduleInfo.code !== null) return moduleInfo;\n\t\tconst rawOptions = {\n\t\t\tmeta: options.meta || {},\n\t\t\tmoduleSideEffects: options.moduleSideEffects || null,\n\t\t\tinvalidate: false\n\t\t};\n\t\tthis.data.updateModuleOption(id, rawOptions);\n\t\tlet loadPromise = this.data.loadModulePromiseMap.get(id);\n\t\tif (!loadPromise) {\n\t\t\tloadPromise = this.context.load(id, options.moduleSideEffects ?? void 0, options.packageJsonPath ?? void 0).catch(() => {\n\t\t\t\tthis.data.loadModulePromiseMap.delete(id);\n\t\t\t});\n\t\t\tthis.data.loadModulePromiseMap.set(id, loadPromise);\n\t\t}\n\t\tawait loadPromise;\n\t\treturn this.data.getModuleInfo(id, this.context);\n\t}\n\tasync resolve(source, importer, options) {\n\t\tlet receipt = void 0;\n\t\tif (options != null) receipt = this.data.saveResolveOptions(options);\n\t\tconst vitePluginCustom = Object.entries(options?.custom ?? {}).reduce((acc, [key, value]) => {\n\t\t\tif (key.startsWith(\"vite:\")) (acc ??= {})[key] = value;\n\t\t\treturn acc;\n\t\t}, void 0);\n\t\tconst res = await this.context.resolve(source, importer, {\n\t\t\timportKind: options?.kind,\n\t\t\tcustom: receipt,\n\t\t\tisEntry: options?.isEntry,\n\t\t\tskipSelf: options?.skipSelf,\n\t\t\tvitePluginCustom\n\t\t});\n\t\tif (receipt != null) this.data.removeSavedResolveOptions(receipt);\n\t\tif (res == null) return null;\n\t\tconst info = this.data.getModuleOption(res.id) || {};\n\t\treturn {\n\t\t\t...res,\n\t\t\texternal: res.external === \"relative\" ? unreachable(`The PluginContext resolve result external couldn't be 'relative'`) : res.external,\n\t\t\t...info,\n\t\t\tmoduleSideEffects: info.moduleSideEffects ?? res.moduleSideEffects ?? null,\n\t\t\tpackageJsonPath: res.packageJsonPath\n\t\t};\n\t}\n\temitFile = (file) => {\n\t\tif (file.type === \"prebuilt-chunk\") {\n\t\t\tif (typeof file.code !== \"string\") return error(logFailedValidation(`Emitted prebuilt chunks need to have a valid string code, received \"${file.code}\".`));\n\t\t\tif (typeof file.fileName !== \"string\" || isPathFragment(file.fileName)) return error(logFailedValidation(`The \"fileName\" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received \"${file.fileName}\".`));\n\t\t\treturn this.context.emitPrebuiltChunk({\n\t\t\t\tfileName: file.fileName,\n\t\t\t\tname: file.name,\n\t\t\t\tcode: file.code,\n\t\t\t\texports: file.exports,\n\t\t\t\tmap: bindingifySourcemap(file.map),\n\t\t\t\tsourcemapFileName: file.sourcemapFileName,\n\t\t\t\tfacadeModuleId: file.facadeModuleId,\n\t\t\t\tisEntry: file.isEntry,\n\t\t\t\tisDynamicEntry: file.isDynamicEntry\n\t\t\t});\n\t\t}\n\t\tconst validatedName = file.fileName || file.name;\n\t\tif (typeof validatedName === \"string\" && isPathFragment(validatedName)) return error(logFailedValidation(`The \"fileName\" or \"name\" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received \"${validatedName}\".`));\n\t\tif (file.type === \"chunk\") return this.context.emitChunk({\n\t\t\tpreserveEntrySignatures: bindingifyPreserveEntrySignatures(file.preserveSignature),\n\t\t\t...file\n\t\t});\n\t\tconst fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== \"function\" ? void 0 : this.outputOptions.sanitizeFileName(file.name || \"asset\");\n\t\tconst filename = file.fileName ? void 0 : this.getAssetFileNames(file);\n\t\treturn this.context.emitFile({\n\t\t\t...file,\n\t\t\toriginalFileName: file.originalFileName || void 0,\n\t\t\tsource: bindingAssetSource(file.source)\n\t\t}, filename, fnSanitizedFileName);\n\t};\n\tgetAssetFileNames(file) {\n\t\tif (typeof this.outputOptions.assetFileNames === \"function\") return this.outputOptions.assetFileNames({\n\t\t\ttype: \"asset\",\n\t\t\tname: file.name,\n\t\t\tnames: file.name ? [file.name] : [],\n\t\t\toriginalFileName: file.originalFileName,\n\t\t\toriginalFileNames: file.originalFileName ? [file.originalFileName] : [],\n\t\t\tsource: file.source\n\t\t});\n\t}\n\tgetFileName(referenceId) {\n\t\treturn this.context.getFileName(referenceId);\n\t}\n\tgetModuleIds() {\n\t\treturn this.data.getModuleIds(this.context);\n\t}\n\taddWatchFile(id) {\n\t\tthis.context.addWatchFile(id);\n\t}\n\tparse(input, options) {\n\t\treturn parseAst(input, options);\n\t}\n};\nfunction createPluginContext(args, ctx) {\n\treturn new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode);\n}\n//#endregion\n//#region src/plugin/load-plugin-context.ts\nvar LoadPluginContextImpl = class extends PluginContextImpl {\n\tinner;\n\tconstructor(outputOptions, context, plugin, data, inner, moduleId, onLog, logLevelOption, watchMode) {\n\t\tsuper(outputOptions, context, plugin, data, onLog, logLevelOption, watchMode, moduleId);\n\t\tthis.inner = inner;\n\t}\n\taddWatchFile(id) {\n\t\tthis.inner.addWatchFile(id);\n\t}\n};\n//#endregion\n//#region src/plugin/transform-plugin-context.ts\nvar TransformPluginContextImpl = class extends PluginContextImpl {\n\tinner;\n\tmoduleId;\n\tmoduleSource;\n\tconstructor(outputOptions, context, plugin, data, inner, moduleId, moduleSource, onLog, LogLevelOption, watchMode) {\n\t\tsuper(outputOptions, context, plugin, data, onLog, LogLevelOption, watchMode, moduleId);\n\t\tthis.inner = inner;\n\t\tthis.moduleId = moduleId;\n\t\tthis.moduleSource = moduleSource;\n\t\tconst getLogHandler = (handler) => (log, pos) => {\n\t\t\tlog = normalizeLog(log);\n\t\t\tif (pos) augmentCodeLocation(log, pos, moduleSource, moduleId);\n\t\t\tlog.id = moduleId;\n\t\t\tlog.hook = \"transform\";\n\t\t\thandler(log);\n\t\t};\n\t\tthis.debug = getLogHandler(this.debug);\n\t\tthis.warn = getLogHandler(this.warn);\n\t\tthis.info = getLogHandler(this.info);\n\t}\n\terror(e, pos) {\n\t\tif (typeof e === \"string\") e = { message: e };\n\t\tif (pos) augmentCodeLocation(e, pos, this.moduleSource, this.moduleId);\n\t\te.id = this.moduleId;\n\t\te.hook = \"transform\";\n\t\treturn error(logPluginError(normalizeLog(e), this.pluginName));\n\t}\n\tgetCombinedSourcemap() {\n\t\treturn JSON.parse(this.inner.getCombinedSourcemap());\n\t}\n\taddWatchFile(id) {\n\t\tthis.inner.addWatchFile(id);\n\t}\n\tsendMagicString(s) {\n\t\tthis.inner.sendMagicString(s);\n\t}\n};\n//#endregion\n//#region src/plugin/bindingify-build-hooks.ts\nfunction bindingifyBuildStart(args) {\n\treturn bindingifyHook(args.plugin.buildStart, ({ handler }) => ({ plugin: async (ctx, opts) => {\n\t\tawait handler.call(createPluginContext(args, ctx), args.pluginContextData.getInputOptions(opts));\n\t} }));\n}\nfunction bindingifyBuildEnd(args) {\n\treturn bindingifyHook(args.plugin.buildEnd, ({ handler }) => ({ plugin: async (ctx, err) => {\n\t\tawait handler.call(createPluginContext(args, ctx), err ? aggregateBindingErrorsIntoJsError(err) : void 0);\n\t} }));\n}\nfunction bindingifyResolveId(args) {\n\tconst hook = args.plugin.resolveId;\n\treturn bindingifyHook(hook, ({ handler, options }) => ({\n\t\tplugin: async (ctx, specifier, importer, extraOptions) => {\n\t\t\tconst contextResolveOptions = extraOptions.custom != null ? args.pluginContextData.getSavedResolveOptions(extraOptions.custom) : void 0;\n\t\t\tconst ret = await handler.call(createPluginContext(args, ctx), specifier, importer ?? void 0, {\n\t\t\t\t...extraOptions,\n\t\t\t\tcustom: contextResolveOptions?.custom\n\t\t\t});\n\t\t\tif (ret == null) return;\n\t\t\tif (ret === false) return {\n\t\t\t\tid: specifier,\n\t\t\t\texternal: true,\n\t\t\t\tnormalizeExternalId: true\n\t\t\t};\n\t\t\tif (typeof ret === \"string\") return {\n\t\t\t\tid: ret,\n\t\t\t\tnormalizeExternalId: false\n\t\t\t};\n\t\t\tlet exist = args.pluginContextData.updateModuleOption(ret.id, {\n\t\t\t\tmeta: ret.meta || {},\n\t\t\t\tmoduleSideEffects: ret.moduleSideEffects ?? null,\n\t\t\t\tinvalidate: false\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tid: ret.id,\n\t\t\t\texternal: ret.external,\n\t\t\t\tnormalizeExternalId: false,\n\t\t\t\tmoduleSideEffects: exist.moduleSideEffects ?? void 0,\n\t\t\t\tpackageJsonPath: ret.packageJsonPath\n\t\t\t};\n\t\t},\n\t\tfilter: bindingifyResolveIdFilter(options.filter)\n\t}));\n}\nfunction bindingifyResolveDynamicImport(args) {\n\treturn bindingifyHook(args.plugin.resolveDynamicImport, ({ handler }) => ({ plugin: async (ctx, specifier, importer) => {\n\t\tconst ret = await handler.call(createPluginContext(args, ctx), specifier, importer ?? void 0);\n\t\tif (ret == null) return;\n\t\tif (ret === false) return {\n\t\t\tid: specifier,\n\t\t\texternal: true\n\t\t};\n\t\tif (typeof ret === \"string\") return { id: ret };\n\t\tconst result = {\n\t\t\tid: ret.id,\n\t\t\texternal: ret.external,\n\t\t\tpackageJsonPath: ret.packageJsonPath\n\t\t};\n\t\tif (ret.moduleSideEffects !== null) result.moduleSideEffects = ret.moduleSideEffects;\n\t\targs.pluginContextData.updateModuleOption(ret.id, {\n\t\t\tmeta: ret.meta || {},\n\t\t\tmoduleSideEffects: ret.moduleSideEffects || null,\n\t\t\tinvalidate: false\n\t\t});\n\t\treturn result;\n\t} }));\n}\nfunction bindingifyTransform(args) {\n\treturn bindingifyHook(args.plugin.transform, ({ handler, options }) => ({\n\t\tplugin: async (ctx, code, id, meta) => {\n\t\t\tlet magicStringInstance, astInstance;\n\t\t\tObject.defineProperties(meta, {\n\t\t\t\tmagicString: { get() {\n\t\t\t\t\tif (magicStringInstance) return magicStringInstance;\n\t\t\t\t\tmagicStringInstance = new RolldownMagicString(code);\n\t\t\t\t\treturn magicStringInstance;\n\t\t\t\t} },\n\t\t\t\tast: { get() {\n\t\t\t\t\tif (astInstance) return astInstance;\n\t\t\t\t\tlet lang = \"js\";\n\t\t\t\t\tswitch (meta.moduleType) {\n\t\t\t\t\t\tcase \"js\":\n\t\t\t\t\t\tcase \"jsx\":\n\t\t\t\t\t\tcase \"ts\":\n\t\t\t\t\t\tcase \"tsx\": lang = meta.moduleType;\n\t\t\t\t\t}\n\t\t\t\t\tastInstance = parseAst(code, {\n\t\t\t\t\t\tastType: meta.moduleType.includes(\"ts\") ? \"ts\" : \"js\",\n\t\t\t\t\t\tlang\n\t\t\t\t\t});\n\t\t\t\t\treturn astInstance;\n\t\t\t\t} }\n\t\t\t});\n\t\t\tconst transformCtx = new TransformPluginContextImpl(args.outputOptions, ctx.inner(), args.plugin, args.pluginContextData, ctx, id, code, args.onLog, args.logLevel, args.watchMode);\n\t\t\tconst ret = await handler.call(transformCtx, code, id, meta);\n\t\t\tif (ret == null) return;\n\t\t\tif (typeof ret === \"string\") return { code: ret };\n\t\t\tlet moduleOption = args.pluginContextData.updateModuleOption(id, {\n\t\t\t\tmeta: ret.meta ?? {},\n\t\t\t\tmoduleSideEffects: ret.moduleSideEffects ?? null,\n\t\t\t\tinvalidate: false\n\t\t\t});\n\t\t\tlet normalizedCode = void 0;\n\t\t\tlet map = ret.map;\n\t\t\tlet mapHandledByNativeChannel = false;\n\t\t\tif (typeof ret.code === \"string\") normalizedCode = ret.code;\n\t\t\telse if (ret.code instanceof RolldownMagicString) {\n\t\t\t\tlet magicString = ret.code;\n\t\t\t\tnormalizedCode = magicString.toString();\n\t\t\t\tlet fallbackSourcemap = ctx.sendMagicString(magicString);\n\t\t\t\tif (fallbackSourcemap != void 0) map = fallbackSourcemap;\n\t\t\t\telse mapHandledByNativeChannel = true;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tcode: normalizedCode,\n\t\t\t\tmap: bindingifySourcemap(normalizeTransformHookSourcemap(id, code, map)) ?? (mapHandledByNativeChannel || ret.map === null ? null : void 0),\n\t\t\t\tmoduleSideEffects: moduleOption.moduleSideEffects ?? void 0,\n\t\t\t\tmoduleType: ret.moduleType\n\t\t\t};\n\t\t},\n\t\tfilter: bindingifyTransformFilter(options.filter)\n\t}));\n}\nfunction bindingifyLoad(args) {\n\treturn bindingifyHook(args.plugin.load, ({ handler, options }) => ({\n\t\tplugin: async (ctx, id) => {\n\t\t\tconst ret = await handler.call(new LoadPluginContextImpl(args.outputOptions, ctx.inner(), args.plugin, args.pluginContextData, ctx, id, args.onLog, args.logLevel, args.watchMode), id);\n\t\t\tif (ret == null) return;\n\t\t\tif (typeof ret === \"string\") return { code: ret };\n\t\t\tlet moduleOption = args.pluginContextData.updateModuleOption(id, {\n\t\t\t\tmeta: ret.meta || {},\n\t\t\t\tmoduleSideEffects: ret.moduleSideEffects ?? null,\n\t\t\t\tinvalidate: false\n\t\t\t});\n\t\t\tlet map = preProcessSourceMap(ret, id);\n\t\t\treturn {\n\t\t\t\tcode: ret.code,\n\t\t\t\tmap: bindingifySourcemap(map),\n\t\t\t\tmoduleType: ret.moduleType,\n\t\t\t\tmoduleSideEffects: moduleOption.moduleSideEffects ?? void 0\n\t\t\t};\n\t\t},\n\t\tfilter: bindingifyLoadFilter(options.filter)\n\t}));\n}\nfunction preProcessSourceMap(ret, id) {\n\tif (!ret.map) return;\n\tlet map = typeof ret.map === \"object\" ? ret.map : JSON.parse(ret.map);\n\tif (!isEmptySourcemapFiled(map.sources)) {\n\t\tconst directory = path.dirname(id) || \".\";\n\t\tconst sourceRoot = map.sourceRoot || \".\";\n\t\tmap.sources = map.sources.map((source) => path.resolve(directory, sourceRoot, source));\n\t}\n\treturn map;\n}\nfunction bindingifyModuleParsed(args) {\n\treturn bindingifyHook(args.plugin.moduleParsed, ({ handler }) => ({ plugin: async (ctx, moduleInfo) => {\n\t\tawait handler.call(createPluginContext(args, ctx), transformModuleInfo(moduleInfo, args.pluginContextData.getModuleOption(moduleInfo.id)));\n\t} }));\n}\n//#endregion\n//#region src/plugin/bindingify-output-hooks.ts\nfunction bindingifyRenderStart(args) {\n\treturn bindingifyHook(args.plugin.renderStart, ({ handler }) => ({ plugin: async (ctx, opts) => {\n\t\tawait handler.call(createPluginContext(args, ctx), args.pluginContextData.getOutputOptions(opts), args.pluginContextData.getInputOptions(opts));\n\t} }));\n}\nfunction bindingifyRenderChunk(args) {\n\treturn bindingifyHook(args.plugin.renderChunk, ({ handler, options }) => ({\n\t\tplugin: async (ctx, code, chunk, opts, meta) => {\n\t\t\tif (args.pluginContextData.getRenderChunkMeta() == null) args.pluginContextData.setRenderChunkMeta({ chunks: Object.fromEntries(Object.entries(meta.chunks).map(([key, value]) => [key, transformRenderedChunk(value)])) });\n\t\t\tconst renderChunkMeta = { chunks: args.pluginContextData.getRenderChunkMeta().chunks };\n\t\t\tlet magicStringInstance;\n\t\t\tif (args.options.experimental?.nativeMagicString) Object.defineProperty(renderChunkMeta, \"magicString\", {\n\t\t\t\tget() {\n\t\t\t\t\tif (magicStringInstance) return magicStringInstance;\n\t\t\t\t\tmagicStringInstance = new RolldownMagicString(code);\n\t\t\t\t\treturn magicStringInstance;\n\t\t\t\t},\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t\tconst ret = await handler.call(createPluginContext(args, ctx), code, transformRenderedChunk(chunk), args.pluginContextData.getOutputOptions(opts), renderChunkMeta);\n\t\t\tif (ret == null) return;\n\t\t\tif (ret instanceof RolldownMagicString) {\n\t\t\t\tconst normalizedCode = ret.toString();\n\t\t\t\tconst generatedMap = ret.generateMap();\n\t\t\t\treturn {\n\t\t\t\t\tcode: normalizedCode,\n\t\t\t\t\tmap: bindingifySourcemap({\n\t\t\t\t\t\tfile: generatedMap.file,\n\t\t\t\t\t\tmappings: generatedMap.mappings,\n\t\t\t\t\t\tnames: generatedMap.names,\n\t\t\t\t\t\tsources: generatedMap.sources,\n\t\t\t\t\t\tsourcesContent: generatedMap.sourcesContent.map((s) => s ?? null)\n\t\t\t\t\t})\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (typeof ret === \"string\") return { code: ret };\n\t\t\tif (ret.code instanceof RolldownMagicString) {\n\t\t\t\tconst magicString = ret.code;\n\t\t\t\tconst normalizedCode = magicString.toString();\n\t\t\t\tif (ret.map === null) return {\n\t\t\t\t\tcode: normalizedCode,\n\t\t\t\t\tmap: null\n\t\t\t\t};\n\t\t\t\tif (ret.map === void 0) {\n\t\t\t\t\tconst generatedMap = magicString.generateMap();\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcode: normalizedCode,\n\t\t\t\t\t\tmap: bindingifySourcemap({\n\t\t\t\t\t\t\tfile: generatedMap.file,\n\t\t\t\t\t\t\tmappings: generatedMap.mappings,\n\t\t\t\t\t\t\tnames: generatedMap.names,\n\t\t\t\t\t\t\tsources: generatedMap.sources,\n\t\t\t\t\t\t\tsourcesContent: generatedMap.sourcesContent.map((s) => s ?? null)\n\t\t\t\t\t\t})\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tcode: normalizedCode,\n\t\t\t\t\tmap: bindingifySourcemap(ret.map)\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (ret.map === null) return {\n\t\t\t\tcode: ret.code,\n\t\t\t\tmap: null\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tcode: ret.code,\n\t\t\t\tmap: bindingifySourcemap(ret.map)\n\t\t\t};\n\t\t},\n\t\tfilter: bindingifyRenderChunkFilter(options.filter)\n\t}));\n}\nfunction bindingifyAugmentChunkHash(args) {\n\treturn bindingifyHook(args.plugin.augmentChunkHash, ({ handler }) => ({ plugin: async (ctx, chunk) => {\n\t\treturn handler.call(createPluginContext(args, ctx), transformRenderedChunk(chunk));\n\t} }));\n}\nfunction bindingifyResolveFileUrl(args) {\n\treturn bindingifyHook(args.plugin.resolveFileUrl, ({ handler }) => ({ plugin: async (ctx, resolveFileUrlArgs) => {\n\t\treturn handler.call(createPluginContext(args, ctx), resolveFileUrlArgs);\n\t} }));\n}\nfunction bindingifyRenderError(args) {\n\treturn bindingifyHook(args.plugin.renderError, ({ handler }) => ({ plugin: async (ctx, err) => {\n\t\tawait handler.call(createPluginContext(args, ctx), aggregateBindingErrorsIntoJsError(err));\n\t} }));\n}\nfunction createOutputBundle(args, ctx, bundle) {\n\tconst changed = {\n\t\tupdated: /* @__PURE__ */ new Set(),\n\t\tdeleted: /* @__PURE__ */ new Set()\n\t};\n\tconst context = createPluginContext(args, ctx);\n\treturn {\n\t\tchanged,\n\t\tcontext,\n\t\toutput: transformToOutputBundle(context, unwrapBindingResult(bundle), changed)\n\t};\n}\nfunction bindingifyGenerateBundle(args) {\n\treturn bindingifyHook(args.plugin.generateBundle, ({ handler }) => ({ plugin: async (ctx, bundle, isWrite, opts) => {\n\t\tconst { changed, context, output } = createOutputBundle(args, ctx, bundle);\n\t\tawait handler.call(context, args.pluginContextData.getOutputOptions(opts), output, isWrite);\n\t\treturn collectChangedBundle(changed, output);\n\t} }));\n}\nfunction bindingifyWriteBundle(args) {\n\treturn bindingifyHook(args.plugin.writeBundle, ({ handler }) => ({ plugin: async (ctx, bundle, opts) => {\n\t\tconst { changed, context, output } = createOutputBundle(args, ctx, bundle);\n\t\tawait handler.call(context, args.pluginContextData.getOutputOptions(opts), output);\n\t\treturn collectChangedBundle(changed, output);\n\t} }));\n}\nfunction bindingifyCloseBundle(args) {\n\treturn bindingifyHook(args.plugin.closeBundle, ({ handler }) => ({ plugin: async (ctx, err) => {\n\t\tawait handler.call(createPluginContext(args, ctx), err ? aggregateBindingErrorsIntoJsError(err) : void 0);\n\t} }));\n}\nfunction bindingifyAddonHook(args, name) {\n\treturn bindingifyHook(args.plugin[name], ({ handler }) => ({ plugin: async (ctx, chunk) => {\n\t\tif (typeof handler === \"string\") return handler;\n\t\treturn handler.call(createPluginContext(args, ctx), transformRenderedChunk(chunk));\n\t} }));\n}\n//#endregion\n//#region src/plugin/bindingify-watch-hooks.ts\nfunction bindingifyHotUpdate(args) {\n\treturn bindingifyHook(args.plugin.hotUpdate, ({ handler }) => ({ plugin: async (ctx, hookArgs) => {\n\t\treturn await handler.call(createPluginContext(args, ctx), {\n\t\t\ttype: hookArgs.kind,\n\t\t\tfile: hookArgs.file,\n\t\t\tmodules: hookArgs.modules\n\t\t}) ?? void 0;\n\t} }));\n}\nfunction bindingifyWatchChange(args) {\n\treturn bindingifyHook(args.plugin.watchChange, ({ handler }) => ({ plugin: async (ctx, id, event) => {\n\t\tawait handler.call(createPluginContext(args, ctx), id, { event });\n\t} }));\n}\nfunction bindingifyCloseWatcher(args) {\n\treturn bindingifyHook(args.plugin.closeWatcher, ({ handler }) => ({ plugin: async (ctx) => {\n\t\tawait handler.call(createPluginContext(args, ctx));\n\t} }));\n}\n//#endregion\n//#region src/plugin/generated/hook-usage.ts\nvar HookUsage = class {\n\tbitflag = BigInt(0);\n\tconstructor() {}\n\tunion(kind) {\n\t\tthis.bitflag |= BigInt(kind);\n\t}\n\tinner() {\n\t\treturn Number(this.bitflag);\n\t}\n};\nfunction extractHookUsage(plugin) {\n\tlet hookUsage = new HookUsage();\n\tif (plugin.buildStart) hookUsage.union(1);\n\tif (plugin.resolveId) hookUsage.union(2);\n\tif (plugin.resolveDynamicImport) hookUsage.union(4);\n\tif (plugin.load) hookUsage.union(8);\n\tif (plugin.transform) hookUsage.union(16);\n\tif (plugin.moduleParsed) hookUsage.union(32);\n\tif (plugin.buildEnd) hookUsage.union(64);\n\tif (plugin.renderStart) hookUsage.union(128);\n\tif (plugin.renderError) hookUsage.union(256);\n\tif (plugin.renderChunk) hookUsage.union(512);\n\tif (plugin.augmentChunkHash) hookUsage.union(1024);\n\tif (plugin.generateBundle) hookUsage.union(2048);\n\tif (plugin.writeBundle) hookUsage.union(4096);\n\tif (plugin.closeBundle) hookUsage.union(8192);\n\tif (plugin.watchChange) hookUsage.union(16384);\n\tif (plugin.closeWatcher) hookUsage.union(32768);\n\tif (plugin.banner) hookUsage.union(65536);\n\tif (plugin.footer) hookUsage.union(131072);\n\tif (plugin.intro) hookUsage.union(262144);\n\tif (plugin.outro) hookUsage.union(524288);\n\tif (plugin.resolveFileUrl) hookUsage.union(1048576);\n\tif (plugin.hotUpdate) hookUsage.union(2097152);\n\treturn hookUsage;\n}\n//#endregion\n//#region src/utils/plugin-timings.ts\n/**\n* Measure what plugin hooks cost, from inside the JavaScript callback.\n*\n* Internal to Rolldown. Nothing here is on a public entry point, and the measurement is not\n* offered as an API — the only consumer is the core, which pulls it while the build closes.\n*\n* The bundler core can only bracket *dispatch* and *completion*. For a hook it invokes\n* concurrently those two points are separated mostly by the queue the call waited in on\n* JavaScript's single thread, and the queue is deepest behind whichever callback is doing\n* the most work — so the hook blocking the thread dilutes its own credit while cheap hooks\n* collect credit for waiting. Ranking from those numbers reliably puts the *cheapest* hook\n* first.\n*\n* The missing quantity is when the callback began running, and that is known here. Starting\n* the clock inside the callback removes the dispatch queue by construction.\n*\n* ## `maxInFlight` decides whether a total means anything\n*\n* Entry-to-exit spans may be summed only if they never overlap. A synchronous callback\n* cannot overlap: it holds the thread until it returns. An `async` one can — it may suspend\n* at an `await` and let another call of the same hook begin, and then both spans cover the\n* same wall clock and the sum counts it twice.\n*\n* Overlap also changes what the span is measuring. A hook that awaits the bundler (say\n* `this.resolve`) spends most of its span waiting for Rust, so the number describes the\n* bundler rather than the plugin. Observed on a real build: one `resolveId` accumulated\n* ~47,000s of span inside a 44s module-loading window.\n*\n* So overlap is measured rather than assumed, per hook: `overlapMs` is the wall time\n* double counted in `ms` because two or more calls were in flight together. A hook is\n* reported with a number when that is a negligible share of its span, and named without one\n* when it is not.\n*\n* The test is deliberately a tolerance rather than \"did this ever happen\". A peak in-flight\n* count of 2 can mean one incidental overlap in twenty thousand calls, and discarding a\n* twelve-second measurement over that both throws away good data and makes the report\n* depend on scheduling luck — the same hook would appear in one run and vanish in the next.\n*\n* This keeps the rule the core followed — never present a number that cannot be defended —\n* while narrowing \"cannot measure\" from a property of the *call site* to a property of the\n* *callback*, which is where it actually lives. A hook dispatched concurrently but whose\n* body barely overlaps is measured to within the tolerance.\n*\n* A measured row is still wall time for that callback rather than CPU: a hook that awaits\n* I/O without overlapping another call of itself is charged for the wait. Excluding the\n* dispatch queue is what this buys; it does not distinguish running from awaiting.\n*/\n/**\n* How much of a hook's span may be double counted before its total stops being reportable,\n* as a fraction of that span.\n*/\nconst OVERLAP_TOLERANCE = .01;\n/**\n* One recorder per build, keyed on the object that identifies it.\n*\n* Counters cannot be module-global. A plugin is free to run a nested `rolldown()` build of\n* its own, which finishes first; shared counters would let it flush the outer build's\n* half-accumulated totals and report a window belonging to neither.\n*/\nconst recorders = /* @__PURE__ */ new WeakMap();\n/** The recorder for one build, created on first use. */\nfunction pluginTimingsRecorderFor(key) {\n\tlet recorder = recorders.get(key);\n\tif (recorder === void 0) {\n\t\trecorder = {\n\t\t\tcosts: /* @__PURE__ */ new Map(),\n\t\t\twarnedMissingGroupLabels: /* @__PURE__ */ new Set(),\n\t\t\tbusyMs: 0,\n\t\t\tinFlight: 0,\n\t\t\tbusyStart: 0\n\t\t};\n\t\trecorders.set(key, recorder);\n\t}\n\treturn recorder;\n}\nfunction costFor(recorder, owner, hookName) {\n\tlet byHook = recorder.costs.get(owner.key);\n\tif (byHook === void 0) {\n\t\tbyHook = /* @__PURE__ */ new Map();\n\t\trecorder.costs.set(owner.key, byHook);\n\t}\n\tlet cost = byHook.get(hookName);\n\tif (cost === void 0) {\n\t\tcost = {\n\t\t\towner: owner.name,\n\t\t\tkind: owner.kind,\n\t\t\thookName,\n\t\t\tcalls: 0,\n\t\t\tms: 0,\n\t\t\tinFlight: 0,\n\t\t\tmaxInFlight: 0,\n\t\t\toverlapMs: 0,\n\t\t\tlastChange: 0\n\t\t};\n\t\tbyHook.set(hookName, cost);\n\t}\n\treturn cost;\n}\n/**\n* Fold the interval since the last in-flight change into `overlapMs`, then move the mark.\n* Call immediately before every increment and decrement of `cost.inFlight`.\n*/\nfunction markInFlightChange(cost, at) {\n\tif (cost.inFlight > 1) cost.overlapMs += (cost.inFlight - 1) * (at - cost.lastChange);\n\tcost.lastChange = at;\n}\n/**\n* Close out one call. A module-level function rather than a closure per invocation: hooks\n* run hundreds of thousands of times in a large build, and the synchronous path would\n* otherwise allocate one closure per call only to invoke it immediately.\n*/\nfunction settle(recorder, cost, started) {\n\tconst ended = performance.now();\n\tmarkInFlightChange(cost, ended);\n\tcost.inFlight -= 1;\n\tcost.ms += ended - started;\n\trecorder.inFlight -= 1;\n\tif (recorder.inFlight === 0) recorder.busyMs += ended - recorder.busyStart;\n}\n/**\n* Wrap one callback so its execution time is recorded.\n*\n* Returns the callback untouched when there is no recorder, so a build that is not\n* measuring pays nothing beyond one branch at setup.\n*/\nfunction measureHookCost(recorder, owner, hookName, handler) {\n\tif (recorder === void 0) return handler;\n\tconst cost = costFor(recorder, owner, hookName);\n\treturn function(...args) {\n\t\tconst started = performance.now();\n\t\tmarkInFlightChange(cost, started);\n\t\tcost.calls += 1;\n\t\tcost.inFlight += 1;\n\t\tif (cost.inFlight > cost.maxInFlight) cost.maxInFlight = cost.inFlight;\n\t\tif (recorder.inFlight === 0) recorder.busyStart = started;\n\t\trecorder.inFlight += 1;\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = handler.apply(this, args);\n\t\t} catch (error) {\n\t\t\tsettle(recorder, cost, started);\n\t\t\tthrow error;\n\t\t}\n\t\tif (typeof result?.then === \"function\") return result.then((value) => {\n\t\t\tsettle(recorder, cost, started);\n\t\t\treturn value;\n\t\t}, (error) => {\n\t\t\tsettle(recorder, cost, started);\n\t\t\tthrow error;\n\t\t});\n\t\tsettle(recorder, cost, started);\n\t\treturn result;\n\t};\n}\n/**\n* The shared owner for callbacks that users configure directly on the output options.\n* Code-splitting groups use their group objects as owner keys. Each group then has separate\n* timing rows.\n*/\nconst OUTPUT_OPTIONS_OWNER = {\n\tkey: Symbol(\"output options\"),\n\tname: \"output options\",\n\tkind: \"outputOption\"\n};\n/** As {@link OUTPUT_OPTIONS_OWNER}, for callbacks configured on the input options. */\nconst INPUT_OPTIONS_OWNER = {\n\tkey: Symbol(\"input options\"),\n\tname: \"input options\",\n\tkind: \"inputOption\"\n};\n/**\n* Wrap `value` when the user supplied a function, and leave every other form alone.\n*\n* Most option callbacks are declared as `string | RegExp | Function | ...`, so this keeps\n* the one cast the wrapping needs in a single place.\n*/\nfunction measureIfFunction(recorder, owner, hookName, value) {\n\tif (typeof value !== \"function\") return value;\n\treturn measureHookCost(recorder, owner, hookName, value);\n}\n/**\n* What the build's callbacks have cost so far, leaving the recorder in place.\n*\n* Ungated on purpose: whether a build is worth reporting on is decided from the clocks Rust\n* holds, so the question is not this side's to ask.\n*\n* Rust calls this while the build is closing, so what it gets includes `closeBundle`.\n*/\nfunction summarizePluginTimings(key) {\n\tconst recorder = recorders.get(key);\n\tif (recorder === void 0) return {\n\t\tbusyMs: 0,\n\t\trows: []\n\t};\n\tconst rows = [];\n\tfor (const byHook of recorder.costs.values()) for (const cost of byHook.values()) {\n\t\tif (cost.calls === 0) continue;\n\t\trows.push({\n\t\t\towner: cost.owner,\n\t\t\tkind: cost.kind,\n\t\t\thook: cost.hookName,\n\t\t\tcalls: cost.calls,\n\t\t\tms: cost.ms,\n\t\t\tmaxInFlight: cost.maxInFlight,\n\t\t\toverlapMs: cost.overlapMs,\n\t\t\trankable: cost.overlapMs <= cost.ms * OVERLAP_TOLERANCE\n\t\t});\n\t}\n\treturn {\n\t\tbusyMs: recorder.busyMs,\n\t\trows\n\t};\n}\n//#endregion\n//#region src/plugin/bindingify-plugin.ts\nfunction bindingifyPlugin(plugin, options, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode, timings) {\n\tconst args = {\n\t\tplugin,\n\t\toptions,\n\t\toutputOptions,\n\t\tpluginContextData,\n\t\tonLog,\n\t\tlogLevel,\n\t\twatchMode,\n\t\tnormalizedOutputPlugins\n\t};\n\tconst { plugin: buildStart, meta: buildStartMeta } = bindingifyBuildStart(args);\n\tconst { plugin: resolveId, meta: resolveIdMeta, filter: resolveIdFilter } = bindingifyResolveId(args);\n\tconst { plugin: resolveDynamicImport, meta: resolveDynamicImportMeta } = bindingifyResolveDynamicImport(args);\n\tconst { plugin: buildEnd, meta: buildEndMeta } = bindingifyBuildEnd(args);\n\tconst { plugin: transform, meta: transformMeta, filter: transformFilter } = bindingifyTransform(args);\n\tconst { plugin: moduleParsed, meta: moduleParsedMeta } = bindingifyModuleParsed(args);\n\tconst { plugin: load, meta: loadMeta, filter: loadFilter } = bindingifyLoad(args);\n\tconst { plugin: renderChunk, meta: renderChunkMeta, filter: renderChunkFilter } = bindingifyRenderChunk(args);\n\tconst { plugin: augmentChunkHash, meta: augmentChunkHashMeta } = bindingifyAugmentChunkHash(args);\n\tconst { plugin: resolveFileUrl, meta: resolveFileUrlMeta } = bindingifyResolveFileUrl(args);\n\tconst { plugin: renderStart, meta: renderStartMeta } = bindingifyRenderStart(args);\n\tconst { plugin: renderError, meta: renderErrorMeta } = bindingifyRenderError(args);\n\tconst { plugin: generateBundle, meta: generateBundleMeta } = bindingifyGenerateBundle(args);\n\tconst { plugin: writeBundle, meta: writeBundleMeta } = bindingifyWriteBundle(args);\n\tconst { plugin: closeBundle, meta: closeBundleMeta } = bindingifyCloseBundle(args);\n\tconst { plugin: banner, meta: bannerMeta } = bindingifyAddonHook(args, \"banner\");\n\tconst { plugin: footer, meta: footerMeta } = bindingifyAddonHook(args, \"footer\");\n\tconst { plugin: intro, meta: introMeta } = bindingifyAddonHook(args, \"intro\");\n\tconst { plugin: outro, meta: outroMeta } = bindingifyAddonHook(args, \"outro\");\n\tconst { plugin: watchChange, meta: watchChangeMeta } = bindingifyWatchChange(args);\n\tconst { plugin: hotUpdate, meta: hotUpdateMeta } = bindingifyHotUpdate(args);\n\tconst { plugin: closeWatcher, meta: closeWatcherMeta } = bindingifyCloseWatcher(args);\n\tlet hookUsage = extractHookUsage(plugin).inner();\n\tconst result = {\n\t\tname: plugin.name,\n\t\tbuildStart,\n\t\tbuildStartMeta,\n\t\tresolveId,\n\t\tresolveIdMeta,\n\t\tresolveIdFilter,\n\t\tresolveDynamicImport,\n\t\tresolveDynamicImportMeta,\n\t\tbuildEnd,\n\t\tbuildEndMeta,\n\t\ttransform,\n\t\ttransformMeta,\n\t\ttransformFilter,\n\t\tmoduleParsed,\n\t\tmoduleParsedMeta,\n\t\tload,\n\t\tloadMeta,\n\t\tloadFilter,\n\t\trenderChunk,\n\t\trenderChunkMeta,\n\t\trenderChunkFilter,\n\t\taugmentChunkHash,\n\t\taugmentChunkHashMeta,\n\t\tresolveFileUrl,\n\t\tresolveFileUrlMeta,\n\t\trenderStart,\n\t\trenderStartMeta,\n\t\trenderError,\n\t\trenderErrorMeta,\n\t\tgenerateBundle,\n\t\tgenerateBundleMeta,\n\t\twriteBundle,\n\t\twriteBundleMeta,\n\t\tcloseBundle,\n\t\tcloseBundleMeta,\n\t\tbanner,\n\t\tbannerMeta,\n\t\tfooter,\n\t\tfooterMeta,\n\t\tintro,\n\t\tintroMeta,\n\t\toutro,\n\t\toutroMeta,\n\t\twatchChange,\n\t\twatchChangeMeta,\n\t\thotUpdate,\n\t\thotUpdateMeta,\n\t\tcloseWatcher,\n\t\tcloseWatcherMeta,\n\t\thookUsage\n\t};\n\treturn wrapHandlers(result, {\n\t\tkey: plugin,\n\t\tname: result.name,\n\t\tkind: \"plugin\"\n\t}, timings);\n}\nfunction wrapHandlers(plugin, owner, timings) {\n\tfor (const hookName of [\n\t\t\"buildStart\",\n\t\t\"resolveId\",\n\t\t\"resolveDynamicImport\",\n\t\t\"buildEnd\",\n\t\t\"transform\",\n\t\t\"moduleParsed\",\n\t\t\"load\",\n\t\t\"renderChunk\",\n\t\t\"augmentChunkHash\",\n\t\t\"resolveFileUrl\",\n\t\t\"renderStart\",\n\t\t\"renderError\",\n\t\t\"generateBundle\",\n\t\t\"writeBundle\",\n\t\t\"closeBundle\",\n\t\t\"banner\",\n\t\t\"footer\",\n\t\t\"intro\",\n\t\t\"outro\",\n\t\t\"watchChange\",\n\t\t\"hotUpdate\",\n\t\t\"closeWatcher\"\n\t]) {\n\t\tconst raw = plugin[hookName];\n\t\tconst handler = raw && measureHookCost(timings, owner, hookName, raw);\n\t\tif (handler) plugin[hookName] = async (...args) => {\n\t\t\ttry {\n\t\t\t\treturn await handler(...args);\n\t\t\t} catch (e) {\n\t\t\t\treturn error(logPluginError(e, plugin.name, {\n\t\t\t\t\thook: hookName,\n\t\t\t\t\tid: hookName === \"transform\" ? args[2] : void 0\n\t\t\t\t}));\n\t\t\t}\n\t\t};\n\t}\n\treturn plugin;\n}\n//#endregion\n//#region src/utils/normalize-transform-options.ts\n/**\n* Normalizes transform options by extracting `define`, `inject`, and `dropLabels` separately from OXC transform options.\n*\n* Prioritizes values from `transform.define`, `transform.inject`, and `transform.dropLabels` over deprecated top-level options.\n*/\nfunction normalizeTransformOptions(inputOptions) {\n\tconst transform = inputOptions.transform;\n\tconst define = transform?.define ? Object.entries(transform.define) : void 0;\n\tconst inject = transform?.inject;\n\tconst dropLabels = transform?.dropLabels;\n\tlet oxcTransformOptions;\n\tif (transform) {\n\t\tconst { define: _define, inject: _inject, dropLabels: _dropLabels, ...rest } = transform;\n\t\tif (Object.keys(rest).length > 0) {\n\t\t\tif (rest.jsx === false) rest.jsx = \"disable\";\n\t\t\toxcTransformOptions = rest;\n\t\t}\n\t}\n\treturn {\n\t\tdefine,\n\t\tinject,\n\t\tdropLabels,\n\t\toxcTransformOptions\n\t};\n}\n//#endregion\n//#region src/utils/default-dev-runtime.ts\nfunction getDefaultDevRuntime(host = \"localhost\", port = 3e3) {\n\treturn \"// @ts-check\\n\\nclass Module {\\n  /**\\n   * @type {{ exports: any }}\\n   */\\n  exportsHolder = { exports: null };\\n  /**\\n   * @type {string}\\n   */\\n  id;\\n\\n  /**\\n   * @param {string} id\\n   */\\n  constructor(id) {\\n    this.id = id;\\n  }\\n\\n  get exports() {\\n    return this.exportsHolder.exports;\\n  }\\n}\\n\\n/**\\n * Compiler-emitted module-graph delta — topology (static + dynamic edges).\\n * `ids[0, localCount)` are the modules this payload carries; `ids[localCount, …)` are foreign edge targets.\\n * `edges[i]` / `dynamicEdges[i]` are the static / dynamic-`import()` out-edges of `ids[i]`.\\n * `bindings[i][j]` are the export names `ids[i]` imports through `edges[i][j]`. `bindings` holds\\n * only some rows; a missing row, or a missing or `null` entry, means the whole namespace.\\n * `dynamicEdges` also holds only some rows; a missing row means no dynamic edges.\\n * `stamps[i]` is the rebuild stamp of `ids[i]`; a missing row means 0.\\n * @typedef {{ ids: string[], localCount: number, edges: number[][], bindings?: Record<number, (string[] | null)[]>, dynamicEdges?: Record<number, number[]>, stamps?: Record<number, number> }} ModuleGraphDelta\\n * @typedef {{ createModuleHotContext(moduleId: string): any, onModuleCacheRemoval(moduleId: string): void }} DevRuntimeHooks\\n */\\n\\nexport class MissingFactoryError extends Error {\\n  /**\\n   * @param {string} id\\n   */\\n  constructor(id) {\\n    super(`No factory registered for module ${id}`);\\n    this.id = id;\\n  }\\n}\\n\\nexport class DevRuntime {\\n  /**\\n   * Client ID generated at runtime initialization, used for lazy compilation requests.\\n   * @type {string}\\n   */\\n  clientId;\\n\\n  /**\\n   * @param {string} clientId\\n   */\\n  constructor(clientId) {\\n    this.clientId = clientId;\\n  }\\n\\n  /**\\n   * Static import edges from `registerGraph` — entries persist across `removeModuleCache`\\n   * and change only by replacement from a newer payload (last write wins).\\n   * `bindings` is the payload row as sent; `getImportedBindings` resolves a missing entry.\\n   * @type {Map<string, { edges: string[], bindings: (string[] | null)[] | undefined }>}\\n   */\\n  staticImports = new Map();\\n  /**\\n   * Reverse index over the static imports.\\n   * @type {Map<string, Set<string>>}\\n   */\\n  importers = new Map();\\n  /**\\n   * Dynamic `import()` edges from `registerGraph`, keyed by importer — mirror of\\n   * `staticImports` for the dynamic reverse index.\\n   * @type {Map<string, { edges: string[] }>}\\n   */\\n  dynamicImports = new Map();\\n  /**\\n   * Reverse index over the dynamic imports.\\n   * @type {Map<string, Set<string>>}\\n   */\\n  dynamicImporters = new Map();\\n  /**\\n   * The module cache. Membership means \\\"this module's side effects ran in this tab\\\" —\\n   * registration is emitted ahead of every module body, and nothing un-registers on\\n   * unwind, so a factory that throws mid-body stays registered. A `Map` rather than a\\n   * plain object: HMR eviction deletes entries, and a `delete` on an object drops V8\\n   * into dictionary mode, taxing every later lookup on the hottest read path.\\n   * @type {Map<string, Module>}\\n   */\\n  moduleCache = new Map();\\n  /**\\n   * Re-runnable factories from HMR patches and lazy chunks. The initial bundle stays\\n   * scope-hoisted and contributes none.\\n   * @type {Map<string, (id: string) => void>}\\n   */\\n  factories = new Map();\\n  /**\\n   * A late payload (a slow lazy chunk after an HMR patch) must not replace newer rows or\\n   * factories.\\n   * @type {Map<string, number>}\\n   */\\n  rowStamps = new Map();\\n  /** @type {Map<string, number>} */\\n  factoryStamps = new Map();\\n  /**\\n   * Installed by the dev client at boot. The runtime is a store + executor and makes\\n   * no HMR decisions; accepting, disposing, and reloading live behind these hooks.\\n   * @type {DevRuntimeHooks | null}\\n   */\\n  hooks = null;\\n\\n  /**\\n   * @param {ModuleGraphDelta} delta\\n   */\\n  registerGraph(delta) {\\n    for (let i = 0; i < delta.localCount; i++) {\\n      const id = delta.ids[i];\\n      if (delta.stamps) {\\n        const stamp = delta.stamps[i] ?? 0;\\n        if (stamp < (this.rowStamps.get(id) ?? 0)) continue;\\n        this.rowStamps.set(id, stamp);\\n      } else {\\n        // A full-build chunk has no stamps. It runs its code right away, so its row always\\n        // replaces the old one.\\n        this.rowStamps.delete(id);\\n      }\\n      const edges = delta.edges[i].map((j) => delta.ids[j]);\\n      for (const target of this.staticImports.get(id)?.edges ?? []) {\\n        this.importers.get(target)?.delete(id);\\n      }\\n      for (const target of edges) {\\n        let importerSet = this.importers.get(target);\\n        if (!importerSet) {\\n          importerSet = new Set();\\n          this.importers.set(target, importerSet);\\n        }\\n        importerSet.add(id);\\n      }\\n      this.staticImports.set(id, { edges, bindings: delta.bindings?.[i] });\\n\\n      // Dynamic `import()` edges are maintained in a parallel reverse index with the same\\n      // last-write-wins bookkeeping; `getImporters` unions the two.\\n      const dynamicEdges = (delta.dynamicEdges?.[i] ?? []).map((j) => delta.ids[j]);\\n      for (const target of this.dynamicImports.get(id)?.edges ?? []) {\\n        this.dynamicImporters.get(target)?.delete(id);\\n      }\\n      for (const target of dynamicEdges) {\\n        let importerSet = this.dynamicImporters.get(target);\\n        if (!importerSet) {\\n          importerSet = new Set();\\n          this.dynamicImporters.set(target, importerSet);\\n        }\\n        importerSet.add(id);\\n      }\\n      this.dynamicImports.set(id, { edges: dynamicEdges });\\n    }\\n  }\\n\\n  /**\\n   * @param {string} id\\n   * @param {(id: string) => void} fn\\n   * @param {number} [stamp]\\n   */\\n  registerFactory(id, fn, stamp = 0) {\\n    if (stamp < (this.factoryStamps.get(id) ?? 0)) return;\\n    this.factoryStamps.set(id, stamp);\\n    this.factories.set(id, fn);\\n  }\\n\\n  /**\\n   * @param {string} id\\n   * @param {{ exports: any }} [exportsHolder]\\n   */\\n  registerModule(id, exportsHolder = { exports: {} }) {\\n    const module = new Module(id);\\n    module.exportsHolder = exportsHolder;\\n    this.moduleCache.set(id, module);\\n  }\\n\\n  /**\\n   * @param {string} id\\n   * @returns {string[]}\\n   */\\n  getImporters(id) {\\n    // Static ∪ dynamic importers — the boundary walk treats both kinds the same (parity\\n    // with Vite `node.importers` / webpack `module.parents`). Deduped so a module that\\n    // imports `id` both statically and via `import()` appears once.\\n    const dynamic = this.dynamicImporters.get(id);\\n    if (!dynamic || dynamic.size === 0) {\\n      return [...(this.importers.get(id) ?? [])];\\n    }\\n    return [...new Set([...(this.importers.get(id) ?? []), ...dynamic])];\\n  }\\n\\n  /**\\n   * `\\\"*\\\"` means the whole namespace, an empty list a side-effect-only import, `undefined` no edge.\\n   * @param {string} importer\\n   * @param {string} id\\n   * @returns {string[] | undefined}\\n   */\\n  getImportedBindings(importer, id) {\\n    const record = this.staticImports.get(importer);\\n    const j = record ? record.edges.indexOf(id) : -1;\\n    const names = j === -1 ? undefined : (record?.bindings?.[j] ?? ['*']);\\n    if (!this.dynamicImports.get(importer)?.edges.includes(id)) {\\n      return names;\\n    }\\n    if (!names) return ['*'];\\n    return names.includes('*') ? names : [...names, '*'];\\n  }\\n\\n  /**\\n   * @param {string} id\\n   */\\n  isExecuted(id) {\\n    return this.moduleCache.has(id);\\n  }\\n\\n  /**\\n   * @param {string} id\\n   */\\n  hasFactory(id) {\\n    return this.factories.has(id);\\n  }\\n\\n  /**\\n   * Module-cache delete only — static imports and factories persist. Removal is what\\n   * re-arms a cache-gated factory for `initModule`.\\n   * @param {string} id\\n   */\\n  removeModuleCache(id) {\\n    this.moduleCache.delete(id);\\n    this.hooks?.onModuleCacheRemoval(id);\\n  }\\n\\n  /**\\n   * The one re-execution gate: registered → return the live exports; otherwise run the\\n   * mapped factory (which registers itself first, then runs the body).\\n   * @param {string} id\\n   */\\n  initModule(id) {\\n    if (this.moduleCache.has(id)) {\\n      return this.loadExports(id);\\n    }\\n    const factory = this.factories.get(id);\\n    if (!factory) {\\n      throw new MissingFactoryError(id);\\n    }\\n    factory(id);\\n    return this.loadExports(id);\\n  }\\n\\n  /**\\n   * @param {string} id\\n   */\\n  loadExports(id) {\\n    const module = this.moduleCache.get(id);\\n    if (module) {\\n      return module.exportsHolder.exports;\\n    } else {\\n      console.warn(`Module ${id} not found`);\\n      return {};\\n    }\\n  }\\n\\n  /**\\n   * @param {string} moduleId\\n   */\\n  createModuleHotContext(moduleId) {\\n    if (this.hooks) {\\n      return this.hooks.createModuleHotContext(moduleId);\\n    }\\n    throw new Error('createModuleHotContext requires installed hooks or an override');\\n  }\\n\\n  /** @internal */\\n  // @ts-expect-error The variable will be injected at build time.\\n  __toESM = __toESM;\\n  /** @internal */\\n  // @ts-expect-error The variable will be injected at build time.\\n  __toCommonJS = __toCommonJS;\\n  /** @internal */\\n  // @ts-expect-error The variable will be injected at build time.\\n  __exportAll = __exportAll;\\n  /**\\n   * @param {boolean} [isNodeMode]\\n   * @returns {(mod: any) => any}\\n   * @internal\\n   */\\n  // @ts-expect-error The variable will be injected at build time.\\n  __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);\\n  /** @internal */\\n  // @ts-expect-error The variable will be injected at build time.\\n  __reExport = __reExport;\\n}\\n\\n// @ts-check\\n\\n/** @import { DevRuntime } from './runtime-extra-dev-common.js' */\\n\\n/** @type {typeof DevRuntime} */\\n// @ts-expect-error -- there's no way to declare a variable by JSDoc\\nvar BaseDevRuntime = DevRuntime;\\n\\nclass ModuleHotContext {\\n  /**\\n   * @type {{ deps: [string], fn: (moduleExports: Record<string, any>[]) => void }[]}\\n   */\\n  acceptCallbacks = [];\\n  /**\\n   * @param {string} moduleId\\n   * @param {InstanceType<BaseDevRuntime>} devRuntime\\n   */\\n  constructor(moduleId, devRuntime) {\\n    this.moduleId = moduleId;\\n    this.devRuntime = devRuntime;\\n  }\\n\\n  /**\\n   * @overload\\n   * @param {(mod: Record<string, any>) => void} cb\\n   * @returns {void}\\n   */\\n  /**\\n   * @param {...any} args\\n   * @returns {void}\\n   */\\n  accept(...args) {\\n    if (args.length === 1) {\\n      const [cb] = /** @type {[(mod: Record<string, any>) => void]} */ (args);\\n      const acceptingPath = this.moduleId;\\n      this.acceptCallbacks.push({\\n        deps: [acceptingPath],\\n        fn: cb,\\n      });\\n    } else if (args.length === 0) {}\\n    else {\\n      throw new Error('Invalid arguments for `import.meta.hot.accept`');\\n    }\\n  }\\n\\n  invalidate() {\\n    socket.send(JSON.stringify({\\n      type: 'hmr:invalidate',\\n      moduleId: this.moduleId,\\n    }));\\n  }\\n}\\n\\nclass DefaultDevRuntime extends BaseDevRuntime {\\n  /**\\n   * @type {Map<string, ModuleHotContext>}\\n   */\\n  moduleHotContexts = new Map();\\n  /**\\n   * @override\\n   * @param {string} moduleId\\n   */\\n  createModuleHotContext(moduleId) {\\n    const hotContext = new ModuleHotContext(moduleId, this);\\n    this.moduleHotContexts.set(moduleId, hotContext);\\n    return hotContext;\\n  }\\n}\\n\\n/** @param {string} url */\\nfunction loadScript(url) {\\n  var script = document.createElement('script');\\n  script.src = url;\\n  script.type = 'module';\\n  script.onerror = function() {\\n    console.error('Failed to load script: ' + url);\\n  };\\n  document.body.appendChild(script);\\n}\\n\\nconsole.debug('HMR runtime loaded', '$ADDR');\\n// Generate client ID immediately at runtime initialization\\n// This ensures the client ID is available before any lazy imports\\nconst clientId = crypto.randomUUID();\\nconst addr = new URL('ws://$ADDR');\\naddr.searchParams.set('clientId', clientId);\\n\\nconst socket = new WebSocket(addr);\\n\\n(/** @type {any} */ (globalThis)).__rolldown_runtime__ ??=\\n  new DefaultDevRuntime(clientId);\\n\\n/** @param {MessageEvent} event */\\nsocket.onmessage = function(event) {\\n  const data = JSON.parse(event.data);\\n  console.debug('Received message:', data);\\n  if (data.type === 'connected') {\\n    // Server acknowledged the connection\\n    console.debug('[hmr]: Connection established with server');\\n  } else if (data.type === 'hmr:update') {\\n    if (typeof process === 'object') {\\n      import(data.path);\\n      console.debug(`[hmr]: Importing HMR patch: ${data.path}`);\\n    } else {\\n      console.debug(`[hmr]: Loading HMR patch: ${data.path}`);\\n      loadScript(data.url);\\n    }\\n  } else if (data.type === 'hmr:reload') {\\n    console.log('[hmr]: Full reload required, reloading page');\\n    if (typeof location !== 'undefined') {\\n      location.reload();\\n    } else {\\n      console.log('[hmr]: location is undefined, cannot reload page');\\n    }\\n  }\\n};\\n\".replaceAll(\"$ADDR\", `${host}:${port}`);\n}\n//#endregion\n//#region src/utils/bindingify-input-options.ts\nfunction bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode, timings) {\n\tconst plugins = rawPlugins.map((plugin) => {\n\t\tif (getParallelPluginInfo(plugin)) return;\n\t\tif (plugin instanceof BuiltinPlugin) switch (plugin.name) {\n\t\t\tcase \"builtin:vite-manifest\": return bindingifyManifestPlugin(plugin, pluginContextData);\n\t\t\tdefault: return bindingifyBuiltInPlugin(plugin);\n\t\t}\n\t\treturn bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode, timings);\n\t});\n\tconst normalizedTransform = normalizeTransformOptions(inputOptions);\n\treturn {\n\t\tinput: bindingifyInput(inputOptions.input),\n\t\tplugins,\n\t\tcwd: inputOptions.cwd ?? process.cwd(),\n\t\texternal: bindingifyExternal(inputOptions.external, timings),\n\t\tresolve: bindingifyResolve(inputOptions.resolve),\n\t\tplatform: inputOptions.platform,\n\t\tshimMissingExports: inputOptions.shimMissingExports,\n\t\tlogLevel: bindingifyLogLevel(logLevel),\n\t\tonLog,\n\t\ttreeshake: bindingifyTreeshakeOptions(inputOptions.treeshake, timings),\n\t\tmoduleTypes: inputOptions.moduleTypes,\n\t\tdefine: normalizedTransform.define,\n\t\tinject: bindingifyInject(normalizedTransform.inject),\n\t\texperimental: bindingifyExperimental(inputOptions.experimental),\n\t\tprofilerNames: outputOptions.generatedCode?.profilerNames,\n\t\ttransform: normalizedTransform.oxcTransformOptions,\n\t\twatch: bindingifyWatch(inputOptions.watch),\n\t\tdropLabels: normalizedTransform.dropLabels,\n\t\tkeepNames: outputOptions.keepNames,\n\t\tchecks: inputOptions.checks,\n\t\tpluginTimings: timings ? () => summarizePluginTimings(inputOptions) : void 0,\n\t\tdeferSyncScanData: () => {\n\t\t\tlet ret = [];\n\t\t\tpluginContextData.moduleOptionMap.forEach((value, key) => {\n\t\t\t\tif (value.invalidate) ret.push({\n\t\t\t\t\tid: key,\n\t\t\t\t\tsideEffects: value.moduleSideEffects ?? void 0\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn ret;\n\t\t},\n\t\tmakeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),\n\t\tdevtools: inputOptions.devtools,\n\t\tinvalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),\n\t\tpreserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),\n\t\toptimization: inputOptions.optimization,\n\t\tcontext: inputOptions.context,\n\t\ttsconfig: inputOptions.resolve?.tsconfigFilename ?? inputOptions.tsconfig\n\t};\n}\nfunction bindingifyDevMode(devMode) {\n\tif (devMode) {\n\t\tif (typeof devMode === \"boolean\") return devMode ? {\n\t\t\timplement: getDefaultDevRuntime(),\n\t\t\tskipCommonRuntimeInjection: true\n\t\t} : void 0;\n\t\tconst usesDefaultRuntime = devMode.implement == null;\n\t\treturn {\n\t\t\t...devMode,\n\t\t\timplement: devMode.implement ?? getDefaultDevRuntime(devMode.host, devMode.port),\n\t\t\tskipCommonRuntimeInjection: usesDefaultRuntime ? true : devMode.skipCommonRuntimeInjection\n\t\t};\n\t}\n}\nfunction bindingifyAttachDebugInfo(attachDebugInfo) {\n\tswitch (attachDebugInfo) {\n\t\tcase void 0: return;\n\t\tcase \"full\": return import_binding.BindingAttachDebugInfo.Full;\n\t\tcase \"simple\": return import_binding.BindingAttachDebugInfo.Simple;\n\t\tcase \"none\": return import_binding.BindingAttachDebugInfo.None;\n\t}\n}\nfunction bindingifyExternal(external, timings) {\n\tif (external) {\n\t\tif (typeof external === \"function\") {\n\t\t\tconst measured = measureHookCost(timings, INPUT_OPTIONS_OWNER, \"external\", external);\n\t\t\treturn (id, importer, isResolved) => {\n\t\t\t\tif (id.startsWith(\"\\0\")) return false;\n\t\t\t\treturn measured(id, importer, isResolved) ?? false;\n\t\t\t};\n\t\t}\n\t\treturn arraify(external);\n\t}\n}\nfunction bindingifyExperimental(experimental) {\n\tlet chunkModulesOrder = import_binding.BindingChunkModuleOrderBy.ExecOrder;\n\tif (experimental?.chunkModulesOrder) switch (experimental.chunkModulesOrder) {\n\t\tcase \"exec-order\":\n\t\t\tchunkModulesOrder = import_binding.BindingChunkModuleOrderBy.ExecOrder;\n\t\t\tbreak;\n\t\tcase \"module-id\":\n\t\t\tchunkModulesOrder = import_binding.BindingChunkModuleOrderBy.ModuleId;\n\t\t\tbreak;\n\t\tdefault: throw new Error(`Unexpected chunkModulesOrder: ${experimental.chunkModulesOrder}`);\n\t}\n\treturn {\n\t\tviteMode: experimental?.viteMode,\n\t\tresolveNewUrlToAsset: experimental?.resolveNewUrlToAsset,\n\t\tdevMode: bindingifyDevMode(experimental?.devMode),\n\t\tattachDebugInfo: bindingifyAttachDebugInfo(experimental?.attachDebugInfo),\n\t\tchunkModulesOrder,\n\t\tchunkImportMap: experimental?.chunkImportMap,\n\t\tonDemandWrapping: experimental?.onDemandWrapping,\n\t\tincrementalBuild: experimental?.incrementalBuild,\n\t\tnativeMagicString: experimental?.nativeMagicString,\n\t\tchunkOptimization: experimental?.chunkOptimization,\n\t\tlazyBarrel: experimental?.lazyBarrel\n\t};\n}\nfunction bindingifyResolve(resolve) {\n\tconst yarnPnp = typeof process === \"object\" && !!process.versions?.pnp;\n\tif (resolve) {\n\t\tconst { alias, extensionAlias, ...rest } = resolve;\n\t\treturn {\n\t\t\talias: alias ? Object.entries(alias).map(([name, replacement]) => ({\n\t\t\t\tfind: name,\n\t\t\t\treplacements: replacement === false ? [void 0] : arraify(replacement)\n\t\t\t})) : void 0,\n\t\t\textensionAlias: extensionAlias ? Object.entries(extensionAlias).map(([name, value]) => ({\n\t\t\t\ttarget: name,\n\t\t\t\treplacements: value\n\t\t\t})) : void 0,\n\t\t\tyarnPnp,\n\t\t\t...rest\n\t\t};\n\t} else return { yarnPnp };\n}\nfunction bindingifyInject(inject) {\n\tif (inject) return Object.entries(inject).map(([alias, item]) => {\n\t\tif (Array.isArray(item)) {\n\t\t\tif (item[1] === \"*\") return {\n\t\t\t\ttagNamespace: true,\n\t\t\t\talias,\n\t\t\t\tfrom: item[0]\n\t\t\t};\n\t\t\treturn {\n\t\t\t\ttagNamed: true,\n\t\t\t\talias,\n\t\t\t\tfrom: item[0],\n\t\t\t\timported: item[1]\n\t\t\t};\n\t\t} else return {\n\t\t\ttagNamed: true,\n\t\t\timported: \"default\",\n\t\t\talias,\n\t\t\tfrom: item\n\t\t};\n\t});\n}\nfunction bindingifyLogLevel(logLevel) {\n\tswitch (logLevel) {\n\t\tcase \"silent\": return import_binding.BindingLogLevel.Silent;\n\t\tcase \"debug\": return import_binding.BindingLogLevel.Debug;\n\t\tcase \"warn\": return import_binding.BindingLogLevel.Warn;\n\t\tcase \"info\": return import_binding.BindingLogLevel.Info;\n\t\tdefault: throw new Error(`Unexpected log level: ${logLevel}`);\n\t}\n}\nfunction bindingifyInput(input) {\n\tif (input === void 0) return [];\n\tif (typeof input === \"string\") return [{ import: input }];\n\tif (Array.isArray(input)) return input.map((src) => ({ import: src }));\n\treturn Object.entries(input).map(([name, import_path]) => {\n\t\treturn {\n\t\t\tname,\n\t\t\timport: import_path\n\t\t};\n\t});\n}\nfunction bindingifyWatch(watch) {\n\tif (watch) {\n\t\tconst watcher = watch.watcher ?? {};\n\t\treturn {\n\t\t\tbuildDelay: watch.buildDelay,\n\t\t\tskipWrite: watch.skipWrite,\n\t\t\tusePolling: watcher.usePolling,\n\t\t\tpollInterval: watcher.pollInterval,\n\t\t\tcompareContentsForPolling: watcher.compareContentsForPolling,\n\t\t\tuseDebounce: watcher.useDebounce,\n\t\t\tdebounceDelay: watcher.debounceDelay,\n\t\t\tdebounceTickRate: watcher.debounceTickRate,\n\t\t\tinclude: normalizedStringOrRegex(watch.include),\n\t\t\texclude: normalizedStringOrRegex(watch.exclude),\n\t\t\tonInvalidate: (...args) => watch.onInvalidate?.(...args)\n\t\t};\n\t}\n}\nfunction bindingifyTreeshakeOptions(config, timings) {\n\tif (config === false) return;\n\tif (config === true || config === void 0) return { moduleSideEffects: true };\n\tlet normalizedConfig = {\n\t\tmoduleSideEffects: true,\n\t\tannotations: config.annotations,\n\t\tmanualPureFunctions: config.manualPureFunctions,\n\t\tunknownGlobalSideEffects: config.unknownGlobalSideEffects,\n\t\tinvalidImportSideEffects: config.invalidImportSideEffects,\n\t\tcommonjs: config.commonjs\n\t};\n\tswitch (config.propertyReadSideEffects) {\n\t\tcase \"always\":\n\t\t\tnormalizedConfig.propertyReadSideEffects = import_binding.BindingPropertyReadSideEffects.Always;\n\t\t\tbreak;\n\t\tcase false: normalizedConfig.propertyReadSideEffects = import_binding.BindingPropertyReadSideEffects.False;\n\t}\n\tswitch (config.propertyWriteSideEffects) {\n\t\tcase \"always\":\n\t\t\tnormalizedConfig.propertyWriteSideEffects = import_binding.BindingPropertyWriteSideEffects.Always;\n\t\t\tbreak;\n\t\tcase false: normalizedConfig.propertyWriteSideEffects = import_binding.BindingPropertyWriteSideEffects.False;\n\t}\n\tif (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;\n\telse if (config.moduleSideEffects === \"no-external\") normalizedConfig.moduleSideEffects = [{\n\t\texternal: true,\n\t\tsideEffects: false\n\t}, {\n\t\texternal: false,\n\t\tsideEffects: true\n\t}];\n\telse normalizedConfig.moduleSideEffects = measureIfFunction(timings, INPUT_OPTIONS_OWNER, \"treeshake.moduleSideEffects\", config.moduleSideEffects);\n\treturn normalizedConfig;\n}\nfunction bindingifyMakeAbsoluteExternalsRelative(makeAbsoluteExternalsRelative) {\n\tif (makeAbsoluteExternalsRelative === \"ifRelativeSource\") return { type: \"IfRelativeSource\" };\n\tif (typeof makeAbsoluteExternalsRelative === \"boolean\") return {\n\t\ttype: \"Bool\",\n\t\tfield0: makeAbsoluteExternalsRelative\n\t};\n}\nfunction bindingifyPreserveEntrySignatures(preserveEntrySignatures) {\n\tif (preserveEntrySignatures == void 0) return;\n\telse if (typeof preserveEntrySignatures === \"string\") return {\n\t\ttype: \"String\",\n\t\tfield0: preserveEntrySignatures\n\t};\n\telse return {\n\t\ttype: \"Bool\",\n\t\tfield0: preserveEntrySignatures\n\t};\n}\n//#endregion\nexport { LOG_LEVEL_WARN as C, version as D, package_default as E, LOG_LEVEL_INFO as S, VERSION as T, getParallelPluginInfo as _, measureIfFunction as a, LOG_LEVEL_DEBUG as b, PluginContextData as c, transformRenderedChunk as d, __decorate as f, MinimalPluginContextImpl as g, PlainObjectLike as h, measureHookCost as i, transformModuleInfo as l, lazyProp as m, bindingifyPlugin as n, pluginTimingsRecorderFor as o, transformAssetSource as p, OUTPUT_OPTIONS_OWNER as r, RolldownMagicString as s, bindingifyInputOptions as t, transformToRollupOutput as u, normalizeHook as v, logLevelPriority as w, LOG_LEVEL_ERROR as x, normalizeLog as y };\n","import { n as __toESM, t as require_binding } from \"./binding-CUpfdq6A.mjs\";\nimport { a as logInputHookInOutputPlugin, n as error, s as logMissingCodeSplittingGroupDebugName } from \"./logs-D6uA606S.mjs\";\nimport { n as BuiltinPlugin } from \"./normalize-string-or-regex-COVDiCTB.mjs\";\nimport { C as LOG_LEVEL_WARN, T as VERSION, _ as getParallelPluginInfo, a as measureIfFunction, b as LOG_LEVEL_DEBUG, c as PluginContextData, d as transformRenderedChunk, g as MinimalPluginContextImpl, i as measureHookCost, l as transformModuleInfo, o as pluginTimingsRecorderFor, p as transformAssetSource, r as OUTPUT_OPTIONS_OWNER, t as bindingifyInputOptions, v as normalizeHook, w as logLevelPriority, y as normalizeLog } from \"./bindingify-input-options-UCGox0BH.mjs\";\nimport { a as unimplemented, t as arraify } from \"./misc-DOSKtd97.mjs\";\nimport { Worker } from \"node:worker_threads\";\nimport path, { sep } from \"node:path\";\nimport { formatWithOptions, styleText } from \"node:util\";\nimport g$1 from \"node:process\";\nimport * as tty from \"node:tty\";\nimport os from \"node:os\";\n//#region src/log/logger.ts\nfunction getLogger(plugins, onLog, logLevel, watchMode) {\n\tconst minimalPriority = logLevelPriority[logLevel];\n\tconst logger = (level, log, skipped = /* @__PURE__ */ new Set()) => {\n\t\tif (logLevelPriority[level] < minimalPriority) return;\n\t\tfor (const plugin of getSortedPlugins(\"onLog\", plugins)) {\n\t\t\tif (skipped.has(plugin)) continue;\n\t\t\tconst { onLog: pluginOnLog } = plugin;\n\t\t\tif (pluginOnLog) {\n\t\t\t\tconst getLogHandler = (level) => {\n\t\t\t\t\tif (logLevelPriority[level] < minimalPriority) return () => {};\n\t\t\t\t\treturn (log) => logger(level, normalizeLog(log), new Set(skipped).add(plugin));\n\t\t\t\t};\n\t\t\t\tif ((\"handler\" in pluginOnLog ? pluginOnLog.handler : pluginOnLog).call({\n\t\t\t\t\tdebug: getLogHandler(\"debug\"),\n\t\t\t\t\terror: (log) => error(normalizeLog(log)),\n\t\t\t\t\tinfo: getLogHandler(\"info\"),\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\trollupVersion: \"4.23.0\",\n\t\t\t\t\t\trolldownVersion: VERSION,\n\t\t\t\t\t\twatchMode\n\t\t\t\t\t},\n\t\t\t\t\twarn: getLogHandler(\"warn\"),\n\t\t\t\t\tpluginName: plugin.name || \"unknown\"\n\t\t\t\t}, level, log) === false) return;\n\t\t\t}\n\t\t}\n\t\tonLog(level, log);\n\t};\n\treturn logger;\n}\nconst getOnLog = (config, logLevel, printLog = defaultPrintLog) => {\n\tconst { onwarn, onLog } = config;\n\tconst defaultOnLog = getDefaultOnLog(printLog, onwarn);\n\tif (onLog) {\n\t\tconst minimalPriority = logLevelPriority[logLevel];\n\t\treturn (level, log) => onLog(level, addLogToString(log), (level, handledLog) => {\n\t\t\tif (level === \"error\") return error(normalizeLog(handledLog));\n\t\t\tif (logLevelPriority[level] >= minimalPriority) defaultOnLog(level, normalizeLog(handledLog));\n\t\t});\n\t}\n\treturn defaultOnLog;\n};\nconst getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {\n\tif (level === \"warn\") onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));\n\telse printLog(level, log);\n} : printLog;\nconst addLogToString = (log) => {\n\tObject.defineProperty(log, \"toString\", {\n\t\tvalue: () => getExtendedLogMessage(log),\n\t\twritable: true\n\t});\n\treturn log;\n};\nconst defaultPrintLog = (level, log) => {\n\tconst message = getExtendedLogMessage(log);\n\tswitch (level) {\n\t\tcase LOG_LEVEL_WARN: return console.warn(message);\n\t\tcase LOG_LEVEL_DEBUG: return console.debug(message);\n\t\tdefault: return console.info(message);\n\t}\n};\nconst getExtendedLogMessage = (log) => {\n\tlet prefix = \"\";\n\tif (log.plugin) prefix += `(${log.plugin} plugin) `;\n\tif (log.loc) prefix += `${relativeId(log.loc.file)} (${log.loc.line}:${log.loc.column}) `;\n\treturn prefix + log.message;\n};\nfunction relativeId(id) {\n\tif (!path.isAbsolute(id)) return id;\n\treturn path.relative(path.resolve(), id);\n}\n//#endregion\n//#region src/constants/plugin.ts\nconst ENUMERATED_INPUT_PLUGIN_HOOK_NAMES = [\n\t\"options\",\n\t\"buildStart\",\n\t\"resolveId\",\n\t\"load\",\n\t\"transform\",\n\t\"moduleParsed\",\n\t\"buildEnd\",\n\t\"onLog\",\n\t\"resolveDynamicImport\",\n\t\"closeBundle\",\n\t\"closeWatcher\",\n\t\"watchChange\"\n];\nconst ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES = [\n\t\"augmentChunkHash\",\n\t\"outputOptions\",\n\t\"renderChunk\",\n\t\"renderStart\",\n\t\"renderError\",\n\t\"writeBundle\",\n\t\"generateBundle\",\n\t\"resolveFileUrl\"\n];\nconst ENUMERATED_PLUGIN_HOOK_NAMES = [\n\t...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES,\n\t...ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES,\n\t\"footer\",\n\t\"banner\",\n\t\"intro\",\n\t\"outro\"\n];\nENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[0], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[1], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[2], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[3], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[4], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[5], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[6], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[7], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[8], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[9], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[10], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[11], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[12], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[13], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[14], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[15], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[16], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[17], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[18], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[19], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[20], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[21], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[22], ENUMERATED_PLUGIN_HOOK_NAMES[23], ENUMERATED_PLUGIN_HOOK_NAMES[23];\n//#endregion\n//#region src/plugin/internal-hooks.ts\n/**\n* Names of the hidden hooks, alongside {@linkcode InternalFunctionPluginHooks}.\n* Kept separate from `ENUMERATED_INPUT_PLUGIN_HOOK_NAMES` so the names stay out\n* of the published `.d.ts` (that list's type is reachable from public types).\n*/\nconst INTERNAL_PLUGIN_HOOK_NAMES = [\"hotUpdate\"];\n//#endregion\n//#region src/utils/async-flatten.ts\nasync function asyncFlatten(array) {\n\tdo\n\t\tarray = (await Promise.all(array)).flat(Infinity);\n\twhile (array.some((v) => v?.then));\n\treturn array;\n}\n//#endregion\n//#region src/utils/normalize-plugin-option.ts\nconst normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);\nfunction checkOutputPluginOption(plugins, onLog) {\n\tfor (const plugin of plugins) for (const hook of [...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ...INTERNAL_PLUGIN_HOOK_NAMES]) if (hook in plugin) {\n\t\tdelete plugin[hook];\n\t\tonLog(LOG_LEVEL_WARN, logInputHookInOutputPlugin(plugin.name, hook));\n\t}\n\treturn plugins;\n}\nfunction normalizePlugins(plugins, anonymousPrefix) {\n\tfor (const [index, plugin] of plugins.entries()) {\n\t\tif (getParallelPluginInfo(plugin)) continue;\n\t\tif (plugin instanceof BuiltinPlugin) continue;\n\t\tconst objectPlugin = plugin;\n\t\tif (!objectPlugin.name) objectPlugin.name = `${anonymousPrefix}${index + 1}`;\n\t}\n\treturn plugins;\n}\nconst ANONYMOUS_PLUGIN_PREFIX = \"at position \";\nconst ANONYMOUS_OUTPUT_PLUGIN_PREFIX = \"at output position \";\n//#endregion\n//#region src/plugin/plugin-driver.ts\nvar PluginDriver = class {\n\tstatic async callOptionsHook(inputOptions, watchMode = false) {\n\t\tconst logLevel = inputOptions.logLevel || \"info\";\n\t\tconst plugins = getSortedPlugins(\"options\", getObjectPlugins(await normalizePluginOption(inputOptions.plugins)));\n\t\tconst logger = getLogger(plugins, getOnLog(inputOptions, logLevel), logLevel, watchMode);\n\t\tfor (const plugin of plugins) {\n\t\t\tconst name = plugin.name || \"unknown\";\n\t\t\tconst options = plugin.options;\n\t\t\tif (options) {\n\t\t\t\tconst { handler } = normalizeHook(options);\n\t\t\t\tconst result = await handler.call(new MinimalPluginContextImpl(logger, logLevel, name, watchMode, \"onLog\"), inputOptions);\n\t\t\t\tif (result) inputOptions = result;\n\t\t\t}\n\t\t}\n\t\treturn inputOptions;\n\t}\n\tstatic callOutputOptionsHook(rawPlugins, outputOptions, onLog, logLevel, watchMode) {\n\t\tconst sortedPlugins = getSortedPlugins(\"outputOptions\", getObjectPlugins(rawPlugins));\n\t\tfor (const plugin of sortedPlugins) {\n\t\t\tconst name = plugin.name || \"unknown\";\n\t\t\tconst options = plugin.outputOptions;\n\t\t\tif (options) {\n\t\t\t\tconst { handler } = normalizeHook(options);\n\t\t\t\tconst result = handler.call(new MinimalPluginContextImpl(onLog, logLevel, name, watchMode), outputOptions);\n\t\t\t\tif (result) outputOptions = result;\n\t\t\t}\n\t\t}\n\t\treturn outputOptions;\n\t}\n};\nfunction getObjectPlugins(plugins) {\n\treturn plugins.filter((plugin) => {\n\t\tif (!plugin) return;\n\t\tif (getParallelPluginInfo(plugin)) return;\n\t\tif (plugin instanceof BuiltinPlugin) return;\n\t\treturn plugin;\n\t});\n}\nfunction getSortedPlugins(hookName, plugins) {\n\tconst pre = [];\n\tconst normal = [];\n\tconst post = [];\n\tfor (const plugin of plugins) {\n\t\tconst hook = plugin[hookName];\n\t\tif (hook) {\n\t\t\tif (typeof hook === \"object\") {\n\t\t\t\tif (hook.order === \"pre\") {\n\t\t\t\t\tpre.push(plugin);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (hook.order === \"post\") {\n\t\t\t\t\tpost.push(plugin);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnormal.push(plugin);\n\t\t}\n\t}\n\treturn [\n\t\t...pre,\n\t\t...normal,\n\t\t...post\n\t];\n}\nconst DEFAULT_CONFIG = {\n\tlang: void 0,\n\tmessage: void 0,\n\tabortEarly: void 0,\n\tabortPipeEarly: void 0\n};\n/**\n* Returns the global configuration.\n*\n* @param config The config to merge.\n*\n* @returns The configuration.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction getGlobalConfig(config$1) {\n\tif (!config$1 && true) return DEFAULT_CONFIG;\n\treturn {\n\t\tlang: config$1?.lang ?? void 0,\n\t\tmessage: config$1?.message,\n\t\tabortEarly: config$1?.abortEarly ?? void 0,\n\t\tabortPipeEarly: config$1?.abortPipeEarly ?? void 0\n\t};\n}\n/**\n* Stringifies an unknown input to a literal or type string.\n*\n* @param input The unknown input.\n*\n* @returns A literal or type string.\n*\n* @internal\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction _stringify(input) {\n\tconst type = typeof input;\n\tif (type === \"string\") return `\"${input}\"`;\n\tif (type === \"number\" || type === \"bigint\" || type === \"boolean\") return `${input}`;\n\tif (type === \"object\" || type === \"function\") return (input && Object.getPrototypeOf(input)?.constructor?.name) ?? \"null\";\n\treturn type;\n}\n/**\n* Adds an issue to the dataset.\n*\n* @param context The issue context.\n* @param label The issue label.\n* @param dataset The input dataset.\n* @param config The configuration.\n* @param other The optional props.\n*\n* @internal\n*/\nfunction _addIssue(context, label, dataset, config$1, other) {\n\tconst input = other && \"input\" in other ? other.input : dataset.value;\n\tconst expected = other?.expected ?? context.expects ?? null;\n\tconst received = other?.received ?? /* @__PURE__ */ _stringify(input);\n\tconst issue = {\n\t\tkind: context.kind,\n\t\ttype: context.type,\n\t\tinput,\n\t\texpected,\n\t\treceived,\n\t\tmessage: `Invalid ${label}: ${expected ? `Expected ${expected} but r` : \"R\"}eceived ${received}`,\n\t\trequirement: context.requirement,\n\t\tpath: other?.path,\n\t\tissues: other?.issues,\n\t\tlang: config$1.lang,\n\t\tabortEarly: config$1.abortEarly,\n\t\tabortPipeEarly: config$1.abortPipeEarly\n\t};\n\tconst isSchema = context.kind === \"schema\";\n\tconst message$1 = other?.message ?? context.message ?? (context.reference, issue.lang, void 0) ?? (isSchema ? (issue.lang, void 0) : null) ?? config$1.message ?? (issue.lang, void 0);\n\tif (message$1 !== void 0) issue.message = typeof message$1 === \"function\" ? message$1(issue) : message$1;\n\tif (isSchema) dataset.typed = false;\n\tif (dataset.issues) dataset.issues.push(issue);\n\telse dataset.issues = [issue];\n}\n/**\n* Compares two values using the SameValueZero algorithm, which treats `NaN`\n* as equal to itself unlike `===`.\n*\n* @param value1 The first value.\n* @param value2 The second value.\n*\n* @returns Whether the values are equal.\n*\n* @internal\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isSameValueZero(value1, value2) {\n\treturn value1 === value2 || Number.isNaN(value1) && Number.isNaN(value2);\n}\n/**\n* Disallows inherited object properties and prevents object prototype\n* pollution by disallowing certain keys.\n*\n* @param object The object to check.\n* @param key The key to check.\n*\n* @returns Whether the key is allowed.\n*\n* @internal\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction _isValidObjectKey(object$1, key) {\n\treturn Object.prototype.hasOwnProperty.call(object$1, key) && key !== \"__proto__\" && key !== \"prototype\" && key !== \"constructor\";\n}\n/**\n* Joins multiple `expects` values with the given separator.\n*\n* @param values The `expects` values.\n* @param separator The separator.\n*\n* @returns The joined `expects` property.\n*\n* @internal\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction _joinExpects(values$1, separator) {\n\tconst list = [...new Set(values$1)];\n\tif (list.length > 1) return `(${list.join(` ${separator} `)})`;\n\treturn list[0] ?? \"never\";\n}\n/**\n* Eagerly creates and attaches the Standard Schema properties of a schema.\n*\n* Hint: The contextual `this` type includes the standard properties that are\n* attached before the schema is returned.\n*\n* @param schema The schema to attach standard properties to.\n*\n* @returns The schema with standard properties attached.\n*\n* @internal\n*/\nfunction _standardSchema(schema) {\n\tschema[\"~standard\"] = {\n\t\tversion: 1,\n\t\tvendor: \"valibot\",\n\t\tvalidate: (value$1) => schema[\"~run\"]({ value: value$1 }, /* @__PURE__ */ getGlobalConfig())\n\t};\n\treturn schema;\n}\n/**\n* A Valibot error with useful information.\n*/\nvar ValiError = class extends Error {\n\t/**\n\t* Creates a Valibot error with useful information.\n\t*\n\t* @param issues The error issues.\n\t*/\n\tconstructor(issues) {\n\t\tsuper(issues[0].message);\n\t\tthis.name = \"ValiError\";\n\t\tthis.issues = issues;\n\t}\n};\n/* @__NO_SIDE_EFFECTS__ */\nfunction args(schema) {\n\treturn {\n\t\tkind: \"transformation\",\n\t\ttype: \"args\",\n\t\treference: args,\n\t\tasync: false,\n\t\tschema,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst func = dataset.value;\n\t\t\tdataset.value = (...args_) => {\n\t\t\t\tconst argsDataset = this.schema[\"~run\"]({ value: args_ }, config$1);\n\t\t\t\tif (argsDataset.issues) throw new ValiError(argsDataset.issues);\n\t\t\t\treturn func(...argsDataset.value);\n\t\t\t};\n\t\t\treturn dataset;\n\t\t}\n\t};\n}\n/**\n* Creates an await transformation action.\n*\n* @returns An await action.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction awaitAsync() {\n\treturn {\n\t\tkind: \"transformation\",\n\t\ttype: \"await\",\n\t\treference: awaitAsync,\n\t\tasync: true,\n\t\tasync \"~run\"(dataset) {\n\t\t\tdataset.value = await dataset.value;\n\t\t\treturn dataset;\n\t\t}\n\t};\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction check(requirement, message$1) {\n\treturn {\n\t\tkind: \"validation\",\n\t\ttype: \"check\",\n\t\treference: check,\n\t\tasync: false,\n\t\texpects: null,\n\t\trequirement,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, \"input\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t};\n}\n/**\n* Creates a description metadata action.\n*\n* @param description_ The description text.\n*\n* @returns A description action.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction description(description_) {\n\treturn {\n\t\tkind: \"metadata\",\n\t\ttype: \"description\",\n\t\treference: description,\n\t\tdescription: description_\n\t};\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction returns(schema) {\n\treturn {\n\t\tkind: \"transformation\",\n\t\ttype: \"returns\",\n\t\treference: returns,\n\t\tasync: false,\n\t\tschema,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst func = dataset.value;\n\t\t\tdataset.value = (...args_) => {\n\t\t\t\tconst returnsDataset = this.schema[\"~run\"]({ value: func(...args_) }, config$1);\n\t\t\t\tif (returnsDataset.issues) throw new ValiError(returnsDataset.issues);\n\t\t\t\treturn returnsDataset.value;\n\t\t\t};\n\t\t\treturn dataset;\n\t\t}\n\t};\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction returnsAsync(schema) {\n\treturn {\n\t\tkind: \"transformation\",\n\t\ttype: \"returns\",\n\t\treference: returnsAsync,\n\t\tasync: false,\n\t\tschema,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst func = dataset.value;\n\t\t\tdataset.value = async (...args_) => {\n\t\t\t\tconst returnsDataset = await this.schema[\"~run\"]({ value: await func(...args_) }, config$1);\n\t\t\t\tif (returnsDataset.issues) throw new ValiError(returnsDataset.issues);\n\t\t\t\treturn returnsDataset.value;\n\t\t\t};\n\t\t\treturn dataset;\n\t\t}\n\t};\n}\nconst ABORT_EARLY_CONFIG = { abortEarly: true };\n/**\n* Returns the fallback value of the schema.\n*\n* @param schema The schema to get it from.\n* @param dataset The output dataset if available.\n* @param config The config if available.\n*\n* @returns The fallback value.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction getFallback(schema, dataset, config$1) {\n\treturn typeof schema.fallback === \"function\" ? schema.fallback(dataset, config$1) : schema.fallback;\n}\n/**\n* Returns the default value of the schema.\n*\n* @param schema The schema to get it from.\n* @param dataset The input dataset if available.\n* @param config The config if available.\n*\n* @returns The default value.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction getDefault(schema, dataset, config$1) {\n\treturn typeof schema.default === \"function\" ? schema.default(dataset, config$1) : schema.default;\n}\n/**\n* Checks if the input matches the schema. By using a type predicate, this\n* function can be used as a type guard.\n*\n* @param schema The schema to be used.\n* @param input The input to be tested.\n*\n* @returns Whether the input matches the schema.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction is(schema, input) {\n\treturn !schema[\"~run\"]({ value: input }, ABORT_EARLY_CONFIG).issues;\n}\n/**\n* Creates an any schema.\n*\n* Hint: This schema function exists only for completeness and is not\n* recommended in practice. Instead, `unknown` should be used to accept\n* unknown data.\n*\n* @returns An any schema.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction any() {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"any\",\n\t\treference: any,\n\t\texpects: \"any\",\n\t\tasync: false,\n\t\t\"~run\"(dataset) {\n\t\t\tdataset.typed = true;\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction array(item, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"array\",\n\t\treference: array,\n\t\texpects: \"Array\",\n\t\tasync: false,\n\t\titem,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst input = dataset.value;\n\t\t\tif (Array.isArray(input)) {\n\t\t\t\tdataset.typed = true;\n\t\t\t\tdataset.value = [];\n\t\t\t\tfor (let key = 0; key < input.length; key++) {\n\t\t\t\t\tconst value$1 = input[key];\n\t\t\t\t\tconst itemDataset = this.item[\"~run\"]({ value: value$1 }, config$1);\n\t\t\t\t\tif (itemDataset.issues) {\n\t\t\t\t\t\tconst pathItem = {\n\t\t\t\t\t\t\ttype: \"array\",\n\t\t\t\t\t\t\torigin: \"value\",\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tvalue: value$1\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (const issue of itemDataset.issues) {\n\t\t\t\t\t\t\tif (issue.path) issue.path.unshift(pathItem);\n\t\t\t\t\t\t\telse issue.path = [pathItem];\n\t\t\t\t\t\t\tdataset.issues?.push(issue);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!dataset.issues) dataset.issues = itemDataset.issues;\n\t\t\t\t\t\tif (config$1.abortEarly) {\n\t\t\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!itemDataset.typed) dataset.typed = false;\n\t\t\t\t\tdataset.value.push(itemDataset.value);\n\t\t\t\t}\n\t\t\t} else _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction boolean(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"boolean\",\n\t\treference: boolean,\n\t\texpects: \"boolean\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (typeof dataset.value === \"boolean\") dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction custom(check$1, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"custom\",\n\t\treference: custom,\n\t\texpects: \"unknown\",\n\t\tasync: false,\n\t\tcheck: check$1,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (this.check(dataset.value)) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction function_(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"function\",\n\t\treference: function_,\n\t\texpects: \"Function\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (typeof dataset.value === \"function\") dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction instance(class_, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"instance\",\n\t\treference: instance,\n\t\texpects: class_.name,\n\t\tasync: false,\n\t\tclass: class_,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (dataset.value instanceof this.class) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction literal(literal_, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"literal\",\n\t\treference: literal,\n\t\texpects: /* @__PURE__ */ _stringify(literal_),\n\t\tasync: false,\n\t\tliteral: literal_,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (/* @__PURE__ */ _isSameValueZero(dataset.value, this.literal)) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction never(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"never\",\n\t\treference: never,\n\t\texpects: \"never\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\t_addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction nullish(wrapped, default_) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"nullish\",\n\t\treference: nullish,\n\t\texpects: `(${wrapped.expects} | null | undefined)`,\n\t\tasync: false,\n\t\twrapped,\n\t\tdefault: default_,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (dataset.value === null || dataset.value === void 0) {\n\t\t\t\tif (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);\n\t\t\t\tif (dataset.value === null || dataset.value === void 0) {\n\t\t\t\t\tdataset.typed = true;\n\t\t\t\t\treturn dataset;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.wrapped[\"~run\"](dataset, config$1);\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction number(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"number\",\n\t\treference: number,\n\t\texpects: \"number\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (typeof dataset.value === \"number\" && !isNaN(dataset.value)) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction object(entries$1, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"object\",\n\t\treference: object,\n\t\texpects: \"Object\",\n\t\tasync: false,\n\t\tentries: entries$1,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst input = dataset.value;\n\t\t\tif (input && typeof input === \"object\") {\n\t\t\t\tdataset.typed = true;\n\t\t\t\tdataset.value = {};\n\t\t\t\tfor (const key in this.entries) {\n\t\t\t\t\tconst valueSchema = this.entries[key];\n\t\t\t\t\tif (key in input || (valueSchema.type === \"exact_optional\" || valueSchema.type === \"optional\" || valueSchema.type === \"nullish\") && valueSchema.default !== void 0) {\n\t\t\t\t\t\tconst value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);\n\t\t\t\t\t\tconst valueDataset = valueSchema[\"~run\"]({ value: value$1 }, config$1);\n\t\t\t\t\t\tif (valueDataset.issues) {\n\t\t\t\t\t\t\tconst pathItem = {\n\t\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\t\torigin: \"value\",\n\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tvalue: value$1\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfor (const issue of valueDataset.issues) {\n\t\t\t\t\t\t\t\tif (issue.path) issue.path.unshift(pathItem);\n\t\t\t\t\t\t\t\telse issue.path = [pathItem];\n\t\t\t\t\t\t\t\tdataset.issues?.push(issue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!dataset.issues) dataset.issues = valueDataset.issues;\n\t\t\t\t\t\t\tif (config$1.abortEarly) {\n\t\t\t\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!valueDataset.typed) dataset.typed = false;\n\t\t\t\t\t\tdataset.value[key] = valueDataset.value;\n\t\t\t\t\t} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);\n\t\t\t\t\telse if (valueSchema.type !== \"exact_optional\" && valueSchema.type !== \"optional\" && valueSchema.type !== \"nullish\") {\n\t\t\t\t\t\t_addIssue(this, \"key\", dataset, config$1, {\n\t\t\t\t\t\t\tinput: void 0,\n\t\t\t\t\t\t\texpected: `\"${key}\"`,\n\t\t\t\t\t\t\tpath: [{\n\t\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\t\torigin: \"key\",\n\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tvalue: input[key]\n\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (config$1.abortEarly) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction optional(wrapped, default_) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"optional\",\n\t\treference: optional,\n\t\texpects: `(${wrapped.expects} | undefined)`,\n\t\tasync: false,\n\t\twrapped,\n\t\tdefault: default_,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (dataset.value === void 0) {\n\t\t\t\tif (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault(this, dataset, config$1);\n\t\t\t\tif (dataset.value === void 0) {\n\t\t\t\t\tdataset.typed = true;\n\t\t\t\t\treturn dataset;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn this.wrapped[\"~run\"](dataset, config$1);\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction picklist(options, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"picklist\",\n\t\treference: picklist,\n\t\texpects: /* @__PURE__ */ _joinExpects(options.map(_stringify), \"|\"),\n\t\tasync: false,\n\t\toptions,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (this.options.includes(dataset.value)) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction promise(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"promise\",\n\t\treference: promise,\n\t\texpects: \"Promise\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (dataset.value instanceof Promise) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction record(key, value$1, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"record\",\n\t\treference: record,\n\t\texpects: \"Object\",\n\t\tasync: false,\n\t\tkey,\n\t\tvalue: value$1,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst input = dataset.value;\n\t\t\tif (input && typeof input === \"object\") {\n\t\t\t\tdataset.typed = true;\n\t\t\t\tdataset.value = {};\n\t\t\t\tfor (const entryKey in input) if (/* @__PURE__ */ _isValidObjectKey(input, entryKey)) {\n\t\t\t\t\tconst entryValue = input[entryKey];\n\t\t\t\t\tconst keyDataset = this.key[\"~run\"]({ value: entryKey }, config$1);\n\t\t\t\t\tif (keyDataset.issues) {\n\t\t\t\t\t\tconst pathItem = {\n\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\torigin: \"key\",\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tkey: entryKey,\n\t\t\t\t\t\t\tvalue: entryValue\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (const issue of keyDataset.issues) {\n\t\t\t\t\t\t\tissue.path = [pathItem];\n\t\t\t\t\t\t\tdataset.issues?.push(issue);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!dataset.issues) dataset.issues = keyDataset.issues;\n\t\t\t\t\t\tif (config$1.abortEarly) {\n\t\t\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst valueDataset = this.value[\"~run\"]({ value: entryValue }, config$1);\n\t\t\t\t\tif (valueDataset.issues) {\n\t\t\t\t\t\tconst pathItem = {\n\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\torigin: \"value\",\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tkey: entryKey,\n\t\t\t\t\t\t\tvalue: entryValue\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (const issue of valueDataset.issues) {\n\t\t\t\t\t\t\tif (issue.path) issue.path.unshift(pathItem);\n\t\t\t\t\t\t\telse issue.path = [pathItem];\n\t\t\t\t\t\t\tdataset.issues?.push(issue);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!dataset.issues) dataset.issues = valueDataset.issues;\n\t\t\t\t\t\tif (config$1.abortEarly) {\n\t\t\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;\n\t\t\t\t\tif (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;\n\t\t\t\t}\n\t\t\t} else _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction strictObject(entries$1, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"strict_object\",\n\t\treference: strictObject,\n\t\texpects: \"Object\",\n\t\tasync: false,\n\t\tentries: entries$1,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst input = dataset.value;\n\t\t\tif (input && typeof input === \"object\") {\n\t\t\t\tdataset.typed = true;\n\t\t\t\tdataset.value = {};\n\t\t\t\tfor (const key in this.entries) {\n\t\t\t\t\tconst valueSchema = this.entries[key];\n\t\t\t\t\tif (key in input || (valueSchema.type === \"exact_optional\" || valueSchema.type === \"optional\" || valueSchema.type === \"nullish\") && valueSchema.default !== void 0) {\n\t\t\t\t\t\tconst value$1 = key in input ? input[key] : /* @__PURE__ */ getDefault(valueSchema);\n\t\t\t\t\t\tconst valueDataset = valueSchema[\"~run\"]({ value: value$1 }, config$1);\n\t\t\t\t\t\tif (valueDataset.issues) {\n\t\t\t\t\t\t\tconst pathItem = {\n\t\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\t\torigin: \"value\",\n\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tvalue: value$1\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfor (const issue of valueDataset.issues) {\n\t\t\t\t\t\t\t\tif (issue.path) issue.path.unshift(pathItem);\n\t\t\t\t\t\t\t\telse issue.path = [pathItem];\n\t\t\t\t\t\t\t\tdataset.issues?.push(issue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!dataset.issues) dataset.issues = valueDataset.issues;\n\t\t\t\t\t\t\tif (config$1.abortEarly) {\n\t\t\t\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!valueDataset.typed) dataset.typed = false;\n\t\t\t\t\t\tdataset.value[key] = valueDataset.value;\n\t\t\t\t\t} else if (valueSchema.fallback !== void 0) dataset.value[key] = /* @__PURE__ */ getFallback(valueSchema);\n\t\t\t\t\telse if (valueSchema.type !== \"exact_optional\" && valueSchema.type !== \"optional\" && valueSchema.type !== \"nullish\") {\n\t\t\t\t\t\t_addIssue(this, \"key\", dataset, config$1, {\n\t\t\t\t\t\t\tinput: void 0,\n\t\t\t\t\t\t\texpected: `\"${key}\"`,\n\t\t\t\t\t\t\tpath: [{\n\t\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\t\torigin: \"key\",\n\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tvalue: input[key]\n\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tif (config$1.abortEarly) break;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!dataset.issues || !config$1.abortEarly) {\n\t\t\t\t\tfor (const key in input) if (!Object.prototype.hasOwnProperty.call(this.entries, key)) {\n\t\t\t\t\t\t_addIssue(this, \"key\", dataset, config$1, {\n\t\t\t\t\t\t\tinput: key,\n\t\t\t\t\t\t\texpected: \"never\",\n\t\t\t\t\t\t\tpath: [{\n\t\t\t\t\t\t\t\ttype: \"object\",\n\t\t\t\t\t\t\t\torigin: \"key\",\n\t\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tvalue: input[key]\n\t\t\t\t\t\t\t}]\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction string(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"string\",\n\t\treference: string,\n\t\texpects: \"string\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (typeof dataset.value === \"string\") dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction tuple(items, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"tuple\",\n\t\treference: tuple,\n\t\texpects: \"Array\",\n\t\tasync: false,\n\t\titems,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tconst input = dataset.value;\n\t\t\tif (Array.isArray(input)) {\n\t\t\t\tdataset.typed = true;\n\t\t\t\tdataset.value = [];\n\t\t\t\tfor (let key = 0; key < this.items.length; key++) {\n\t\t\t\t\tconst value$1 = input[key];\n\t\t\t\t\tconst itemDataset = this.items[key][\"~run\"]({ value: value$1 }, config$1);\n\t\t\t\t\tif (itemDataset.issues) {\n\t\t\t\t\t\tconst pathItem = {\n\t\t\t\t\t\t\ttype: \"array\",\n\t\t\t\t\t\t\torigin: \"value\",\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\tvalue: value$1\n\t\t\t\t\t\t};\n\t\t\t\t\t\tfor (const issue of itemDataset.issues) {\n\t\t\t\t\t\t\tif (issue.path) issue.path.unshift(pathItem);\n\t\t\t\t\t\t\telse issue.path = [pathItem];\n\t\t\t\t\t\t\tdataset.issues?.push(issue);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!dataset.issues) dataset.issues = itemDataset.issues;\n\t\t\t\t\t\tif (config$1.abortEarly) {\n\t\t\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!itemDataset.typed) dataset.typed = false;\n\t\t\t\t\tdataset.value.push(itemDataset.value);\n\t\t\t\t}\n\t\t\t} else _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction undefined_(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"undefined\",\n\t\treference: undefined_,\n\t\texpects: \"undefined\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (dataset.value === void 0) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/**\n* Returns the sub issues of the provided datasets for the union issue.\n*\n* @param datasets The datasets.\n*\n* @returns The sub issues.\n*\n* @internal\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction _subIssues(datasets) {\n\tlet issues;\n\tif (datasets) for (const dataset of datasets) if (issues) for (const issue of dataset.issues) issues.push(issue);\n\telse issues = dataset.issues;\n\treturn issues;\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction union(options, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"union\",\n\t\treference: union,\n\t\texpects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), \"|\"),\n\t\tasync: false,\n\t\toptions,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tlet validDataset;\n\t\t\tlet typedDatasets;\n\t\t\tlet untypedDatasets;\n\t\t\tfor (const schema of this.options) {\n\t\t\t\tconst optionDataset = schema[\"~run\"]({ value: dataset.value }, config$1);\n\t\t\t\tif (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);\n\t\t\t\telse typedDatasets = [optionDataset];\n\t\t\t\telse {\n\t\t\t\t\tvalidDataset = optionDataset;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (untypedDatasets) untypedDatasets.push(optionDataset);\n\t\t\t\telse untypedDatasets = [optionDataset];\n\t\t\t}\n\t\t\tif (validDataset) return validDataset;\n\t\t\tif (typedDatasets) {\n\t\t\t\tif (typedDatasets.length === 1) return typedDatasets[0];\n\t\t\t\t_addIssue(this, \"type\", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });\n\t\t\t\tdataset.typed = true;\n\t\t\t} else if (untypedDatasets?.length === 1) return untypedDatasets[0];\n\t\t\telse _addIssue(this, \"type\", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction unionAsync(options, message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"union\",\n\t\treference: unionAsync,\n\t\texpects: /* @__PURE__ */ _joinExpects(options.map((option) => option.expects), \"|\"),\n\t\tasync: true,\n\t\toptions,\n\t\tmessage: message$1,\n\t\tasync \"~run\"(dataset, config$1) {\n\t\t\tlet validDataset;\n\t\t\tlet typedDatasets;\n\t\t\tlet untypedDatasets;\n\t\t\tfor (const schema of this.options) {\n\t\t\t\tconst optionDataset = await schema[\"~run\"]({ value: dataset.value }, config$1);\n\t\t\t\tif (optionDataset.typed) if (optionDataset.issues) if (typedDatasets) typedDatasets.push(optionDataset);\n\t\t\t\telse typedDatasets = [optionDataset];\n\t\t\t\telse {\n\t\t\t\t\tvalidDataset = optionDataset;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (untypedDatasets) untypedDatasets.push(optionDataset);\n\t\t\t\telse untypedDatasets = [optionDataset];\n\t\t\t}\n\t\t\tif (validDataset) return validDataset;\n\t\t\tif (typedDatasets) {\n\t\t\t\tif (typedDatasets.length === 1) return typedDatasets[0];\n\t\t\t\t_addIssue(this, \"type\", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(typedDatasets) });\n\t\t\t\tdataset.typed = true;\n\t\t\t} else if (untypedDatasets?.length === 1) return untypedDatasets[0];\n\t\t\telse _addIssue(this, \"type\", dataset, config$1, { issues: /* @__PURE__ */ _subIssues(untypedDatasets) });\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction void_(message$1) {\n\treturn _standardSchema({\n\t\tkind: \"schema\",\n\t\ttype: \"void\",\n\t\treference: void_,\n\t\texpects: \"void\",\n\t\tasync: false,\n\t\tmessage: message$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tif (dataset.value === void 0) dataset.typed = true;\n\t\t\telse _addIssue(this, \"type\", dataset, config$1);\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction keyof(schema, message$1) {\n\treturn /* @__PURE__ */ picklist(Object.keys(schema.entries), message$1);\n}\n/**\n* Creates a modified copy of an object schema that does not contain the\n* selected entries.\n*\n* @param schema The schema to omit from.\n* @param keys The selected entries.\n*\n* @returns An object schema.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction omit(schema, keys) {\n\tconst entries$1 = { ...schema.entries };\n\tfor (const key of keys) delete entries$1[key];\n\treturn _standardSchema({\n\t\t...schema,\n\t\tentries: entries$1\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction partial(schema, keys) {\n\tconst entries$1 = {};\n\tfor (const key in schema.entries) entries$1[key] = !keys || keys.includes(key) ? /* @__PURE__ */ optional(schema.entries[key]) : schema.entries[key];\n\treturn _standardSchema({\n\t\t...schema,\n\t\tentries: entries$1\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction pipe(...pipe$1) {\n\treturn _standardSchema({\n\t\t...pipe$1[0],\n\t\tpipe: pipe$1,\n\t\t\"~run\"(dataset, config$1) {\n\t\t\tfor (const item of pipe$1) if (item.kind !== \"metadata\") {\n\t\t\t\tif (dataset.issues && (item.kind === \"schema\" || item.kind === \"transformation\")) {\n\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item[\"~run\"](dataset, config$1);\n\t\t\t}\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction pipeAsync(...pipe$1) {\n\treturn _standardSchema({\n\t\t...pipe$1[0],\n\t\tpipe: pipe$1,\n\t\tasync: true,\n\t\tasync \"~run\"(dataset, config$1) {\n\t\t\tfor (const item of pipe$1) if (item.kind !== \"metadata\") {\n\t\t\t\tif (dataset.issues && (item.kind === \"schema\" || item.kind === \"transformation\")) {\n\t\t\t\t\tdataset.typed = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = await item[\"~run\"](dataset, config$1);\n\t\t\t}\n\t\t\treturn dataset;\n\t\t}\n\t});\n}\n/**\n* Parses an unknown input based on a schema.\n*\n* @param schema The schema to be used.\n* @param input The input to be parsed.\n* @param config The parse configuration.\n*\n* @returns The parse result.\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction safeParse(schema, input, config$1) {\n\tconst dataset = schema[\"~run\"]({ value: input }, /* @__PURE__ */ getGlobalConfig(config$1));\n\treturn {\n\t\ttyped: dataset.typed,\n\t\tsuccess: !dataset.issues,\n\t\toutput: dataset.value,\n\t\tissues: dataset.issues\n\t};\n}\n//#endregion\n//#region src/utils/flatten-valibot-schema.ts\nfunction unwrapSchema(schema) {\n\tif (!schema) return schema;\n\tif (schema.type === \"optional\" && schema.wrapped) return unwrapSchema(schema.wrapped);\n\tif (schema.type === \"nullable\" && schema.wrapped) return unwrapSchema(schema.wrapped);\n\tif (schema.type === \"nullish\" && schema.wrapped) return unwrapSchema(schema.wrapped);\n\treturn schema;\n}\nfunction getValibotSchemaType(schema) {\n\tif (!schema) return \"any\";\n\tif (schema.type) switch (schema.type) {\n\t\tcase \"string\": return \"string\";\n\t\tcase \"number\": return \"number\";\n\t\tcase \"boolean\": return \"boolean\";\n\t\tcase \"array\": return \"array\";\n\t\tcase \"object\":\n\t\tcase \"strict_object\":\n\t\tcase \"loose_object\": return \"object\";\n\t\tcase \"union\": return \"union\";\n\t\tcase \"literal\": return typeof schema.literal;\n\t\tcase \"record\": return \"object\";\n\t\tcase \"optional\": return getValibotSchemaType(schema.wrapped);\n\t\tcase \"nullable\": return getValibotSchemaType(schema.wrapped);\n\t\tcase \"nullish\": return getValibotSchemaType(schema.wrapped);\n\t\tcase \"never\": return \"never\";\n\t\tcase \"any\": return \"any\";\n\t\tcase \"custom\": return \"any\";\n\t\tcase \"function\": return \"never\";\n\t\tcase \"instance\": return \"object\";\n\t\tdefault: return \"any\";\n\t}\n\treturn \"any\";\n}\nfunction getValibotDescription(schema) {\n\tif (!schema) return void 0;\n\tif (schema.pipe && Array.isArray(schema.pipe)) {\n\t\tfor (const action of schema.pipe) if (action.type === \"description\" && action.description) return action.description;\n\t}\n\tif (schema.type === \"optional\" && schema.wrapped) return getValibotDescription(schema.wrapped);\n}\nfunction flattenValibotSchema(schema, result = {}, prefix = \"\") {\n\tif (!schema || typeof schema !== \"object\") return result;\n\tif (schema.type === \"strict_object\" || schema.type === \"object\" || schema.type === \"loose_object\") {\n\t\tif (schema.entries && typeof schema.entries === \"object\") for (const [key, value] of Object.entries(schema.entries)) {\n\t\t\tconst fullKey = prefix ? `${prefix}.${key}` : key;\n\t\t\tconst valueSchema = value;\n\t\t\tconst type = getValibotSchemaType(valueSchema);\n\t\t\tconst description = getValibotDescription(valueSchema);\n\t\t\tif (type === \"object\") {\n\t\t\t\tconst unwrappedSchema = unwrapSchema(valueSchema);\n\t\t\t\tif (unwrappedSchema && unwrappedSchema.entries) flattenValibotSchema(unwrappedSchema, result, fullKey);\n\t\t\t\telse result[fullKey] = {\n\t\t\t\t\ttype,\n\t\t\t\t\tdescription\n\t\t\t\t};\n\t\t\t} else result[fullKey] = {\n\t\t\t\ttype,\n\t\t\t\tdescription\n\t\t\t};\n\t\t}\n\t}\n\treturn result;\n}\n//#endregion\n//#region src/utils/style-text.ts\n/**\n* Cross-platform styleText utility that works in both Node.js and browser environments\n* In Node.js, it uses the native `styleText` from `node:util`\n* In browser, it provides empty styling functions for compatibility\n*/\nfunction styleText$1(...args) {\n\treturn styleText(...args);\n}\n//#endregion\n//#region src/utils/validator.ts\nconst StringOrRegExpSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ instance(RegExp)]);\nfunction vFunction() {\n\treturn /* @__PURE__ */ function_();\n}\nconst LogLevelSchema = /* @__PURE__ */ union([\n\t/* @__PURE__ */ literal(\"debug\"),\n\t/* @__PURE__ */ literal(\"info\"),\n\t/* @__PURE__ */ literal(\"warn\")\n]);\nconst LogLevelOptionSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal(\"silent\")]);\nconst LogLevelWithErrorSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal(\"error\")]);\nconst RollupLogSchema = /* @__PURE__ */ any();\nconst RollupLogWithStringSchema = /* @__PURE__ */ union([RollupLogSchema, /* @__PURE__ */ string()]);\nconst InputOptionSchema = /* @__PURE__ */ union([\n\t/* @__PURE__ */ string(),\n\t/* @__PURE__ */ array(/* @__PURE__ */ string()),\n\t/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())\n]);\nconst ExternalOptionFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([\n\t/* @__PURE__ */ string(),\n\t/* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\t/* @__PURE__ */ boolean()\n])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ boolean())));\nconst ExternalOptionSchema = /* @__PURE__ */ union([\n\tStringOrRegExpSchema,\n\t/* @__PURE__ */ array(StringOrRegExpSchema),\n\tExternalOptionFunctionSchema\n]);\nconst ModuleTypesSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([\n\t/* @__PURE__ */ literal(\"asset\"),\n\t/* @__PURE__ */ literal(\"base64\"),\n\t/* @__PURE__ */ literal(\"binary\"),\n\t/* @__PURE__ */ literal(\"copy\"),\n\t/* @__PURE__ */ literal(\"css\"),\n\t/* @__PURE__ */ literal(\"dataurl\"),\n\t/* @__PURE__ */ literal(\"empty\"),\n\t/* @__PURE__ */ literal(\"js\"),\n\t/* @__PURE__ */ literal(\"json\"),\n\t/* @__PURE__ */ literal(\"jsx\"),\n\t/* @__PURE__ */ literal(\"text\"),\n\t/* @__PURE__ */ literal(\"ts\"),\n\t/* @__PURE__ */ literal(\"tsx\")\n]));\nconst TransformOptionsSchema = /* @__PURE__ */ object({\n\tassumptions: /* @__PURE__ */ optional(/* @__PURE__ */ object({\n\t\tignoreFunctionLength: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tnoDocumentAll: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tobjectRestNoSymbols: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tpureGetters: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tsetPublicClassFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t})),\n\ttypescript: /* @__PURE__ */ optional(/* @__PURE__ */ object({\n\t\tjsxPragma: /* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\t\tjsxPragmaFrag: /* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\t\tonlyRemoveTypeImports: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tallowNamespaces: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tallowDeclareFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tremoveClassFieldsWithoutInitializer: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\toptimizeConstEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\toptimizeEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tdeclaration: /* @__PURE__ */ optional(/* @__PURE__ */ object({\n\t\t\tstripInternal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\t\tsourcemap: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t\t})),\n\t\trewriteImportExtensions: /* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t\t/* @__PURE__ */ literal(\"rewrite\"),\n\t\t\t/* @__PURE__ */ literal(\"remove\"),\n\t\t\t/* @__PURE__ */ boolean()\n\t\t]))\n\t})),\n\thelpers: /* @__PURE__ */ optional(/* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"Runtime\"), /* @__PURE__ */ literal(\"External\")])) })),\n\tdecorator: /* @__PURE__ */ optional(/* @__PURE__ */ object({\n\t\tlegacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\temitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tstrictNullChecks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t})),\n\tjsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ literal(false),\n\t\t/* @__PURE__ */ literal(\"preserve\"),\n\t\t/* @__PURE__ */ literal(\"react\"),\n\t\t/* @__PURE__ */ literal(\"react-jsx\"),\n\t\t/* @__PURE__ */ strictObject({\n\t\t\truntime: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"classic\"), /* @__PURE__ */ literal(\"automatic\")])), /* @__PURE__ */ description(\"Which runtime to use\")),\n\t\t\tdevelopment: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Development specific information\")),\n\t\t\tthrowIfNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Toggles whether to throw an error when a tag name uses an XML namespace\")),\n\t\t\tpure: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Mark JSX elements and top-level React method calls as pure for tree shaking.\")),\n\t\t\timportSource: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Import the factory of element and fragment if mode is classic\")),\n\t\t\tpragma: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Jsx element transformation\")),\n\t\t\tpragmaFrag: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Jsx fragment transformation\")),\n\t\t\trefresh: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ any()])), /* @__PURE__ */ description(\"Enable react fast refresh\"))\n\t\t})\n\t])),\n\ttarget: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description(\"The JavaScript target environment\")),\n\tdefine: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description(\"Define global variables (syntax: key:value,key2:value2)\")),\n\tinject: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ string()])]))), /* @__PURE__ */ description(\"Inject import statements on demand\")),\n\tdropLabels: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description(\"Remove labeled statements with these label names\")),\n\tplugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({\n\t\tstyledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),\n\t\ttaggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t})), /* @__PURE__ */ description(\"Third-party plugins to use\"))\n});\nconst WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({\n\tusePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Use polling-based file watching instead of native OS events\")),\n\tpollInterval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Poll interval in milliseconds (only used when usePolling is true)\")),\n\tcompareContentsForPolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Compare file contents for poll-based watchers (only used when usePolling is true)\")),\n\tuseDebounce: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Use debounced event delivery at the filesystem level\")),\n\tdebounceDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Debounce delay in milliseconds (only used when useDebounce is true)\")),\n\tdebounceTickRate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Tick rate in milliseconds for debouncer (only used when useDebounce is true)\"))\n});\nconst WatcherOptionsSchema = /* @__PURE__ */ strictObject({\n\tchokidar: /* @__PURE__ */ optional(/* @__PURE__ */ never(`The \"watch.chokidar\" option is deprecated, please use \"watch.watcher\" instead of it`)),\n\texclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),\n\tinclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, /* @__PURE__ */ array(StringOrRegExpSchema)])),\n\twatcher: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),\n\tnotify: /* @__PURE__ */ optional(WatcherFileWatcherOptionsSchema),\n\tskipWrite: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Skip the bundle.write() step\")),\n\tbuildDelay: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Throttle watch rebuilds\")),\n\tclearScreen: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to clear the screen when a rebuild is triggered\")),\n\tonInvalidate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(vFunction()), /* @__PURE__ */ description(\"An optional function that will be called immediately every time a module changes that is part of the build.\"))\n});\nconst ChecksOptionsSchema = /* @__PURE__ */ strictObject({\n\tcircularDependency: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when detecting circular dependency\")),\n\teval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when detecting uses of direct `eval`s\")),\n\tmissingGlobalName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when the `output.globals` option is missing when needed\")),\n\tmissingNameOptionForIifeExport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when the `output.name` option is missing when needed\")),\n\tinvalidAnnotation: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a `#__PURE__` / `@__PURE__` annotation has no effect due to its position\")),\n\tmixedExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when the way to export values is ambiguous\")),\n\tunresolvedEntry: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when an entrypoint cannot be resolved\")),\n\tunresolvedImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when an import cannot be resolved\")),\n\tfilenameConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when files generated have the same name with different contents\")),\n\tmoduleLevelDirective: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings for module-level directives other than `use strict`\")),\n\tcommonJsVariableInEsm: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a CommonJS variable is used in an ES module\")),\n\timportIsUndefined: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when an imported variable is not exported\")),\n\temptyImportMeta: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when `import.meta` is not supported with the output format and is replaced with an empty object (`{}`)\")),\n\ttoleratedTransform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when detecting tolerated transform\")),\n\tcannotCallNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a namespace is called as a function\")),\n\tconfigurationFieldConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a config value is overridden by another config value with a higher priority\")),\n\tpreferBuiltinFeature: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a plugin that is covered by a built-in feature is used\")),\n\tcouldNotCleanDirectory: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when Rolldown could not clean the output directory\")),\n\tbundlerTimings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when plugins and option callbacks take significant time during the build process\")),\n\tpluginTimings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Deprecated alias for bundlerTimings. Rolldown uses bundlerTimings if both options have values.\")),\n\tduplicateShebang: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when both the code and postBanner contain shebang\")),\n\tunsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a tsconfig option or combination of options is not supported\")),\n\tineffectiveDynamicImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting\")),\n\tlargeBarrelModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit info logs when a barrel module has a very large number of re-exports (more than 5000)\")),\n\tsourcemapBroken: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a plugin transforms code without generating a sourcemap\")),\n\tnamespaceConflict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when multiple star re-exports provide the same name from different modules\")),\n\tshimmedExport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to emit warnings when a missing export is replaced with an undefined binding\"))\n});\nconst MinifyOptionsSchema = /* @__PURE__ */ strictObject({\n\tcompress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\ttarget: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])),\n\t\tdropConsole: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tdropDebugger: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tkeepNames: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({\n\t\t\tfunction: /* @__PURE__ */ boolean(),\n\t\t\tclass: /* @__PURE__ */ boolean()\n\t\t})),\n\t\tunused: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal(\"keep_assign\")])),\n\t\tjoinVars: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tsequences: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tdropLabels: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\t\tmaxIterations: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\ttreeshake: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({\n\t\t\tannotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\t\tmanualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\t\t\tpropertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal(\"always\")])),\n\t\t\tpropertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\t\tunknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\t\tinvalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t\t}))\n\t})])),\n\tmangle: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\ttoplevel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tkeepNames: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\t\tfunction: /* @__PURE__ */ boolean(),\n\t\t\tclass: /* @__PURE__ */ boolean()\n\t\t})])),\n\t\treserved: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\t\tdebug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t})])),\n\tmangleProps: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({\n\t\tinclude: /* @__PURE__ */ instance(RegExp),\n\t\texclude: /* @__PURE__ */ optional(/* @__PURE__ */ instance(RegExp)),\n\t\treserved: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\t\tquoted: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tdebug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tcache: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ literal(false)])))\n\t})),\n\tcodegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\tremoveWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tasciiOnly: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tlegalComments: /* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t\t/* @__PURE__ */ literal(\"none\"),\n\t\t\t/* @__PURE__ */ literal(\"inline\"),\n\t\t\t/* @__PURE__ */ literal(\"eof\"),\n\t\t\t/* @__PURE__ */ literal(\"external\"),\n\t\t\t/* @__PURE__ */ strictObject({ linked: /* @__PURE__ */ string() })\n\t\t]))\n\t})]))\n});\nconst ResolveOptionsSchema = /* @__PURE__ */ strictObject({\n\talias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([\n\t\t/* @__PURE__ */ literal(false),\n\t\t/* @__PURE__ */ string(),\n\t\t/* @__PURE__ */ array(/* @__PURE__ */ string())\n\t]))),\n\taliasFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),\n\tconditionNames: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\textensionAlias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string()))),\n\texportsFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ array(/* @__PURE__ */ string()))),\n\textensions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\tmainFields: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\tmainFiles: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\tmodules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),\n\tsymlinks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\ttsconfigFilename: /* @__PURE__ */ optional(/* @__PURE__ */ string())\n});\nconst TreeshakingOptionsSchema = /* @__PURE__ */ strictObject({\n\tmoduleSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ any()),\n\tannotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\tmanualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ custom((input) => /* @__PURE__ */ is(/* @__PURE__ */ array(/* @__PURE__ */ string()), input), \"string array\")),\n\tunknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\tinvalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\tcommonjs: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\tpropertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal(\"always\")])),\n\tpropertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal(\"always\")]))\n});\nconst OptimizationOptionsSchema = /* @__PURE__ */ strictObject({\n\tinlineConst: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\tmode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"all\"), /* @__PURE__ */ literal(\"smart\")])),\n\t\tpass: /* @__PURE__ */ optional(/* @__PURE__ */ number())\n\t})])), /* @__PURE__ */ description(\"Enable crossmodule constant inlining\")),\n\tpifeForModuleWrappers: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Use PIFE pattern for module wrappers\"))\n});\nconst LogOrStringHandlerSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));\nconst OnLogSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([\n\tLogLevelSchema,\n\tRollupLogSchema,\n\tLogOrStringHandlerSchema\n])));\nconst OnwarnSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([RollupLogSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ union([RollupLogWithStringSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ returns(RollupLogWithStringSchema))])])))])));\nconst DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\tport: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\thost: /* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\timplement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\tskipCommonRuntimeInjection: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\tlazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\thotUpdate: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n})]);\nconst InputOptionsSchema = /* @__PURE__ */ strictObject({\n\tinput: /* @__PURE__ */ optional(InputOptionSchema),\n\tplugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),\n\texternal: /* @__PURE__ */ optional(ExternalOptionSchema),\n\tmakeAbsoluteExternalsRelative: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal(\"ifRelativeSource\")])),\n\tresolve: /* @__PURE__ */ optional(ResolveOptionsSchema),\n\tcwd: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Current working directory\")),\n\tplatform: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ literal(\"browser\"),\n\t\t/* @__PURE__ */ literal(\"neutral\"),\n\t\t/* @__PURE__ */ literal(\"node\")\n\t])), /* @__PURE__ */ description(`Platform for which the code should be generated (node, ${styleText$1(\"underline\", \"browser\")}, neutral)`)),\n\tshimMissingExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Create shim variables for missing exports\")),\n\ttreeshake: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), TreeshakingOptionsSchema])),\n\toptimization: /* @__PURE__ */ optional(OptimizationOptionsSchema),\n\tlogLevel: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(LogLevelOptionSchema), /* @__PURE__ */ description(`Log level (${styleText$1(\"dim\", \"silent\")}, ${styleText$1([\"underline\", \"gray\"], \"info\")}, debug, ${styleText$1(\"yellow\", \"warn\")})`)),\n\tonLog: /* @__PURE__ */ optional(OnLogSchema),\n\tonwarn: /* @__PURE__ */ optional(OnwarnSchema),\n\tmoduleTypes: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleTypesSchema), /* @__PURE__ */ description(\"Module types for customized extensions\")),\n\texperimental: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({\n\t\tviteMode: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tresolveNewUrlToAsset: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tdevMode: /* @__PURE__ */ optional(DevModeSchema),\n\t\tchunkModulesOrder: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"module-id\"), /* @__PURE__ */ literal(\"exec-order\")])),\n\t\tattachDebugInfo: /* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t\t/* @__PURE__ */ literal(\"none\"),\n\t\t\t/* @__PURE__ */ literal(\"simple\"),\n\t\t\t/* @__PURE__ */ literal(\"full\")\n\t\t])),\n\t\tchunkImportMap: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({\n\t\t\tbaseUrl: /* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\t\t\tfileName: /* @__PURE__ */ optional(/* @__PURE__ */ string())\n\t\t})])),\n\t\tonDemandWrapping: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tincrementalBuild: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tnativeMagicString: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tchunkOptimization: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\t\tmergeCommonChunks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\t\tavoidRedundantChunkLoads: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t\t})])),\n\t\tlazyBarrel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t})),\n\ttransform: /* @__PURE__ */ optional(TransformOptionsSchema),\n\twatch: /* @__PURE__ */ optional(/* @__PURE__ */ union([WatcherOptionsSchema, /* @__PURE__ */ literal(false)])),\n\tchecks: /* @__PURE__ */ optional(ChecksOptionsSchema),\n\tdevtools: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({ sessionId: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ pipe(/* @__PURE__ */ string(), /* @__PURE__ */ check((id) => id !== \"\" && id !== \".\" && id !== \"..\" && !/[/\\\\\\0]/.test(id), \"Expected one path segment: not empty, not \\\".\\\" or \\\"..\\\", and without \\\"/\\\", \\\"\\\\\\\" or NUL\"), /* @__PURE__ */ check((id) => id.toLowerCase().toUpperCase() !== \"UNKNOWN-SESSION\", \"\\\"unknown-session\\\" is reserved for devtools events without a session context\"))), /* @__PURE__ */ description(\"Used to name the build.\")) })), /* @__PURE__ */ description(\"Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.\")),\n\tpreserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ literal(\"strict\"),\n\t\t/* @__PURE__ */ literal(\"allow-extension\"),\n\t\t/* @__PURE__ */ literal(\"exports-only\"),\n\t\t/* @__PURE__ */ literal(false)\n\t]))),\n\tcontext: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"The value of `this` at the top level of each module.\")),\n\ttsconfig: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ string()])), /* @__PURE__ */ description(\"Path to the tsconfig.json file.\"))\n});\nconst InputCliOverrideSchema = /* @__PURE__ */ strictObject({\n\tinput: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description(\"Entry file\")),\n\texternal: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description(\"Comma-separated list of module ids to exclude from the bundle `<module-id>,...`\")),\n\ttreeshake: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"enable treeshaking\")),\n\tmakeAbsoluteExternalsRelative: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Prevent normalization of external imports\")),\n\tpreserveEntrySignatures: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ literal(false)), /* @__PURE__ */ description(\"Avoid facade chunks for entry points\")),\n\tcontext: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"The entity top-level `this` represents.\"))\n});\nconst InputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({\n\t...InputOptionsSchema.entries,\n\t...InputCliOverrideSchema.entries\n}), [\n\t\"plugins\",\n\t\"onwarn\",\n\t\"onLog\",\n\t\"resolve\",\n\t\"experimental\",\n\t\"watch\"\n]);\nconst ModuleFormatSchema = /* @__PURE__ */ union([\n\t/* @__PURE__ */ literal(\"es\"),\n\t/* @__PURE__ */ literal(\"cjs\"),\n\t/* @__PURE__ */ literal(\"esm\"),\n\t/* @__PURE__ */ literal(\"module\"),\n\t/* @__PURE__ */ literal(\"commonjs\"),\n\t/* @__PURE__ */ literal(\"iife\"),\n\t/* @__PURE__ */ literal(\"umd\")\n]);\nconst AddonFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returnsAsync(/* @__PURE__ */ unionAsync([/* @__PURE__ */ string(), /* @__PURE__ */ pipeAsync(/* @__PURE__ */ promise(), /* @__PURE__ */ awaitAsync(), /* @__PURE__ */ string())])));\nconst ChunkFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));\nconst ChunkFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), ChunkFileNamesFunctionSchema]);\nconst AssetFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));\nconst AssetFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), AssetFileNamesFunctionSchema]);\nconst SanitizeFileNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));\nconst SanitizeFileNameSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), SanitizeFileNameFunctionSchema]);\nconst GlobalsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));\nconst PathsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));\nconst ManualChunksFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));\nconst AdvancedChunksNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));\nconst AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ union([\n\t/* @__PURE__ */ boolean(),\n\t/* @__PURE__ */ void_(),\n\t/* @__PURE__ */ undefined_()\n])));\nconst InlineCommonChunksExcludeItemSchema = /* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema]);\nconst AdvancedChunksSchema = /* @__PURE__ */ strictObject({\n\tincludeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\tminSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\tmaxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\tminModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\tmaxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\tminShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\tgroups: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ strictObject({\n\t\tdebugName: /* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\t\tname: /* @__PURE__ */ union([/* @__PURE__ */ string(), AdvancedChunksNameFunctionSchema]),\n\t\ttest: /* @__PURE__ */ optional(/* @__PURE__ */ union([StringOrRegExpSchema, AdvancedChunksTestFunctionSchema])),\n\t\tpriority: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\tminSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\tminShareCount: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\tmaxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\tminModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\tmaxModuleSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\tentriesAware: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tentriesAwareMergeThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\tincludeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\ttags: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))\n\t}))),\n\texperimentalInlineCommonChunks: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({\n\t\tmaxSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),\n\t\texclude: /* @__PURE__ */ optional(/* @__PURE__ */ union([InlineCommonChunksExcludeItemSchema, /* @__PURE__ */ array(InlineCommonChunksExcludeItemSchema)]))\n\t}))\n});\nconst GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({\n\tsymbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to use Symbol.toStringTag for namespace objects\")),\n\tpreset: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"es5\"), /* @__PURE__ */ literal(\"es2015\")])),\n\tprofilerNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Whether to add readable names to internal variables for profiling purposes\"))\n});\nconst OutputOptionsSchema = /* @__PURE__ */ strictObject({\n\tdir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Output directory, defaults to `dist` if `file` is not set\")),\n\tfile: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Single output file\")),\n\tcharset: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"ascii\"), /* @__PURE__ */ literal(\"utf8\")])), /* @__PURE__ */ description(\"Character set to use in generated JavaScript\")),\n\texports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ literal(\"auto\"),\n\t\t/* @__PURE__ */ literal(\"named\"),\n\t\t/* @__PURE__ */ literal(\"default\"),\n\t\t/* @__PURE__ */ literal(\"none\")\n\t])), /* @__PURE__ */ description(`Specify a export mode (${styleText$1(\"underline\", \"auto\")}, named, default, none)`)),\n\thashCharacters: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ literal(\"base64\"),\n\t\t/* @__PURE__ */ literal(\"base36\"),\n\t\t/* @__PURE__ */ literal(\"hex\")\n\t])), /* @__PURE__ */ description(\"Use the specified character set for file hashes\")),\n\tformat: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ModuleFormatSchema), /* @__PURE__ */ description(`Output format of the generated bundle (supports ${styleText$1(\"underline\", \"esm\")}, cjs, and iife)`)),\n\tsourcemap: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ boolean(),\n\t\t/* @__PURE__ */ literal(\"inline\"),\n\t\t/* @__PURE__ */ literal(\"hidden\")\n\t])), /* @__PURE__ */ description(`Generate sourcemap (\\`-s inline\\` for inline, or \\`-s\\` for \\`.map\\` file)`)),\n\tsourcemapBaseUrl: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Base URL used to prefix sourcemap paths\")),\n\tsourcemapFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(ChunkFileNamesSchema), /* @__PURE__ */ description(\"Name pattern for emitted sourcemaps\")),\n\tsourcemapDebugIds: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Inject sourcemap debug IDs\")),\n\tsourcemapExcludeSources: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Exclude source content from sourcemaps\")),\n\tsourcemapIgnoreList: /* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ boolean(),\n\t\t/* @__PURE__ */ custom(() => true),\n\t\tStringOrRegExpSchema\n\t])),\n\tsourcemapPathTransform: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),\n\tbanner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),\n\tfooter: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),\n\tpostBanner: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),\n\tpostFooter: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),\n\tintro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),\n\toutro: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), AddonFunctionSchema])),\n\textend: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Extend global variable defined by name in IIFE / UMD formats\")),\n\tesModule: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal(\"if-default-prop\")])),\n\tassetFileNames: /* @__PURE__ */ optional(AssetFileNamesSchema),\n\tentryFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),\n\tchunkFileNames: /* @__PURE__ */ optional(ChunkFileNamesSchema),\n\tsanitizeFileName: /* @__PURE__ */ optional(SanitizeFileNameSchema),\n\tminify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([\n\t\t/* @__PURE__ */ boolean(),\n\t\t/* @__PURE__ */ literal(\"dce-only\"),\n\t\tMinifyOptionsSchema\n\t])), /* @__PURE__ */ description(\"Minify the bundled file\")),\n\tname: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Name for UMD / IIFE format outputs\")),\n\tglobals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), GlobalsFunctionSchema])), /* @__PURE__ */ description(\"Global variable of UMD / IIFE dependencies (syntax: `key:value`)\")),\n\tpaths: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string()), PathsFunctionSchema])), /* @__PURE__ */ description(\"Maps external module IDs to paths\")),\n\tgeneratedCode: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ partial(GeneratedCodeOptionsSchema)), /* @__PURE__ */ description(\"Generated code options\")),\n\texternalLiveBindings: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"external live bindings\")),\n\tinlineDynamicImports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Inline dynamic imports\")),\n\tdynamicImportInCjs: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Dynamic import in CJS output\")),\n\tmanualChunks: /* @__PURE__ */ optional(ManualChunksFunctionSchema),\n\tcodeSplitting: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), AdvancedChunksSchema])),\n\tadvancedChunks: /* @__PURE__ */ optional(AdvancedChunksSchema),\n\tlegalComments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"none\"), /* @__PURE__ */ literal(\"inline\")])), /* @__PURE__ */ description(\"Control legal comments in the output\")),\n\tcomments: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\tlegal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tannotation: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),\n\t\tjsdoc: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())\n\t})])), /* @__PURE__ */ description(\"Control comments in the output\")),\n\tplugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),\n\tpolyfillRequire: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Disable require polyfill injection\")),\n\thoistTransitiveImports: /* @__PURE__ */ optional(/* @__PURE__ */ literal(false)),\n\tpreserveModules: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Preserve module structure\")),\n\tpreserveModulesRoot: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Put preserved modules under this path at root level\")),\n\tvirtualDirname: /* @__PURE__ */ optional(/* @__PURE__ */ string()),\n\tminifyInternalExports: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Minify internal exports\")),\n\ttopLevelVar: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Rewrite top-level declarations to use `var`.\")),\n\tcleanDir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Clean output directory before emitting output\")),\n\tkeepNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Keep function and class names after bundling\")),\n\tstrictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Preserve source module execution order across generated chunks.\")),\n\tstrict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal(\"auto\")])), /* @__PURE__ */ description(\"Whether to always output `\\\"use strict\\\"` directive in non-ES module outputs.\"))\n});\nconst getAddonDescription = (placement, wrapper) => {\n\treturn `Code to insert the ${styleText$1(\"bold\", placement)} of the bundled file (${styleText$1(\"bold\", wrapper)} the wrapper function)`;\n};\nconst OutputCliOverrideSchema = /* @__PURE__ */ strictObject({\n\tassetFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Name pattern for asset files\")),\n\tentryFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Name pattern for emitted entry chunks\")),\n\tchunkFileNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"Name pattern for emitted secondary chunks\")),\n\tsanitizeFileName: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Sanitize file name\")),\n\tbanner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription(\"top\", \"outside\"))),\n\tfooter: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription(\"bottom\", \"outside\"))),\n\tpostBanner: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification\")),\n\tpostFooter: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(\"A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification\")),\n\tintro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription(\"top\", \"inside\"))),\n\toutro: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description(getAddonDescription(\"bottom\", \"inside\"))),\n\tesModule: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)\")),\n\tglobals: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description(\"Global variable of UMD / IIFE dependencies (syntax: `key:value`)\")),\n\tcodeSplitting: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({\n\t\tminSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Minimum size of the chunk\")),\n\t\tminShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Minimum share count of the chunk\"))\n\t})])), /* @__PURE__ */ description(\"Code splitting options. Enabled by default; use `--no-codeSplitting` to disable, or `--codeSplitting.minSize` / `--codeSplitting.minShareCount` to configure\")),\n\tadvancedChunks: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ strictObject({\n\t\tminSize: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Minimum size of the chunk\")),\n\t\tminShareCount: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description(\"Minimum share count of the chunk\"))\n\t})), /* @__PURE__ */ description(\"Deprecated: use codeSplitting instead\")),\n\tminify: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Minify the bundled file\"))\n});\nconst OutputCliOptionsSchema = /* @__PURE__ */ omit(/* @__PURE__ */ strictObject({\n\t...OutputOptionsSchema.entries,\n\t...OutputCliOverrideSchema.entries\n}), [\n\t\"sourcemapIgnoreList\",\n\t\"sourcemapPathTransform\",\n\t\"plugins\",\n\t\"hoistTransitiveImports\"\n]);\nconst CliOptionsSchema = /* @__PURE__ */ strictObject({\n\tconfig: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ boolean()])), /* @__PURE__ */ description(\"Path to the config file (default: `rolldown.config.js`)\")),\n\thelp: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Show help\")),\n\tenvironment: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description(\"Pass additional settings to the config file via process.ENV.\")),\n\tversion: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Show version number\")),\n\twatch: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description(\"Watch files in bundle and rebuild on changes\")),\n\tconfigLoader: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(\"bundle\"), /* @__PURE__ */ literal(\"native\")])), /* @__PURE__ */ description(\"How to load the config file (bundle, native)\")),\n\t...InputCliOptionsSchema.entries,\n\t...OutputCliOptionsSchema.entries\n});\nfunction validateCliOptions(options) {\n\tlet parsed = /* @__PURE__ */ safeParse(CliOptionsSchema, options);\n\treturn [parsed.output, parsed.issues?.map((issue) => {\n\t\treturn `Invalid value for option ${issue.path?.map((pathItem) => pathItem.key).join(\" \")}: ${issue.message}`;\n\t})];\n}\nconst inputHelperMsgRecord = {\n\toutput: { ignored: true },\n\t\"resolve.tsconfigFilename\": { issueMsg: \"It is deprecated. Please use the top-level `tsconfig` option instead.\" }\n};\nconst outputHelperMsgRecord = {};\nfunction validateOption(key, options) {\n\tif (typeof options !== \"object\") throw new Error(`Invalid ${key} options. Expected an Object but received ${JSON.stringify(options)}.`);\n\tif (globalThis.process?.env?.ROLLUP_TEST) return;\n\tlet parsed = /* @__PURE__ */ safeParse(key === \"input\" ? InputOptionsSchema : OutputOptionsSchema, options);\n\tif (!parsed.success) {\n\t\tconst errors = parsed.issues.map((issue) => {\n\t\t\tlet issueMsg = issue.message;\n\t\t\tconst issuePaths = issue.path.map((path) => path.key);\n\t\t\tif (issue.type === \"union\") {\n\t\t\t\tconst subIssue = issue.issues?.find((i) => !(i.type !== issue.received && i.input === issue.input));\n\t\t\t\tif (subIssue) {\n\t\t\t\t\tif (subIssue.path) issuePaths.push(subIssue.path.map((path) => path.key));\n\t\t\t\t\tissueMsg = subIssue.message;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst stringPath = issuePaths.join(\".\");\n\t\t\tconst helper = key === \"input\" ? inputHelperMsgRecord[stringPath] : outputHelperMsgRecord[stringPath];\n\t\t\tif (helper && helper.ignored) return \"\";\n\t\t\treturn `- For the \"${stringPath}\". ${helper?.issueMsg || issueMsg + \".\"} ${helper?.help ? `\\n  Help: ${helper.help}` : \"\"}`;\n\t\t}).filter(Boolean);\n\t\tif (errors.length) console.warn(`\\x1b[33mWarning: Invalid ${key} options (${errors.length} issue${errors.length === 1 ? \"\" : \"s\"} found)\\n${errors.join(\"\\n\")}\\x1b[0m`);\n\t}\n}\nfunction getInputCliKeys() {\n\treturn (/* @__PURE__ */ keyof(InputCliOptionsSchema)).options;\n}\nfunction getOutputCliKeys() {\n\treturn (/* @__PURE__ */ keyof(OutputCliOptionsSchema)).options;\n}\nfunction getCliSchemaInfo() {\n\treturn flattenValibotSchema(CliOptionsSchema);\n}\n//#endregion\n//#region src/types/chunking-context.ts\nvar ChunkingContextImpl = class {\n\tcontext;\n\tpluginContextData;\n\tmoduleInfoCache = /* @__PURE__ */ new Map();\n\tconstructor(context, pluginContextData) {\n\t\tthis.context = context;\n\t\tthis.pluginContextData = pluginContextData;\n\t}\n\tclearModuleInfoCache() {\n\t\tthis.moduleInfoCache = void 0;\n\t}\n\tgetModuleInfo(moduleId) {\n\t\tconst cached = this.moduleInfoCache?.get(moduleId);\n\t\tif (cached) return cached;\n\t\tconst bindingInfo = this.context.getModuleInfo(moduleId);\n\t\tif (bindingInfo) {\n\t\t\tconst option = this.pluginContextData.getModuleOption(moduleId);\n\t\t\tconst info = transformModuleInfo(bindingInfo, option);\n\t\t\tObject.defineProperty(info, \"moduleSideEffects\", {\n\t\t\t\tget: () => option.moduleSideEffects,\n\t\t\t\tset: (moduleSideEffects) => {\n\t\t\t\t\toption.moduleSideEffects = moduleSideEffects;\n\t\t\t\t\toption.invalidate = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.moduleInfoCache?.set(moduleId, info);\n\t\t\treturn info;\n\t\t}\n\t\treturn null;\n\t}\n};\n//#endregion\n//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/core.mjs\nconst LogLevels = {\n\tsilent: Number.NEGATIVE_INFINITY,\n\tfatal: 0,\n\terror: 0,\n\twarn: 1,\n\tlog: 2,\n\tinfo: 3,\n\tsuccess: 3,\n\tfail: 3,\n\tready: 3,\n\tstart: 3,\n\tbox: 3,\n\tdebug: 4,\n\ttrace: 5,\n\tverbose: Number.POSITIVE_INFINITY\n};\nconst LogTypes = {\n\tsilent: { level: -1 },\n\tfatal: { level: LogLevels.fatal },\n\terror: { level: LogLevels.error },\n\twarn: { level: LogLevels.warn },\n\tlog: { level: LogLevels.log },\n\tinfo: { level: LogLevels.info },\n\tsuccess: { level: LogLevels.success },\n\tfail: { level: LogLevels.fail },\n\tready: { level: LogLevels.info },\n\tstart: { level: LogLevels.info },\n\tbox: { level: LogLevels.info },\n\tdebug: { level: LogLevels.debug },\n\ttrace: { level: LogLevels.trace },\n\tverbose: { level: LogLevels.verbose }\n};\nfunction isPlainObject$1(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst prototype = Object.getPrototypeOf(value);\n\tif (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;\n\tif (Symbol.iterator in value) return false;\n\tif (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === \"[object Module]\";\n\treturn true;\n}\nfunction _defu(baseObject, defaults, namespace = \".\", merger) {\n\tif (!isPlainObject$1(defaults)) return _defu(baseObject, {}, namespace, merger);\n\tconst object = Object.assign({}, defaults);\n\tfor (const key in baseObject) {\n\t\tif (key === \"__proto__\" || key === \"constructor\") continue;\n\t\tconst value = baseObject[key];\n\t\tif (value === null || value === void 0) continue;\n\t\tif (merger && merger(object, key, value, namespace)) continue;\n\t\tif (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];\n\t\telse if (isPlainObject$1(value) && isPlainObject$1(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : \"\") + key.toString(), merger);\n\t\telse object[key] = value;\n\t}\n\treturn object;\n}\nfunction createDefu(merger) {\n\treturn (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, \"\", merger), {});\n}\nconst defu = createDefu();\nfunction isPlainObject(obj) {\n\treturn Object.prototype.toString.call(obj) === \"[object Object]\";\n}\nfunction isLogObj(arg) {\n\tif (!isPlainObject(arg)) return false;\n\tif (!arg.message && !arg.args) return false;\n\tif (arg.stack) return false;\n\treturn true;\n}\nlet paused = false;\nconst queue = [];\nvar Consola = class Consola {\n\toptions;\n\t_lastLog;\n\t_mockFn;\n\t/**\n\t* Creates an instance of Consola with specified options or defaults.\n\t*\n\t* @param {Partial<ConsolaOptions>} [options={}] - Configuration options for the Consola instance.\n\t*/\n\tconstructor(options = {}) {\n\t\tconst types = options.types || LogTypes;\n\t\tthis.options = defu({\n\t\t\t...options,\n\t\t\tdefaults: { ...options.defaults },\n\t\t\tlevel: _normalizeLogLevel(options.level, types),\n\t\t\treporters: [...options.reporters || []]\n\t\t}, {\n\t\t\ttypes: LogTypes,\n\t\t\tthrottle: 1e3,\n\t\t\tthrottleMin: 5,\n\t\t\tformatOptions: {\n\t\t\t\tdate: true,\n\t\t\t\tcolors: false,\n\t\t\t\tcompact: true\n\t\t\t}\n\t\t});\n\t\tfor (const type in types) {\n\t\t\tconst defaults = {\n\t\t\t\ttype,\n\t\t\t\t...this.options.defaults,\n\t\t\t\t...types[type]\n\t\t\t};\n\t\t\tthis[type] = this._wrapLogFn(defaults);\n\t\t\tthis[type].raw = this._wrapLogFn(defaults, true);\n\t\t}\n\t\tif (this.options.mockFn) this.mockTypes();\n\t\tthis._lastLog = {};\n\t}\n\t/**\n\t* Gets the current log level of the Consola instance.\n\t*\n\t* @returns {number} The current log level.\n\t*/\n\tget level() {\n\t\treturn this.options.level;\n\t}\n\t/**\n\t* Sets the minimum log level that will be output by the instance.\n\t*\n\t* @param {number} level - The new log level to set.\n\t*/\n\tset level(level) {\n\t\tthis.options.level = _normalizeLogLevel(level, this.options.types, this.options.level);\n\t}\n\t/**\n\t* Displays a prompt to the user and returns the response.\n\t* Throw an error if `prompt` is not supported by the current configuration.\n\t*\n\t* @template T\n\t* @param {string} message - The message to display in the prompt.\n\t* @param {T} [opts] - Optional options for the prompt. See {@link PromptOptions}.\n\t* @returns {promise<T>} A promise that infer with the prompt options. See {@link PromptOptions}.\n\t*/\n\tprompt(message, opts) {\n\t\tif (!this.options.prompt) throw new Error(\"prompt is not supported!\");\n\t\treturn this.options.prompt(message, opts);\n\t}\n\t/**\n\t* Creates a new instance of Consola, inheriting options from the current instance, with possible overrides.\n\t*\n\t* @param {Partial<ConsolaOptions>} options - Optional overrides for the new instance. See {@link ConsolaOptions}.\n\t* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.\n\t*/\n\tcreate(options) {\n\t\tconst instance = new Consola({\n\t\t\t...this.options,\n\t\t\t...options\n\t\t});\n\t\tif (this._mockFn) instance.mockTypes(this._mockFn);\n\t\treturn instance;\n\t}\n\t/**\n\t* Creates a new Consola instance with the specified default log object properties.\n\t*\n\t* @param {InputLogObject} defaults - Default properties to include in any log from the new instance. See {@link InputLogObject}.\n\t* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.\n\t*/\n\twithDefaults(defaults) {\n\t\treturn this.create({\n\t\t\t...this.options,\n\t\t\tdefaults: {\n\t\t\t\t...this.options.defaults,\n\t\t\t\t...defaults\n\t\t\t}\n\t\t});\n\t}\n\t/**\n\t* Creates a new Consola instance with a specified tag, which will be included in every log.\n\t*\n\t* @param {string} tag - The tag to include in each log of the new instance.\n\t* @returns {ConsolaInstance} A new Consola instance. See {@link ConsolaInstance}.\n\t*/\n\twithTag(tag) {\n\t\treturn this.withDefaults({ tag: this.options.defaults.tag ? this.options.defaults.tag + \":\" + tag : tag });\n\t}\n\t/**\n\t* Adds a custom reporter to the Consola instance.\n\t* Reporters will be called for each log message, depending on their implementation and log level.\n\t*\n\t* @param {ConsolaReporter} reporter - The reporter to add. See {@link ConsolaReporter}.\n\t* @returns {Consola} The current Consola instance.\n\t*/\n\taddReporter(reporter) {\n\t\tthis.options.reporters.push(reporter);\n\t\treturn this;\n\t}\n\t/**\n\t* Removes a custom reporter from the Consola instance.\n\t* If no reporter is specified, all reporters will be removed.\n\t*\n\t* @param {ConsolaReporter} reporter - The reporter to remove. See {@link ConsolaReporter}.\n\t* @returns {Consola} The current Consola instance.\n\t*/\n\tremoveReporter(reporter) {\n\t\tif (reporter) {\n\t\t\tconst i = this.options.reporters.indexOf(reporter);\n\t\t\tif (i !== -1) return this.options.reporters.splice(i, 1);\n\t\t} else this.options.reporters.splice(0);\n\t\treturn this;\n\t}\n\t/**\n\t* Replaces all reporters of the Consola instance with the specified array of reporters.\n\t*\n\t* @param {ConsolaReporter[]} reporters - The new reporters to set. See {@link ConsolaReporter}.\n\t* @returns {Consola} The current Consola instance.\n\t*/\n\tsetReporters(reporters) {\n\t\tthis.options.reporters = Array.isArray(reporters) ? reporters : [reporters];\n\t\treturn this;\n\t}\n\twrapAll() {\n\t\tthis.wrapConsole();\n\t\tthis.wrapStd();\n\t}\n\trestoreAll() {\n\t\tthis.restoreConsole();\n\t\tthis.restoreStd();\n\t}\n\t/**\n\t* Overrides console methods with Consola logging methods for consistent logging.\n\t*/\n\twrapConsole() {\n\t\tfor (const type in this.options.types) {\n\t\t\tif (!console[\"__\" + type]) console[\"__\" + type] = console[type];\n\t\t\tconsole[type] = this[type].raw;\n\t\t}\n\t}\n\t/**\n\t* Restores the original console methods, removing Consola overrides.\n\t*/\n\trestoreConsole() {\n\t\tfor (const type in this.options.types) if (console[\"__\" + type]) {\n\t\t\tconsole[type] = console[\"__\" + type];\n\t\t\tdelete console[\"__\" + type];\n\t\t}\n\t}\n\t/**\n\t* Overrides standard output and error streams to redirect them through Consola.\n\t*/\n\twrapStd() {\n\t\tthis._wrapStream(this.options.stdout, \"log\");\n\t\tthis._wrapStream(this.options.stderr, \"log\");\n\t}\n\t_wrapStream(stream, type) {\n\t\tif (!stream) return;\n\t\tif (!stream.__write) stream.__write = stream.write;\n\t\tstream.write = (data) => {\n\t\t\tthis[type].raw(String(data).trim());\n\t\t};\n\t}\n\t/**\n\t* Restores the original standard output and error streams, removing the Consola redirection.\n\t*/\n\trestoreStd() {\n\t\tthis._restoreStream(this.options.stdout);\n\t\tthis._restoreStream(this.options.stderr);\n\t}\n\t_restoreStream(stream) {\n\t\tif (!stream) return;\n\t\tif (stream.__write) {\n\t\t\tstream.write = stream.__write;\n\t\t\tdelete stream.__write;\n\t\t}\n\t}\n\t/**\n\t* Pauses logging, queues incoming logs until resumed.\n\t*/\n\tpauseLogs() {\n\t\tpaused = true;\n\t}\n\t/**\n\t* Resumes logging, processing any queued logs.\n\t*/\n\tresumeLogs() {\n\t\tpaused = false;\n\t\tconst _queue = queue.splice(0);\n\t\tfor (const item of _queue) item[0]._logFn(item[1], item[2]);\n\t}\n\t/**\n\t* Replaces logging methods with mocks if a mock function is provided.\n\t*\n\t* @param {ConsolaOptions[\"mockFn\"]} mockFn - The function to use for mocking logging methods. See {@link ConsolaOptions[\"mockFn\"]}.\n\t*/\n\tmockTypes(mockFn) {\n\t\tconst _mockFn = mockFn || this.options.mockFn;\n\t\tthis._mockFn = _mockFn;\n\t\tif (typeof _mockFn !== \"function\") return;\n\t\tfor (const type in this.options.types) {\n\t\t\tthis[type] = _mockFn(type, this.options.types[type]) || this[type];\n\t\t\tthis[type].raw = this[type];\n\t\t}\n\t}\n\t_wrapLogFn(defaults, isRaw) {\n\t\treturn (...args) => {\n\t\t\tif (paused) {\n\t\t\t\tqueue.push([\n\t\t\t\t\tthis,\n\t\t\t\t\tdefaults,\n\t\t\t\t\targs,\n\t\t\t\t\tisRaw\n\t\t\t\t]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn this._logFn(defaults, args, isRaw);\n\t\t};\n\t}\n\t_logFn(defaults, args, isRaw) {\n\t\tif ((defaults.level || 0) > this.level) return false;\n\t\tconst logObj = {\n\t\t\tdate: /* @__PURE__ */ new Date(),\n\t\t\targs: [],\n\t\t\t...defaults,\n\t\t\tlevel: _normalizeLogLevel(defaults.level, this.options.types)\n\t\t};\n\t\tif (!isRaw && args.length === 1 && isLogObj(args[0])) Object.assign(logObj, args[0]);\n\t\telse logObj.args = [...args];\n\t\tif (logObj.message) {\n\t\t\tlogObj.args.unshift(logObj.message);\n\t\t\tdelete logObj.message;\n\t\t}\n\t\tif (logObj.additional) {\n\t\t\tif (!Array.isArray(logObj.additional)) logObj.additional = logObj.additional.split(\"\\n\");\n\t\t\tlogObj.args.push(\"\\n\" + logObj.additional.join(\"\\n\"));\n\t\t\tdelete logObj.additional;\n\t\t}\n\t\tlogObj.type = typeof logObj.type === \"string\" ? logObj.type.toLowerCase() : \"log\";\n\t\tlogObj.tag = typeof logObj.tag === \"string\" ? logObj.tag : \"\";\n\t\tconst resolveLog = (newLog = false) => {\n\t\t\tconst repeated = (this._lastLog.count || 0) - this.options.throttleMin;\n\t\t\tif (this._lastLog.object && repeated > 0) {\n\t\t\t\tconst args2 = [...this._lastLog.object.args];\n\t\t\t\tif (repeated > 1) args2.push(`(repeated ${repeated} times)`);\n\t\t\t\tthis._log({\n\t\t\t\t\t...this._lastLog.object,\n\t\t\t\t\targs: args2\n\t\t\t\t});\n\t\t\t\tthis._lastLog.count = 1;\n\t\t\t}\n\t\t\tif (newLog) {\n\t\t\t\tthis._lastLog.object = logObj;\n\t\t\t\tthis._log(logObj);\n\t\t\t}\n\t\t};\n\t\tclearTimeout(this._lastLog.timeout);\n\t\tconst diffTime = this._lastLog.time && logObj.date ? logObj.date.getTime() - this._lastLog.time.getTime() : 0;\n\t\tthis._lastLog.time = logObj.date;\n\t\tif (diffTime < this.options.throttle) try {\n\t\t\tconst serializedLog = JSON.stringify([\n\t\t\t\tlogObj.type,\n\t\t\t\tlogObj.tag,\n\t\t\t\tlogObj.args\n\t\t\t]);\n\t\t\tconst isSameLog = this._lastLog.serialized === serializedLog;\n\t\t\tthis._lastLog.serialized = serializedLog;\n\t\t\tif (isSameLog) {\n\t\t\t\tthis._lastLog.count = (this._lastLog.count || 0) + 1;\n\t\t\t\tif (this._lastLog.count > this.options.throttleMin) {\n\t\t\t\t\tthis._lastLog.timeout = setTimeout(resolveLog, this.options.throttle);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {}\n\t\tresolveLog(true);\n\t}\n\t_log(logObj) {\n\t\tfor (const reporter of this.options.reporters) reporter.log(logObj, { options: this.options });\n\t}\n};\nfunction _normalizeLogLevel(input, types = {}, defaultLevel = 3) {\n\tif (input === void 0) return defaultLevel;\n\tif (typeof input === \"number\") return input;\n\tif (types[input] && types[input].level !== void 0) return types[input].level;\n\treturn defaultLevel;\n}\nConsola.prototype.add = Consola.prototype.addReporter;\nConsola.prototype.remove = Consola.prototype.removeReporter;\nConsola.prototype.clear = Consola.prototype.removeReporter;\nConsola.prototype.withScope = Consola.prototype.withTag;\nConsola.prototype.mock = Consola.prototype.mockTypes;\nConsola.prototype.pause = Consola.prototype.pauseLogs;\nConsola.prototype.resume = Consola.prototype.resumeLogs;\nfunction createConsola$1(options = {}) {\n\treturn new Consola(options);\n}\n//#endregion\n//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs\nfunction parseStack(stack, message) {\n\tconst cwd = process.cwd() + sep;\n\treturn stack.split(\"\\n\").splice(message.split(\"\\n\").length).map((l) => l.trim().replace(\"file://\", \"\").replace(cwd, \"\"));\n}\nfunction writeStream(data, stream) {\n\treturn (stream.__write || stream.write).call(stream, data);\n}\nconst bracket = (x) => x ? `[${x}]` : \"\";\nvar BasicReporter = class {\n\tformatStack(stack, message, opts) {\n\t\tconst indent = \"  \".repeat((opts?.errorLevel || 0) + 1);\n\t\treturn indent + parseStack(stack, message).join(`\n${indent}`);\n\t}\n\tformatError(err, opts) {\n\t\tconst message = err.message ?? formatWithOptions(opts, err);\n\t\tconst stack = err.stack ? this.formatStack(err.stack, message, opts) : \"\";\n\t\tconst level = opts?.errorLevel || 0;\n\t\tconst causedPrefix = level > 0 ? `${\"  \".repeat(level)}[cause]: ` : \"\";\n\t\tconst causedError = err.cause ? \"\\n\\n\" + this.formatError(err.cause, {\n\t\t\t...opts,\n\t\t\terrorLevel: level + 1\n\t\t}) : \"\";\n\t\treturn causedPrefix + message + \"\\n\" + stack + causedError;\n\t}\n\tformatArgs(args, opts) {\n\t\tconst _args = args.map((arg) => {\n\t\t\tif (arg && typeof arg.stack === \"string\") return this.formatError(arg, opts);\n\t\t\treturn arg;\n\t\t});\n\t\treturn formatWithOptions(opts, ..._args);\n\t}\n\tformatDate(date, opts) {\n\t\treturn opts.date ? date.toLocaleTimeString() : \"\";\n\t}\n\tfilterAndJoin(arr) {\n\t\treturn arr.filter(Boolean).join(\" \");\n\t}\n\tformatLogObj(logObj, opts) {\n\t\tconst message = this.formatArgs(logObj.args, opts);\n\t\tif (logObj.type === \"box\") return \"\\n\" + [\n\t\t\tbracket(logObj.tag),\n\t\t\tlogObj.title && logObj.title,\n\t\t\t...message.split(\"\\n\")\n\t\t].filter(Boolean).map((l) => \" > \" + l).join(\"\\n\") + \"\\n\";\n\t\treturn this.filterAndJoin([\n\t\t\tbracket(logObj.type),\n\t\t\tbracket(logObj.tag),\n\t\t\tmessage\n\t\t]);\n\t}\n\tlog(logObj, ctx) {\n\t\treturn writeStream(this.formatLogObj(logObj, {\n\t\t\tcolumns: ctx.options.stdout.columns || 0,\n\t\t\t...ctx.options.formatOptions\n\t\t}) + \"\\n\", logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout);\n\t}\n};\n//#endregion\n//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs\nconst { env = {}, argv = [], platform = \"\" } = typeof process === \"undefined\" ? {} : process;\nconst isDisabled = \"NO_COLOR\" in env || argv.includes(\"--no-color\");\nconst isForced = \"FORCE_COLOR\" in env || argv.includes(\"--color\");\nconst isWindows = platform === \"win32\";\nconst isDumbTerminal = env.TERM === \"dumb\";\nconst isCompatibleTerminal = tty && tty.isatty && tty.isatty(1) && env.TERM && !isDumbTerminal;\nconst isCI = \"CI\" in env && (\"GITHUB_ACTIONS\" in env || \"GITLAB_CI\" in env || \"CIRCLECI\" in env);\nconst isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);\nfunction replaceClose(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {\n\treturn head + (next < 0 ? tail : replaceClose(next, tail, close, replace));\n}\nfunction clearBleed(index, string, open, close, replace) {\n\treturn index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close;\n}\nfunction filterEmpty(open, close, replace = open, at = open.length + 1) {\n\treturn (string) => string || !(string === \"\" || string === void 0) ? clearBleed((\"\" + string).indexOf(close, at), string, open, close, replace) : \"\";\n}\nfunction init(open, close, replace) {\n\treturn filterEmpty(`\\x1B[${open}m`, `\\x1B[${close}m`, replace);\n}\nconst colorDefs = {\n\treset: init(0, 0),\n\tbold: init(1, 22, \"\\x1B[22m\\x1B[1m\"),\n\tdim: init(2, 22, \"\\x1B[22m\\x1B[2m\"),\n\titalic: init(3, 23),\n\tunderline: init(4, 24),\n\tinverse: init(7, 27),\n\thidden: init(8, 28),\n\tstrikethrough: init(9, 29),\n\tblack: init(30, 39),\n\tred: init(31, 39),\n\tgreen: init(32, 39),\n\tyellow: init(33, 39),\n\tblue: init(34, 39),\n\tmagenta: init(35, 39),\n\tcyan: init(36, 39),\n\twhite: init(37, 39),\n\tgray: init(90, 39),\n\tbgBlack: init(40, 49),\n\tbgRed: init(41, 49),\n\tbgGreen: init(42, 49),\n\tbgYellow: init(43, 49),\n\tbgBlue: init(44, 49),\n\tbgMagenta: init(45, 49),\n\tbgCyan: init(46, 49),\n\tbgWhite: init(47, 49),\n\tblackBright: init(90, 39),\n\tredBright: init(91, 39),\n\tgreenBright: init(92, 39),\n\tyellowBright: init(93, 39),\n\tblueBright: init(94, 39),\n\tmagentaBright: init(95, 39),\n\tcyanBright: init(96, 39),\n\twhiteBright: init(97, 39),\n\tbgBlackBright: init(100, 49),\n\tbgRedBright: init(101, 49),\n\tbgGreenBright: init(102, 49),\n\tbgYellowBright: init(103, 49),\n\tbgBlueBright: init(104, 49),\n\tbgMagentaBright: init(105, 49),\n\tbgCyanBright: init(106, 49),\n\tbgWhiteBright: init(107, 49)\n};\nfunction createColors(useColor = isColorSupported) {\n\treturn useColor ? colorDefs : Object.fromEntries(Object.keys(colorDefs).map((key) => [key, String]));\n}\nconst colors = createColors();\nfunction getColor$1(color, fallback = \"reset\") {\n\treturn colors[color] || colors[fallback];\n}\nconst ansiRegex$1 = [String.raw`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)`, String.raw`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(\"|\");\nfunction stripAnsi$1(text) {\n\treturn text.replace(new RegExp(ansiRegex$1, \"g\"), \"\");\n}\nconst boxStylePresets = {\n\tsolid: {\n\t\ttl: \"┌\",\n\t\ttr: \"┐\",\n\t\tbl: \"└\",\n\t\tbr: \"┘\",\n\t\th: \"─\",\n\t\tv: \"│\"\n\t},\n\tdouble: {\n\t\ttl: \"╔\",\n\t\ttr: \"╗\",\n\t\tbl: \"╚\",\n\t\tbr: \"╝\",\n\t\th: \"═\",\n\t\tv: \"║\"\n\t},\n\tdoubleSingle: {\n\t\ttl: \"╓\",\n\t\ttr: \"╖\",\n\t\tbl: \"╙\",\n\t\tbr: \"╜\",\n\t\th: \"─\",\n\t\tv: \"║\"\n\t},\n\tdoubleSingleRounded: {\n\t\ttl: \"╭\",\n\t\ttr: \"╮\",\n\t\tbl: \"╰\",\n\t\tbr: \"╯\",\n\t\th: \"─\",\n\t\tv: \"║\"\n\t},\n\tsingleThick: {\n\t\ttl: \"┏\",\n\t\ttr: \"┓\",\n\t\tbl: \"┗\",\n\t\tbr: \"┛\",\n\t\th: \"━\",\n\t\tv: \"┃\"\n\t},\n\tsingleDouble: {\n\t\ttl: \"╒\",\n\t\ttr: \"╕\",\n\t\tbl: \"╘\",\n\t\tbr: \"╛\",\n\t\th: \"═\",\n\t\tv: \"│\"\n\t},\n\tsingleDoubleRounded: {\n\t\ttl: \"╭\",\n\t\ttr: \"╮\",\n\t\tbl: \"╰\",\n\t\tbr: \"╯\",\n\t\th: \"═\",\n\t\tv: \"│\"\n\t},\n\trounded: {\n\t\ttl: \"╭\",\n\t\ttr: \"╮\",\n\t\tbl: \"╰\",\n\t\tbr: \"╯\",\n\t\th: \"─\",\n\t\tv: \"│\"\n\t}\n};\nconst defaultStyle = {\n\tborderColor: \"white\",\n\tborderStyle: \"rounded\",\n\tvalign: \"center\",\n\tpadding: 2,\n\tmarginLeft: 1,\n\tmarginTop: 1,\n\tmarginBottom: 1\n};\nfunction box(text, _opts = {}) {\n\tconst opts = {\n\t\t..._opts,\n\t\tstyle: {\n\t\t\t...defaultStyle,\n\t\t\t..._opts.style\n\t\t}\n\t};\n\tconst textLines = text.split(\"\\n\");\n\tconst boxLines = [];\n\tconst _color = getColor$1(opts.style.borderColor);\n\tconst borderStyle = { ...typeof opts.style.borderStyle === \"string\" ? boxStylePresets[opts.style.borderStyle] || boxStylePresets.solid : opts.style.borderStyle };\n\tif (_color) for (const key in borderStyle) borderStyle[key] = _color(borderStyle[key]);\n\tconst paddingOffset = opts.style.padding % 2 === 0 ? opts.style.padding : opts.style.padding + 1;\n\tconst height = textLines.length + paddingOffset;\n\tconst width = Math.max(...textLines.map((line) => stripAnsi$1(line).length), opts.title ? stripAnsi$1(opts.title).length : 0) + paddingOffset;\n\tconst widthOffset = width + paddingOffset;\n\tconst leftSpace = opts.style.marginLeft > 0 ? \" \".repeat(opts.style.marginLeft) : \"\";\n\tif (opts.style.marginTop > 0) boxLines.push(\"\".repeat(opts.style.marginTop));\n\tif (opts.title) {\n\t\tconst title = _color ? _color(opts.title) : opts.title;\n\t\tconst left = borderStyle.h.repeat(Math.floor((width - stripAnsi$1(opts.title).length) / 2));\n\t\tconst right = borderStyle.h.repeat(width - stripAnsi$1(opts.title).length - stripAnsi$1(left).length + paddingOffset);\n\t\tboxLines.push(`${leftSpace}${borderStyle.tl}${left}${title}${right}${borderStyle.tr}`);\n\t} else boxLines.push(`${leftSpace}${borderStyle.tl}${borderStyle.h.repeat(widthOffset)}${borderStyle.tr}`);\n\tconst valignOffset = opts.style.valign === \"center\" ? Math.floor((height - textLines.length) / 2) : opts.style.valign === \"top\" ? height - textLines.length - paddingOffset : height - textLines.length;\n\tfor (let i = 0; i < height; i++) if (i < valignOffset || i >= valignOffset + textLines.length) boxLines.push(`${leftSpace}${borderStyle.v}${\" \".repeat(widthOffset)}${borderStyle.v}`);\n\telse {\n\t\tconst line = textLines[i - valignOffset];\n\t\tconst left = \" \".repeat(paddingOffset);\n\t\tconst right = \" \".repeat(width - stripAnsi$1(line).length);\n\t\tboxLines.push(`${leftSpace}${borderStyle.v}${left}${line}${right}${borderStyle.v}`);\n\t}\n\tboxLines.push(`${leftSpace}${borderStyle.bl}${borderStyle.h.repeat(widthOffset)}${borderStyle.br}`);\n\tif (opts.style.marginBottom > 0) boxLines.push(\"\".repeat(opts.style.marginBottom));\n\treturn boxLines.join(\"\\n\");\n}\n//#endregion\n//#region ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/index.mjs\nconst r = Object.create(null);\nconst i = (e) => globalThis.process?.env || import.meta.env || globalThis.Deno?.env.toObject() || globalThis.__env__ || (e ? r : globalThis);\nconst o = new Proxy(r, {\n\tget(e, s) {\n\t\treturn i()[s] ?? r[s];\n\t},\n\thas(e, s) {\n\t\treturn s in i() || s in r;\n\t},\n\tset(e, s, E) {\n\t\tconst B = i(true);\n\t\treturn B[s] = E, true;\n\t},\n\tdeleteProperty(e, s) {\n\t\tif (!s) return false;\n\t\tconst E = i(true);\n\t\treturn delete E[s], true;\n\t},\n\townKeys() {\n\t\tconst e = i(true);\n\t\treturn Object.keys(e);\n\t}\n});\nconst t = typeof process < \"u\" && process.env && process.env.NODE_ENV || \"\";\nconst f = [\n\t[\"APPVEYOR\"],\n\t[\n\t\t\"AWS_AMPLIFY\",\n\t\t\"AWS_APP_ID\",\n\t\t{ ci: true }\n\t],\n\t[\"AZURE_PIPELINES\", \"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI\"],\n\t[\"AZURE_STATIC\", \"INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN\"],\n\t[\"APPCIRCLE\", \"AC_APPCIRCLE\"],\n\t[\"BAMBOO\", \"bamboo_planKey\"],\n\t[\"BITBUCKET\", \"BITBUCKET_COMMIT\"],\n\t[\"BITRISE\", \"BITRISE_IO\"],\n\t[\"BUDDY\", \"BUDDY_WORKSPACE_ID\"],\n\t[\"BUILDKITE\"],\n\t[\"CIRCLE\", \"CIRCLECI\"],\n\t[\"CIRRUS\", \"CIRRUS_CI\"],\n\t[\n\t\t\"CLOUDFLARE_PAGES\",\n\t\t\"CF_PAGES\",\n\t\t{ ci: true }\n\t],\n\t[\"CODEBUILD\", \"CODEBUILD_BUILD_ARN\"],\n\t[\"CODEFRESH\", \"CF_BUILD_ID\"],\n\t[\"DRONE\"],\n\t[\"DRONE\", \"DRONE_BUILD_EVENT\"],\n\t[\"DSARI\"],\n\t[\"GITHUB_ACTIONS\"],\n\t[\"GITLAB\", \"GITLAB_CI\"],\n\t[\"GITLAB\", \"CI_MERGE_REQUEST_ID\"],\n\t[\"GOCD\", \"GO_PIPELINE_LABEL\"],\n\t[\"LAYERCI\"],\n\t[\"HUDSON\", \"HUDSON_URL\"],\n\t[\"JENKINS\", \"JENKINS_URL\"],\n\t[\"MAGNUM\"],\n\t[\"NETLIFY\"],\n\t[\n\t\t\"NETLIFY\",\n\t\t\"NETLIFY_LOCAL\",\n\t\t{ ci: false }\n\t],\n\t[\"NEVERCODE\"],\n\t[\"RENDER\"],\n\t[\"SAIL\", \"SAILCI\"],\n\t[\"SEMAPHORE\"],\n\t[\"SCREWDRIVER\"],\n\t[\"SHIPPABLE\"],\n\t[\"SOLANO\", \"TDDIUM\"],\n\t[\"STRIDER\"],\n\t[\"TEAMCITY\", \"TEAMCITY_VERSION\"],\n\t[\"TRAVIS\"],\n\t[\"VERCEL\", \"NOW_BUILDER\"],\n\t[\n\t\t\"VERCEL\",\n\t\t\"VERCEL\",\n\t\t{ ci: false }\n\t],\n\t[\n\t\t\"VERCEL\",\n\t\t\"VERCEL_ENV\",\n\t\t{ ci: false }\n\t],\n\t[\"APPCENTER\", \"APPCENTER_BUILD_ID\"],\n\t[\n\t\t\"CODESANDBOX\",\n\t\t\"CODESANDBOX_SSE\",\n\t\t{ ci: false }\n\t],\n\t[\n\t\t\"CODESANDBOX\",\n\t\t\"CODESANDBOX_HOST\",\n\t\t{ ci: false }\n\t],\n\t[\"STACKBLITZ\"],\n\t[\"STORMKIT\"],\n\t[\"CLEAVR\"],\n\t[\"ZEABUR\"],\n\t[\n\t\t\"CODESPHERE\",\n\t\t\"CODESPHERE_APP_ID\",\n\t\t{ ci: true }\n\t],\n\t[\"RAILWAY\", \"RAILWAY_PROJECT_ID\"],\n\t[\"RAILWAY\", \"RAILWAY_SERVICE_ID\"],\n\t[\"DENO-DEPLOY\", \"DENO_DEPLOYMENT_ID\"],\n\t[\n\t\t\"FIREBASE_APP_HOSTING\",\n\t\t\"FIREBASE_APP_HOSTING\",\n\t\t{ ci: true }\n\t]\n];\nfunction b() {\n\tif (globalThis.process?.env) for (const e of f) {\n\t\tconst s = e[1] || e[0];\n\t\tif (globalThis.process?.env[s]) return {\n\t\t\tname: e[0].toLowerCase(),\n\t\t\t...e[2]\n\t\t};\n\t}\n\treturn globalThis.process?.env?.SHELL === \"/bin/jsh\" && globalThis.process?.versions?.webcontainer ? {\n\t\tname: \"stackblitz\",\n\t\tci: false\n\t} : {\n\t\tname: \"\",\n\t\tci: false\n\t};\n}\nconst l = b();\nl.name;\nfunction n(e) {\n\treturn e ? e !== \"false\" : false;\n}\nconst I = globalThis.process?.platform || \"\";\nconst T = n(o.CI) || l.ci !== false;\nconst a = n(globalThis.process?.stdout && globalThis.process?.stdout.isTTY);\nconst g = n(o.DEBUG);\nconst R = t === \"test\" || n(o.TEST);\no.MINIMAL;\nconst A = /^win/i.test(I);\n!n(o.NO_COLOR) && (n(o.FORCE_COLOR) || (a || A) && o.TERM);\nconst C = (globalThis.process?.versions?.node || \"\").replace(/^v/, \"\") || null;\nNumber(C?.split(\".\")[0]);\nconst y = globalThis.process || Object.create(null);\nconst _ = { versions: {} };\nnew Proxy(y, { get(e, s) {\n\tif (s === \"env\") return o;\n\tif (s in e) return e[s];\n\tif (s in _) return _[s];\n} });\nconst c = globalThis.process?.release?.name === \"node\";\nconst O = !!globalThis.Bun || !!globalThis.process?.versions?.bun;\nconst D = !!globalThis.Deno;\nconst L = !!globalThis.fastly;\nconst S = !!globalThis.Netlify;\nconst u = !!globalThis.EdgeRuntime;\nconst N = globalThis.navigator?.userAgent === \"Cloudflare-Workers\";\nconst F = [\n\t[S, \"netlify\"],\n\t[u, \"edge-light\"],\n\t[N, \"workerd\"],\n\t[L, \"fastly\"],\n\t[D, \"deno\"],\n\t[O, \"bun\"],\n\t[c, \"node\"]\n];\nfunction G() {\n\tconst e = F.find((s) => s[0]);\n\tif (e) return { name: e[1] };\n}\nG()?.name;\nfunction ansiRegex({ onlyFirst = false } = {}) {\n\tconst pattern = [`[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?(?:\\\\u0007|\\\\u001B\\\\u005C|\\\\u009C))`, \"(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-nq-uy=><~]))\"].join(\"|\");\n\treturn new RegExp(pattern, onlyFirst ? void 0 : \"g\");\n}\nconst regex = ansiRegex();\nfunction stripAnsi(string) {\n\tif (typeof string !== \"string\") throw new TypeError(`Expected a \\`string\\`, got \\`${typeof string}\\``);\n\treturn string.replace(regex, \"\");\n}\nfunction isAmbiguous(x) {\n\treturn x === 161 || x === 164 || x === 167 || x === 168 || x === 170 || x === 173 || x === 174 || x >= 176 && x <= 180 || x >= 182 && x <= 186 || x >= 188 && x <= 191 || x === 198 || x === 208 || x === 215 || x === 216 || x >= 222 && x <= 225 || x === 230 || x >= 232 && x <= 234 || x === 236 || x === 237 || x === 240 || x === 242 || x === 243 || x >= 247 && x <= 250 || x === 252 || x === 254 || x === 257 || x === 273 || x === 275 || x === 283 || x === 294 || x === 295 || x === 299 || x >= 305 && x <= 307 || x === 312 || x >= 319 && x <= 322 || x === 324 || x >= 328 && x <= 331 || x === 333 || x === 338 || x === 339 || x === 358 || x === 359 || x === 363 || x === 462 || x === 464 || x === 466 || x === 468 || x === 470 || x === 472 || x === 474 || x === 476 || x === 593 || x === 609 || x === 708 || x === 711 || x >= 713 && x <= 715 || x === 717 || x === 720 || x >= 728 && x <= 731 || x === 733 || x === 735 || x >= 768 && x <= 879 || x >= 913 && x <= 929 || x >= 931 && x <= 937 || x >= 945 && x <= 961 || x >= 963 && x <= 969 || x === 1025 || x >= 1040 && x <= 1103 || x === 1105 || x === 8208 || x >= 8211 && x <= 8214 || x === 8216 || x === 8217 || x === 8220 || x === 8221 || x >= 8224 && x <= 8226 || x >= 8228 && x <= 8231 || x === 8240 || x === 8242 || x === 8243 || x === 8245 || x === 8251 || x === 8254 || x === 8308 || x === 8319 || x >= 8321 && x <= 8324 || x === 8364 || x === 8451 || x === 8453 || x === 8457 || x === 8467 || x === 8470 || x === 8481 || x === 8482 || x === 8486 || x === 8491 || x === 8531 || x === 8532 || x >= 8539 && x <= 8542 || x >= 8544 && x <= 8555 || x >= 8560 && x <= 8569 || x === 8585 || x >= 8592 && x <= 8601 || x === 8632 || x === 8633 || x === 8658 || x === 8660 || x === 8679 || x === 8704 || x === 8706 || x === 8707 || x === 8711 || x === 8712 || x === 8715 || x === 8719 || x === 8721 || x === 8725 || x === 8730 || x >= 8733 && x <= 8736 || x === 8739 || x === 8741 || x >= 8743 && x <= 8748 || x === 8750 || x >= 8756 && x <= 8759 || x === 8764 || x === 8765 || x === 8776 || x === 8780 || x === 8786 || x === 8800 || x === 8801 || x >= 8804 && x <= 8807 || x === 8810 || x === 8811 || x === 8814 || x === 8815 || x === 8834 || x === 8835 || x === 8838 || x === 8839 || x === 8853 || x === 8857 || x === 8869 || x === 8895 || x === 8978 || x >= 9312 && x <= 9449 || x >= 9451 && x <= 9547 || x >= 9552 && x <= 9587 || x >= 9600 && x <= 9615 || x >= 9618 && x <= 9621 || x === 9632 || x === 9633 || x >= 9635 && x <= 9641 || x === 9650 || x === 9651 || x === 9654 || x === 9655 || x === 9660 || x === 9661 || x === 9664 || x === 9665 || x >= 9670 && x <= 9672 || x === 9675 || x >= 9678 && x <= 9681 || x >= 9698 && x <= 9701 || x === 9711 || x === 9733 || x === 9734 || x === 9737 || x === 9742 || x === 9743 || x === 9756 || x === 9758 || x === 9792 || x === 9794 || x === 9824 || x === 9825 || x >= 9827 && x <= 9829 || x >= 9831 && x <= 9834 || x === 9836 || x === 9837 || x === 9839 || x === 9886 || x === 9887 || x === 9919 || x >= 9926 && x <= 9933 || x >= 9935 && x <= 9939 || x >= 9941 && x <= 9953 || x === 9955 || x === 9960 || x === 9961 || x >= 9963 && x <= 9969 || x === 9972 || x >= 9974 && x <= 9977 || x === 9979 || x === 9980 || x === 9982 || x === 9983 || x === 10045 || x >= 10102 && x <= 10111 || x >= 11094 && x <= 11097 || x >= 12872 && x <= 12879 || x >= 57344 && x <= 63743 || x >= 65024 && x <= 65039 || x === 65533 || x >= 127232 && x <= 127242 || x >= 127248 && x <= 127277 || x >= 127280 && x <= 127337 || x >= 127344 && x <= 127373 || x === 127375 || x === 127376 || x >= 127387 && x <= 127404 || x >= 917760 && x <= 917999 || x >= 983040 && x <= 1048573 || x >= 1048576 && x <= 1114109;\n}\nfunction isFullWidth(x) {\n\treturn x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;\n}\nfunction isWide(x) {\n\treturn x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;\n}\nfunction validate(codePoint) {\n\tif (!Number.isSafeInteger(codePoint)) throw new TypeError(`Expected a code point, got \\`${typeof codePoint}\\`.`);\n}\nfunction eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {\n\tvalidate(codePoint);\n\tif (isFullWidth(codePoint) || isWide(codePoint) || ambiguousAsWide && isAmbiguous(codePoint)) return 2;\n\treturn 1;\n}\nconst emojiRegex = () => {\n\treturn /[#*0-9]\\uFE0F?\\u20E3|[\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23ED-\\u23EF\\u23F1\\u23F2\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB\\u25FC\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692\\u2694-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A7\\u26AA\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C8\\u26CF\\u26D1\\u26E9\\u26F0-\\u26F5\\u26F7\\u26F8\\u26FA\\u2702\\u2708\\u2709\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u27A1\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B55\\u3030\\u303D\\u3297\\u3299]\\uFE0F?|[\\u261D\\u270C\\u270D](?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?|[\\u270A\\u270B](?:\\uD83C[\\uDFFB-\\uDFFF])?|[\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u2693\\u26A1\\u26AB\\u26C5\\u26CE\\u26D4\\u26EA\\u26FD\\u2705\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2795-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\\uDD25))?|\\uDC3B(?:\\u200D\\u2744\\uFE0F?)?|\\uDC41\\uFE0F?(?:\\u200D\\uD83D\\uDDE8\\uFE0F?)?|\\uDC68(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDC68\\uDC69]\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?)|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?\\uDC68\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDC69(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:\\uDC8B\\u200D\\uD83D)?[\\uDC68\\uDC69]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D(?:[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?|\\uDC69\\u200D\\uD83D(?:\\uDC66(?:\\u200D\\uD83D\\uDC66)?|\\uDC67(?:\\u200D\\uD83D[\\uDC66\\uDC67])?))|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFC-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])))?|\\uDFFE(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])))?|\\uDFFF(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D\\uD83D(?:[\\uDC68\\uDC69]|\\uDC8B\\u200D\\uD83D[\\uDC68\\uDC69])\\uD83C[\\uDFFB-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83D[\\uDC68\\uDC69]\\uD83C[\\uDFFB-\\uDFFE])))?))?|\\uDC6F(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDD75(?:\\uD83C[\\uDFFB-\\uDFFF]|\\uFE0F)?(?:\\u200D[\\u2640\\u2642]\\uFE0F?)?|\\uDE2E(?:\\u200D\\uD83D\\uDCA8)?|\\uDE35(?:\\u200D\\uD83D\\uDCAB)?|\\uDE36(?:\\u200D\\uD83C\\uDF2B\\uFE0F?)?|\\uDE42(?:\\u200D[\\u2194\\u2195]\\uFE0F?)?|\\uDEB6(?:\\uD83C[\\uDFFB-\\uDFFF])?(?:\\u200D(?:[\\u2640\\u2642]\\uFE0F?(?:\\u200D\\u27A1\\uFE0F?)?|\\u27A1\\uFE0F?))?)|\\uD83E(?:[\\uDD0C\\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E\\uDDD2(?:\\u200D\\uD83E\\uDDD2)?|\\uDDD2(?:\\u200D\\uD83E\\uDDD2)?))|\\uD83C(?:\\uDFFB(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFC-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF])))?|\\uDFFC(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFD-\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E(?:[\\uDDAF\\uDDBC\\uDDBD](?:\\u200D\\u27A1\\uFE0F?)?|[\\uDDB0-\\uDDB3]|\\uDD1D\\u200D\\uD83E\\uDDD1\\uD83C[\\uDFFB-\\uDFFF])))?|\\uDFFD(?:\\u200D(?:[\\u2695\\u2696\\u2708]\\uFE0F?|\\u2764\\uFE0F?\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83E\\uDDD1\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF]|\\uD83C[\\uDF3E\\uDF73\\uDF7C\\uDF84\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\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|\\uDFFD(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])?|\\uDFFE(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])?|\\uDFFF(?:\\u200D\\uD83E\\uDEF2\\uD83C[\\uDFFB-\\uDFFE])?))?)/g;\n};\nconst segmenter = globalThis.Intl?.Segmenter ? new Intl.Segmenter() : { segment: (str) => str.split(\"\") };\nconst defaultIgnorableCodePointRegex = /^\\p{Default_Ignorable_Code_Point}$/u;\nfunction stringWidth$1(string, options = {}) {\n\tif (typeof string !== \"string\" || string.length === 0) return 0;\n\tconst { ambiguousIsNarrow = true, countAnsiEscapeCodes = false } = options;\n\tif (!countAnsiEscapeCodes) string = stripAnsi(string);\n\tif (string.length === 0) return 0;\n\tlet width = 0;\n\tconst eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };\n\tfor (const { segment: character } of segmenter.segment(string)) {\n\t\tconst codePoint = character.codePointAt(0);\n\t\tif (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) continue;\n\t\tif (codePoint >= 8203 && codePoint <= 8207 || codePoint === 65279) continue;\n\t\tif (codePoint >= 768 && codePoint <= 879 || codePoint >= 6832 && codePoint <= 6911 || codePoint >= 7616 && codePoint <= 7679 || codePoint >= 8400 && codePoint <= 8447 || codePoint >= 65056 && codePoint <= 65071) continue;\n\t\tif (codePoint >= 55296 && codePoint <= 57343) continue;\n\t\tif (codePoint >= 65024 && codePoint <= 65039) continue;\n\t\tif (defaultIgnorableCodePointRegex.test(character)) continue;\n\t\tif (emojiRegex().test(character)) {\n\t\t\twidth += 2;\n\t\t\tcontinue;\n\t\t}\n\t\twidth += eastAsianWidth(codePoint, eastAsianWidthOptions);\n\t}\n\treturn width;\n}\nfunction isUnicodeSupported() {\n\tconst { env } = g$1;\n\tconst { TERM, TERM_PROGRAM } = env;\n\tif (g$1.platform !== \"win32\") return TERM !== \"linux\";\n\treturn Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === \"{cmd::Cmder}\" || TERM_PROGRAM === \"Terminus-Sublime\" || TERM_PROGRAM === \"vscode\" || TERM === \"xterm-256color\" || TERM === \"alacritty\" || TERM === \"rxvt-unicode\" || TERM === \"rxvt-unicode-256color\" || env.TERMINAL_EMULATOR === \"JetBrains-JediTerm\";\n}\nconst TYPE_COLOR_MAP = {\n\tinfo: \"cyan\",\n\tfail: \"red\",\n\tsuccess: \"green\",\n\tready: \"green\",\n\tstart: \"magenta\"\n};\nconst LEVEL_COLOR_MAP = {\n\t0: \"red\",\n\t1: \"yellow\"\n};\nconst unicode = isUnicodeSupported();\nconst s = (c, fallback) => unicode ? c : fallback;\nconst TYPE_ICONS = {\n\terror: s(\"✖\", \"×\"),\n\tfatal: s(\"✖\", \"×\"),\n\tready: s(\"✔\", \"√\"),\n\twarn: s(\"⚠\", \"‼\"),\n\tinfo: s(\"ℹ\", \"i\"),\n\tsuccess: s(\"✔\", \"√\"),\n\tdebug: s(\"⚙\", \"D\"),\n\ttrace: s(\"→\", \"→\"),\n\tfail: s(\"✖\", \"×\"),\n\tstart: s(\"◐\", \"o\"),\n\tlog: \"\"\n};\nfunction stringWidth(str) {\n\tif (!(typeof Intl === \"object\") || !Intl.Segmenter) return stripAnsi$1(str).length;\n\treturn stringWidth$1(str);\n}\nvar FancyReporter = class extends BasicReporter {\n\tformatStack(stack, message, opts) {\n\t\tconst indent = \"  \".repeat((opts?.errorLevel || 0) + 1);\n\t\treturn `\n${indent}` + parseStack(stack, message).map((line) => \"  \" + line.replace(/^at +/, (m) => colors.gray(m)).replace(/\\((.+)\\)/, (_, m) => `(${colors.cyan(m)})`)).join(`\n${indent}`);\n\t}\n\tformatType(logObj, isBadge, opts) {\n\t\tconst typeColor = TYPE_COLOR_MAP[logObj.type] || LEVEL_COLOR_MAP[logObj.level] || \"gray\";\n\t\tif (isBadge) return getBgColor(typeColor)(colors.black(` ${logObj.type.toUpperCase()} `));\n\t\tconst _type = typeof TYPE_ICONS[logObj.type] === \"string\" ? TYPE_ICONS[logObj.type] : logObj.icon || logObj.type;\n\t\treturn _type ? getColor(typeColor)(_type) : \"\";\n\t}\n\tformatLogObj(logObj, opts) {\n\t\tconst [message, ...additional] = this.formatArgs(logObj.args, opts).split(\"\\n\");\n\t\tif (logObj.type === \"box\") return box(characterFormat(message + (additional.length > 0 ? \"\\n\" + additional.join(\"\\n\") : \"\")), {\n\t\t\ttitle: logObj.title ? characterFormat(logObj.title) : void 0,\n\t\t\tstyle: logObj.style\n\t\t});\n\t\tconst date = this.formatDate(logObj.date, opts);\n\t\tconst coloredDate = date && colors.gray(date);\n\t\tconst isBadge = logObj.badge ?? logObj.level < 2;\n\t\tconst type = this.formatType(logObj, isBadge, opts);\n\t\tconst tag = logObj.tag ? colors.gray(logObj.tag) : \"\";\n\t\tlet line;\n\t\tconst left = this.filterAndJoin([type, characterFormat(message)]);\n\t\tconst right = this.filterAndJoin(opts.columns ? [tag, coloredDate] : [tag]);\n\t\tconst space = (opts.columns || 0) - stringWidth(left) - stringWidth(right) - 2;\n\t\tline = space > 0 && (opts.columns || 0) >= 80 ? left + \" \".repeat(space) + right : (right ? `${colors.gray(`[${right}]`)} ` : \"\") + left;\n\t\tline += characterFormat(additional.length > 0 ? \"\\n\" + additional.join(\"\\n\") : \"\");\n\t\tif (logObj.type === \"trace\") {\n\t\t\tconst _err = /* @__PURE__ */ new Error(\"Trace: \" + logObj.message);\n\t\t\tline += this.formatStack(_err.stack || \"\", _err.message);\n\t\t}\n\t\treturn isBadge ? \"\\n\" + line + \"\\n\" : line;\n\t}\n};\nfunction characterFormat(str) {\n\treturn str.replace(/`([^`]+)`/gm, (_, m) => colors.cyan(m)).replace(/\\s+_([^_]+)_\\s+/gm, (_, m) => ` ${colors.underline(m)} `);\n}\nfunction getColor(color = \"white\") {\n\treturn colors[color] || colors.white;\n}\nfunction getBgColor(color = \"bgWhite\") {\n\treturn colors[`bg${color[0].toUpperCase()}${color.slice(1)}`] || colors.bgWhite;\n}\nfunction createConsola(options = {}) {\n\tlet level = _getDefaultLogLevel();\n\tif (process.env.CONSOLA_LEVEL) level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;\n\treturn createConsola$1({\n\t\tlevel,\n\t\tdefaults: { level },\n\t\tstdout: process.stdout,\n\t\tstderr: process.stderr,\n\t\tprompt: (...args) => import(\"./prompt-CH6TK0bC.mjs\").then((m) => m.prompt(...args)),\n\t\treporters: options.reporters || [options.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],\n\t\t...options\n\t});\n}\nfunction _getDefaultLogLevel() {\n\tif (g) return LogLevels.debug;\n\tif (R) return LogLevels.warn;\n\treturn LogLevels.info;\n}\ncreateConsola();\n//#endregion\n//#region src/cli/logger.ts\n/**\n* Console logger\n*/\nconst logger = process.env.ROLLDOWN_TEST ? createTestingLogger() : createConsola({ formatOptions: { date: false } });\nfunction createTestingLogger() {\n\tconst types = [\n\t\t\"silent\",\n\t\t\"fatal\",\n\t\t\"error\",\n\t\t\"warn\",\n\t\t\"log\",\n\t\t\"info\",\n\t\t\"success\",\n\t\t\"fail\",\n\t\t\"ready\",\n\t\t\"start\",\n\t\t\"box\",\n\t\t\"debug\",\n\t\t\"trace\",\n\t\t\"verbose\"\n\t];\n\tconst ret = Object.create(null);\n\tfor (const type of types) ret[type] = (...args) => console.log(...args);\n\treturn ret;\n}\n//#endregion\n//#region src/utils/bindingify-output-options.ts\nfunction bindingifyOutputOptions(outputOptions, pluginContextData, onLog, timings) {\n\tconst { dir, charset, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapFileNames, sourcemapExcludeSources, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, comments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir, strictExecutionOrder } = outputOptions;\n\tif (legalComments != null) logger.warn(\"`legalComments` option is deprecated, please use `comments.legal` instead.\");\n\tconst { inlineDynamicImports, advancedChunks } = bindingifyCodeSplitting(outputOptions.codeSplitting, outputOptions.inlineDynamicImports, outputOptions.advancedChunks, manualChunks, pluginContextData, onLog, timings);\n\treturn {\n\t\tdir,\n\t\tcharset,\n\t\tfile: file == null ? void 0 : file,\n\t\tformat: bindingifyFormat(format),\n\t\texports,\n\t\thashCharacters,\n\t\tsourcemap: bindingifySourcemap(sourcemap),\n\t\tsourcemapBaseUrl,\n\t\tsourcemapDebugIds,\n\t\tsourcemapFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"sourcemapFileNames\", sourcemapFileNames),\n\t\tsourcemapExcludeSources,\n\t\tsourcemapIgnoreList: batchSourcemapIgnoreList(measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"sourcemapIgnoreList\", sourcemapIgnoreList ?? /node_modules/)),\n\t\tsourcemapPathTransform: batchSourcemapPathTransform(measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"sourcemapPathTransform\", sourcemapPathTransform)),\n\t\tbanner: bindingifyAddon(banner, \"banner\", timings),\n\t\tfooter: bindingifyAddon(footer, \"footer\", timings),\n\t\tpostBanner: bindingifyAddon(postBanner, \"postBanner\", timings),\n\t\tpostFooter: bindingifyAddon(postFooter, \"postFooter\", timings),\n\t\tintro: bindingifyAddon(intro, \"intro\", timings),\n\t\toutro: bindingifyAddon(outro, \"outro\", timings),\n\t\textend: outputOptions.extend,\n\t\tglobals: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"globals\", globals),\n\t\tpaths: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"paths\", paths),\n\t\tgeneratedCode,\n\t\tesModule,\n\t\tname,\n\t\tassetFileNames: bindingifyAssetFilenames(assetFileNames),\n\t\tentryFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"entryFileNames\", entryFileNames),\n\t\tchunkFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"chunkFileNames\", chunkFileNames),\n\t\tplugins: [],\n\t\tminify: outputOptions.minify,\n\t\texternalLiveBindings: outputOptions.externalLiveBindings,\n\t\tinlineDynamicImports,\n\t\tdynamicImportInCjs: outputOptions.dynamicImportInCjs,\n\t\tmanualCodeSplitting: advancedChunks,\n\t\tpolyfillRequire: outputOptions.polyfillRequire,\n\t\tsanitizeFileName,\n\t\tpreserveModules,\n\t\tvirtualDirname,\n\t\tlegalComments,\n\t\tcomments: bindingifyComments(comments),\n\t\tpreserveModulesRoot,\n\t\ttopLevelVar,\n\t\tminifyInternalExports: outputOptions.minifyInternalExports,\n\t\tcleanDir,\n\t\tstrictExecutionOrder,\n\t\tstrict: outputOptions.strict\n\t};\n}\nfunction bindingifyAddon(configAddon, name, timings) {\n\tif (configAddon == null || configAddon === \"\") return;\n\tif (typeof configAddon === \"function\") {\n\t\tconst measured = measureHookCost(timings, OUTPUT_OPTIONS_OWNER, name, configAddon);\n\t\treturn async (chunk) => measured(transformRenderedChunk(chunk));\n\t}\n\treturn configAddon;\n}\nfunction bindingifyFormat(format) {\n\tswitch (format) {\n\t\tcase void 0:\n\t\tcase \"es\":\n\t\tcase \"esm\":\n\t\tcase \"module\": return \"es\";\n\t\tcase \"cjs\":\n\t\tcase \"commonjs\": return \"cjs\";\n\t\tcase \"iife\": return \"iife\";\n\t\tcase \"umd\": return \"umd\";\n\t\tdefault: unimplemented(`output.format: ${format}`);\n\t}\n}\nfunction bindingifySourcemap(sourcemap) {\n\tswitch (sourcemap) {\n\t\tcase true: return \"file\";\n\t\tcase \"inline\": return \"inline\";\n\t\tcase false:\n\t\tcase void 0: return;\n\t\tcase \"hidden\": return \"hidden\";\n\t\tdefault: throw new Error(`unknown sourcemap: ${sourcemap}`);\n\t}\n}\nfunction bindingifyAssetFilenames(assetFileNames) {\n\tif (typeof assetFileNames === \"function\") return (asset) => {\n\t\treturn assetFileNames({\n\t\t\tname: asset.name,\n\t\t\tnames: asset.names,\n\t\t\toriginalFileName: asset.originalFileName,\n\t\t\toriginalFileNames: asset.originalFileNames,\n\t\t\tsource: transformAssetSource(asset.source),\n\t\t\ttype: \"asset\"\n\t\t});\n\t};\n\treturn assetFileNames;\n}\nfunction bindingifyComments(comments) {\n\tif (comments == null) return;\n\tif (typeof comments === \"boolean\") return comments;\n\treturn comments;\n}\nfunction bindingifyCodeSplitting(codeSplitting, inlineDynamicImportsOption, advancedChunks, manualChunks, pluginContextData, onLog, timings) {\n\tlet inlineDynamicImports;\n\tlet effectiveChunksOption;\n\tlet migratedManualChunksGroup;\n\tlet chunksOptionName = \"codeSplitting\";\n\tif (codeSplitting === false) {\n\t\tif (inlineDynamicImportsOption != null) logger.warn(\"`inlineDynamicImports` option is ignored because `codeSplitting: false` is set.\");\n\t\tif (manualChunks != null) throw new Error(\"Invalid configuration: \\\"output.manualChunks\\\" cannot be used when \\\"output.codeSplitting\\\" is set to false.\");\n\t\tif (advancedChunks != null) logger.warn(\"`advancedChunks` option is ignored because `codeSplitting` is set to `false`.\");\n\t\treturn {\n\t\t\tinlineDynamicImports: true,\n\t\t\tadvancedChunks: void 0\n\t\t};\n\t} else if (codeSplitting === true) {\n\t\tif (inlineDynamicImportsOption != null) logger.warn(\"`inlineDynamicImports` option is ignored because `codeSplitting: true` is set.\");\n\t} else if (codeSplitting == null) {\n\t\tif (inlineDynamicImportsOption != null) {\n\t\t\tlogger.warn(\"`inlineDynamicImports` option is deprecated, please use `codeSplitting: false` instead.\");\n\t\t\tinlineDynamicImports = inlineDynamicImportsOption;\n\t\t}\n\t} else {\n\t\teffectiveChunksOption = codeSplitting;\n\t\tchunksOptionName = \"codeSplitting\";\n\t\tif (inlineDynamicImportsOption != null) logger.warn(\"`inlineDynamicImports` option is ignored because the `codeSplitting` option is specified.\");\n\t}\n\tif (inlineDynamicImports === true && manualChunks != null) throw new Error(\"Invalid value \\\"true\\\" for option \\\"output.inlineDynamicImports\\\" - this option is not supported for \\\"output.manualChunks\\\".\");\n\tif (effectiveChunksOption == null) {\n\t\tif (advancedChunks != null) {\n\t\t\tlogger.warn(\"`advancedChunks` option is deprecated, please use `codeSplitting` instead.\");\n\t\t\teffectiveChunksOption = advancedChunks;\n\t\t\tchunksOptionName = \"advancedChunks\";\n\t\t}\n\t} else if (advancedChunks != null) logger.warn(\"`advancedChunks` option is ignored because the `codeSplitting` option is specified.\");\n\tif (manualChunks != null && effectiveChunksOption != null) logger.warn(\"`manualChunks` option is ignored because the `codeSplitting` option is specified.\");\n\telse if (manualChunks != null) {\n\t\tchunksOptionName = \"manualChunks\";\n\t\tmigratedManualChunksGroup = { name(moduleId, ctx) {\n\t\t\treturn manualChunks(moduleId, { getModuleInfo: (id) => ctx.getModuleInfo(id) });\n\t\t} };\n\t\teffectiveChunksOption = { groups: [migratedManualChunksGroup] };\n\t}\n\tif (inlineDynamicImports === true && effectiveChunksOption != null) {\n\t\tlogger.warn(\"`advancedChunks` option is ignored because `inlineDynamicImports: true` disables code splitting.\");\n\t\teffectiveChunksOption = void 0;\n\t}\n\tlet advancedChunksResult;\n\tif (effectiveChunksOption != null) {\n\t\tconst { groups, experimentalInlineCommonChunks, ...restOptions } = effectiveChunksOption;\n\t\tlet chunkingContext;\n\t\tconst getChunkingContext = (bindingContext) => chunkingContext ??= new ChunkingContextImpl(bindingContext, pluginContextData);\n\t\tadvancedChunksResult = {\n\t\t\t...restOptions,\n\t\t\texperimentalInlineCommonChunks: experimentalInlineCommonChunks == null ? void 0 : {\n\t\t\t\tmaxSize: experimentalInlineCommonChunks.maxSize,\n\t\t\t\texclude: experimentalInlineCommonChunks.exclude == null ? void 0 : arraify(experimentalInlineCommonChunks.exclude).map((matcher) => typeof matcher === \"function\" ? batchTest(measureHookCost(timings, OUTPUT_OPTIONS_OWNER, \"codeSplitting.experimentalInlineCommonChunks.exclude\", matcher), \"output.codeSplitting.experimentalInlineCommonChunks.exclude\") : matcher)\n\t\t\t},\n\t\t\tinternalInvalidateModuleInfoCache: () => {\n\t\t\t\tchunkingContext?.clearModuleInfoCache();\n\t\t\t\tchunkingContext = void 0;\n\t\t\t},\n\t\t\tgroups: groups?.map((group, index) => {\n\t\t\t\tconst { debugName, name, test, ...restGroup } = group;\n\t\t\t\tconst timingKey = group === migratedManualChunksGroup ? manualChunks ?? group : group;\n\t\t\t\tconst timingOwner = timings === void 0 ? OUTPUT_OPTIONS_OWNER : {\n\t\t\t\t\t...OUTPUT_OPTIONS_OWNER,\n\t\t\t\t\tkey: timingKey\n\t\t\t\t};\n\t\t\t\tconst groupName = `${chunksOptionName} groups[${index}]`;\n\t\t\t\tlet testTimingName = `${groupName}.test`;\n\t\t\t\tlet nameTimingName = `${groupName}.name`;\n\t\t\t\tif (timings !== void 0) {\n\t\t\t\t\tif (chunksOptionName === \"manualChunks\") nameTimingName = \"manualChunks\";\n\t\t\t\t\telse {\n\t\t\t\t\t\tconst label = debugName ?? (typeof name === \"string\" ? name : void 0);\n\t\t\t\t\t\tif (label === void 0) {\n\t\t\t\t\t\t\tif (typeof name === \"function\" && !timings.warnedMissingGroupLabels.has(timingKey)) {\n\t\t\t\t\t\t\t\ttimings.warnedMissingGroupLabels.add(timingKey);\n\t\t\t\t\t\t\t\tonLog(LOG_LEVEL_WARN, logMissingCodeSplittingGroupDebugName(`output.${chunksOptionName}.groups[${index}]`));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst labelSuffix = ` ${JSON.stringify(label)}`;\n\t\t\t\t\t\t\ttestTimingName = `${groupName}.test${labelSuffix}`;\n\t\t\t\t\t\t\tnameTimingName = `${groupName}.name${labelSuffix}`;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\t...restGroup,\n\t\t\t\t\ttest: typeof test === \"function\" ? batchTest(measureHookCost(timings, timingOwner, testTimingName, test)) : test,\n\t\t\t\t\tname: typeof name === \"function\" ? batchName(measureHookCost(timings, timingOwner, nameTimingName, name), getChunkingContext) : name\n\t\t\t\t};\n\t\t\t})\n\t\t};\n\t}\n\treturn {\n\t\tinlineDynamicImports,\n\t\tadvancedChunks: advancedChunksResult\n\t};\n}\n/**\n* Wraps a per-id `test` in the batched shim that the binding expects.\n*\n* The loop runs in JS so that a group makes one napi crossing, not one per module.\n*\n* The result is a `Uint8Array`, which crosses as a buffer instead of one tagged value per id.\n*/\nfunction batchTest(test, optionName = \"output.codeSplitting.groups[].test\") {\n\treturn (ids) => {\n\t\tconst results = new Uint8Array(ids.length);\n\t\tfor (let index = 0; index < ids.length; index++) {\n\t\t\tconst result = test(ids[index]);\n\t\t\tif (result != null && typeof result !== \"boolean\") throw new TypeError(`\\`${optionName}\\` returned ${typeof result} for module \"${ids[index]}\", but expected a boolean, null or undefined.`);\n\t\t\tresults[index] = result === true ? 1 : 0;\n\t\t}\n\t\treturn results;\n\t};\n}\n/**\n* This is the `name` equivalent of {@linkcode batchTest}. All groups in a chunking pass share\n* a context so repeated module queries reuse their JavaScript values.\n*/\nfunction batchName(name, getChunkingContext) {\n\treturn (ids, bindingContext) => {\n\t\tconst context = getChunkingContext(bindingContext);\n\t\tconst results = [];\n\t\tfor (let index = 0; index < ids.length; index++) {\n\t\t\tconst result = name(ids[index], context);\n\t\t\tif (result != null && typeof result !== \"string\") throw new TypeError(`\\`output.codeSplitting.groups[].name\\` returned ${typeof result} for module \"${ids[index]}\", but expected a string, null or undefined.`);\n\t\t\tresults.push(result);\n\t\t}\n\t\treturn results;\n\t};\n}\n/**\n* Wraps a per-source `sourcemapIgnoreList` in the batched shim that the binding expects.\n*\n* The loop runs in JS so that a sourcemap makes one napi crossing, not one per source. The old\n* Rust loop also awaited each call before it started the next.\n*\n* The result is a `Uint8Array`, which crosses as a buffer instead of one tagged value per source.\n*\n* A boolean, string or regular expression passes through. Rust reads those without a call.\n*/\nfunction batchSourcemapIgnoreList(ignoreList) {\n\tif (typeof ignoreList !== \"function\") return ignoreList;\n\treturn (sources, sourcemapPath) => {\n\t\tconst results = new Uint8Array(sources.length);\n\t\tfor (let index = 0; index < sources.length; index++) {\n\t\t\tconst result = ignoreList(sources[index], sourcemapPath);\n\t\t\tif (typeof result !== \"boolean\") throw new TypeError(`\\`output.sourcemapIgnoreList\\` returned ${typeof result} for source \"${sources[index]}\", but expected a boolean.`);\n\t\t\tresults[index] = result ? 1 : 0;\n\t\t}\n\t\treturn results;\n\t};\n}\n/**\n* The `sourcemapPathTransform` counterpart of {@linkcode batchSourcemapIgnoreList}.\n*\n* A path cannot be reduced to a byte, so this batch is still an array of strings. napi reports the\n* type of the array, not of the bad element, so the check runs here.\n*/\nfunction batchSourcemapPathTransform(pathTransform) {\n\tif (typeof pathTransform !== \"function\") return pathTransform;\n\treturn (sources, sourcemapPath) => {\n\t\tconst results = [];\n\t\tfor (let index = 0; index < sources.length; index++) {\n\t\t\tconst result = pathTransform(sources[index], sourcemapPath);\n\t\t\tif (typeof result !== \"string\") throw new TypeError(`\\`output.sourcemapPathTransform\\` returned ${typeof result} for source \"${sources[index]}\", but expected a string.`);\n\t\t\tresults.push(result);\n\t\t}\n\t\treturn results;\n\t};\n}\n//#endregion\n//#region src/utils/initialize-parallel-plugins.ts\nvar import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);\nasync function initializeParallelPlugins(plugins) {\n\tconst pluginInfos = [];\n\tfor (const [index, plugin] of plugins.entries()) {\n\t\tconst parallel = getParallelPluginInfo(plugin);\n\t\tif (parallel) {\n\t\t\tconst { fileUrl, options } = parallel;\n\t\t\tpluginInfos.push({\n\t\t\t\tindex,\n\t\t\t\tfileUrl,\n\t\t\t\toptions\n\t\t\t});\n\t\t}\n\t}\n\tif (pluginInfos.length <= 0) return;\n\tconst count = availableParallelism();\n\tconst parallelJsPluginRegistry = new import_binding.ParallelJsPluginRegistry(count);\n\tconst registryId = parallelJsPluginRegistry.id;\n\tconst workers = await initializeWorkers(registryId, count, pluginInfos);\n\tconst stopWorkers = async () => {\n\t\tawait Promise.all(workers.map((worker) => worker.terminate()));\n\t};\n\treturn {\n\t\tregistry: parallelJsPluginRegistry,\n\t\tstopWorkers\n\t};\n}\nfunction initializeWorkers(registryId, count, pluginInfos) {\n\treturn Promise.all(Array.from({ length: count }, (_, i) => initializeWorker(registryId, pluginInfos, i)));\n}\nasync function initializeWorker(registryId, pluginInfos, threadNumber) {\n\tconst urlString = import.meta.resolve(\"#parallel-plugin-worker\");\n\tconst workerData = {\n\t\tregistryId,\n\t\tpluginInfos,\n\t\tthreadNumber\n\t};\n\tlet worker;\n\ttry {\n\t\tworker = new Worker(new URL(urlString), { workerData });\n\t\tworker.unref();\n\t\tawait new Promise((resolve, reject) => {\n\t\t\tworker.once(\"message\", async (message) => {\n\t\t\t\tif (message.type === \"error\") reject(message.error);\n\t\t\t\telse resolve();\n\t\t\t});\n\t\t});\n\t\treturn worker;\n\t} catch (e) {\n\t\tworker?.terminate();\n\t\tthrow e;\n\t}\n}\nconst availableParallelism = () => {\n\tlet availableParallelism = 1;\n\ttry {\n\t\tavailableParallelism = os.availableParallelism();\n\t} catch {\n\t\tconst cpus = os.cpus();\n\t\tif (Array.isArray(cpus) && cpus.length > 0) availableParallelism = cpus.length;\n\t}\n\treturn Math.min(availableParallelism, 8);\n};\n//#endregion\n//#region src/utils/create-bundler-option.ts\nasync function createBundlerOptions(inputOptions, outputOptions, watchMode, measureTimings = false) {\n\tconst inputPlugins = await normalizePluginOption(inputOptions.plugins);\n\tconst outputPlugins = await normalizePluginOption(outputOptions.plugins);\n\tconst logLevel = inputOptions.logLevel || \"info\";\n\tconst onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);\n\toutputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);\n\tconst hookOutputPlugins = await normalizePluginOption(outputOptions.plugins);\n\tconst normalizedInputPlugins = normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX);\n\tconst normalizedOutputPlugins = normalizePlugins(hookOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX);\n\tlet plugins = [...normalizedInputPlugins, ...checkOutputPluginOption(normalizedOutputPlugins, onLog)];\n\tconst timings = measureTimings && (inputOptions.checks?.bundlerTimings ?? inputOptions.checks?.pluginTimings ?? true) ? pluginTimingsRecorderFor(inputOptions) : void 0;\n\tif (timings) outputOptions = {\n\t\t...outputOptions,\n\t\tassetFileNames: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"assetFileNames\", outputOptions.assetFileNames),\n\t\tsanitizeFileName: measureIfFunction(timings, OUTPUT_OPTIONS_OWNER, \"sanitizeFileName\", outputOptions.sanitizeFileName)\n\t};\n\tconst parallelPluginInitResult = await initializeParallelPlugins(plugins);\n\tif (inputOptions.experimental?.strictExecutionOrder !== void 0) console.warn(\"`experimental.strictExecutionOrder` has been stabilized and moved to `output.strictExecutionOrder`. Please update your configuration.\");\n\ttry {\n\t\tconst pluginContextData = new PluginContextData(onLog, outputOptions, normalizedInputPlugins, normalizedOutputPlugins);\n\t\treturn {\n\t\t\tbundlerOptions: {\n\t\t\t\tinputOptions: bindingifyInputOptions(plugins, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode, timings),\n\t\t\t\toutputOptions: bindingifyOutputOptions(outputOptions, pluginContextData, onLog, timings),\n\t\t\t\tparallelPluginsRegistry: parallelPluginInitResult?.registry\n\t\t\t},\n\t\t\tinputOptions,\n\t\t\tonLog,\n\t\t\tstopWorkers: parallelPluginInitResult?.stopWorkers\n\t\t};\n\t} catch (e) {\n\t\tawait parallelPluginInitResult?.stopWorkers();\n\t\tthrow e;\n\t}\n}\n//#endregion\nexport { getOutputCliKeys as a, styleText$1 as c, getInputCliKeys as i, PluginDriver as l, logger as n, validateCliOptions as o, getCliSchemaInfo as r, validateOption as s, createBundlerOptions as t };\n","import { n as __toESM, t as require_binding } from \"./binding-CUpfdq6A.mjs\";\nimport { c as logMultipleWatcherOption } from \"./logs-D6uA606S.mjs\";\nimport { C as LOG_LEVEL_WARN } from \"./bindingify-input-options-UCGox0BH.mjs\";\nimport { t as arraify } from \"./misc-DOSKtd97.mjs\";\nimport { l as PluginDriver, t as createBundlerOptions } from \"./create-bundler-option-DH74Qvg7.mjs\";\nimport { t as aggregateBindingErrorsIntoJsError } from \"./error-CBG33oNV.mjs\";\n//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js\n/**\n* This is not the set of all possible signals.\n*\n* It IS, however, the set of all signals that trigger\n* an exit on either Linux or BSD systems.  Linux is a\n* superset of the signal names supported on BSD, and\n* the unknown signals just fail to register, so we can\n* catch that easily enough.\n*\n* Windows signals are a different set, since there are\n* signals that terminate Windows processes, but don't\n* terminate (or don't even exist) on Posix systems.\n*\n* Don't bother with SIGKILL.  It's uncatchable, which\n* means that we can't fire any callbacks anyway.\n*\n* If a user does happen to register a handler on a non-\n* fatal signal like SIGWINCH or something, and then\n* exit, it'll end up firing `process.emit('exit')`, so\n* the handler will be fired anyway.\n*\n* SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n* artificially, inherently leave the process in a\n* state from which it is not safe to try and enter JS\n* listeners.\n*/\nconst signals = [];\nsignals.push(\"SIGHUP\", \"SIGINT\", \"SIGTERM\");\nif (process.platform !== \"win32\") signals.push(\"SIGALRM\", \"SIGABRT\", \"SIGVTALRM\", \"SIGXCPU\", \"SIGXFSZ\", \"SIGUSR2\", \"SIGTRAP\", \"SIGSYS\", \"SIGQUIT\", \"SIGIOT\");\nif (process.platform === \"linux\") signals.push(\"SIGIO\", \"SIGPOLL\", \"SIGPWR\", \"SIGSTKFLT\");\n//#endregion\n//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js\nconst processOk = (process) => !!process && typeof process === \"object\" && typeof process.removeListener === \"function\" && typeof process.emit === \"function\" && typeof process.reallyExit === \"function\" && typeof process.listeners === \"function\" && typeof process.kill === \"function\" && typeof process.pid === \"number\" && typeof process.on === \"function\";\nconst kExitEmitter = Symbol.for(\"signal-exit emitter\");\nconst global = globalThis;\nconst ObjectDefineProperty = Object.defineProperty.bind(Object);\nvar Emitter = class {\n\temitted = {\n\t\tafterExit: false,\n\t\texit: false\n\t};\n\tlisteners = {\n\t\tafterExit: [],\n\t\texit: []\n\t};\n\tcount = 0;\n\tid = Math.random();\n\tconstructor() {\n\t\tif (global[kExitEmitter]) return global[kExitEmitter];\n\t\tObjectDefineProperty(global, kExitEmitter, {\n\t\t\tvalue: this,\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: false\n\t\t});\n\t}\n\ton(ev, fn) {\n\t\tthis.listeners[ev].push(fn);\n\t}\n\tremoveListener(ev, fn) {\n\t\tconst list = this.listeners[ev];\n\t\tconst i = list.indexOf(fn);\n\t\t/* c8 ignore start */\n\t\tif (i === -1) return;\n\t\t/* c8 ignore stop */\n\t\tif (i === 0 && list.length === 1) list.length = 0;\n\t\telse list.splice(i, 1);\n\t}\n\temit(ev, code, signal) {\n\t\tif (this.emitted[ev]) return false;\n\t\tthis.emitted[ev] = true;\n\t\tlet ret = false;\n\t\tfor (const fn of this.listeners[ev]) ret = fn(code, signal) === true || ret;\n\t\tif (ev === \"exit\") ret = this.emit(\"afterExit\", code, signal) || ret;\n\t\treturn ret;\n\t}\n};\nvar SignalExitBase = class {};\nconst signalExitWrap = (handler) => {\n\treturn {\n\t\tonExit(cb, opts) {\n\t\t\treturn handler.onExit(cb, opts);\n\t\t},\n\t\tload() {\n\t\t\treturn handler.load();\n\t\t},\n\t\tunload() {\n\t\t\treturn handler.unload();\n\t\t}\n\t};\n};\nvar SignalExitFallback = class extends SignalExitBase {\n\tonExit() {\n\t\treturn () => {};\n\t}\n\tload() {}\n\tunload() {}\n};\nvar SignalExit = class extends SignalExitBase {\n\t/* c8 ignore start */\n\t#hupSig = process$1.platform === \"win32\" ? \"SIGINT\" : \"SIGHUP\";\n\t/* c8 ignore stop */\n\t#emitter = new Emitter();\n\t#process;\n\t#originalProcessEmit;\n\t#originalProcessReallyExit;\n\t#sigListeners = {};\n\t#loaded = false;\n\tconstructor(process) {\n\t\tsuper();\n\t\tthis.#process = process;\n\t\tthis.#sigListeners = {};\n\t\tfor (const sig of signals) this.#sigListeners[sig] = () => {\n\t\t\tconst listeners = this.#process.listeners(sig);\n\t\t\tlet { count } = this.#emitter;\n\t\t\t/* c8 ignore start */\n\t\t\tconst p = process;\n\t\t\tif (typeof p.__signal_exit_emitter__ === \"object\" && typeof p.__signal_exit_emitter__.count === \"number\") count += p.__signal_exit_emitter__.count;\n\t\t\t/* c8 ignore stop */\n\t\t\tif (listeners.length === count) {\n\t\t\t\tthis.unload();\n\t\t\t\tconst ret = this.#emitter.emit(\"exit\", null, sig);\n\t\t\t\t/* c8 ignore start */\n\t\t\t\tconst s = sig === \"SIGHUP\" ? this.#hupSig : sig;\n\t\t\t\tif (!ret) process.kill(process.pid, s);\n\t\t\t}\n\t\t};\n\t\tthis.#originalProcessReallyExit = process.reallyExit;\n\t\tthis.#originalProcessEmit = process.emit;\n\t}\n\tonExit(cb, opts) {\n\t\t/* c8 ignore start */\n\t\tif (!processOk(this.#process)) return () => {};\n\t\t/* c8 ignore stop */\n\t\tif (this.#loaded === false) this.load();\n\t\tconst ev = opts?.alwaysLast ? \"afterExit\" : \"exit\";\n\t\tthis.#emitter.on(ev, cb);\n\t\treturn () => {\n\t\t\tthis.#emitter.removeListener(ev, cb);\n\t\t\tif (this.#emitter.listeners[\"exit\"].length === 0 && this.#emitter.listeners[\"afterExit\"].length === 0) this.unload();\n\t\t};\n\t}\n\tload() {\n\t\tif (this.#loaded) return;\n\t\tthis.#loaded = true;\n\t\tthis.#emitter.count += 1;\n\t\tfor (const sig of signals) try {\n\t\t\tconst fn = this.#sigListeners[sig];\n\t\t\tif (fn) this.#process.on(sig, fn);\n\t\t} catch (_) {}\n\t\tthis.#process.emit = (ev, ...a) => {\n\t\t\treturn this.#processEmit(ev, ...a);\n\t\t};\n\t\tthis.#process.reallyExit = (code) => {\n\t\t\treturn this.#processReallyExit(code);\n\t\t};\n\t}\n\tunload() {\n\t\tif (!this.#loaded) return;\n\t\tthis.#loaded = false;\n\t\tsignals.forEach((sig) => {\n\t\t\tconst listener = this.#sigListeners[sig];\n\t\t\t/* c8 ignore start */\n\t\t\tif (!listener) throw new Error(\"Listener not defined for signal: \" + sig);\n\t\t\t/* c8 ignore stop */\n\t\t\ttry {\n\t\t\t\tthis.#process.removeListener(sig, listener);\n\t\t\t} catch (_) {}\n\t\t\t/* c8 ignore stop */\n\t\t});\n\t\tthis.#process.emit = this.#originalProcessEmit;\n\t\tthis.#process.reallyExit = this.#originalProcessReallyExit;\n\t\tthis.#emitter.count -= 1;\n\t}\n\t#processReallyExit(code) {\n\t\t/* c8 ignore start */\n\t\tif (!processOk(this.#process)) return 0;\n\t\tthis.#process.exitCode = code || 0;\n\t\t/* c8 ignore stop */\n\t\tthis.#emitter.emit(\"exit\", this.#process.exitCode, null);\n\t\treturn this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);\n\t}\n\t#processEmit(ev, ...args) {\n\t\tconst og = this.#originalProcessEmit;\n\t\tif (ev === \"exit\" && processOk(this.#process)) {\n\t\t\tif (typeof args[0] === \"number\") this.#process.exitCode = args[0];\n\t\t\t/* c8 ignore start */\n\t\t\tconst ret = og.call(this.#process, ev, ...args);\n\t\t\t/* c8 ignore start */\n\t\t\tthis.#emitter.emit(\"exit\", this.#process.exitCode, null);\n\t\t\t/* c8 ignore stop */\n\t\t\treturn ret;\n\t\t} else return og.call(this.#process, ev, ...args);\n\t}\n};\nconst process$1 = globalThis.process;\nconst { onExit: onExit$1, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());\n//#endregion\n//#region src/utils/signal-exit.ts\nfunction onExit(...args) {\n\tif (typeof process === \"object\" && process.versions.webcontainer) {\n\t\tprocess.on(\"exit\", (code) => {\n\t\t\targs[0](code, null);\n\t\t});\n\t\treturn;\n\t}\n\tonExit$1(...args);\n}\n//#endregion\n//#region src/api/watch/watch-emitter.ts\nvar WatcherEmitter = class {\n\tlisteners = /* @__PURE__ */ new Map();\n\ton(event, listener) {\n\t\tconst listeners = this.listeners.get(event);\n\t\tif (listeners) listeners.push(listener);\n\t\telse this.listeners.set(event, [listener]);\n\t\treturn this;\n\t}\n\toff(event, listener) {\n\t\tconst listeners = this.listeners.get(event);\n\t\tif (listeners) {\n\t\t\tconst index = listeners.indexOf(listener);\n\t\t\tif (index !== -1) listeners.splice(index, 1);\n\t\t}\n\t\treturn this;\n\t}\n\tclear(event) {\n\t\tthis.listeners.delete(event);\n\t}\n\t/** Async emit — sequential dispatch so side effects from earlier handlers\n\t*  (e.g. `event.result.close()` triggering `closeBundle`) are visible to later handlers. */\n\tasync emit(event, ...args) {\n\t\tconst handlers = this.listeners.get(event);\n\t\tif (handlers?.length) for (const h of handlers) await h(...args);\n\t}\n\tasync close() {}\n};\n//#endregion\n//#region src/api/watch/watcher.ts\nvar import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);\nfunction createEventCallback(emitter) {\n\treturn async (event) => {\n\t\tswitch (event.eventKind()) {\n\t\t\tcase \"event\": {\n\t\t\t\tconst code = event.bundleEventKind();\n\t\t\t\tif (code === \"BUNDLE_END\") {\n\t\t\t\t\tconst { duration, output, result } = event.bundleEndData();\n\t\t\t\t\tawait emitter.emit(\"event\", {\n\t\t\t\t\t\tcode: \"BUNDLE_END\",\n\t\t\t\t\t\tduration,\n\t\t\t\t\t\toutput: [output],\n\t\t\t\t\t\tresult\n\t\t\t\t\t});\n\t\t\t\t} else if (code === \"ERROR\") {\n\t\t\t\t\tconst data = event.bundleErrorData();\n\t\t\t\t\tawait emitter.emit(\"event\", {\n\t\t\t\t\t\tcode: \"ERROR\",\n\t\t\t\t\t\terror: aggregateBindingErrorsIntoJsError(data.error),\n\t\t\t\t\t\tresult: data.result\n\t\t\t\t\t});\n\t\t\t\t} else await emitter.emit(\"event\", { code });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"change\": {\n\t\t\t\tconst { path, kind } = event.watchChangeData();\n\t\t\t\tawait emitter.emit(\"change\", path, { event: kind });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"restart\":\n\t\t\t\tawait emitter.emit(\"restart\");\n\t\t\t\tbreak;\n\t\t\tcase \"close\": await emitter.emit(\"close\");\n\t\t}\n\t};\n}\nvar Watcher = class {\n\tclosed;\n\tinner;\n\temitter;\n\tstopWorkers;\n\tconstructor(emitter, inner, stopWorkers) {\n\t\tthis.closed = false;\n\t\tthis.inner = inner;\n\t\tthis.emitter = emitter;\n\t\t(0, import_binding.startAsyncRuntime)();\n\t\tconst originClose = emitter.close.bind(emitter);\n\t\temitter.close = async () => {\n\t\t\tawait this.close();\n\t\t\toriginClose();\n\t\t};\n\t\tthis.stopWorkers = stopWorkers;\n\t\tprocess.nextTick(() => this.run());\n\t}\n\tasync close() {\n\t\tif (this.closed) return;\n\t\tthis.closed = true;\n\t\ttry {\n\t\t\tfor (const stop of this.stopWorkers) await stop?.();\n\t\t\tawait this.inner.close();\n\t\t} finally {\n\t\t\t(0, import_binding.shutdownAsyncRuntime)();\n\t\t}\n\t}\n\tasync run() {\n\t\tawait this.inner.run();\n\t\tthis.inner.waitForClose();\n\t}\n};\nasync function createWatcher(emitter, input) {\n\tconst options = arraify(input);\n\tconst bundlerOptions = await Promise.all(options.map((option) => arraify(option.output || {}).map(async (output) => {\n\t\tconst inputOptions = await PluginDriver.callOptionsHook(option, true);\n\t\treturn createBundlerOptions(inputOptions, output, true);\n\t})).flat());\n\twarnMultiplePollingOptions(bundlerOptions);\n\tconst callback = createEventCallback(emitter);\n\tnew Watcher(emitter, new import_binding.BindingWatcher(bundlerOptions.map((option) => option.bundlerOptions), callback), bundlerOptions.map((option) => option.stopWorkers));\n}\nfunction warnMultiplePollingOptions(bundlerOptions) {\n\tlet found = false;\n\tfor (const option of bundlerOptions) {\n\t\tconst watch = option.inputOptions.watch;\n\t\tconst watcher = watch && typeof watch === \"object\" ? watch.watcher : void 0;\n\t\tif (watcher && (watcher.usePolling != null || watcher.pollInterval != null)) {\n\t\t\tif (found) {\n\t\t\t\toption.onLog(LOG_LEVEL_WARN, logMultipleWatcherOption());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfound = true;\n\t\t}\n\t}\n}\n//#endregion\n//#region src/api/watch/index.ts\n/**\n* The API compatible with Rollup's `watch` function.\n*\n* This function will rebuild the bundle when it detects that the individual modules have changed on disk.\n*\n* Note that when using this function, it is your responsibility to call `event.result.close()` in response to the `BUNDLE_END` event to avoid resource leaks.\n*\n* @param input The watch options object or the list of them.\n* @returns A watcher object.\n*\n* @example\n* ```js\n* import { watch } from 'rolldown';\n*\n* const watcher = watch({ /* ... *\\/ });\n* watcher.on('event', (event) => {\n*   if (event.code === 'BUNDLE_END') {\n*     console.log(event.duration);\n*     event.result.close();\n*   }\n* });\n*\n* // Stop watching\n* watcher.close();\n* ```\n*\n* @experimental\n* @category Programmatic APIs\n*/\nfunction watch(input) {\n\tconst emitter = new WatcherEmitter();\n\tcreateWatcher(emitter, input);\n\treturn emitter;\n}\n//#endregion\nexport { onExit as n, watch as t };\n","import { n as __toESM, t as require_binding } from \"./binding-CUpfdq6A.mjs\";\nimport { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from \"./bindingify-input-options-UCGox0BH.mjs\";\nimport { i as noop } from \"./misc-DOSKtd97.mjs\";\nimport { l as PluginDriver, s as validateOption, t as createBundlerOptions } from \"./create-bundler-option-DH74Qvg7.mjs\";\nimport { i as unwrapBindingResult } from \"./error-CBG33oNV.mjs\";\n//#region src/types/rolldown-output-impl.ts\nvar import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);\nvar RolldownOutputImpl = class extends PlainObjectLike {\n\tbindingOutputs;\n\tconstructor(bindingOutputs) {\n\t\tsuper();\n\t\tthis.bindingOutputs = bindingOutputs;\n\t\tif (bindingOutputs.mangleCache !== void 0) this.mangleCache = bindingOutputs.mangleCache;\n\t}\n\tget output() {\n\t\treturn transformToRollupOutput(this.bindingOutputs).output;\n\t}\n\t__rolldown_external_memory_handle__(keepDataAlive) {\n\t\tconst results = this.output.map((item) => item.__rolldown_external_memory_handle__(keepDataAlive));\n\t\tif (!results.every((r) => r.freed)) {\n\t\t\tconst reasons = results.filter((r) => !r.freed).map((r) => r.reason).filter(Boolean);\n\t\t\treturn {\n\t\t\t\tfreed: false,\n\t\t\t\treason: `Failed to free ${reasons.length} item(s): ${reasons.join(\"; \")}`\n\t\t\t};\n\t\t}\n\t\treturn { freed: true };\n\t}\n};\n__decorate([lazyProp], RolldownOutputImpl.prototype, \"output\", null);\n//#endregion\n//#region src/api/rolldown/rolldown-build.ts\nSymbol.asyncDispose ??= Symbol(\"Symbol.asyncDispose\");\n/**\n* The bundle object returned by {@linkcode rolldown} function.\n*\n* @category Programmatic APIs\n*/\nvar RolldownBuild = class {\n\t#inputOptions;\n\t#bundler;\n\t#stopWorkers;\n\t#closing;\n\t/** @hidden should not be used directly */\n\tconstructor(inputOptions) {\n\t\tthis.#inputOptions = inputOptions;\n\t\tthis.#bundler = new import_binding.BindingBundler();\n\t\t(0, import_binding.startAsyncRuntime)();\n\t}\n\t/**\n\t* Whether the bundle has been closed.\n\t*\n\t* If the bundle is closed, calling other methods will throw an error.\n\t*/\n\tget closed() {\n\t\treturn this.#bundler.closed;\n\t}\n\t/**\n\t* Generate bundles in-memory.\n\t*\n\t* If you directly want to write bundles to disk, use the {@linkcode write} method instead.\n\t*\n\t* @param outputOptions The output options.\n\t* @returns The generated bundle.\n\t* @throws {@linkcode BundleError} When an error occurs during the build.\n\t*/\n\tasync generate(outputOptions = {}) {\n\t\treturn this.#build(false, outputOptions);\n\t}\n\t/**\n\t* Generate and write bundles to disk.\n\t*\n\t* If you want to generate bundles in-memory, use the {@linkcode generate} method instead.\n\t*\n\t* @param outputOptions The output options.\n\t* @returns The generated bundle.\n\t* @throws {@linkcode BundleError} When an error occurs during the build.\n\t*/\n\tasync write(outputOptions = {}) {\n\t\treturn this.#build(true, outputOptions);\n\t}\n\t/**\n\t* Close the bundle and free resources.\n\t*\n\t* This method should be called even if the {@linkcode generate} method\n\t* or the {@linkcode write} method threw an error. It should be called\n\t* even if neither of the methods are called.\n\t*\n\t* This method is called automatically when using `using` syntax.\n\t*\n\t* @example\n\t* ```js\n\t* import { rolldown } from 'rolldown';\n\t*\n\t* {\n\t*   using bundle = await rolldown({ input: 'src/main.js' });\n\t*   const output = await bundle.generate({ format: 'esm' });\n\t*   console.log(output);\n\t*   // bundle.close() is called automatically here\n\t* }\n\t* ```\n\t*/\n\tasync close() {\n\t\tif (this.#closing) {\n\t\t\tawait this.#closing.catch(noop);\n\t\t\treturn;\n\t\t}\n\t\tthis.#closing = this.#close();\n\t\tawait this.#closing;\n\t}\n\tasync #close() {\n\t\tlet stopWorkersError;\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tawait this.#stopWorkers?.();\n\t\t\t} catch (error) {\n\t\t\t\tstopWorkersError = { error };\n\t\t\t}\n\t\t\tthis.#stopWorkers = void 0;\n\t\t\tawait this.#bundler.close();\n\t\t} finally {\n\t\t\t(0, import_binding.shutdownAsyncRuntime)();\n\t\t}\n\t\tif (stopWorkersError) throw stopWorkersError.error;\n\t}\n\t/** @hidden documented in close method */\n\tasync [Symbol.asyncDispose]() {\n\t\tawait this.close();\n\t}\n\t/**\n\t* @experimental\n\t* @hidden not ready for public usage yet\n\t*/\n\tget watchFiles() {\n\t\treturn Promise.resolve(this.#bundler.getWatchFiles());\n\t}\n\tasync #build(isWrite, outputOptions) {\n\t\tvalidateOption(\"output\", outputOptions);\n\t\tawait this.#stopWorkers?.();\n\t\tconst option = await createBundlerOptions(this.#inputOptions, outputOptions, false, true);\n\t\ttry {\n\t\t\tthis.#stopWorkers = option.stopWorkers;\n\t\t\tlet output;\n\t\t\tif (isWrite) output = await this.#bundler.write(option.bundlerOptions);\n\t\t\telse output = await this.#bundler.generate(option.bundlerOptions);\n\t\t\treturn new RolldownOutputImpl(unwrapBindingResult(output));\n\t\t} catch (e) {\n\t\t\tawait option.stopWorkers?.();\n\t\t\tthrow e;\n\t\t}\n\t}\n};\n//#endregion\n//#region src/api/rolldown/index.ts\n/**\n* The API compatible with Rollup's `rollup` function.\n*\n* Unlike Rollup, the module graph is not built until the methods of the bundle object are called.\n*\n* @param input The input options object.\n* @returns A Promise that resolves to a bundle object.\n*\n* @example\n* ```js\n* import { rolldown } from 'rolldown';\n*\n* let bundle, failed = false;\n* try {\n*   bundle = await rolldown({\n*     input: 'src/main.js',\n*   });\n*   await bundle.write({\n*     format: 'esm',\n*   });\n* } catch (e) {\n*   console.error(e);\n*   failed = true;\n* }\n* if (bundle) {\n*   await bundle.close();\n* }\n* process.exitCode = failed ? 1 : 0;\n* ```\n*\n* @category Programmatic APIs\n*/\nconst rolldown = async (input) => {\n\tvalidateOption(\"input\", input);\n\treturn new RolldownBuild(await PluginDriver.callOptionsHook(input));\n};\n//#endregion\nexport { rolldown as t };\n","import { n as __toESM, t as require_binding } from \"./shared/binding-CUpfdq6A.mjs\";\nimport { n as onExit, t as watch } from \"./shared/watch-CILbYpHY.mjs\";\nimport { T as VERSION, s as RolldownMagicString } from \"./shared/bindingify-input-options-UCGox0BH.mjs\";\nimport { t as rolldown } from \"./shared/rolldown-BYX6bV3R.mjs\";\nimport { t as defineConfig } from \"./shared/define-config-Demdg3_4.mjs\";\nimport { isMainThread } from \"node:worker_threads\";\n//#region src/setup.ts\nvar import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);\nif (isMainThread) {\n\tconst subscriberGuard = (0, import_binding.initTraceSubscriber)();\n\tonExit(() => {\n\t\tsubscriberGuard?.close();\n\t});\n}\n//#endregion\n//#region src/constants/index.ts\n/**\n* Runtime helper module ID\n*/\nconst RUNTIME_MODULE_ID = \"\\0rolldown/runtime.js\";\n//#endregion\n//#region src/api/build.ts\n/**\n* The API similar to esbuild's `build` function.\n*\n* @example\n* ```js\n* import { build } from 'rolldown';\n*\n* const result = await build({\n*   input: 'src/main.js',\n*   output: {\n*     file: 'bundle.js',\n*   },\n* });\n* console.log(result);\n* ```\n*\n* @experimental\n* @category Programmatic APIs\n*/\nasync function build(options) {\n\tif (Array.isArray(options)) return Promise.all(options.map((opts) => build(opts)));\n\telse {\n\t\tconst { output, write = true, ...inputOptions } = options;\n\t\tconst build = await rolldown(inputOptions);\n\t\ttry {\n\t\t\tif (write) return await build.write(output);\n\t\t\telse return await build.generate(output);\n\t\t} finally {\n\t\t\tawait build.close();\n\t\t}\n\t}\n}\n//#endregion\nexport { RUNTIME_MODULE_ID, RolldownMagicString, VERSION, build, defineConfig, rolldown, watch };\n","import crypto from 'node:crypto';\nimport path from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { BACKGROUND_CONTEXT, type FileSystem, getOrThrow, pathExists } from '@agimon-ai/po-core/platform';\n\n/** Realpath fragments of version-scoped package stores: a new version is a new path. */\nconst VERSIONED_STORES = ['.upm', '.pnpm'].map((store) => `${path.sep}node_modules${path.sep}${store}${path.sep}`);\nexport const SNAPSHOT_DIRECTORY = path.join('node_modules', '.po-snapshots');\nconst SETTLE_MS = 300;\nconst STABLE_ATTEMPTS = 5;\n/** Build outputs a host never imports. */\nconst SKIPPED_SUFFIXES = ['.map', '.d.ts', '.d.mts', '.d.cts', '.tsbuildinfo'];\n\nexport interface PackageUrlOptions {\n  readonly files?: FileSystem;\n  /** Host-owned installed payload whose packages must import in place, never write snapshots. */\n  readonly immutableRoot?: string;\n  /** Delay between the two content reads that prove a build is not in progress. */\n  readonly settleMs?: number;\n  readonly sleep?: (ms: number) => Promise<void>;\n}\n\nexport interface PackageUrls {\n  /** The URL to import for a resolved entry file. Stable until the package content changes. */\n  urlFor(entry: string): Promise<string>;\n}\n\ninterface PackageState {\n  signature: string;\n  hash: string;\n  pruned: boolean;\n}\n\nasync function packageRootOf(file: string, fs: FileSystem): Promise<string | undefined> {\n  let directory = path.dirname(file);\n  for (;;) {\n    if (await pathExists(fs, path.join(directory, 'package.json'), BACKGROUND_CONTEXT)) return directory;\n    const parent = path.dirname(directory);\n    if (parent === directory) return undefined;\n    directory = parent;\n  }\n}\n\nfunction isVersioned(root: string): boolean {\n  return VERSIONED_STORES.some((store) => `${root}${path.sep}`.includes(store));\n}\n\nfunction exportTargets(value: unknown, condition: string | undefined, into: string[]): void {\n  if (condition === 'types') return;\n  if (typeof value === 'string') {\n    if (!value.includes('*')) into.push(value);\n    return;\n  }\n  if (Array.isArray(value)) {\n    for (const item of value) exportTargets(item, condition, into);\n    return;\n  }\n  if (typeof value === 'object' && value !== null)\n    for (const [key, item] of Object.entries(value)) exportTargets(item, key, into);\n}\n\nfunction record(value: unknown): Record<string, unknown> | undefined {\n  return typeof value === 'object' && value !== null && !Array.isArray(value)\n    ? (value as Record<string, unknown>)\n    : undefined;\n}\n\n/** Package-relative entry targets the manifest declares for a server-side host. */\nfunction declaredTargets(manifest: Record<string, unknown>): string[] {\n  const targets: string[] = [];\n  exportTargets(manifest.exports, undefined, targets);\n  if (typeof manifest.main === 'string') targets.push(manifest.main);\n  const pi = record(manifest.pi);\n  if (Array.isArray(pi?.extensions))\n    for (const entry of pi.extensions) if (typeof entry === 'string') targets.push(entry);\n  const server = record(manifest.poServer);\n  if (typeof server?.dist === 'string') targets.push(server.dist);\n  const mcp = record(manifest.poMcp);\n  if (typeof mcp?.dist === 'string') targets.push(mcp.dist);\n  return targets;\n}\n\nfunction inside(relative: string): boolean {\n  return relative !== '' && relative !== '..' && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative);\n}\n\n/**\n * The files a snapshot carries, package-relative and sorted.\n *\n * A target's whole top-level directory goes with it: bundlers split entries into\n * sibling chunks the entry imports relatively, so copying only the named file would\n * break the import graph. The manifest's `files` entries go too, because a module\n * running from the snapshot reads its shipped resources (`src/prompts`, `README.md`)\n * relative to the snapshot's `package.json`, not the source package.\n */\nexport async function snapshotFiles(\n  root: string,\n  entry: string,\n  fs: FileSystem = createNodePlatform().env(root),\n): Promise<string[]> {\n  const manifest = JSON.parse(\n    getOrThrow(await fs.readTextFile(path.join(root, 'package.json'), BACKGROUND_CONTEXT)),\n  ) as Record<string, unknown>;\n  const targets = [...new Set([...declaredTargets(manifest), path.relative(root, entry)])].map((target) =>\n    path.normalize(target),\n  );\n  const files = new Set<string>(['package.json']);\n  const collect = async (directory: string): Promise<void> => {\n    for (const dirent of getOrThrow(await fs.listDir(directory, BACKGROUND_CONTEXT))) {\n      const file = path.join(directory, dirent.name);\n      if (dirent.kind === 'directory') {\n        if (dirent.name !== 'node_modules') await collect(file);\n      } else if (\n        (dirent.kind === 'file' || dirent.kind === 'symlink') &&\n        !SKIPPED_SUFFIXES.some((suffix) => dirent.name.endsWith(suffix))\n      )\n        files.add(path.relative(root, file));\n    }\n  };\n  const add = async (relative: string): Promise<void> => {\n    const absolute = path.join(root, relative);\n    const resolved = getOrThrow(await fs.canonicalPath(absolute, BACKGROUND_CONTEXT));\n    if (getOrThrow(await fs.fileInfo(resolved, BACKGROUND_CONTEXT)).kind === 'directory') await collect(absolute);\n    else files.add(relative);\n  };\n  for (const target of targets) {\n    if (!inside(target) || target.split(path.sep)[0] === 'node_modules') continue;\n    if (!(await pathExists(fs, path.join(root, target), BACKGROUND_CONTEXT)))\n      throw new Error(`declared entry is missing: ${target}`);\n    await add(target.split(path.sep)[0]!);\n  }\n  // ponytail: plain `files` paths only; globs and negations are skipped, add a glob matcher if a package needs one.\n  const shipped = Array.isArray(manifest.files) ? manifest.files : [];\n  for (const item of shipped) {\n    if (typeof item !== 'string' || /[*?!]/.test(item)) continue;\n    const relative = path.normalize(item);\n    if (!inside(relative) || relative.split(path.sep)[0] === 'node_modules') continue;\n    if (await pathExists(fs, path.join(root, relative), BACKGROUND_CONTEXT)) await add(relative);\n  }\n  return [...files].sort();\n}\n\nexport async function statSignature(\n  root: string,\n  files: readonly string[],\n  fs: FileSystem = createNodePlatform().env(root),\n): Promise<string> {\n  return (\n    await Promise.all(\n      files.map(async (file) => {\n        const resolved = getOrThrow(await fs.canonicalPath(path.join(root, file), BACKGROUND_CONTEXT));\n        const stat = getOrThrow(await fs.fileInfo(resolved, BACKGROUND_CONTEXT));\n        return `${file}\\0${String(stat.size)}\\0${String(stat.mtimeMs)}`;\n      }),\n    )\n  ).join('\\n');\n}\n\nasync function contentHash(root: string, files: readonly string[], fs: FileSystem): Promise<string> {\n  const hash = crypto.createHash('sha256');\n  for (const file of files) {\n    hash.update(file).update('\\0');\n    hash.update(getOrThrow(await fs.readBinaryFile(path.join(root, file), BACKGROUND_CONTEXT))).update('\\0');\n  }\n  return hash.digest('hex').slice(0, 32);\n}\n\nasync function pruneOthers(snapshots: string, keep: string, fs: FileSystem): Promise<void> {\n  const entries = await fs.listDir(snapshots, BACKGROUND_CONTEXT);\n  if (!entries.ok && entries.error.code === 'not_found') return;\n  for (const { name } of getOrThrow(entries))\n    if (name !== keep)\n      getOrThrow(await fs.remove(path.join(snapshots, name), { recursive: true, force: true }, BACKGROUND_CONTEXT));\n}\n\n/**\n * Maps resolved package entries to import URLs that change only when content changes.\n *\n * Packages under a versioned store or the host's immutable payload import in place:\n * an upgrade has a new process or path. Any other package (repo-local, or npm-installed)\n * is snapshotted by content into `<package>/node_modules/.po-snapshots/<hash>/`, with\n * its `package.json` so a self-import by name resolves to the snapshot, while dependencies still resolve\n * from `<package>/node_modules`. A snapshot is taken only when every declared entry\n * exists and two reads `settleMs` apart agree, so a build in progress is never\n * captured. The first snapshot of a package in this process prunes its older ones;\n * later ones keep them, because live sessions may still lazily import from them.\n */\nexport function createPackageUrls(options: PackageUrlOptions = {}): PackageUrls {\n  const fs = options.files ?? createNodePlatform().env(process.cwd());\n  const settleMs = options.settleMs ?? SETTLE_MS;\n  const sleep = options.sleep ?? ((ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)));\n  const states = new Map<string, PackageState>();\n  const pending = new Map<string, Promise<string>>();\n\n  const snapshot = async (root: string, entry: string): Promise<string> => {\n    const snapshots = path.join(root, SNAPSHOT_DIRECTORY);\n    for (let attempt = 0; attempt < STABLE_ATTEMPTS; attempt++) {\n      const files = await snapshotFiles(root, entry, fs);\n      const signature = await statSignature(root, files, fs);\n      const previous = states.get(root);\n      if (\n        previous?.signature === signature &&\n        (await pathExists(fs, path.join(snapshots, previous.hash), BACKGROUND_CONTEXT))\n      )\n        return previous.hash;\n      const hash = await contentHash(root, files, fs);\n      const target = path.join(snapshots, hash);\n      if (!(await pathExists(fs, target, BACKGROUND_CONTEXT))) {\n        await sleep(settleMs);\n        const settled = await snapshotFiles(root, entry, fs);\n        if (settled.join('\\n') !== files.join('\\n') || (await contentHash(root, settled, fs)) !== hash) continue;\n        const staging = path.join(snapshots, `.${hash}.${String(process.pid)}.${crypto.randomUUID()}`);\n        for (const file of files) {\n          getOrThrow(\n            await fs.createDir(path.dirname(path.join(staging, file)), { recursive: true }, BACKGROUND_CONTEXT),\n          );\n          getOrThrow(\n            await fs.writeFile(\n              path.join(staging, file),\n              getOrThrow(await fs.readBinaryFile(path.join(root, file), BACKGROUND_CONTEXT)),\n              BACKGROUND_CONTEXT,\n            ),\n          );\n        }\n        if ((await contentHash(staging, files, fs)) !== hash) {\n          getOrThrow(await fs.remove(staging, { recursive: true, force: true }, BACKGROUND_CONTEXT));\n          continue;\n        }\n        try {\n          getOrThrow(await fs.renameFile(staging, target, BACKGROUND_CONTEXT));\n        } catch (error) {\n          getOrThrow(await fs.remove(staging, { recursive: true, force: true }, BACKGROUND_CONTEXT));\n          if (!(await pathExists(fs, target, BACKGROUND_CONTEXT))) throw error;\n        }\n      }\n      if (!previous?.pruned) await pruneOthers(snapshots, hash, fs);\n      states.set(root, { signature, hash, pruned: true });\n      return hash;\n    }\n    throw new Error(`package content kept changing while it was read: ${root}`);\n  };\n\n  const pathFor = async (entry: string): Promise<string> => {\n    const real = getOrThrow(await fs.canonicalPath(entry, BACKGROUND_CONTEXT));\n    const immutablePrefix =\n      options.immutableRoot === undefined\n        ? undefined\n        : path.join(getOrThrow(await fs.canonicalPath(options.immutableRoot, BACKGROUND_CONTEXT)), path.sep);\n    if (immutablePrefix !== undefined && real.startsWith(immutablePrefix)) return real;\n    const root = await packageRootOf(real, fs);\n    // A file no package owns (a loose entry) has nothing to snapshot.\n    if (root === undefined || isVersioned(root)) return real;\n    const relative = path.relative(root, real);\n    if (relative.split(path.sep)[0] === 'node_modules') return real;\n    const key = `${root}\\0${relative}`;\n    let running = pending.get(key);\n    if (!running) {\n      running = snapshot(root, real).finally(() => pending.delete(key));\n      pending.set(key, running);\n    }\n    const hash = await running;\n    return path.join(root, SNAPSHOT_DIRECTORY, hash, relative);\n  };\n\n  return { urlFor: async (entry) => pathToFileURL(await pathFor(entry)).href };\n}\n","/**\n * The poWeb manifest vocabulary: how a package declares its web plugin in\n * package.json, validated and ordered; the filesystem is read only to name each\n * copy's slot by its real directory. The\n * scan adapter feeds this from real manifests; the sync bundler feeds it from\n * the installed composition's package roots.\n *\n * Plugins are independent: a manifest names no other plugin, and the order\n * plugins install in is only a tiebreak (registrationOrder, then pluginId),\n * because every relation between two plugins resolves by name once all of\n * them are installed. Package copies keep distinct slots so each mount can select its\n * own package; only repeated declarations of the same slot are dropped. Native\n * bundling still chooses one module per pluginId after retaining all admission roots.\n *\n * The native app's poNative blocks share this exact shape, so the same\n * validation reads either field.\n */\n\nimport crypto from 'node:crypto';\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\n\nconst PLUGIN_ID_PATTERN = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;\n\n/** The order a plugin installs at when its manifest names none. */\nexport const DEFAULT_REGISTRATION_ORDER = 1000;\n\nexport interface WebPluginEntryDeclaration {\n  /** Package-relative ./path to the source entry. */\n  entry: string;\n}\n\nexport interface DeclaredWebPlugin {\n  pluginId: string;\n  /**\n   * The registry name of this installed copy: the pluginId for a host plugin, otherwise\n   * `${pluginId}.${first 8 hex of sha256(realpath(packageDir))}`, so two copies of one\n   * pluginId installed from different directories never share a name.\n   */\n  slot: string;\n  registrationOrder: number;\n  packageDir: string;\n  packageName: string;\n  isHost: boolean;\n  client: WebPluginEntryDeclaration;\n  scopes: readonly ('global' | 'workspace' | 'session')[];\n}\n\n/** The package.json field a plugin block lives in: the browser cockpit's or the native app's. */\nexport type PluginManifestField = 'poWeb' | 'poNative';\n\nexport class WebPluginManifestError extends Error {\n  constructor(packageDir: string, message: string, field: PluginManifestField = 'poWeb') {\n    super(`${field} manifest in ${packageDir}: ${message}`);\n    this.name = 'WebPluginManifestError';\n  }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n  return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction normalizeEntry(\n  packageDir: string,\n  kind: string,\n  value: unknown,\n  field: PluginManifestField,\n): WebPluginEntryDeclaration {\n  const raw = typeof value === 'string' ? { entry: value } : value;\n  if (!isRecord(raw)) throw new WebPluginManifestError(packageDir, `${kind} must be a path or {entry}.`, field);\n  const { entry } = raw;\n  if (typeof entry !== 'string' || !entry.startsWith('./') || entry.includes('..')) {\n    throw new WebPluginManifestError(\n      packageDir,\n      `${kind}.entry must be a package-relative ./path with no '..'.`,\n      field,\n    );\n  }\n  return { entry };\n}\n\nconst SLOT_HASH_LENGTH = 8;\n\n/** The slot of one installed plugin copy; see DeclaredWebPlugin.slot. */\nexport async function pluginSlot(plugin: { pluginId: string; packageDir: string; isHost: boolean }): Promise<string> {\n  if (plugin.isHost) return plugin.pluginId;\n  let directory: string;\n  try {\n    directory = await fs.realpath(plugin.packageDir);\n  } catch {\n    // A directory that no longer exists has no real path; its resolved path still names it stably.\n    directory = path.resolve(plugin.packageDir);\n  }\n  const digest = crypto.createHash('sha256').update(directory).digest('hex');\n  return `${plugin.pluginId}.${digest.slice(0, SLOT_HASH_LENGTH)}`;\n}\n\n/** The field's value normalized to a list: one plugin object or an array of them. */\nexport function pluginBlocksOf(manifest: Record<string, unknown>, field: PluginManifestField = 'poWeb'): unknown[] {\n  const value = manifest[field];\n  if (value === undefined) return [];\n  return Array.isArray(value) ? value : [value];\n}\n\n/** Validates one manifest's blocks into declared plugins; throws WebPluginManifestError on bad shape. */\nexport async function declaredPluginsOf(\n  packageDir: string,\n  manifest: Record<string, unknown>,\n  isHost: boolean,\n  field: PluginManifestField = 'poWeb',\n): Promise<DeclaredWebPlugin[]> {\n  const plugins: DeclaredWebPlugin[] = [];\n  for (const block of pluginBlocksOf(manifest, field)) {\n    if (!isRecord(block)) throw new WebPluginManifestError(packageDir, 'each block must be an object.', field);\n    const { pluginId, registrationOrder = DEFAULT_REGISTRATION_ORDER, client, scopes } = block;\n    if (\n      !Array.isArray(scopes) ||\n      scopes.length === 0 ||\n      scopes.some((scope) => !['global', 'workspace', 'session'].includes(scope))\n    ) {\n      throw new WebPluginManifestError(\n        packageDir,\n        'scopes must explicitly name global, workspace, or session; resync the plugin.',\n        field,\n      );\n    }\n    if (typeof pluginId !== 'string' || !PLUGIN_ID_PATTERN.test(pluginId)) {\n      throw new WebPluginManifestError(packageDir, `pluginId '${String(pluginId)}' must be kebab-case.`, field);\n    }\n    if (!Number.isInteger(registrationOrder) || (registrationOrder as number) < 0) {\n      throw new WebPluginManifestError(\n        packageDir,\n        `'${pluginId}' needs a non-negative integer registrationOrder.`,\n        field,\n      );\n    }\n    plugins.push({\n      pluginId,\n      slot: await pluginSlot({ pluginId, packageDir, isHost }),\n      registrationOrder: registrationOrder as number,\n      packageDir,\n      packageName: typeof manifest.name === 'string' ? manifest.name : packageDir,\n      isHost,\n      client: normalizeEntry(packageDir, 'client', client, field),\n      scopes,\n    });\n  }\n  return plugins;\n}\n\n/** Code-unit order, never the locale's: the same packages must order the same on every machine. */\nexport function compareCodeUnits(left: string, right: string): number {\n  return left < right ? -1 : left > right ? 1 : 0;\n}\n\nconst byInstallOrder = (left: DeclaredWebPlugin, right: DeclaredWebPlugin): number =>\n  left.registrationOrder - right.registrationOrder ||\n  compareCodeUnits(left.pluginId, right.pluginId) ||\n  compareCodeUnits(left.packageDir, right.packageDir);\n\n/**\n * Deterministic install order with duplicate slots removed. Different package\n * copies survive the scan so mount selection can recognize every selected root.\n */\nexport function orderDeclaredPlugins(\n  plugins: readonly DeclaredWebPlugin[],\n  onNotice: (message: string) => void = () => undefined,\n  field: PluginManifestField = 'poWeb',\n): DeclaredWebPlugin[] {\n  const sorted = [...plugins].sort(byInstallOrder);\n  const byKey = new Map<string, DeclaredWebPlugin>();\n  const kept: DeclaredWebPlugin[] = [];\n  for (const plugin of sorted) {\n    const key = plugin.slot;\n    const holder = byKey.get(key);\n    if (holder !== undefined) {\n      onNotice(\n        `${field === 'poNative' ? 'native' : 'web'} plugin '${plugin.pluginId}' from ${plugin.packageDir} is skipped: ${holder.packageDir} already declares it.`,\n      );\n      continue;\n    }\n    byKey.set(key, plugin);\n    kept.push(plugin);\n  }\n  return kept;\n}\n","import fs from 'node:fs/promises';\nimport path from 'node:path';\n\nimport {\n  type DeclaredWebPlugin,\n  declaredPluginsOf,\n  orderDeclaredPlugins,\n  type PluginManifestField,\n  WebPluginManifestError,\n} from './webPluginManifest';\n\n/**\n * Reads poWeb declarations from explicit package roots.\n *\n * No workspace walking and no hardcoded plugin names: the caller says which\n * packages are in play. At po-web's own build time that is just the host\n * package (its built-in plugins); at `po sync` time it is the installed\n * composition's package roots. A plugin package whose manifest is malformed\n * or whose entry file is missing is skipped with a notice, so one broken or\n * half-installed package never costs the rest of the cockpit; only the host's\n * own manifest still throws, because that is a build error of this package.\n *\n * `field` selects poNative for the native composition, which has no host\n * package: pass `undefined` as `hostDir` and only the plugin roots are read.\n */\nexport async function scanWebPlugins(\n  hostDir: string | undefined,\n  pluginRoots: readonly string[] = [],\n  onNotice: (message: string) => void = () => undefined,\n  field: PluginManifestField = 'poWeb',\n): Promise<DeclaredWebPlugin[]> {\n  const seen = new Set<string>();\n  const plugins: DeclaredWebPlugin[] = [];\n  const hostResolved = hostDir === undefined ? undefined : path.resolve(hostDir);\n  const kind = field === 'poNative' ? 'native' : 'web';\n  for (const root of hostDir === undefined ? pluginRoots : [hostDir, ...pluginRoots]) {\n    const resolved = path.resolve(root);\n    if (seen.has(resolved)) continue;\n    seen.add(resolved);\n    try {\n      plugins.push(...(await declaredPluginsIn(resolved, resolved === hostResolved, field)));\n    } catch (error) {\n      if (resolved === hostResolved) throw error;\n      const reason = error instanceof WebPluginManifestError ? error.message : String(error);\n      onNotice(`${kind} plugin package ${resolved} skipped: ${reason}`);\n    }\n  }\n  return orderDeclaredPlugins(plugins, onNotice, field);\n}\n\nasync function declaredPluginsIn(\n  resolved: string,\n  isHost: boolean,\n  field: PluginManifestField,\n): Promise<DeclaredWebPlugin[]> {\n  let manifest: Record<string, unknown>;\n  try {\n    manifest = JSON.parse(await fs.readFile(path.join(resolved, 'package.json'), 'utf8')) as Record<string, unknown>;\n  } catch (error) {\n    throw new WebPluginManifestError(resolved, `package.json is unreadable: ${String(error)}`, field);\n  }\n  const declared = await declaredPluginsOf(resolved, manifest, isHost, field);\n  for (const plugin of declared) {\n    const entryPath = path.join(resolved, plugin.client.entry);\n    await fs.access(entryPath).catch((error: NodeJS.ErrnoException) => {\n      if (error.code === 'ENOENT')\n        throw new WebPluginManifestError(resolved, `client.entry '${plugin.client.entry}' does not exist.`, field);\n      throw error;\n    });\n  }\n  return declared;\n}\n","import { execFile } from 'node:child_process';\nimport crypto from 'node:crypto';\nimport fsp from 'node:fs/promises';\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\n\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { BACKGROUND_CONTEXT, type FileSystem, getOrThrow, pathExists } from '@agimon-ai/po-core/platform';\nimport type { GlobalWebBuild, GlobalWebBuildPlugin } from '@agimon-ai/po-core/webCompositions';\n\nimport { snapshotFiles, statSignature } from '../server/packageUrl';\nimport { compareCodeUnits, type DeclaredWebPlugin } from './webPluginManifest';\nimport { scanWebPlugins } from './webPluginScan';\n\nconst WEB_PACKAGE = '@agimon-ai/po-web';\nconst WEB_PACKAGE_ROOT_ENV = 'PO_WEB_PACKAGE_ROOT';\n\n/** The package roots a set of compositions activates, without blocking a live host. */\nexport async function compositionPackageRoots(\n  compositions: readonly { packageEntries: readonly string[] }[],\n  files: FileSystem = createNodePlatform().env(process.cwd()),\n): Promise<string[]> {\n  const roots = await Promise.all(\n    compositions.flatMap((composition) => composition.packageEntries).map((entry) => packageRootOf(entry, files)),\n  );\n  return [...new Set(roots.filter((root) => root !== undefined))];\n}\n\nexport async function packageRootOf(\n  entryPath: string,\n  files: FileSystem = createNodePlatform().env(process.cwd()),\n): Promise<string | undefined> {\n  let directory = path.dirname(entryPath);\n  for (;;) {\n    if (await pathExists(files, path.join(directory, 'package.json'), BACKGROUND_CONTEXT)) return directory;\n    const parent = path.dirname(directory);\n    if (parent === directory) return undefined;\n    directory = parent;\n  }\n}\n\nfunction resolveWebPackageRoot(repoRoot: string, environment: NodeJS.ProcessEnv): string | undefined {\n  const override = environment[WEB_PACKAGE_ROOT_ENV];\n  if (override !== undefined && override !== '') return path.resolve(override);\n  try {\n    return path.dirname(createRequire(path.join(repoRoot, 'package.json')).resolve(`${WEB_PACKAGE}/package.json`));\n  } catch {\n    try {\n      return path.dirname(createRequire(import.meta.url).resolve(`${WEB_PACKAGE}/package.json`));\n    } catch {\n      return undefined;\n    }\n  }\n}\n\n/** The installed po-web host version the global web build would use, or `none` when it is not installed. */\nexport async function webHostVersion(\n  poHome: string,\n  environment: NodeJS.ProcessEnv = process.env,\n  files: FileSystem = createNodePlatform().env(poHome),\n): Promise<string> {\n  const webRoot = resolveWebPackageRoot(poHome, environment);\n  if (webRoot === undefined) return 'none';\n  try {\n    const manifest = JSON.parse(\n      getOrThrow(await files.readTextFile(path.join(webRoot, 'package.json'), BACKGROUND_CONTEXT)),\n    ) as { version?: unknown };\n    return typeof manifest.version === 'string' ? manifest.version : 'unversioned';\n  } catch (error) {\n    return `unreadable:${error instanceof Error ? error.message : String(error)}`;\n  }\n}\n\n/** Bumped whenever the build's output layout changes, so an old layout is never reused. */\nconst GLOBAL_BUILD_FORMAT = 'global-web-5';\n/** The record every keyed global build writes last, so a key directory holding it is complete. */\nexport const BUILD_RECORD = 'build.json';\nconst BUILD_CHILD_SCRIPT = `\nconst [bundleUrl, request] = process.argv.slice(1);\ntry {\n  const { bundleCockpitWeb } = await import(bundleUrl);\n  const { hostRoot, pluginRoots, outDir } = JSON.parse(request);\n  const result = await bundleCockpitWeb({\n    hostRoot,\n    pluginRoots,\n    outDir,\n    onNotice: (message) => process.stderr.write(message + '\\\\n'),\n  });\n  process.stdout.write(JSON.stringify(result));\n} catch (error) {\n  process.stderr.write(error instanceof Error ? (error.stack ?? error.message) : String(error));\n  process.exitCode = 1;\n}\n`;\n\n/** One build's record: the publishable build, whose plugins carry each copy's package and slot closure. */\nexport type GlobalWebBuildRecord = GlobalWebBuild;\n\nexport interface GlobalWebBuildInput {\n  /** Po's global home; builds land in `<home>/build/web/<key>/`. */\n  poHome: string;\n  files?: FileSystem;\n  /** The union of every scope's package roots; roots without a poWeb block are ignored. */\n  pluginRoots: readonly string[];\n  environment?: NodeJS.ProcessEnv;\n  onNotice?: (message: string) => void;\n  /** Test seam over the child-process build. */\n  runBuild?: (request: { hostRoot: string; pluginRoots: string[]; outDir: string }) => Promise<BuildOutput>;\n  /** Test seam over package resolution. */\n  resolveWebRoot?: (repoRoot: string, environment: NodeJS.ProcessEnv) => string | undefined;\n}\n\ninterface BuildOutput {\n  assetsDir: string;\n  pluginsDir: string;\n  plugins: GlobalWebBuildPlugin[];\n  pluginStyles: Record<string, string>;\n  baseStyle: string;\n}\n\nexport type GlobalWebBuildResult =\n  | { status: 'built' | 'cached'; build: GlobalWebBuildRecord }\n  | { status: 'skipped'; reason: string }\n  | { status: 'failed'; reason: string };\n\n/**\n * The size+mtime signature of every file a plugin package hands the build: its manifest\n * plus the whole top-level folder of the client entry and of each declared export, so an\n * edited import or a rebuilt dist chunk changes the key, not only the entry file.\n */\nasync function packageSignature(packageDir: string, entries: readonly string[], files: FileSystem): Promise<string> {\n  try {\n    const selected = new Set<string>();\n    for (const entry of entries) for (const file of await snapshotFiles(packageDir, entry, files)) selected.add(file);\n    return await statSignature(packageDir, [...selected].sort(), files);\n  } catch (error) {\n    // A declared export that is not built yet must not block the build; it only weakens the key.\n    return `unreadable:${error instanceof Error ? error.message : String(error)}`;\n  }\n}\n\n/**\n * The content key of a build: the format, the host package when there is one, then every\n * plugin package's file signature. A changed source or dist file or a changed plugin set\n * yields a new key; roots that declare no plugin do not take part.\n */\nexport async function globalBuildKey(\n  format: string,\n  hostRoot: string | undefined,\n  plugins: readonly DeclaredWebPlugin[],\n  files: FileSystem = createNodePlatform().env(process.cwd()),\n): Promise<string> {\n  const hash = crypto.createHash('sha256').update(format);\n  if (hostRoot !== undefined)\n    hash.update(\n      `host:${hostRoot}:${getOrThrow(await files.readTextFile(path.join(hostRoot, 'package.json'), BACKGROUND_CONTEXT))}`,\n    );\n  const entries = new Map<string, string[]>();\n  for (const plugin of [...plugins].sort((a, b) => compareCodeUnits(a.pluginId, b.pluginId))) {\n    hash.update(`\\0${plugin.pluginId}:${plugin.packageDir}:${plugin.client.entry}`);\n    const list = entries.get(plugin.packageDir) ?? [];\n    list.push(path.join(plugin.packageDir, plugin.client.entry));\n    entries.set(plugin.packageDir, list);\n  }\n  for (const packageDir of [...entries.keys()].sort())\n    hash.update(`\\0${packageDir}\\0${await packageSignature(packageDir, entries.get(packageDir) ?? [], files)}`);\n  return hash.digest('hex').slice(0, 32);\n}\n\nfunction bundleModuleUrl(): string {\n  const extension = import.meta.url.endsWith('.ts') ? 'ts' : 'mjs';\n  return new URL(`./bundle.${extension}`, import.meta.url).href;\n}\n\n/** Runs Vite in a child process so its module graph and caches never stay in the server heap. */\nfunction runBuildProcess(\n  request: { hostRoot: string; pluginRoots: string[]; outDir: string },\n  environment: NodeJS.ProcessEnv,\n  onNotice: (message: string) => void,\n): Promise<BuildOutput> {\n  const args = [\n    ...process.execArgv,\n    '--input-type=module',\n    '--eval',\n    BUILD_CHILD_SCRIPT,\n    bundleModuleUrl(),\n    JSON.stringify(request),\n  ];\n  return new Promise((resolve, reject) => {\n    execFile(\n      process.execPath,\n      args,\n      { cwd: request.hostRoot, env: environment, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 },\n      (error, stdout, stderr) => {\n        if (error) {\n          reject(new Error(`${stderr || stdout}`.trim() || `Web build exited with code ${String(error.code ?? 1)}`));\n          return;\n        }\n        for (const line of stderr.split('\\n')) if (line.trim()) onNotice(line.trim());\n        resolve(JSON.parse(stdout) as BuildOutput);\n      },\n    );\n  });\n}\n\n/** A key directory's parsed build record, or undefined when the build is not there (yet). */\nexport async function readBuildJson<T>(\n  directory: string,\n  files: FileSystem = createNodePlatform().env(directory),\n): Promise<T | undefined> {\n  try {\n    return JSON.parse(\n      getOrThrow(await files.readTextFile(path.join(directory, BUILD_RECORD), BACKGROUND_CONTEXT)),\n    ) as T;\n  } catch (error) {\n    if ((error as { code?: string }).code === 'not_found') return undefined;\n    throw error;\n  }\n}\n\nasync function readBuildRecord(directory: string, files?: FileSystem): Promise<GlobalWebBuildRecord | undefined> {\n  const record = await readBuildJson<Omit<GlobalWebBuildRecord, 'webDirectory' | 'pluginsDirectory'>>(directory, files);\n  if (\n    record === undefined ||\n    !Array.isArray(record.plugins) ||\n    record.plugins.some((plugin) => typeof plugin.slot !== 'string')\n  )\n    return undefined;\n  return { ...record, webDirectory: path.join(directory, 'web'), pluginsDirectory: path.join(directory, 'plugins') };\n}\n\nfunction webBuildsRoot(poHome: string): string {\n  return path.join(poHome, 'build', 'web');\n}\n\n/** The complete global web build of one key, or undefined when it is not there. Never builds. */\nexport async function readGlobalWebBuildRecord(\n  poHome: string,\n  key: string,\n  files?: FileSystem,\n): Promise<GlobalWebBuildRecord | undefined> {\n  return readBuildRecord(path.join(webBuildsRoot(poHome), key), files);\n}\n\n/**\n * The key of the most recently written complete global web build, for a server that starts\n * before sync ever wrote a pointer. Temporary build folders start with a dot and are skipped.\n */\nexport async function newestGlobalWebBuildKey(\n  poHome: string,\n  files: FileSystem = createNodePlatform().env(poHome),\n): Promise<string | undefined> {\n  const root = webBuildsRoot(poHome);\n  const listed = await files.listDir(root, BACKGROUND_CONTEXT);\n  if (!listed.ok && listed.error.code === 'not_found') return undefined;\n  const records = await Promise.all(\n    getOrThrow(listed)\n      .filter((entry) => entry.kind === 'directory' && !entry.name.startsWith('.'))\n      .map(async (entry) => {\n        const info = await files.fileInfo(path.join(root, entry.name, BUILD_RECORD), BACKGROUND_CONTEXT);\n        if (!info.ok && info.error.code === 'not_found') return undefined;\n        return { name: entry.name, modified: getOrThrow(info).mtimeMs };\n      }),\n  );\n  return records.filter((entry) => entry !== undefined).sort((left, right) => right.modified - left.modified)[0]?.name;\n}\n\n/**\n * Builds into a temporary sibling of `directory`, writes the build record last, and renames\n * the result into place, so a key directory is always complete. Losing the rename to another\n * process that finished the same key is fine: its bytes are identical.\n */\nexport async function buildKeyDirectory(\n  buildsRoot: string,\n  key: string,\n  directory: string,\n  build: (temporary: string) => Promise<object>,\n): Promise<void> {\n  await fsp.mkdir(buildsRoot, { recursive: true });\n  const temporary = await fsp.mkdtemp(path.join(buildsRoot, `.${key}-`));\n  try {\n    const record = await build(temporary);\n    await fsp.writeFile(path.join(temporary, BUILD_RECORD), `${JSON.stringify(record, null, 2)}\\n`);\n    try {\n      await fsp.rename(temporary, directory);\n    } catch (error) {\n      if ((await readBuildJson(directory)) === undefined) throw error;\n    }\n  } finally {\n    await fsp.rm(temporary, { recursive: true, force: true });\n  }\n}\n\nconst pendingBuilds = new Map<string, Promise<unknown>>();\n\n/** Joins a build of the same key that is already running in this process instead of starting another. */\nexport async function singleFlightBuild<T>(key: string, run: () => Promise<T>): Promise<T> {\n  const pending = pendingBuilds.get(key);\n  if (pending !== undefined) return pending as Promise<T>;\n  const started = run();\n  pendingBuilds.set(key, started);\n  try {\n    return await started;\n  } finally {\n    pendingBuilds.delete(key);\n  }\n}\n\n/**\n * Ensures the one global web build for the given plugin roots exists and returns it.\n *\n * The output is `<home>/build/web/<key>/`, built in a temporary directory and renamed into\n * place, so a key directory is always complete; an existing key builds nothing. Each\n * plugin shares one content-hashed Tailwind stylesheet with the shell and fallback template.\n */\ntype ResolvedGlobalWebBuild =\n  | { status: 'resolved'; webRoot: string; pluginRoots: string[]; key: string; buildsRoot: string; directory: string }\n  | { status: 'skipped'; reason: string }\n  | { status: 'failed'; reason: string };\n\n/** The build key for these plugin roots and where its build lives, without building anything. */\nasync function resolveGlobalWebBuild(input: GlobalWebBuildInput): Promise<ResolvedGlobalWebBuild> {\n  const environment = input.environment ?? process.env;\n  const webRoot = (input.resolveWebRoot ?? resolveWebPackageRoot)(input.poHome, environment);\n  if (\n    webRoot === undefined ||\n    !(await pathExists(\n      input.files ?? createNodePlatform().env(input.poHome),\n      path.join(webRoot, 'package.json'),\n      BACKGROUND_CONTEXT,\n    ))\n  )\n    return { status: 'skipped', reason: `${WEB_PACKAGE} is not installed; no web composition is published` };\n  const pluginRoots = [...new Set(input.pluginRoots.map((root) => path.resolve(root)))].sort();\n  let key: string;\n  try {\n    key = await globalBuildKey(\n      GLOBAL_BUILD_FORMAT,\n      webRoot,\n      await scanWebPlugins(webRoot, pluginRoots, input.onNotice ?? ((): void => {})),\n      input.files,\n    );\n  } catch (error) {\n    return { status: 'failed', reason: error instanceof Error ? error.message : String(error) };\n  }\n  const buildsRoot = path.join(input.poHome, 'build', 'web');\n  return { status: 'resolved', webRoot, pluginRoots, key, buildsRoot, directory: path.join(buildsRoot, key) };\n}\n\n/** Whether the global build for these plugin roots exists, for a check that must not build. */\nexport async function readGlobalWebBuildStatus(\n  input: GlobalWebBuildInput,\n): Promise<\n  | { status: 'current' | 'missing'; key: string }\n  | { status: 'skipped'; reason: string }\n  | { status: 'failed'; reason: string }\n> {\n  const resolved = await resolveGlobalWebBuild(input);\n  if (resolved.status !== 'resolved') return resolved;\n  return {\n    status: (await readBuildRecord(resolved.directory, input.files)) === undefined ? 'missing' : 'current',\n    key: resolved.key,\n  };\n}\n\nexport async function ensureGlobalWebBuild(input: GlobalWebBuildInput): Promise<GlobalWebBuildResult> {\n  const environment = input.environment ?? process.env;\n  const notice = input.onNotice ?? ((): void => {});\n  const resolved = await resolveGlobalWebBuild(input);\n  if (resolved.status !== 'resolved') return resolved;\n  const { webRoot, pluginRoots, key, buildsRoot, directory } = resolved;\n  const existing = await readBuildRecord(directory, input.files);\n  if (existing !== undefined) return { status: 'cached', build: existing };\n  return singleFlightBuild(key, async (): Promise<GlobalWebBuildResult> => {\n    try {\n      await buildKeyDirectory(buildsRoot, key, directory, async (temporary) => {\n        const request = { hostRoot: webRoot, pluginRoots, outDir: temporary };\n        const output = await (input.runBuild ?? ((value) => runBuildProcess(value, environment, notice)))(request);\n        return {\n          key,\n          plugins: output.plugins,\n          pluginStyles: output.pluginStyles,\n          baseStyle: output.baseStyle,\n        };\n      });\n      const build = await readBuildRecord(directory, input.files);\n      if (build === undefined) throw new Error(`The web build '${key}' was not recorded.`);\n      return { status: 'built', build };\n    } catch (error) {\n      return { status: 'failed', reason: error instanceof Error ? error.message : String(error) };\n    }\n  });\n}\n\ntype MountPluginRecord = { pluginId: string; packageDir: string; isHost: boolean };\n\n/** The plugin copies a mount runs, host plugins plus its own roots', at most one per pluginId (first wins). */\nfunction mountPluginCopies<T extends MountPluginRecord>(\n  build: { plugins: readonly T[] },\n  packageRoots: readonly string[],\n): T[] {\n  const roots = new Set(packageRoots.map((root) => path.resolve(root)));\n  const seen = new Set<string>();\n  return build.plugins.filter((plugin) => {\n    if (!plugin.isHost && !roots.has(path.resolve(plugin.packageDir))) return false;\n    if (seen.has(plugin.pluginId)) return false;\n    seen.add(plugin.pluginId);\n    return true;\n  });\n}\n\n/** The `pluginId` values a mount runs: the host's plugins plus those of its own package roots, deduplicated. */\nexport function mountWebPluginIds(\n  build: { plugins: readonly MountPluginRecord[] },\n  packageRoots: readonly string[],\n): string[] {\n  return mountPluginCopies(build, packageRoots).map((plugin) => plugin.pluginId);\n}\n\n/** The slots a mount runs: one copy per pluginId, the first in build order. */\nexport function mountWebPluginSlots(\n  build: { plugins: readonly (MountPluginRecord & { slot: string })[] },\n  packageRoots: readonly string[],\n): string[] {\n  return mountPluginCopies(build, packageRoots).map((plugin) => plugin.slot);\n}\n\n/**\n * The package roots among `packageRoots` that declare a web plugin the build has no slot for:\n * a package that was not synced yet, or was left out of the build. Their names, else their roots.\n */\nexport async function unslottedWebPackages(\n  build: { plugins: readonly MountPluginRecord[] },\n  packageRoots: readonly string[],\n  files: FileSystem = createNodePlatform().env(process.cwd()),\n): Promise<string[]> {\n  const slotted = new Set(build.plugins.map((plugin) => path.resolve(plugin.packageDir)));\n  const missing: string[] = [];\n  for (const root of new Set(packageRoots.map((entry) => path.resolve(entry)))) {\n    if (slotted.has(root)) continue;\n    let manifest: { name?: unknown; poWeb?: unknown };\n    try {\n      manifest = JSON.parse(\n        getOrThrow(await files.readTextFile(path.join(root, 'package.json'), BACKGROUND_CONTEXT)),\n      ) as typeof manifest;\n    } catch {\n      // Unreadable manifests are reported by the build's own scan, not as a missing slot.\n      continue;\n    }\n    if (manifest.poWeb === undefined) continue;\n    missing.push(typeof manifest.name === 'string' ? manifest.name : root);\n  }\n  return missing;\n}\n\n/** The pluginIds with more than one installed copy among the host and these roots, each with its slots in build order. */\nexport function duplicatePluginCopies(\n  build: { plugins: readonly (MountPluginRecord & { slot: string })[] },\n  packageRoots: readonly string[],\n): Map<string, string[]> {\n  const roots = new Set(packageRoots.map((root) => path.resolve(root)));\n  const slotsById = new Map<string, string[]>();\n  for (const plugin of build.plugins) {\n    if (!plugin.isHost && !roots.has(path.resolve(plugin.packageDir))) continue;\n    const slot = plugin.slot;\n    const slots = slotsById.get(plugin.pluginId) ?? [];\n    if (!slots.includes(slot)) slots.push(slot);\n    slotsById.set(plugin.pluginId, slots);\n  }\n  return new Map([...slotsById].filter(([, slots]) => slots.length > 1));\n}\n","import crypto from 'node:crypto';\nimport fs from 'node:fs/promises';\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\n\nimport { NATIVE_HOST_MODULE_IDS } from '@agimon-ai/po-core/native';\nimport type { FileSystem } from '@agimon-ai/po-core/platform';\nimport type { GlobalNativeBuild } from '@agimon-ai/po-core/webCompositions';\nimport { NATIVE_COMPOSITION_MAX_BYTES } from '@agimon-ai/po-web-security';\nimport { type PluginContext, rolldown } from 'rolldown';\n\nimport { buildKeyDirectory, globalBuildKey, mountWebPluginIds, readBuildJson, singleFlightBuild } from '../web';\nimport type { DeclaredWebPlugin } from '../web/webPluginManifest';\nimport { scanWebPlugins } from '../web/webPluginScan';\n\n/**\n * The global native build: each package's `poNative` client bundled into its own CommonJS module\n * the po-native shell verifies and evaluates against its own host modules, one plugin at a time.\n *\n * It shares the web build's key, temporary directory, rename and `build.json` handling, and\n * runs rolldown in process: the input is already built per package, so each bundle only joins\n * that package's files and checks that every bare import is one the shell provides.\n */\n\n/** Bumped when build output or package-copy admission changes, so an old record is never reused. */\nconst GLOBAL_NATIVE_BUILD_FORMAT = 'global-native-5';\nconst PLUGINS_DIRECTORY = 'plugins';\nconst UI_MODULE = '@agimon-ai/po-native-components';\nconst HOST_MODULES: ReadonlySet<string> = new Set(NATIVE_HOST_MODULE_IDS);\n\n/** One build's record: the publishable build plus each plugin's package, for resolving a mount's plugins. */\nexport interface GlobalNativeBuildRecord extends GlobalNativeBuild {\n  plugins: { pluginId: string; packageDir: string; isHost: boolean }[];\n}\n\nexport interface GlobalNativeBuildInput {\n  /** Po's global home; builds land in `<home>/build/native/<key>/`. */\n  poHome: string;\n  files?: FileSystem;\n  /** The union of every scope's package roots; roots without a poNative block are ignored. */\n  pluginRoots: readonly string[];\n  onNotice?: (message: string) => void;\n}\n\nexport type GlobalNativeBuildResult =\n  | { status: 'built' | 'cached'; build: GlobalNativeBuildRecord }\n  | { status: 'skipped'; reason: string }\n  | { status: 'failed'; reason: string };\n\ntype ResolvedGlobalNativeBuild =\n  | {\n      status: 'resolved';\n      plugins: DeclaredWebPlugin[];\n      key: string;\n      uiEntry: string;\n      buildsRoot: string;\n      directory: string;\n    }\n  | { status: 'skipped'; reason: string }\n  | { status: 'failed'; reason: string };\n\n/** The build key for these plugin roots and where its build lives, without building anything. */\nasync function resolveGlobalNativeBuild(input: GlobalNativeBuildInput): Promise<ResolvedGlobalNativeBuild> {\n  const pluginRoots = [...new Set(input.pluginRoots.map((root) => path.resolve(root)))].sort();\n  let plugins: DeclaredWebPlugin[];\n  let key: string;\n  try {\n    plugins = await scanWebPlugins(undefined, pluginRoots, input.onNotice ?? ((): void => {}), 'poNative');\n    if (plugins.length === 0)\n      return { status: 'skipped', reason: 'no package declares a native plugin; no native composition is published' };\n    const resolve = createRequire(import.meta.url).resolve;\n    const uiPackages = [UI_MODULE, '@agimon-ai/po-web-components'].map((name) => {\n      const packageDir = path.dirname(resolve(`${name}/package.json`));\n      return {\n        pluginId: name,\n        slot: name,\n        registrationOrder: 0,\n        packageDir,\n        packageName: name,\n        isHost: false,\n        client: { entry: path.relative(packageDir, resolve(name)) },\n        scopes: [],\n      } satisfies DeclaredWebPlugin;\n    });\n    key = await globalBuildKey(\n      `${GLOBAL_NATIVE_BUILD_FORMAT}:${JSON.stringify(NATIVE_HOST_MODULE_IDS)}`,\n      undefined,\n      [...plugins, ...uiPackages],\n      input.files,\n    );\n  } catch (error) {\n    return { status: 'failed', reason: error instanceof Error ? error.message : String(error) };\n  }\n  const buildsRoot = path.join(input.poHome, 'build', 'native');\n  return {\n    status: 'resolved',\n    plugins,\n    key,\n    buildsRoot,\n    directory: path.join(buildsRoot, key),\n    uiEntry: createRequire(import.meta.url).resolve(UI_MODULE),\n  };\n}\n\nasync function readBuildRecord(directory: string, files?: FileSystem): Promise<GlobalNativeBuildRecord | undefined> {\n  const record = await readBuildJson<Omit<GlobalNativeBuildRecord, 'pluginsDirectory'>>(directory, files);\n  if (record === undefined) return undefined;\n  return { ...record, pluginsDirectory: path.join(directory, PLUGINS_DIRECTORY) };\n}\n\n/** The complete global native build of one key, or undefined when it is not there. Never builds. */\nexport async function readGlobalNativeBuildRecord(\n  poHome: string,\n  key: string,\n  files?: FileSystem,\n): Promise<GlobalNativeBuildRecord | undefined> {\n  return readBuildRecord(path.join(poHome, 'build', 'native', key), files);\n}\n\nconst isBareSpecifier = (source: string): boolean =>\n  !source.startsWith('.') && !source.startsWith('\\0') && !path.isAbsolute(source);\n\n/** One plugin's module file name: a hash of its id, so any id is a safe top-level asset path. */\nconst pluginModuleFile = (pluginId: string): string =>\n  `${crypto.createHash('sha256').update(pluginId).digest('hex').slice(0, 32)}.js`;\n\n/** Checks the tree-shaken ESM imports before the CommonJS body can run, including on older shells. */\nfunction nativeImportGuard(program: ReturnType<PluginContext['parse']>): string {\n  const requirements = new Map<string, Set<string>>();\n  const namespaces = new Map<string, string>();\n  const requireExport = (module: string, name?: string) => {\n    const names = requirements.get(module) ?? new Set<string>();\n    if (name !== undefined) names.add(name);\n    requirements.set(module, names);\n  };\n  for (const statement of program.body) {\n    if (statement.type === 'ImportDeclaration') {\n      const module = statement.source.value;\n      requireExport(module);\n      for (const specifier of statement.specifiers) {\n        if (specifier.type === 'ImportNamespaceSpecifier') namespaces.set(specifier.local.name, module);\n        else\n          requireExport(\n            module,\n            specifier.type === 'ImportDefaultSpecifier'\n              ? 'default'\n              : specifier.imported.type === 'Identifier'\n                ? specifier.imported.name\n                : specifier.imported.value,\n          );\n      }\n    } else if (statement.type === 'ExportNamedDeclaration' && statement.source !== null) {\n      for (const specifier of statement.specifiers)\n        requireExport(\n          statement.source.value,\n          specifier.local.type === 'Identifier' ? specifier.local.name : specifier.local.value,\n        );\n    } else if (statement.type === 'ExportAllDeclaration') {\n      throw new Error('Native modules must name their external re-exports.');\n    }\n  }\n  const visit = (value: unknown, parent?: Record<string, unknown>, key?: string): void => {\n    if (Array.isArray(value)) {\n      for (const item of value) visit(item, parent, key);\n      return;\n    }\n    if (typeof value !== 'object' || value === null) return;\n    const node = value as Record<string, unknown>;\n    if (node.type === 'ImportExpression')\n      throw new Error('Native external dynamic imports are unsupported; use named ESM imports.');\n    if (\n      node.type === 'CallExpression' &&\n      /^(?:__)?require(?:\\$\\d+)?$/u.test(String((node.callee as { name?: string })?.name))\n    ) {\n      throw new Error('Native external CommonJS require is unsupported; use named ESM imports.');\n    }\n    if (node.type === 'Identifier' && namespaces.has(String(node.name))) {\n      const module = namespaces.get(String(node.name))!;\n      if (\n        parent?.type === 'ImportNamespaceSpecifier' ||\n        (key === 'property' && parent?.computed === false) ||\n        (key === 'key' && parent?.computed === false)\n      )\n        return;\n      if (parent?.type !== 'MemberExpression' || key !== 'object') {\n        throw new Error(`Native namespace '${String(node.name)}' must use static member access.`);\n      }\n      const property = parent.property as { type: string; name?: string; value?: unknown };\n      const name = parent.computed === false ? property.name : property.type === 'Literal' ? property.value : undefined;\n      if (typeof name !== 'string')\n        throw new Error(`Native namespace '${String(node.name)}' has dynamic member access.`);\n      requireExport(module, name);\n    }\n    for (const [childKey, child] of Object.entries(node))\n      if (childKey !== 'start' && childKey !== 'end') visit(child, node, childKey);\n  };\n  visit(program);\n  const entries = [...requirements].map(([module, names]) => [module, [...names].sort()]);\n  return `;(function(requirements) {\n  function fail(id, name) {\n    var error = new Error('Update Po: missing ' + id + (name === null ? '' : '.' + name));\n    error.name = 'PoIncompatible';\n    error.code = 'PO_INCOMPATIBLE';\n    error.module = id;\n    error.export = name;\n    throw error;\n  }\n  for (var i = 0; i < requirements.length; i++) {\n    var id = requirements[i][0], names = requirements[i][1], value;\n    try { value = require(id); } catch (cause) { fail(id, null); }\n    for (var j = 0; j < names.length; j++) {\n      var name = names[j];\n      if (value == null || (name === 'default' ? value.__esModule && value.default === undefined : value[name] === undefined)) fail(id, name);\n    }\n  }\n})(${JSON.stringify(entries)});\\n`;\n}\n\n/** Bundles a native module. Only the shared UI module may bundle ordinary JS dependencies. */\nasync function bundleNativeModule(entry: string, ui: boolean, onNotice: (message: string) => void): Promise<string> {\n  let guard = '';\n  const bundle = await rolldown({\n    input: await fs.realpath(entry),\n    cwd: path.dirname(entry),\n    platform: 'neutral',\n    external: (id) => HOST_MODULES.has(id) && !(ui && id === UI_MODULE),\n    onLog: (level, log) => {\n      if (level === 'warn') onNotice(log.message);\n    },\n    plugins: [\n      {\n        name: 'po-native-host-modules',\n        resolveId(source, importer) {\n          if (importer === undefined || !isBareSpecifier(source) || ui) return null;\n          if (HOST_MODULES.has(source)) return { id: source, external: true };\n          this.error(\n            `'${source}' imported by ${importer} is not a native host module; a native plugin may import only: ${NATIVE_HOST_MODULE_IDS.join(', ')}.`,\n          );\n        },\n        renderChunk(code, _chunk, options) {\n          if (options.format === 'es') guard = nativeImportGuard(this.parse(code));\n          return null;\n        },\n      },\n    ],\n  });\n  try {\n    const esm = await bundle.generate({ format: 'es', codeSplitting: false, exports: 'named' });\n    const [entryChunk] = esm.output;\n    if (esm.output.length !== 1 || entryChunk.type !== 'chunk') throw new Error('A native module must be one JS file.');\n    // .mjs inputs force Node default-import semantics. Our require map instead supplies Metro modules.\n    const commonjs = await rolldown({\n      input: '\\0po-native-module.js',\n      platform: 'neutral',\n      external: (id) => HOST_MODULES.has(id),\n      plugins: [\n        {\n          name: 'po-native-commonjs',\n          resolveId: (id) => (id === '\\0po-native-module.js' ? id : null),\n          load: (id) => (id === '\\0po-native-module.js' ? entryChunk.code : null),\n        },\n      ],\n    });\n    let code: string;\n    try {\n      const { output } = await commonjs.generate({ format: 'cjs', codeSplitting: false, exports: 'named' });\n      const [chunk] = output;\n      if (output.length !== 1 || chunk.type !== 'chunk') throw new Error('A native module must be one JS file.');\n      code = chunk.code;\n    } finally {\n      await commonjs.close();\n    }\n    const source = guard + code;\n    const bytes = Buffer.byteLength(source);\n    if (bytes > NATIVE_COMPOSITION_MAX_BYTES)\n      throw new Error(\n        `The native plugin is ${String(bytes)} bytes, over the ${String(NATIVE_COMPOSITION_MAX_BYTES)} byte limit.`,\n      );\n    return source;\n  } finally {\n    await bundle.close();\n  }\n}\n\n/**\n * Bundles each plugin into `<outDir>/plugins/<hash>.js` and returns `pluginId -> module file`. A plugin\n * that fails to bundle is named in a notice and left out; the build fails only when none bundles.\n */\nasync function bundleNativePlugins(\n  plugins: readonly DeclaredWebPlugin[],\n  outDir: string,\n  onNotice: (message: string) => void,\n): Promise<Record<string, string>> {\n  const pluginsDirectory = path.join(outDir, PLUGINS_DIRECTORY);\n  await fs.mkdir(pluginsDirectory, { recursive: true });\n  const entries: Record<string, string> = {};\n  const failures: string[] = [];\n  const bundled = new Set<string>();\n  for (const plugin of plugins) {\n    if (bundled.has(plugin.pluginId)) continue;\n    bundled.add(plugin.pluginId);\n    try {\n      const file = pluginModuleFile(plugin.pluginId);\n      await fs.writeFile(\n        path.join(pluginsDirectory, file),\n        await bundleNativeModule(path.join(plugin.packageDir, plugin.client.entry), false, onNotice),\n      );\n      entries[plugin.pluginId] = file;\n    } catch (error) {\n      const message = `native plugin '${plugin.pluginId}' could not be built: ${error instanceof Error ? error.message : String(error)}`;\n      failures.push(message);\n      onNotice(message);\n    }\n  }\n  if (Object.keys(entries).length === 0) throw new Error(failures.join('\\n'));\n  return entries;\n}\n\n/** Whether the global native build for these plugin roots exists, for a check that must not build. */\nexport async function readGlobalNativeBuildStatus(\n  input: GlobalNativeBuildInput,\n): Promise<\n  | { status: 'current' | 'missing'; key: string }\n  | { status: 'skipped'; reason: string }\n  | { status: 'failed'; reason: string }\n> {\n  const resolved = await resolveGlobalNativeBuild(input);\n  if (resolved.status !== 'resolved') return resolved;\n  return {\n    status: (await readBuildRecord(resolved.directory, input.files)) === undefined ? 'missing' : 'current',\n    key: resolved.key,\n  };\n}\n\n/**\n * Ensures the one global native build for the given plugin roots exists and returns it.\n *\n * The output is `<home>/build/native/<key>/plugins/<hash>.js`, one module per plugin, built in a\n * temporary directory and renamed into place; an existing key builds nothing.\n */\nexport async function ensureGlobalNativeBuild(input: GlobalNativeBuildInput): Promise<GlobalNativeBuildResult> {\n  const notice = input.onNotice ?? ((): void => {});\n  const resolved = await resolveGlobalNativeBuild(input);\n  if (resolved.status !== 'resolved') return resolved;\n  const { plugins, key, buildsRoot, directory, uiEntry } = resolved;\n  const existing = await readBuildRecord(directory, input.files);\n  if (existing !== undefined) return { status: 'cached', build: existing };\n  return singleFlightBuild(key, async (): Promise<GlobalNativeBuildResult> => {\n    try {\n      await buildKeyDirectory(buildsRoot, key, directory, async (temporary) => {\n        const pluginEntries = await bundleNativePlugins(plugins, temporary, notice);\n        const uiFile = 'ui.js';\n        const uiSource = await bundleNativeModule(uiEntry, true, notice);\n        await fs.writeFile(path.join(temporary, PLUGINS_DIRECTORY, uiFile), uiSource);\n        notice(`native UI module: ${String(Buffer.byteLength(uiSource))} bytes`);\n        return {\n          key,\n          pluginEntries,\n          uiEntry: uiFile,\n          plugins: plugins.map(({ pluginId, packageDir, isHost }) => ({ pluginId, packageDir, isHost })),\n        };\n      });\n      const build = await readBuildRecord(directory, input.files);\n      if (build === undefined) throw new Error(`The native build '${key}' was not recorded.`);\n      return { status: 'built', build };\n    } catch (error) {\n      return { status: 'failed', reason: error instanceof Error ? error.message : String(error) };\n    }\n  });\n}\n\n/** The `poNative.pluginId` values a mount runs: those of its own package roots. */\nexport const mountNativePluginIds: (build: GlobalNativeBuildRecord, packageRoots: readonly string[]) => string[] =\n  mountWebPluginIds;\n","//#region src/services/logSinkTelemetry/index.ts\nconst MAX_PENDING_EVENTS = 64;\nconst SERVICE_NAME = \"po\";\nconst PACKAGE_NAME = \"@agimon-ai/po\";\nconst HARNESS_EVENT = {\n\tcliFailed: \"po_pi.cli_failed\",\n\tcontextBuildFailed: \"po_pi.context_build_failed\",\n\tresourceCollectionFailed: \"po_pi.resource_collection_failed\",\n\tconfigLoadFailed: \"po_pi.config_load_failed\",\n\tlaunchFailed: \"po_pi.launch_failed\",\n\tcompatibilityLaunchFailed: \"po_pi.compatibility_launch_failed\",\n\tharnessStateParseFailed: \"po_pi.harness_state_parse_failed\",\n\thookFailed: \"po_pi.hook_failed\",\n\thookRegistryReadFailed: \"po_pi.hook_registry_read_failed\",\n\tpersonaReadFailed: \"po_pi.persona_read_failed\",\n\tstyleSystemRenderFailed: \"po_pi.style_system_render_failed\",\n\tmajorModeUnavailable: \"po_pi.major_mode_unavailable\",\n\tprofileLoadFailed: \"po_pi.profile_load_failed\",\n\tlaunchCompleted: \"po_pi.launch_completed\",\n\tprojectTrustResolved: \"po_pi.project_trust_resolved\",\n\tmajorModeSwitched: \"po_pi.major_mode_switched\",\n\tprofileApplied: \"po_pi.profile_applied\"\n};\nfunction createHarnessTelemetry(options = {}) {\n\tlet telemetryPromise;\n\tconst pendingEvents = [];\n\tlet pendingEventDropReported = false;\n\tconst telemetry = () => {\n\t\ttelemetryPromise ??= import(\"./src/services/poTelemetry/index.mjs\").then(({ createPoTelemetry }) => createPoTelemetry({\n\t\t\tserviceName: SERVICE_NAME,\n\t\t\tpackageName: PACKAGE_NAME,\n\t\t\tcwd: options.cwd,\n\t\t\tworkspaceRoot: options.workspaceRoot,\n\t\t\tenv: options.env,\n\t\t\ttelemetryFactory: options.telemetryFactory,\n\t\t\twarn: options.warn,\n\t\t\tenableLogs: true,\n\t\t\tenableTraces: true\n\t\t}));\n\t\treturn telemetryPromise;\n\t};\n\tconst drainEvents = async (loaded) => {\n\t\tfor (const pending of pendingEvents.splice(0)) await loaded.recordEvent(pending.event, pending.attributes);\n\t};\n\treturn {\n\t\trecordError: async (event, error, attributes) => {\n\t\t\tconst loaded = await telemetry();\n\t\t\tawait drainEvents(loaded);\n\t\t\tawait loaded.recordError(event, error, attributes);\n\t\t},\n\t\trecordWarning: async (event, error, attributes) => {\n\t\t\tconst loaded = await telemetry();\n\t\t\tawait drainEvents(loaded);\n\t\t\tawait loaded.recordWarning(event, error, attributes);\n\t\t},\n\t\trecordEvent: async (event, attributes) => {\n\t\t\tif (options.deferSpans && !telemetryPromise) {\n\t\t\t\tif (pendingEvents.length < MAX_PENDING_EVENTS) pendingEvents.push({\n\t\t\t\t\tevent,\n\t\t\t\t\tattributes\n\t\t\t\t});\n\t\t\t\telse if (!pendingEventDropReported) {\n\t\t\t\t\tpendingEventDropReported = true;\n\t\t\t\t\ttry {\n\t\t\t\t\t\t(options.warn ?? ((message) => console.warn(message)))(\"Po telemetry deferred event limit reached; later events were dropped.\");\n\t\t\t\t\t} catch {}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait (await telemetry()).recordEvent(event, attributes);\n\t\t},\n\t\trunInSpan: (name, attributes, callback) => {\n\t\t\tif (options.deferSpans && !telemetryPromise) return callback();\n\t\t\treturn telemetry().then((loaded) => loaded.runInSpan(name, attributes, callback));\n\t\t},\n\t\tflush: async () => {\n\t\t\tif (!telemetryPromise && pendingEvents.length === 0) return;\n\t\t\tconst loaded = await telemetry();\n\t\t\tawait drainEvents(loaded);\n\t\t\tawait loaded.flush();\n\t\t},\n\t\tshutdown: async () => {\n\t\t\tif (!telemetryPromise && pendingEvents.length === 0) return;\n\t\t\tconst loaded = await telemetry();\n\t\t\tawait drainEvents(loaded);\n\t\t\tawait loaded.shutdown();\n\t\t}\n\t};\n}\nfunction toFailureReporter(telemetry) {\n\treturn {\n\t\terror: (event, error, attributes) => void telemetry.recordError(event, error, attributes),\n\t\twarn: (event, error, attributes) => void telemetry.recordWarning(event, error, attributes)\n\t};\n}\n//#endregion\nexport { HARNESS_EVENT, createHarnessTelemetry, toFailureReporter };\n\n//# sourceMappingURL=runtimeLogSinkTelemetry.mjs.map","import {\n  HARNESS_STATE_KEYS,\n  projectHarnessEnvironment,\n  readHarnessState as readSharedHarnessState,\n} from '@agimon-ai/po-config/harnessState';\nimport {\n  createHarnessSession,\n  getHarnessState as getSharedHarnessState,\n  HARNESS_STATE_POINTER,\n  harnessRoot,\n  loadHarnessState,\n  requireHarnessPaths,\n  requireHarnessRoot,\n  resetHarnessStore,\n  restoreHarnessStateSnapshot,\n  snapshotHarnessState,\n  updateHarnessState as updateSharedHarnessState,\n} from '@agimon-ai/po-config/harnessStore';\nimport type { HarnessState } from '@agimon-ai/po-config/types';\nimport { HARNESS_EVENT, type HarnessFailureReporter } from '@agimon-ai/po-core/runtimeLogSinkTelemetry';\n\nexport type { HarnessStateTransactionSnapshot } from '@agimon-ai/po-config/harnessStore';\nexport type { PoHarnessContext, HarnessState } from '@agimon-ai/po-config/types';\nexport {\n  createHarnessSession,\n  HARNESS_STATE_KEYS,\n  HARNESS_STATE_POINTER,\n  harnessRoot,\n  loadHarnessState,\n  projectHarnessEnvironment,\n  requireHarnessPaths,\n  requireHarnessRoot,\n  resetHarnessStore,\n  restoreHarnessStateSnapshot,\n  snapshotHarnessState,\n};\n\nfunction telemetryReporter(report?: HarnessFailureReporter): ((key: string, error: unknown) => void) | undefined {\n  if (!report) return undefined;\n  return (key, error) => {\n    report.warn(HARNESS_EVENT.harnessStateParseFailed, error, { 'harness.state.key': key });\n  };\n}\n\nexport function readHarnessState(\n  environment: NodeJS.ProcessEnv = process.env,\n  report?: HarnessFailureReporter,\n): HarnessState {\n  return readSharedHarnessState(environment, telemetryReporter(report));\n}\n\nexport function getHarnessState(report?: HarnessFailureReporter): HarnessState {\n  return getSharedHarnessState(telemetryReporter(report));\n}\n\n/**\n * Re-reads the state, dropping what this process had cached.\n *\n * The store caches for the life of a process because nothing else writes the\n * file it owns. A test suite and a Pi reload are the two places that outlive\n * that assumption, so both come through here.\n */\nexport function refreshHarnessState(report?: HarnessFailureReporter): HarnessState {\n  resetHarnessStore();\n  return getHarnessState(report);\n}\n\nexport function updateHarnessState(\n  patch: Partial<HarnessState>,\n  environment: NodeJS.ProcessEnv = process.env,\n): HarnessState {\n  return updateSharedHarnessState(patch, environment);\n}\n","import fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport http from \"node:http\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\n//#region src/services/runtimePackages/index.ts\n/** The build ships a pinned, scoped resolver correction inside the published dist. */\nasync function compatibleUpm() {\n\tlet directory = path.dirname(fileURLToPath(import.meta.url));\n\twhile (!await fs.access(path.join(directory, \"package.json\")).then(() => true, () => false)) {\n\t\tconst parent = path.dirname(directory);\n\t\tif (parent === directory) throw new Error(\"Cannot locate the Po core package.\");\n\t\tdirectory = parent;\n\t}\n\treturn import(pathToFileURL(path.join(directory, \"dist/vendor/upm/index.mjs\")).href);\n}\n/**\n* Runtime packages: what Po installs at run time (layer packages, npm plugins)\n* goes through upm into a directory under Po's home, never through a spawned\n* package manager.\n*\n* Every call passes the store explicitly as `<po home>/store`; upm would\n* otherwise fall back to `UPM_STORE` and then `~/.upm/store`.\n*\n* Proxies: Node's env proxy (`NODE_USE_ENV_PROXY=1` or `--use-env-proxy`) only\n* covers upm's registry worker threads when it is present at process start.\n* When a proxy variable is set without it, this module installs the proxy at\n* run time with `http.setGlobalProxyFromEnv()`, which covers the main thread\n* only, and so asks upm to read the registry on the main thread\n* (`experimental.resolvePool: 0`).\n*\n* Certificates: a private CA is supplied the usual Node ways, with\n* `NODE_EXTRA_CA_CERTS` or `--use-system-ca`. Whether either reaches upm's\n* worker threads is not verified.\n*/\n/** Days a newly picked version must have been published, matching `pnpm-workspace.yaml`. */\nconst RUNTIME_MIN_RELEASE_AGE_DAYS = 2;\n/**\n* Packages that are never held back: the first-party scopes and the pins `pnpm-workspace.yaml`\n* excludes by version. upm only honours name or scope entries, so the pins are listed by name.\n*/\nconst RUNTIME_MIN_RELEASE_AGE_EXCLUDE = [\n\t\"@agimon-ai/*\",\n\t\"@agiflowai/*\",\n\t\"@earendil-works/*\",\n\t\"@deepseek-ai/cordis\",\n\t\"@deepseek-ai/cosmokit\"\n];\nconst STORE_DIRECTORY = \"store\";\nconst ENV_PROXY_FLAG = \"--use-env-proxy\";\nconst ENV_PROXY_ENABLED = \"1\";\nconst PROXY_VARIABLES = [\n\t\"HTTPS_PROXY\",\n\t\"https_proxy\",\n\t\"HTTP_PROXY\",\n\t\"http_proxy\"\n];\nconst NO_PROXY_VARIABLES = [\"NO_PROXY\", \"no_proxy\"];\n/** Whether Node's env proxy was on when the process started, recorded once at module load. */\nconst startedWithEnvProxy = process.env.NODE_USE_ENV_PROXY === ENV_PROXY_ENABLED || process.execArgv.includes(ENV_PROXY_FLAG) || (process.env.NODE_OPTIONS ?? \"\").split(/\\s+/).includes(ENV_PROXY_FLAG);\n/** The proxy settings last installed with `setGlobalProxyFromEnv`, so a repeat call keeps the pool. */\nlet appliedProxySettings;\nfunction proxySettings() {\n\tconst proxies = PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? \"\");\n\tif (!proxies.some(Boolean)) return void 0;\n\treturn [...proxies, ...NO_PROXY_VARIABLES.map((name) => process.env[name]?.trim() ?? \"\")].join(\"\\n\");\n}\nfunction runtimeProxyMode() {\n\tif (startedWithEnvProxy) return \"startup\";\n\treturn proxySettings() === void 0 ? \"none\" : \"runtime\";\n}\n/** Installs the runtime proxy when needed and returns the upm tuning that keeps traffic on it. */\nfunction proxyTuning(log) {\n\tif (startedWithEnvProxy) return void 0;\n\tconst settings = proxySettings();\n\tif (settings === void 0) return void 0;\n\tif (settings !== appliedProxySettings) {\n\t\tif (typeof http.setGlobalProxyFromEnv === \"function\") {\n\t\t\thttp.setGlobalProxyFromEnv();\n\t\t\tappliedProxySettings = settings;\n\t\t} else log?.(\"this Node.js has no http.setGlobalProxyFromEnv; start it with NODE_USE_ENV_PROXY=1\", \"warn\");\n\t}\n\treturn { resolvePool: 0 };\n}\nfunction runtimeStoreDirectory(poHome) {\n\treturn path.join(poHome, STORE_DIRECTORY);\n}\n/** Installs the dependency set `<dir>/package.json` declares. */\nasync function installRuntimePackages(options) {\n\tconst { install } = await compatibleUpm();\n\treturn install({\n\t\tdir: options.dir,\n\t\tstore: runtimeStoreDirectory(options.poHome),\n\t\tminReleaseAge: 2,\n\t\tminReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n\t\tpreferOffline: options.preferOffline,\n\t\toffline: options.offline,\n\t\tregistry: options.registry,\n\t\tlog: options.log,\n\t\texperimental: proxyTuning(options.log)\n\t});\n}\n/** The newest version of a package that the release-age policy allows. */\nasync function resolveNewest(name, options) {\n\tproxyTuning(options.log);\n\tconst specOptions = {\n\t\tdir: options.dir,\n\t\tstore: runtimeStoreDirectory(options.poHome),\n\t\tminReleaseAge: 2,\n\t\tminReleaseAgeExclude: [...RUNTIME_MIN_RELEASE_AGE_EXCLUDE],\n\t\tlog: options.log\n\t};\n\tconst { resolve } = await compatibleUpm();\n\tconst [manifest] = await resolve([name], specOptions);\n\tif (!manifest?.version) throw new Error(`The registry reported no version for ${name}.`);\n\treturn manifest.version;\n}\n/** Drops stale project entries under `dir` and store content no package index references. */\nasync function pruneRuntimePackages(options) {\n\tconst { prune } = await compatibleUpm();\n\treturn prune({\n\t\tdir: options.dir,\n\t\tstore: runtimeStoreDirectory(options.poHome),\n\t\tlog: options.log\n\t});\n}\n//#endregion\nexport { RUNTIME_MIN_RELEASE_AGE_DAYS, RUNTIME_MIN_RELEASE_AGE_EXCLUDE, installRuntimePackages, pruneRuntimePackages, resolveNewest, runtimeProxyMode, runtimeStoreDirectory };\n\n//# sourceMappingURL=runtimePackages.mjs.map","import crypto from 'node:crypto';\nimport fs from 'node:fs/promises';\nimport os from 'node:os';\nimport path from 'node:path';\nimport zlib from 'node:zlib';\n\nimport { isLocalPackageSpecifier, type MajorModesConfig } from '@agimon-ai/po-config/majorModes';\nimport { consumerPackageEntry, splitPackageSpecifier, testPackageRoot } from '@agimon-ai/po-core/moduleResolution';\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { BACKGROUND_CONTEXT, writeFileAtomic } from '@agimon-ai/po-core/platform';\nimport {\n  installRuntimePackages,\n  type InstallRuntimePackagesOptions,\n  resolveNewest,\n} from '@agimon-ai/po-core/runtimePackages';\nimport { poHomeDirectory, poRuntimeDirectory } from '@agimon-ai/po-core/runtimePiSettings';\n\nimport { poPackageRoot } from '../../builders/cli/entryResolution';\nimport { createLayerResolvers, type ExtensionLayerResolvers } from '../../builders/cli/extensionAssembler';\n\nconst NPM_SOURCE_PREFIX = 'npm:';\nconst FILE_SPECIFIER_PREFIX = 'file:';\nconst WORKSPACE_SPECIFIER_PREFIX = 'workspace:';\n/** Root target of a staged catalogue archive: always the staged workspace, never the registry. */\nconst CATALOG_WORKSPACE_TARGET = 'workspace:*';\n/** Where catalogue archives are unpacked inside the runtime, one directory per archive hash. */\nconst CATALOG_STAGING_DIRECTORY = 'catalog';\nconst RUNTIME_PACKAGE_NAME = 'po-runtime';\nconst UNPINNED_PACKAGE_RANGE = '*';\nconst PACKAGE_MANIFEST = 'package.json';\nconst NODE_MODULES = 'node_modules';\nconst PACKAGE_CATALOG_ENV = 'PO_PACKAGE_CATALOG';\n/** The registry catalogue a release writes into the CLI package: `<package root>/dist/catalog/index.json`. */\nconst BUNDLED_CATALOG_SEGMENTS = ['dist', 'catalog', 'index.json'] as const;\n/** upm error codes that mean the registry could not be reached, so the store may still answer. */\nconst NETWORK_FAILURE_CODES = new Set(['ENETWORK', 'ETIMEDOUT', 'EREGISTRY']);\n\nfunction overridePackageName(selector: string): string {\n  const separatorIndex = selector.indexOf('@', selector.startsWith('@') ? 1 : 0);\n  return separatorIndex === -1 ? selector : selector.slice(0, separatorIndex);\n}\n\n/**\n * Runtime compatibility pins and same-major patches for current foundation packages.\n * Package managers only honor overrides from the install root, so published extensions\n * cannot carry these fixes in their own manifests.\n */\nexport const SAFE_TRANSITIVE_OVERRIDES = {\n  // ponytail: Pin for Pi 1.4.0's declaration API; advance with the host's Pi version.\n  '@earendil-works/pi-codemode': '1.4.0',\n  '@hono/node-server@2.0.0 - 2.0.9': '^2.0.10',\n  '@opentelemetry/core@2.0.0 - 2.7.999': '2.8.0',\n  'brace-expansion@1.0.0 - 1.1.20': '^1.1.21',\n  'brace-expansion@5.0.0 - 5.0.11': '^5.0.12',\n  'hono@4.0.0 - 4.13.7': '4.13.8',\n  'js-yaml@4.0.0 - 4.3.1': '^4.3.2',\n  'js-yaml@5.0.0 - 5.2.1': '^5.2.2',\n  'liquidjs@10.0.0 - 10.27.1': '^10.27.2',\n  'protobufjs@8.0.0 - 8.7.1': '^8.7.2',\n  'undici@7.0.0 - 7.29.0': '^7.29.1',\n} as const satisfies Readonly<Record<string, string>>;\n\nconst SAFE_TRANSITIVE_PACKAGE_NAMES = new Set(Object.keys(SAFE_TRANSITIVE_OVERRIDES).map(overridePackageName));\n\nexport interface EnsureLayerPackagesOptions {\n  /**\n   * The Po root whose layers name the packages. Its own node_modules chain is\n   * resolved first; what it cannot provide is installed into the one runtime\n   * every root shares, `<po home>/runtime`.\n   */\n  repoRoot: string;\n  config: MajorModesConfig;\n  layers: readonly string[];\n  environment?: NodeJS.ProcessEnv;\n  /**\n   * Move every managed package to its newest published version.\n   *\n   * Launch installs what a selection needs and nothing more, so a session never\n   * pays for a registry round trip. Sync is the explicit maintenance command and\n   * is the only caller that asks for this.\n   */\n  refresh?: boolean;\n  /**\n   * Packages installed into the runtime whatever the root resolves itself, such as the\n   * catalogue's `install` list. A `name@version` specifier pins that exact version; a\n   * catalogue archive for the name still wins. Refresh never moves a pinned name.\n   */\n  specifiers?: readonly string[];\n  /**\n   * Make the runtime manifest declare exactly this run's packages (the specifiers, the\n   * selected names and their catalogue dependencies), so pruning can drop anything else.\n   * Without it the manifest only grows.\n   */\n  exactManifest?: boolean;\n  /** Receives one human-readable line per package decision. */\n  onProgress?: (message: string) => void;\n}\n\nexport interface LayerPackageInstallerDependencies {\n  /** Install seam; the default installs `<po home>/runtime` with upm. */\n  install?: (options: InstallRuntimePackagesOptions) => Promise<unknown>;\n  resolvers?: ExtensionLayerResolvers;\n  /** Registry lookup seam; the default resolves the newest allowed version with upm. */\n  publishedVersion?: (name: string) => Promise<string>;\n}\n\n/** One managed package moving from the installed version to the newest published one. */\nexport interface LayerPackageUpdate {\n  name: string;\n  from: string;\n  to: string;\n}\n\nexport interface LayerPackageResult {\n  /** Sources installed because a configured extension could not be resolved. */\n  installed: string[];\n  /** Packages this run moved to a newer published version. */\n  updated: LayerPackageUpdate[];\n  /** Packages left at the installed version because the registry could not be read. */\n  unchecked: string[];\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n  return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction recordValue(value: unknown): Record<string, unknown> {\n  return isRecord(value) ? { ...value } : {};\n}\n\nfunction withoutConflictingTransitiveOverrides(value: unknown): Record<string, unknown> {\n  const overrides = recordValue(value);\n  for (const [selector, replacement] of Object.entries(overrides)) {\n    if (SAFE_TRANSITIVE_PACKAGE_NAMES.has(overridePackageName(selector))) {\n      delete overrides[selector];\n    } else if (isRecord(replacement)) {\n      overrides[selector] = withoutConflictingTransitiveOverrides(replacement);\n    }\n  }\n  return overrides;\n}\n\n/** Earlier versions overrode catalog packages with relative `file:` targets; any other override is not Po's. */\nfunction withoutCatalogOverrides(overrides: Record<string, unknown>): Record<string, unknown> {\n  return Object.fromEntries(\n    Object.entries(overrides).filter(\n      ([, replacement]) => !(typeof replacement === 'string' && replacement.startsWith(FILE_SPECIFIER_PREFIX)),\n    ),\n  );\n}\n\n/** The published (non-local, required) package specifiers the default and the given layers name. */\nfunction configuredPackageSpecifiers(config: MajorModesConfig, layers: readonly string[]): string[] {\n  const specifiers = new Set<string>();\n  const selectedDefinitions = [\n    ...(config.default ? [config.default] : []),\n    ...layers.map((layerName) => {\n      const layer = config.layers[layerName];\n      if (!layer) throw new Error(`Unknown layer: ${layerName}`);\n      return layer;\n    }),\n  ];\n  for (const layer of selectedDefinitions) {\n    for (const configured of layer.packages ?? []) {\n      const specifier = typeof configured === 'string' ? configured : configured.name;\n      const optional = typeof configured !== 'string' && configured.optional === true;\n      if (!optional && !isLocalPackageSpecifier(specifier)) specifiers.add(specifier);\n    }\n  }\n  return [...specifiers];\n}\n\nfunction resolvePackageEntries(resolvers: ExtensionLayerResolvers, specifier: string): string[] | undefined {\n  const entries = resolvers.optionalPackageEntries?.(specifier);\n  if (entries !== undefined) return entries;\n  const entry = resolvers.optionalPackageEntry(specifier);\n  return entry ? [entry] : undefined;\n}\n\nasync function readRuntimeManifest(\n  manifestPath: string,\n): Promise<{ current: string | undefined; manifest: Record<string, unknown> }> {\n  const current = await fs.readFile(manifestPath, 'utf8').catch((error: NodeJS.ErrnoException) => {\n    if (error.code === 'ENOENT') return undefined;\n    throw error;\n  });\n  if (current === undefined) return { current, manifest: { name: RUNTIME_PACKAGE_NAME, private: true } };\n  const parsed: unknown = JSON.parse(current);\n  if (!isRecord(parsed)) throw new Error(`Po runtime package manifest at ${manifestPath} must be a JSON object.`);\n  return { current, manifest: parsed };\n}\n\n/** Names the runtime manifest already declares: what earlier runs, from any root, installed there. */\nasync function declaredRuntimePackages(runtimeDirectory: string): Promise<Set<string>> {\n  const manifestPath = path.join(runtimeDirectory, PACKAGE_MANIFEST);\n  return new Set(Object.keys(recordValue((await readRuntimeManifest(manifestPath)).manifest.dependencies)));\n}\n\n/**\n * Adds a package set and the patched transitive policy to the shared runtime manifest.\n *\n * `targets` pins names to exact versions or `workspace:*`. `catalogWorkspaces` maps each\n * staged catalogue archive's name to its directory relative to the runtime; the manifest\n * lists exactly those directories as its `workspaces`, so a catalogue package's dependency\n * on another one links the staged copy instead of reaching the registry. Both `overrides` and\n * `pnpm.overrides` are written; upm reads both.\n * With `exact`, declared names outside `sources` are dropped instead of kept.\n */\nexport async function ensureManagedPackageManifest(\n  runtimeDirectory: string,\n  sources: readonly string[],\n  targets: ReadonlyMap<string, string> = new Map(),\n  catalogWorkspaces: Readonly<Record<string, string>> = {},\n  exact = false,\n): Promise<boolean> {\n  const manifestPath = path.join(runtimeDirectory, PACKAGE_MANIFEST);\n  const { current, manifest } = await readRuntimeManifest(manifestPath);\n\n  const declared = recordValue(manifest.dependencies);\n  const sourceNames = new Set(sources.map(packageName));\n  const dependencies = exact\n    ? Object.fromEntries(Object.entries(declared).filter(([name]) => sourceNames.has(name)))\n    : declared;\n  // Every root shares this manifest, so a catalog archive another process staged (a desktop\n  // build, say) may not exist for this one: without a staged copy here it falls back to the\n  // registry, which keeps the whole set installable. `file:` targets are what earlier\n  // versions wrote for archives.\n  for (const [name, declared] of Object.entries(dependencies)) {\n    if (Object.hasOwn(catalogWorkspaces, name)) {\n      dependencies[name] = CATALOG_WORKSPACE_TARGET;\n    } else if (\n      typeof declared === 'string' &&\n      (declared.startsWith(FILE_SPECIFIER_PREFIX) || declared.startsWith(WORKSPACE_SPECIFIER_PREFIX))\n    ) {\n      dependencies[name] = UNPINNED_PACKAGE_RANGE;\n    }\n  }\n  for (const source of sources) {\n    const name = packageName(source);\n    const target = targets.get(name);\n    // An exact target is what makes an update reach the store: a package manager keeps a\n    // locked version whenever the recorded range still admits it.\n    if (target !== undefined) dependencies[name] = target;\n    else if (!Object.hasOwn(dependencies, name)) dependencies[name] = UNPINNED_PACKAGE_RANGE;\n  }\n  manifest.dependencies = dependencies;\n  // Po owns the runtime's workspaces: exactly the staged archives, which reach only each other.\n  const workspaces = Object.values(catalogWorkspaces).sort();\n  if (workspaces.length > 0) manifest.workspaces = workspaces;\n  else delete manifest.workspaces;\n  // Nested and overlapping consumer rules can take precedence in cases that retain\n  // vulnerable versions, so Po owns these package-specific selectors recursively.\n  manifest.overrides = {\n    ...withoutCatalogOverrides(withoutConflictingTransitiveOverrides(manifest.overrides)),\n    ...SAFE_TRANSITIVE_OVERRIDES,\n  };\n  const pnpm = recordValue(manifest.pnpm);\n  pnpm.overrides = {\n    ...withoutCatalogOverrides(withoutConflictingTransitiveOverrides(pnpm.overrides)),\n    ...SAFE_TRANSITIVE_OVERRIDES,\n  };\n  manifest.pnpm = pnpm;\n\n  const serialized = `${JSON.stringify(manifest, null, 2)}\\n`;\n  if (serialized === current) return false;\n  await fs.mkdir(runtimeDirectory, { recursive: true });\n  await writeFileAtomic(createNodePlatform().env(runtimeDirectory), manifestPath, serialized, BACKGROUND_CONTEXT);\n  return true;\n}\n\n/** Finds required npm packages selected by defaults and active layers that Po cannot resolve. */\nexport function missingLayerPackageSpecifiers(\n  config: MajorModesConfig,\n  layers: readonly string[],\n  resolvers: ExtensionLayerResolvers,\n): string[] {\n  return configuredPackageSpecifiers(config, layers).filter(\n    (specifier) => resolvePackageEntries(resolvers, specifier) === undefined,\n  );\n}\n\n/** Whether `root`'s own node_modules chain holds the package, walked the way Node looks it up from `root`. */\nasync function ownsPackage(name: string, root: string): Promise<boolean> {\n  for (let directory = path.resolve(root); ; directory = path.dirname(directory)) {\n    if (\n      await fs.access(path.join(directory, NODE_MODULES, name, PACKAGE_MANIFEST)).then(\n        () => true,\n        (error: NodeJS.ErrnoException) => {\n          if (error.code === 'ENOENT') return false;\n          throw error;\n        },\n      )\n    )\n      return true;\n    if (path.dirname(directory) === directory) return false;\n  }\n}\n\n/**\n * The required npm packages the default and the given layers name that `root` does not get\n * from its own node_modules chain: what the shared runtime provides for it, whether it does so\n * already or not yet. Sync declares exactly these, over every root, in the runtime manifest; a\n * name the runtime already provides still counts, or the next exact manifest would drop it.\n */\nexport async function runtimeLayerPackageSpecifiers(\n  config: MajorModesConfig,\n  layers: readonly string[],\n  root: string,\n): Promise<string[]> {\n  const specifiers = configuredPackageSpecifiers(config, layers);\n  const owned = await Promise.all(\n    specifiers.map((specifier) => ownsPackage(splitPackageSpecifier(specifier).name, root)),\n  );\n  return specifiers.filter((_specifier, index) => !owned[index]);\n}\n\nfunction packageName(source: string): string {\n  const specifier = source.startsWith(NPM_SOURCE_PREFIX) ? source.slice(NPM_SOURCE_PREFIX.length) : source;\n  if (specifier.startsWith('@')) {\n    const slash = specifier.indexOf('/');\n    const version = slash === -1 ? -1 : specifier.indexOf('@', slash);\n    return version === -1 ? specifier : specifier.slice(0, version);\n  }\n  const version = specifier.indexOf('@');\n  return version === -1 ? specifier : specifier.slice(0, version);\n}\n\ninterface PackageCatalogEntry {\n  /** Absolute path of the bundled archive; it takes precedence over `version`. */\n  archive?: string;\n  /** Exact registry version, pinned when the entry has no archive. */\n  version?: string;\n  dependencies: readonly string[];\n}\n\ninterface PackageCatalog {\n  packages: ReadonlyMap<string, PackageCatalogEntry>;\n  /** Feature packages Po installs out of the box, by name. */\n  install: readonly string[];\n}\n\nconst EMPTY_CATALOG: PackageCatalog = { packages: new Map(), install: [] };\n\nfunction stringList(value: unknown): string[] | undefined {\n  if (!Array.isArray(value)) return undefined;\n  const strings = value.filter((item): item is string => typeof item === 'string');\n  return strings.length === value.length ? strings : undefined;\n}\n\nfunction defaultBundledCatalogPath(): string | undefined {\n  try {\n    return path.join(poPackageRoot(), ...BUNDLED_CATALOG_SEGMENTS);\n  } catch {\n    // A bundle with no locatable Po package root has no bundled catalogue to read.\n    return undefined;\n  }\n}\n\n/**\n * The first catalogue present: `PO_PACKAGE_CATALOG` (desktop's archives), then the one\n * a release bundles into the CLI. With neither, the runtime installs only what roots name.\n */\nasync function packageCatalogPath(environment: NodeJS.ProcessEnv): Promise<string | undefined> {\n  const configured = environment[PACKAGE_CATALOG_ENV]?.trim();\n  if (configured) return configured;\n  const bundledCatalogPath = defaultBundledCatalogPath();\n  if (bundledCatalogPath === undefined) return undefined;\n  return fs.access(bundledCatalogPath).then(\n    () => bundledCatalogPath,\n    (error: NodeJS.ErrnoException) => {\n      if (error.code === 'ENOENT') return undefined;\n      throw error;\n    },\n  );\n}\n\nasync function readPackageCatalog(manifestPath: string | undefined): Promise<PackageCatalog> {\n  if (!manifestPath) return EMPTY_CATALOG;\n  const parsed: unknown = JSON.parse(await fs.readFile(manifestPath, 'utf8'));\n  if (!isRecord(parsed) || parsed.version !== 1 || !isRecord(parsed.packages)) {\n    throw new Error(`Unsupported Po package catalog: ${manifestPath}`);\n  }\n  const packages = new Map<string, PackageCatalogEntry>();\n  for (const [name, value] of Object.entries(parsed.packages)) {\n    if (\n      !isRecord(value) ||\n      !Array.isArray(value.dependencies) ||\n      (value.archive !== undefined && typeof value.archive !== 'string') ||\n      (value.version !== undefined && typeof value.version !== 'string') ||\n      (value.archive === undefined && value.version === undefined)\n    ) {\n      throw new Error(`Invalid package entry for ${name} in ${manifestPath}`);\n    }\n    const dependencies = stringList(value.dependencies);\n    if (!dependencies) throw new Error(`Invalid dependencies for ${name} in ${manifestPath}`);\n    const version = typeof value.version === 'string' ? value.version : undefined;\n    if (typeof value.archive !== 'string') {\n      packages.set(name, { version, dependencies });\n      continue;\n    }\n    const archive = path.resolve(path.dirname(manifestPath), value.archive);\n    await fs.access(archive).catch((error: NodeJS.ErrnoException) => {\n      if (error.code === 'ENOENT') throw new Error(`Po package catalog archive is missing: ${archive}`);\n      throw error;\n    });\n    packages.set(name, { archive, version, dependencies });\n  }\n  const install = parsed.install === undefined ? [] : stringList(parsed.install);\n  if (!install) throw new Error(`Invalid install list in ${manifestPath}`);\n  const unknown = install.filter((name) => !packages.has(name));\n  if (unknown.length > 0) throw new Error(`Po package catalog installs unlisted package(s): ${unknown.join(', ')}`);\n  return { packages, install };\n}\n\n/**\n * The catalogue's `install` list as exact `name@version` specifiers for\n * `EnsureLayerPackagesOptions.specifiers`; empty when no catalogue is present.\n */\nexport async function catalogInstallSpecifiers(environment: NodeJS.ProcessEnv = process.env): Promise<string[]> {\n  const catalog = await readPackageCatalog(await packageCatalogPath(environment));\n  return catalog.install.map((name) => {\n    const version = catalog.packages.get(name)?.version;\n    return version ? `${name}@${version}` : name;\n  });\n}\n\n/**\n * The installed package roots of the catalogue's `install` list, resolved the way a root\n * resolves a bare name (its own node_modules, then the shared runtime). The global web build\n * covers them, so every first-party plugin has a slot; a name not installed yet is left out.\n */\nexport async function catalogPackageRoots(\n  globalRoot: string,\n  environment: NodeJS.ProcessEnv = process.env,\n): Promise<string[]> {\n  const roots: string[] = [];\n  for (const name of (await readPackageCatalog(await packageCatalogPath(environment))).install) {\n    const manifest = consumerPackageEntry(`${name}/${PACKAGE_MANIFEST}`, globalRoot, environment);\n    if (manifest !== undefined) roots.push(path.dirname(await fs.realpath(manifest)));\n  }\n  return roots;\n}\n\n/** SHA-256 of the catalogue file in use, or `none` when no catalogue is present. */\nexport async function packageCatalogHash(environment: NodeJS.ProcessEnv = process.env): Promise<string> {\n  const catalogPath = await packageCatalogPath(environment);\n  if (!catalogPath) return 'none';\n  return crypto\n    .createHash('sha256')\n    .update(await fs.readFile(catalogPath))\n    .digest('hex');\n}\n\n/** Exact target per catalogue name: its staged workspace for an archive, else its registry version. */\nfunction catalogTargets(catalog: PackageCatalog): Map<string, string> {\n  return new Map(\n    [...catalog.packages].flatMap(([name, entry]) => {\n      if (entry.archive !== undefined) return [[name, CATALOG_WORKSPACE_TARGET] as const];\n      return entry.version !== undefined ? [[name, entry.version] as const] : [];\n    }),\n  );\n}\n\nconst TAR_BLOCK_SIZE = 512;\nconst TAR_EXECUTABLE_BITS = 0o111;\n\nfunction tarString(block: Buffer, start: number, length: number): string {\n  const field = block.subarray(start, start + length);\n  const end = field.indexOf(0);\n  return field.subarray(0, end === -1 ? field.length : end).toString('utf8');\n}\n\nfunction tarNumber(block: Buffer, start: number, length: number): number {\n  const field = block.subarray(start, start + length);\n  // GNU base-256: the high bit of the first byte marks a big-endian binary number.\n  if ((field[0]! & 0x80) !== 0) return field.subarray(1).reduce((value, byte) => value * 256 + byte, field[0]! & 0x7f);\n  const text = tarString(block, start, length).trim();\n  return text === '' ? 0 : Number.parseInt(text, 8);\n}\n\n/** The `path` record of a pax extended header, if it has one. */\nfunction paxPath(data: Buffer): string | undefined {\n  let found: string | undefined;\n  let offset = 0;\n  while (offset < data.length) {\n    const space = data.indexOf(0x20, offset);\n    if (space === -1) break;\n    const length = Number.parseInt(data.subarray(offset, space).toString('utf8'), 10);\n    if (!Number.isFinite(length) || length <= 0) break;\n    const record = data.subarray(space + 1, offset + length - 1).toString('utf8');\n    const separator = record.indexOf('=');\n    if (record.slice(0, separator) === 'path') found = record.slice(separator + 1);\n    offset += length;\n  }\n  return found;\n}\n\n/**\n * Unpacks a gzipped npm package archive into `destination`, dropping the archive's top\n * directory (`package/`) as npm does. Only files and directories are written: npm package\n * archives carry no links, and an entry that would land outside `destination` is refused.\n */\nasync function extractPackageArchive(archive: string, destination: string): Promise<void> {\n  const data = zlib.gunzipSync(await fs.readFile(archive));\n  let offset = 0;\n  let nextPath: string | undefined;\n  while (offset + TAR_BLOCK_SIZE <= data.length) {\n    const header = data.subarray(offset, offset + TAR_BLOCK_SIZE);\n    if (header.every((byte) => byte === 0)) break;\n    const size = tarNumber(header, 124, 12);\n    const type = String.fromCharCode(header[156]!);\n    const body = data.subarray(offset + TAR_BLOCK_SIZE, offset + TAR_BLOCK_SIZE + size);\n    offset += TAR_BLOCK_SIZE + Math.ceil(size / TAR_BLOCK_SIZE) * TAR_BLOCK_SIZE;\n    if (type === 'x' || type === 'L') {\n      nextPath = type === 'x' ? (paxPath(body) ?? nextPath) : tarString(body, 0, body.length);\n      continue;\n    }\n    if (type === 'g') continue;\n    const prefix = tarString(header, 345, 155);\n    const name = nextPath ?? (prefix ? `${prefix}/${tarString(header, 0, 100)}` : tarString(header, 0, 100));\n    nextPath = undefined;\n    if (type !== '0' && type !== '\\0' && type !== '5') continue;\n    const relative = name.split('/').slice(1).join('/');\n    if (relative === '') continue;\n    const target = path.resolve(destination, relative);\n    if (!target.startsWith(`${destination}${path.sep}`)) {\n      throw new Error(`Po package catalog archive ${archive} has an entry outside the package: ${name}`);\n    }\n    if (type === '5') {\n      await fs.mkdir(target, { recursive: true });\n      continue;\n    }\n    await fs.mkdir(path.dirname(target), { recursive: true });\n    const executable = (tarNumber(header, 100, 8) & TAR_EXECUTABLE_BITS) !== 0;\n    await fs.writeFile(target, body, { mode: executable ? 0o755 : 0o644 });\n  }\n}\n\n/** Dependency fields of a staged manifest that may name another catalogue package. */\nconst STAGED_DEPENDENCY_FIELDS = ['dependencies', 'optionalDependencies', 'peerDependencies'] as const;\n\n/**\n * Unpacks one catalogue archive into `<runtime>/catalog/<hash>` and returns that directory\n * relative to the runtime, with the catalogue names its manifest depends on.\n *\n * upm only installs a package from a directory as a workspace: a `file:` archive takes its own\n * dependencies from the registry, so one catalogue archive could not depend on another. In the\n * staged manifest every dependency on another catalogue archive becomes `workspace:*`, so the\n * catalogue's copy wins whatever range the package declared, and `devDependencies`, which a\n * workspace would otherwise install, are dropped. The hash covers the archive bytes and the\n * catalogue's archive names, everything that rewrite reads, so a staged directory is reused.\n */\nasync function stageCatalogArchive(\n  runtimeDirectory: string,\n  archive: string,\n  archiveNames: ReadonlySet<string>,\n): Promise<{ relative: string; dependencies: string[] }> {\n  const hash = crypto\n    .createHash('sha256')\n    .update(await fs.readFile(archive))\n    .update(`\\0${[...archiveNames].sort().join('\\n')}`)\n    .digest('hex');\n  const relative = `${CATALOG_STAGING_DIRECTORY}/${hash}`;\n  const directory = path.join(runtimeDirectory, CATALOG_STAGING_DIRECTORY, hash);\n  const stagedManifest = path.join(directory, PACKAGE_MANIFEST);\n  const existing = await fs.readFile(stagedManifest, 'utf8').catch((error: NodeJS.ErrnoException) => {\n    if (error.code === 'ENOENT') return undefined;\n    throw error;\n  });\n  if (existing === undefined) {\n    const temporary = `${directory}.${String(process.pid)}.${crypto.randomUUID()}.tmp`;\n    try {\n      await extractPackageArchive(archive, temporary);\n      const manifestPath = path.join(temporary, PACKAGE_MANIFEST);\n      const bytes = await fs.readFile(manifestPath, 'utf8').catch((error: NodeJS.ErrnoException) => {\n        if (error.code === 'ENOENT') throw new Error(`Po package catalog archive has no package.json: ${archive}`);\n        throw error;\n      });\n      const manifest: unknown = JSON.parse(bytes);\n      if (!isRecord(manifest)) throw new Error(`Po package catalog archive has an invalid package.json: ${archive}`);\n      delete manifest.devDependencies;\n      for (const field of STAGED_DEPENDENCY_FIELDS) {\n        if (!isRecord(manifest[field])) continue;\n        const declared = { ...manifest[field] };\n        for (const name of Object.keys(declared)) {\n          if (archiveNames.has(name)) declared[name] = CATALOG_WORKSPACE_TARGET;\n        }\n        manifest[field] = declared;\n      }\n      await fs.writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\\n`);\n      try {\n        await fs.rename(temporary, directory);\n      } catch (error) {\n        // Another process staged the same bytes first; its copy is identical.\n        await fs.access(stagedManifest).catch(() => {\n          throw error;\n        });\n      }\n    } finally {\n      await fs.rm(temporary, { recursive: true, force: true });\n    }\n  }\n  const staged = recordValue(JSON.parse(existing ?? (await fs.readFile(stagedManifest, 'utf8'))));\n  const dependencies = STAGED_DEPENDENCY_FIELDS.flatMap((field) => Object.keys(recordValue(staged[field])));\n  return { relative, dependencies: dependencies.filter((name) => archiveNames.has(name)) };\n}\n\n/**\n * Stages the archive of every named catalogue package and of every catalogue package those\n * name in turn, since a staged manifest's `workspace:*` needs that workspace present. The\n * result, name to staged directory, feeds `ensureManagedPackageManifest`.\n */\nasync function stageCatalogArchives(\n  runtimeDirectory: string,\n  catalog: PackageCatalog,\n  names: Iterable<string>,\n): Promise<Record<string, string>> {\n  const archiveNames = new Set(\n    [...catalog.packages].flatMap(([name, entry]) => (entry.archive === undefined ? [] : [name])),\n  );\n  const staged: Record<string, string> = {};\n  const pending = [...names].filter((name) => archiveNames.has(name));\n  while (pending.length > 0) {\n    const name = pending.shift()!;\n    if (Object.hasOwn(staged, name)) continue;\n    const { relative, dependencies } = await stageCatalogArchive(\n      runtimeDirectory,\n      catalog.packages.get(name)!.archive!,\n      archiveNames,\n    );\n    staged[name] = relative;\n    pending.push(...dependencies);\n  }\n  return staged;\n}\n\n/**\n * Removes staged archives the runtime manifest no longer lists as workspaces, and returns their\n * folder names. An install never calls this: a running server imports from these folders (its\n * `.po-snapshots` live there), so sync prunes them under the same gate as the runtime store.\n */\nexport async function pruneStagedCatalogArchives(runtimeDirectory: string): Promise<string[]> {\n  const stagingDirectory = path.join(runtimeDirectory, CATALOG_STAGING_DIRECTORY);\n  const entries = await fs.readdir(stagingDirectory).catch((error: NodeJS.ErrnoException) => {\n    if (error.code === 'ENOENT') return [];\n    throw error;\n  });\n  const { manifest } = await readRuntimeManifest(path.join(runtimeDirectory, PACKAGE_MANIFEST));\n  const kept = new Set((stringList(manifest.workspaces) ?? []).map((relative) => path.basename(relative)));\n  return Promise.all(\n    entries\n      .filter((entry) => !kept.has(entry))\n      .map(async (entry) => {\n        await fs.rm(path.join(stagingDirectory, entry), { recursive: true, force: true });\n        return entry;\n      }),\n  );\n}\n\n/** Splits `name@version` (scoped or not); the version is absent for a bare name or subpath. */\nfunction splitVersionedSpecifier(specifier: string): { name: string; version?: string } {\n  const separator = specifier.indexOf('@', specifier.startsWith('@') ? 1 : 0);\n  if (separator === -1) return { name: splitPackageSpecifier(specifier).name };\n  return { name: specifier.slice(0, separator), version: specifier.slice(separator + 1) };\n}\n\nfunction npmSources(\n  specifiers: readonly string[],\n  catalog: PackageCatalog,\n  targets: ReadonlyMap<string, string>,\n  includeCatalogDependencies = false,\n): string[] {\n  const names = [...new Set(specifiers.map((specifier) => splitPackageSpecifier(specifier).name))];\n  if (includeCatalogDependencies) {\n    for (let index = 0; index < names.length; index += 1) {\n      for (const dependency of catalog.packages.get(names[index]!)?.dependencies ?? []) {\n        if (!names.includes(dependency)) names.push(dependency);\n      }\n    }\n  }\n  return names.map((name) => {\n    const target = targets.get(name);\n    return `${NPM_SOURCE_PREFIX}${name}${target ? `@${target}` : ''}`;\n  });\n}\n\nfunction pluralize(count: number, noun: string): string {\n  return `${count} ${noun}${count === 1 ? '' : 's'}`;\n}\n\n/** Version of a package inside the shared runtime, absent when Po did not install it there. */\nasync function managedPackageVersion(runtimeDirectory: string, name: string): Promise<string | undefined> {\n  const manifestPath = path.join(runtimeDirectory, NODE_MODULES, name, PACKAGE_MANIFEST);\n  try {\n    const parsed: unknown = JSON.parse(await fs.readFile(manifestPath, 'utf8'));\n    return isRecord(parsed) && typeof parsed.version === 'string' ? parsed.version : undefined;\n  } catch {\n    // An unreadable manifest carries the same meaning as an absent one: nothing\n    // usable is installed, so the caller treats the package as uninstalled.\n    return undefined;\n  }\n}\n\nfunction errorCode(error: unknown): unknown {\n  return typeof error === 'object' && error !== null ? (error as { code?: unknown }).code : undefined;\n}\n\n/**\n * Installs the runtime, and when the registry cannot be reached installs it again offline:\n * an unchanged lockfile whose packages the store already holds needs no network.\n */\nasync function installWithOfflineRetry(\n  install: NonNullable<LayerPackageInstallerDependencies['install']>,\n  options: InstallRuntimePackagesOptions,\n  onProgress: ((message: string) => void) | undefined,\n): Promise<void> {\n  try {\n    await install(options);\n  } catch (error) {\n    const code = errorCode(error);\n    if (typeof code !== 'string' || !NETWORK_FAILURE_CODES.has(code)) throw error;\n    onProgress?.(`the registry is unreachable (${code}); installing offline from the store`);\n    try {\n      await install({ ...options, preferOffline: false, offline: true });\n    } catch {\n      // The offline attempt only ever narrows the original failure: the network error\n      // explains why the install could not complete, an EOFFLINE miss does not.\n      throw error;\n    }\n  }\n}\n\ninterface CheckedPackage {\n  name: string;\n  from: string;\n  to?: string;\n  failure?: string;\n}\n\n/**\n * Compares every package sync installed against the registry.\n *\n * Only the shared runtime is consulted: a package that resolves from the\n * repository's own modules is not sync's to move, and a package that is not\n * installed yet is already covered by the missing-package path.\n */\nasync function resolveUpdates(\n  runtimeDirectory: string,\n  sources: readonly string[],\n  publishedVersion: (name: string) => Promise<string>,\n  onProgress: ((message: string) => void) | undefined,\n): Promise<Pick<LayerPackageResult, 'updated' | 'unchecked'>> {\n  const managed = (\n    await Promise.all(\n      sources.map(async (source) => ({\n        name: packageName(source),\n        from: await managedPackageVersion(runtimeDirectory, packageName(source)),\n      })),\n    )\n  ).filter((entry): entry is { name: string; from: string } => entry.from !== undefined);\n  const checked: CheckedPackage[] = await Promise.all(\n    managed.map(async (entry) => {\n      try {\n        return { ...entry, to: await publishedVersion(entry.name) };\n      } catch (error) {\n        return { ...entry, failure: (error instanceof Error ? error.message : String(error)).split('\\n')[0] };\n      }\n    }),\n  );\n\n  const updated: LayerPackageUpdate[] = [];\n  const unchecked: string[] = [];\n  for (const entry of checked) {\n    if (entry.to === undefined) {\n      unchecked.push(entry.name);\n      onProgress?.(`kept ${entry.name} ${entry.from}: ${entry.failure ?? 'no published version'}`);\n      continue;\n    }\n    if (entry.to === entry.from) continue;\n    updated.push({ name: entry.name, from: entry.from, to: entry.to });\n    onProgress?.(`${entry.name} ${entry.from} -> ${entry.to}`);\n  }\n  return { updated, unchecked };\n}\n\n/**\n * Installs the selected layer packages a root cannot resolve into the shared runtime,\n * `<po home>/runtime`, and verifies they now resolve.\n *\n * The runtime manifest is the union of what every root asked for. A root adds the\n * packages it is missing; a package it already resolves from its own node_modules stays\n * out unless an earlier run put it there. One name has one version: an exact target\n * (a sync update, a catalog archive or registry pin) replaces the declared range, last\n * writer wins, and a plain `*` never replaces a range already declared.\n *\n * `specifiers` and `exactManifest` only add behaviour: without them, and without a\n * catalogue, a run behaves as it always has.\n */\nexport async function ensureLayerPackages(\n  options: EnsureLayerPackagesOptions,\n  dependencies: LayerPackageInstallerDependencies = {},\n): Promise<LayerPackageResult> {\n  const environment = options.environment ?? process.env;\n  const homeDirectory = environment.HOME ?? os.homedir();\n  const poHome = poHomeDirectory(homeDirectory, environment);\n  const runtimeDirectory = poRuntimeDirectory(homeDirectory, environment);\n  const resolvers = dependencies.resolvers ?? createLayerResolvers(options.repoRoot, environment);\n  const external = (specifier: string): boolean => testPackageRoot(packageName(specifier), environment) === undefined;\n  const configured = configuredPackageSpecifiers(options.config, options.layers).filter(external);\n  const missing = configured.filter((specifier) => resolvePackageEntries(resolvers, specifier) === undefined);\n  const declared = await declaredRuntimePackages(runtimeDirectory);\n  const managed = configured.filter(\n    (specifier) => missing.includes(specifier) || declared.has(splitPackageSpecifier(specifier).name),\n  );\n  const requested = (options.specifiers ?? []).filter(external).map(splitVersionedSpecifier);\n  if (managed.length === 0 && requested.length === 0 && options.exactManifest !== true) {\n    return { installed: [], updated: [], unchecked: [] };\n  }\n\n  const catalog = await readPackageCatalog(await packageCatalogPath(environment));\n  const pins = catalogTargets(catalog);\n  for (const { name, version } of requested) {\n    if (version !== undefined && catalog.packages.get(name)?.archive === undefined) pins.set(name, version);\n  }\n  // A requested package is missing until the runtime holds it at the version it is pinned to.\n  const requestedMissing: string[] = [];\n  for (const { name, version } of requested) {\n    const installed = await managedPackageVersion(runtimeDirectory, name);\n    const entry = catalog.packages.get(name);\n    const expected = entry?.archive === undefined ? version : entry.version;\n    if (installed === undefined || (expected !== undefined && installed !== expected)) requestedMissing.push(name);\n  }\n  const missingSources = npmSources([...missing, ...requestedMissing], catalog, pins);\n  const sources = npmSources([...managed, ...requested.map(({ name }) => name)], catalog, pins, true).filter(external);\n  const missingCount = missing.length + requestedMissing.length;\n\n  // Refresh never moves a pinned name: catalogue entries and versioned specifiers stay put.\n  const fixedNames = new Set([\n    ...catalog.packages.keys(),\n    ...requested.filter(({ version }) => version !== undefined).map(({ name }) => name),\n  ]);\n  const registrySources = sources.filter((source) => !fixedNames.has(packageName(source)));\n  const { updated, unchecked } = options.refresh\n    ? await resolveUpdates(\n        runtimeDirectory,\n        registrySources,\n        dependencies.publishedVersion ?? ((name) => resolveNewest(name, { dir: runtimeDirectory, poHome })),\n        options.onProgress,\n      )\n    : { updated: [], unchecked: [] };\n  const targets = new Map(\n    sources.flatMap((source) => {\n      const target = pins.get(packageName(source));\n      return target ? [[packageName(source), target] as const] : [];\n    }),\n  );\n  for (const update of updated) targets.set(update.name, update.to);\n  // A kept manifest still declares names earlier runs added; their archives are staged too.\n  const stagedNames = new Set([...sources.map(packageName), ...(options.exactManifest === true ? [] : declared)]);\n  const staged = await stageCatalogArchives(runtimeDirectory, catalog, stagedNames);\n  const manifestChanged = await ensureManagedPackageManifest(\n    runtimeDirectory,\n    sources,\n    targets,\n    staged,\n    options.exactManifest === true,\n  );\n  if (missingCount === 0 && !manifestChanged) return { installed: [], updated: [], unchecked };\n\n  options.onProgress?.(\n    `installing ${\n      updated.length > 0\n        ? pluralize(updated.length, 'update')\n        : missingCount > 0\n          ? pluralize(missingCount, 'missing package')\n          : 'the package manifest'\n    }`,\n  );\n  try {\n    // One install reconciles the complete dependency set written to package.json.\n    await installWithOfflineRetry(\n      dependencies.install ?? installRuntimePackages,\n      {\n        dir: runtimeDirectory,\n        poHome,\n        // A launch never waits on registry revalidation; sync is the command that refreshes.\n        preferOffline: options.refresh !== true,\n        log: (message, level) => {\n          if (level === 'warn') options.onProgress?.(message);\n        },\n      },\n      options.onProgress,\n    );\n  } catch (error) {\n    const attempted = manifestChanged ? sources : missingSources;\n    throw new Error(\n      `Failed to reconcile Po layer package(s): ${attempted.join(', ')}: ${error instanceof Error ? error.message : String(error)}`,\n      { cause: error },\n    );\n  }\n\n  const unresolved = missing.filter((specifier) => !resolvePackageEntries(resolvers, specifier)?.length);\n  if (unresolved.length > 0) {\n    throw new Error(\n      `Installed Po layer package(s) did not expose the configured Pi extension: ${unresolved.join(', ')}`,\n    );\n  }\n  return { installed: missingSources, updated, unchecked };\n}\n\n/** One selector per name in the shared runtime. Caller holds the sync lock throughout. */\nexport async function ensureRuntimeImportPackage(\n  name: string,\n  version: string,\n  options: { homeDirectory: string; environment: Readonly<Record<string, string | undefined>> },\n): Promise<void> {\n  const environment = { ...options.environment, HOME: options.homeDirectory };\n  const poHome = poHomeDirectory(options.homeDirectory, environment);\n  const directory = poRuntimeDirectory(options.homeDirectory, environment);\n  const manifestPath = path.join(directory, PACKAGE_MANIFEST);\n  const { manifest } = await readRuntimeManifest(manifestPath);\n  const declared = recordValue(manifest.dependencies);\n  const imports = recordValue(manifest.poCodemodeDependencies);\n  const imported = recordValue(imports[name]);\n  const catalog = await readPackageCatalog(await packageCatalogPath(environment));\n  if (catalog.packages.has(name) || (Object.hasOwn(declared, name) && declared[name] !== imported.selector)) {\n    throw new Error(\n      `Cannot import ${name}: Po manages this runtime dependency (${JSON.stringify(declared[name] ?? 'catalogue')}).`,\n    );\n  }\n  if (Object.hasOwn(imports, name) && imported.selector !== version) {\n    throw new Error(`Cannot import ${name}@${version}: the hub already uses ${name}@${String(imported.selector)}.`);\n  }\n  const installed = await managedPackageVersion(directory, name);\n  if (declared[name] === version && installed !== undefined && imported.resolved === installed) return;\n  // Only a successful reconciliation is cacheable, not the manifest upm writes ahead of a failed install.\n  manifest.poCodemodeDependencies = { ...imports, [name]: { selector: version } };\n  await writeFileAtomic(\n    createNodePlatform().env(directory),\n    manifestPath,\n    `${JSON.stringify(manifest, null, 2)}\\n`,\n    BACKGROUND_CONTEXT,\n  );\n  const pins = new Map([[name, version]]);\n  const sources = npmSources([`${name}@${version}`], catalog, pins, true);\n  const staged = await stageCatalogArchives(\n    directory,\n    catalog,\n    new Set([...sources.map(packageName), ...Object.keys(declared)]),\n  );\n  await ensureManagedPackageManifest(directory, sources, pins, staged);\n  await installWithOfflineRetry(installRuntimePackages, { dir: directory, poHome, preferOffline: true }, undefined);\n  const resolved = await managedPackageVersion(directory, name);\n  if (resolved === undefined) throw new Error(`Runtime import ${name}@${version} was not installed.`);\n  const reconciled = (await readRuntimeManifest(manifestPath)).manifest;\n  reconciled.poCodemodeDependencies = {\n    ...recordValue(reconciled.poCodemodeDependencies),\n    [name]: { selector: version, resolved },\n  };\n  await writeFileAtomic(\n    createNodePlatform().env(directory),\n    manifestPath,\n    `${JSON.stringify(reconciled, null, 2)}\\n`,\n    BACKGROUND_CONTEXT,\n  );\n}\n","import { SessionIdentityDoc, SessionMetadataDoc } from \"../durableSession/docs.mjs\";\nimport { DURABLE_BACKGROUND_CONTEXT } from \"../../../sqliteSessionStorage.mjs\";\nimport path from \"node:path\";\nimport { createSession } from \"@earendil-works/pi-durable\";\n//#region src/services/sqliteSessionHistory/index.ts\nfunction readSavedExecution(raw, owner) {\n\tif (typeof raw !== \"string\") return void 0;\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\treturn;\n\t}\n\tif (typeof parsed !== \"object\" || parsed === null) return void 0;\n\tconst record = parsed;\n\tif (typeof record.cwd !== \"string\" || !path.isAbsolute(record.cwd) || typeof record.repoRoot !== \"string\" || !path.isAbsolute(record.repoRoot) || record.repoRoot !== owner || typeof record.workspaceId !== \"string\" || record.workspaceId === \"\" || typeof record.groupingRoot !== \"string\" || !path.isAbsolute(record.groupingRoot)) return void 0;\n\tif (record.parentSessionId !== void 0 && typeof record.parentSessionId !== \"string\") return void 0;\n\tif (record.sessionProvenance !== void 0 && typeof record.sessionProvenance !== \"string\") return void 0;\n\tif (record.interaction !== void 0 && record.interaction !== \"interactive\" && record.interaction !== \"unattended\") return void 0;\n\treturn {\n\t\tcwd: record.cwd,\n\t\trepoRoot: record.repoRoot,\n\t\tworkspaceId: record.workspaceId,\n\t\tgroupingRoot: record.groupingRoot,\n\t\t...typeof record.parentSessionId === \"string\" ? { parentSessionId: record.parentSessionId } : {},\n\t\t...typeof record.sessionProvenance === \"string\" ? { sessionProvenance: record.sessionProvenance } : {},\n\t\t...record.interaction === void 0 ? {} : { interaction: record.interaction }\n\t};\n}\n/** The oldest user message of one conversation's fork-aware history older than `before`, read only up to it. */\nasync function firstUserEntry(storage, conversationId, before) {\n\tlet cursor;\n\tdo {\n\t\tconst page = await storage.scanEntries({\n\t\t\tconversationId,\n\t\t\torder: \"ascending\",\n\t\t\t...before === void 0 ? {} : { maxEntryId: before - 1 }\n\t\t}, 100, cursor, DURABLE_BACKGROUND_CONTEXT);\n\t\tfor (const entry of page.items) {\n\t\t\tconst message = entry.model?.find((item) => item.role === \"user\");\n\t\t\tif (message) return {\n\t\t\t\tid: entry.id,\n\t\t\t\tmessage\n\t\t\t};\n\t\t}\n\t\tcursor = page.next;\n\t} while (cursor);\n}\n/**\n* Lists the stored sessions the injected storage holds, read-only. One file that cannot be read is\n* skipped and handed to `onUnreadable`, so it never empties the rest of the history.\n*/\nasync function listSavedSessionRecords(sessions, workspaceRoot, activeSessionIds, workspaceId, onUnreadable) {\n\tconst result = [];\n\tfor (const { sessionId: id, updatedAt } of await sessions.list(DURABLE_BACKGROUND_CONTEXT)) {\n\t\tif (activeSessionIds.has(id)) continue;\n\t\tlet storage;\n\t\ttry {\n\t\t\tstorage = await sessions.openReadOnly(id, DURABLE_BACKGROUND_CONTEXT);\n\t\t} catch (error) {\n\t\t\tonUnreadable?.(id, error);\n\t\t\tcontinue;\n\t\t}\n\t\tconst session = createSession(storage);\n\t\ttry {\n\t\t\tconst identity = await session.snapshot(SessionIdentityDoc, DURABLE_BACKGROUND_CONTEXT);\n\t\t\tif (!identity || identity.id !== id) throw new Error(\"Durable session identity mismatch\");\n\t\t\tconst metadata = await session.snapshot(SessionMetadataDoc, DURABLE_BACKGROUND_CONTEXT);\n\t\t\tif (!metadata?.workspaceRoot) continue;\n\t\t\tconst execution = readSavedExecution(metadata.execution, metadata.workspaceRoot);\n\t\t\tif (!execution || execution.groupingRoot !== workspaceRoot || workspaceId && execution.workspaceId !== workspaceId) continue;\n\t\t\tlet first;\n\t\t\tlet conversationCursor;\n\t\t\tdo {\n\t\t\t\tconst conversations = await storage.scanConversations({}, 100, conversationCursor, DURABLE_BACKGROUND_CONTEXT);\n\t\t\t\tfor (const conversation of conversations.items) {\n\t\t\t\t\tif (conversation.owner) continue;\n\t\t\t\t\tfirst = await firstUserEntry(storage, conversation.id, first?.id) ?? first;\n\t\t\t\t}\n\t\t\t\tconversationCursor = conversations.next;\n\t\t\t} while (conversationCursor);\n\t\t\tconst content = first?.message.content;\n\t\t\tconst firstMessage = typeof content === \"string\" ? content : Array.isArray(content) ? content.filter((part) => part.type === \"text\").map((part) => part.text).join(\"\\n\") : \"\";\n\t\t\tresult.push({\n\t\t\t\tsummary: {\n\t\t\t\t\tid,\n\t\t\t\t\t...metadata.name ? { name: metadata.name } : {},\n\t\t\t\t\tfirstMessage,\n\t\t\t\t\tcreatedAt: new Date(identity.createdAt).toISOString(),\n\t\t\t\t\tupdatedAt: new Date(updatedAt).toISOString()\n\t\t\t\t},\n\t\t\t\texecution\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tonUnreadable?.(id, error);\n\t\t} finally {\n\t\t\tawait session.close(DURABLE_BACKGROUND_CONTEXT);\n\t\t}\n\t}\n\treturn result.sort((a, b) => b.summary.updatedAt.localeCompare(a.summary.updatedAt));\n}\n/** Public summaries do not expose private execution metadata. */\nasync function listSavedSessions(sessions, workspaceRoot, activeSessionIds, workspaceId, onUnreadable) {\n\treturn (await listSavedSessionRecords(sessions, workspaceRoot, activeSessionIds, workspaceId, onUnreadable)).map((record) => record.summary);\n}\n//#endregion\nexport { listSavedSessionRecords, listSavedSessions, readSavedExecution };\n\n//# sourceMappingURL=index.mjs.map","import { defineDoc } from \"@earendil-works/pi-durable\";\n//#region src/services/durableNavigation/docs.ts\n/**\n* External session identity is independent of the currently selected conversation. A fork's source is its\n* `ConversationRecord.parent`; stores written before that remain readable with an ignored `branches` field.\n*/\nconst DurableNavigationDoc = defineDoc({\n\tkind: \"po.navigation\",\n\tcheckpointWhen: () => false,\n\tversion: 1,\n\tscope: \"session\",\n\tinitial: () => ({ activeConversationId: null })\n});\n//#endregion\nexport { DurableNavigationDoc };\n\n//# sourceMappingURL=docs.mjs.map","import { IdentityHistoryDoc, SessionIdentityDoc, SessionMetadataDoc } from \"../durableSession/docs.mjs\";\nimport \"../../../sqliteSessionStorage.mjs\";\nimport { readSavedExecution } from \"../sqliteSessionHistory/index.mjs\";\nimport { DurableNavigationDoc } from \"../durableNavigation/docs.mjs\";\nimport { durableTranscriptLane, readTranscriptPage } from \"../transcriptPages/index.mjs\";\nimport { createSession } from \"@earendil-works/pi-durable\";\n//#region src/services/sqliteTranscriptReader/index.ts\n/** A stored session is read without admitting a writer or updating the schema. */\nasync function readSqliteTranscript(sessions, sessionId, request, context, ownership) {\n\tconst storage = await sessions.openReadOnly(sessionId, context);\n\tconst session = createSession(storage);\n\ttry {\n\t\tconst identity = await session.snapshot(SessionIdentityDoc, context);\n\t\tif (!identity || identity.id !== sessionId || ownership && identity.id !== ownership.sessionId) throw new Error(\"Saved transcript does not belong to this session\");\n\t\tif (ownership) {\n\t\t\tconst metadata = await session.snapshot(SessionMetadataDoc, context);\n\t\t\tconst execution = readSavedExecution(metadata?.execution, ownership.workspaceRoot);\n\t\t\tif (metadata?.workspaceRoot !== ownership.workspaceRoot || !execution || ownership.workspaceId !== void 0 && execution.workspaceId !== ownership.workspaceId || ownership.groupingRoot !== void 0 && execution.groupingRoot !== ownership.groupingRoot) throw new Error(\"Saved transcript does not belong to this workspace\");\n\t\t}\n\t\tconst conversationId = (await session.snapshot(DurableNavigationDoc, context))?.activeConversationId;\n\t\tconst laneName = (await session.snapshot(SessionMetadataDoc, context))?.laneName ?? \"main\";\n\t\treturn {\n\t\t\t...await readTranscriptPage({\n\t\t\t\tsessionId: identity.id,\n\t\t\t\tlaneName,\n\t\t\t\tlane: conversationId === null || conversationId === void 0 ? {\n\t\t\t\t\tfindEntries: async () => [],\n\t\t\t\t\treadIdentities: async () => void 0\n\t\t\t\t} : durableTranscriptLane((query, limit, cursor, scanContext) => storage.scanEntries({\n\t\t\t\t\tconversationId,\n\t\t\t\t\t...query\n\t\t\t\t}, limit, cursor, scanContext), (readContext) => session.snapshot(IdentityHistoryDoc, conversationId, readContext))\n\t\t\t}, request, 0, context),\n\t\t\trevision: 0\n\t\t};\n\t} finally {\n\t\tawait session.close(context);\n\t}\n}\n//#endregion\nexport { readSqliteTranscript };\n\n//# sourceMappingURL=index.mjs.map","import \"../platformFiles/index.mjs\";\nimport { createSerialRunner } from \"../serialRunner/index.mjs\";\n//#endregion\nexport { createOpenSessionRegistry } from \"./sync.mjs\";\nimport \"node:path\";\nimport \"@earendil-works/pi-durable/env\";\ncreateSerialRunner();\n\n//# sourceMappingURL=index.mjs.map","import path from \"node:path\";\n//#region src/services/workspaceRegistry/workspaceRecords.ts\nconst REGISTRY_FILE = \"workspaces.json\";\nconst GIT_DIRECTORY = \".git\";\nconst COMMON_DIRECTORY_FILE = \"commondir\";\n/** Kept in the repository's git data, which moves with the checkout and is shared by its worktrees. */\nconst WORKSPACE_MARKER_FILE = \"po-workspace-id\";\nfunction parseRecord(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return void 0;\n\tconst record = value;\n\tif (typeof record.id !== \"string\" || record.id === \"\") return void 0;\n\tif (typeof record.root !== \"string\" || !path.isAbsolute(record.root)) return void 0;\n\tconst name = typeof record.name === \"string\" && record.name.trim() !== \"\" ? record.name : void 0;\n\tconst sandbox = typeof record.sandbox === \"string\" && record.sandbox !== \"\" ? record.sandbox : void 0;\n\treturn {\n\t\tid: record.id,\n\t\troot: record.root,\n\t\t...name === void 0 ? {} : { name },\n\t\t...record.kind === \"session\" ? { kind: \"session\" } : {},\n\t\t...sandbox === void 0 ? {} : { sandbox },\n\t\t...typeof record.declaration === \"string\" && record.declaration.trim() !== \"\" ? { declaration: record.declaration } : {},\n\t\t...typeof record.repositoryId === \"string\" && record.repositoryId !== \"\" ? { repositoryId: record.repositoryId } : {},\n\t\t...typeof record.instructions === \"string\" ? { instructions: record.instructions } : {}\n\t};\n}\n/** Parses registry file text; unusable content is reported and dropped. */\nfunction parseWorkspaceRecords(raw, filePath, notice) {\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\tnotice(`workspaces at ${filePath} are not valid JSON; none will be restored`);\n\t\treturn [];\n\t}\n\tif (!Array.isArray(parsed)) {\n\t\tnotice(`workspaces at ${filePath} are not a list; none will be restored`);\n\t\treturn [];\n\t}\n\tconst records = [];\n\tfor (const entry of parsed) {\n\t\tconst record = parseRecord(entry);\n\t\tif (record === void 0) notice(`workspaces at ${filePath} contain an unusable entry; skipping it`);\n\t\telse if (!records.some((candidate) => candidate.id === record.id)) records.push(record);\n\t}\n\treturn records;\n}\nfunction serializeWorkspaceRecords(records) {\n\treturn `${JSON.stringify(records, void 0, 2)}\\n`;\n}\nfunction assertWorkspaceRecord(record) {\n\tif (record.id === \"\" || !path.isAbsolute(record.root)) throw new Error(\"Invalid workspace record.\");\n}\n/**\n* Replaced in place: registry order is the tie-break when checkouts are matched to workspaces. A record whose\n* optional metadata is undefined keeps the stored values, so rename, move and sync preserve workspace policy.\n*/\nfunction withWorkspaceRecord(latest, record) {\n\tconst merge = (held) => {\n\t\tconst merged = { ...record };\n\t\tfor (const key of [\n\t\t\t\"sandbox\",\n\t\t\t\"declaration\",\n\t\t\t\"repositoryId\",\n\t\t\t\"instructions\"\n\t\t]) if (record[key] === void 0 && held[key] !== void 0) merged[key] = held[key];\n\t\tif (record.kind === void 0 && held.kind !== void 0) merged.kind = held.kind;\n\t\treturn merged;\n\t};\n\treturn latest.some((held) => held.id === record.id) ? latest.map((held) => held.id === record.id ? merge(held) : held) : [...latest, record];\n}\n/** The records that run on this host: those without a sandbox provider. */\nfunction localWorkspaceRecords(records) {\n\treturn records.filter((record) => record.sandbox === void 0);\n}\n/** The records with the sandbox of `id` set or cleared, or undefined when `id` is not recorded. */\nfunction withWorkspaceSandbox(latest, id, sandbox) {\n\tif (!latest.some((held) => held.id === id)) return void 0;\n\treturn latest.map((held) => {\n\t\tif (held.id !== id) return held;\n\t\tconst { sandbox: _previous, ...rest } = held;\n\t\treturn sandbox === void 0 || sandbox === \"\" ? rest : {\n\t\t\t...rest,\n\t\t\tsandbox\n\t\t};\n\t});\n}\n/** The records with instructions set or cleared, or undefined when the id is not recorded. */\nfunction withWorkspaceInstructions(latest, id, instructions) {\n\tif (!latest.some((held) => held.id === id)) return void 0;\n\treturn latest.map((held) => {\n\t\tif (held.id !== id) return held;\n\t\tconst { instructions: _previous, ...rest } = held;\n\t\treturn instructions === void 0 || instructions === \"\" ? rest : {\n\t\t\t...rest,\n\t\t\tinstructions\n\t\t};\n\t});\n}\n/** The git directory named by a `.git` file's `gitdir:` line, relative paths resolved from the root. */\nfunction gitFileTarget(repositoryRoot, content) {\n\tconst match = /^gitdir:\\s*(.+)$/imu.exec(content.trim());\n\treturn match?.[1] ? path.resolve(repositoryRoot, match[1].trim()) : void 0;\n}\nfunction parseWorkspaceMarker(content) {\n\tconst id = content.trim();\n\treturn id === \"\" ? void 0 : id;\n}\n/**\n* Matches the requested declaration by root or marker membership without checking disk.\n* Root-only requests prefer undeclared records, then declared siblings in registry order.\n*/\nfunction matchWorkspace(input) {\n\tconst candidates = input.declaration === void 0 ? [...input.records.filter((record) => record.declaration === void 0), ...input.records.filter((record) => record.declaration !== void 0)] : input.records.filter((record) => record.declaration === input.declaration);\n\tconst exact = candidates.find((record) => record.root === input.checkoutRoot);\n\tif (exact !== void 0) return {\n\t\tkind: \"exact\",\n\t\trecord: exact\n\t};\n\tconst owner = input.marker === void 0 ? void 0 : candidates.find((record) => (record.repositoryId ?? record.id) === input.marker);\n\treturn owner === void 0 ? void 0 : {\n\t\tkind: \"owner\",\n\t\trecord: owner\n\t};\n}\n/** Completes an identity once the owner's root existence is known. */\nfunction resolveWorkspaceIdentity(input, match, ownerExists, randomId) {\n\tif (match?.kind === \"exact\") return {\n\t\tid: match.record.id,\n\t\troot: match.record.root,\n\t\tmoved: false\n\t};\n\tif (match?.kind === \"owner\") return ownerExists ? {\n\t\tid: match.record.id,\n\t\troot: match.record.root,\n\t\tmoved: false\n\t} : {\n\t\tid: match.record.id,\n\t\troot: input.checkoutRoot,\n\t\tmoved: true\n\t};\n\treturn {\n\t\tid: (input.declaration === void 0 ? input.marker : void 0) ?? (input.newId ?? randomId)(),\n\t\troot: input.checkoutRoot,\n\t\tmoved: false\n\t};\n}\n//#endregion\nexport { COMMON_DIRECTORY_FILE, GIT_DIRECTORY, REGISTRY_FILE, WORKSPACE_MARKER_FILE, assertWorkspaceRecord, gitFileTarget, localWorkspaceRecords, matchWorkspace, parseWorkspaceMarker, parseWorkspaceRecords, resolveWorkspaceIdentity, serializeWorkspaceRecords, withWorkspaceInstructions, withWorkspaceRecord, withWorkspaceSandbox };\n\n//# sourceMappingURL=workspaceRecords.mjs.map","import { COMMON_DIRECTORY_FILE, GIT_DIRECTORY, REGISTRY_FILE, WORKSPACE_MARKER_FILE, assertWorkspaceRecord, gitFileTarget, matchWorkspace, parseWorkspaceMarker, parseWorkspaceRecords, resolveWorkspaceIdentity, serializeWorkspaceRecords, withWorkspaceInstructions, withWorkspaceRecord, withWorkspaceSandbox } from \"./workspaceRecords.mjs\";\nimport crypto from \"node:crypto\";\nimport path from \"node:path\";\nimport fs from \"node:fs\";\n//#region src/services/workspaceRegistry/sync.ts\nfunction canonicalPath(target) {\n\tconst absolute = path.resolve(target);\n\ttry {\n\t\treturn fs.realpathSync.native(absolute);\n\t} catch {\n\t\tconst parent = path.dirname(absolute);\n\t\tif (parent === absolute) return absolute;\n\t\treturn path.join(canonicalPath(parent), path.basename(absolute));\n\t}\n}\nfunction readGitDirectory(repositoryRoot) {\n\tconst gitPath = path.join(repositoryRoot, GIT_DIRECTORY);\n\ttry {\n\t\tconst stat = fs.statSync(gitPath);\n\t\tif (stat.isDirectory()) return canonicalPath(gitPath);\n\t\tif (!stat.isFile()) return void 0;\n\t\tconst target = gitFileTarget(repositoryRoot, fs.readFileSync(gitPath, \"utf8\"));\n\t\treturn target === void 0 ? void 0 : canonicalPath(target);\n\t} catch {\n\t\treturn;\n\t}\n}\n/**\n* The git data directory shared by every worktree of a repository, if the root is a git checkout.\n*\n* @deprecated Node-only sync shim; use gitCommonDirectoryAsync. Removed in M2.\n*/\nfunction gitCommonDirectory(repositoryRoot) {\n\tconst gitDirectory = readGitDirectory(repositoryRoot);\n\tif (!gitDirectory) return void 0;\n\ttry {\n\t\tconst relative = fs.readFileSync(path.join(gitDirectory, COMMON_DIRECTORY_FILE), \"utf8\").trim();\n\t\treturn relative ? canonicalPath(path.resolve(gitDirectory, relative)) : gitDirectory;\n\t} catch {\n\t\treturn gitDirectory;\n\t}\n}\n/**\n* Durable workspace membership, independent of whether a workspace can currently mount.\n*\n* @deprecated Node-only sync shim; use createWorkspaceRegistryAsync. Removed in M2.\n*/\nfunction createWorkspaceRegistry(options) {\n\tconst notice = options.onNotice ?? (() => {});\n\tconst filePath = path.join(options.directory, REGISTRY_FILE);\n\tconst load = () => {\n\t\tlet raw;\n\t\ttry {\n\t\t\traw = fs.readFileSync(filePath, \"utf8\");\n\t\t} catch (error) {\n\t\t\tif (error instanceof Error && \"code\" in error && error.code === \"ENOENT\") return [];\n\t\t\tnotice(`${filePath} could not be read: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\treturn [];\n\t\t}\n\t\treturn parseWorkspaceRecords(raw, filePath, notice);\n\t};\n\tlet current = load();\n\tconst persist = (next) => {\n\t\tconst temporary = `${filePath}.${String(process.pid)}.tmp`;\n\t\ttry {\n\t\t\tfs.mkdirSync(options.directory, {\n\t\t\t\trecursive: true,\n\t\t\t\tmode: 448\n\t\t\t});\n\t\t\tfs.writeFileSync(temporary, serializeWorkspaceRecords(next), { mode: 384 });\n\t\t\tfs.renameSync(temporary, filePath);\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tfs.rmSync(temporary, { force: true });\n\t\t\t} catch (cleanupError) {\n\t\t\t\tnotice(`${temporary} could not be removed: ${cleanupError instanceof Error ? cleanupError.message : String(cleanupError)}`);\n\t\t\t}\n\t\t\tthrow new Error(`${filePath} could not be saved`, { cause: error });\n\t\t}\n\t};\n\treturn {\n\t\tlist: () => current,\n\t\tadd(record) {\n\t\t\tassertWorkspaceRecord(record);\n\t\t\tconst next = withWorkspaceRecord(load(), record);\n\t\t\tpersist(next);\n\t\t\tcurrent = next;\n\t\t},\n\t\tremove(id) {\n\t\t\tconst latest = load();\n\t\t\tconst next = latest.filter((held) => held.id !== id);\n\t\t\tif (next.length !== latest.length) persist(next);\n\t\t\tcurrent = next;\n\t\t},\n\t\tsetInstructions(id, instructions) {\n\t\t\tconst next = withWorkspaceInstructions(load(), id, instructions);\n\t\t\tif (next === void 0) return;\n\t\t\tpersist(next);\n\t\t\tcurrent = next;\n\t\t},\n\t\tsetSandbox(id, sandbox) {\n\t\t\tconst next = withWorkspaceSandbox(load(), id, sandbox);\n\t\t\tif (next === void 0) return;\n\t\t\tpersist(next);\n\t\t\tcurrent = next;\n\t\t}\n\t};\n}\n/**\n* The workspace id recorded in a checkout's git data, if any.\n*\n* @deprecated Node-only sync shim; use readWorkspaceMarkerAsync. Removed in M2.\n*/\nfunction readWorkspaceMarker(checkoutRoot) {\n\tconst commonDirectory = gitCommonDirectory(checkoutRoot);\n\tif (commonDirectory === void 0) return void 0;\n\ttry {\n\t\treturn parseWorkspaceMarker(fs.readFileSync(path.join(commonDirectory, WORKSPACE_MARKER_FILE), \"utf8\"));\n\t} catch (error) {\n\t\tif (error instanceof Error && \"code\" in error && error.code === \"ENOENT\") return void 0;\n\t\tthrow error;\n\t}\n}\n/**\n* Records a workspace id in a checkout's git data so the workspace keeps its id when the\n* repository moves. A checkout without git data has nowhere to keep it; returns false.\n*\n* @deprecated Node-only sync shim; use writeWorkspaceMarkerAsync. Removed in M2.\n*/\nfunction writeWorkspaceMarker(checkoutRoot, id) {\n\tconst commonDirectory = gitCommonDirectory(checkoutRoot);\n\tif (commonDirectory === void 0) return false;\n\tfs.writeFileSync(path.join(commonDirectory, WORKSPACE_MARKER_FILE), `${id}\\n`, { mode: 384 });\n\treturn true;\n}\n/**\n* Decides which workspace a checkout belongs to, respecting an optional declaration.\n* An exact root match wins, then shared marker membership. A checkout joins a matched\n* workspace whose root still exists, or replaces its missing root after a move.\n* Unmatched declarations get fresh ids rather than reusing another sibling's marker.\n*\n* @deprecated Node-only sync shim; use identifyWorkspaceAsync. Removed in M2.\n*/\nfunction identifyWorkspace(input) {\n\tconst match = matchWorkspace(input);\n\tconst exists = input.exists ?? fs.existsSync;\n\treturn resolveWorkspaceIdentity(input, match, match?.kind === \"owner\" && exists(match.record.root), crypto.randomUUID);\n}\n//#endregion\nexport { createWorkspaceRegistry, gitCommonDirectory, identifyWorkspace, readWorkspaceMarker, writeWorkspaceMarker };\n\n//# sourceMappingURL=sync.mjs.map","import \"../platformFiles/index.mjs\";\nimport { createSerialRunner } from \"../serialRunner/index.mjs\";\nimport { localWorkspaceRecords } from \"./workspaceRecords.mjs\";\nimport { createWorkspaceRegistry, identifyWorkspace, readWorkspaceMarker, writeWorkspaceMarker } from \"./sync.mjs\";\nimport \"node:crypto\";\nimport \"node:path\";\nimport \"@earendil-works/pi-durable/env\";\ncreateSerialRunner();\n//#endregion\nexport { createWorkspaceRegistry, identifyWorkspace, localWorkspaceRecords, readWorkspaceMarker, writeWorkspaceMarker };\n\n//# sourceMappingURL=index.mjs.map","import { defineDoc } from \"@earendil-works/pi-durable\";\n//#region src/services/durableRequestReceipts/docs.ts\nconst ReceiptsDoc = defineDoc({\n\tkind: \"po.request-receipts\",\n\tcheckpointWhen: () => false,\n\tversion: 1,\n\tscope: \"session\",\n\tinitial: () => ({ receipts: {} })\n});\n//#endregion\nexport { ReceiptsDoc };\n\n//# sourceMappingURL=docs.mjs.map","import { createHistoryOwnership } from \"../../../historyOwnership.mjs\";\nimport { DURABLE_BACKGROUND_CONTEXT, openSqliteSessionStorage } from \"../../../sqliteSessionStorage.mjs\";\nimport { ReceiptsDoc } from \"./docs.mjs\";\nimport { randomUUID } from \"node:crypto\";\n//#region src/services/durableRequestReceipts/index.ts\nconst RECEIPTS_SESSION_ID = \"request_receipts\";\nconst FINGERPRINT = /^[a-f0-9]{64}$/u;\nconst NAMESPACE = /^[a-z][a-z0-9.-]*$/u;\nconst MAX_RECEIPTS = 1024;\nfunction bounded(value, maximum) {\n\treturn typeof value === \"string\" && value.length > 0 && value.length <= maximum;\n}\nfunction address(key) {\n\tif (!bounded(key.namespace, 64) || !NAMESPACE.test(key.namespace) || !bounded(key.activationId, 256) || !bounded(key.requestId, 256)) throw new Error(\"Invalid request receipt address.\");\n\treturn JSON.stringify([\n\t\tkey.namespace,\n\t\tkey.activationId,\n\t\tkey.requestId\n\t]);\n}\nfunction storedReceipt(input, key) {\n\tif (typeof input !== \"object\" || input === null || Array.isArray(input)) throw new Error(\"Request receipt storage is corrupt.\");\n\tconst stored = JSON.parse(JSON.stringify(input));\n\tconst receipt = stored.receipt;\n\tif (stored.version !== 1 || !bounded(stored.token, 128) || typeof receipt !== \"object\" || receipt === null || receipt.namespace !== key.namespace || receipt.activationId !== key.activationId || receipt.requestId !== key.requestId || !bounded(receipt.destination, 512) || !bounded(receipt.transactionId, 256) || !FINGERPRINT.test(receipt.fingerprint) || ![\n\t\t\"reserved\",\n\t\t\"admitted\",\n\t\t\"rejected\",\n\t\t\"uncertain\"\n\t].includes(receipt.outcome)) throw new Error(\"Request receipt storage is corrupt.\");\n\treturn stored;\n}\n/** One native SQLite metadata history, independent of any selected agent session. */\nfunction createRequestReceipts(options) {\n\tconst ownership = createHistoryOwnership({ sourceFormat: \"sqlite\" });\n\tlet opened;\n\tlet closed = false;\n\tlet closing;\n\tconst operations = /* @__PURE__ */ new Set();\n\tconst session = async () => {\n\t\tif (closed) throw new Error(\"Request receipt storage is closed.\");\n\t\topened ??= openSqliteSessionStorage({\n\t\t\tsessionsRoot: options.directory,\n\t\t\tsessionId: RECEIPTS_SESSION_ID,\n\t\t\thistoryOwnership: ownership\n\t\t}, DURABLE_BACKGROUND_CONTEXT);\n\t\treturn (await opened).session;\n\t};\n\tconst operate = (callback) => {\n\t\tif (closed) return Promise.reject(/* @__PURE__ */ new Error(\"Request receipt storage is closed.\"));\n\t\tconst operation = session().then(callback);\n\t\toperations.add(operation);\n\t\toperation.then(() => operations.delete(operation), () => operations.delete(operation));\n\t\treturn operation;\n\t};\n\treturn {\n\t\treceipts: {\n\t\t\treserve(request) {\n\t\t\t\tconst receiptAddress = address(request);\n\t\t\t\tif (!FINGERPRINT.test(request.fingerprint) || !bounded(request.destination, 512) || !bounded(request.transactionId, 256)) throw new Error(\"Invalid request receipt reservation.\");\n\t\t\t\treturn operate((storage) => storage.commit(async (mutator) => {\n\t\t\t\t\tconst doc = await mutator.doc(ReceiptsDoc);\n\t\t\t\t\tconst existing = doc.receipts[receiptAddress];\n\t\t\t\t\tif (existing !== void 0) {\n\t\t\t\t\t\tconst prior = storedReceipt(existing, request).receipt;\n\t\t\t\t\t\treturn prior.fingerprint === request.fingerprint && prior.destination === request.destination && prior.transactionId === request.transactionId ? {\n\t\t\t\t\t\t\tkind: \"existing\",\n\t\t\t\t\t\t\treceipt: prior\n\t\t\t\t\t\t} : {\n\t\t\t\t\t\t\tkind: \"conflict\",\n\t\t\t\t\t\t\treceipt: prior\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tconst token = randomUUID();\n\t\t\t\t\tconst receipt = {\n\t\t\t\t\t\tnamespace: request.namespace,\n\t\t\t\t\t\tactivationId: request.activationId,\n\t\t\t\t\t\trequestId: request.requestId,\n\t\t\t\t\t\tfingerprint: request.fingerprint,\n\t\t\t\t\t\tdestination: request.destination,\n\t\t\t\t\t\ttransactionId: request.transactionId,\n\t\t\t\t\t\toutcome: \"reserved\"\n\t\t\t\t\t};\n\t\t\t\t\tdoc.receipts[receiptAddress] = JSON.parse(JSON.stringify({\n\t\t\t\t\t\tversion: 1,\n\t\t\t\t\t\treceipt,\n\t\t\t\t\t\ttoken\n\t\t\t\t\t}));\n\t\t\t\t\tconst older = Object.keys(doc.receipts).filter((key) => key !== receiptAddress);\n\t\t\t\t\tconst reserved = (key) => doc.receipts[key].receipt?.outcome === \"reserved\";\n\t\t\t\t\tconst excess = Math.max(0, older.length + 1 - (options.maxReceipts ?? MAX_RECEIPTS));\n\t\t\t\t\tfor (const key of [...older.filter((key) => !reserved(key)), ...older.filter(reserved)].slice(0, excess)) delete doc.receipts[key];\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkind: \"reserved\",\n\t\t\t\t\t\ttoken\n\t\t\t\t\t};\n\t\t\t\t}, DURABLE_BACKGROUND_CONTEXT));\n\t\t\t},\n\t\t\tlookup(key) {\n\t\t\t\tconst receiptAddress = address(key);\n\t\t\t\treturn operate(async (storage) => {\n\t\t\t\t\tconst existing = (await storage.snapshot(ReceiptsDoc, DURABLE_BACKGROUND_CONTEXT))?.receipts[receiptAddress];\n\t\t\t\t\treturn existing === void 0 ? void 0 : storedReceipt(existing, key).receipt;\n\t\t\t\t});\n\t\t\t},\n\t\t\tfinish(request) {\n\t\t\t\tconst receiptAddress = address(request);\n\t\t\t\tif (!bounded(request.token, 128) || ![\n\t\t\t\t\t\"admitted\",\n\t\t\t\t\t\"rejected\",\n\t\t\t\t\t\"uncertain\"\n\t\t\t\t].includes(request.outcome)) throw new Error(\"Invalid request receipt finish.\");\n\t\t\t\treturn operate((storage) => storage.commit(async (mutator) => {\n\t\t\t\t\tconst doc = await mutator.doc(ReceiptsDoc);\n\t\t\t\t\tconst existing = doc.receipts[receiptAddress];\n\t\t\t\t\tif (existing === void 0) throw new Error(\"Request receipt reservation does not exist.\");\n\t\t\t\t\tconst prior = storedReceipt(existing, request);\n\t\t\t\t\tif (prior.token !== request.token) throw new Error(\"Request receipt token does not match.\");\n\t\t\t\t\tif (prior.receipt.outcome === request.outcome) return prior.receipt;\n\t\t\t\t\tif (prior.receipt.outcome !== \"reserved\") throw new Error(\"Request receipt has already been finished.\");\n\t\t\t\t\tconst receipt = {\n\t\t\t\t\t\t...prior.receipt,\n\t\t\t\t\t\toutcome: request.outcome\n\t\t\t\t\t};\n\t\t\t\t\tdoc.receipts[receiptAddress] = JSON.parse(JSON.stringify({\n\t\t\t\t\t\t...prior,\n\t\t\t\t\t\treceipt\n\t\t\t\t\t}));\n\t\t\t\t\treturn receipt;\n\t\t\t\t}, DURABLE_BACKGROUND_CONTEXT));\n\t\t\t}\n\t\t},\n\t\tclose() {\n\t\t\tif (closing !== void 0) return closing;\n\t\t\tclosed = true;\n\t\t\tclosing = (async () => {\n\t\t\t\tawait Promise.allSettled(operations);\n\t\t\t\tif (opened === void 0) return;\n\t\t\t\tconst storage = await opened.catch(() => void 0);\n\t\t\t\tif (storage === void 0) return;\n\t\t\t\tconst errors = [];\n\t\t\t\ttry {\n\t\t\t\t\tawait storage.session.close(DURABLE_BACKGROUND_CONTEXT);\n\t\t\t\t} catch (error) {\n\t\t\t\t\terrors.push(error);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tawait storage.historyLease.release();\n\t\t\t\t} catch (error) {\n\t\t\t\t\terrors.push(error);\n\t\t\t\t}\n\t\t\t\tif (errors.length > 0) throw new AggregateError(errors, \"Request receipt storage failed to close.\");\n\t\t\t})();\n\t\t\treturn closing;\n\t\t}\n\t};\n}\n//#endregion\nexport { createRequestReceipts };\n\n//# sourceMappingURL=index.mjs.map","import { loadMajorModesConfig, resolveLayers } from '@agimon-ai/po-config/majorModes';\n\nimport { createLayerResolvers, type ExtensionComposition, resolveExtensionComposition } from './extensionAssembler';\n\n/**\n * Every composition a root's config can select, one per major mode.\n *\n * Resolved live, so a mode added to the config reaches the next read with no sync.\n */\nexport function rootCompositions(input: {\n  readonly root: string;\n  readonly homeDirectory: string;\n  readonly environment: NodeJS.ProcessEnv;\n  /** Leaves a package that does not resolve yet out with a diagnostic; see `ExtensionContext`. */\n  readonly tolerateUnsynced?: boolean;\n}): ExtensionComposition[] {\n  const config = loadMajorModesConfig(input.root, input.homeDirectory, input.environment);\n  const resolvers = createLayerResolvers(input.root, input.environment);\n  return Object.keys(config.majorMode).map((majorMode) =>\n    resolveExtensionComposition({\n      majorMode,\n      layers: resolveLayers(config, majorMode),\n      majorModesConfig: config,\n      resolvers,\n      ...(input.tolerateUnsynced === true ? { tolerateUnsynced: true } : {}),\n    }),\n  );\n}\n","import crypto from 'node:crypto';\nimport fs from 'node:fs/promises';\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\n\n/** The built MCP App HTML, its digest, and the files it was built from. */\nexport interface McpAppBundle {\n  readonly file: string;\n  readonly sha256: string;\n  readonly inputs: readonly { readonly path: string; readonly sha256: string }[];\n}\n\nexport interface McpAppSource {\n  readonly file: string;\n  readonly widgets: readonly string[];\n}\n\n/** Resolve generator-owned inputs before looking up an immutable build. */\nexport async function mcpAppInputs(componentsRoot?: string): Promise<string[]> {\n  const require = createRequire(import.meta.url);\n  const root = componentsRoot ?? path.dirname(require.resolve('@agimon-ai/po-web-components/package.json'));\n  const coreManifest = require.resolve('@agimon-ai/po-core/package.json');\n  const reactRequire = createRequire(coreManifest);\n  const fonts = mcpAppFonts(root);\n  const inputs = new Set<string>([import.meta.filename, coreManifest, ...fonts]);\n  for (const css of fonts) {\n    for (const match of (await fs.readFile(css, 'utf8')).matchAll(/url\\(['\"]?([^)'\" ]+\\.woff2)['\"]?\\)/gu))\n      inputs.add(path.resolve(path.dirname(css), match[1]!));\n  }\n  for (const directory of [\n    path.join(root, 'dist'),\n    path.join(root, 'styles'),\n    path.dirname(reactRequire.resolve('react/package.json')),\n    path.dirname(reactRequire.resolve('react-dom/package.json')),\n    path.dirname(require.resolve('tailwindcss/package.json')),\n  ]) {\n    for (const file of await fs.readdir(directory, { recursive: true })) {\n      if (typeof file === 'string' && /\\.(?:[cm]?js|css|json)$/u.test(file)) inputs.add(path.join(directory, file));\n    }\n  }\n  inputs.add(path.join(root, 'package.json'));\n  return [...inputs].sort();\n}\n\nfunction mcpAppFonts(componentsRoot: string): string[] {\n  const require = createRequire(path.join(componentsRoot, 'package.json'));\n  return ['@fontsource-variable/ibm-plex-sans/index.css', '@fontsource-variable/jetbrains-mono/index.css'].map((font) =>\n    require.resolve(font),\n  );\n}\n\n/** Composes the installed packages' browser registries. No tool names or presentation policies live here. */\nexport async function bundleMcpApp(\n  sources: readonly McpAppSource[],\n  outputDirectory: string,\n): Promise<McpAppBundle | undefined> {\n  if (sources.length === 0) return undefined;\n  const names = new Set<string>();\n  for (const source of sources) {\n    for (const name of source.widgets) {\n      if (names.has(name)) throw new Error(`Duplicate MCP widget '${name}'`);\n      names.add(name);\n    }\n  }\n  const runtimeRequire = createRequire(import.meta.url);\n  const coreRoot = path.dirname(runtimeRequire.resolve('@agimon-ai/po-core/package.json'));\n  const componentsRoot = path.dirname(runtimeRequire.resolve('@agimon-ai/po-web-components/package.json'));\n  const componentsManifest = JSON.parse(await fs.readFile(path.join(componentsRoot, 'package.json'), 'utf8')) as {\n    exports: Record<string, { import: string }>;\n  };\n  const appEntry = path.resolve(componentsRoot, componentsManifest.exports['./mcpWidget']!.import);\n  const reactRequire = createRequire(path.join(coreRoot, 'package.json'));\n  const directory = path.join(outputDirectory, 'ui');\n  await fs.mkdir(directory, { recursive: true });\n  const outputRoot = await fs.realpath(outputDirectory);\n  const entry = path.join(directory, 'entry.js');\n  const css = path.join(directory, 'app.css');\n  const relative = (file: string): string => file.split(path.sep).join('/');\n  await fs.writeFile(\n    entry,\n    [\n      `import { mountMcpApp } from ${JSON.stringify(relative(appEntry))};`,\n      ...mcpAppFonts(componentsRoot).map((font) => `import ${JSON.stringify(relative(font))};`),\n      \"import './app.css';\",\n      ...sources.map(\n        (source, index) => `import { widgets as widgets${index} } from ${JSON.stringify(relative(source.file))};`,\n      ),\n      'const widgets = Object.create(null);',\n      ...sources.flatMap((source, index) =>\n        source.widgets.map((name) => `widgets[${JSON.stringify(name)}] = widgets${index}[${JSON.stringify(name)}];`),\n      ),\n      'void mountMcpApp(widgets);',\n      '',\n    ].join('\\n'),\n  );\n  await fs.writeFile(\n    css,\n    [\n      `@import ${JSON.stringify(relative(runtimeRequire.resolve('tailwindcss/index.css')))};`,\n      `@import ${JSON.stringify(relative(path.join(componentsRoot, 'styles/mcp.css')))};`,\n      `@source ${JSON.stringify(relative(path.join(componentsRoot, 'dist')))};`,\n      ...sources.map((source) => `@source ${JSON.stringify(relative(source.file))};`),\n      'body { font-family: var(--font-sans, \"IBM Plex Sans Variable\", system-ui, sans-serif); }',\n      'code, pre, kbd, samp { font-family: var(--font-mono, \"JetBrains Mono Variable\", monospace); }',\n      '',\n    ].join('\\n'),\n  );\n  const inputs = new Set<string>([\n    ...(await mcpAppInputs()),\n    appEntry,\n    path.join(coreRoot, 'package.json'),\n    path.join(componentsRoot, 'package.json'),\n  ]);\n  for (const root of [\n    path.join(componentsRoot, 'styles'),\n    path.dirname(runtimeRequire.resolve('tailwindcss/package.json')),\n  ]) {\n    for (const file of await fs.readdir(root, { recursive: true })) {\n      if (typeof file === 'string' && file.endsWith('.css')) inputs.add(path.join(root, file));\n    }\n  }\n  const { build } = await import('vite');\n  const { default: tailwindcss } = await import('@tailwindcss/vite');\n  const built = await build({\n    configFile: false,\n    envDir: false,\n    root: directory,\n    logLevel: 'warn',\n    // Library builds leave this React branch intact unless it is replaced explicitly.\n    define: { 'process.env.NODE_ENV': JSON.stringify('production') },\n    plugins: [\n      tailwindcss(),\n      {\n        name: 'po-mcp-inputs',\n        async generateBundle() {\n          for (const id of this.getModuleIds()) {\n            const file = id.split('?')[0]!;\n            if (file.includes('\\0') || !path.isAbsolute(file)) continue;\n            let resolved: string;\n            try {\n              if (!(await fs.stat(file)).isFile()) continue;\n              resolved = await fs.realpath(file);\n            } catch (error) {\n              if ((error as NodeJS.ErrnoException).code === 'ENOENT') continue;\n              throw error;\n            }\n            const withinOutput = path.relative(outputRoot, resolved);\n            if (withinOutput !== '' && !withinOutput.startsWith('..') && !path.isAbsolute(withinOutput)) continue;\n            inputs.add(resolved);\n          }\n        },\n      },\n    ],\n    resolve: {\n      alias: [\n        { find: /^@agimon-ai\\/po-web-components$/u, replacement: appEntry },\n        ...['react', 'react/jsx-runtime', 'react/jsx-dev-runtime', 'react-dom', 'react-dom/client'].map(\n          (specifier) => ({\n            find: new RegExp(`^${specifier.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}$`, 'u'),\n            replacement: reactRequire.resolve(specifier),\n          }),\n        ),\n      ],\n    },\n    build: {\n      write: false,\n      emptyOutDir: false,\n      sourcemap: false,\n      cssCodeSplit: false,\n      // Vite library mode always inlines assets, regardless of this limit.\n      assetsInlineLimit: Infinity,\n      lib: { entry, formats: ['iife'], name: 'PoMcpApp', fileName: 'app', cssFileName: 'app' },\n    },\n  });\n  const bundles = Array.isArray(built) ? built : [built];\n  const output = bundles.flatMap((bundle) => ('output' in bundle ? bundle.output : []));\n  const scripts = output.filter((item) => item.type === 'chunk');\n  const styles = output.filter((item) => item.type === 'asset').filter((item) => item.fileName.endsWith('.css'));\n  if (\n    scripts.length !== 1 ||\n    scripts[0]!.imports.some((file) => file !== scripts[0]!.fileName) ||\n    scripts[0]!.dynamicImports.length ||\n    output.length !== scripts.length + styles.length\n  )\n    throw new Error(\n      `The composed MCP app must contain one self-contained script and inline CSS only: ${output.map((item) => item.fileName).join(', ')}; imports: ${scripts.flatMap((item) => [...item.imports, ...item.dynamicImports]).join(', ')}`,\n    );\n  const script = scripts[0]!.code.replace(/<\\/script/giu, '<\\\\/script');\n  const style = styles\n    .map((item) => (typeof item.source === 'string' ? item.source : Buffer.from(item.source).toString('utf8')))\n    .join('\\n')\n    .replace(/<\\/style/giu, '<\\\\/style');\n  const html = `<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>Po tools</title><style>${style}</style></head><body><div id=\"root\"></div><script>${script}</script></body></html>`;\n  await fs.writeFile(path.join(directory, 'index.html'), html);\n  // Only immutable HTML is served. The generated imports remain useful for diagnosing a sync build.\n  return {\n    file: './ui/index.html',\n    sha256: crypto.createHash('sha256').update(html).digest('hex'),\n    inputs: await Promise.all(\n      [...inputs].sort().map(async (file) => ({\n        path: file,\n        sha256: crypto\n          .createHash('sha256')\n          .update(await fs.readFile(file))\n          .digest('hex'),\n      })),\n    ),\n  };\n}\n","import crypto from 'node:crypto';\nimport path from 'node:path';\n\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { BACKGROUND_CONTEXT, type FileSystem, getOrThrow, pathExists } from '@agimon-ai/po-core/platform';\n\nimport { bundleMcpApp, mcpAppInputs, type McpAppSource } from './mcpApp';\nimport type { McpPluginCandidate } from './mcpBundle';\nimport { snapshotFiles, statSignature } from './packageUrl';\n\nexport interface McpAppBuild {\n  readonly key: string;\n  readonly file: string;\n  readonly html: string;\n  readonly sha256: string;\n}\n\nexport interface McpAppBuildInput {\n  readonly files?: FileSystem;\n  readonly poHome: string;\n  readonly candidates: readonly McpPluginCandidate[];\n  /** Test seam; defaults to `bundleMcpApp`. */\n  readonly bundle?: typeof bundleMcpApp;\n}\n\nasync function widgetSources(candidates: readonly McpPluginCandidate[], files: FileSystem): Promise<McpAppSource[]> {\n  const sources: McpAppSource[] = [];\n  for (const { declaration } of candidates) {\n    if (!declaration.ui || declaration.ui.widgets.length === 0) continue;\n    const root = getOrThrow(await files.canonicalPath(declaration.packageDir, BACKGROUND_CONTEXT));\n    const file = getOrThrow(await files.canonicalPath(path.resolve(root, declaration.ui.dist), BACKGROUND_CONTEXT));\n    const relative = path.relative(root, file);\n    if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative))\n      throw new Error(`MCP UI entry escapes package: ${declaration.packageName}`);\n    sources.push({ file, widgets: declaration.ui.widgets });\n  }\n  return sources;\n}\n\n/** Content key over every widget package's files, so any source change moves it. */\nexport async function mcpAppKey(\n  candidates: readonly McpPluginCandidate[],\n  inputs?: readonly string[],\n  files: FileSystem = createNodePlatform().env(process.cwd()),\n): Promise<string | undefined> {\n  const hash = crypto.createHash('sha256');\n  let any = false;\n  for (const { declaration } of candidates) {\n    if (!declaration.ui || declaration.ui.widgets.length === 0) continue;\n    any = true;\n    const root = getOrThrow(await files.canonicalPath(declaration.packageDir, BACKGROUND_CONTEXT));\n    const entry = path.resolve(root, declaration.ui.dist);\n    hash.update(`${declaration.packageName}\\0${root}\\0${declaration.ui.widgets.join(',')}\\0`);\n    hash.update(await statSignature(root, await snapshotFiles(root, entry, files), files));\n    hash.update('\\n');\n  }\n  if (!any) return undefined;\n  for (const file of [...(inputs ?? (await mcpAppInputs())), import.meta.filename].sort()) {\n    hash.update(`${file}\\0`);\n    hash.update(\n      crypto\n        .createHash('sha256')\n        .update(getOrThrow(await files.readBinaryFile(file, BACKGROUND_CONTEXT)))\n        .digest(),\n    );\n  }\n  return hash.digest('hex').slice(0, 32);\n}\n\nfunction mcpAppFile(poHome: string, key: string): string {\n  return path.join(poHome, 'build', 'mcp-app', key, 'index.html');\n}\n\n// A published build never changes, so every session shares one copy of its HTML (about 1.7 MB).\n// Rebuilds publish new keys, so only the most recent few stay cached.\nconst loadedBuilds = new Map<string, McpAppBuild>();\n\nasync function loadedBuild(key: string, file: string, files: FileSystem): Promise<McpAppBuild> {\n  const cached = loadedBuilds.get(file);\n  if (cached !== undefined) return cached;\n  const html = getOrThrow(await files.readTextFile(file, BACKGROUND_CONTEXT));\n  const build = { key, file, html, sha256: crypto.createHash('sha256').update(html).digest('hex') };\n  loadedBuilds.set(file, build);\n  const [oldest] = loadedBuilds.keys();\n  if (loadedBuilds.size > 4 && oldest !== undefined) loadedBuilds.delete(oldest);\n  return build;\n}\n\n/** Reads sync's build without building. A missing HTML file returns only its expected key. */\nexport async function readMcpAppBuild(\n  input: Pick<McpAppBuildInput, 'poHome' | 'candidates' | 'files'>,\n): Promise<{ key: string; build?: McpAppBuild } | undefined> {\n  const files = input.files ?? createNodePlatform().env(input.poHome);\n  const key = await mcpAppKey(input.candidates, undefined, files);\n  if (key === undefined) return undefined;\n  try {\n    return { key, build: await loadedBuild(key, mcpAppFile(input.poHome, key), files) };\n  } catch (error) {\n    if (error instanceof Error && 'code' in error && error.code === 'not_found') return { key };\n    throw error;\n  }\n}\n\n/** Builds into a temporary sibling and atomically publishes the immutable HTML. */\nexport async function ensureMcpAppBuild(input: McpAppBuildInput): Promise<McpAppBuild | undefined> {\n  const files = input.files ?? createNodePlatform().env(input.poHome);\n  const key = await mcpAppKey(input.candidates, undefined, files);\n  if (key === undefined) return undefined;\n  const file = mcpAppFile(input.poHome, key);\n  const directory = path.dirname(file);\n  const parent = path.dirname(directory);\n  if (!(await pathExists(files, file, BACKGROUND_CONTEXT))) {\n    getOrThrow(await files.createDir(parent, { recursive: true }, BACKGROUND_CONTEXT));\n    const temporary = path.join(parent, `.${key}-${crypto.randomUUID()}`);\n    getOrThrow(await files.createDir(temporary, undefined, BACKGROUND_CONTEXT));\n    try {\n      const built = await (input.bundle ?? bundleMcpApp)(await widgetSources(input.candidates, files), temporary);\n      if (built === undefined) return undefined;\n      getOrThrow(\n        await files.writeFile(\n          path.join(temporary, 'index.html'),\n          getOrThrow(await files.readBinaryFile(path.join(temporary, built.file), BACKGROUND_CONTEXT)),\n          BACKGROUND_CONTEXT,\n        ),\n      );\n      try {\n        getOrThrow(await files.renameFile(temporary, directory, BACKGROUND_CONTEXT));\n      } catch (error) {\n        // A concurrent build of the same key already published it.\n        if (!(await pathExists(files, file, BACKGROUND_CONTEXT))) throw error;\n      }\n    } finally {\n      getOrThrow(await files.remove(temporary, { recursive: true, force: true }, BACKGROUND_CONTEXT));\n    }\n  }\n  return loadedBuild(key, file, files);\n}\n","import path from 'node:path';\n\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { BACKGROUND_CONTEXT, type FileSystem, getOrThrow, pathExists } from '@agimon-ai/po-core/platform';\nimport type { PoServerBundleOwner } from '@agimon-ai/po-core/serverPlugin';\n\nimport type { ExtensionComposition } from '../cli/extensionAssembler';\n\nexport interface DeclaredMcpPlugin {\n  readonly packageName: string;\n  readonly packageDir: string;\n  readonly entry: string;\n  readonly dist: string;\n  readonly ui?: { readonly dist: string; readonly widgets: readonly string[] };\n}\n\nasync function packageRootOf(entry: string, files: FileSystem): Promise<string> {\n  let directory = path.dirname(getOrThrow(await files.canonicalPath(entry, BACKGROUND_CONTEXT)));\n  for (;;) {\n    if (await pathExists(files, path.join(directory, 'package.json'), BACKGROUND_CONTEXT)) return directory;\n    const parent = path.dirname(directory);\n    if (parent === directory) throw new Error(`No package manifest owns ${entry}`);\n    directory = parent;\n  }\n}\n\nfunction packagePath(packageDir: string, field: string, value: unknown): string {\n  if (typeof value !== 'string' || !value.startsWith('./') || value.includes('..'))\n    throw new Error(`poMcp ${field} in ${packageDir} must be a package-relative ./path with no '..'.`);\n  return value;\n}\n\nfunction declaredMcpPlugin(packageDir: string, manifest: Record<string, unknown>): DeclaredMcpPlugin | undefined {\n  const value = manifest.poMcp;\n  if (value === undefined) return undefined;\n  if (typeof value !== 'object' || value === null || Array.isArray(value))\n    throw new Error(`poMcp manifest in ${packageDir} must be an object.`);\n  const declaration = value as Record<string, unknown>;\n  if (!Array.isArray(declaration.scopes) || declaration.scopes.length !== 1 || declaration.scopes[0] !== 'session')\n    throw new Error(`poMcp scopes in ${packageDir} must be exactly ['session'].`);\n  const packageName = manifest.name;\n  if (typeof packageName !== 'string' || packageName === '') throw new Error(`Package in ${packageDir} has no name.`);\n  let ui: DeclaredMcpPlugin['ui'];\n  if (declaration.ui !== undefined) {\n    const value = declaration.ui as { dist?: unknown; widgets?: unknown } | null;\n    if (\n      typeof value !== 'object' ||\n      value === null ||\n      !Array.isArray(value.widgets) ||\n      value.widgets.some((key: unknown) => typeof key !== 'string' || !key.startsWith(`${packageName}/`)) ||\n      new Set(value.widgets).size !== value.widgets.length\n    )\n      throw new Error(`Invalid MCP widget manifest in ${packageDir}`);\n    ui = { dist: packagePath(packageDir, 'ui.dist', value.dist), widgets: value.widgets as string[] };\n  }\n  return {\n    packageName,\n    packageDir,\n    ...(ui === undefined ? {} : { ui }),\n    entry: packagePath(packageDir, 'entry', declaration.entry),\n    dist: packagePath(packageDir, 'dist', declaration.dist),\n  };\n}\n\n/** One MCP plugin a composition set selects, with the built entry a host imports. */\nexport interface McpPluginCandidate {\n  readonly declaration: DeclaredMcpPlugin;\n  /** Absolute, symlink-resolved path of the package's built `dist` entry. */\n  readonly module: string;\n  /** Every major mode and layer that admitted the package. */\n  readonly owners: readonly PoServerBundleOwner[];\n}\n\n/**\n * The MCP plugins the given compositions select, in first-selection order.\n *\n * A package that two different directories claim is ambiguous, and a built\n * entry that resolves outside its package is refused.\n */\nexport async function mcpPluginCandidates(\n  compositions: readonly ExtensionComposition[],\n  files: FileSystem = createNodePlatform().env(process.cwd()),\n): Promise<McpPluginCandidate[]> {\n  const packages = new Map<string, { declaration: DeclaredMcpPlugin; owners: PoServerBundleOwner[] }>();\n  for (const composition of compositions) {\n    const majorMode = composition.majorMode?.name;\n    if (!majorMode) throw new Error('An MCP bundle composition needs its major mode');\n    const selections = await Promise.all(\n      composition.selections.map(async (selection) => ({\n        selection,\n        root:\n          selection.outcome === 'resolved' && selection.path ? await packageRootOf(selection.path, files) : undefined,\n      })),\n    );\n    for (const root of new Set(\n      await Promise.all(composition.packageEntries.map((entry) => packageRootOf(entry, files))),\n    )) {\n      const manifest = JSON.parse(\n        getOrThrow(await files.readTextFile(path.join(root, 'package.json'), BACKGROUND_CONTEXT)),\n      ) as Record<string, unknown>;\n      const declaration = declaredMcpPlugin(root, manifest);\n      if (declaration === undefined) continue;\n      const previous = packages.get(declaration.packageName);\n      if (previous && previous.declaration.packageDir !== root)\n        throw new Error(`Ambiguous MCP bundle package: ${declaration.packageName}`);\n      const candidate = previous ?? { declaration, owners: [] };\n      const layers = selections.filter((entry) => entry.root === root).map(({ selection }) => selection.layer);\n      for (const layer of new Set(layers.length > 0 ? layers : ['default'])) {\n        if (!candidate.owners.some((owner) => owner.majorMode === majorMode && owner.layer === layer))\n          candidate.owners.push({ majorMode, layer });\n      }\n      packages.set(declaration.packageName, candidate);\n    }\n  }\n  return Promise.all(\n    [...packages.values()].map(async ({ declaration, owners }) => {\n      const module = getOrThrow(\n        await files.canonicalPath(path.resolve(declaration.packageDir, declaration.dist), BACKGROUND_CONTEXT),\n      );\n      const relative = path.relative(declaration.packageDir, module);\n      if (relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative))\n        throw new Error(`MCP entry escapes package: ${declaration.packageName}`);\n      return { declaration, module, owners };\n    }),\n  );\n}\n","import fs from 'node:fs/promises';\nimport path from 'node:path';\n\nimport { pruneRuntimePackages } from '@agimon-ai/po-core/runtimePackages';\nimport { poHomeDirectory, poRuntimeDirectory } from '@agimon-ai/po-core/runtimePiSettings';\n\nimport { pruneStagedCatalogArchives } from '../layerPackageInstaller';\nimport { type HostScan, otherPoHosts, systemHostScan } from '../poHomeMigration';\n\n/**\n * What an explicit `po sync` drops once its installs and builds are done:\n * - the runtime project's stale entries and store content nothing references (upm's prune,\n *   which keeps anything written in the last hour);\n * - global web, native and MCP app builds other than the current key and the one before it.\n *\n * Sync calls this under its lock. Builds are pruned even while a Po server runs: the server\n * serves copies it publishes into `~/.po/server`, not these folders. The runtime is pruned only\n * when no other Po host runs, judged by the same scan that retires `~/.pi/.po`: a running server\n * may be installing into it, and upm's prune cannot be told to keep the previous manifest's\n * packages, so the runtime store grows while a server stays up. The staged catalogue archives\n * under `runtime/catalog` share that gate: a running server imports from them.\n */\n\nconst BUILD_DIRECTORY = 'build';\nconst BUILD_KINDS = { web: 'web', native: 'native', mcpApp: 'mcp-app' } as const;\nconst RUNTIME_MANIFEST = 'package.json';\n/** Builds an in-flight build writes start with a dot; they are never touched. */\nconst TEMPORARY_PREFIX = '.';\n\nexport interface SyncPruneInput {\n  homeDirectory: string;\n  environment: NodeJS.ProcessEnv;\n  /** The root the global builds live under: `<root>/build/web/<key>`, `<root>/build/mcp-app/<key>`. */\n  buildsRoot: string;\n  /** The current global web build key; without one the web builds are left alone. */\n  webKey?: string;\n  /** The current global native build key; without one the native builds are left alone. */\n  nativeKey?: string;\n  /** The current MCP app build keys, one per distinct widget set; without any the MCP app builds are left alone. */\n  mcpAppKeys?: readonly string[];\n  /** Test seams. */\n  scan?: HostScan;\n  selfPid?: number;\n  pruneRuntime?: typeof pruneRuntimePackages;\n}\n\nexport interface SyncPruneResult {\n  status: 'pruned';\n  /** Build directories removed, as `<kind>/<key>`. */\n  builds: string[];\n  /** Store bytes upm released, or why the runtime was not pruned. */\n  runtime: { bytes: number } | { skipped: string };\n}\n\n/**\n * Removes every build of one kind except the current keys and the most recently written\n * other key, the one a client that has not refreshed yet may still load.\n */\nasync function pruneBuilds(buildsRoot: string, kind: string, currentKeys: readonly string[]): Promise<string[]> {\n  if (currentKeys.length === 0) return [];\n  const directory = path.join(buildsRoot, BUILD_DIRECTORY, kind);\n  const entries = await fs.readdir(directory, { withFileTypes: true }).catch((error: NodeJS.ErrnoException) => {\n    if (error.code === 'ENOENT') return [];\n    throw error;\n  });\n  const others = (\n    await Promise.all(\n      entries\n        .filter(\n          (entry) =>\n            entry.isDirectory() && !entry.name.startsWith(TEMPORARY_PREFIX) && !currentKeys.includes(entry.name),\n        )\n        .map(async (entry) => ({\n          name: entry.name,\n          modified: (await fs.stat(path.join(directory, entry.name))).mtimeMs,\n        })),\n    )\n  ).sort((left, right) => right.modified - left.modified);\n  return Promise.all(\n    others.slice(1).map(async (entry) => {\n      await fs.rm(path.join(directory, entry.name), { recursive: true, force: true });\n      return `${kind}/${entry.name}`;\n    }),\n  );\n}\n\nexport async function pruneAfterSync(input: SyncPruneInput): Promise<SyncPruneResult> {\n  const poHome = poHomeDirectory(input.homeDirectory, input.environment);\n  const builds = [\n    ...(await pruneBuilds(input.buildsRoot, BUILD_KINDS.web, input.webKey === undefined ? [] : [input.webKey])),\n    ...(await pruneBuilds(\n      input.buildsRoot,\n      BUILD_KINDS.native,\n      input.nativeKey === undefined ? [] : [input.nativeKey],\n    )),\n    ...(await pruneBuilds(input.buildsRoot, BUILD_KINDS.mcpApp, input.mcpAppKeys ?? [])),\n  ];\n  // ponytail: upm's prune has no keep-list, so the previous manifest cannot be protected while a\n  // server runs; the runtime and its staged catalogue folders stay gated on no other host. A keep\n  // option in upm is the upgrade.\n  const hosts = await otherPoHosts(poHome, input.scan ?? systemHostScan, input.selfPid ?? process.pid);\n  if (hosts.status === 'running') return { status: 'pruned', builds, runtime: { skipped: hosts.reason } };\n  const runtimeDirectory = poRuntimeDirectory(input.homeDirectory, input.environment);\n  if (\n    !(await fs.access(path.join(runtimeDirectory, RUNTIME_MANIFEST)).then(\n      () => true,\n      (error: NodeJS.ErrnoException) => {\n        if (error.code === 'ENOENT') return false;\n        throw error;\n      },\n    ))\n  ) {\n    return { status: 'pruned', builds, runtime: { skipped: 'no runtime packages are installed' } };\n  }\n  await pruneStagedCatalogArchives(runtimeDirectory);\n  const result = await (input.pruneRuntime ?? pruneRuntimePackages)({ dir: runtimeDirectory, poHome });\n  return {\n    status: 'pruned',\n    builds,\n    runtime: { bytes: result.content.bytes + (result.entries?.bytes ?? 0) },\n  };\n}\n","import { type ChildProcess, spawn, spawnSync } from 'node:child_process';\nimport crypto from 'node:crypto';\nimport type { Dirent } from 'node:fs';\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\n\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { BACKGROUND_CONTEXT, writeFileAtomic } from '@agimon-ai/po-core/platform';\nimport { getValidatedTestContext } from '@agimon-ai/po-core/testMode';\n\n/**\n * Builds the packages sync roots name by local path, so the web, native and MCP builds read\n * current output. Each package builds at most once per sync, in dependency order within the\n * local set, with the package manager its nearest lockfile names. Install never runs.\n */\n\nconst LOCAL_SOURCE_DIRECTORY = 'src';\nconst PACKAGE_MANIFEST = 'package.json';\nconst NODE_MODULES = 'node_modules';\nconst LOCAL_BUILDS_FILE = path.join('build', 'local-builds.json');\nconst BUILD_SCRIPT = 'build';\nconst STDERR_TAIL_LINES = 20;\n/** Bytes of stderr kept per build while it runs; older output is dropped as it arrives. */\nconst STDERR_TAIL_BYTES = 64 * 1024;\n/**\n * A local build that runs longer than this is stopped and reported as failed. Sync holds its\n * lock while a build runs, so a hung build must not hold it forever.\n */\nexport const LOCAL_BUILD_TIMEOUT_MS = 10 * 60 * 1000;\n/** How long a build's stderr may stay open after it exits, held by a process it left running. */\nconst STDERR_CLOSE_GRACE_MS = 1000;\nconst MILLISECONDS_PER_SECOND = 1000;\nconst LOGIN_SHELL_TIMEOUT_MS = 10_000;\nconst DEFAULT_PACKAGE_MANAGER = 'npm';\nconst NO_SUCH_PROCESS = 'ESRCH';\n/** Checked nearest-first in each folder; the first lockfile found names the package manager. */\nconst LOCKFILES: readonly (readonly [string, string])[] = [\n  ['pnpm-lock.yaml', 'pnpm'],\n  ['bun.lock', 'bun'],\n  ['bun.lockb', 'bun'],\n  ['yarn.lock', 'yarn'],\n  ['package-lock.json', 'npm'],\n];\n/** Variables a Po session or another harness exports; a package build must not see them. */\nconst HARNESS_PREFIXES = ['PO_', 'PI_', 'CLAUDE_', 'CODEX_'];\nconst HARNESS_VARIABLES = new Set(['CLAUDECODE', 'MCP_UI_VIEWER', 'npm_config_user_agent']);\nconst DEPENDENCY_FIELDS = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies'];\n\nexport interface LocalPackage {\n  /** The selector as a root's configuration names it. */\n  selector: string;\n  directory: string;\n}\n\nexport type LocalBuildOutcome =\n  | { status: 'built' | 'cached' }\n  | { status: 'failed'; reason: string; stderr?: string[] };\n\nexport interface LocalBuildInput {\n  globalRoot: string;\n  environment: NodeJS.ProcessEnv;\n  directories: readonly string[];\n  /** Receives each command line as it starts. */\n  onCommand: (command: string) => void;\n  onNotice: (message: string) => void;\n  /** Overrides `LOCAL_BUILD_TIMEOUT_MS`. */\n  timeoutMs?: number;\n}\n\ninterface Manifest {\n  name?: string;\n  main?: unknown;\n  module?: unknown;\n  exports?: unknown;\n  scripts?: Record<string, unknown>;\n  [field: string]: unknown;\n}\n\nasync function sourceFiles(directory: string): Promise<string[]> {\n  let entries: Dirent[];\n  try {\n    entries = await fs.readdir(directory, { withFileTypes: true });\n  } catch {\n    // A package without a source folder has only its manifest to stamp.\n    return [];\n  }\n  const files = await Promise.all(\n    entries.map(async (entry) => {\n      const full = path.join(directory, entry.name);\n      if (entry.isDirectory()) return entry.name === NODE_MODULES ? [] : sourceFiles(full);\n      return entry.isFile() ? [full] : [];\n    }),\n  );\n  return files.flat();\n}\n\n/**\n * The build stamp of a local package: an mtime and size signature over its `package.json`\n * and every file under `src/`.\n * ponytail: it misses edits to dependencies outside the package; a content hash is the upgrade.\n */\nexport async function localBuildStamp(packageDirectory: string): Promise<string> {\n  const files = [\n    path.join(packageDirectory, PACKAGE_MANIFEST),\n    ...(await sourceFiles(path.join(packageDirectory, LOCAL_SOURCE_DIRECTORY))),\n  ];\n  const hash = crypto.createHash('sha256');\n  for (const file of files.sort()) {\n    const relative = path.relative(packageDirectory, file);\n    try {\n      const stat = await fs.stat(file);\n      hash.update(`${relative}\\0${String(stat.size)}\\0${String(stat.mtimeMs)}\\n`);\n    } catch {\n      // Recorded as missing, so the stamp moves when the file appears.\n      hash.update(`${relative}\\0missing\\n`);\n    }\n  }\n  return hash.digest('hex');\n}\n\nexport function localBuildsPath(globalRoot: string): string {\n  return path.join(globalRoot, LOCAL_BUILDS_FILE);\n}\n\nasync function readStamps(globalRoot: string): Promise<Record<string, string>> {\n  try {\n    const parsed = JSON.parse(await fs.readFile(localBuildsPath(globalRoot), 'utf8')) as unknown;\n    return typeof parsed === 'object' && parsed !== null ? (parsed as Record<string, string>) : {};\n  } catch {\n    // Missing or unreadable: every package builds once.\n    return {};\n  }\n}\n\nasync function readManifest(directory: string): Promise<Manifest | undefined> {\n  try {\n    return JSON.parse(await fs.readFile(path.join(directory, PACKAGE_MANIFEST), 'utf8')) as Manifest;\n  } catch {\n    return undefined;\n  }\n}\n\n/** The package manager the nearest lockfile names, walking up from the package. */\nexport async function packageManagerFor(directory: string): Promise<string> {\n  let current = path.resolve(directory);\n  for (;;) {\n    for (const [lockfile, manager] of LOCKFILES)\n      if (\n        await fs.access(path.join(current, lockfile)).then(\n          () => true,\n          () => false,\n        )\n      )\n        return manager;\n    const parent = path.dirname(current);\n    if (parent === current) return DEFAULT_PACKAGE_MANAGER;\n    current = parent;\n  }\n}\n\nasync function findOnPath(binary: string, searchPath: string | undefined): Promise<string | undefined> {\n  for (const directory of (searchPath ?? '').split(path.delimiter).filter(Boolean)) {\n    const candidate = path.join(directory, binary);\n    try {\n      await fs.access(candidate, fs.constants.X_OK);\n      if ((await fs.stat(candidate)).isFile()) return candidate;\n    } catch {\n      // Not in this folder.\n    }\n  }\n  return undefined;\n}\n\n/**\n * The login shell's PATH. Desktop apps launched from Finder get a minimal PATH (inferred,\n * not checked here), so a package manager installed through a shell profile is missing.\n */\nfunction loginShellPath(environment: NodeJS.ProcessEnv): string | undefined {\n  const shell = environment.SHELL ?? '/bin/zsh';\n  const result = spawnSync(shell, ['-ilc', 'printf %s \"$PATH\"'], {\n    encoding: 'utf8',\n    timeout: LOGIN_SHELL_TIMEOUT_MS,\n  });\n  return result.status === 0 && result.stdout.trim() !== '' ? result.stdout.trim() : undefined;\n}\n\n/** Strip harness state, then restore only validated test isolation for nested Po commands. */\nexport function buildEnvironment(environment: NodeJS.ProcessEnv): NodeJS.ProcessEnv {\n  const testContext = getValidatedTestContext(environment);\n  return {\n    ...Object.fromEntries(\n      Object.entries(environment).filter(\n        ([name]) => !HARNESS_VARIABLES.has(name) && !HARNESS_PREFIXES.some((prefix) => name.startsWith(prefix)),\n      ),\n    ),\n    ...testContext?.env,\n  };\n}\n\nfunction entryPaths(value: unknown): string[] {\n  if (typeof value === 'string') return [value];\n  if (Array.isArray(value)) return value.flatMap(entryPaths);\n  if (typeof value === 'object' && value !== null) return Object.values(value).flatMap(entryPaths);\n  return [];\n}\n\n/** Whether every file `main`, `module` and `exports` name exists; false when they name none. */\nasync function builtEntriesPresent(directory: string, manifest: Manifest): Promise<boolean> {\n  const entries = [manifest.main, manifest.module, manifest.exports]\n    .flatMap(entryPaths)\n    .filter((entry) => !entry.includes('*'));\n  const present = await Promise.all(\n    entries.map((entry) =>\n      fs.access(path.resolve(directory, entry)).then(\n        () => true,\n        () => false,\n      ),\n    ),\n  );\n  return entries.length > 0 && present.every(Boolean);\n}\n\n/** The directories ordered so each local package builds after the local packages it depends on. */\nfunction dependencyOrder(directories: readonly string[], manifests: Map<string, Manifest | undefined>): string[] {\n  const byName = new Map<string, string>();\n  for (const directory of directories) {\n    const name = manifests.get(directory)?.name;\n    if (name !== undefined) byName.set(name, directory);\n  }\n  const ordered: string[] = [];\n  const visiting = new Set<string>();\n  const visit = (directory: string): void => {\n    if (ordered.includes(directory) || visiting.has(directory)) return;\n    visiting.add(directory);\n    const manifest = manifests.get(directory);\n    for (const field of DEPENDENCY_FIELDS) {\n      const dependencies = manifest?.[field];\n      if (typeof dependencies !== 'object' || dependencies === null) continue;\n      for (const name of Object.keys(dependencies)) {\n        const dependency = byName.get(name);\n        if (dependency !== undefined) visit(dependency);\n      }\n    }\n    visiting.delete(directory);\n    ordered.push(directory);\n  };\n  for (const directory of directories) visit(directory);\n  return ordered;\n}\n\nfunction stderrTail(stderr: string): string[] {\n  return stderr.trimEnd().split('\\n').filter(Boolean).slice(-STDERR_TAIL_LINES);\n}\n\ninterface BuildRun {\n  status: number | null;\n  signal: NodeJS.Signals | null;\n  error?: Error;\n  timedOut: boolean;\n  /** It exited while a process it started still held stderr open; that process was stopped. */\n  leftRunning: boolean;\n  /** The last `STDERR_TAIL_BYTES` of stderr. */\n  stderr: string;\n}\n\n/** Signals that end this process; a build in its own process group would not receive them. */\nconst FORWARDED_SIGNALS: readonly NodeJS.Signals[] = ['SIGINT', 'SIGTERM', 'SIGHUP'];\nconst SEPARATE_PROCESS_GROUPS = process.platform !== 'win32';\n\n/**\n * Kills the build and everything it started. The build leads its own process group, so the\n * package manager's tsc or vite children die with it.\n * ponytail: Windows has no process groups here, so only the package manager is killed there;\n * `taskkill /T /F` is the upgrade if Windows builds must stop their children too.\n */\nfunction killBuild(child: ChildProcess): void {\n  if (!SEPARATE_PROCESS_GROUPS || child.pid === undefined) {\n    child.kill('SIGKILL');\n    return;\n  }\n  try {\n    process.kill(-child.pid, 'SIGKILL');\n  } catch (error) {\n    // ESRCH: every process of the group has exited already, which is the goal. Anything else\n    // (EPERM) falls back to the package manager alone rather than crash inside a timer.\n    if ((error as NodeJS.ErrnoException).code !== NO_SUCH_PROCESS) child.kill('SIGKILL');\n  }\n}\n\n/**\n * Runs one build script without buffering its output: stdout is discarded and only the stderr\n * tail is kept. A build still running after `timeoutMs` is killed with every process it started\n * and reported as timed out. A build that exits while something it started still holds stderr\n * open has that process group killed when the grace ends, so nothing writes after it returns.\n */\nfunction runBuildScript(\n  binary: string,\n  directory: string,\n  environment: NodeJS.ProcessEnv,\n  timeoutMs: number,\n): Promise<BuildRun> {\n  return new Promise((resolve) => {\n    let tail = Buffer.alloc(0);\n    let timedOut = false;\n    let leftRunning = false;\n    let settled = false;\n    let grace: NodeJS.Timeout | undefined;\n    // Its own process group, so a kill reaches its children. Still awaited: never unref'd.\n    const child = spawn(binary, ['run', BUILD_SCRIPT], {\n      cwd: directory,\n      env: environment,\n      stdio: ['ignore', 'ignore', 'pipe'],\n      detached: SEPARATE_PROCESS_GROUPS,\n    });\n    // A detached build no longer gets the terminal's Ctrl+C, so this process passes it on.\n    const forward = (signal: NodeJS.Signals): void => {\n      killBuild(child);\n      if (process.listenerCount(signal) > 1) return;\n      // Only this handler was listening: end as the signal would have without it.\n      process.removeListener(signal, forward);\n      process.kill(process.pid, signal);\n    };\n    if (SEPARATE_PROCESS_GROUPS) for (const signal of FORWARDED_SIGNALS) process.on(signal, forward);\n    const finish = (result: Pick<BuildRun, 'status' | 'signal' | 'error'>): void => {\n      if (settled) return;\n      settled = true;\n      clearTimeout(timer);\n      clearTimeout(grace);\n      for (const signal of FORWARDED_SIGNALS) process.removeListener(signal, forward);\n      child.stderr?.destroy();\n      resolve({ ...result, timedOut, leftRunning, stderr: tail.toString('utf8') });\n    };\n    const timer = setTimeout(() => {\n      timedOut = true;\n      killBuild(child);\n    }, timeoutMs);\n    child.stderr?.on('data', (chunk: Buffer) => {\n      tail = Buffer.concat([tail, chunk]);\n      if (tail.length > STDERR_TAIL_BYTES) tail = tail.subarray(tail.length - STDERR_TAIL_BYTES);\n    });\n    child.on('error', (error) => finish({ status: null, signal: null, error }));\n    child.on('close', (status, signal) => finish({ status, signal }));\n    // A process the build left running can hold stderr open, so 'close' may never come.\n    child.on('exit', (status, signal) => {\n      grace = setTimeout(\n        () => {\n          if (!timedOut) leftRunning = true;\n          killBuild(child);\n          finish({ status, signal });\n        },\n        timedOut ? 0 : STDERR_CLOSE_GRACE_MS,\n      );\n    });\n  });\n}\n\n/**\n * Builds every local package that changed since its last successful build, and returns each\n * directory's outcome. A failure never stops the others.\n */\nexport async function buildLocalPackages(input: LocalBuildInput): Promise<Map<string, LocalBuildOutcome>> {\n  const { globalRoot, environment, onCommand, onNotice } = input;\n  const timeoutMs = input.timeoutMs ?? LOCAL_BUILD_TIMEOUT_MS;\n  const directories = [...new Set(input.directories)];\n  const manifests = new Map(\n    await Promise.all(directories.map(async (directory) => [directory, await readManifest(directory)] as const)),\n  );\n  const stamps = await readStamps(globalRoot);\n  const outcomes = new Map<string, LocalBuildOutcome>();\n  const childEnvironment = buildEnvironment(environment);\n  let searchPath = environment.PATH;\n  let loginPathTried = false;\n  const resolveBinary = async (manager: string): Promise<string | undefined> => {\n    const found = await findOnPath(manager, searchPath);\n    if (found !== undefined || loginPathTried || process.platform !== 'darwin') return found;\n    loginPathTried = true;\n    const loginPath = loginShellPath(environment);\n    if (loginPath === undefined) return undefined;\n    searchPath = loginPath;\n    childEnvironment.PATH = loginPath;\n    return findOnPath(manager, searchPath);\n  };\n\n  for (const directory of dependencyOrder(directories, manifests)) {\n    const manifest = manifests.get(directory);\n    if (manifest === undefined) {\n      outcomes.set(directory, { status: 'failed', reason: `'${directory}' has no readable package.json` });\n      continue;\n    }\n    const stamp = await localBuildStamp(directory);\n    // ponytail: an unchanged stamp skips the build even when a dependency outside the\n    // package changed; a content hash over the dependency closure is the upgrade.\n    if (stamps[directory] === stamp) {\n      outcomes.set(directory, { status: 'cached' });\n      continue;\n    }\n    if (typeof manifest.scripts?.[BUILD_SCRIPT] !== 'string') {\n      outcomes.set(\n        directory,\n        (await builtEntriesPresent(directory, manifest))\n          ? { status: 'cached' }\n          : { status: 'failed', reason: 'it has no build script and no built entries' },\n      );\n      continue;\n    }\n    const manager = await packageManagerFor(directory);\n    const binary = await resolveBinary(manager);\n    if (binary === undefined) {\n      outcomes.set(directory, { status: 'failed', reason: `${manager} is not on PATH` });\n      continue;\n    }\n    const command = `${binary} run ${BUILD_SCRIPT} (in ${directory})`;\n    onCommand(command);\n    onNotice(`building ${manifest.name ?? directory}`);\n    const result = await runBuildScript(binary, directory, childEnvironment, timeoutMs);\n    if (result.status === 0 && !result.timedOut && !result.leftRunning) {\n      // The stamp after the build, as the sync pointer records it: a build that writes into\n      // src/ or package.json must not look changed to the next sync.\n      stamps[directory] = await localBuildStamp(directory);\n      await writeFileAtomic(\n        createNodePlatform().env(globalRoot),\n        localBuildsPath(globalRoot),\n        `${JSON.stringify(stamps, null, 2)}\\n`,\n        BACKGROUND_CONTEXT,\n      );\n      outcomes.set(directory, { status: 'built' });\n      continue;\n    }\n    const exit = result.timedOut\n      ? `timed out after ${String(timeoutMs / MILLISECONDS_PER_SECOND)} s`\n      : result.status === 0 && result.leftRunning\n        ? 'it exited but left processes running, which were stopped'\n        : (result.error?.message ?? `exit ${String(result.status ?? result.signal)}`);\n    outcomes.set(directory, {\n      status: 'failed',\n      reason: `${manager} run ${BUILD_SCRIPT} failed (${exit})`,\n      stderr: stderrTail(result.stderr),\n    });\n  }\n  return outcomes;\n}\n","import crypto from 'node:crypto';\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\nimport { setTimeout as wait } from 'node:timers/promises';\n\nimport { globalPoConfigDirectory } from '@agimon-ai/po-config/config';\nimport { isLocalPackageSpecifier, loadMajorModesConfigLenient } from '@agimon-ai/po-config/majorModes';\nimport {\n  createWorkspaceRegistry,\n  identifyWorkspace,\n  localWorkspaceRecords,\n  readWorkspaceMarker,\n  type WorkspaceRegistry,\n  writeWorkspaceMarker,\n} from '@agimon-ai/po-core/history';\nimport { splitPackageSpecifier, testPackageRoot } from '@agimon-ai/po-core/moduleResolution';\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { piAgentDirectory } from '@agimon-ai/po-core/piSettings';\nimport { BACKGROUND_CONTEXT, writeFileAtomic } from '@agimon-ai/po-core/platform';\n\nimport { poPackageRoot } from '../../builders/cli/entryResolution';\nimport { rootCompositions } from '../../builders/cli/sessionComposition';\nimport { ensureGlobalNativeBuild } from '../../builders/native';\nimport { ensureMcpAppBuild, mcpAppKey } from '../../builders/server/mcpAppBuild';\nimport { mcpPluginCandidates } from '../../builders/server/mcpBundle';\nimport {\n  BUILD_RECORD,\n  compositionPackageRoots,\n  duplicatePluginCopies,\n  ensureGlobalWebBuild,\n  webHostVersion,\n} from '../../builders/web';\nimport {\n  catalogInstallSpecifiers,\n  catalogPackageRoots,\n  ensureLayerPackages,\n  type LayerPackageResult,\n  packageCatalogHash,\n  runtimeLayerPackageSpecifiers,\n} from '../layerPackageInstaller';\nimport { pruneAfterSync, type SyncPruneInput } from '../syncPrune';\nimport { buildLocalPackages, type LocalPackage, localBuildStamp } from './localBuilds';\n\nexport { localBuildStamp } from './localBuilds';\n\n/**\n * The sync service: installs what the configuration names, ensures the global builds,\n * prunes, and reports what happened as one `SyncReport`.\n *\n * The roots are the Po home, every registered workspace whose folder exists, and the\n * repository sync runs from, which it registers. One install covers the catalogue and every\n * root's published packages. When the signature over the catalogue, each root's selection,\n * each local package's build stamp and the host identity (the po package and po-web host\n * versions) matches `current.json` and every artifact it names exists, sync returns `noop`\n * without installing or building. The pointer records that identity, so a server from another\n * Po install can tell the build is not its own.\n *\n * Only one sync runs at a time per Po home, guarded by `<po home>/build/.sync.lock`. A CLI\n * run that finds the lock held reports `busy`. A background run instead leaves\n * `.sync.rerun`, and the holder runs once more, so the background request is never lost.\n */\n\nconst BUILD_DIRECTORY = 'build';\nconst LOCK_FILE = '.sync.lock';\nconst RERUN_FILE = '.sync.rerun';\nconst POINTER_FILE = 'current.json';\nconst LAST_ATTEMPT_FILE = 'last-attempt.json';\nconst MCP_APP_FILE = 'index.html';\nconst ROOTS_LABEL = 'roots';\nconst PACKAGES_LABEL = 'packages';\nconst WEB_LABEL = 'web';\nconst NATIVE_LABEL = 'native';\nconst MCP_LABEL = 'mcp app';\nconst ARTIFACT_BUILDS_SKIPPED = 'skipped (--skip-artifact-builds)';\nconst NATIVE_DEFERRED = 'deferred until a native client connects';\nconst MCP_DEFERRED = 'deferred until a session needs MCP widgets';\nconst PRUNE_LABEL = 'prune';\nconst LOCAL_LABEL = 'local';\nconst BYTES_PER_MEGABYTE = 1024 * 1024;\n/** A lock file younger than this that cannot be parsed is still being written by its owner. */\nconst UNREADABLE_LOCK_GRACE_MS = 10_000;\nconst NO_SUCH_PROCESS = 'ESRCH';\n/**\n * Bumped when the pointer gains a field a reader relies on, so an older pointer never matches\n * the fast-exit signature and the next sync rewrites it. 2: per-root `fingerprints`. 3: `host`.\n */\nconst SIGNATURE_FORMAT = 3;\nconst PACKAGE_MANIFEST = 'package.json';\nconst ALREADY_EXISTS = 'EEXIST';\nconst NO_SUCH_FILE = 'ENOENT';\n\nexport const SYNC_EXIT_OK = 0;\nexport const SYNC_EXIT_FAILED = 1;\n/** EX_TEMPFAIL: another sync holds the lock. */\nexport const SYNC_EXIT_BUSY = 75;\n\nexport type SyncOrigin = 'cli' | 'background';\nexport type SyncStatus = 'ok' | 'noop' | 'partial' | 'failed' | 'busy';\n/** A build a pass may leave to a later one, because only some clients need it. */\nexport type DeferredArtifact = 'native' | 'mcp-app';\n\nexport interface SyncResult {\n  packages: Pick<LayerPackageResult, 'installed' | 'updated' | 'unchecked'>;\n  /** The global web build key, or why there is none. */\n  web: { status: 'built' | 'cached'; key: string } | { status: 'skipped'; reason: string };\n  /** The global native build key, or why there is none. */\n  native?: { status: 'built' | 'cached'; key: string } | { status: 'skipped'; reason: string };\n  /** The MCP app build keys, comma separated, when any root's packages declare MCP UI widgets. */\n  mcpApp?: string;\n}\n\nexport interface SyncRootReport {\n  root: string;\n  status: 'ok' | 'partial' | 'failed';\n  unsynced: { selector: string; reason: string; stderr?: string[] }[];\n}\n\nexport interface SyncReport {\n  status: SyncStatus;\n  /** Assigned once sync writes a pointer; null until then. */\n  generation: number | null;\n  /** Assigned once sync computes the fast-exit signature; null until then. */\n  catalogueHash: string | null;\n  webKey: string | null;\n  mcpKeys: string[];\n  roots: SyncRootReport[];\n  /** External commands sync ran, such as local package builds. */\n  commands: string[];\n  errors: string[];\n  finishedAt: string;\n}\n\n/** One progress event; the CLI renders these as text or as JSON lines. */\nexport type SyncEvent =\n  | { type: 'start'; label: string; message: string }\n  | { type: 'line'; label: string; message: string }\n  | { type: 'done'; label: string; summary: string }\n  | { type: 'result'; result: SyncResult };\n\nexport interface SyncLockHolder {\n  pid: number;\n  /** Unique per acquisition, so a holder can tell its lock from a later one, even under its pid. */\n  token?: string;\n  startedAt: string;\n  origin: SyncOrigin;\n}\n\nexport interface SyncOptions {\n  homeDirectory: string;\n  environment: NodeJS.ProcessEnv;\n  /** The Po home every global build and the lock live under. */\n  globalRoot: string;\n  /**\n   * The repository sync runs from: registered as a workspace and synced as a root.\n   * Undefined with `--global`, which registers nothing.\n   */\n  repoRoot?: string;\n  origin: SyncOrigin;\n  onEvent?: (event: SyncEvent) => void;\n  /**\n   * Installs packages and builds local ones, but skips the web, native and MCP app builds. The pointer\n   * still moves, naming no build. A contained server runs sync this way, because its host serves the UI.\n   */\n  skipArtifactBuilds?: boolean;\n  /**\n   * Builds this pass leaves to a later one. The pointer keeps the previous pointer's builds of\n   * that kind that still exist, so they keep serving (and survive prune) until a pass builds it.\n   */\n  deferArtifacts?: readonly DeferredArtifact[];\n}\n\nexport interface SyncDeps {\n  install: typeof ensureLayerPackages;\n  buildWeb: typeof ensureGlobalWebBuild;\n  buildNative: typeof ensureGlobalNativeBuild;\n  bundleMcpApp: typeof ensureMcpAppBuild;\n  prune: typeof pruneAfterSync;\n  /** Whether a lock holder's process still runs. */\n  isAlive: (pid: number) => boolean;\n  pid: number;\n  now: () => Date;\n}\n\n/** `process.kill(pid, 0)` probes without signalling; only ESRCH means the process is gone. */\nexport function processIsAlive(pid: number): boolean {\n  try {\n    process.kill(pid, 0);\n    return true;\n  } catch (error) {\n    // EPERM means it runs under another user, which still holds the lock.\n    return (error as NodeJS.ErrnoException).code !== NO_SUCH_PROCESS;\n  }\n}\n\nconst DEFAULT_DEPS: SyncDeps = {\n  install: ensureLayerPackages,\n  buildWeb: ensureGlobalWebBuild,\n  buildNative: ensureGlobalNativeBuild,\n  bundleMcpApp: ensureMcpAppBuild,\n  prune: pruneAfterSync,\n  isAlive: processIsAlive,\n  pid: process.pid,\n  now: () => new Date(),\n};\n\nexport function syncExitCode(status: SyncStatus): number {\n  if (status === 'busy') return SYNC_EXIT_BUSY;\n  return status === 'ok' || status === 'noop' ? SYNC_EXIT_OK : SYNC_EXIT_FAILED;\n}\n\nexport function syncLockPath(globalRoot: string): string {\n  return path.join(globalRoot, BUILD_DIRECTORY, LOCK_FILE);\n}\n\nexport function syncRerunPath(globalRoot: string): string {\n  return path.join(globalRoot, BUILD_DIRECTORY, RERUN_FILE);\n}\n\nfunction pluralize(count: number, noun: string): string {\n  return `${String(count)} ${noun}${count === 1 ? '' : 's'}`;\n}\n\nfunction errorMessage(error: unknown): string {\n  return error instanceof Error ? error.message : String(error);\n}\n\nfunction packageSummary(result: SyncResult['packages']): string {\n  const parts: string[] = [];\n  if (result.updated.length > 0) parts.push(`updated ${pluralize(result.updated.length, 'package')}`);\n  if (result.installed.length > 0) parts.push(`installed ${pluralize(result.installed.length, 'missing package')}`);\n  if (parts.length === 0) parts.push('already up to date');\n  if (result.unchecked.length > 0) parts.push(`${pluralize(result.unchecked.length, 'package')} left unchecked`);\n  return parts.join(', ');\n}\n\nexport function formatSyncResult(result: SyncResult): string {\n  return [\n    `packages: ${packageSummary(result.packages)}`,\n    `web:      ${result.web.status === 'skipped' ? result.web.reason : `${result.web.key} (${result.web.status})`}`,\n    ...(result.native === undefined\n      ? []\n      : [\n          `native:   ${result.native.status === 'skipped' ? result.native.reason : `${result.native.key} (${result.native.status})`}`,\n        ]),\n    ...(result.mcpApp === undefined ? [] : [`mcp app:  ${result.mcpApp}`]),\n    '',\n  ].join('\\n');\n}\n\nfunction workspaceRegistry(\n  homeDirectory: string,\n  environment: NodeJS.ProcessEnv,\n  onNotice: (message: string) => void,\n): WorkspaceRegistry {\n  return createWorkspaceRegistry({\n    directory: path.join(piAgentDirectory(environment, homeDirectory), 'server'),\n    onNotice,\n  });\n}\n\ntype RootCompositions = ReturnType<typeof rootCompositions>;\n\n/**\n * Each root's compositions, resolved the way the server resolves them: a selection that does\n * not resolve yet (an unbuilt local package, say) is left out with a diagnostic instead of\n * failing the whole root, so sync and the server derive the same web, MCP and fingerprint\n * inputs. A root that cannot be composed at all maps to why.\n */\nfunction composeRoots(\n  roots: readonly string[],\n  homeDirectory: string,\n  environment: NodeJS.ProcessEnv,\n): Map<string, RootCompositions | Error> {\n  return new Map(\n    roots.map((root): [string, RootCompositions | Error] => {\n      try {\n        return [root, rootCompositions({ root, homeDirectory, environment, tolerateUnsynced: true })];\n      } catch (error) {\n        return [root, error instanceof Error ? error : new Error(String(error))];\n      }\n    }),\n  );\n}\n\n/** Each root's composition package roots; a root that cannot be composed is left out with a notice. */\nasync function packageRootsByRoot(\n  composed: ReadonlyMap<string, RootCompositions | Error>,\n  onNotice: (message: string) => void,\n): Promise<Map<string, string[]>> {\n  return new Map(\n    await Promise.all(\n      [...composed].map(async ([root, compositions]): Promise<[string, string[]]> => {\n        if (!(compositions instanceof Error)) return [root, await compositionPackageRoots(compositions)];\n        onNotice(`'${root}' is left out of the web build: ${compositions.message}`);\n        return [root, []];\n      }),\n    ),\n  );\n}\n\n/** The selectors a lenient composition left out, each once with the first diagnostic that explains it. */\nfunction skippedSelections(compositions: RootCompositions): SyncRootReport['unsynced'] {\n  const skipped = new Map<string, string>();\n  for (const composition of compositions)\n    for (const selection of composition.selections)\n      if (selection.outcome === 'missing-optional' && !selection.optional && !skipped.has(selection.selector))\n        skipped.set(selection.selector, selection.diagnostic ?? 'it does not resolve');\n  return [...skipped].map(([selector, reason]) => ({ selector, reason }));\n}\n\n/**\n * The plugin roots one global web build covers: every installed catalogue package, so each\n * first-party plugin has a slot whether or not a config names it yet, then each root's own\n * composition package roots. Sync builds with these and the server derives the same key.\n */\nasync function webPluginRootsOf(\n  globalRoot: string,\n  rootPackageRoots: ReadonlyMap<string, readonly string[]>,\n  environment: NodeJS.ProcessEnv,\n): Promise<string[]> {\n  return [...(await catalogPackageRoots(globalRoot, environment)), ...[...rootPackageRoots.values()].flat()];\n}\n\n/**\n * Every package root the global web build covers: the catalogue packages, the global root,\n * every workspace the server has admitted, and `targetRoot`, which the server admits when it\n * opens it. A root whose configuration cannot be read is left out with a notice, as sync\n * leaves it out of the build when it cannot compose it.\n */\nexport async function globalWebPluginRoots(\n  targetRoot: string,\n  homeDirectory: string,\n  environment: NodeJS.ProcessEnv,\n  onNotice: (message: string) => void,\n): Promise<string[]> {\n  const globalRoot = globalPoConfigDirectory(homeDirectory);\n  const records = workspaceRegistry(homeDirectory, environment, onNotice).list();\n  const admitted: string[] = [];\n  for (const workspace of localWorkspaceRecords(records))\n    if (\n      await fs.access(workspace.root).then(\n        () => true,\n        () => false,\n      )\n    )\n      admitted.push(workspace.root);\n  // The server admits `targetRoot` when it opens it, but never serves a sandboxed one on the host.\n  const sandboxedRoots = new Set(records.filter((record) => record.sandbox !== undefined).map((record) => record.root));\n  const roots = [...new Set([globalRoot, ...admitted, targetRoot])].filter((root) => !sandboxedRoots.has(root));\n  return webPluginRootsOf(\n    globalRoot,\n    await packageRootsByRoot(composeRoots(roots, homeDirectory, environment), onNotice),\n    environment,\n  );\n}\n\n/**\n * Registers the repository the way the server admits it, relocating its sibling workspaces\n * together after a move, and returns the workspace root it belongs to. A repository whose workspace\n * runs in a sandbox is left alone, and returns undefined: it is not re-added or renamed, and its\n * marker is neither read nor written, because the marker lives behind the repository's `.git`\n * pointer, which the sandbox can control.\n */\nasync function registerRepository(\n  registry: WorkspaceRegistry,\n  repoRoot: string,\n  onNotice: (message: string) => void,\n): Promise<string | undefined> {\n  const checkoutRoot = await fs.realpath(repoRoot);\n  if (registry.list().some((workspace) => workspace.root === checkoutRoot && workspace.sandbox !== undefined))\n    return undefined;\n  const { id, root, moved } = identifyWorkspace({\n    records: registry.list(),\n    checkoutRoot,\n    marker: readWorkspaceMarker(checkoutRoot),\n  });\n  const record = registry.list().find((workspace) => workspace.id === id);\n  if (record?.sandbox !== undefined) return undefined;\n  if (record === undefined) registry.add({ id, root });\n  if (moved && record !== undefined) {\n    const repositoryId = record.repositoryId ?? record.id;\n    for (const sibling of registry.list()) {\n      if (sibling.root !== record.root || (sibling.repositoryId ?? sibling.id) !== repositoryId) continue;\n      registry.add({ ...sibling, root });\n      onNotice(`workspace '${sibling.id}' moved to '${root}'`);\n    }\n  }\n  try {\n    if (readWorkspaceMarker(root) === undefined) writeWorkspaceMarker(root, id);\n  } catch (error) {\n    onNotice(`'${root}' id could not be recorded in its git data: ${errorMessage(error)}`);\n  }\n  return root;\n}\n\n/**\n * The roots this sync covers: the Po home, every registered workspace whose folder exists,\n * and the repository, registered first. Entries whose folder is gone are removed with a warning.\n */\nasync function resolveRoots(options: SyncOptions, progress: Steps): Promise<string[]> {\n  const notice = (message: string): void => progress.line(ROOTS_LABEL, message);\n  const registry = workspaceRegistry(options.homeDirectory, options.environment, notice);\n  const repository =\n    options.repoRoot === undefined || path.resolve(options.repoRoot) === path.resolve(options.globalRoot)\n      ? undefined\n      : await registerRepository(registry, options.repoRoot, notice);\n  const live: string[] = [];\n  for (const workspace of localWorkspaceRecords(registry.list())) {\n    if (\n      await fs.access(workspace.root).then(\n        () => true,\n        () => false,\n      )\n    ) {\n      live.push(workspace.root);\n      continue;\n    }\n    notice(`warning: removed workspace '${workspace.id}': '${workspace.root}' no longer exists`);\n    registry.remove(workspace.id);\n  }\n  return [...new Set([options.globalRoot, ...live, ...(repository === undefined ? [] : [repository])])];\n}\n\n/** Local-path selections and checkout test overrides, stamped and built by the same local build pipeline. */\nfunction localPackages(\n  config: ReturnType<typeof loadMajorModesConfigLenient>['config'],\n  environment: NodeJS.ProcessEnv,\n): LocalPackage[] {\n  const definitions = [...(config.default ? [config.default] : []), ...Object.values(config.layers)];\n  const packages = new Map<string, LocalPackage>();\n  for (const definition of definitions)\n    for (const configured of definition.packages ?? []) {\n      const selector = typeof configured === 'string' ? configured : configured.name;\n      const directory = isLocalPackageSpecifier(selector)\n        ? path.resolve(definition.baseDirectory, selector)\n        : testPackageRoot(splitPackageSpecifier(selector).name, environment);\n      if (directory === undefined) continue;\n      if (!packages.has(directory)) packages.set(directory, { selector, directory });\n    }\n  return [...packages.values()];\n}\n\n/**\n * SHA-256 over every mode's composition fingerprint, or why the root cannot be composed. The\n * pointer records it per root, so a server can tell a root whose selection changed since the\n * last sync by computing it again with the environment sync ran under.\n */\nexport function rootSelectionFingerprint(root: string, homeDirectory: string, environment: NodeJS.ProcessEnv): string {\n  try {\n    const fingerprints = rootCompositions({ root, homeDirectory, environment, tolerateUnsynced: true }).map(\n      (composition) => composition.fingerprint,\n    );\n    return crypto.createHash('sha256').update(fingerprints.join('\\n')).digest('hex');\n  } catch (error) {\n    return `unresolved:${errorMessage(error)}`;\n  }\n}\n\n/** The po package version this process runs from, or why it cannot be read. */\nasync function poPackageVersion(): Promise<string> {\n  try {\n    const manifest = JSON.parse(await fs.readFile(path.join(poPackageRoot(), PACKAGE_MANIFEST), 'utf8')) as {\n      version?: unknown;\n    };\n    return typeof manifest.version === 'string' ? manifest.version : 'unversioned';\n  } catch (error) {\n    return `unreadable:${errorMessage(error)}`;\n  }\n}\n\n/**\n * The Po install a sync or a server runs from: its po package version and the po-web host\n * version it builds with. Sync records it in the pointer; a server whose identity differs\n * refuses that pointer's builds and syncs with its own install.\n */\nexport async function syncHostIdentity(globalRoot: string, environment: NodeJS.ProcessEnv): Promise<string> {\n  const checkout =\n    environment.PO_TEST === '1' && environment.PO_TEST_PACKAGES\n      ? `+checkout@${crypto.createHash('sha256').update(environment.PO_TEST_PACKAGES).digest('hex')}`\n      : '';\n  return `po@${await poPackageVersion()}+po-web@${await webHostVersion(globalRoot, environment)}${checkout}`;\n}\n\n/** The fast-exit signature: catalogue hash, each root's selection and local build stamps, host identity. */\nasync function syncSignature(options: SyncOptions, roots: readonly string[], catalogueHash: string): Promise<string> {\n  const { homeDirectory, environment } = options;\n  const value = {\n    format: SIGNATURE_FORMAT,\n    catalogueHash,\n    roots: await Promise.all(\n      roots.map(async (root) => ({\n        root,\n        selection: rootSelectionFingerprint(root, homeDirectory, environment),\n        local: await Promise.all(\n          localPackages(loadMajorModesConfigLenient(root, homeDirectory, environment).config, environment).map(\n            async ({ directory }) => [directory, await localBuildStamp(directory)],\n          ),\n        ),\n      })),\n    ),\n    host: await syncHostIdentity(options.globalRoot, environment),\n    // A pass without builds never stands in for one with them.\n    ...(options.skipArtifactBuilds === true ? { skipArtifactBuilds: true } : {}),\n  };\n  return crypto.createHash('sha256').update(JSON.stringify(value)).digest('hex');\n}\n\n/** `current.json`: the last successful report minus its transient fields, plus what fast exit needs. */\nexport interface SyncPointer {\n  generation: number;\n  signature: string;\n  catalogueHash: string;\n  webKey: string | null;\n  nativeKey: string | null;\n  mcpKeys: string[];\n  roots: SyncRootReport[];\n  commands: string[];\n  /** Each root's `rootSelectionFingerprint` at the time of the sync; absent in older pointers. */\n  fingerprints?: Record<string, string>;\n  /** The `syncHostIdentity` of the install that wrote the pointer; absent in older pointers. */\n  host?: string;\n  /** The builds this pass deferred; their keys were carried from an earlier pass and may be stale. */\n  deferred?: DeferredArtifact[];\n}\n\nexport function syncPointerPath(globalRoot: string): string {\n  return path.join(globalRoot, BUILD_DIRECTORY, POINTER_FILE);\n}\n\nexport function syncLastAttemptPath(globalRoot: string): string {\n  return path.join(globalRoot, BUILD_DIRECTORY, LAST_ATTEMPT_FILE);\n}\n\n/** The current pointer, or undefined when sync has not written one yet or it is unreadable. */\nexport async function readSyncPointer(globalRoot: string): Promise<SyncPointer | undefined> {\n  try {\n    const parsed = JSON.parse(await fs.readFile(syncPointerPath(globalRoot), 'utf8')) as Partial<SyncPointer>;\n    return typeof parsed.signature === 'string' && typeof parsed.generation === 'number'\n      ? (parsed as SyncPointer)\n      : undefined;\n  } catch {\n    // Missing or unreadable: there is nothing to fast-exit against.\n    return undefined;\n  }\n}\n\n/** The files whose presence proves each artifact a pointer names is complete. */\nfunction pointerArtifacts(\n  globalRoot: string,\n  pointer: Pick<SyncPointer, 'webKey' | 'nativeKey' | 'mcpKeys'>,\n): string[] {\n  const build = path.join(globalRoot, BUILD_DIRECTORY);\n  return [\n    ...(pointer.webKey === null ? [] : [path.join(build, WEB_LABEL, pointer.webKey, BUILD_RECORD)]),\n    ...(pointer.nativeKey === null ? [] : [path.join(build, NATIVE_LABEL, pointer.nativeKey, BUILD_RECORD)]),\n    ...pointer.mcpKeys.map((key) => path.join(build, 'mcp-app', key, MCP_APP_FILE)),\n  ];\n}\n\n/** Whether every artifact `pointer` names exists. */\nasync function artifactsExist(\n  globalRoot: string,\n  pointer: Pick<SyncPointer, 'webKey' | 'nativeKey' | 'mcpKeys'>,\n): Promise<boolean> {\n  const present = await Promise.all(\n    pointerArtifacts(globalRoot, pointer).map((file) =>\n      fs.access(file).then(\n        () => true,\n        () => false,\n      ),\n    ),\n  );\n  return present.every(Boolean);\n}\n\n/** The report of the last sync attempt, successful or not, or undefined when there is none. */\nexport async function readSyncLastAttempt(globalRoot: string): Promise<SyncReport | undefined> {\n  try {\n    const parsed = JSON.parse(await fs.readFile(syncLastAttemptPath(globalRoot), 'utf8')) as Partial<SyncReport>;\n    return Array.isArray(parsed.roots) ? (parsed as SyncReport) : undefined;\n  } catch {\n    // Missing or unreadable: no attempt to report reasons from.\n    return undefined;\n  }\n}\n\nasync function writeJsonFile(file: string, value: unknown): Promise<void> {\n  await writeFileAtomic(\n    createNodePlatform().env(path.dirname(file)),\n    file,\n    `${JSON.stringify(value, null, 2)}\\n`,\n    BACKGROUND_CONTEXT,\n  );\n}\n\ntype LockAttempt = { acquired: true; token: string } | { acquired: false; holder: SyncLockHolder | undefined };\n\nasync function readHolder(lockPath: string): Promise<SyncLockHolder | undefined> {\n  try {\n    const parsed = JSON.parse(await fs.readFile(lockPath, 'utf8')) as Partial<SyncLockHolder>;\n    return typeof parsed.pid === 'number' ? (parsed as SyncLockHolder) : undefined;\n  } catch {\n    // Missing or half-written: the caller decides from the file's age.\n    return undefined;\n  }\n}\n\nasync function lockIsStale(lockPath: string, deps: SyncDeps): Promise<boolean> {\n  const holder = await readHolder(lockPath);\n  if (holder !== undefined) return !deps.isAlive(holder.pid);\n  try {\n    return deps.now().getTime() - (await fs.stat(lockPath)).mtimeMs > UNREADABLE_LOCK_GRACE_MS;\n  } catch {\n    // Gone between the failed create and this check: free to retry.\n    return true;\n  }\n}\n\nasync function tryCreateLock(lockPath: string, holder: SyncLockHolder): Promise<boolean> {\n  try {\n    const descriptor = await fs.open(lockPath, 'wx');\n    try {\n      await descriptor.writeFile(JSON.stringify(holder));\n    } finally {\n      await descriptor.close();\n    }\n    return true;\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code === ALREADY_EXISTS) return false;\n    throw error;\n  }\n}\n\n/**\n * Takes over a lock judged stale. Removing it by path could remove a lock another taker created\n * since the check, so it is first renamed to a name only this process knows and checked again\n * there: a lock that turns out live is linked back (link never replaces), a stale one is dropped\n * before the exclusive create, which at most one taker wins.\n */\nasync function takeOverStaleLock(lockPath: string, holder: SyncLockHolder, deps: SyncDeps): Promise<boolean> {\n  const moved = `${lockPath}.${String(deps.pid)}.${crypto.randomUUID()}.stale`;\n  try {\n    await fs.rename(lockPath, moved);\n  } catch (error) {\n    // Already gone: released, or moved by another taker; the create decides.\n    if ((error as NodeJS.ErrnoException).code === NO_SUCH_FILE) return tryCreateLock(lockPath, holder);\n    throw error;\n  }\n  try {\n    if (!(await lockIsStale(moved, deps))) {\n      try {\n        await fs.link(moved, lockPath);\n      } catch (error) {\n        if ((error as NodeJS.ErrnoException).code !== ALREADY_EXISTS) throw error;\n      }\n      return false;\n    }\n  } finally {\n    await fs.rm(moved, { force: true });\n  }\n  return tryCreateLock(lockPath, holder);\n}\n\n/** Creates the lock, taking over one whose holder is dead. Never inspects other processes beyond `kill(pid, 0)`. */\nasync function acquireLock(lockPath: string, origin: SyncOrigin, deps: SyncDeps): Promise<LockAttempt> {\n  await fs.mkdir(path.dirname(lockPath), { recursive: true });\n  const token = crypto.randomUUID();\n  const holder: SyncLockHolder = { pid: deps.pid, token, startedAt: deps.now().toISOString(), origin };\n  if (await tryCreateLock(lockPath, holder)) return { acquired: true, token };\n  // A racing taker that wins the takeover makes this attempt report busy, as it should.\n  if ((await lockIsStale(lockPath, deps)) && (await takeOverStaleLock(lockPath, holder, deps)))\n    return { acquired: true, token };\n  return { acquired: false, holder: await readHolder(lockPath) };\n}\n\n/**\n * The lock as the holder with `token` sees it: undefined while the lock still names it, else\n * the busy report to stop with. A takeover that moved a live lock aside can let a third taker\n * create a new one, so a holder checks before each step whose overlap would do harm.\n */\nasync function lostLock(lockPath: string, token: string, deps: SyncDeps): Promise<SyncReport | undefined> {\n  const holder = await readHolder(lockPath);\n  if (holder?.token === token) return undefined;\n  const by = holder === undefined ? 'another process' : `pid ${String(holder.pid)}`;\n  return emptyReport('busy', [`po sync lost its lock to ${by}`], deps);\n}\n\nasync function releaseLock(lockPath: string, token: string): Promise<void> {\n  if ((await readHolder(lockPath))?.token === token) await fs.rm(lockPath, { force: true });\n}\n\n/** Serializes runtime npm imports with sync, including sync's child process. */\nexport async function withSyncLock<T>(\n  globalRoot: string,\n  signal: AbortSignal | undefined,\n  action: () => Promise<T>,\n): Promise<T> {\n  const waiting = AbortSignal.any([AbortSignal.timeout(120_000), ...(signal ? [signal] : [])]);\n  const lockPath = syncLockPath(globalRoot);\n  for (;;) {\n    waiting.throwIfAborted();\n    const lock = await acquireLock(lockPath, 'background', DEFAULT_DEPS);\n    if (!lock.acquired) {\n      await wait(50, undefined, { signal: waiting });\n      continue;\n    }\n    try {\n      waiting.throwIfAborted();\n      if ((await readHolder(lockPath))?.token !== lock.token) continue;\n      // upm cannot abort safely. Keep the lock until installation settles.\n      return await action();\n    } finally {\n      await releaseLock(lockPath, lock.token);\n    }\n  }\n}\n\n/** Consumes the rerun marker; true when a background run asked for another pass. */\nasync function takeRerunRequest(rerunPath: string): Promise<boolean> {\n  try {\n    await fs.unlink(rerunPath);\n    return true;\n  } catch (error) {\n    if ((error as NodeJS.ErrnoException).code === NO_SUCH_FILE) return false;\n    throw error;\n  }\n}\n\nfunction emptyReport(status: SyncStatus, errors: string[], deps: SyncDeps): SyncReport {\n  return {\n    status,\n    generation: null,\n    catalogueHash: null,\n    webKey: null,\n    mcpKeys: [],\n    roots: [],\n    commands: [],\n    errors,\n    finishedAt: deps.now().toISOString(),\n  };\n}\n\n/** A step reporter over the event stream, mirroring the presenter's start/done/line. */\nfunction steps(emit: (event: SyncEvent) => void) {\n  return {\n    start(label: string, message: string): (summary: string) => void {\n      emit({ type: 'start', label, message });\n      return (summary) => emit({ type: 'done', label, summary });\n    },\n    line(label: string, message: string): void {\n      emit({ type: 'line', label, message });\n    },\n  };\n}\n\ntype Steps = ReturnType<typeof steps>;\n\n/**\n * Drops old builds and unreferenced store content once installs and builds are done.\n * Never fatal: a failed prune leaves everything for the next explicit sync.\n */\nasync function pruneStep(progress: Steps, prune: SyncDeps['prune'], input: SyncPruneInput): Promise<void> {\n  const done = progress.start(PRUNE_LABEL, 'dropping old builds and unused packages');\n  try {\n    const result = await prune(input);\n    const runtime =\n      'skipped' in result.runtime\n        ? result.runtime.skipped\n        : `${(result.runtime.bytes / BYTES_PER_MEGABYTE).toFixed(1)} MB of packages released`;\n    done(`removed ${pluralize(result.builds.length, 'old build')}, ${runtime}`);\n  } catch (error) {\n    done(`failed: ${errorMessage(error)}`);\n  }\n}\n\n/** A path with its symlinks resolved, or as given when it does not exist. */\nasync function realPath(file: string): Promise<string> {\n  try {\n    return await fs.realpath(file);\n  } catch {\n    // Missing: compare it as written.\n    return path.resolve(file);\n  }\n}\n\n/**\n * Whether the MCP app build the server will look for exists for every root. Its key hashes the\n * widget packages' built files, which the signature does not cover, so a rebuilt `dist/` moves\n * the key without moving the signature.\n */\nasync function mcpAppsBuilt(\n  globalRoot: string,\n  roots: readonly string[],\n  homeDirectory: string,\n  environment: NodeJS.ProcessEnv,\n): Promise<boolean> {\n  for (const compositions of composeRoots(roots, homeDirectory, environment).values()) {\n    if (compositions instanceof Error) continue;\n    let key: string | undefined;\n    try {\n      key = await mcpAppKey(await mcpPluginCandidates(compositions));\n    } catch {\n      // A widget package that cannot be read: not built; the full pass reports why.\n      return false;\n    }\n    if (\n      key !== undefined &&\n      !(await fs.access(path.join(globalRoot, BUILD_DIRECTORY, 'mcp-app', key, MCP_APP_FILE)).then(\n        () => true,\n        () => false,\n      ))\n    )\n      return false;\n  }\n  return true;\n}\n/**\n * One sync pass under the lock. A failed step ends the pass with a `failed` report and leaves\n * the pointer alone; a lock that no longer names this holder (`lost`) ends it as busy.\n */\nasync function syncOnce(\n  options: SyncOptions,\n  deps: SyncDeps,\n  emit: (event: SyncEvent) => void,\n  lost: () => Promise<SyncReport | undefined>,\n): Promise<SyncReport> {\n  const { homeDirectory, environment, globalRoot } = options;\n  const progress = steps(emit);\n  const commands: string[] = [];\n  const roots = await resolveRoots(options, progress);\n  const catalogueHash = await packageCatalogHash(environment);\n  const previous = await readSyncPointer(globalRoot);\n  const skipBuilds = options.skipArtifactBuilds === true;\n  // Deferring means nothing when no artifact is built at all.\n  const deferred = new Set(skipBuilds ? [] : (options.deferArtifacts ?? []));\n  if (\n    previous !== undefined &&\n    // Unsynced selectors are retried only when a person runs sync: with an unchanged signature a\n    // background retry repeats the same failure, while something outside the signature (a package\n    // manager installed since) is what a manual `po sync` is for. The pointer keeps the reasons.\n    (options.origin === 'background' || previous.roots.every((root) => root.unsynced.length === 0)) &&\n    previous.signature === (await syncSignature(options, roots, catalogueHash)) &&\n    // A pointer that deferred a build this pass wants is not current; one that built more is.\n    (previous.deferred ?? []).every((kind) => deferred.has(kind)) &&\n    (await artifactsExist(globalRoot, previous)) &&\n    (skipBuilds || deferred.has('mcp-app') || (await mcpAppsBuilt(globalRoot, roots, homeDirectory, environment)))\n  ) {\n    progress.line(ROOTS_LABEL, `nothing changed since generation ${String(previous.generation)}`);\n    return {\n      ...emptyReport('noop', [], deps),\n      generation: previous.generation,\n      catalogueHash,\n      webKey: previous.webKey,\n      mcpKeys: previous.mcpKeys,\n      roots: previous.roots,\n    };\n  }\n  const unsynced = new Map<string, SyncRootReport['unsynced']>(roots.map((root) => [root, []]));\n  const report = (status: 'ok' | 'failed', errors: string[], webKey: string | null, mcpKeys: string[]) => {\n    const rootReports = roots.map((root): SyncRootReport => {\n      const entries = unsynced.get(root) ?? [];\n      return { root, status: status === 'ok' && entries.length > 0 ? 'partial' : status, unsynced: entries };\n    });\n    const partial = status === 'ok' && rootReports.some((root) => root.status === 'partial');\n    return {\n      ...emptyReport(partial ? 'partial' : status, errors, deps),\n      generation: previous?.generation ?? null,\n      catalogueHash,\n      webKey,\n      mcpKeys,\n      roots: rootReports,\n      commands,\n    };\n  };\n\n  const lostBeforeInstall = await lost();\n  if (lostBeforeInstall !== undefined) return lostBeforeInstall;\n  const packagesDone = progress.start(PACKAGES_LABEL, 'checking configured packages for updates');\n  let packages: SyncResult['packages'];\n  try {\n    const configOf = (root: string) => loadMajorModesConfigLenient(root, homeDirectory, environment).config;\n    const globalConfig = configOf(globalRoot);\n    // One install covers the catalogue and every package some root does not get from its own\n    // node_modules, including those the runtime already provides; the runtime manifest declares\n    // exactly those, so pruning can drop anything no root needs. A name a root resolves from its\n    // own node_modules stays out, so a workspace's local copy is never shadowed by, or blocked\n    // on, a registry install.\n    const specifiers = new Set(await catalogInstallSpecifiers(environment));\n    for (const root of roots) {\n      const config = configOf(root);\n      for (const specifier of await runtimeLayerPackageSpecifiers(config, Object.keys(config.layers), root))\n        specifiers.add(specifier);\n    }\n    packages = await deps.install({\n      repoRoot: globalRoot,\n      config: globalConfig,\n      // Every declared layer, so a later mode switch finds its packages installed.\n      layers: Object.keys(globalConfig.layers),\n      environment,\n      // A background run never bumps versions; only a person running sync asks for updates.\n      refresh: options.origin === 'cli',\n      specifiers: [...specifiers],\n      exactManifest: true,\n      onProgress: (message) => progress.line(PACKAGES_LABEL, message),\n    });\n  } catch (error) {\n    packagesDone('failed');\n    return report('failed', [`Installing packages failed: ${errorMessage(error)}`], null, []);\n  }\n  packagesDone(packageSummary(packages));\n\n  const localByRoot = new Map(\n    roots.map((root) => [\n      root,\n      localPackages(loadMajorModesConfigLenient(root, homeDirectory, environment).config, environment),\n    ]),\n  );\n  const localDirectories = [...localByRoot.values()].flat().map(({ directory }) => directory);\n  if (localDirectories.length > 0) {\n    const localDone = progress.start(LOCAL_LABEL, 'building local packages');\n    const outcomes = await buildLocalPackages({\n      globalRoot,\n      environment,\n      directories: localDirectories,\n      onCommand: (command) => commands.push(command),\n      onNotice: (message) => progress.line(LOCAL_LABEL, message),\n    });\n    let failed = 0;\n    for (const [root, packagesOfRoot] of localByRoot)\n      for (const { selector, directory } of packagesOfRoot) {\n        const outcome = outcomes.get(directory);\n        if (outcome?.status !== 'failed') continue;\n        unsynced.get(root)?.push({\n          selector,\n          reason: outcome.reason,\n          ...(outcome.stderr === undefined ? {} : { stderr: outcome.stderr }),\n        });\n      }\n    for (const outcome of outcomes.values()) if (outcome.status === 'failed') failed += 1;\n    localDone(failed === 0 ? `${pluralize(outcomes.size, 'package')} ready` : `${String(failed)} failed`);\n  }\n\n  const composed = composeRoots(roots, homeDirectory, environment);\n  // What a root's selection leaves out still syncs the rest of the root; each is reported once.\n  for (const [root, compositions] of composed) {\n    if (compositions instanceof Error) continue;\n    const entries = unsynced.get(root) ?? [];\n    for (const skipped of skippedSelections(compositions))\n      if (!entries.some((entry) => entry.selector === skipped.selector)) entries.push(skipped);\n  }\n\n  const webDone = progress.start(WEB_LABEL, 'ensuring the global web build');\n  let rootPackageRoots = await packageRootsByRoot(composed, (message) => progress.line(WEB_LABEL, message));\n  const buildWeb = async (packageRoots: Map<string, string[]>) =>\n    deps.buildWeb({\n      poHome: globalRoot,\n      pluginRoots: await webPluginRootsOf(globalRoot, packageRoots, environment),\n      environment,\n      onNotice: (message) => progress.line(WEB_LABEL, message),\n    });\n  let built: Awaited<ReturnType<typeof buildWeb>> = skipBuilds\n    ? { status: 'skipped', reason: ARTIFACT_BUILDS_SKIPPED }\n    : await buildWeb(rootPackageRoots);\n  if (built.status === 'failed') {\n    // A local copy is the likeliest cause; one retry without them keeps the rest serving.\n    const local = new Set(await Promise.all(localDirectories.map(realPath)));\n    const withoutLocal = new Map<string, string[]>();\n    for (const [root, packageRoots] of rootPackageRoots) {\n      const resolved = await Promise.all(packageRoots.map(realPath));\n      withoutLocal.set(\n        root,\n        packageRoots.filter((_, index) => !local.has(resolved[index]!)),\n      );\n    }\n    const leftOut = [...rootPackageRoots].some(\n      ([root, packageRoots]) => withoutLocal.get(root)?.length !== packageRoots.length,\n    );\n    const retried = leftOut ? await buildWeb(withoutLocal) : built;\n    if (retried.status === 'failed') {\n      webDone('failed');\n      const retryReason = leftOut ? `; without local copies: ${retried.reason}` : '';\n      return report('failed', [`The global web build failed: ${built.reason}${retryReason}`], null, []);\n    }\n    for (const [root, packagesOfRoot] of localByRoot) {\n      const included = new Set(await Promise.all((rootPackageRoots.get(root) ?? []).map(realPath)));\n      const entries = unsynced.get(root) ?? [];\n      for (const { selector, directory } of packagesOfRoot)\n        if (included.has(await realPath(directory)) && !entries.some((entry) => entry.selector === selector))\n          entries.push({\n            selector,\n            reason: `left out of the web build, which failed with it: ${built.reason}`,\n          });\n    }\n    progress.line(WEB_LABEL, `built without local copies after: ${built.reason}`);\n    rootPackageRoots = withoutLocal;\n    built = retried;\n  }\n  const pluginRoots = await webPluginRootsOf(globalRoot, rootPackageRoots, environment);\n  const web: SyncResult['web'] = built.status === 'skipped' ? built : { status: built.status, key: built.build.key };\n  webDone(web.status === 'skipped' ? web.reason : `${web.key} (${web.status})`);\n  const webKey = web.status === 'skipped' ? null : web.key;\n\n  const nativeDone = progress.start(NATIVE_LABEL, 'ensuring the global native build');\n  const nativeBuilt: Awaited<ReturnType<SyncDeps['buildNative']>> = skipBuilds\n    ? { status: 'skipped', reason: ARTIFACT_BUILDS_SKIPPED }\n    : deferred.has('native')\n      ? { status: 'skipped', reason: NATIVE_DEFERRED }\n      : await deps.buildNative({\n          poHome: globalRoot,\n          pluginRoots,\n          onNotice: (message) => progress.line(NATIVE_LABEL, message),\n        });\n  if (nativeBuilt.status === 'failed') {\n    nativeDone('failed');\n    return report('failed', [`The global native build failed: ${nativeBuilt.reason}`], webKey, []);\n  }\n  const native: NonNullable<SyncResult['native']> =\n    nativeBuilt.status === 'skipped' ? nativeBuilt : { status: nativeBuilt.status, key: nativeBuilt.build.key };\n  nativeDone(native.status === 'skipped' ? native.reason : `${native.key} (${native.status})`);\n  let nativeKey = native.status === 'skipped' ? null : native.key;\n\n  // One MCP app build per root; its key is a content hash, so roots with one widget set share it.\n  const mcpDone = progress.start(MCP_LABEL, 'ensuring the MCP app build of each root');\n  let mcpKeys: string[] = [];\n  for (const [root, compositions] of skipBuilds || deferred.has('mcp-app') ? [] : composed) {\n    if (compositions instanceof Error) {\n      progress.line(MCP_LABEL, `'${root}' is left out of the MCP app build: ${compositions.message}`);\n      continue;\n    }\n    try {\n      const app = await deps.bundleMcpApp({ poHome: globalRoot, candidates: await mcpPluginCandidates(compositions) });\n      if (app !== undefined && !mcpKeys.includes(app.key)) mcpKeys.push(app.key);\n    } catch (error) {\n      unsynced.get(root)?.push({ selector: MCP_LABEL, reason: `the MCP app build failed: ${errorMessage(error)}` });\n    }\n  }\n  mcpDone(\n    skipBuilds\n      ? ARTIFACT_BUILDS_SKIPPED\n      : deferred.has('mcp-app')\n        ? MCP_DEFERRED\n        : mcpKeys.length === 0\n          ? 'no MCP UI widgets'\n          : mcpKeys.join(', '),\n  );\n  const mcpApp = mcpKeys.length === 0 ? undefined : mcpKeys.join(', ');\n\n  // A deferred kind keeps the previous builds that still exist, so they serve until a pass builds it.\n  if (deferred.has('native') && previous?.nativeKey)\n    if (await artifactsExist(globalRoot, { webKey: null, nativeKey: previous.nativeKey, mcpKeys: [] }))\n      nativeKey = previous.nativeKey;\n  if (deferred.has('mcp-app') && previous !== undefined) {\n    const present = await Promise.all(\n      previous.mcpKeys.map((key) => artifactsExist(globalRoot, { webKey: null, nativeKey: null, mcpKeys: [key] })),\n    );\n    mcpKeys = previous.mcpKeys.filter((_, index) => present[index]);\n  }\n\n  // The pointer names only artifacts that exist; a missing one keeps the previous pointer.\n  const artifacts = pointerArtifacts(globalRoot, { webKey, nativeKey, mcpKeys });\n  const present = await Promise.all(\n    artifacts.map((file) =>\n      fs.access(file).then(\n        () => true,\n        () => false,\n      ),\n    ),\n  );\n  const missing = artifacts.filter((_, index) => !present[index]);\n  if (missing.length > 0)\n    return report('failed', [`Build artifacts are missing: ${missing.join(', ')}`], webKey, mcpKeys);\n  // A root that names two copies of one plugin serves only one of them under its plugin id.\n  if (built.status !== 'skipped')\n    for (const [root, packageRoots] of rootPackageRoots)\n      for (const [pluginId, slots] of duplicatePluginCopies(built.build, packageRoots))\n        unsynced.get(root)?.push({\n          selector: pluginId,\n          reason: `two copies of plugin '${pluginId}' are selected (${slots.join(', ')})`,\n        });\n  const succeeded = report('ok', [], webKey, mcpKeys);\n  const generation = (previous?.generation ?? 0) + 1;\n  const pointer: SyncPointer = {\n    generation,\n    signature: await syncSignature(options, roots, catalogueHash),\n    catalogueHash,\n    webKey,\n    nativeKey,\n    mcpKeys,\n    roots: succeeded.roots,\n    commands,\n    fingerprints: Object.fromEntries(\n      roots.map((root) => [root, rootSelectionFingerprint(root, homeDirectory, environment)]),\n    ),\n    host: await syncHostIdentity(globalRoot, environment),\n    ...(deferred.size === 0 ? {} : { deferred: [...deferred].sort() }),\n  };\n  const lostBeforePointer = await lost();\n  if (lostBeforePointer !== undefined) return lostBeforePointer;\n  await writeJsonFile(syncPointerPath(globalRoot), pointer);\n\n  await pruneStep(progress, deps.prune, {\n    homeDirectory,\n    environment,\n    buildsRoot: globalRoot,\n    ...(webKey === null ? {} : { webKey }),\n    ...(nativeKey === null ? {} : { nativeKey }),\n    ...(mcpKeys.length === 0 ? {} : { mcpAppKeys: mcpKeys }),\n  });\n  emit({ type: 'result', result: { packages, web, native, ...(mcpApp === undefined ? {} : { mcpApp }) } });\n  return { ...succeeded, generation };\n}\n\n/**\n * One pass whose report lands in `last-attempt.json`, so a failed background run leaves its\n * reasons. A pass that lost the lock leaves the file to the holder that took it.\n */\nasync function attempt(\n  options: SyncOptions,\n  deps: SyncDeps,\n  emit: (event: SyncEvent) => void,\n  lost: () => Promise<SyncReport | undefined>,\n): Promise<SyncReport> {\n  let report: SyncReport;\n  try {\n    report = await syncOnce(options, deps, emit, lost);\n  } catch (error) {\n    report = emptyReport('failed', [`po sync failed: ${errorMessage(error)}`], deps);\n  }\n  if (report.status === 'busy') return report;\n  try {\n    await writeJsonFile(syncLastAttemptPath(options.globalRoot), report);\n  } catch (error) {\n    report = {\n      ...report,\n      errors: [...report.errors, `last-attempt.json could not be written: ${errorMessage(error)}`],\n    };\n  }\n  return report;\n}\n\n/**\n * Runs sync under the Po home lock and reports the outcome.\n *\n * Busy when another live sync holds the lock; a background caller leaves a rerun marker\n * first. The holder repeats its pass while a marker is present. A marker that lands after\n * its last check but before the release is caught after the release: the holder takes the\n * lock again and runs once more, or leaves the marker to whoever took the lock first.\n */\nexport async function runSync(options: SyncOptions, overrides: Partial<SyncDeps> = {}): Promise<SyncReport> {\n  const deps: SyncDeps = { ...DEFAULT_DEPS, ...overrides };\n  const emit = options.onEvent ?? ((): void => {});\n  const lockPath = syncLockPath(options.globalRoot);\n  const rerunPath = syncRerunPath(options.globalRoot);\n  let lock = await acquireLock(lockPath, options.origin, deps);\n  if (!lock.acquired) {\n    if (options.origin === 'background') await fs.writeFile(rerunPath, deps.now().toISOString());\n    const holder = lock.holder === undefined ? 'another process' : `pid ${String(lock.holder.pid)}`;\n    return emptyReport('busy', [`po sync is already running (${holder})`], deps);\n  }\n  for (;;) {\n    const { token } = lock;\n    const lost = () => lostLock(lockPath, token, deps);\n    let report: SyncReport;\n    try {\n      // A marker left before this pass started is satisfied by this pass.\n      await takeRerunRequest(rerunPath);\n      report = await attempt(options, deps, emit, lost);\n      // A pass that lost the lock leaves the rerun marker to the holder that took it.\n      while (report.status !== 'busy' && (await takeRerunRequest(rerunPath)))\n        report = await attempt(options, deps, emit, lost);\n    } finally {\n      await releaseLock(lockPath, token);\n    }\n    if (\n      report.status === 'busy' ||\n      !(await fs.access(rerunPath).then(\n        () => true,\n        () => false,\n      ))\n    )\n      return report;\n    lock = await acquireLock(lockPath, options.origin, deps);\n    if (!lock.acquired) return report;\n  }\n}\n","import { type ChildProcess, spawn as spawnProcess, type SpawnOptions } from 'node:child_process';\nimport path from 'node:path';\n\nimport { createNodePlatform } from '@agimon-ai/po-core/nodePlatform';\nimport { BACKGROUND_CONTEXT, type FileSystem, pathExists } from '@agimon-ai/po-core/platform';\n\nimport { HARNESS_STATE_KEYS, HARNESS_STATE_POINTER } from '../../composition/harnessState';\nimport { packageCatalogHash } from '../../composition/layerPackageInstaller';\nimport {\n  readSyncLastAttempt,\n  readSyncPointer,\n  rootSelectionFingerprint,\n  SYNC_EXIT_BUSY,\n  SYNC_EXIT_OK,\n  type DeferredArtifact,\n  type SyncPointer,\n  syncHostIdentity,\n} from '../../composition/syncService';\nimport { poPackageRoot } from '../cli/entryResolution';\n\n/**\n * Background sync: hosts that only read what sync prepared start `po sync --json --global` as\n * a child process when a root is out of date, and pick its artifacts up when it exits. The\n * terminal app instead syncs from its repository without `--global`, which registers it.\n *\n * At most one job runs per host. Requests that arrive while it runs merge into one rerun, and\n * nothing waits on a job, so admission and session open never block on sync.\n *\n * Native and MCP app builds are deferred until a request names them (a native client connected,\n * a session needs MCP widgets). From then on every job of this host builds them, so they stay current.\n *\n * ponytail: there is no fs.watch on `.po`, so a config edit syncs at the next checkpoint\n * (server start, admission, session open). Add a watcher if edits must apply sooner.\n */\n\n/** Set on every background sync child to the pid of the host that started it. */\nexport const SYNC_PARENT_PID_ENV = 'PO_SYNC_PARENT_PID';\n/** `PO_AUTO_SYNC=0` turns background sync off, for CI and the system test. */\nexport const AUTO_SYNC_ENV = 'PO_AUTO_SYNC';\nconst AUTO_SYNC_OFF = '0';\nconst ROOT_ENV = 'PO_ROOT';\nconst SYNC_ARGS = ['sync', '--json'] as const;\nconst GLOBAL_OPTION = '--global';\nconst SKIP_ARTIFACT_BUILDS_OPTION = '--skip-artifact-builds';\nconst DEFER_OPTIONS: Record<DeferredArtifact, string> = { native: '--defer-native', 'mcp-app': '--defer-mcp-app' };\nconst CLI_ENTRY_SEGMENTS = ['dist', 'bin', 'cli.mjs'] as const;\n\n/** The host pid a sync child was started by, or undefined when this process is not one. */\nexport function syncParentPid(environment: NodeJS.ProcessEnv): number | undefined {\n  const pid = Number(environment[SYNC_PARENT_PID_ENV]);\n  return Number.isInteger(pid) && pid > 0 ? pid : undefined;\n}\n\n/**\n * The environment a sync child runs under, and the one a host compares root fingerprints\n * with: no harness state and no root of the host's own, so both resolve every root alike.\n */\nexport function syncEnvironment(environment: NodeJS.ProcessEnv): NodeJS.ProcessEnv {\n  const scoped = { ...environment };\n  for (const key of [ROOT_ENV, HARNESS_STATE_POINTER, ...Object.values(HARNESS_STATE_KEYS)]) delete scoped[key];\n  return scoped;\n}\n\nfunction errorMessage(error: unknown): string {\n  return error instanceof Error ? error.message : String(error);\n}\n\nexport interface BackgroundSyncOptions {\n  files?: FileSystem;\n  environment: NodeJS.ProcessEnv;\n  onNotice: (message: string) => void;\n  /** Runs after each job's child exits, before a merged rerun starts. */\n  onExit?: (code: number | null) => void | Promise<void>;\n  /** Lets the child outlive this process, for a terminal app that exits before sync finishes. */\n  detached?: boolean;\n  /**\n   * The repository the child syncs from, without `--global`, so sync registers it as a workspace.\n   * Without one the child runs with `--global` and registers nothing.\n   */\n  repoRoot?: string;\n  /** Runs the child with `--skip-artifact-builds`: packages only, no web, native or MCP app build. */\n  skipArtifactBuilds?: boolean;\n  /** Test seams. */\n  spawn?: (command: string, args: readonly string[], options: SpawnOptions) => ChildProcess;\n  cliEntry?: string;\n  parentPid?: number;\n}\n\nexport interface BackgroundSync {\n  /**\n   * Starts a job, or merges into the rerun of the running one. False when background sync is off.\n   * `artifacts` names deferred builds this and every later job should build.\n   */\n  request(reason: string, artifacts?: readonly DeferredArtifact[]): Promise<boolean>;\n  /** Whether a job runs or a rerun is queued. */\n  readonly syncing: boolean;\n  /** Resolves once no job runs and none is queued. */\n  idle(): Promise<void>;\n}\n\n/** Whether this host may start background sync: on unless `PO_AUTO_SYNC=0`, and never inside a sync child. */\nexport function autoSyncEnabled(environment: NodeJS.ProcessEnv): boolean {\n  return environment[AUTO_SYNC_ENV] !== AUTO_SYNC_OFF && syncParentPid(environment) === undefined;\n}\n\nexport function createBackgroundSync(options: BackgroundSyncOptions): BackgroundSync {\n  const enabled = autoSyncEnabled(options.environment);\n  const files = options.files ?? createNodePlatform().env(process.cwd());\n  let running = false;\n  const wanted = new Set<DeferredArtifact>();\n  let rerun = false;\n  const waiters: (() => void)[] = [];\n  const settle = (): void => {\n    if (!running) for (const resolve of waiters.splice(0)) resolve();\n  };\n  const start = async (): Promise<boolean> => {\n    const entry = options.cliEntry ?? path.join(poPackageRoot(), ...CLI_ENTRY_SEGMENTS);\n    let child: ChildProcess;\n    try {\n      if (!(await pathExists(files, entry, BACKGROUND_CONTEXT))) {\n        options.onNotice(`Background sync is unavailable because '${entry}' is missing; run po sync.`);\n        running = false;\n        rerun = false;\n        settle();\n        return false;\n      }\n      // On desktop the child inherits ELECTRON_RUN_AS_NODE, so the app binary runs it as node.\n      const scope = options.repoRoot === undefined ? [GLOBAL_OPTION] : [];\n      const skip = options.skipArtifactBuilds === true ? [SKIP_ARTIFACT_BUILDS_OPTION] : [];\n      const defer = (Object.keys(DEFER_OPTIONS) as DeferredArtifact[])\n        .filter((artifact) => !wanted.has(artifact))\n        .map((artifact) => DEFER_OPTIONS[artifact]);\n      child = (options.spawn ?? spawnProcess)(\n        process.execPath,\n        [...process.execArgv, entry, ...SYNC_ARGS, ...scope, ...skip, ...defer],\n        {\n          ...(options.repoRoot === undefined ? {} : { cwd: options.repoRoot }),\n          env: {\n            ...syncEnvironment(options.environment),\n            [SYNC_PARENT_PID_ENV]: String(options.parentPid ?? process.pid),\n          },\n          stdio: 'ignore',\n          detached: options.detached === true,\n          windowsHide: true,\n        },\n      );\n    } catch (error) {\n      options.onNotice(`Background sync could not start: ${errorMessage(error)}`);\n      running = false;\n      rerun = false;\n      settle();\n      return false;\n    }\n    running = true;\n    if (options.detached === true) child.unref();\n    let finished = false;\n    const finish = (code: number | null): void => {\n      if (finished) return;\n      finished = true;\n      if (code !== null && code !== SYNC_EXIT_OK && code !== SYNC_EXIT_BUSY)\n        options.onNotice(`Background sync exited with code ${String(code)}.`);\n      void Promise.resolve()\n        .then(() => options.onExit?.(code))\n        .catch((error: unknown) => options.onNotice(`Picking up background sync failed: ${errorMessage(error)}`))\n        .finally(async () => {\n          running = false;\n          if (rerun) {\n            rerun = false;\n            running = true;\n            await start();\n          }\n          settle();\n        });\n    };\n    child.once('error', (error) => {\n      options.onNotice(`Background sync could not start: ${error.message}`);\n      finish(null);\n    });\n    child.once('exit', (code) => finish(code));\n    return true;\n  };\n  return {\n    async request(_reason, artifacts = []): Promise<boolean> {\n      if (!enabled) return false;\n      for (const artifact of artifacts) wanted.add(artifact);\n      if (running) {\n        rerun = true;\n        return true;\n      }\n      running = true;\n      return start();\n    },\n    get syncing() {\n      return running || rerun;\n    },\n    idle() {\n      return new Promise<void>((resolve) => {\n        waiters.push(resolve);\n        settle();\n      });\n    },\n  };\n}\n\n/**\n * Publishes a build only when the key it is given differs from the last one published, so a\n * sync that changed nothing republishes nothing. A key whose build cannot be read is skipped.\n */\nexport function createKeyedPickup<T>(\n  read: (key: string) => T | undefined | Promise<T | undefined>,\n  publish: (build: T, key: string) => void,\n): (key: string | null | undefined) => Promise<'published' | 'unchanged' | 'missing'> {\n  let current: string | undefined;\n  return async (key) => {\n    if (key === null || key === undefined || key === current) return 'unchanged';\n    const build = await read(key);\n    if (build === undefined) return 'missing';\n    current = key;\n    publish(build, key);\n    return 'published';\n  };\n}\n\nexport interface SyncedBuildKeys {\n  webKey: string | null | undefined;\n  nativeKey: string | null | undefined;\n}\n\nexport interface SyncedBuildKeysInput {\n  pointer: SyncPointer | undefined;\n  /** Whether this host's own Po install wrote `pointer`. */\n  ownsPointer: boolean;\n  /** The kinds this host already publishes. */\n  published: { web: boolean; native: boolean };\n  /** The keys this install derives the way sync does, each only when its build exists. */\n  ownKeys: () => { webKey?: string; nativeKey?: string } | Promise<{ webKey?: string; nativeKey?: string }>;\n  /** The newest web build in the Po home, whichever install made it. */\n  newestWebKey: () => string | undefined | Promise<string | undefined>;\n}\n\n/**\n * The build keys a host publishes. Its own pointer names them. Before sync ever wrote one (the\n * first start after an upgrade), this install's derived keys, else the newest web build. A\n * pointer another Po install wrote is refused: what the host already publishes stays (an\n * undefined key changes nothing), and a kind it has not published yet takes only this\n * install's own build while its own sync runs, never the other install's.\n */\nexport async function syncedBuildKeys(input: SyncedBuildKeysInput): Promise<SyncedBuildKeys> {\n  const { pointer, published } = input;\n  if (input.ownsPointer && pointer !== undefined) return { webKey: pointer.webKey, nativeKey: pointer.nativeKey };\n  if (pointer === undefined) {\n    const own = await input.ownKeys();\n    return { webKey: own.webKey ?? (await input.newestWebKey()), nativeKey: own.nativeKey };\n  }\n  if (published.web && published.native) return { webKey: undefined, nativeKey: undefined };\n  const own = await input.ownKeys();\n  return {\n    webKey: published.web ? undefined : own.webKey,\n    nativeKey: published.native ? undefined : own.nativeKey,\n  };\n}\n\nexport interface SyncCheckpointsInput {\n  globalRoot: string;\n  homeDirectory: string;\n  environment: NodeJS.ProcessEnv;\n  background: BackgroundSync;\n  onNotice: (message: string) => void;\n}\n\nexport interface RootSyncCheck {\n  root: string;\n  /** How the root is named in a warning, such as `Workspace 'po'`. */\n  label: string;\n  /** The selectors this host left out because they are not synced. */\n  unsynced: readonly string[];\n}\n\nexport interface RootSyncStatus {\n  syncing: boolean;\n  /** One line per unsynced selector: why sync could not prepare it, or that it is still syncing. */\n  reasons: string[];\n}\n\n/**\n * The checkpoints a host runs when it admits a root or opens a session: request a background\n * job when the root changed since the last sync, and warn about what it opened without. Each\n * root's warning is emitted once until it changes.\n */\nexport function createSyncCheckpoints(input: SyncCheckpointsInput) {\n  const fingerprintEnvironment = syncEnvironment(input.environment);\n  const warned = new Map<string, string>();\n  /** The state each root last requested a sync for: pointer generation, catalogue and selection. */\n  const requested = new Map<string, string>();\n  /** This host's install, compared with the one that wrote the pointer. */\n  const host = async (): Promise<string> => syncHostIdentity(input.globalRoot, fingerprintEnvironment);\n  /** The last foreign pointer (install and generation) this host warned about. */\n  let warnedTakeover: string | undefined;\n  /** Each root's selection fingerprint, kept until `invalidate`: resolving it composes every mode. */\n  const fingerprints = new Map<string, string>();\n  const fingerprintFor = (root: string): string => {\n    let fingerprint = fingerprints.get(root);\n    if (fingerprint === undefined) {\n      fingerprint = rootSelectionFingerprint(root, input.homeDirectory, fingerprintEnvironment);\n      fingerprints.set(root, fingerprint);\n    }\n    return fingerprint;\n  };\n  /**\n   * The root's state when it is stale (no pointer, a pointer another Po install wrote, a changed\n   * catalogue, or a selection that differs from the pointer's), else undefined.\n   *\n   * A foreign pointer's state includes its generation, which every sync moves, so each takeover\n   * of the shared runtime is one new stale state and gets one resync. That settles: the resync\n   * writes this host's own pointer, which is never stale for being foreign.\n   */\n  const staleState = async (root: string): Promise<string | undefined> => {\n    const pointer = await readSyncPointer(input.globalRoot);\n    const catalogueHash = await packageCatalogHash(input.environment);\n    const fingerprint = fingerprintFor(root);\n    if (pointer !== undefined && pointer.host !== (await host()))\n      return JSON.stringify(['host', pointer.host ?? null, pointer.generation, catalogueHash, fingerprint]);\n    if (pointer?.catalogueHash === catalogueHash && pointer.fingerprints?.[root] === fingerprint) return undefined;\n    return JSON.stringify([pointer?.generation ?? null, catalogueHash, fingerprint]);\n  };\n  const stale = async (root: string): Promise<boolean> => (await staleState(root)) !== undefined;\n  /**\n   * Requests one sync per stale state of a root. A sync that ran and could not change the\n   * pointer (it failed) is not requested again until the root, the catalogue or the pointer\n   * moves, so a broken root never makes every checkpoint start another full sync.\n   */\n  const requestIfStale = async (check: RootSyncCheck): Promise<boolean> => {\n    const state = await staleState(check.root);\n    if (state === undefined) return false;\n    if (requested.get(check.root) === state) return true;\n    if (!(await input.background.request(`${check.label} changed since the last sync`))) return false;\n    requested.set(check.root, state);\n    return true;\n  };\n  /** The missing artifacts a sync was requested for, each with the pointer state it was missing under. */\n  const requestedMissing = new Set<string>();\n  /** Why the last attempt, or failing that the pointer, could not prepare each selector. */\n  const failures = async (root: string): Promise<Map<string, string>> => {\n    const reports = await Promise.all([readSyncLastAttempt(input.globalRoot), readSyncPointer(input.globalRoot)]);\n    const reasons = new Map<string, string>();\n    for (const report of reports)\n      for (const entry of report?.roots.find((candidate) => candidate.root === root)?.unsynced ?? [])\n        if (!reasons.has(entry.selector)) reasons.set(entry.selector, entry.reason);\n    return reasons;\n  };\n  return {\n    stale,\n    /** Forgets every root's fingerprint; the caller runs it when a root's selection may have moved. */\n    invalidate: (): void => fingerprints.clear(),\n    /**\n     * Whether this host may publish the builds `pointer` names: only when its own Po install wrote\n     * it. Every pointer another install writes (each sync moves its generation) is refused, and\n     * gets one background sync of the global root and one warning, so this host keeps its previous\n     * publication until its own sync replaces the pointer.\n     */\n    async ownsPointer(pointer: SyncPointer | undefined): Promise<boolean> {\n      if (pointer === undefined) return false;\n      const own = await host();\n      if (pointer.host === own) return true;\n      const foreign = pointer.host ?? 'an older Po';\n      const resyncing = await requestIfStale({ root: input.globalRoot, label: 'The global scope', unsynced: [] });\n      const takeover = JSON.stringify([foreign, pointer.generation]);\n      if (warnedTakeover !== takeover) {\n        warnedTakeover = takeover;\n        input.onNotice(\n          `Another Po install (${foreign}) replaced the shared packages; ${resyncing ? `resyncing with this install (${own})` : 'run po sync from this install to resync'}. Use one Po install so they stop replacing each other.`,\n        );\n      }\n      return false;\n    },\n    /**\n     * Requests one sync per missing artifact (such as an MCP app build key) and pointer state,\n     * the same limit stale roots get: a sync that ran and still did not produce it is not\n     * requested again until the pointer or the catalogue moves.\n     */\n    async requestMissing(artifact: string, reason: string, artifacts?: readonly DeferredArtifact[]): Promise<boolean> {\n      const pointer = await readSyncPointer(input.globalRoot);\n      const state = JSON.stringify([\n        artifact,\n        pointer?.generation ?? null,\n        await packageCatalogHash(input.environment),\n      ]);\n      if (requestedMissing.has(state) || !(await input.background.request(reason, artifacts))) return false;\n      requestedMissing.add(state);\n      return true;\n    },\n    /** Requests a job when `request` allows and the root is stale, then warns about `unsynced`. */\n    async check(check: RootSyncCheck, request = true): Promise<RootSyncStatus> {\n      if (request) await requestIfStale(check);\n      const syncing = input.background.syncing;\n      if (check.unsynced.length === 0) {\n        warned.delete(check.root);\n        return { syncing, reasons: [] };\n      }\n      const known = await failures(check.root);\n      const count = check.unsynced.length;\n      const noun = count === 1 ? 'extension' : 'extensions';\n      const reasons = check.unsynced.map((selector) => {\n        const reason = known.get(selector);\n        if (syncing || reason === undefined) return `${selector} is not synced yet`;\n        return `Sync could not prepare ${selector}: ${reason}.`;\n      });\n      const message = syncing\n        ? `${check.label} opened without ${String(count)} ${noun} that ${count === 1 ? 'is' : 'are'} still syncing: ${check.unsynced.join(', ')}. ${count === 1 ? 'It loads' : 'They load'} when sync finishes.`\n        : check.unsynced.every((selector) => known.has(selector))\n          ? reasons.join(' ')\n          : `${check.label} opened without ${String(count)} ${noun} that ${count === 1 ? 'is' : 'are'} not synced: ${check.unsynced.join(', ')}. Run po sync to prepare them.`;\n      if (warned.get(check.root) !== message) {\n        warned.set(check.root, message);\n        input.onNotice(message);\n      }\n      return { syncing, reasons };\n    },\n  };\n}\n"],"ignoreList":[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,485,486,487,490,491,492,493,494,495,496,497,498,499,500,501,502],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAM,gBAAgB;AAGtB,IAAM,aAAa;AACnB,IAAM,gBAAgB;AACtB,IAAM,mBAAmB;AACzB,IAAM,mBAAmB;;;;AChBzB,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AACnC,IAAM,uBAAuB,cAAc,2BAA2B;AACtE,SAASA,SAAO,OAAO;CACtB,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;;AAEA,eAAe,gBAAgB,UAAU,OAAO,QAAQ;CACvD,IAAI,CAAC,SAAS,MAAM,MAAM,IAAI,MAAM,uBAAuB;CAC3D,MAAM,SAAS,SAAS,KAAK,UAAU;CACvC,MAAM,SAAS,CAAC;CAChB,IAAI,SAAS;CACb,IAAI;EACH,OAAO,MAAM;GACZ,QAAQ,eAAe;GACvB,MAAM,EAAE,OAAO,SAAS,MAAM,OAAO,KAAK;GAC1C,IAAI,MAAM;GACV,UAAU,MAAM;GAChB,IAAI,SAAS,OAAO,MAAM,IAAI,MAAM,6BAA6B;GACjE,OAAO,KAAK,KAAK;EAClB;EACA,QAAQ,eAAe;EACvB,OAAO,KAAK,MAAM,OAAO,OAAO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