{
	"$schema": "https://json-schema.org/draft/2020-12/schema",
	"$id": "tables.json",
	"version": "1.2.0",
	"type": "object",
	"$defs": {
		"tableData": {
			"type": "object",
			"properties": {
				"name": {
					"type": "string"
				},
				"source": {
					"$ref": "util.json#/$defs/source"
				},
				"page": {
					"$ref": "util.json#/$defs/page"
				},
				"data": {
					"description": "A generic object for storing special data for external use-cases. Keys prefixed with \"rd-\" should be added as \"data-\" HTML attributes when rendering to HTML.",
					"type": "object",
					"markdownDescription": "A generic object for storing special data for external use-cases. Keys prefixed with &quot;rd-&quot; should be added as &quot;data-&quot; HTML attributes when rendering to HTML."
				},
				"type": {
					"type": "string",
					"enum": [
						"table",
						"tableGroup"
					]
				},
				"legacy": {
					"$ref": "util.json#/$defs/legacy"
				},
				"otherSources": {
					"$ref": "util.json#/$defs/otherSources"
				},
				"referenceSources": {
					"$ref": "util.json#/$defs/referenceSources"
				},
				"chapter": {
					"type": "object",
					"properties": {
						"name": {
							"type": "string"
						},
						"ordinal": {
							"type": "object",
							"properties": {
								"type": {
									"type": "string",
									"enum": [
										"chapter",
										"appendix",
										"part",
										"episode",
										"level",
										"section"
									]
								},
								"identifier": {
									"type": [
										"integer",
										"string"
									]
								}
							},
							"additionalProperties": false,
							"required": [
								"type",
								"identifier"
							]
						},
						"index": {
							"type": "integer"
						}
					}
				},
				"srd": {
					"$ref": "util.json#/$defs/srd"
				},
				"srd52": {
					"$ref": "util.json#/$defs/srd"
				},
				"basicRules": {
					"$ref": "util.json#/$defs/basicRules"
				},
				"basicRules2024": {
					"$ref": "util.json#/$defs/basicRules"
				},
				"caption": {
					"type": "string"
				},
				"isStriped": {
					"type": "boolean"
				},
				"isNameGenerator": {
					"type": "boolean",
					"description": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc.",
					"markdownDescription": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc."
				},
				"style": {
					"type": "string"
				},
				"colLabels": {
					"type": "array",
					"items": {
						"$ref": "entry.json#/$defs/_entryTableColLabelItem"
					}
				},
				"colLabelRows": {
					"type": "array",
					"items": {
						"type": "array",
						"items": {
							"$ref": "entry.json#/$defs/_entryTableColLabelItem"
						}
					},
					"minItems": 1
				},
				"colStyles": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"rowLabels": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"rowStyles": {
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"rows": {
					"type": "array",
					"items": {
						"anyOf": [
							{
								"type": "array",
								"items": {
									"$ref": "entry.json"
								}
							},
							{
								"$ref": "entry.json#/$defs/entryTableRow"
							}
						]
					}
				},
				"footnotes": {
					"type": "array",
					"items": {
						"$ref": "entry.json"
					}
				}
			},
			"dependencies": {
				"colLabels": {
					"not": {
						"required": [
							"colLabelRows"
						]
					}
				},
				"colLabelRows": {
					"not": {
						"required": [
							"colLabels"
						]
					}
				}
			},
			"additionalProperties": false
		},
		"table": {
			"anyOf": [
				{
					"type": "object",
					"properties": {
						"name": {
							"type": "string"
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"page": {
							"$ref": "util.json#/$defs/page"
						},
						"data": {
							"description": "A generic object for storing special data for external use-cases. Keys prefixed with \"rd-\" should be added as \"data-\" HTML attributes when rendering to HTML.",
							"type": "object",
							"markdownDescription": "A generic object for storing special data for external use-cases. Keys prefixed with &quot;rd-&quot; should be added as &quot;data-&quot; HTML attributes when rendering to HTML."
						},
						"type": {
							"type": "string",
							"enum": [
								"table",
								"tableGroup"
							],
							"const": "table"
						},
						"legacy": {
							"$ref": "util.json#/$defs/legacy"
						},
						"otherSources": {
							"$ref": "util.json#/$defs/otherSources"
						},
						"referenceSources": {
							"$ref": "util.json#/$defs/referenceSources"
						},
						"chapter": {
							"type": "object",
							"properties": {
								"name": {
									"type": "string"
								},
								"ordinal": {
									"type": "object",
									"properties": {
										"type": {
											"type": "string",
											"enum": [
												"chapter",
												"appendix",
												"part",
												"episode",
												"level",
												"section"
											]
										},
										"identifier": {
											"type": [
												"integer",
												"string"
											]
										}
									},
									"additionalProperties": false,
									"required": [
										"type",
										"identifier"
									]
								},
								"index": {
									"type": "integer"
								}
							}
						},
						"srd": {
							"$ref": "util.json#/$defs/srd"
						},
						"srd52": {
							"$ref": "util.json#/$defs/srd"
						},
						"basicRules": {
							"$ref": "util.json#/$defs/basicRules"
						},
						"basicRules2024": {
							"$ref": "util.json#/$defs/basicRules"
						},
						"caption": {
							"type": "string"
						},
						"isStriped": {
							"type": "boolean"
						},
						"isNameGenerator": {
							"type": "boolean",
							"description": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc.",
							"markdownDescription": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc."
						},
						"style": {
							"type": "string"
						},
						"colLabels": {
							"type": "array",
							"items": {
								"$ref": "entry.json#/$defs/_entryTableColLabelItem"
							}
						},
						"colLabelRows": {
							"type": "array",
							"items": {
								"type": "array",
								"items": {
									"$ref": "entry.json#/$defs/_entryTableColLabelItem"
								}
							},
							"minItems": 1
						},
						"colStyles": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rowLabels": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rowStyles": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rows": {
							"type": "array",
							"items": {
								"anyOf": [
									{
										"type": "array",
										"items": {
											"$ref": "entry.json"
										}
									},
									{
										"$ref": "entry.json#/$defs/entryTableRow"
									}
								]
							}
						},
						"footnotes": {
							"type": "array",
							"items": {
								"$ref": "entry.json"
							}
						}
					},
					"dependencies": {
						"colLabels": {
							"not": {
								"required": [
									"colLabelRows"
								]
							}
						},
						"colLabelRows": {
							"not": {
								"required": [
									"colLabels"
								]
							}
						}
					},
					"additionalProperties": false,
					"required": [
						"name",
						"source",
						"rows"
					]
				},
				{
					"type": "object",
					"properties": {
						"name": {
							"type": "string"
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"page": {
							"$ref": "util.json#/$defs/page"
						},
						"data": {
							"description": "A generic object for storing special data for external use-cases. Keys prefixed with \"rd-\" should be added as \"data-\" HTML attributes when rendering to HTML.",
							"type": "object",
							"markdownDescription": "A generic object for storing special data for external use-cases. Keys prefixed with &quot;rd-&quot; should be added as &quot;data-&quot; HTML attributes when rendering to HTML."
						},
						"type": {
							"type": "string",
							"enum": [
								"table",
								"tableGroup"
							],
							"const": "tableGroup"
						},
						"legacy": {
							"$ref": "util.json#/$defs/legacy"
						},
						"otherSources": {
							"$ref": "util.json#/$defs/otherSources"
						},
						"referenceSources": {
							"$ref": "util.json#/$defs/referenceSources"
						},
						"chapter": {
							"type": "object",
							"properties": {
								"name": {
									"type": "string"
								},
								"ordinal": {
									"type": "object",
									"properties": {
										"type": {
											"type": "string",
											"enum": [
												"chapter",
												"appendix",
												"part",
												"episode",
												"level",
												"section"
											]
										},
										"identifier": {
											"type": [
												"integer",
												"string"
											]
										}
									},
									"additionalProperties": false,
									"required": [
										"type",
										"identifier"
									]
								},
								"index": {
									"type": "integer"
								}
							}
						},
						"srd": {
							"$ref": "util.json#/$defs/srd"
						},
						"srd52": {
							"$ref": "util.json#/$defs/srd"
						},
						"basicRules": {
							"$ref": "util.json#/$defs/basicRules"
						},
						"basicRules2024": {
							"$ref": "util.json#/$defs/basicRules"
						},
						"caption": {
							"type": "string"
						},
						"isStriped": {
							"type": "boolean"
						},
						"isNameGenerator": {
							"type": "boolean",
							"description": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc.",
							"markdownDescription": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc."
						},
						"style": {
							"type": "string"
						},
						"colLabels": {
							"type": "array",
							"items": {
								"$ref": "entry.json#/$defs/_entryTableColLabelItem"
							}
						},
						"colLabelRows": {
							"type": "array",
							"items": {
								"type": "array",
								"items": {
									"$ref": "entry.json#/$defs/_entryTableColLabelItem"
								}
							},
							"minItems": 1
						},
						"colStyles": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rowLabels": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rowStyles": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rows": {
							"type": "array",
							"items": {
								"anyOf": [
									{
										"type": "array",
										"items": {
											"$ref": "entry.json"
										}
									},
									{
										"$ref": "entry.json#/$defs/entryTableRow"
									}
								]
							}
						},
						"footnotes": {
							"type": "array",
							"items": {
								"$ref": "entry.json"
							}
						},
						"tables": {
							"type": "array",
							"items": {
								"$ref": "#/$defs/tableData"
							}
						}
					},
					"dependencies": {
						"colLabels": {
							"not": {
								"required": [
									"colLabelRows"
								]
							}
						},
						"colLabelRows": {
							"not": {
								"required": [
									"colLabels"
								]
							}
						}
					},
					"additionalProperties": false,
					"required": [
						"name",
						"source",
						"tables"
					]
				},
				{
					"type": "object",
					"properties": {
						"name": {
							"type": "string"
						},
						"source": {
							"$ref": "util.json#/$defs/source"
						},
						"page": {
							"$ref": "util.json#/$defs/page"
						},
						"data": {
							"description": "A generic object for storing special data for external use-cases. Keys prefixed with \"rd-\" should be added as \"data-\" HTML attributes when rendering to HTML.",
							"type": "object",
							"markdownDescription": "A generic object for storing special data for external use-cases. Keys prefixed with &quot;rd-&quot; should be added as &quot;data-&quot; HTML attributes when rendering to HTML."
						},
						"type": {
							"type": "string",
							"enum": [
								"table",
								"tableGroup"
							]
						},
						"legacy": {
							"$ref": "util.json#/$defs/legacy"
						},
						"otherSources": {
							"$ref": "util.json#/$defs/otherSources"
						},
						"referenceSources": {
							"$ref": "util.json#/$defs/referenceSources"
						},
						"chapter": {
							"type": "object",
							"properties": {
								"name": {
									"type": "string"
								},
								"ordinal": {
									"type": "object",
									"properties": {
										"type": {
											"type": "string",
											"enum": [
												"chapter",
												"appendix",
												"part",
												"episode",
												"level",
												"section"
											]
										},
										"identifier": {
											"type": [
												"integer",
												"string"
											]
										}
									},
									"additionalProperties": false,
									"required": [
										"type",
										"identifier"
									]
								},
								"index": {
									"type": "integer"
								}
							}
						},
						"srd": {
							"$ref": "util.json#/$defs/srd"
						},
						"srd52": {
							"$ref": "util.json#/$defs/srd"
						},
						"basicRules": {
							"$ref": "util.json#/$defs/basicRules"
						},
						"basicRules2024": {
							"$ref": "util.json#/$defs/basicRules"
						},
						"caption": {
							"type": "string"
						},
						"isStriped": {
							"type": "boolean"
						},
						"isNameGenerator": {
							"type": "boolean",
							"description": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc.",
							"markdownDescription": "Uses the result rolled to construct a name from multiple columns, such as Prefix, Given, Family, Suffix names etc."
						},
						"style": {
							"type": "string"
						},
						"colLabels": {
							"type": "array",
							"items": {
								"$ref": "entry.json#/$defs/_entryTableColLabelItem"
							}
						},
						"colLabelRows": {
							"type": "array",
							"items": {
								"type": "array",
								"items": {
									"$ref": "entry.json#/$defs/_entryTableColLabelItem"
								}
							},
							"minItems": 1
						},
						"colStyles": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rowLabels": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rowStyles": {
							"type": "array",
							"items": {
								"type": "string"
							}
						},
						"rows": {
							"type": "array",
							"items": {
								"anyOf": [
									{
										"type": "array",
										"items": {
											"$ref": "entry.json"
										}
									},
									{
										"$ref": "entry.json#/$defs/entryTableRow"
									}
								]
							}
						},
						"footnotes": {
							"type": "array",
							"items": {
								"$ref": "entry.json"
							}
						},
						"_copy": {
							"$ref": "util-copy.json#/$defs/copyBlock_copy_generic"
						}
					},
					"dependencies": {
						"colLabels": {
							"not": {
								"required": [
									"colLabelRows"
								]
							}
						},
						"colLabelRows": {
							"not": {
								"required": [
									"colLabels"
								]
							}
						}
					},
					"additionalProperties": false,
					"required": [
						"_copy"
					]
				}
			]
		}
	},
	"properties": {
		"table": {
			"type": "array",
			"minItems": 1,
			"uniqueItems": true,
			"items": {
				"$ref": "#/$defs/table"
			}
		},
		"_meta": {
			"$ref": "util.json#/$defs/metaBlock"
		}
	},
	"required": [
		"table"
	],
	"additionalProperties": false
}