@prismicio/types-internal 4.0.0-pr.6.eb53f11 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content/document.d.ts +2 -3019
- package/dist/content/document.d.ts.map +1 -1
- package/dist/content/field.d.ts +1 -30
- package/dist/content/field.d.ts.map +1 -1
- package/dist/content/field.js.map +1 -1
- package/dist/content/group.d.ts +2 -1
- package/dist/content/group.d.ts.map +1 -1
- package/dist/content/group.js.map +1 -1
- package/dist/content/legacy/group.d.ts +9 -0
- package/dist/content/legacy/group.d.ts.map +1 -0
- package/dist/content/legacy/group.js.map +1 -1
- package/dist/content/legacy/link.d.ts +41 -0
- package/dist/content/legacy/link.d.ts.map +1 -0
- package/dist/content/legacy/link.js.map +1 -1
- package/dist/content/legacy/nestable.js.map +1 -1
- package/dist/content/legacy/repeatable.js +2 -8
- package/dist/content/legacy/repeatable.js.map +1 -1
- package/dist/content/legacy/richText.d.ts +109 -0
- package/dist/content/legacy/richText.d.ts.map +1 -0
- package/dist/content/legacy/richText.js.map +1 -1
- package/dist/content/legacy/slice.js +2 -3
- package/dist/content/legacy/slice.js.map +1 -1
- package/dist/content/link.d.ts +74 -99
- package/dist/content/link.d.ts.map +1 -1
- package/dist/content/link.js +2 -2
- package/dist/content/link.js.map +1 -1
- package/dist/content/nestable.d.ts +13 -749
- package/dist/content/nestable.d.ts.map +1 -1
- package/dist/content/nestable.js +1 -0
- package/dist/content/nestable.js.map +1 -1
- package/dist/content/repeatable.d.ts +3 -98
- package/dist/content/repeatable.d.ts.map +1 -1
- package/dist/content/richText.d.ts +20 -248
- package/dist/content/richText.d.ts.map +1 -1
- package/dist/content/richText.js.map +1 -1
- package/dist/content/slice.d.ts +6 -4509
- package/dist/content/slice.d.ts.map +1 -1
- package/dist/content/slice.js.map +1 -1
- package/dist/content/slices.d.ts +8 -6765
- package/dist/content/slices.d.ts.map +1 -1
- package/dist/content/table.d.ts +2 -134
- package/dist/content/table.d.ts.map +1 -1
- package/dist/content/widget.d.ts +5 -3020
- package/dist/content/widget.d.ts.map +1 -1
- package/dist/content/widget.js.map +1 -1
- package/dist/helpers/contentPath.js +1 -1
- package/dist/helpers/customTypeModel.d.ts +1 -1
- package/dist/helpers/customTypeModel.js +1 -1
- package/dist/helpers/documentContent.d.ts +3 -2
- package/dist/helpers/documentContent.d.ts.map +1 -1
- package/dist/helpers/documentContent.js +14 -1
- package/dist/helpers/documentContent.js.map +1 -1
- package/dist/helpers/sliceContent.d.ts +12 -0
- package/dist/helpers/sliceContent.d.ts.map +1 -0
- package/dist/helpers/sliceContent.js +60 -0
- package/dist/helpers/sliceContent.js.map +1 -0
- package/dist/helpers/traverseContent.d.ts +15 -16
- package/dist/helpers/traverseContent.d.ts.map +1 -1
- package/dist/helpers/traverseContent.js +51 -19
- package/dist/helpers/traverseContent.js.map +1 -1
- package/dist/helpers/traverseContentWithModel.d.ts +14 -15
- package/dist/helpers/traverseContentWithModel.d.ts.map +1 -1
- package/dist/helpers/traverseContentWithModel.js +61 -35
- package/dist/helpers/traverseContentWithModel.js.map +1 -1
- package/dist/index.d.ts +25 -24
- package/dist/index.js +3 -1
- package/dist/io-ts.d.ts +3048 -71012
- package/dist/io-ts.d.ts.map +1 -1
- package/dist/io-ts.js +125 -124
- package/dist/io-ts.js.map +1 -1
- package/dist/model/customType.d.ts +3 -3329
- package/dist/model/customType.d.ts.map +1 -1
- package/dist/model/group.d.ts +375 -376
- package/dist/model/group.d.ts.map +1 -1
- package/dist/model/group.js.map +1 -1
- package/dist/model/image.d.ts +4 -4
- package/dist/model/image.js.map +1 -1
- package/dist/model/link.d.ts +2 -2
- package/dist/model/link.js.map +1 -1
- package/dist/model/nestable.d.ts +17 -178
- package/dist/model/nestable.d.ts.map +1 -1
- package/dist/model/nestable.js +3 -3
- package/dist/model/nestable.js.map +1 -1
- package/dist/model/richText.d.ts +3 -7
- package/dist/model/richText.d.ts.map +1 -1
- package/dist/model/richText.js +4 -3
- package/dist/model/richText.js.map +1 -1
- package/dist/model/section.d.ts +3 -3329
- package/dist/model/section.d.ts.map +1 -1
- package/dist/model/select.d.ts +1 -1
- package/dist/model/select.js +1 -1
- package/dist/model/select.js.map +1 -1
- package/dist/model/slice.d.ts +781 -3720
- package/dist/model/slice.d.ts.map +1 -1
- package/dist/model/slice.js +7 -2
- package/dist/model/slice.js.map +1 -1
- package/dist/model/slices.d.ts +3 -2195
- package/dist/model/slices.d.ts.map +1 -1
- package/dist/model/table.d.ts +2 -1
- package/dist/model/table.d.ts.map +1 -1
- package/dist/model/table.js +9 -7
- package/dist/model/table.js.map +1 -1
- package/dist/model/widget.d.ts +6 -3331
- package/dist/model/widget.d.ts.map +1 -1
- package/dist/model/widget.js.map +1 -1
- package/dist/zod4.d.ts +1332 -34960
- package/dist/zod4.d.ts.map +1 -1
- package/dist/zod4.js +125 -124
- package/dist/zod4.js.map +1 -1
- package/package.json +3 -2
- package/src/content/field.ts +9 -2
- package/src/content/group.ts +5 -2
- package/src/content/legacy/group.ts +12 -4
- package/src/content/legacy/link.ts +32 -9
- package/src/content/legacy/nestable.ts +26 -2
- package/src/content/legacy/repeatable.ts +3 -16
- package/src/content/legacy/richText.ts +37 -5
- package/src/content/legacy/slice.ts +8 -7
- package/src/content/legacy/widget.ts +6 -2
- package/src/content/link.ts +32 -9
- package/src/content/nestable.ts +42 -2
- package/src/content/richText.ts +19 -7
- package/src/content/slice.ts +2 -2
- package/src/content/widget.ts +6 -2
- package/src/helpers/documentContent.ts +32 -1
- package/src/helpers/sliceContent.ts +86 -0
- package/src/helpers/traverseContent.ts +93 -32
- package/src/helpers/traverseContentWithModel.ts +73 -48
- package/src/index.ts +4 -1
- package/src/io-ts.ts +164 -144
- package/src/model/group.ts +4 -1
- package/src/model/image.ts +1 -1
- package/src/model/link.ts +1 -1
- package/src/model/nestable.ts +33 -1
- package/src/model/richText.ts +2 -2
- package/src/model/select.ts +2 -2
- package/src/model/slice.ts +36 -9
- package/src/model/table.ts +11 -2
- package/src/model/widget.ts +8 -4
- package/src/zod4.ts +164 -144
- package/dist/content/legacy/image.d.ts +0 -1
package/dist/io-ts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"io-ts.js","names":[],"sources":["../src/io-ts.ts"],"sourcesContent":["import * as t from \"io-ts\"\nimport type { ZodMiniType } from \"zod/mini\"\n\n// Common\nimport { AssetSchema } from \"./common/asset\"\nimport { EmbedSchema } from \"./common/embed\"\nimport { HexaColorCodeSchema } from \"./common/hexaColorCode\"\nimport { NonEmptyStringSchema } from \"./common/nonEmptyString\"\nimport { WidgetKeySchema } from \"./common/widgetKey\"\n// Content\nimport { BooleanContentSchema } from \"./content/boolean\"\nimport { BooleanLegacyCodec } from \"./content/codec/boolean\"\nimport { DocumentLegacyCodec } from \"./content/codec/document\"\nimport { EmbedLegacyCodec } from \"./content/codec/embed\"\nimport { EmptyLegacyCodec } from \"./content/codec/empty\"\nimport {\n\tColorLegacyCodec,\n\tDateLegacyCodec,\n\tNumberLegacyCodec,\n\tRangeLegacyCodec,\n\tSelectLegacyCodec,\n\tTextLegacyCodec,\n\tTimestampLegacyCodec,\n} from \"./content/codec/field\"\nimport { GeoPointLegacyCodec } from \"./content/codec/geopoint\"\nimport { GroupItemLegacyCodec, GroupLegacyCodec } from \"./content/codec/group\"\nimport { ImageLegacyCodec } from \"./content/codec/image\"\nimport { IntegrationFieldLegacyCodec } from \"./content/codec/integrationField\"\nimport type { LegacyCodec } from \"./content/codec/legacyContentCtx\"\nimport { LinkLegacyCodec } from \"./content/codec/link\"\nimport { NestableLegacyCodec } from \"./content/codec/nestable\"\nimport { RepeatableLegacyCodec } from \"./content/codec/repeatable\"\nimport { RichTextLegacyCodec } from \"./content/codec/richText\"\nimport { SeparatorLegacyCodec } from \"./content/codec/separator\"\nimport {\n\tCompositeSliceLegacyCodec,\n\tSharedSliceLegacyCodec,\n\tLegacySliceLegacyCodec,\n\tSliceLegacyCodec,\n} from \"./content/codec/slice\"\nimport { SliceItemLegacyCodec, SlicesLegacyCodec } from \"./content/codec/slices\"\nimport { TableLegacyCodec } from \"./content/codec/table\"\nimport { UIDLegacyCodec } from \"./content/codec/uid\"\nimport { WidgetLegacyCodec } from \"./content/codec/widget\"\nimport { DocumentContentSchema } from \"./content/document\"\nimport { EmbedContentSchema } from \"./content/embed\"\nimport { EmptyContentSchema } from \"./content/empty\"\nimport {\n\tColorContentSchema,\n\tDateContentSchema,\n\tNumberContentSchema,\n\tRangeContentSchema,\n\tSelectContentSchema,\n\tTextContentSchema,\n\tTimestampContentSchema,\n\tFieldContentSchema,\n} from \"./content/field\"\nimport { GeoPointContentSchema } from \"./content/geopoint\"\nimport { GroupContentSchema, GroupItemContentSchema } from \"./content/group\"\nimport { ImageContentSchema } from \"./content/image\"\nimport { IntegrationFieldContentSchema } from \"./content/integrationField\"\nimport { LinkContentSchema } from \"./content/link\"\nimport { NestableContentSchema } from \"./content/nestable\"\nimport { RepeatableContentSchema } from \"./content/repeatable\"\nimport {\n\tRichTextContentSchema,\n\tRichTextContentBlockSchema,\n\tRichTextContentSpanSchema,\n} from \"./content/richText\"\nimport { SeparatorContentSchema } from \"./content/separator\"\nimport {\n\tLegacySliceContentSchema,\n\tCompositeSliceContentSchema,\n\tSharedSliceContentSchema,\n\tSliceContentSchema,\n} from \"./content/slice\"\nimport {\n\tLegacySliceItemContentSchema,\n\tCompositeSliceItemContentSchema,\n\tSharedSliceItemContentSchema,\n\tSliceItemContentSchema,\n\tSlicesContentSchema,\n} from \"./content/slices\"\nimport { TableContentSchema } from \"./content/table\"\nimport { UIDContentSchema } from \"./content/uid\"\nimport { WidgetContentSchema } from \"./content/widget\"\n// Model\nimport { BooleanModelSchema } from \"./model/boolean\"\nimport { ColorModelSchema } from \"./model/color\"\nimport { StaticCustomTypeModelSchema, CustomTypeModelSchema } from \"./model/customType\"\nimport { DateModelSchema } from \"./model/date\"\nimport { EmbedModelSchema } from \"./model/embed\"\nimport { GeoPointModelSchema } from \"./model/geopoint\"\nimport { GroupModelSchema, NestedGroupModelSchema } from \"./model/group\"\nimport { ImageModelSchema } from \"./model/image\"\nimport { IntegrationFieldModelSchema } from \"./model/integrationField\"\nimport { LinkModelSchema } from \"./model/link\"\nimport { NestableModelSchema } from \"./model/nestable\"\nimport { NumberModelSchema } from \"./model/number\"\nimport { RangeModelSchema } from \"./model/range\"\nimport { RichTextModelSchema } from \"./model/richText\"\nimport { StaticSectionModelSchema, DynamicSectionModelSchema } from \"./model/section\"\nimport { SelectModelSchema } from \"./model/select\"\nimport { SeparatorModelSchema } from \"./model/separator\"\nimport {\n\tLegacySliceModelSchema,\n\tCompositeSliceModelSchema,\n\tSharedSliceModelSchema,\n\tSharedSliceRefModelSchema,\n\tStaticSliceModelSchema,\n\tDynamicSliceModelSchema,\n} from \"./model/slice\"\nimport { DynamicSlicesModelSchema, StaticSlicesModelSchema } from \"./model/slices\"\nimport { TableModelSchema } from \"./model/table\"\nimport { TextModelSchema } from \"./model/text\"\nimport { TimestampModelSchema } from \"./model/timestamp\"\nimport { UIDModelSchema } from \"./model/uid\"\nimport { StaticWidgetModelSchema, DynamicWidgetModelSchema } from \"./model/widget\"\n\n// Common\nexport const Asset = toIOTS(AssetSchema)\nexport const Embed = toIOTS(EmbedSchema)\nexport const HexaColorCode = toIOTS(HexaColorCodeSchema)\nexport const NonEmptyString = toIOTS(NonEmptyStringSchema)\nexport const WidgetKey = toIOTS(WidgetKeySchema)\n\n// Content\nexport const BooleanContent = toIOTS(BooleanContentSchema)\nexport const ColorContent = toIOTS(ColorContentSchema)\nexport const DateContent = toIOTS(DateContentSchema)\nexport const EmptyContent = toIOTS(EmptyContentSchema)\nexport const GeoPointContent = toIOTS(GeoPointContentSchema)\nexport const LinkContent = toIOTS(LinkContentSchema)\nexport const NumberContent = toIOTS(NumberContentSchema)\nexport const RangeContent = toIOTS(RangeContentSchema)\nexport const SelectContent = toIOTS(SelectContentSchema)\nexport const SeparatorContent = toIOTS(SeparatorContentSchema)\nexport const SharedSliceContent = toIOTS(SharedSliceContentSchema)\nexport const TextContent = toIOTS(TextContentSchema)\nexport const TimestampContent = toIOTS(TimestampContentSchema)\nexport const FieldContent = toIOTS(FieldContentSchema)\nexport const UIDContent = toIOTS(UIDContentSchema)\nexport const IntegrationFieldContent = toIOTS(IntegrationFieldContentSchema)\nexport const EmbedContent = toIOTS(EmbedContentSchema)\nexport const ImageContent = toIOTS(ImageContentSchema)\nexport const RichTextContent = toIOTS(RichTextContentSchema)\nexport const RichTextContentBlock = toIOTS(RichTextContentBlockSchema)\nexport const RichTextContentSpan = toIOTS(RichTextContentSpanSchema)\nexport const TableContent = toIOTS(TableContentSchema)\nexport const RepeatableContent = toIOTS(RepeatableContentSchema)\nexport const NestableContent = toIOTS(NestableContentSchema)\nexport const GroupContent = toIOTS(GroupContentSchema)\nexport const GroupItemContent = toIOTS(GroupItemContentSchema)\nexport const CompositeSliceContent = toIOTS(CompositeSliceContentSchema)\nexport const LegacySliceContent = toIOTS(LegacySliceContentSchema)\nexport const SliceContent = toIOTS(SliceContentSchema)\nexport const LegacySliceItemContent = toIOTS(LegacySliceItemContentSchema)\nexport const CompositeSliceItemContent = toIOTS(CompositeSliceItemContentSchema)\nexport const SharedSliceItemContent = toIOTS(SharedSliceItemContentSchema)\nexport const SliceItemContent = toIOTS(SliceItemContentSchema)\nexport const SlicesContent = toIOTS(SlicesContentSchema)\nexport const WidgetContent = toIOTS(WidgetContentSchema)\nexport const DocumentContent = toIOTS(DocumentContentSchema)\n\n// Content legacy\nexport const BooleanLegacy = toIOTSCodec(BooleanLegacyCodec)\nexport const EmptyLegacy = toIOTSCodec(EmptyLegacyCodec)\nexport const TextLegacy = toIOTSCodec(TextLegacyCodec)\nexport const ColorLegacy = toIOTSCodec(ColorLegacyCodec)\nexport const DateLegacy = toIOTSCodec(DateLegacyCodec)\nexport const TimestampLegacy = toIOTSCodec(TimestampLegacyCodec)\nexport const NumberLegacy = toIOTSCodec(NumberLegacyCodec)\nexport const RangeLegacy = toIOTSCodec(RangeLegacyCodec)\nexport const SelectLegacy = toIOTSCodec(SelectLegacyCodec)\nexport const GeoPointLegacy = toIOTSCodec(GeoPointLegacyCodec)\nexport const EmbedLegacy = toIOTSCodec(EmbedLegacyCodec)\nexport const ImageLegacy = toIOTSCodec(ImageLegacyCodec)\nexport const LinkLegacy = toIOTSCodec(LinkLegacyCodec)\nexport const RepeatableLegacy = toIOTSCodec(RepeatableLegacyCodec)\nexport const RichTextLegacy = toIOTSCodec(RichTextLegacyCodec)\nexport const SeparatorLegacy = toIOTSCodec(SeparatorLegacyCodec)\nexport const IntegrationFieldLegacy = toIOTSCodec(IntegrationFieldLegacyCodec)\nexport const TableLegacy = toIOTSCodec(TableLegacyCodec)\nexport const NestableLegacy = toIOTSCodec(NestableLegacyCodec)\nexport const UIDLegacy = toIOTSCodec(UIDLegacyCodec)\nexport const GroupItemLegacy = toIOTSCodec(GroupItemLegacyCodec)\nexport const GroupLegacy = toIOTSCodec(GroupLegacyCodec)\nexport const LegacySliceLegacy = toIOTSCodec(LegacySliceLegacyCodec)\nexport const CompositeSliceLegacy = toIOTSCodec(CompositeSliceLegacyCodec)\nexport const SharedSliceLegacy = toIOTSCodec(SharedSliceLegacyCodec)\nexport const SliceLegacy = toIOTSCodec(SliceLegacyCodec)\nexport const SliceItemLegacy = toIOTSCodec(SliceItemLegacyCodec)\nexport const SlicesLegacy = toIOTSCodec(SlicesLegacyCodec)\nexport const WidgetLegacy = toIOTSCodec(WidgetLegacyCodec)\nexport const DocumentLegacy = toIOTSCodec(DocumentLegacyCodec)\n\n// Model\nexport const BooleanModel = toIOTS(BooleanModelSchema)\nexport const ColorModel = toIOTS(ColorModelSchema)\nexport const DateModel = toIOTS(DateModelSchema)\nexport const EmbedModel = toIOTS(EmbedModelSchema)\nexport const GeoPointModel = toIOTS(GeoPointModelSchema)\nexport const ImageModel = toIOTS(ImageModelSchema)\nexport const IntegrationFieldModel = toIOTS(IntegrationFieldModelSchema)\nexport const LinkModel = toIOTS(LinkModelSchema)\nexport const NestableModel = toIOTS(NestableModelSchema)\nexport const NumberModel = toIOTS(NumberModelSchema)\nexport const RangeModel = toIOTS(RangeModelSchema)\nexport const RichTextModel = toIOTS(RichTextModelSchema)\nexport const SelectModel = toIOTS(SelectModelSchema)\nexport const SeparatorModel = toIOTS(SeparatorModelSchema)\nexport const SharedSliceModel = toIOTS(SharedSliceModelSchema)\nexport const TableModel = toIOTS(TableModelSchema)\nexport const TextModel = toIOTS(TextModelSchema)\nexport const TimestampModel = toIOTS(TimestampModelSchema)\nexport const UIDModel = toIOTS(UIDModelSchema)\nexport const GroupModel = toIOTS(GroupModelSchema)\nexport const NestedGroupModel = toIOTS(NestedGroupModelSchema)\nexport const SharedSliceRefModel = toIOTS(SharedSliceRefModelSchema)\nexport const CompositeSliceModel = toIOTS(CompositeSliceModelSchema)\nexport const LegacySliceModel = toIOTS(LegacySliceModelSchema)\nexport const DynamicSliceModel = toIOTS(DynamicSliceModelSchema)\nexport const StaticSliceModel = toIOTS(StaticSliceModelSchema)\nexport const DynamicSlicesModel = toIOTS(DynamicSlicesModelSchema)\nexport const StaticSlicesModel = toIOTS(StaticSlicesModelSchema)\nexport const StaticWidgetModel = toIOTS(StaticWidgetModelSchema)\nexport const DynamicWidgetModel = toIOTS(DynamicWidgetModelSchema)\nexport const StaticSectionModel = toIOTS(StaticSectionModelSchema)\nexport const DynamicSectionModel = toIOTS(DynamicSectionModelSchema)\nexport const StaticCustomTypeModel = toIOTS(StaticCustomTypeModelSchema)\nexport const CustomTypeModel = toIOTS(CustomTypeModelSchema)\n\nfunction toIOTS<T>(type: ZodMiniType<T>): t.Type<T> {\n\treturn new t.Type<T>(\n\t\t\"Type\",\n\t\t(input): input is T => type.safeParse(input).success,\n\t\t(input, context) => {\n\t\t\tconst result = type.safeParse(input)\n\t\t\treturn result.success\n\t\t\t\t? t.success(result.data)\n\t\t\t\t: t.failure(\n\t\t\t\t\t\tinput,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t)\n\t\t},\n\t\tt.identity,\n\t)\n}\n\nfunction toIOTSCodec<TArgs extends unknown[], A, LegacyRaw, AllowUndefined extends boolean>(\n\tcodecFactory: (...args: TArgs) => LegacyCodec<A, LegacyRaw, AllowUndefined>,\n): (\n\t...args: TArgs\n) => t.Type<A, ReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>, unknown> {\n\treturn (...args: TArgs) => {\n\t\tconst codec = codecFactory(...args)\n\t\treturn new t.Type<\n\t\t\tA,\n\t\t\tReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>,\n\t\t\tunknown\n\t\t>(\n\t\t\tcodec.name,\n\t\t\tcodec.is,\n\t\t\t(input, context) => {\n\t\t\t\tconst result = codec.toContent(input)\n\t\t\t\treturn result.success\n\t\t\t\t\t? t.success(result.data)\n\t\t\t\t\t: t.failure(\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t\t)\n\t\t\t},\n\t\t\tcodec.fromContent,\n\t\t)\n\t}\n}\n\ninterface ZodIssue {\n\tcode: string\n\tmessage: string\n\tpath?: PropertyKey[]\n\texpected?: string\n\tvalues?: unknown[]\n\tkeys?: string[]\n}\n\nfunction resolveValue(input: unknown, path: PropertyKey[]): unknown {\n\tlet current = input\n\tfor (const key of path) {\n\t\tif (current == null || typeof current !== \"object\") return undefined\n\t\tcurrent = (current as Record<PropertyKey, unknown>)[key]\n\t}\n\treturn current\n}\n\nfunction formatValue(value: unknown): string {\n\tif (value === null) return \"null\"\n\tif (value === undefined) return \"undefined\"\n\tif (typeof value === \"string\") return JSON.stringify(value)\n\treturn String(value)\n}\n\nfunction formatIssue(issue: ZodIssue, input: unknown): string {\n\tif (issue.code === \"custom\" && issue.message !== \"Invalid input\") {\n\t\treturn issue.message\n\t}\n\n\tconst value = resolveValue(input, issue.path ?? [])\n\tconst pathStr = issue.path?.length ? issue.path.join(\".\") : undefined\n\n\tif (issue.code === \"invalid_value\" && issue.values) {\n\t\tconst expected = issue.values.map(formatValue).join(\", \")\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${expected}`\n\t}\n\n\tif (issue.code === \"invalid_type\" && issue.expected) {\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${issue.expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${issue.expected}`\n\t}\n\n\tif (issue.code === \"unrecognized_keys\" && issue.keys) {\n\t\treturn `Unrecognized key(s): ${issue.keys.join(\", \")}`\n\t}\n\n\treturn issue.message\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,MAAa,QAAQ,OAAO,YAAY;AACxC,MAAa,QAAQ,OAAO,YAAY;AACxC,MAAa,gBAAgB,OAAO,oBAAoB;AACxD,MAAa,iBAAiB,OAAO,qBAAqB;AAC1D,MAAa,YAAY,OAAO,gBAAgB;AAGhD,MAAa,iBAAiB,OAAO,qBAAqB;AAC1D,MAAa,eAAe,OAAO,mBAAmB;AACtD,MAAa,cAAc,OAAO,kBAAkB;AACpD,MAAa,eAAe,OAAO,mBAAmB;AACtD,MAAa,kBAAkB,OAAO,sBAAsB;AAC5D,MAAa,cAAc,OAAO,kBAAkB;AACpD,MAAa,gBAAgB,OAAO,oBAAoB;AACxD,MAAa,eAAe,OAAO,mBAAmB;AACtD,MAAa,gBAAgB,OAAO,oBAAoB;AACxD,MAAa,mBAAmB,OAAO,uBAAuB;AAC9D,MAAa,qBAAqB,OAAO,yBAAyB;AAClE,MAAa,cAAc,OAAO,kBAAkB;AACpD,MAAa,mBAAm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OAAgB,MAA8B;CACnE,IAAI,UAAU;AACd,MAAK,MAAM,OAAO,MAAM;AACvB,MAAI,WAAW,QAAQ,OAAO,YAAY,SAAU,QAAO,KAAA;AAC3D,YAAW,QAAyC;;AAErD,QAAO;;AAGR,SAAS,YAAY,OAAwB;AAC5C,KAAI,UAAU,KAAM,QAAO;AAC3B,KAAI,UAAU,KAAA,EAAW,QAAO;AAChC,KAAI,OAAO,UAAU,SAAU,QAAO,KAAK,UAAU,MAAM;AAC3D,QAAO,OAAO,MAAM;;AAGrB,SAAS,YAAY,OAAiB,OAAwB;AAC7D,KAAI,MAAM,SAAS,YAAY,MAAM,YAAY,gBAChD,QAAO,MAAM;CAGd,MAAM,QAAQ,aAAa,OAAO,MAAM,QAAQ,EAAE,CAAC;CACnD,MAAM,UAAU,MAAM,MAAM,SAAS,MAAM,KAAK,KAAK,IAAI,GAAG,KAAA;AAE5D,KAAI,MAAM,SAAS,mBAAmB,MAAM,QAAQ;EACnD,MAAM,WAAW,MAAM,OAAO,IAAI,YAAY,CAAC,KAAK,KAAK;AACzD,SAAO,UACJ,iBAAiB,YAAY,MAAM,CAAC,OAAO,QAAQ,aAAa,aAChE,iBAAiB,YAAY,MAAM,CAAC,aAAa;;AAGrD,KAAI,MAAM,SAAS,kBAAkB,MAAM,SAC1C,QAAO,UACJ,iBAAiB,YAAY,MAAM,CAAC,OAAO,QAAQ,aAAa,MAAM,aACtE,iBAAiB,YAAY,MAAM,CAAC,aAAa,MAAM;AAG3D,KAAI,MAAM,SAAS,uBAAuB,MAAM,KAC/C,QAAO,wBAAwB,MAAM,KAAK,KAAK,KAAK;AAGrD,QAAO,MAAM"}
|
|
1
|
+
{"version":3,"file":"io-ts.js","names":["rawAssetSchema","rawEmbedSchema","rawHexaColorCodeSchema","rawNonEmptyStringSchema","rawWidgetKeySchema","rawBooleanContentSchema","rawColorContentSchema","rawDateContentSchema","rawEmptyContentSchema","rawGeoPointContentSchema","rawLinkContentSchema","rawNumberContentSchema","rawRangeContentSchema","rawSelectContentSchema","rawSeparatorContentSchema","rawSharedSliceContentSchema","rawTextContentSchema","rawTimestampContentSchema","rawFieldContentSchema","rawUIDContentSchema","rawIntegrationFieldContentSchema","rawEmbedContentSchema","rawImageContentSchema","rawRichTextContentSchema","rawRichTextContentBlockSchema","rawRichTextContentSpanSchema","rawTableContentSchema","rawRepeatableContentSchema","rawNestableContentSchema","rawGroupContentSchema","rawGroupItemContentSchema","rawCompositeSliceContentSchema","rawLegacySliceContentSchema","rawSliceContentSchema","rawLegacySliceItemContentSchema","rawCompositeSliceItemContentSchema","rawSharedSliceItemContentSchema","rawSliceItemContentSchema","rawSlicesContentSchema","rawWidgetContentSchema","rawDocumentContentSchema","rawBooleanModelSchema","rawColorModelSchema","rawDateModelSchema","rawEmbedModelSchema","rawGeoPointModelSchema","rawImageModelSchema","rawIntegrationFieldModelSchema","rawLinkModelSchema","rawNestableModelSchema","rawNumberModelSchema","rawRangeModelSchema","rawRichTextModelSchema","rawSelectModelSchema","rawSeparatorModelSchema","rawSharedSliceModelSchema","rawTableModelSchema","rawTextModelSchema","rawTimestampModelSchema","rawUIDModelSchema","rawGroupModelSchema","rawNestedGroupModelSchema","rawSharedSliceRefModelSchema","rawCompositeSliceModelSchema","rawLegacySliceModelSchema","rawDynamicSliceModelSchema","rawStaticSliceModelSchema","rawSliceContentModelSchema","rawDynamicSlicesModelSchema","rawStaticSlicesModelSchema","rawStaticWidgetModelSchema","rawDynamicWidgetModelSchema","rawStaticSectionModelSchema","rawDynamicSectionModelSchema","rawStaticCustomTypeModelSchema","rawCustomTypeModelSchema"],"sources":["../src/io-ts.ts"],"sourcesContent":["import * as t from \"io-ts\"\nimport type { ZodMiniType } from \"zod/mini\"\n\n// Common\nimport { AssetSchema as rawAssetSchema } from \"./common/asset\"\nimport { EmbedSchema as rawEmbedSchema } from \"./common/embed\"\nimport { HexaColorCodeSchema as rawHexaColorCodeSchema } from \"./common/hexaColorCode\"\nimport { NonEmptyStringSchema as rawNonEmptyStringSchema } from \"./common/nonEmptyString\"\nimport { WidgetKeySchema as rawWidgetKeySchema } from \"./common/widgetKey\"\n// Content\nimport { BooleanContentSchema as rawBooleanContentSchema } from \"./content/boolean\"\nimport { BooleanLegacyCodec } from \"./content/codec/boolean\"\nimport { DocumentLegacyCodec } from \"./content/codec/document\"\nimport { EmbedLegacyCodec } from \"./content/codec/embed\"\nimport { EmptyLegacyCodec } from \"./content/codec/empty\"\nimport {\n\tColorLegacyCodec,\n\tDateLegacyCodec,\n\tNumberLegacyCodec,\n\tRangeLegacyCodec,\n\tSelectLegacyCodec,\n\tTextLegacyCodec,\n\tTimestampLegacyCodec,\n} from \"./content/codec/field\"\nimport { GeoPointLegacyCodec } from \"./content/codec/geopoint\"\nimport { GroupItemLegacyCodec, GroupLegacyCodec } from \"./content/codec/group\"\nimport { ImageLegacyCodec } from \"./content/codec/image\"\nimport { IntegrationFieldLegacyCodec } from \"./content/codec/integrationField\"\nimport type { LegacyCodec } from \"./content/codec/legacyContentCtx\"\nimport { LinkLegacyCodec } from \"./content/codec/link\"\nimport { NestableLegacyCodec } from \"./content/codec/nestable\"\nimport { RepeatableLegacyCodec } from \"./content/codec/repeatable\"\nimport { RichTextLegacyCodec } from \"./content/codec/richText\"\nimport { SeparatorLegacyCodec } from \"./content/codec/separator\"\nimport {\n\tCompositeSliceLegacyCodec,\n\tSharedSliceLegacyCodec,\n\tLegacySliceLegacyCodec,\n\tSliceLegacyCodec,\n} from \"./content/codec/slice\"\nimport { SliceItemLegacyCodec, SlicesLegacyCodec } from \"./content/codec/slices\"\nimport { TableLegacyCodec } from \"./content/codec/table\"\nimport { UIDLegacyCodec } from \"./content/codec/uid\"\nimport { WidgetLegacyCodec } from \"./content/codec/widget\"\nimport { DocumentContentSchema as rawDocumentContentSchema } from \"./content/document\"\nimport { EmbedContentSchema as rawEmbedContentSchema } from \"./content/embed\"\nimport { EmptyContentSchema as rawEmptyContentSchema } from \"./content/empty\"\nimport {\n\tColorContentSchema as rawColorContentSchema,\n\tDateContentSchema as rawDateContentSchema,\n\tNumberContentSchema as rawNumberContentSchema,\n\tRangeContentSchema as rawRangeContentSchema,\n\tSelectContentSchema as rawSelectContentSchema,\n\tTextContentSchema as rawTextContentSchema,\n\tTimestampContentSchema as rawTimestampContentSchema,\n\tFieldContentSchema as rawFieldContentSchema,\n} from \"./content/field\"\nimport { GeoPointContentSchema as rawGeoPointContentSchema } from \"./content/geopoint\"\nimport {\n\tGroupContentSchema as rawGroupContentSchema,\n\tGroupItemContentSchema as rawGroupItemContentSchema,\n} from \"./content/group\"\nimport { ImageContentSchema as rawImageContentSchema } from \"./content/image\"\nimport { IntegrationFieldContentSchema as rawIntegrationFieldContentSchema } from \"./content/integrationField\"\nimport { LinkContentSchema as rawLinkContentSchema } from \"./content/link\"\nimport { NestableContentSchema as rawNestableContentSchema } from \"./content/nestable\"\nimport { RepeatableContentSchema as rawRepeatableContentSchema } from \"./content/repeatable\"\nimport {\n\tRichTextContentSchema as rawRichTextContentSchema,\n\tRichTextContentBlockSchema as rawRichTextContentBlockSchema,\n\tRichTextContentSpanSchema as rawRichTextContentSpanSchema,\n} from \"./content/richText\"\nimport { SeparatorContentSchema as rawSeparatorContentSchema } from \"./content/separator\"\nimport {\n\tLegacySliceContentSchema as rawLegacySliceContentSchema,\n\tCompositeSliceContentSchema as rawCompositeSliceContentSchema,\n\tSharedSliceContentSchema as rawSharedSliceContentSchema,\n\tSliceContentSchema as rawSliceContentSchema,\n} from \"./content/slice\"\nimport {\n\tLegacySliceItemContentSchema as rawLegacySliceItemContentSchema,\n\tCompositeSliceItemContentSchema as rawCompositeSliceItemContentSchema,\n\tSharedSliceItemContentSchema as rawSharedSliceItemContentSchema,\n\tSliceItemContentSchema as rawSliceItemContentSchema,\n\tSlicesContentSchema as rawSlicesContentSchema,\n} from \"./content/slices\"\nimport { TableContentSchema as rawTableContentSchema } from \"./content/table\"\nimport { UIDContentSchema as rawUIDContentSchema } from \"./content/uid\"\nimport { WidgetContentSchema as rawWidgetContentSchema } from \"./content/widget\"\n// Model\nimport { BooleanModelSchema as rawBooleanModelSchema } from \"./model/boolean\"\nimport { ColorModelSchema as rawColorModelSchema } from \"./model/color\"\nimport {\n\tStaticCustomTypeModelSchema as rawStaticCustomTypeModelSchema,\n\tCustomTypeModelSchema as rawCustomTypeModelSchema,\n} from \"./model/customType\"\nimport { DateModelSchema as rawDateModelSchema } from \"./model/date\"\nimport { EmbedModelSchema as rawEmbedModelSchema } from \"./model/embed\"\nimport { GeoPointModelSchema as rawGeoPointModelSchema } from \"./model/geopoint\"\nimport {\n\tGroupModelSchema as rawGroupModelSchema,\n\tNestedGroupModelSchema as rawNestedGroupModelSchema,\n} from \"./model/group\"\nimport { ImageModelSchema as rawImageModelSchema } from \"./model/image\"\nimport { IntegrationFieldModelSchema as rawIntegrationFieldModelSchema } from \"./model/integrationField\"\nimport { LinkModelSchema as rawLinkModelSchema } from \"./model/link\"\nimport { NestableModelSchema as rawNestableModelSchema } from \"./model/nestable\"\nimport { NumberModelSchema as rawNumberModelSchema } from \"./model/number\"\nimport { RangeModelSchema as rawRangeModelSchema } from \"./model/range\"\nimport { RichTextModelSchema as rawRichTextModelSchema } from \"./model/richText\"\nimport {\n\tStaticSectionModelSchema as rawStaticSectionModelSchema,\n\tDynamicSectionModelSchema as rawDynamicSectionModelSchema,\n} from \"./model/section\"\nimport { SelectModelSchema as rawSelectModelSchema } from \"./model/select\"\nimport { SeparatorModelSchema as rawSeparatorModelSchema } from \"./model/separator\"\nimport {\n\tLegacySliceModelSchema as rawLegacySliceModelSchema,\n\tCompositeSliceModelSchema as rawCompositeSliceModelSchema,\n\tSharedSliceModelSchema as rawSharedSliceModelSchema,\n\tSharedSliceRefModelSchema as rawSharedSliceRefModelSchema,\n\tStaticSliceModelSchema as rawStaticSliceModelSchema,\n\tDynamicSliceModelSchema as rawDynamicSliceModelSchema,\n\tSliceContentModelSchema as rawSliceContentModelSchema,\n} from \"./model/slice\"\nimport {\n\tDynamicSlicesModelSchema as rawDynamicSlicesModelSchema,\n\tStaticSlicesModelSchema as rawStaticSlicesModelSchema,\n} from \"./model/slices\"\nimport { TableModelSchema as rawTableModelSchema } from \"./model/table\"\nimport { TextModelSchema as rawTextModelSchema } from \"./model/text\"\nimport { TimestampModelSchema as rawTimestampModelSchema } from \"./model/timestamp\"\nimport { UIDModelSchema as rawUIDModelSchema } from \"./model/uid\"\nimport {\n\tStaticWidgetModelSchema as rawStaticWidgetModelSchema,\n\tDynamicWidgetModelSchema as rawDynamicWidgetModelSchema,\n} from \"./model/widget\"\n\n// Common\nexport const AssetSchema = toIOTS(rawAssetSchema)\nexport const EmbedSchema = toIOTS(rawEmbedSchema)\nexport const HexaColorCodeSchema = toIOTS(rawHexaColorCodeSchema)\nexport const NonEmptyStringSchema = toIOTS(rawNonEmptyStringSchema)\nexport const WidgetKeySchema = toIOTS(rawWidgetKeySchema)\n\n// Content\nexport const BooleanContentSchema = toIOTS(rawBooleanContentSchema)\nexport const ColorContentSchema = toIOTS(rawColorContentSchema)\nexport const DateContentSchema = toIOTS(rawDateContentSchema)\nexport const EmptyContentSchema = toIOTS(rawEmptyContentSchema)\nexport const GeoPointContentSchema = toIOTS(rawGeoPointContentSchema)\nexport const LinkContentSchema = toIOTS(rawLinkContentSchema)\nexport const NumberContentSchema = toIOTS(rawNumberContentSchema)\nexport const RangeContentSchema = toIOTS(rawRangeContentSchema)\nexport const SelectContentSchema = toIOTS(rawSelectContentSchema)\nexport const SeparatorContentSchema = toIOTS(rawSeparatorContentSchema)\nexport const SharedSliceContentSchema = toIOTS(rawSharedSliceContentSchema)\nexport const TextContentSchema = toIOTS(rawTextContentSchema)\nexport const TimestampContentSchema = toIOTS(rawTimestampContentSchema)\nexport const FieldContentSchema = toIOTS(rawFieldContentSchema)\nexport const UIDContentSchema = toIOTS(rawUIDContentSchema)\nexport const IntegrationFieldContentSchema = toIOTS(rawIntegrationFieldContentSchema)\nexport const EmbedContentSchema = toIOTS(rawEmbedContentSchema)\nexport const ImageContentSchema = toIOTS(rawImageContentSchema)\nexport const RichTextContentSchema = toIOTS(rawRichTextContentSchema)\nexport const RichTextContentBlockSchema = toIOTS(rawRichTextContentBlockSchema)\nexport const RichTextContentSpanSchema = toIOTS(rawRichTextContentSpanSchema)\nexport const TableContentSchema = toIOTS(rawTableContentSchema)\nexport const RepeatableContentSchema = toIOTS(rawRepeatableContentSchema)\nexport const NestableContentSchema = toIOTS(rawNestableContentSchema)\nexport const GroupContentSchema = toIOTS(rawGroupContentSchema)\nexport const GroupItemContentSchema = toIOTS(rawGroupItemContentSchema)\nexport const CompositeSliceContentSchema = toIOTS(rawCompositeSliceContentSchema)\nexport const LegacySliceContentSchema = toIOTS(rawLegacySliceContentSchema)\nexport const SliceContentSchema = toIOTS(rawSliceContentSchema)\nexport const LegacySliceItemContentSchema = toIOTS(rawLegacySliceItemContentSchema)\nexport const CompositeSliceItemContentSchema = toIOTS(rawCompositeSliceItemContentSchema)\nexport const SharedSliceItemContentSchema = toIOTS(rawSharedSliceItemContentSchema)\nexport const SliceItemContentSchema = toIOTS(rawSliceItemContentSchema)\nexport const SlicesContentSchema = toIOTS(rawSlicesContentSchema)\nexport const WidgetContentSchema = toIOTS(rawWidgetContentSchema)\nexport const DocumentContentSchema = toIOTS(rawDocumentContentSchema)\n\n// Content legacy\nexport const BooleanLegacy = toIOTSCodec(BooleanLegacyCodec)\nexport const EmptyLegacy = toIOTSCodec(EmptyLegacyCodec)\nexport const TextLegacy = toIOTSCodec(TextLegacyCodec)\nexport const ColorLegacy = toIOTSCodec(ColorLegacyCodec)\nexport const DateLegacy = toIOTSCodec(DateLegacyCodec)\nexport const TimestampLegacy = toIOTSCodec(TimestampLegacyCodec)\nexport const NumberLegacy = toIOTSCodec(NumberLegacyCodec)\nexport const RangeLegacy = toIOTSCodec(RangeLegacyCodec)\nexport const SelectLegacy = toIOTSCodec(SelectLegacyCodec)\nexport const GeoPointLegacy = toIOTSCodec(GeoPointLegacyCodec)\nexport const EmbedLegacy = toIOTSCodec(EmbedLegacyCodec)\nexport const ImageLegacy = toIOTSCodec(ImageLegacyCodec)\nexport const LinkLegacy = toIOTSCodec(LinkLegacyCodec)\nexport const RepeatableLegacy = toIOTSCodec(RepeatableLegacyCodec)\nexport const RichTextLegacy = toIOTSCodec(RichTextLegacyCodec)\nexport const SeparatorLegacy = toIOTSCodec(SeparatorLegacyCodec)\nexport const IntegrationFieldLegacy = toIOTSCodec(IntegrationFieldLegacyCodec)\nexport const TableLegacy = toIOTSCodec(TableLegacyCodec)\nexport const NestableLegacy = toIOTSCodec(NestableLegacyCodec)\nexport const UIDLegacy = toIOTSCodec(UIDLegacyCodec)\nexport const GroupItemLegacy = toIOTSCodec(GroupItemLegacyCodec)\nexport const GroupLegacy = toIOTSCodec(GroupLegacyCodec)\nexport const LegacySliceLegacy = toIOTSCodec(LegacySliceLegacyCodec)\nexport const CompositeSliceLegacy = toIOTSCodec(CompositeSliceLegacyCodec)\nexport const SharedSliceLegacy = toIOTSCodec(SharedSliceLegacyCodec)\nexport const SliceLegacy = toIOTSCodec(SliceLegacyCodec)\nexport const SliceItemLegacy = toIOTSCodec(SliceItemLegacyCodec)\nexport const SlicesLegacy = toIOTSCodec(SlicesLegacyCodec)\nexport const WidgetLegacy = toIOTSCodec(WidgetLegacyCodec)\nexport const DocumentLegacy = toIOTSCodec(DocumentLegacyCodec)\n\n// Model\nexport const BooleanModelSchema = toIOTS(rawBooleanModelSchema)\nexport const ColorModelSchema = toIOTS(rawColorModelSchema)\nexport const DateModelSchema = toIOTS(rawDateModelSchema)\nexport const EmbedModelSchema = toIOTS(rawEmbedModelSchema)\nexport const GeoPointModelSchema = toIOTS(rawGeoPointModelSchema)\nexport const ImageModelSchema = toIOTS(rawImageModelSchema)\nexport const IntegrationFieldModelSchema = toIOTS(rawIntegrationFieldModelSchema)\nexport const LinkModelSchema = toIOTS(rawLinkModelSchema)\nexport const NestableModelSchema = toIOTS(rawNestableModelSchema)\nexport const NumberModelSchema = toIOTS(rawNumberModelSchema)\nexport const RangeModelSchema = toIOTS(rawRangeModelSchema)\nexport const RichTextModelSchema = toIOTS(rawRichTextModelSchema)\nexport const SelectModelSchema = toIOTS(rawSelectModelSchema)\nexport const SeparatorModelSchema = toIOTS(rawSeparatorModelSchema)\nexport const SharedSliceModelSchema = toIOTS(rawSharedSliceModelSchema)\nexport const TableModelSchema = toIOTS(rawTableModelSchema)\nexport const TextModelSchema = toIOTS(rawTextModelSchema)\nexport const TimestampModelSchema = toIOTS(rawTimestampModelSchema)\nexport const UIDModelSchema = toIOTS(rawUIDModelSchema)\nexport const GroupModelSchema = toIOTS(rawGroupModelSchema)\nexport const NestedGroupModelSchema = toIOTS(rawNestedGroupModelSchema)\nexport const SharedSliceRefModelSchema = toIOTS(rawSharedSliceRefModelSchema)\nexport const CompositeSliceModelSchema = toIOTS(rawCompositeSliceModelSchema)\nexport const LegacySliceModelSchema = toIOTS(rawLegacySliceModelSchema)\nexport const DynamicSliceModelSchema = toIOTS(rawDynamicSliceModelSchema)\nexport const StaticSliceModelSchema = toIOTS(rawStaticSliceModelSchema)\nexport const SliceContentModelSchema = toIOTS(rawSliceContentModelSchema)\nexport const DynamicSlicesModelSchema = toIOTS(rawDynamicSlicesModelSchema)\nexport const StaticSlicesModelSchema = toIOTS(rawStaticSlicesModelSchema)\nexport const StaticWidgetModelSchema = toIOTS(rawStaticWidgetModelSchema)\nexport const DynamicWidgetModelSchema = toIOTS(rawDynamicWidgetModelSchema)\nexport const StaticSectionModelSchema = toIOTS(rawStaticSectionModelSchema)\nexport const DynamicSectionModelSchema = toIOTS(rawDynamicSectionModelSchema)\nexport const StaticCustomTypeModelSchema = toIOTS(rawStaticCustomTypeModelSchema)\nexport const CustomTypeModelSchema = toIOTS(rawCustomTypeModelSchema)\n\nfunction toIOTS<T>(type: ZodMiniType<T>): t.Type<T> {\n\treturn new t.Type<T>(\n\t\t\"Type\",\n\t\t(input): input is T => type.safeParse(input).success,\n\t\t(input, context) => {\n\t\t\tconst result = type.safeParse(input)\n\t\t\treturn result.success\n\t\t\t\t? t.success(result.data)\n\t\t\t\t: t.failure(\n\t\t\t\t\t\tinput,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t)\n\t\t},\n\t\tt.identity,\n\t)\n}\n\nfunction toIOTSCodec<TArgs extends unknown[], A, LegacyRaw, AllowUndefined extends boolean>(\n\tcodecFactory: (...args: TArgs) => LegacyCodec<A, LegacyRaw, AllowUndefined>,\n): (\n\t...args: TArgs\n) => t.Type<A, ReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>, unknown> {\n\treturn (...args: TArgs) => {\n\t\tconst codec = codecFactory(...args)\n\t\treturn new t.Type<\n\t\t\tA,\n\t\t\tReturnType<LegacyCodec<A, LegacyRaw, AllowUndefined>[\"fromContent\"]>,\n\t\t\tunknown\n\t\t>(\n\t\t\tcodec.name,\n\t\t\tcodec.is,\n\t\t\t(input, context) => {\n\t\t\t\tconst result = codec.toContent(input)\n\t\t\t\treturn result.success\n\t\t\t\t\t? t.success(result.data)\n\t\t\t\t\t: t.failure(\n\t\t\t\t\t\t\tinput,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tresult.error.issues.map((issue) => formatIssue(issue, input)).join(\"\\n\"),\n\t\t\t\t\t\t)\n\t\t\t},\n\t\t\tcodec.fromContent,\n\t\t)\n\t}\n}\n\ninterface ZodIssue {\n\tcode: string\n\tmessage: string\n\tpath?: PropertyKey[]\n\texpected?: string\n\tvalues?: unknown[]\n\tkeys?: string[]\n}\n\nfunction resolveValue(input: unknown, path: PropertyKey[]): unknown {\n\tlet current = input\n\tfor (const key of path) {\n\t\tif (current == null || typeof current !== \"object\") return undefined\n\t\tcurrent = (current as Record<PropertyKey, unknown>)[key]\n\t}\n\treturn current\n}\n\nfunction formatValue(value: unknown): string {\n\tif (value === null) return \"null\"\n\tif (value === undefined) return \"undefined\"\n\tif (typeof value === \"string\") return JSON.stringify(value)\n\treturn String(value)\n}\n\nfunction formatIssue(issue: ZodIssue, input: unknown): string {\n\tif (issue.code === \"custom\" && issue.message !== \"Invalid input\") {\n\t\treturn issue.message\n\t}\n\n\tconst value = resolveValue(input, issue.path ?? [])\n\tconst pathStr = issue.path?.length ? issue.path.join(\".\") : undefined\n\n\tif (issue.code === \"invalid_value\" && issue.values) {\n\t\tconst expected = issue.values.map(formatValue).join(\", \")\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${expected}`\n\t}\n\n\tif (issue.code === \"invalid_type\" && issue.expected) {\n\t\treturn pathStr\n\t\t\t? `Invalid value ${formatValue(value)} at .${pathStr}: expected ${issue.expected}`\n\t\t\t: `Invalid value ${formatValue(value)}: expected ${issue.expected}`\n\t}\n\n\tif (issue.code === \"unrecognized_keys\" && issue.keys) {\n\t\treturn `Unrecognized key(s): ${issue.keys.join(\", \")}`\n\t}\n\n\treturn issue.message\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IA,MAAa,cAAc,OAAOA,cAAe;AACjD,MAAa,cAAc,OAAOC,cAAe;AACjD,MAAa,sBAAsB,OAAOC,sBAAuB;AACjE,MAAa,uBAAuB,OAAOC,uBAAwB;AACnE,MAAa,kBAAkB,OAAOC,kBAAmB;AAGzD,MAAa,uBAAuB,OAAOC,uBAAwB;AACnE,MAAa,qBAAqB,OAAOC,qBAAsB;AAC/D,MAAa,oBAAoB,OAAOC,oBAAqB;AAC7D,MAAa,qBAAqB,OAAOC,qBAAsB;AAC/D,MAAa,wBAAwB,OAAOC,wBAAyB;AACrE,MAAa,oBAAoB,OAAOC,oBAAqB;AAC7D,MAAa,sBAAsB,OAAOC,sBAAuB;AACjE,MAAa,qBAAqB,OAAOC,qBAAsB;AAC/D,MAAa,sBAA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