{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "start": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[a-z0-9]{8}$"
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "sequences": {
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]{8}$"
          },
          "title": {
            "type": "string",
            "maxLength": 60
          },
          "x": {
            "type": "integer",
            "minimum": -100000,
            "maximum": 100000
          },
          "y": {
            "type": "integer",
            "minimum": -100000,
            "maximum": 100000
          },
          "group": {
            "type": "string",
            "pattern": "^[a-z0-9]{8}$"
          },
          "checkpoint": {
            "type": "string",
            "pattern": "^[A-Z0-9]{4,12}$"
          },
          "elements": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "image"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "alt": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "source": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "list"
                            },
                            "urls": {
                              "minItems": 1,
                              "maxItems": 20,
                              "type": "array",
                              "items": {
                                "type": "string",
                                "maxLength": 2000
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "urls"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "reddit"
                            },
                            "sub": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9_]{2,21}$"
                            },
                            "nsfw": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "kind",
                            "sub",
                            "nsfw"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "imgur"
                            },
                            "album": {
                              "type": "string",
                              "pattern": "^[A-Za-z0-9]{5,10}$"
                            }
                          },
                          "required": [
                            "kind",
                            "album"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "redgifs"
                            },
                            "by": {
                              "type": "string",
                              "enum": [
                                "tags",
                                "user"
                              ]
                            },
                            "ref": {
                              "type": "string",
                              "maxLength": 130
                            },
                            "media": {
                              "type": "string",
                              "enum": [
                                "all",
                                "images"
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "by",
                            "ref",
                            "media"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "url",
                    "alt"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "text"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "variants": {
                      "minItems": 1,
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 2000
                      }
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "input"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "variable": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_]{0,29}$"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "required": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "variable",
                    "label",
                    "required"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "button"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "set": {
                      "type": "object",
                      "properties": {
                        "variable": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,29}$"
                        },
                        "value": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "variable",
                        "value"
                      ]
                    },
                    "effects": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "variable": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,29}$"
                          },
                          "op": {
                            "type": "string",
                            "enum": [
                              "set",
                              "add",
                              "sub",
                              "rand"
                            ]
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 200
                          }
                        },
                        "required": [
                          "variable",
                          "op",
                          "value"
                        ]
                      }
                    },
                    "requires": {
                      "type": "object",
                      "properties": {
                        "variable": {
                          "type": "string",
                          "pattern": "^[a-z][a-z0-9_]{0,29}$"
                        },
                        "op": {
                          "type": "string",
                          "enum": [
                            "eq",
                            "neq",
                            "empty",
                            "notEmpty",
                            "gte",
                            "lt"
                          ]
                        },
                        "value": {
                          "type": "string",
                          "maxLength": 200
                        }
                      },
                      "required": [
                        "variable",
                        "op"
                      ]
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "label",
                    "next"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "timer"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "seconds": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 600
                    },
                    "secondsMax": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 600
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    },
                    "after": {
                      "type": "string",
                      "enum": [
                        "auto",
                        "button"
                      ]
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "hidden": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "seconds"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "sound"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "volume": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "times": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "loop": {
                      "type": "boolean"
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "url",
                    "volume",
                    "times",
                    "loop"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "video"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "alt": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "loop": {
                      "type": "boolean"
                    },
                    "muted": {
                      "type": "boolean"
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "url",
                    "alt",
                    "loop",
                    "muted"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "speech"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "text": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "rate": {
                      "type": "number",
                      "minimum": 0.5,
                      "maximum": 2
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "text",
                    "rate"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "dialog"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "typing": {
                      "type": "boolean"
                    },
                    "speak": {
                      "type": "boolean"
                    },
                    "lines": {
                      "minItems": 1,
                      "maxItems": 30,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string",
                            "maxLength": 500
                          },
                          "speaker": {
                            "type": "string",
                            "maxLength": 40
                          },
                          "wait": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 60
                          }
                        },
                        "required": [
                          "text"
                        ]
                      }
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "typing",
                    "speak",
                    "lines"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "metronome"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "bpm": {
                      "type": "number",
                      "minimum": 20,
                      "maximum": 300
                    },
                    "bpmVar": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_]{0,29}$"
                    },
                    "beats": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "depth": {
                      "type": "number",
                      "minimum": -1,
                      "maximum": 1
                    },
                    "tempo": {
                      "type": "object",
                      "properties": {
                        "curve": {
                          "type": "string",
                          "enum": [
                            "ramp",
                            "wave",
                            "random"
                          ]
                        },
                        "to": {
                          "type": "number",
                          "minimum": 20,
                          "maximum": 300
                        },
                        "seconds": {
                          "type": "number",
                          "minimum": 0.5,
                          "maximum": 600
                        }
                      },
                      "required": [
                        "curve",
                        "to",
                        "seconds"
                      ]
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "bpm"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "depth"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "fixed",
                        "ramp",
                        "steps",
                        "wave",
                        "random",
                        "metronome"
                      ]
                    },
                    "from": {
                      "type": "number",
                      "minimum": -1,
                      "maximum": 1
                    },
                    "to": {
                      "type": "number",
                      "minimum": -1,
                      "maximum": 1
                    },
                    "seconds": {
                      "type": "number",
                      "minimum": 0.5,
                      "maximum": 600
                    },
                    "per": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 1
                        },
                        {
                          "type": "number",
                          "const": 2
                        }
                      ]
                    },
                    "steps": {
                      "type": "integer",
                      "minimum": 2,
                      "maximum": 20
                    },
                    "xrayChannel": {
                      "type": "string",
                      "enum": [
                        "vaginal",
                        "anal",
                        "oral"
                      ]
                    },
                    "indicatorMode": {
                      "type": "string",
                      "enum": [
                        "dildo",
                        "stroker"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "mode",
                    "from",
                    "to",
                    "seconds",
                    "per"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "cum"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "delay": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 600
                    },
                    "seconds": {
                      "type": "number",
                      "minimum": 0.5,
                      "maximum": 30
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "delay",
                    "seconds"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "typing"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "line": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "caseSensitive": {
                      "type": "boolean"
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "line",
                    "count",
                    "caseSensitive",
                    "next"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "wordle"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "word": {
                      "type": "string",
                      "pattern": "^\\p{L}{3,10}$"
                    },
                    "attempts": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10
                    },
                    "success": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    },
                    "fail": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "word",
                    "attempts",
                    "success",
                    "fail"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "jigsaw"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "url": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "alt": {
                      "type": "string",
                      "maxLength": 200
                    },
                    "grid": {
                      "type": "integer",
                      "minimum": 2,
                      "maximum": 6
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "url",
                    "alt",
                    "grid",
                    "next"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "pin"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "next": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "seq"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^[a-z0-9]{8}$"
                            }
                          },
                          "required": [
                            "type",
                            "id"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "end"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "rules"
                            },
                            "rules": {
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "variable": {
                                    "type": "string",
                                    "pattern": "^[a-z][a-z0-9_]{0,29}$"
                                  },
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      "eq",
                                      "neq",
                                      "empty",
                                      "notEmpty",
                                      "gte",
                                      "lt"
                                    ]
                                  },
                                  "value": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  }
                                },
                                "required": [
                                  "variable",
                                  "op",
                                  "next"
                                ]
                              }
                            },
                            "fallback": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-z0-9]{8}$"
                                },
                                {
                                  "type": "string",
                                  "const": "end"
                                }
                              ]
                            }
                          },
                          "required": [
                            "type",
                            "rules",
                            "fallback"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "random"
                            },
                            "options": {
                              "minItems": 1,
                              "maxItems": 10,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "next": {
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "pattern": "^[a-z0-9]{8}$"
                                      },
                                      {
                                        "type": "string",
                                        "const": "end"
                                      }
                                    ]
                                  },
                                  "weight": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "next",
                                  "weight"
                                ]
                              }
                            }
                          },
                          "required": [
                            "type",
                            "options"
                          ]
                        }
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "label",
                    "next"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "unpin"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "pin": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "pin"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "vars"
                    },
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z0-9]{8}$"
                    },
                    "effects": {
                      "minItems": 1,
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "variable": {
                            "type": "string",
                            "pattern": "^[a-z][a-z0-9_]{0,29}$"
                          },
                          "op": {
                            "type": "string",
                            "enum": [
                              "set",
                              "add",
                              "sub",
                              "rand"
                            ]
                          },
                          "value": {
                            "type": "string",
                            "maxLength": 200
                          }
                        },
                        "required": [
                          "variable",
                          "op",
                          "value"
                        ]
                      }
                    }
                  },
                  "required": [
                    "type",
                    "id",
                    "effects"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "id",
          "title",
          "x",
          "y",
          "elements"
        ]
      }
    },
    "groups": {
      "maxItems": 30,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9]{8}$"
          },
          "title": {
            "type": "string",
            "maxLength": 60
          }
        },
        "required": [
          "id",
          "title"
        ]
      }
    },
    "backdrop": {
      "type": "string",
      "enum": [
        "none",
        "calm",
        "sexy",
        "dreamy",
        "warm"
      ]
    },
    "smooth": {
      "type": "boolean"
    },
    "persist": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9_]{0,29}$"
      }
    }
  },
  "required": [
    "version",
    "start",
    "sequences"
  ]
}
