{
  "schema": "easycatalog-composition-plan/1",
  "threads": [
    {
      "name": "catalog-content",
      "gutter": 12,
      "crossAxis": "stretch",
      "content": [
        {
          "type": "flow",
          "name": "full-category-keep-next-flow",
          "data": {
            "source": "selectionRoot",
            "result": "self"
          },
          "onEmpty": "error",
          "header": {
            "sections": [
              {
                "type": "formattingRule",
                "name": "full-category-keep-next-title",
                "asset": "__EC_RECIPE_523x770_TITLE_FULL_CATEGORY_KEEP_NEXT",
                "onEmpty": "error"
              }
            ]
          },
          "body": {
            "sections": [
              {
                "type": "forEach",
                "itemName": "keptCategory1Group",
                "data": {
                  "source": "selectionRoot",
                  "result": "children",
                  "shape": {
                    "scope": "records",
                    "sort": [
                      {
                        "field": "Category1",
                        "missing": "first"
                      },
                      {
                        "field": "Category2",
                        "missing": "first"
                      },
                      {
                        "field": "AlphaSV"
                      }
                    ],
                    "group": [
                      {
                        "field": "Category1"
                      },
                      {
                        "field": "Category2"
                      }
                    ]
                  }
                },
                "template": {
                  "type": "flow",
                  "name": "kept-category1-flow-{index1}",
                  "data": {
                    "source": "variable",
                    "name": "keptCategory1Group",
                    "result": "self"
                  },
                  "onEmpty": "error",
                  "header": {
                    "sections": [
                      {
                        "type": "formattingRule",
                        "name": "kept-category1-heading-{index1}",
                        "asset": "__EC_RECIPE_523x770_HEADER_FULL_CATEGORY1_KEEP_NEXT",
                        "data": {
                          "source": "variable",
                          "name": "keptCategory1Group",
                          "result": "self"
                        },
                        "verticalOffset": 3,
                        "keepWithNext": true,
                        "repeat": "every area",
                        "propertyResolver": {
                          "asset": {
                            "if": {
                              "condition": {
                                "context": "continuation"
                              },
                              "then": "__EC_RECIPE_523x770_HEADER_FULL_CATEGORY1_KEEP_NEXT_CONTINUED",
                              "else": "__EC_RECIPE_523x770_HEADER_FULL_CATEGORY1_KEEP_NEXT"
                            }
                          }
                        },
                        "onEmpty": "error"
                      }
                    ]
                  },
                  "body": {
                    "layoutPattern": {
                      "name": "kept-category1-columns-{index1}",
                      "columns": 3,
                      "columnGutter": 12,
                      "finalRegion": "balance"
                    },
                    "sections": [
                      {
                        "type": "forEach",
                        "itemName": "keptCategory2Group",
                        "data": {
                          "source": "variable",
                          "name": "keptCategory1Group",
                          "result": "children"
                        },
                        "template": {
                          "type": "flow",
                          "name": "kept-category2-flow-{index1}",
                          "data": {
                            "source": "variable",
                            "name": "keptCategory2Group",
                            "result": "self"
                          },
                          "onEmpty": "error",
                          "header": {
                            "sections": [
                              {
                                "type": "formattingRule",
                                "name": "kept-category2-heading-{index1}",
                                "asset": "__EC_RECIPE_523x770_HEADER_COLUMN_CATEGORY2",
                                "data": {
                                  "source": "variable",
                                  "name": "keptCategory2Group",
                                  "result": "self"
                                },
                                "verticalOffset": 3,
                                "repeat": "every area",
                                "mergeAdjacentHeaders": true,
                                "propertyResolver": {
                                  "asset": {
                                    "if": {
                                      "condition": {
                                        "context": "continuation"
                                      },
                                      "then": "__EC_RECIPE_523x770_HEADER_COLUMN_CATEGORY2_CONTINUED",
                                      "else": "__EC_RECIPE_523x770_HEADER_COLUMN_CATEGORY2"
                                    }
                                  }
                                },
                                "onEmpty": "error"
                              }
                            ]
                          },
                          "body": {
                            "sections": [
                              {
                                "type": "formattingRule",
                                "name": "kept-category-record-{index1}",
                                "asset": "__EC_RECIPE_523x770_CARD_GROUPED_COLUMN_RECORD",
                                "assetForEach": true,
                                "fillDirection": "horizontal",
                                "horizontalGutter": 12,
                                "verticalGutter": 12,
                                "onEmpty": "error",
                                "data": {
                                  "source": "variable",
                                  "name": "keptCategory2Group",
                                  "result": "children"
                                }
                              }
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              }
            ]
          }
        }
      ]
    }
  ]
}
