{
  "version": 0,
  "entry": "b1",
  "blocks": {
    "b1": {
      "type": "setVar",
      "inputs": {
        "name": "sequence",
        "value": {
          "type": "prGetActiveSequenceRef",
          "inputs": {}
        }
      },
      "next": "b2"
    },
    "b2": {
      "type": "setVar",
      "inputs": {
        "name": "track",
        "value": {
          "type": "prGetTrackRef",
          "inputs": {
            "sequence": {
              "var": "sequence"
            },
            "kind": "VIDEO",
            "index": 0
          }
        }
      },
      "next": "b3"
    },
    "b3": {
      "type": "setVar",
      "inputs": {
        "name": "beforeItems",
        "value": {
          "type": "prListTrackItems",
          "inputs": {
            "track": {
              "var": "track"
            },
            "kind": "CLIP"
          }
        }
      },
      "next": "b4"
    },
    "b4": {
      "type": "setVar",
      "inputs": {
        "name": "beforeCount",
        "value": {
          "type": "listLength",
          "inputs": {
            "list": {
              "var": "beforeItems"
            }
          }
        }
      },
      "next": "b5"
    },
    "b5": {
      "type": "setVar",
      "inputs": {
        "name": "beforeA",
        "value": {
          "type": "listGet",
          "inputs": {
            "list": {
              "var": "beforeItems"
            },
            "where": "FIRST"
          }
        }
      },
      "next": "b6"
    },
    "b6": {
      "type": "setVar",
      "inputs": {
        "name": "beforeC",
        "value": {
          "type": "listGet",
          "inputs": {
            "list": {
              "var": "beforeItems"
            },
            "where": "LAST"
          }
        }
      },
      "next": "b7"
    },
    "b7": {
      "type": "setVar",
      "inputs": {
        "name": "beforeAStart",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeA"
            },
            "property": "START_SECONDS"
          }
        }
      },
      "next": "b8"
    },
    "b8": {
      "type": "setVar",
      "inputs": {
        "name": "beforeAEnd",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeA"
            },
            "property": "END_SECONDS"
          }
        }
      },
      "next": "b9"
    },
    "b9": {
      "type": "setVar",
      "inputs": {
        "name": "beforeAIn",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeA"
            },
            "property": "IN_POINT_SECONDS"
          }
        }
      },
      "next": "b10"
    },
    "b10": {
      "type": "setVar",
      "inputs": {
        "name": "beforeAOut",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeA"
            },
            "property": "OUT_POINT_SECONDS"
          }
        }
      },
      "next": "b11"
    },
    "b11": {
      "type": "setVar",
      "inputs": {
        "name": "beforeCStart",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeC"
            },
            "property": "START_SECONDS"
          }
        }
      },
      "next": "b12"
    },
    "b12": {
      "type": "setVar",
      "inputs": {
        "name": "beforeCEnd",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeC"
            },
            "property": "END_SECONDS"
          }
        }
      },
      "next": "b13"
    },
    "b13": {
      "type": "setVar",
      "inputs": {
        "name": "beforeCIn",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeC"
            },
            "property": "IN_POINT_SECONDS"
          }
        }
      },
      "next": "b14"
    },
    "b14": {
      "type": "setVar",
      "inputs": {
        "name": "beforeCOut",
        "value": {
          "type": "prGetTrackItemProperty",
          "inputs": {
            "item": {
              "var": "beforeC"
            },
            "property": "OUT_POINT_SECONDS"
          }
        }
      },
      "next": "b15"
    },
    "b15": {
      "type": "prSceneEditDetect",
      "inputs": {
        "items": [
          {
            "type": "listGet",
            "inputs": {
              "list": {
                "type": "prListTrackItems",
                "inputs": {
                  "track": {
                    "var": "track"
                  },
                  "kind": "CLIP"
                }
              },
              "where": "INDEX",
              "index": 1
            }
          }
        ],
        "operation": "APPLY_CUTS",
        "onError": "STOP",
        "storeResultIn": "detected"
      },
      "next": "b16"
    },
    "b16": {
      "type": "setVar",
      "inputs": {
        "name": "afterItems",
        "value": {
          "type": "prListTrackItems",
          "inputs": {
            "track": {
              "var": "track"
            },
            "kind": "CLIP"
          }
        }
      },
      "next": "b17"
    },
    "b17": {
      "type": "setVar",
      "inputs": {
        "name": "afterCount",
        "value": {
          "type": "listLength",
          "inputs": {
            "list": {
              "var": "afterItems"
            }
          }
        }
      },
      "next": "b18"
    },
    "b18": {
      "type": "setVar",
      "inputs": {
        "name": "afterA",
        "value": {
          "type": "listGet",
          "inputs": {
            "list": {
              "var": "afterItems"
            },
            "where": "FIRST"
          }
        }
      },
      "next": "b19"
    },
    "b19": {
      "type": "setVar",
      "inputs": {
        "name": "afterC",
        "value": {
          "type": "listGet",
          "inputs": {
            "list": {
              "var": "afterItems"
            },
            "where": "LAST"
          }
        }
      },
      "next": "b20"
    },
    "b20": {
      "type": "setVar",
      "inputs": {
        "name": "neighborTimelinePreserved",
        "value": {
          "type": "logicOperation",
          "inputs": {
            "op": "AND",
            "a": {
              "type": "logicOperation",
              "inputs": {
                "op": "AND",
                "a": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterA"
                        },
                        "property": "START_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeAStart"
                    }
                  }
                },
                "b": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterA"
                        },
                        "property": "END_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeAEnd"
                    }
                  }
                }
              }
            },
            "b": {
              "type": "logicOperation",
              "inputs": {
                "op": "AND",
                "a": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterC"
                        },
                        "property": "START_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeCStart"
                    }
                  }
                },
                "b": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterC"
                        },
                        "property": "END_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeCEnd"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "next": "b21"
    },
    "b21": {
      "type": "setVar",
      "inputs": {
        "name": "neighborSourcePreserved",
        "value": {
          "type": "logicOperation",
          "inputs": {
            "op": "AND",
            "a": {
              "type": "logicOperation",
              "inputs": {
                "op": "AND",
                "a": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterA"
                        },
                        "property": "IN_POINT_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeAIn"
                    }
                  }
                },
                "b": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterA"
                        },
                        "property": "OUT_POINT_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeAOut"
                    }
                  }
                }
              }
            },
            "b": {
              "type": "logicOperation",
              "inputs": {
                "op": "AND",
                "a": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterC"
                        },
                        "property": "IN_POINT_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeCIn"
                    }
                  }
                },
                "b": {
                  "type": "logicCompare",
                  "inputs": {
                    "op": "EQ",
                    "a": {
                      "type": "prGetTrackItemProperty",
                      "inputs": {
                        "item": {
                          "var": "afterC"
                        },
                        "property": "OUT_POINT_SECONDS"
                      }
                    },
                    "b": {
                      "var": "beforeCOut"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "next": "b22"
    },
    "b22": {
      "type": "esConsoleLog",
      "inputs": {
        "message": {
          "type": "textJoin",
          "inputs": {
            "items": [
              "SCENE_EDIT_E2E|before=",
              {
                "var": "beforeCount"
              },
              "|after=",
              {
                "var": "afterCount"
              },
              "|detected=",
              {
                "var": "detected"
              },
              "|neighborTimeline=",
              {
                "var": "neighborTimelinePreserved"
              },
              "|neighborSource=",
              {
                "var": "neighborSourcePreserved"
              }
            ]
          }
        }
      },
      "next": null
    }
  }
}
