{
  "CarChoices": [],
  "EmbeddedJavascript": "const btnIndex = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]\r\nconst encIndex = [ 24, 36, 48 ]\r\nconst buttonIDs = [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]\r\nconst ledCount_TOT = 60\r\nconst ledCount_BTN = 1\r\nconst ledCount_ENC = 12\r\nconst ledCount_RPM = 10\r\nconst rpmCount = 10\r\nconst shutdownTime = 500\r\n\r\nconst deviceID = \"R295\"\r\n\r\nfunction convertToRGB (color) {\r\n\tvar colorInt = parseInt(color.slice(1), 16);\r\n\tvar red = (colorInt >> 16) & 255;\r\n\tvar green = (colorInt >> 8) & 255;\r\n\tvar blue = colorInt & 255;\r\n\treturn [red, green, blue];\r\n}\r\n\r\nfunction intToHex (input) {\r\n\tvar hex = input.toString(16)\r\n\treturn (hex.length == 1) ? \"0\" + hex : hex;\r\n}\r\n\r\nfunction calculateGradient (color1, color2, count) {\r\n\tlet color1Int = convertToRGB(color1);\r\n\tlet color2Int = convertToRGB(color2);\r\n\t\r\n\tlet stepPerLED = new Array(3);\r\n\tfor(var i = 0; i < 3; i++)\r\n\t\tstepPerLED[i] = (color2Int[i] - color1Int[i]) / (count - 1);\r\n\t\t\r\n\tlet gradient = new Array(count);\r\n\tfor(var i = 0; i < count; i++) {\r\n\t\tlet rgb = new Array(3);\r\n\t\tfor(var j = 0; j < 3; j++)\r\n\t\t\trgb[j] = Math.round(color1Int[j] + i * stepPerLED[j]);\r\n\t\tgradient[i] = \"#FF\" + intToHex(rgb[0]) + intToHex(rgb[1]) + intToHex(rgb[2]);\r\n\t}\r\n\treturn gradient;\r\n}\r\n\r\nfunction calculateDoubleGradient (color1, color2, color3, count) {\r\n\tlet halve1 = calculateGradient(color1, color2, Math.ceil(count/ 2.0));\r\n\tlet halve2 = calculateGradient(color2, color3, Math.ceil(count/ 2.0));\r\n\r\n\treturn (count % 2 == 1) ? halve1.slice(0, -1).concat(halve2) : halve1.concat(halve2);\r\n}",
  "GlobalBrightness": 100.0,
  "GlobalBrightnessPreset": {
    "CurrentMode": 0,
    "Brightness": 100.0,
    "BrightnessSettings": {}
  },
  "LedContainers": [
    {
      "BrightnessFormula": {
        "JSExt": 0,
        "Interpreter": 1,
        "Expression": "if($prop(\"ATSR_Hub.NightMode_IsActive\"))\r\n\treturn $prop(\"ATSR_Hub.NightMode_BrightnessValue\");\r\n\r\nif($prop('ATSR_Hub.enableDimming') == true) {\r\n\tvar light_status;\r\n\r\n\tswitch($prop('DataCorePlugin.CurrentGame')) {\r\n\t\tcase 'IRacing': {\r\n\t\t\tlight_status = 0;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 'AssettoCorsaCompetizione': {\r\n\t\t\tlight_status = $prop('GameRawData.Graphics.LightsStage');\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 'LMU': {\r\n\t\t\tlight_status = $prop('GameRawData.CurrentPlayerTelemetry.mHeadlights');\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tdefault:\r\n\t\t\tlight_status = 0;\r\n\t}\r\n\toutput = light_status;\r\n\t\r\n\tswitch(output){\r\n\t\tcase 0: return 100;\r\n\t\tcase 1: return 70;\r\n\t\tcase 2: return 40;\r\n\t\tdefault: return 100;\r\n\t}\r\n}\r\nreturn 100; //default\r\n\t"
      },
      "LedContainers": [
        {
          "TriggerFormula": {
            "JSExt": 4,
            "Interpreter": 1,
            "Expression": "if($prop('DataCorePlugin.GameRunning') == true && \r\n$prop(\"ATSR_Hub.deviceactive_\" + deviceID) == true)\r\n\treturn true\r\nreturn false"
          },
          "LedContainers": [
            {
              "LedContainers": [
                {
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "var engineState = $prop(\"EngineStarted\");\r\n\r\nif(engineState != engineCompare && engineState == 0) {\r\n\trun = true;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + shutdownTime - 10) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif(engineState == 1) {\r\n\trun = false;\r\n}\r\n\r\n// Shutdown Calc /\\\r\n\r\nif($prop(\"DataCorePlugin.CurrentGame\") == 'IRacing') {\r\n\tif($prop(\"ATSR_Hub.\" + deviceID + \"_enableBackground\") && $prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& (!$prop(\"GameRawData.Telemetry.IsOnTrack\")))\r\n\t\treturn true;\r\n\t}\r\nif($prop(\"DataCorePlugin.CurrentGame\") == \"AssettoCorsaCompetizione\") {\r\n\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_enableBackground\") && $prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& ($prop(\"OrientationPitch\") == 0 || $prop(\"DataCorePlugin.GamePaused\")))\r\n\t\treturn true;\r\n}\r\nif($prop(\"DataCorePlugin.CurrentGame\") == \"LMU\") {\r\n\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_enableBackground\") && $prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& ($prop(\"DataCorePlugin.GamePaused\")))\r\n\t\treturn true;\r\n}\r\n\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_enableBackground\") && ($prop('EngineStarted') == 1 || $prop('EngineStarted') == null))\r\n\treturn true;\r\nelse if($prop(\"ATSR_Hub.\" + deviceID + \"_enableBackground\") && $prop(\"EngineStarted\") == 0)\r\n\treturn run;\r\nelse\r\n\treturn false;",
                        "PreExpression": "var startTime = Date.now(),\r\n\tengineCompare = 1,\r\n\ttimeCompare = 0,\r\n\trun = false;"
                      },
                      "LedContainers": [
                        {
                          "LedContainers": [
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 1)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#8A2BE2;0,1,#964BDB;0,2,#9277F1;0,3,#9D94F2;0,4,#ADAEF0;0,5,#8A2BE2;0,6,#964BDB;0,7,#9277F1;0,24,#8A2BE2;0,25,#8A2BE2;0,26,#964BDB;0,27,#9277F1;0,28,#9D94F2;0,29,#ADAEF0;0,30,#ADAEF0;0,31,#ADAEF0;0,32,#9D94F2;0,33,#9277F1;0,34,#964BDB;0,35,#8A2BE2;0,36,#8A2BE2;0,37,#8A2BE2;0,38,#964BDB;0,39,#9277F1;0,40,#9D94F2;0,8,#9D94F2;0,9,#ADAEF0;0,41,#ADAEF0;0,42,#ADAEF0;0,43,#ADAEF0;0,44,#9D94F2;0,45,#9277F1;0,46,#964BDB;0,47,#8A2BE2;0,48,#ADAEF0;0,49,#ADAEF0;0,50,#ADAEF0;0,51,#ADAEF0;0,52,#ADAEF0;0,53,#ADAEF0;0,54,#ADAEF0;0,55,#ADAEF0;0,56,#ADAEF0;0,57,#ADAEF0;0,58,#ADAEF0;0,59,#ADAEF0",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "150, 75, 219"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 1 - ATSR Theme"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 2)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#3C2576;0,1,#37389F;0,2,#008BAC;0,3,#00BAB3;0,4,#02ED8F;0,5,#3C2576;0,6,#37389F;0,7,#008BAC;0,24,#37389F;0,25,#37389F;0,26,#37389F;0,27,#008BAC;0,28,#00BAB3;0,29,#02ED8F;0,30,#02ED8F;0,31,#02ED8F;0,32,#00BAB3;0,33,#008BAC;0,34,#37389F;0,35,#37389F;0,36,#37389F;0,37,#37389F;0,38,#37389F;0,39,#008BAC;0,40,#00BAB3;0,8,#00BAB3;0,9,#02ED8F;0,41,#02ED8F;0,42,#02ED8F;0,43,#02ED8F;0,44,#00BAB3;0,45,#008BAC;0,46,#37389F;0,47,#37389F;0,48,#02ED8F;0,49,#02ED8F;0,50,#02ED8F;0,51,#02ED8F;0,52,#02ED8F;0,53,#02ED8F;0,54,#02ED8F;0,55,#02ED8F;0,56,#02ED8F;0,57,#02ED8F;0,58,#02ED8F;0,59,#02ED8F",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "55, 56, 159"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 2 - Aurora Theme"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 3)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#FFFFFF;0,1,#FFFFFF;0,2,#FF71B6;0,3,#FF71B6;0,4,#63EDFF;0,5,#FFFFFF;0,6,#FFFFFF;0,7,#FF71B6;0,24,#FF71B6;0,25,#FF71B6;0,26,#DF95F8;0,27,#A8BCFF;0,28,#7ED7FF;0,29,#63EDFF;0,30,#63EDFF;0,31,#63EDFF;0,32,#7ED7FF;0,33,#A8BCFF;0,34,#DF95F8;0,35,#FF71B6;0,36,#FF71B6;0,37,#FF71B6;0,38,#DF95F8;0,39,#A8BCFF;0,40,#7ED7FF;0,8,#FF71B6;0,9,#63EDFF;0,41,#63EDFF;0,42,#63EDFF;0,43,#63EDFF;0,44,#7ED7FF;0,45,#A8BCFF;0,46,#DF95F8;0,47,#FF71B6;0,48,#63EDFF;0,49,#63EDFF;0,50,#63EDFF;0,51,#63EDFF;0,52,#63EDFF;0,53,#63EDFF;0,54,#63EDFF;0,55,#63EDFF;0,56,#63EDFF;0,57,#63EDFF;0,58,#63EDFF;0,59,#63EDFF",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "223, 149, 248"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 3 - Cotton Candy"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 4)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#FFA500;0,1,#FF873D;0,2,#FF6B5D;0,3,#FF4373;0,4,#FF0090;0,5,#FFA500;0,6,#FF873D;0,7,#FF6B5D;0,24,#FFA500;0,25,#FFA500;0,26,#FF873D;0,27,#FF6B5D;0,28,#FF4373;0,29,#FF0090;0,30,#FF0090;0,31,#FF0090;0,32,#FF4373;0,33,#FF6B5D;0,34,#FF873D;0,35,#FFA500;0,36,#FFA500;0,37,#FFA500;0,38,#FF873D;0,39,#FF6B5D;0,40,#FF4373;0,8,#FF4373;0,9,#FF0090;0,41,#FF0090;0,42,#FF0090;0,43,#FF0090;0,44,#FF4373;0,45,#FF6B5D;0,46,#FF873D;0,47,#FFA500;0,48,#FF0090;0,49,#FF0090;0,50,#FF0090;0,51,#FF0090;0,52,#FF0090;0,53,#FF0090;0,54,#FF0090;0,55,#FF0090;0,56,#FF0090;0,57,#FF0090;0,58,#FF0090;0,59,#FF0090",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "255, 135, 61"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 4 - Magenta Dawn"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 5)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#FF0000;0,1,Red;0,2,White;0,3,White;0,4,#FF0000;0,5,Red;0,6,Red;0,7,White;0,24,White;0,25,White;0,26,White;0,27,#FF0000;0,28,#FF0000;0,29,#FF0000;0,30,#FF0000;0,31,#FF0000;0,32,#FF0000;0,33,#FF0000;0,34,White;0,35,White;0,36,White;0,37,White;0,38,White;0,39,#FF0000;0,40,#FF0000;0,8,White;0,9,Red;0,41,#FF0000;0,42,#FF0000;0,43,#FF0000;0,44,#FF0000;0,45,#FF0000;0,46,White;0,47,White;0,48,#FF0000;0,49,#FF0000;0,50,#FF0000;0,51,#FF0000;0,52,#FF0000;0,53,#FF0000;0,54,#FF0000;0,55,#FF0000;0,56,#FF0000;0,57,#FF0000;0,58,#FF0000;0,59,#FF0000",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "White"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 5 - Red White Theme"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 6)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#00FF00;0,1,#00FF00;0,2,#00FF00;0,3,#00FF00;0,4,Lime;0,5,Red;0,6,Red;0,7,Red;0,24,#FFFFFF;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#FFFFFF;0,28,#FFFFFF;0,29,#FFFFFF;0,30,#FFFFFF;0,31,#00FF00;0,32,#00FF00;0,33,#00FF00;0,34,#00FF00;0,35,#00FF00;0,36,#FFFFFF;0,37,Red;0,38,Red;0,39,Red;0,40,Red;0,8,Red;0,9,Red;0,41,Red;0,42,Red;0,43,#FFFFFF;0,44,#FFFFFF;0,45,#FFFFFF;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#FFFFFF;0,51,#FFFFFF;0,52,#FFFFFF;0,53,#FFFFFF;0,54,#FFFFFF;0,55,#FFFFFF;0,56,#FFFFFF;0,57,#FFFFFF;0,58,#FFFFFF;0,59,#FFFFFF",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "White"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 6 - Tricolore Theme"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 7)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#FFFFFF;0,1,#FFFFFF;0,2,#16588E;0,3,#16588E;0,4,#FF0027;0,5,#FFFFFF;0,6,#FFFFFF;0,7,#16588E;0,24,#FFFFFF;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#16588E;0,28,#16588E;0,29,#FF0027;0,30,#FF0027;0,31,#FF0027;0,32,#FF0027;0,33,#FF0027;0,34,#16588E;0,35,#16588E;0,36,#FFFFFF;0,37,#16588E;0,38,#16588E;0,39,#FF0027;0,40,#FF0027;0,8,#16588E;0,9,#FF0027;0,41,#FF0027;0,42,#FF0027;0,43,#FF0027;0,44,#16588E;0,45,#16588E;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#FFFFFF;0,51,#FF0027;0,52,#FF0027;0,53,#FF0027;0,54,#FF0027;0,55,#FF0027;0,56,#FF0027;0,57,#FF0027;0,58,#FFFFFF;0,59,#FFFFFF",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "White"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 7 - BMW M"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 8)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#0094D8;0,1,#0094D8;0,2,#FFDC00;0,3,#0094D8;0,4,#FFDC00;0,5,#0094D8;0,6,#0094D8;0,7,#FFDC00;0,24,#0094D8;0,25,#0094D8;0,26,#FFDC00;0,27,#FFDC00;0,28,#FFDC00;0,29,#0094D8;0,30,#0094D8;0,31,#0094D8;0,32,#FFDC00;0,33,#FFDC00;0,34,#FFDC00;0,35,#0094D8;0,36,#0094D8;0,37,#0094D8;0,38,#FFDC00;0,39,#FFDC00;0,40,#FFDC00;0,8,#0094D8;0,9,#FFDC00;0,41,#0094D8;0,42,#0094D8;0,43,#0094D8;0,44,#FFDC00;0,45,#FFDC00;0,46,#FFDC00;0,47,#0094D8;0,48,#0094D8;0,49,#0094D8;0,50,#FFDC00;0,51,#FFDC00;0,52,#FFDC00;0,53,#0094D8;0,54,#0094D8;0,55,#0094D8;0,56,#FFDC00;0,57,#FFDC00;0,58,#FFDC00;0,59,#0094D8",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "0, 148, 216"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 8 - Bilstein Racing"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 9)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#FFFF00;0,1,#C0E100;0,2,#86C100;0,3,#4EA100;0,4,#008000;0,5,#FFFF00;0,6,#C0E100;0,7,#86C100;0,24,#FFFF00;0,25,#FFFF00;0,26,#C0E100;0,27,#86C100;0,28,#4EA100;0,29,#008000;0,30,#008000;0,31,#008000;0,32,#4EA100;0,33,#86C100;0,34,#C0E100;0,35,#FFFF00;0,36,#FFFF00;0,37,#FFFF00;0,38,#C0E100;0,39,#86C100;0,40,#4EA100;0,8,#4EA100;0,9,#008000;0,41,#008000;0,42,#008000;0,43,#008000;0,44,#4EA100;0,45,#86C100;0,46,#C0E100;0,47,#FFFF00;0,48,#4EA100;0,49,#4EA100;0,50,#008000;0,51,#008000;0,52,#008000;0,53,#008000;0,54,#008000;0,55,#008000;0,56,#008000;0,57,#008000;0,58,#008000;0,59,#4EA100",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "78, 161, 0"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 9 - Manthey Racing"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 10)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#A6051A;0,1,#A6051A;0,2,#FFEB00;0,3,#FFEB00;0,4,#A6051A;0,5,#A6051A;0,6,#A6051A;0,7,#FFEB00;0,24,#A6051A;0,25,#A6051A;0,26,#FFEB00;0,27,#FFFFFF;0,28,#FFEB00;0,29,#A6051A;0,30,#A6051A;0,31,#A6051A;0,32,#FFEB00;0,33,#FFFFFF;0,34,#FFEB00;0,35,#A6051A;0,36,#A6051A;0,37,#A6051A;0,38,#FFEB00;0,39,#FFFFFF;0,40,#FFEB00;0,8,#FFEB00;0,9,#A6051A;0,41,#A6051A;0,42,#A6051A;0,43,#A6051A;0,44,#FFEB00;0,45,#FFFFFF;0,46,#FFEB00;0,47,#A6051A;0,48,#A6051A;0,49,#A6051A;0,50,#FFEB00;0,51,#FFFFFF;0,52,#FFEB00;0,53,#A6051A;0,54,#A6051A;0,55,#A6051A;0,56,#FFEB00;0,57,#FFFFFF;0,58,#FFEB00;0,59,#A6051A",
                                        "FrameDuration": 100
                                      }
                                    ],
                                    "PenColor": "White"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 10 - Scuderia"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 11)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#121F9E;0,1,#223971;0,2,#445291;0,3,#FFC906;0,4,#FF004A;0,5,#121F9E;0,6,#223971;0,7,#445291;0,24,#FFC906;0,25,#FFC906;0,26,#FF990E;0,27,#FF622F;0,28,#FF004A;0,29,#FF004A;0,30,#FF004A;0,31,#FF004A;0,32,#FF004A;0,33,#FF622F;0,34,#FF990E;0,35,#FFC906;0,36,#FFC906;0,37,#FFC906;0,38,#FF990E;0,39,#FF622F;0,40,#FF004A;0,8,#FFC906;0,9,#FF004A;0,41,#FF004A;0,42,#FF004A;0,43,#FF004A;0,44,#FF004A;0,45,#FF622F;0,46,#FF990E;0,47,#FFC906;0,48,#FF004A;0,49,#FF004A;0,50,#FF004A;0,51,#FF004A;0,52,#FF004A;0,53,#FF004A;0,54,#FF004A;0,55,#FF004A;0,56,#FF004A;0,57,#FF004A;0,58,#FF004A;0,59,#FF004A",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "255, 153, 14"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 11 - Red B Racing"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 12)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#C6C6C6;0,1,#85BBB9;0,2,#42AFAC;0,3,#00A39E;0,4,#80142B;0,5,#C6C6C6;0,6,#85BBB9;0,7,#42AFAC;0,24,#00A39E;0,25,#00A39E;0,26,#2B7378;0,27,#554451;0,28,#80142B;0,29,#80142B;0,30,#80142B;0,31,#80142B;0,32,#80142B;0,33,#554451;0,34,#2B7378;0,35,#00A39E;0,36,#00A39E;0,37,#00A39E;0,38,#2B7378;0,39,#554451;0,40,#80142B;0,8,#00A39E;0,9,#80142B;0,41,#80142B;0,42,#80142B;0,43,#80142B;0,44,#80142B;0,45,#554451;0,46,#2B7378;0,47,#00A39E;0,48,#80142B;0,49,#80142B;0,50,#80142B;0,51,#80142B;0,52,#80142B;0,53,#80142B;0,54,#80142B;0,55,#80142B;0,56,#80142B;0,57,#80142B;0,58,#80142B;0,59,#80142B",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "43, 115, 120"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 12 - Merc Petronas"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 13)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#FF6600;0,1,#FF6600;0,2,#47C7FC;0,3,#47C7FC;0,4,#FF6600;0,5,#FF6600;0,6,#FF6600;0,7,#47C7FC;0,24,#47C7FC;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#FFFFFF;0,28,#47C7FC;0,29,#47C7FC;0,30,#FF6600;0,31,#FF6600;0,32,#FF6600;0,33,#FF6600;0,34,#FF6600;0,35,#47C7FC;0,36,#47C7FC;0,37,#47C7FC;0,38,#FF6600;0,39,#FF6600;0,40,#FF6600;0,8,#47C7FC;0,9,#FF6600;0,41,#FF6600;0,42,#FF6600;0,43,#47C7FC;0,44,#47C7FC;0,45,#FFFFFF;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#47C7FC;0,51,#47C7FC;0,52,#FF6600;0,53,#FF6600;0,54,#FF6600;0,55,#FF6600;0,56,#FF6600;0,57,#47C7FC;0,58,#47C7FC;0,59,#FFFFFF",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "White"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 13 - MCL Racing"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 14)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#00642D;0,1,#CEDC00;0,2,#00642D;0,3,#00642D;0,4,#CEDC00;0,5,#00642D;0,6,#CEDC00;0,7,#00642D;0,24,#00642D;0,25,#00642D;0,26,#338323;0,27,#67A117;0,28,#9ABE0C;0,29,#CEDC00;0,30,#CEDC00;0,31,#CEDC00;0,32,#9ABE0C;0,33,#67A117;0,34,#338323;0,35,#00642D;0,36,#00642D;0,37,#00642D;0,38,#338323;0,39,#67A117;0,40,#9ABE0C;0,8,#00642D;0,9,#CEDC00;0,41,#CEDC00;0,42,#CEDC00;0,43,#CEDC00;0,44,#9ABE0C;0,45,#67A117;0,46,#338323;0,47,#00642D;0,48,#CEDC00;0,49,#CEDC00;0,50,#9ABE0C;0,51,#67A117;0,52,#338323;0,53,#00642D;0,54,#00642D;0,55,#00642D;0,56,#338323;0,57,#67A117;0,58,#9ABE0C;0,59,#CEDC00",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "154, 190, 12"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 14 - AMR Racing"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 15)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "let color = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Inputs\");\r\nlet color_Telemetry = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Telemetry\");\r\n\r\nif(counter === 0) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\toutput.fill(color_Telemetry[4 + i], 10 + i, 10 + i + 1);\r\n\t}\r\n\tfor(var i = 0; i < 4; i++) {\r\n\t\toutput.fill(color_Telemetry[i], 20 + i, 20 + i + 1);\r\n\t}\r\n}\r\ncounter = (counter == 10) ? 0 : counter++;\r\nreturn output;",
                                    "PreExpression": "let output = new Array(41);\r\nlet counter = 0;"
                                  },
                                  "LedCount": 60,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Light Mode 15 - Custom Mode"
                                },
                                {
                                  "ContentFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "let color1 = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Inputs\")\r\n\r\nlet output = new Array();\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tswitch($prop('ATSR_Hub.' + deviceID + '_CustomTheme_ENCPattern')[i]) {\r\n\t\tcase 1: {\r\n\t\t\tleds.fill(color1[10 + i]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 2: {\r\n\t\t\tfor(var j = 0; j < 6; j++) {\r\n\t\t\t\tleds[2 * j] = color1[10 + i];\r\n\t\t\t\tleds[2 * j + 1] = color1[13 + i];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 3: {\r\n\t\t\tleds = gradient(color1[10 + i], color1[13 + i]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\toutput = output.concat(leds);\r\n}\r\nreturn output;\r\n\r\nfunction gradient(startColor, endColor) {\r\n\tlet pattern = new Array(12);\r\n\t\r\n\tvar Red1 = 0;\r\n\tvar Green1 = 0;\r\n\tvar Blue1 = 0;\r\n\t\r\n\tvar Red2 = 0;\r\n\tvar Green2 = 0;\r\n\tvar Blue2 = 0\r\n\t\r\n\t// RGB-Conversion - startColor\r\n\tif(startColor.length == 7) {\r\n\t\tRed1 = parseInt(startColor.substring(1, 3), 16);\r\n\t\tGreen1 = parseInt(startColor.substring(3, 5), 16);\r\n\t\tBlue1 = parseInt(startColor.substring(5, 7), 16);\r\n\t}\r\n\telse if(startColor.length == 9) {\r\n\t\tRed1 = parseInt(startColor.substring(3, 5), 16);\r\n\t\tGreen1 = parseInt(startColor.substring(5, 7), 16);\r\n\t\tBlue1 = parseInt(startColor.substring(7, 9), 16);\r\n\t}\r\n\t// RGB-Conversion - endColor\r\n\tif(endColor.length == 7) {\r\n\t\tRed2 = parseInt(endColor.substring(1, 3), 16);\r\n\t\tGreen2 = parseInt(endColor.substring(3, 5), 16);\r\n\t\tBlue2 = parseInt(endColor.substring(5, 7), 16);\r\n\t}\r\n\telse if(endColor.length == 9) {\r\n\t\tRed2 = parseInt(endColor.substring(3, 5), 16);\r\n\t\tGreen2 = parseInt(endColor.substring(5, 7), 16);\r\n\t\tBlue2 = parseInt(endColor.substring(7, 9), 16);\r\n\t}\r\n\tvar RedDelta = Red2 - Red1;\r\n\tvar GreenDelta = Green2 - Green1;\r\n\tvar BlueDelta = Blue2 - Blue1;\r\n\t\r\n\tfor(var i = 0; i < 7; i++) {\r\n\t\tvar RedOutput = Math.floor(Math.abs(Red1 + (i * RedDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(RedOutput.length == 1) ? RedOutput = '0' + RedOutput : RedOutput = RedOutput;\r\n\t\tvar GreenOutput = Math.floor(Math.abs(Green1 + (i * GreenDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(GreenOutput.length == 1) ? GreenOutput = '0' + GreenOutput : GreenOutput = GreenOutput;\r\n\t\tvar BlueOutput = Math.floor(Math.abs(Blue1 + (i * BlueDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(BlueOutput.length == 1) ? BlueOutput = '0' + BlueOutput : BlueOutput = BlueOutput;\r\n\t\t\r\n\t\tpattern[i] = '#' + RedOutput + GreenOutput + BlueOutput;\r\n\t\tif(i != 0)\r\n\t\t\tpattern[12 - i] = '#' + RedOutput + GreenOutput + BlueOutput;\r\n\t}\r\n\treturn pattern;\r\n}",
                                    "PreExpression": "let leds = new Array(12);"
                                  },
                                  "LedCount": 36,
                                  "StartPosition": 25,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Light Mode 15 - Encoders"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 15 - Custom Mode"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 16)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                              },
                              "LedContainers": [
                                {
                                  "Animation": {
                                    "Columns": 60,
                                    "Rows": 1,
                                    "Frames": [
                                      {
                                        "Colors": "0,0,#00FF00;0,1,#FFFF00;0,2,#00BFFF;0,3,#FF0000;0,4,#FFFF00;0,5,#00BFFF;0,6,#FF0000;0,7,#00FF00;0,24,#00BFFF;0,25,#00BFFF;0,26,#00BFFF;0,27,#00BFFF;0,28,#00BFFF;0,29,#00BFFF;0,30,#00BFFF;0,31,#00BFFF;0,32,#00BFFF;0,33,#00BFFF;0,34,#00BFFF;0,35,#00BFFF;0,36,#00FF00;0,37,#00FF00;0,38,#00FF00;0,39,#00FF00;0,40,#00FF00;0,8,#FFFF00;0,9,#FF0000;0,41,#00FF00;0,42,#00FF00;0,43,#00FF00;0,44,#00FF00;0,45,#00FF00;0,46,#00FF00;0,47,#00FF00;0,48,#FF0000;0,49,#FF0000;0,50,#FF0000;0,51,#FF0000;0,52,#FF0000;0,53,#FF0000;0,54,#FF0000;0,55,#FF0000;0,56,#FF0000;0,57,#FF0000;0,58,#FF0000;0,59,#FF0000",
                                        "FrameDuration": 9999
                                      }
                                    ],
                                    "PenColor": "Yellow"
                                  },
                                  "ContainerType": "Animation"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Light Mode 16 - Lovely Dashboard"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "return ($prop(\"ATSR_Hub.NightMode_IsActive\") \r\n\t&& $prop(\"ATSR_Hub.NightMode_SelectedMode\") != \"Dim\") "
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "output.fill($prop(\"ATSR_Hub.NightMode_SelectedColor\"), 0, 10);\r\noutput.fill($prop(\"ATSR_Hub.NightMode_SelectedColor\"), 24, 60);\r\n\r\nreturn output;",
                                    "PreExpression": "let output = new Array(60);\r\n"
                                  },
                                  "LedCount": 60,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Night Mode"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Night Mode"
                            }
                          ],
                          "ContainerType": "Base.Group",
                          "Description": "Background"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Background"
                    },
                    {
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "return ($prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") == true) ?\r\n\t(($prop('PitLimiterOn') == true) ? true : false) : false;"
                          },
                          "LedContainers": [
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('DataCorePlugin.GameRunning') == 1 && $prop('Rpms') != 0 && $prop(\"EngineIgnitionOn\") != 0)\r\n\treturn true;\r\nreturn false;"
                              },
                              "LedContainers": [
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.Func_PitAnimation_style\") == \"Running Lights\") ?\r\n\ttrue : false;"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "var color1 = $prop(\"ATSR_Hub.Func_PitAnimation_color\");\r\nvar animationSpeed = Number($prop(\"ATSR_Hub.Func_PitAnimation_speed\"));\r\nvar speedFactor = 0.25 + (100 - animationSpeed) / 100\r\n\r\nvar pitLimit = $prop(\"ATSR_Hub.Telemetry_PitspeedLimit\");\r\n\r\nif($prop(\"PitLimiterOn\") == 1) {\r\n\tvar time = Math.floor((Date.now() / (240 * speedFactor)) % 5);\t//time-var for both btn-rows\r\n\tvar time2 = Math.floor((Date.now() / (100 * speedFactor)) % 12);//time-var for middle-encoders\r\n\tvar time3 = Math.floor((Date.now() / (120 * speedFactor)) % 10); //time-var for RPM-bar\r\n\t\r\n\tleds.fill('#00000000');\t\t//clear all leds to default value (background color)\r\n\tleds[time] = color1;\t\t//set btns 1 to 5\r\n\tleds[5 + time] = color1;\t\t//set btns 6 to 10\r\n\tleds[encIndex[0]+time2] = color1;\t//set first encoder ring\r\n\tleds[encIndex[1]+time2] = color1;\t//set second encoder ring\r\n\tleds[encIndex[2]+time2] = color1;\t//set third encoder ring\r\n\tleds[10 + time3] = color1;\t\t//set btns 1 to 5\r\n\t\r\n\treturn leds;\r\n}\r\nelse\r\n\treturn leds;",
                                        "PreExpression": "let leds = new Array(60).fill('#00000000');\r\n"
                                      },
                                      "LedCount": 60,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Pit-Limiter - Running"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Running Lights"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.Func_PitAnimation_style\") == \"Alternating Lights\") ?\r\n\ttrue : false;"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "var color = $prop(\"ATSR_Hub.Func_PitAnimation_color\");\r\nvar animationSpeed = Number($prop(\"ATSR_Hub.Func_PitAnimation_speed\"));\r\nvar speedFactor = 0.25 + (100 - animationSpeed) / 100\r\nlet output = new Array(17);\r\n\r\nif($prop(\"PitLimiterOn\") == 1) {\r\n\tvar time = Math.floor((Date.now() / (300 * speedFactor)) % 2);\t//time-var for both btn-rows\r\n\tlet W = color;\r\n\tlet patternLON = [B,B,B,B,B,B,W,W,W,W,W,W];\r\n\tlet patternLOFF = [W,W,W,W,W,W,B,B,B,B,B,B];\r\n\tlet patternRON = [B,W,W,W,W,W,W,B,B,B,B,B];\r\n\tlet patternROFF = [W,B,B,B,B,B,B,W,W,W,W,W];\r\n\tlet patternMON = [B,B,W,W,W,B,B,B,W,W,W,B];\r\n\tlet patternMOFF = [W,W,B,B,B,W,W,W,B,B,B,W];\r\n\t\r\n\tif(time == 1) {\r\n\t\t//Buttons\r\n\t\tfor(var i = 0; i < 5; i+=2) {\r\n\t\t\toutput.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\t\toutput.fill(color, btnIndex[9 - i], btnIndex[9 - i] + ledCount_BTN);\r\n\t\t}\r\n\t\tfor(var i = 1; i < 5; i+=2) {\r\n\t\t\toutput.fill('#00000000', btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\t\toutput.fill('#00000000', btnIndex[9 - i], btnIndex[9 - i] + ledCount_BTN);\r\n\t\t}\r\n\t\t// RPMs\r\n\t\tfor(var i = 10; i < 24; i+=2) {\r\n\t\t\toutput[i] = color;\r\n\t\t\toutput[i + 1] = \"#00000000\";\r\n\t\t}\r\n\t\t//Encoders\r\n\t\toutput = output.concat(patternRON);\r\n\t\toutput = output.concat(patternLON);\r\n\t\toutput = output.concat(patternMON);\r\n\t}\r\n\telse {\r\n\t\t//Buttons\r\n\t\tfor(var i = 0; i < 5; i+=2) {\r\n\t\t\toutput.fill('#00000000', btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\t\toutput.fill('#00000000', btnIndex[9 - i], btnIndex[9 - i] + ledCount_BTN);\r\n\t\t}\r\n\t\tfor(var i = 1; i < 5; i+=2) {\r\n\t\t\toutput.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\t\toutput.fill(color, btnIndex[9 - i], btnIndex[9 - i] + ledCount_BTN);\r\n\t\t}\r\n\t\t// RPMs\r\n\t\tfor(var i = 10; i < 24; i+=2) {\r\n\t\t\toutput[i + 1] = color;\r\n\t\t\toutput[i] = \"#00000000\";\r\n\t\t}\r\n\t\t//Encoders\r\n\t\toutput = output.concat(patternROFF);\r\n\t\toutput = output.concat(patternLOFF);\r\n\t\toutput = output.concat(patternMOFF);\r\n\t}\r\n\t\t\r\n\treturn output;\r\n}\r\nelse\r\n\treturn output;",
                                        "PreExpression": "let B = \"#00000000\";\r\n"
                                      },
                                      "LedCount": 60,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Pit-Limiter - Alternating"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Alternating Lights"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.Func_PitAnimation_style\") == \"Blinking Lights\") ?\r\n\ttrue : false;"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 0,
                                        "Interpreter": 1,
                                        "Expression": "var color = $prop(\"ATSR_Hub.Func_PitAnimation_color\");\r\nvar animationSpeed = Number($prop(\"ATSR_Hub.Func_PitAnimation_speed\"));\r\nvar speedFactor = 0.25 + (100 - animationSpeed) / 100\r\n\r\nif($prop(\"PitLimiterOn\") == 1) {\r\n\tvar time = Math.floor((Date.now() / (400 * speedFactor)) % 2);\t//time-var for both btn-rows\r\n\t\r\n\tleds.fill('#00000000');\t\t//clear all leds to default value (background color)\r\n\tif(time == 1)\r\n\t\tleds.fill(color, 0, 60)\r\n\t\t\r\n\treturn leds;\r\n}\r\nelse\r\n\treturn leds;",
                                        "PreExpression": "let leds = new Array(60).fill('#00000000');\r\n"
                                      },
                                      "LedCount": 60,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Pit-Limiter - Blinking"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Blinking Lights"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.Func_PitAnimation_style\") == \"Breathing Lights\") ?\r\n\ttrue : false;"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 0,
                                        "Interpreter": 1,
                                        "Expression": "var color = $prop(\"ATSR_Hub.Func_PitAnimation_color\");\r\nvar animationSpeed = Number($prop(\"ATSR_Hub.Func_PitAnimation_speed\"));\r\nvar speedFactor = 0.25 + (100 - animationSpeed) / 100\r\n\r\nif($prop(\"PitLimiterOn\") == 1) {\r\n\tvar time = Math.floor((Date.now() / (2.5 * speedFactor)) % 510);\t//time-var for both btn-rows\r\n\tif(time <= 255)\r\n\t\ttransparencyHex = (Math.floor(time % 255)).toString(16);\r\n\telse if(time >= 255)\r\n\t\ttransparencyHex = (Math.floor(255 - time % 255)).toString(16);\r\n\t\r\n\tif(transparencyHex.length == 1)\r\n        leds.fill('#0' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, 60);\r\n    else\r\n        leds.fill('#' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, 60);\r\n\t\t\r\n\treturn leds;\r\n}\r\nelse\r\n\treturn leds;",
                                        "PreExpression": "let leds = new Array(60).fill('#00000000');\r\nvar transparencyHex;\r\n"
                                      },
                                      "LedCount": 60,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Pit-Limiter - Breathing"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Breathing Lights"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "When Game Running and not Paused"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Effects - When Pit-Limiter is ON"
                        },
                        {
                          "TriggerFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "return ($prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") == false) ? true : \r\n\t(($prop(\"PitLimiterOn\") == false && $prop(\"EngineIgnitionOn\") != 0) ? true : false);"
                          },
                          "LedContainers": [
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "if($prop('DataCorePlugin.GameRunning') == 1 && $prop('Rpms') != 0)\r\n\treturn true;\r\nreturn false;"
                              },
                              "LedContainers": [
                                {
                                  "LedContainers": [
                                    {
                                      "LedContainers": [
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Side-LEDs\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Side-LEDs\")\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[1];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nif($prop('IsInPitLane') == 1 && $prop('PitLimiterOn') == 0)\r\n\tstate = 1;\r\nelse if($prop(\"PitLimiterOn\") == 1)\r\n\tstate = 2;\r\nelse\r\n\tstate = 0;\r\n\r\nif(state == 1) {\r\n\tfor(var i = 0; i < output.length; i++)\r\n\t\tif(data[i] == func)\r\n\t\t\t(blink == 1) ? output[i] = '#000000' : output[i] = colors[i];\r\n}\r\nif(state == 2) {\r\n\tfor(var i = 0; i < output.length; i++)\r\n\t\tif(data[i] == func)\r\n\t\t\toutput[i] = colors[i];\r\n}\r\nreturn output;",
                                                "PreExpression": "let func = 'Pit Limiter';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Pit Limiter"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Pit Limiter"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Side-LEDs\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Side-LEDs\")\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[3];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\n\r\nif($prop('TurnIndicatorLeft') == 1) {\r\n\tfor(var i = 0; i < output.length; i++)\r\n\t\tif(data[i] == func)\r\n\t\t\t(blink == 1) ? output[i] = '#000000' : output[i] = colors[i];\r\n}\r\n\r\nreturn output;",
                                                "PreExpression": "let func = 'Left Indicator';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Indicator Left"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Left Indicator"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Side-LEDs\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Side-LEDs\")\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[3];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\n\r\nif($prop(\"TurnIndicatorRight\") == 1) {\r\n\tfor(var i = 0; i < output.length; i++)\r\n\t\tif(data[i] == func)\r\n\t\t\t(blink == 1) ? output[i] = '#000000' : output[i] = colors[i];\r\n}\r\n\r\nreturn output;",
                                                "PreExpression": "let func = 'Right Indicator';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Indicator Right"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Right Indicator"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Side-LEDs\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Side-LEDs\")\r\n\r\nisON = $prop(\"ATSR_Hub.Telemetry_HeadlightFlash\");\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[2];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nif(isON) {\r\n\tfor(var i = 0; i < output.length; i++)\r\n\t\tif(data[i] == func)\r\n\t\t\t(blink == 1) ? output[i] = '#000000' : output[i] = colors[i];\r\n}\r\n\r\nreturn output;\r\n",
                                                "PreExpression": "var isON = false;\r\nvar func = 'Flash';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Headlight Flash"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Headlight Flash"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\nlet colorLeft = new Array(4).fill(null);\r\n\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Side-LEDs\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Side-LEDs\")\r\n\r\nisON = $prop(\"ATSR_Hub.Telemetry_Wiper\");\r\n\r\nswitch(isON) {\r\n\tcase 0: \t\r\n\t \tfor(var i = 0; i < output.length; i++)\r\n\t\t\tcolorLeft[i] = null;\r\n\t\tbreak;\r\n\tcase 1: \r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tcolorLeft[i] = hexM48(colors[i]);\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tcolorLeft[i] = hexM48(hexM48(colors[i]));\r\n\t\tbreak;\r\n\tcase 3:\r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tcolorLeft[i] = hexM48(hexM48(hexM48(colors[i])));\r\n\t\tbreak;\r\n}\r\nfor(var i = 0; i < output.length; i++)\r\n\tif(data[i] == func)\r\n\t\toutput[i] = colorLeft[i];\r\n\r\nreturn output;\r\n\r\nfunction hexM48(inputString) {\r\n\tvar red;\r\n\tvar green;\r\n\tvar blue;\r\n\tvar transparency;\r\n\t\r\n\tif(inputString.length == 7) {\r\n\t\tred = parseInt(inputString.substring(1, 3), 16) - 48;\r\n\t\tgreen = parseInt(inputString.substring(3, 5), 16) - 48;\r\n\t\tblue = parseInt(inputString.substring(5, 7), 16) - 48;\r\n\t\ttransparency = \"FF\";\r\n\t}\r\n\tif(inputString.length == 9) {\r\n\t\tred = parseInt(inputString.substring(3, 5), 16) - 48;\r\n\t\tgreen = parseInt(inputString.substring(5, 7), 16) - 48;\r\n\t\tblue = parseInt(inputString.substring(7, 9), 16) - 48;\r\n\t\ttransparency = inputString.substring(1, 3);\r\n\t}\r\n\t\r\n\tif(red < 0) red = 0;\r\n\tif(green < 0) green = 0;\r\n\tif(blue < 0) blue = 0;\r\n\t\r\n\tvar outTransparency = transparency;\r\n\t\r\n\tif((red.toString(16)).length == 1) var outRed = '0' + red.toString(16);\r\n\t\telse var outRed = red.toString(16);\r\n\tif((green.toString(16)).length == 1) var outGreen = '0' + green.toString(16);\r\n\t\telse var outGreen = green.toString(16);\r\n\tif((blue.toString(16)).length == 1) var outBlue = '0' + blue.toString(16);\r\n\t\telse var outBlue = blue.toString(16);\r\n\t\t\r\n\treturn \"#\" + outTransparency + outRed + outGreen + outBlue;\r\n}",
                                                "PreExpression": "var isON;\r\nvar func = 'Wiper';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Wipers"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Wiper"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\nlet colorLeft = new Array(4).fill(null);\r\n\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Side-LEDs\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Side-LEDs\");\r\n\r\nisON = $prop(\"ATSR_Hub.Telemetry_Headlight\");\r\n\r\nswitch(isON) {\r\n\tcase 0: \r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tcolorLeft[i] = null;\r\n\t\tbreak;\r\n\tcase 1: \r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tcolorLeft[i] = hexM64(colors[i]);\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tcolorLeft[i] = hexM64(hexM64(colors[i]));\r\n\t\tbreak;\r\n}\r\nfor(var i = 0; i < output.length; i++)\r\n\tif(data[i] == func)\r\n\t\toutput[i] = colorLeft[i];\r\n\t\r\nreturn output;\r\n\r\nfunction hexM64(inputString) {\r\n\tvar red;\r\n\tvar green;\r\n\tvar blue;\r\n\tvar transparency;\r\n\t\r\n\tif(inputString.length == 7) {\r\n\t\tred = parseInt(inputString.substring(1, 3), 16) - 64;\r\n\t\tgreen = parseInt(inputString.substring(3, 5), 16) - 64;\r\n\t\tblue = parseInt(inputString.substring(5, 7), 16) - 64;\r\n\t\ttransparency = \"FF\";\r\n\t}\r\n\tif(inputString.length == 9) {\r\n\t\tred = parseInt(inputString.substring(3, 5), 16) - 64;\r\n\t\tgreen = parseInt(inputString.substring(5, 7), 16) - 64;\r\n\t\tblue = parseInt(inputString.substring(7, 9), 16) - 64;\r\n\t\ttransparency = inputString.substring(1, 3);\r\n\t}\r\n\t\r\n\tif(red < 0) red = 0;\r\n\tif(green < 0) green = 0;\r\n\tif(blue < 0) blue = 0;\r\n\t\r\n\tvar outTransparency = transparency;\r\n\t\r\n\tif((red.toString(16)).length == 1) var outRed = '0' + red.toString(16);\r\n\t\telse var outRed = red.toString(16);\r\n\tif((green.toString(16)).length == 1) var outGreen = '0' + green.toString(16);\r\n\t\telse var outGreen = green.toString(16);\r\n\tif((blue.toString(16)).length == 1) var outBlue = '0' + blue.toString(16);\r\n\t\telse var outBlue = blue.toString(16);\r\n\t\t\r\n\treturn \"#\" + outTransparency + outRed + outGreen + outBlue;\r\n}",
                                                "PreExpression": "var isON;\r\nvar func = 'Headlight';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Light Stages"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Headlight"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\n\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Side-LEDs\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Side-LEDs\");\r\n\r\nvalue = $prop(\"ATSR_Hub.Telemetry_DRS\");\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[5];\r\nvar blinkInterval2 = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[6];\r\n\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\nvar blink2 = Math.floor((Date.now() / blinkInterval2) % 2);\r\n\r\nfor(var i = 0; i < output.length; i++)\r\n\tif(data[i] == func)\r\n\t\tswitchState(value, i);\r\n\r\nreturn output;\r\n\r\nfunction switchState(drsState, index) {\r\n\tswitch(drsState) {\r\n\t\tcase 0: return output[index] = null;\r\n\t\tcase 1: return output[index] = colors[index];\r\n\t\tcase 2: {\r\n\t\t\tif(blink == 1)\r\n\t\t\t\treturn output[index] = colors[index];\r\n\t\t\telse\r\n\t\t\t\treturn output[index] = '#000000'\r\n\t\t}\r\n\t\tcase 3: {\r\n\t\t\tif(blink2 == 1)\r\n\t\t\t\treturn output[index] = colors[index];\r\n\t\t\telse\r\n\t\t\t\treturn output[index] = '#000000'\r\n\t\t}\r\n\t}\r\n}",
                                                "PreExpression": "var flag = false;\r\nvar currentTime = 0;\r\nvar value = 0;\r\nvar func = 'DRS';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "DRS"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "DRS"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "let output = new Array(4);\r\n\r\nstate = $prop(\"ATSR_Hub.Telemetry_OvertakeActive\");\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[7];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state != 0) {\r\n\tfor(var i = 0; i < output.length; i++) {\r\n\t\tif(data[i] == func) {\r\n\t\t\tswitch(state) {\r\n\t\t\t\tcase 3: (blink == 1) ? \r\n\t\t\t\t\toutput[i] = '#000000' : output[i] = color[i];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\toutput.fill(null);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nreturn output;",
                                                "PreExpression": "var flag = false;\r\nvar currentTime = 0;\r\nvar state = 0;\r\nvar func = 'P2P/Overtake';"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "P2P/Overtake"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "P2P/Overtake"
                                        }
                                      ],
                                      "ContainerType": "Base.Group",
                                      "Description": "Individual Data"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableRedlineFlash\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "let dataLeft = new Array(4);\r\n\r\ndataLeft.fill(null);\r\n\r\nvar color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Redline\");\r\nvar blink = $prop(\"ATSR_Hub.Telemetry_Redline_Toggle_Fixed\");\r\n\r\nif($prop(\"ATSR_Hub.Telemetry_Redline_RPM\") != 0) {\r\n\tif($prop(\"Rpms\") > $prop(\"ATSR_Hub.Telemetry_Redline_RPM\")) {\r\n\t\tif(blink == 1)\r\n\t\t\tfor(var i = 0; i < 4; i++) {\r\n\t\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Redline_output\")[i + 13] == 1) ?\r\n\t\t\t\t\tdataLeft[i] = color : null;\r\n\t\t\t}\r\n\t\telse\r\n\t\t\tfor(var i = 0; i < 4; i++) {\r\n\t\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Redline_output\")[i + 13] == 1) ?\r\n\t\t\t\t\tdataLeft[i] = \"#000000\" : null;\r\n\t\t\t}\r\n\t}\r\n}\r\nreturn dataLeft;"
                                          },
                                          "LedCount": 4,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Redline Flash"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Redline Flash"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableTCLeds\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "let output = new Array(rpmCount).fill(null);;\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_TC_output\");\r\n\r\nvar color2 = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_TC\");\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nif($prop('TCActive') == true && ($prop(\"DataCorePlugin.CurrentGame\") != 'F12023' || $prop(\"DataCorePlugin.CurrentGame\") != 'F12024')) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tif(data[i + 13] == 1)\r\n\t\t\t\toutput[i] = color2;\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tif(data[i + 13] == 1)\r\n\t\t\t\toutput[i] = \"#000000\";\t\r\n\t}\r\n}\r\n\r\nreturn output;\r\n"
                                          },
                                          "LedCount": 4,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "TC Active"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "TC Active - Warning"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableABSLeds\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "let output = new Array(4).fill(null);;\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_ABS_output\");\r\n\r\nvar color2 = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_ABS\");\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nif($prop(\"ABSActive\") == true) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tif(data[i + 13] == 1)\r\n\t\t\t\toutput[i] = color2;\t\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < output.length; i++)\r\n\t\t\tif(data[i + 13] == 1)\r\n\t\t\t\toutput[i] = \"#000000\";\t\r\n\t}\r\n}\r\n\r\nreturn output;"
                                          },
                                          "LedCount": 4,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "ABS Active"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "ABS Active - Warning"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableSpotterLeds\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "let output = new Array(4);\r\n\r\nvar color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Spotter\")\r\nvar blink = Math.floor((Date.now() / 250) % 2);\r\n\r\nif($prop(\"SpotterCarLeft\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < output.length; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterL_output\")[i + 13] == 1) ?\r\n\t\t\t\toutput[i] = color : null;\r\n\t\t}\r\n\telse\r\n\t\tfor(var i = 0; i < output.length; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterL_output\")[i + 13] == 1) ?\r\n\t\t\t\toutput[i] = \"#000000\" : null;\r\n\t\t}\r\n}\r\nif($prop('SpotterCarRight') == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < output.length; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterR_output\")[i + 13] == 1) ?\r\n\t\t\t\toutput[i] = color : null;\r\n\t\t}\r\n\telse\r\n\t\tfor(var i = 0; i < output.length; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterR_output\")[i + 13] == 1) ?\r\n\t\t\t\toutput[i] = \"#000000\" : null;\r\n\t\t}\r\n}\r\n\r\nreturn output;"
                                          },
                                          "LedCount": 4,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Car Left or Car Right"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Spotter LEDs"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableFlagWarnings\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "LedContainers": [
                                            {
                                              "TriggerFormula": {
                                                "Expression": "changed([ATSR_Hub.Func_WhiteFlagDuration], [Flag_White])"
                                              },
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[3];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\nleds.fill(null);\r\n\r\nif($prop(\"Flag_White\") == 1) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < 4; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 13] == 1) ?\r\n\t\t\t\tleds[i] = color : null;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < 4; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 13] == 1) ?\r\n\t\t\t\tleds[i] = \"#000000\" : null;\r\n\t\t} \r\n\t}\r\n}\r\nreturn leds;",
                                                    "PreExpression": "let leds = new Array(4);\r\nvar color = \"#FFFFFFFF\";"
                                                  },
                                                  "LedCount": 4,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "White Flag"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup",
                                              "Description": "White Flag - On for 5s"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "White Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "TriggerFormula": {
                                                "Expression": "[Flag_Blue]"
                                              },
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[2];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\n\r\nleds.fill(null);\r\n\r\nif($prop(\"Flag_Blue\") == 1) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < 4; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 13] == 1) ?\r\n\t\t\t\tleds[i] = color : null;\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < 4; i++) {\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 13] == 1) ?\r\n\t\t\t\tleds[i] = \"#000000\" : null;\r\n\t\t} \r\n\t}\r\n}\r\nreturn leds;",
                                                    "PreExpression": "let leds = new Array(4);\r\nvar color = \"#FF0000FF\";"
                                                  },
                                                  "LedCount": 4,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "Blue Flag"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Blue Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[1];\r\nlet leds = new Array();\r\n\r\nif($prop(\"Flag_Green\") == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\t\r\n\tif(blink == 1) {\r\n\t\tfor(let i = 0; i < 4; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[13 + i] == 1) ?\r\n\t\t\t\tleds.concat(pattern1[i]) : leds.concat(patternOFF);\r\n\t}\r\n\t\t\r\n\telse if(blink == 0) {\r\n\t\tfor(let i = 0; i < 4; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[13 + i] == 1) ?\r\n\t\t\t\tleds.concat(pattern2[i]) : leds.concat(patternOFF);\r\n\t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let colorON = ['#FF00FF00']\t//GREEN\r\nlet colorOFF = ['#000000']\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON];\r\nlet patternOFF = [null];"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Green Flag"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Green Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[0];\r\nlet leds = new Array();\r\n\r\nif($prop(\"Flag_Yellow\") == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\t\r\n\tif(blink == 1) {\r\n\t\tfor(let i = 0; i < 4; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[13 + i] == 1) ?\r\n\t\t\t\tleds.concat(pattern1[i]) : leds.concat(patternOFF);\r\n\t}\r\n\t\t\r\n\telse if(blink == 0) {\r\n\t\tfor(let i = 0; i < 4; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[13 + i] == 1) ?\r\n\t\t\t\tleds.concat(pattern2[i]) : leds.concat(patternOFF);\r\n\t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let colorON = ['#FFFFFF00']\t//YELLOW\r\nlet colorOFF = ['#000000']\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON];\r\nlet patternOFF = [null];"
                                              },
                                              "LedCount": 4,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Yellow Flag"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Yellow Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "TriggerFormula": {
                                                "Expression": "changed([ATSR_Hub.Func_CheckeredFlagDuration], [Flag_Checkered])"
                                              },
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[4];\r\nlet leds = new Array();\r\n\r\nif($prop(\"Flag_Checkered\") == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\t\r\n\tif(blink == 1) {\r\n\t\tfor(let i = 0; i < 4; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[13 + i] == 1) ?\r\n\t\t\t\tleds.concat(pattern1[i]) : leds.concat(patternOFF);\r\n\t}\r\n\t\t\r\n\telse if(blink == 0) {\r\n\t\tfor(let i = 0; i < 4; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[13 + i] == 1) ?\r\n\t\t\t\tleds.concat(pattern2[i]) : leds.concat(patternOFF);\r\n\t}\r\n}\r\nreturn leds;",
                                                    "PreExpression": "let colorON = ['#FFFFFFFF']\t//WHITE\r\nlet colorOFF = ['#000000']\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON];\r\nlet patternOFF = [null];"
                                                  },
                                                  "LedCount": 4,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "Checkered Flag"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup",
                                              "Description": "Checkered Flag - On for 5s"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Checkered Flag"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Flag Warnings"
                                    }
                                  ],
                                  "StartPosition": 21,
                                  "ContainerType": "Base.Group",
                                  "Description": "SideLEDs - Individual Effects"
                                },
                                {
                                  "LedContainers": [
                                    {
                                      "LedContainers": [
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\n\r\nif($prop('IsInPitLane') == 1 && $prop('PitLimiterOn') == 0)\r\n\tstate = 1;\r\nelse if($prop(\"PitLimiterOn\") == 1)\r\n\tstate = 2;\r\nelse\r\n\tstate = 0;\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[1];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state == 1) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\t(data[i] == func) ? \r\n\t\t\t((blink == 1) ? \r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t\t\t: output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN)) \r\n\t\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\t\t\r\n}\r\nelse if (state == 2) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\t(data[i] == func) ? output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN)\r\n\t\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\t\r\n}\r\n\r\nreturn output;",
                                                "PreExpression": "let output = new Array(10);\r\nvar state;\r\nvar func = 'Pit Limiter';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Pit Limiter"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Pit Limiter"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\n\r\n($prop('TurnIndicatorLeft') == 1) ? state = true : state = false;\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[3];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\t(data[i] == func) ? \r\n\t\t\t((blink == 1) ? \r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t\t\t: output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN)) \r\n\t\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\t\t\r\n}\r\nreturn output;",
                                                "PreExpression": "let output = new Array(10);\r\nvar state;\r\nvar func = 'Left Indicator';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Indicator Left"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Left Indicator"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\n\r\n($prop(\"TurnIndicatorRight\") == 1) ? state = true : state = false;\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[4];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\t(data[i] == func) ? \r\n\t\t\t((blink == 1) ? \r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t\t\t: output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN)) \r\n\t\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\t\t\r\n}\r\nreturn output;",
                                                "PreExpression": "let output = new Array(10);\r\nvar state;\r\nvar func = 'Right Indicator';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Indicator Right"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Right Indicator"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\n\r\nstate = $prop(\"ATSR_Hub.Telemetry_HeadlightFlash\");\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[2];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\t(data[i] == func) ? \r\n\t\t\t((blink == 1) ? \r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t\t\t: output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN)) \r\n\t\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\t\t\r\n}\r\nreturn output;",
                                                "PreExpression": "let output = new Array(10);\r\nvar flag = false;\r\nvar currentTime = 0;\r\nvar state;\r\nvar func = 'Flash';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Headlight Flash"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Headlight Flash"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\n\r\nstate = $prop(\"ATSR_Hub.Telemetry_Wiper\");\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\n\r\nswitch(state) {\r\n\tcase 0: return output.fill(null);\r\n\tcase 1: \r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tcolor[i] = hexM48(color[i]);\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tcolor[i] = hexM48(hexM48(color[i]));\r\n\t\tbreak;\r\n\tcase 3:\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tcolor[i] = hexM48(hexM48(hexM48(color[i])));\r\n\t\tbreak;\r\n}\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state != 0) {\r\n\tfor(var i = 0; i < 10; i++)\r\n\t\tif(data[i] == func) output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n}\r\nreturn output;\r\n\r\nfunction hexM48(inputString) {\r\n\tvar red;\r\n\tvar green;\r\n\tvar blue;\r\n\tvar transparency;\r\n\t\r\n\tif(inputString.length == 7) {\r\n\t\tred = parseInt(inputString.substring(1, 3), 16) - 48;\r\n\t\tgreen = parseInt(inputString.substring(3, 5), 16) - 48;\r\n\t\tblue = parseInt(inputString.substring(5, 7), 16) - 48;\r\n\t\ttransparency = \"FF\";\r\n\t}\r\n\tif(inputString.length == 9) {\r\n\t\tred = parseInt(inputString.substring(3, 5), 16) - 48;\r\n\t\tgreen = parseInt(inputString.substring(5, 7), 16) - 48;\r\n\t\tblue = parseInt(inputString.substring(7, 9), 16) - 48;\r\n\t\ttransparency = inputString.substring(1, 3);\r\n\t}\r\n\t\r\n\tif(red < 0) red = 0;\r\n\tif(green < 0) green = 0;\r\n\tif(blue < 0) blue = 0;\r\n\t\r\n\tvar outTransparency = transparency;\r\n\t\r\n\tif((red.toString(16)).length == 1) var outRed = '0' + red.toString(16);\r\n\t\telse var outRed = red.toString(16);\r\n\tif((green.toString(16)).length == 1) var outGreen = '0' + green.toString(16);\r\n\t\telse var outGreen = green.toString(16);\r\n\tif((blue.toString(16)).length == 1) var outBlue = '0' + blue.toString(16);\r\n\t\telse var outBlue = blue.toString(16);\r\n\t\t\r\n\treturn \"#\" + outTransparency + outRed + outGreen + outBlue;\r\n}",
                                                "PreExpression": "let output = new Array(10);\r\nvar state;\r\nvar func = 'Wiper';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Rain Wipers"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Wiper"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\n\r\nstate = $prop(\"ATSR_Hub.Telemetry_Headlight\");\r\n\t\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\")\r\n\r\nswitch(output) {\r\n\tcase 0: return dataIndex.fill(null);\r\n\tcase 1: \r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tcolor[i] = hexM64(color[i]);\r\n\t\tbreak;\r\n\tcase 2:\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tcolor[i] = hexM64(hexM64(color[i]));\r\n\t\tbreak;\r\n}\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\")\r\n\r\nif(state != 0) {\r\n\tfor(var i = 0; i < 10; i++)\r\n\t\tif(data[i] == func) output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n}\r\nreturn output;\r\n\r\nfunction hexM64(inputString) {\r\n\tvar red;\r\n\tvar green;\r\n\tvar blue;\r\n\tvar transparency;\r\n\t\r\n\tif(inputString.length == 7) {\r\n\t\tred = parseInt(inputString.substring(1, 3), 16) - 64;\r\n\t\tgreen = parseInt(inputString.substring(3, 5), 16) - 64;\r\n\t\tblue = parseInt(inputString.substring(5, 7), 16) - 64;\r\n\t\ttransparency = \"FF\";\r\n\t}\r\n\tif(inputString.length == 9) {\r\n\t\tred = parseInt(inputString.substring(3, 5), 16) - 64;\r\n\t\tgreen = parseInt(inputString.substring(5, 7), 16) - 64;\r\n\t\tblue = parseInt(inputString.substring(7, 9), 16) - 64;\r\n\t\ttransparency = inputString.substring(1, 3);\r\n\t}\r\n\t\r\n\tif(red < 0) red = 0;\r\n\tif(green < 0) green = 0;\r\n\tif(blue < 0) blue = 0;\r\n\t\r\n\tvar outTransparency = transparency;\r\n\t\r\n\tif((red.toString(16)).length == 1) var outRed = '0' + red.toString(16);\r\n\t\telse var outRed = red.toString(16);\r\n\tif((green.toString(16)).length == 1) var outGreen = '0' + green.toString(16);\r\n\t\telse var outGreen = green.toString(16);\r\n\tif((blue.toString(16)).length == 1) var outBlue = '0' + blue.toString(16);\r\n\t\telse var outBlue = blue.toString(16);\r\n\t\t\r\n\treturn \"#\" + outTransparency + outRed + outGreen + outBlue;\r\n}",
                                                "PreExpression": "let output = new Array(10);\r\nvar state;\r\nvar func = 'Headlight';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Light Stages"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Headlight"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\ndataIndex.fill(null);\r\n\r\nstate = $prop(\"ATSR_Hub.Telemetry_DRS\");\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[5];\r\nvar blinkInterval2 = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[6];\r\n\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\nvar blink2 = Math.floor((Date.now() / blinkInterval2) % 2);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state != 0) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\tif(data[i] == func) { \r\n\t\t\tswitchState(state, i);\r\n\t\t\toutput.fill(dataIndex[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\t}\r\n\t}\r\n}\r\nreturn output;\r\n\r\nfunction switchState(drsState, index) {\r\n\tswitch(drsState) {\r\n\t\tcase 0: return dataIndex[index] = null;\r\n\t\tcase 1: return dataIndex[index] = color[index];\r\n\t\tcase 2: {\r\n\t\t\tif(blink == 1)\r\n\t\t\t\treturn dataIndex[index] = color[index];\r\n\t\t\telse\r\n\t\t\t\treturn dataIndex[index] = '#000000'\r\n\t\t}\r\n\t\tcase 3: {\r\n\t\t\tif(blink2 == 1)\r\n\t\t\t\treturn dataIndex[index] = color[index];\r\n\t\t\telse\r\n\t\t\t\treturn dataIndex[index] = '#000000'\r\n\t\t}\r\n\t}\r\n}",
                                                "PreExpression": "let output = new Array(10);\r\nlet dataIndex = new Array(10);\r\nvar flag = false;\r\nvar currentTime = 0;\r\nvar state;\r\nvar func = 'DRS';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "DRS"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "DRS"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "output.fill(null);\r\ndataIndex.fill(null);\r\n\r\nstate = $prop(\"ATSR_Hub.Telemetry_OvertakeActive\");\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[7];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state != 0) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\tif(data[i] == func) {\r\n\t\t\tswitch(state) {\r\n\t\t\t\tcase 3: (blink == 1) ? \r\n\t\t\t\t\toutput.fill('#000000', btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t\t\t\t: output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\nreturn output;",
                                                "PreExpression": "let output = new Array(10);\r\nlet dataIndex = new Array(10);\r\nvar flag = false;\r\nvar currentTime = 0;\r\nvar state;\r\nvar func = 'P2P/Overtake';"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "P2P/Overtake"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "P2P/Overtake"
                                        }
                                      ],
                                      "ContainerType": "Base.Group",
                                      "Description": "Individual Data"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableRedlineFlash\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\nvar color1 = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Redline\");\r\nvar blink = $prop(\"ATSR_Hub.Telemetry_Redline_Toggle_Fixed\");\r\n\r\nif($prop(\"ATSR_Hub.Telemetry_Redline_RPM\") != 0) {\r\n\tif($prop(\"Rpms\") > $prop(\"ATSR_Hub.Telemetry_Redline_RPM\")) {\r\n\t\tif(blink == 1)\r\n\t\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Redline_output\")[i] == 1) ?\r\n\t\t\t\t\tleds.fill(color1, btnIndex[i], btnIndex[i] + ledCount_BTN) : null;\r\n\t\telse\r\n\t\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Redline_output\")[i] == 1) ?\r\n\t\t\t\t\tleds.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) : null\r\n\t\t}\r\n}\r\nreturn leds;",
                                            "PreExpression": "let leds = new Array(10);\r\n"
                                          },
                                          "LedCount": 10,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Redline Flash"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Redline Flash"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableTCLeds\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "var color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_TC\");\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_TC_output\");\r\n\r\noutput.fill(null);\r\n\r\nif($prop(\"TCActive\") == true && ($prop(\"DataCorePlugin.CurrentGame\") != 'F12023' || $prop(\"DataCorePlugin.CurrentGame\") != 'F12024')) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tif(data[i] == 1)\r\n\t\t\t\toutput.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN);\t\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tif(data[i] == 1)\r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN);\t\r\n\t}\r\n}\r\nreturn output;",
                                            "PreExpression": "let output = new Array(10);\r\n"
                                          },
                                          "LedCount": 10,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "TC Active"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "TC Active - Warning"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableABSLeds\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "var color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_ABS\");\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_ABS_output\");\r\noutput.fill(null);\r\n\r\nif($prop(\"ABSActive\") == true) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tif(data[i] == 1)\r\n\t\t\t\toutput.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN);\t\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\tif(data[i] == 1)\r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN);\t\r\n\t}\r\n}\r\nreturn output;",
                                            "PreExpression": "let output = new Array(10);\r\n"
                                          },
                                          "LedCount": 10,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "ABS Active"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "ABS Active - Warning"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableSpotterLeds\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "output.fill(null);\r\n\r\nvar color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Spotter\")\r\nvar blink = Math.floor((Date.now() / 250) % 2);\r\n\r\nif($prop(\"SpotterCarLeft\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterL_output\")[i] == 1) ?\r\n\t\t\t\toutput.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterL_output\")[i] == 1) ?\r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) : null\r\n}\r\nif($prop(\"SpotterCarRight\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterR_output\")[i] == 1) ?\r\n\t\t\t\toutput.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterR_output\")[i] == 1) ?\r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) : null\r\n}\r\nreturn output;",
                                            "PreExpression": "let output = new Array(10);"
                                          },
                                          "LedCount": 10,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Car Left or Car Right"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Spotter LEDs"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableFlagWarnings\")"
                                      },
                                      "LedContainers": [
                                        {
                                          "LedContainers": [
                                            {
                                              "TriggerFormula": {
                                                "Expression": "changed([ATSR_Hub.Func_WhiteFlagDuration], [Flag_White])"
                                              },
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[3];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\n\r\nleds.fill(null);\r\n\r\nif($prop(\"Flag_White\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.fill(\"#00000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) : null\r\n}\r\nreturn leds;",
                                                    "PreExpression": "let leds = new Array(10);\r\nvar color = \"#FFFFFFFF\";"
                                                  },
                                                  "LedCount": 10,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "White Flag"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup",
                                              "Description": "White Flag - On for 5s"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "White Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "TriggerFormula": {
                                                "Expression": "[Flag_Blue]"
                                              },
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[2];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\n\r\nleds.fill(null);\r\n\r\nif($prop(\"Flag_Blue\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 10; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.fill(\"#00000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) : null\r\n}\r\n\r\nreturn leds;",
                                                    "PreExpression": "let leds = new Array(10);\r\nvar color = \"#FF0000FF\";"
                                                  },
                                                  "LedCount": 10,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "Blue Flag"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Blue Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[1];\r\nlet leds = new Array();\r\n\r\nif($prop(\"Flag_Green\") == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\t\r\n\tif(blink == 1)\r\n\t\tfor(let i = 0; i < 10; i++) {\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.concat(pattern2[i % 5]) : leds.concat(patternOFF);\r\n\t\t}\r\n\telse if(blink == 0)\r\n\t\tfor(let i = 0; i < 10; i++) {\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.concat(pattern1[i % 5]) : leds.concat(patternOFF);\r\n\t\t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let colorON = ['#FF00FF00']\t//GREEN\r\nlet colorOFF = ['#000000']\t\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF, colorON];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON, colorOFF];\r\nlet patternOFF = [null];\r\n"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Green Flag"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Green Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[0];\r\nlet leds = new Array(0);\r\n\r\nif($prop('Flag_Yellow') == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\t\r\n\tif(blink == 1)\r\n\t\tfor(let i = 0; i < 10; i++) {\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.concat(pattern2[i % 5]) : leds.concat(patternOFF);\r\n\t\t}\r\n\telse if(blink == 0)\r\n\t\tfor(let i = 0; i < 10; i++) {\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.concat(pattern1[i % 5]) : leds.concat(patternOFF);\r\n\t\t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let colorON = ['#FFFFFF00']\t//YELLOW\r\nlet colorOFF = ['#000000']\t\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF, colorON];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON, colorOFF];\r\nlet patternOFF = [null];\r\n"
                                              },
                                              "LedCount": 10,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Yellow Flag"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Yellow Flag"
                                        },
                                        {
                                          "LedContainers": [
                                            {
                                              "TriggerFormula": {
                                                "Expression": "changed([ATSR_Hub.Func_CheckeredFlagDuration], [Flag_Checkered])"
                                              },
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[4];\r\nlet leds = new Array(0);\r\n\r\nif($prop(\"Flag_Checkered\") == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\t\r\n\tif(blink == 1)\r\n\t\tfor(let i = 0; i < 10; i++) {\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.concat(pattern2[i % 5]) : leds.concat(patternOFF);\r\n\t\t}\r\n\telse if(blink == 0)\r\n\t\tfor(let i = 0; i < 10; i++) {\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i] == 1) ?\r\n\t\t\t\tleds.concat(pattern1[i % 5]) : leds.concat(patternOFF);\r\n\t\t}\r\n}\r\nreturn leds;",
                                                    "PreExpression": "let colorON = ['#FFFFFFFF']\t//WHITE\r\nlet colorOFF = ['#000000']\t\t\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF, colorON];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON, colorOFF];\r\nlet patternOFF = [null];\r\n"
                                                  },
                                                  "LedCount": 10,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "Checkered Flag"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup",
                                              "Description": "Checkered Flag - On for 5s"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "Checkered Flag"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Flag Warnings"
                                    }
                                  ],
                                  "ContainerType": "Base.Group",
                                  "Description": "Buttons"
                                },
                                {
                                  "LedContainers": [
                                    {
                                      "LedContainers": [
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var animationDuration = 1500;\r\nvar cycles = 3;\r\nvar ledCount = 12;\r\n\r\nvar stepDuration = Math.floor(animationDuration / (cycles * ledCount));\r\nvar counter = Math.floor((Date.now() / stepDuration) % ledCount);\r\n\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\noutput.fill(null);\r\ndataIndex.fill(false);\r\n\r\nfor(var i = 0; i < 3; i++)\r\n\t(data[i] == func) ? dataIndex[i] = true : \r\n\t\toutput.fill(null, i * ledCount, ledCount + i * ledCount);\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tlet propertyLeft;\r\n\tlet propertyRight;\r\n\tvar positionOld = storePosition[i];\r\n\t\r\n\tpropertyLeft = getcontrollerbuttonstate('0x0483,0xA44C', enc_btnIndexes[i][1]);\r\n\tpropertyRight = getcontrollerbuttonstate('0x0483,0xA44C', enc_btnIndexes[i][0]);\r\n\t\r\n\tfor(var j = 2; j < 14; j++)\r\n\t\tif(getcontrollerbuttonstate('0x0483,0xA44C', enc_btnIndexes[i][j]))\r\n\t\t\tstorePosition[i] = j - 2;\r\n\r\n\tif(storePosition[i] != positionOld && dataIndex[i]) {\r\n\t\tvar help = false;\r\n\t\tif(positionOld == 11 && storePosition[i] == 0) {\r\n\t\t\tflag[i] = true;\r\n\t    \tflag[3 + i] = false;\r\n\t    \tcurrentTime[i] = Date.now();\r\n\t    \thelp = true;\r\n\t\t}\r\n\t\tif(positionOld == 0 && storePosition[i] == 11) {\r\n\t\t\tflag[3 + i] = true;\r\n\t    \tflag[i] = false;\r\n\t    \tcurrentTime[3 + i] = Date.now();\r\n\t    \thelp = true;\r\n\t\t}\r\n\t\tif(!help) {\r\n\t\t\tif((storePosition[i] > positionOld) \r\n\t\t\t\t&& flag[i]==false && dataIndex[i]==true) {\r\n\t\t\t\tflag[i] = true;\r\n\t\t    \tflag[3 + i] = false;\r\n\t\t    \tcurrentTime[i] = Date.now();\r\n\t\t\t}\r\n\t\t\tif((storePosition[i] < positionOld) \r\n\t\t\t\t&& flag[3 + i]==false && dataIndex[i]==true) {\r\n\t\t\t\tflag[3 + i] = true;\r\n\t\t    \tflag[i] = false;\r\n\t\t    \tcurrentTime[3 + i] = Date.now();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif($prop(propertyLeft) == 1 && flag[i]==false && dataIndex[i]==true) {\r\n\t    \tflag[i] = true;\r\n\t    \tflag[3 + i] = false;\r\n\t    \tcurrentTime[i] = Date.now();\r\n\t\t}\r\n\t\tif($prop(propertyRight) == 1 && flag[3 + i]==false && dataIndex[i]==true) {\r\n\t    \tflag[3 + i] = true;\r\n\t    \tflag[i] = false;\r\n\t    \tcurrentTime[3 + i] = Date.now();\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tif(flag[i] == true)\r\n\t\toutput[encIndex[i] + counter] = colors[i];\r\n\telse if(flag[3 + i] == true)\r\n\t\toutput[encIndex[i] + ledCount - 1 - counter] = colors[i];\r\n\telse\r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n}\r\n\r\nfor(var i = 0; i < 6; i++) {\r\n\tif(flag[i] && Date.now() >= currentTime[i] + animationDuration) {\r\n\t\tflag[i] = false; \r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n\t}\r\n}\r\n\t\r\n\t\t\r\nreturn output;",
                                                "PreExpression": "let output = new Array(60);\r\nvar func = \"Running Animation\";\r\nlet currentTime = new Array(3);\r\nlet flag = new Array(6).fill(false);\r\nlet dataIndex = new Array(3).fill(false);\r\nlet enc_btnIndexes = [\r\n\t[41, 40, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], \r\n\t[65, 52, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69],\r\n\t[53, 52, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57],  \r\n];\r\nlet storePosition = new Array(6).fill(null);\r\nvar debounce_ms = 20;"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Running Animation"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Running Animation"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var animationDuration = 1500;\r\nvar cycles = 9;\r\nvar ledCount = 12;\r\n\r\nvar stepDuration = Math.floor(animationDuration / cycles);\r\nvar blink = Math.floor((Date.now() / stepDuration) % 2);\r\n\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\noutput.fill(null);\r\ndataIndex.fill(false);\r\n\r\nfor(var i = 0; i < 3; i++)\r\n\t(data[i] == func) ? dataIndex[i] = true : \r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tlet propertyOutput;\r\n\tfor(var j = 0; j < 12; j++)\r\n\t\tif(getcontrollerbuttonstate('0x0483,0xA44C', enc_btnIndexes[i][j]))\r\n\t\t\tpropertyOutput = true;\r\n\t\r\n\tif(propertyOutput == true && flag[i]==false && dataIndex[i]==true) {\r\n    \tflag[i] = true;        \r\n    \tcurrentTime[i] = Date.now();\r\n\t}\r\n\telse if(propertyOutput == true && flag[i]==true && dataIndex[i]==true)\r\n\t\tcurrentTime[i] = Date.now();\r\n}\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tif(flag[i] == true && blink == 1)\r\n\t\toutput.fill(colors[i], encIndex[i], encIndex[i] + ledCount);\r\n\telse\r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n}\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tif(flag[i] && Date.now() >= currentTime[i] + animationDuration) {\r\n\t\tflag[i] = false; \r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n\t}\r\n}\t\t\r\nreturn output;",
                                                "PreExpression": "let output = new Array(60);\r\nvar func = \"Blink Animation\";\r\nlet currentTime = new Array(3);\r\nlet flag = new Array(3).fill(false);\r\nlet dataIndex = new Array(3).fill(false);\r\nlet enc_btnIndexes = [\r\n\t[34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], \r\n\t[58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69],\r\n\t[46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57],  \r\n];\r\nvar debounce_ms = 20;"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Blink Animation"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Blink Animation"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var animationDuration = 1500;\r\nvar cycles = 9;\r\nvar ledCount = 12;\r\n\r\nvar stepDuration = Math.floor(animationDuration / cycles);\r\nvar blink = Math.floor((Date.now() / stepDuration) % 2);\r\n\r\nlet colors = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\noutput.fill(null);\r\ndataIndex.fill(false);\r\n\r\nvar animationSpeed = Number($prop(\"ATSR_Hub.Func_PitAnimation_speed\"));\r\nvar speedFactor = 0.25 + (100 - animationSpeed) / 100\r\n\r\nvar time = Math.floor((Date.now() / (2.5 * speedFactor)) % 510);\t//time-var for both btn-rows\r\nif(time <= 255)\r\n\ttransparencyInt = (Math.floor(time % 255));\r\nelse if(time >= 255)\r\n\ttransparencyInt = (Math.floor(255 - time % 255));\r\n\r\nfor(var i = 0; i < 3; i++)\r\n\t(data[i] == func) ? dataIndex[i] = true : \r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tlet propertyOutput;\r\n\tfor(var j = 0; j < 12; j++)\r\n\t\tif(getcontrollerbuttonstate('0x0483,0xA44C', enc_btnIndexes[i][j]))\r\n\t\t\tpropertyOutput = true;\r\n\t\r\n\tif(propertyOutput == true && flag[i]==false && dataIndex[i]==true) {\r\n    \tflag[i] = true;\r\n    \tcurrentTime[i] = Date.now();\r\n\t}\r\n\telse if(propertyOutput == true && flag[i]==true && dataIndex[i]==true)\r\n\t\tcurrentTime[i] = Date.now();\r\n}\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tif(flag[i] == true) {\r\n\t    let colorTemp = '#' + intToHex(transparencyInt) + \r\n\t        colors[i].slice(-6);\r\n\t\t        \r\n\t\toutput.fill(colorTemp, encIndex[i], encIndex[i] + ledCount);\r\n\t}\t\r\n\telse\r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n}\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tif(flag[i] && Date.now() >= currentTime[i] + animationDuration) {\r\n\t\tflag[i] = false; \r\n\t\toutput.fill(null, encIndex[i], encIndex[i] + ledCount);\r\n\t}\r\n}\t\t\r\nreturn output;",
                                                "PreExpression": "let output = new Array(60);\r\nvar func = \"Pulse Animation\";\r\nlet currentTime = new Array(3);\r\nlet flag = new Array(3).fill(false);\r\nlet dataIndex = new Array(3).fill(false);\r\nlet enc_btnIndexes = [\r\n\t[34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], \r\n\t[58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69],\r\n\t[46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57],  \r\n];\r\nvar debounce_ms = 20;"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Pulse Animation"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Pulse Animation"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 0,
                                            "Interpreter": 1,
                                            "Expression": "return true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\")[0];\r\nvar data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\")[0];\r\nvar encoderMode = $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\");\r\n\r\nif(data == func) {\r\n\tfor(var i = 0; i < 12; i++)\r\n\t\tif(getcontrollerbuttonstate('0x0483,0xA44C', 34 + i))\r\n\t\t\tvalue = i + 1;\r\n\tleds.fill(null);\r\n\tif(encoderMode == 1)\r\n\t\tleds[value - 1] = color;\r\n\tif(encoderMode == 2) \r\n\t\tleds.fill(color, 0, value);\r\n\tif(encoderMode == 3) \r\n\t\tleds.fill(\"#000000\", value, 12);\t\t\r\n}\r\nelse \r\n\tleds.fill(null);\r\nreturn leds;",
                                                "PreExpression": "let leds = new Array(12);\r\nvar value;\r\nvar func = 'Absolute Value';"
                                              },
                                              "LedCount": 12,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Encoder L"
                                            },
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\")[1];\r\nvar data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\")[1];\r\nvar encoderMode = $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\");\r\n\r\nif(data == func) {\r\n\tfor(var i = 0; i < 12; i++)\r\n\t\tif(getcontrollerbuttonstate('0x0483,0xA44C', 58 + i))\r\n\t\t\tvalue = i + 1;\r\n\tleds.fill(null);\r\n\tif(encoderMode == 1)\r\n\t\tleds[value - 1] = color;\r\n\tif(encoderMode == 2) \r\n\t\tleds.fill(color, 0, value);\r\n\tif(encoderMode == 3) \r\n\t\tleds.fill(\"#000000\", value, 12);\t\r\n}\r\nelse \r\n\tleds.fill(null);\r\nreturn leds;",
                                                "PreExpression": "let leds = new Array(12);\r\nvar value;\r\nvar func = 'Absolute Value';"
                                              },
                                              "LedCount": 12,
                                              "StartPosition": 13,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Encoder R"
                                            },
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\")[1];\r\nvar data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\")[1];\r\nvar encoderMode = $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\");\r\n\r\nif(data == func) {\r\n\tfor(var i = 0; i < 12; i++)\r\n\t\tif(getcontrollerbuttonstate('0x0483,0xA44C', 46 + i))\r\n\t\t\tvalue = i + 1;\r\n\tleds.fill(null);\r\n\tif(encoderMode == 1)\r\n\t\tleds[value - 1] = color;\r\n\tif(encoderMode == 2) \r\n\t\tleds.fill(color, 0, value);\r\n\tif(encoderMode == 3) \r\n\t\tleds.fill(\"#000000\", value, 12);\t\r\n}\r\nelse \r\n\tleds.fill(null);\r\nreturn leds;",
                                                "PreExpression": "let leds = new Array(12);\r\nvar value;\r\nvar func = 'Absolute Value';"
                                              },
                                              "LedCount": 12,
                                              "StartPosition": 25,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Encoder M"
                                            }
                                          ],
                                          "StartPosition": 25,
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Absolute Values"
                                        }
                                      ],
                                      "ContainerType": "Base.Group",
                                      "Description": "Animations"
                                    },
                                    {
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet tc_level = $prop('TCLevel');\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(tc_level <= 0 || tc_level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (tc_level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + tc_level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + tc_level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'TC';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "TC"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet tc_level = $prop(\"ATSR_Hub.Telemetry_TC2\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(tc_level <= 0 || tc_level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (tc_level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + tc_level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + tc_level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'TC2';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "TC2"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet level = $prop(\"ABSLevel\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(level <= 0 || level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'ABS';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "ABS"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet level = $prop(\"ATSR_Hub.Telemetry_EngineMap\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(level <= 0 || level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'Engine Map';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Engine Map"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet level = $prop(\"ATSR_Hub.Telemetry_FrontARB\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(level <= 0 || level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'Front ARB';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Front ARB"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet level = $prop(\"ATSR_Hub.Telemetry_RearARB\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(level <= 0 || level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'Rear ARB';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Rear ARB"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet level = $prop(\"ATSR_Hub.Telemetry_DiffEntry\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(level <= 0 || level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'DIFF Entry';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "DIFF Entry"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet level = $prop(\"ATSR_Hub.Telemetry_DiffMid\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(level <= 0 || level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'DIFF Mid';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "DIFF Mid"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet level = $prop(\"ATSR_Hub.Telemetry_DiffExit\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif(level <= 0 || level == null)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\t(dataPos[i] == 1) \r\n\t\t\t? leds.fill(color[i], encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\r\nelse {\r\n\tswitch($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tcase 1:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? leds[encIndex[i] + (level - 1)] = color[i] : null;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(color[i], encIndex[i], encIndex[i] + level) : null;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\t\t(dataPos[i] == 1) ? \r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i] + level, \r\n\t\t\t\t\t\tencIndex[i] + ledCount_ENC) : null;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tleds.fill(null);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'DIFF Exit';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "DIFF Exit"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "leds.fill(null);\r\ndataPos.fill(false);\r\n\r\nlet mode = $prop(\"ATSR_Hub.Telemetry_DeployMap\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = true;\r\n\r\nfor(var i = 0; i < encCount; i++) {\r\n\tif(dataPos[i] && $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") != 4) {\r\n\t\tlet color_alt = ($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3) ?\r\n\t\t\t\"#00000000\" : color[i];\r\n\t\tlet color_off = ($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3) ?\r\n\t\t\t\"#000000\" : color[i];\r\n\t\tswitch(mode) {\r\n\t\t\tcase 0:\r\n\t\t\t\tleds.fill(color_off, encIndex[i], encIndex[i] + ledCount_ENC);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tleds.fill(color_alt, encIndex[i] + 4, encIndex[i] + 9);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tleds.fill(color_alt, encIndex[i] + 2, encIndex[i] + 5);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tleds.fill(color_off, encIndex[i], encIndex[i] + 12)\r\n\t\t\t\tleds.fill(color_alt, encIndex[i], encIndex[i] + 2);\r\n\t\t\t\tleds[encIndex[i] + 11] = color_alt;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tleds.fill(color_alt, encIndex[i] + 8, encIndex[i] + 11);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tleds.fill(null);\r\n\t\t}\r\n\t}\r\n}\r\nreturn leds;",
                                            "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'Deploy Map';"
                                          },
                                          "LedCount": 60,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Deploy Mode"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") <= 2)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\tif(data[i] == func) leds.fill(color, encIndex[i], encIndex[i] + ledCount_ENC);\r\n\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nvar color = '#000000';\r\nvar func = 'Throttle';"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Throttle Input - Background"
                                            },
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var throttleLive = $prop('Throttle');\r\nif(throttleLive >= 100) \r\n\tthrottleLive = 100;\r\nif(throttleLive < 0) \r\n\tthrottleLive = 0;\r\n\r\nlet function_altered = throttleLive * ledCount_ENC * 0.0999;\r\nlet function_index = Math.floor(function_altered / 10);\r\n\r\nleds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\")\r\nlet encoderMode = $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\t(data[i] == func) ? dataPos[i] = true : dataPos[i] = false;\r\n\r\nfor(var i = 0; i < encCount; i++) {\r\n\tif(dataPos[i] && encoderMode != 4 ) {\r\n\t\tlet func_color = (encoderMode == 3) ?\r\n\t\t\t\"#000000\" : color[i];\r\n\t\t\t\r\n\t\tif(encoderMode <= 2) {\r\n\t\t\tlet function_hex = \r\n\t\t\t\tintToHex(Math.floor(25.5 * (function_altered - function_index * 10)));\r\n\t\t    leds.fill(func_color, encIndex[i], encIndex[i] + function_index);\r\n\t\t    leds[encIndex[i] + function_index] = \"#\" + function_hex + func_color.slice(-6);\r\n\t    }\r\n\t    else {\r\n\t    \tlet function_hex = \r\n\t    \t\tintToHex(255 - Math.floor(25.5 * (function_altered - function_index * 10)));\r\n\t    \tleds.fill(func_color, encIndex[i] + function_index, encIndex[i] + ledCount_ENC);\r\n\t    \tleds[encIndex[i] + function_index] = \"#\" + function_hex + func_color.slice(-6);\r\n\t    }\r\n   \t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'Throttle'"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Throttle Input"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Throttle Input"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") <= 2)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\tif(data[i] == func) leds.fill(color, encIndex[i], encIndex[i] + ledCount_ENC);\r\n\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nvar color = '#000000';\r\nvar func = 'Brake';"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Brake Input - Background"
                                            },
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var brakeLive = $prop(\"Brake\");\r\nif(brakeLive >= 100) \r\n\tbrakeLive = 100;\r\nif(brakeLive < 0) \r\n\tbrakeLive = 0;\r\n\r\nlet function_altered = brakeLive * ledCount_ENC * 0.0999;\r\nlet function_index = Math.floor(function_altered / 10);\r\n\r\nleds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\")\r\nlet encoderMode = $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\");\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\t(data[i] == func) ? dataPos[i] = true : dataPos[i] = false;\r\n\r\nfor(var i = 0; i < encCount; i++) {\r\n\tif(dataPos[i] && encoderMode != 4 ) {\r\n\t\tlet func_color = (encoderMode == 3) ?\r\n\t\t\t\"#000000\" : color[i];\r\n\t\t\t\r\n\t\tif(encoderMode <= 2) {\r\n\t\t\tlet function_hex = \r\n\t\t\t\tintToHex(Math.floor(25.5 * (function_altered - function_index * 10)));\r\n\t\t    leds.fill(func_color, encIndex[i], encIndex[i] + function_index);\r\n\t\t    leds[encIndex[i] + function_index] = \"#\" + function_hex + func_color.slice(-6);\r\n\t    }\r\n\t    else {\r\n\t    \tlet function_hex = \r\n\t    \t\tintToHex(255 - Math.floor(25.5 * (function_altered - function_index * 10)));\r\n\t    \tleds.fill(func_color, encIndex[i] + function_index, encIndex[i] + ledCount_ENC);\r\n\t    \tleds[encIndex[i] + function_index] = \"#\" + function_hex + func_color.slice(-6);\r\n\t    }\r\n\t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'Brake'"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Brake Input"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Brake Input"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet ersPercent = $prop(\"ATSR_Hub.Telemetry_StateOfCharge\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\")\r\nlet blink = Math.floor((Date.now() / 500) % 2);\r\n\r\nlet function_altered = ersPercent * ledCount_ENC * 0.0999;\r\nlet function_index = Math.floor(function_altered / 10);\r\nlet function_hex = intToHex(Math.floor(25.5 * (function_altered - function_index * 10)));\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = true;\r\n\r\nfor(var i = 0; i < encCount; i++) {\r\n\tif(dataPos[i] && ersPercent > 0 && $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tlet color_alt = ($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") <= 2) ?\r\n\t\t\tcolor[i] : \"#00000000\";\r\n\t\r\n\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC);\r\n\t\t\r\n\t\tleds.fill(color_alt, encIndex[i], encIndex[i] + function_index);\r\n\t\tleds[encIndex[i] + function_index] = \"#\" + function_hex + color_alt.slice(-6);\r\n\t\t\t\r\n\t\tif(ersPercent < 15 && blink == 1)\r\n\t\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'SoC/Battery';\r\n\r\nlet gradient = calculateGradient(\"#FFFF0000\", \"#FFFFFF00\", Math.ceil(ledCount_ENC / 2)).\r\n\tconcat(calculateGradient(\"#FFFFFF00\", \"#FF00FF00\", Math.ceil(ledCount_ENC / 2)));\r\nif(ledCount_ENC % 2 == 1)\r\n\tgradient.splice(Math.floor(ledCount_ENC / 2), 1);"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "SoC/Battery"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "SoC/Battery"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\ndataPos.fill(0);\r\n\r\nlet varPercent = $prop(\"FuelPercent\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\")\r\nlet blink = Math.floor((Date.now() / 500) % 2);\r\n\r\nlet function_altered = varPercent * ledCount_ENC * 0.0999;\r\nlet function_index = Math.floor(function_altered / 10);\r\nlet function_hex = intToHex(Math.floor(25.5 * (function_altered - function_index * 10)));\r\n\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = true;\r\n\r\nfor(var i = 0; i < encCount; i++) {\r\n\tif(dataPos[i] && varPercent > 0 && $prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\")) {\r\n\t\tlet color_alt = ($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") <= 2) ?\r\n\t\t\tcolor[i] : \"#00000000\";\r\n\t\r\n\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC);\r\n\t\t\r\n\t\tleds.fill(color_alt, encIndex[i], encIndex[i] + function_index);\r\n\t\tleds[encIndex[i] + function_index] = \"#\" + function_hex + color_alt.slice(-6);\r\n\t\t\t\r\n\t\tif(varPercent < 15 && blink == 1)\r\n\t\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC);\r\n\t}\r\n}\r\n\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nlet dataPos = new Array(encCount);\r\nvar func = 'Fuel';\r\n\r\nlet gradient = calculateGradient(\"#FFFF0000\", \"#FFFFFF00\", Math.ceil(ledCount_ENC / 2)).\r\n\tconcat(calculateGradient(\"#FFFFFF00\", \"#FF00FF00\", Math.ceil(ledCount_ENC / 2)));\r\nif(ledCount_ENC % 2 == 1)\r\n\tgradient.splice(Math.floor(ledCount_ENC / 2), 1);"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Fuel Remaining"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Fuel Remaining"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") <= 2)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\tif(data[i] == func) leds.fill(color, encIndex[i], encIndex[i] + ledCount_ENC);\r\n\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nvar color = '#000000';\r\nvar func = 'Brake Bias';"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Brake Bias - Background"
                                            },
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\n\r\nvar biasOffset = 0;\r\nvar perLEDoffset = 1.0; \r\nvar indexTransparent;\r\nvar transparencyInt;\r\n\r\nliveBias = $prop(\"BrakeBias\");\r\n\r\nlet color_raw = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet color2 = [...color_raw];\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\nlet pattern = new Array(12);\r\n\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\tcolor2.fill('#00000000');\r\n\t\r\ndataPos.fill(0);\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif($prop(\"ATSR_Hub.resetBiasReference\") == true)\r\n\tbiasReference = liveBias;\r\n\r\nif($prop(\"DataCorePlugin.GameRunning\") == 1) {\r\n\tif($prop(\"EngineStarted\") == 1 && flag == false) {\r\n\t\tbiasReference = liveBias;\r\n\t\tflag = true;\r\n\t}\r\n\tif($prop(\"EngineIgnitionOn\") == 1 && $prop(\"Rpms\") >= 500 && flag == false) {\r\n\t\tflag = true;\r\n\t\tbiasReference = liveBias;\r\n\t}\r\n\tfor(var i = 0; i < encCount; i++) {\r\n\t\tif($prop(\"EngineIgnitionOn\") == 1 && flag == true) {\r\n\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\t\t\t\tpattern.fill('#000000');\r\n\t\t\t\t\r\n\t\t\tpattern[0] = color;\r\n\t\t\t\r\n\t\t\tif(liveBias >= biasReference) {\r\n\t\t\t\tif(liveBias - biasReference <= 5 * perLEDoffset) {\r\n\t\t\t\t\tbiasOffset = liveBias - biasReference;\r\n\t\t\t\t\tindexTransparent = Math.floor(biasOffset/perLEDoffset);\r\n\t\t\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\t\t\t\t\t\ttransparencyInt = (255 - Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset)));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttransparencyInt = Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset));\r\n\t\t\t\t\t\r\n\t\t\t\t\tpattern.fill(color2[i], 1, 1 + indexTransparent);\r\n\t\t\t\t\tpattern[1 + indexTransparent] = '#' + intToHex(transparencyInt) + \r\n\t\t\t\t\t\tcolor2[i].slice(-6);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3) {\r\n\t\t\t\t\t\tpattern[1 + indexTransparent] = '#' + intToHex(transparencyInt) + color2[i].slice(-6);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(liveBias - biasReference > 5 * perLEDoffset)\r\n\t\t\t\t\tpattern.fill(color2[i], 1, 6);\r\n\t\t\t}\r\n\t\t\tif(liveBias < biasReference) {\r\n\t\t\t\tif(biasReference - liveBias <= 5 * perLEDoffset) {\r\n\t\t\t\t\tbiasOffset = biasReference - liveBias;\r\n\t\t\t\t\tindexTransparent = Math.floor(biasOffset/perLEDoffset);\r\n\t\t\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\t\t\t\t\t\ttransparencyInt = (255 - Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset)));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttransparencyInt = Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset));\r\n\t\t\t\t\t\r\n\t\t\t\t\tpattern.fill(color2[i], 12 - indexTransparent, 12);\r\n\t\t\t\t\tpattern[11 - indexTransparent] = '#' + intToHex(transparencyInt) + \r\n\t\t\t\t\t\tcolor2[i].slice(-6);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif($prop('ATSR_Hub.' + deviceID + '_encoderModeID') == 3) {\r\n\t\t\t\t\t\tpattern[11 - indexTransparent] = '#' + intToHex(transparencyInt) + color2[i].slice(-6);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(biasReference - liveBias > 5 * perLEDoffset)\r\n\t\t\t\t\tpattern.fill(color2[i], 7, 12);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") != 4)\r\n\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\tfor(var j = 0; j < ledCount_ENC; j++)\r\n\t\t\t\tif(dataPos[i] == 1) leds[encIndex[i] + j] = pattern[j];\r\n}\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet dataPos = new Array(encCount);\r\nlet leds = new Array(ledCount_TOT).fill(null);\r\nvar color = '#FF0000'\r\nvar biasReference;\r\nvar flag = false;\r\nvar liveBias;\r\nvar carID;\r\nvar func = 'Brake Bias';"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Brake Bias"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Brake Bias"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "Expression": "true"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\n\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") <= 2)\r\n\tfor(var i = 0; i < encCount; i++)\r\n\t\tif(data[i] == func) leds.fill(color, encIndex[i], encIndex[i] + ledCount_ENC);\r\n\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet leds = new Array(ledCount_TOT);\r\nvar color = '#000000';\r\nvar func = 'DIFF F1';"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Differential F1 - Background"
                                            },
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\n\r\nvar biasOffset = 0;\r\nvar perLEDoffset = 5.0; \r\nvar indexTransparent;\r\nvar transparencyInt;\r\n\r\nliveBias = $prop(\"BrakeBias\");\r\n\r\nlet color_raw = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Encoders\");\r\nlet color2 = [...color_raw];\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Encoders\");\r\nlet pattern = new Array(12);\r\n\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\tcolor2.fill('#00000000');\r\n\t\r\ndataPos.fill(0);\r\nfor(var i = 0; i < encCount; i++)\r\n\tif(data[i] == func) dataPos[i] = 1;\r\n\r\nif($prop(\"ATSR_Hub.resetBiasReference\") == true)\r\n\tbiasReference = liveBias;\r\n\r\nif($prop(\"DataCorePlugin.GameRunning\") == 1) {\r\n\tif($prop(\"EngineStarted\") == 1 && flag == false) {\r\n\t\tbiasReference = liveBias;\r\n\t\tflag = true;\r\n\t}\r\n\tif($prop(\"EngineIgnitionOn\") == 1 && $prop(\"Rpms\") >= 500 && flag == false) {\r\n\t\tflag = true;\r\n\t\tbiasReference = liveBias;\r\n\t}\r\n\tfor(var i = 0; i < encCount; i++) {\r\n\t\tif($prop(\"EngineIgnitionOn\") == 1 && flag == true) {\r\n\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\t\t\t\tpattern.fill('#000000');\r\n\t\t\t\t\r\n\t\t\tpattern[0] = color;\r\n\t\t\t\r\n\t\t\tif(liveBias >= biasReference) {\r\n\t\t\t\tif(liveBias - biasReference <= 5 * perLEDoffset) {\r\n\t\t\t\t\tbiasOffset = liveBias - biasReference;\r\n\t\t\t\t\tindexTransparent = Math.floor(biasOffset/perLEDoffset);\r\n\t\t\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\t\t\t\t\t\ttransparencyInt = (255 - Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset)));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttransparencyInt = Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset));\r\n\t\t\t\t\t\r\n\t\t\t\t\tpattern.fill(color2[i], 1, 1 + indexTransparent);\r\n\t\t\t\t\tpattern[1 + indexTransparent] = '#' + intToHex(transparencyInt) + \r\n\t\t\t\t\t\tcolor2[i].slice(-6);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3) {\r\n\t\t\t\t\t\tpattern[1 + indexTransparent] = '#' + intToHex(transparencyInt) + color2[i].slice(-6);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(liveBias - biasReference > 5 * perLEDoffset)\r\n\t\t\t\t\tpattern.fill(color2[i], 1, 6);\r\n\t\t\t}\r\n\t\t\tif(liveBias < biasReference) {\r\n\t\t\t\tif(biasReference - liveBias <= 5 * perLEDoffset) {\r\n\t\t\t\t\tbiasOffset = biasReference - liveBias;\r\n\t\t\t\t\tindexTransparent = Math.floor(biasOffset/perLEDoffset);\r\n\t\t\t\t\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") == 3)\r\n\t\t\t\t\t\ttransparencyInt = (255 - Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset)));\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttransparencyInt = Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset));\r\n\t\t\t\t\t\r\n\t\t\t\t\tpattern.fill(color2[i], 12 - indexTransparent, 12);\r\n\t\t\t\t\tpattern[11 - indexTransparent] = '#' + intToHex(transparencyInt) + \r\n\t\t\t\t\t\tcolor2[i].slice(-6);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif($prop('ATSR_Hub.GT-Neo_encoderModeID') == 3) {\r\n\t\t\t\t\t\tpattern[11 - indexTransparent] = '#' + intToHex(transparencyInt) + color2[i].slice(-6);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(biasReference - liveBias > 5 * perLEDoffset)\r\n\t\t\t\t\tpattern.fill(color2[i], 7, 12);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($prop(\"ATSR_Hub.\" + deviceID + \"_encoderModeID\") != 4)\r\n\t\tfor(var i = 0; i < encCount; i++)\r\n\t\t\tfor(var j = 0; j < ledCount_ENC; j++)\r\n\t\t\t\tif(dataPos[i] == 1) leds[encIndex[i] + j] = pattern[j];\r\n}\r\nreturn leds;",
                                                "PreExpression": "let encCount = encIndex.length;\r\nlet dataPos = new Array(encCount);\r\nlet leds = new Array(ledCount_TOT).fill(null);\r\nvar color = '#FF0000'\r\nvar biasReference;\r\nvar flag = false;\r\nvar liveBias;\r\nvar carID;\r\nvar func = 'DIFF F1';"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Differential F1"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Differential F1"
                                        }
                                      ],
                                      "ContainerType": "Base.Group",
                                      "Description": "Telemetry based functions (Mode 1-3)"
                                    },
                                    {
                                      "LedContainers": [
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableRedlineFlash\")"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\nvar color1 = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Redline\");\r\nvar blink = $prop(\"ATSR_Hub.Telemetry_Redline_Toggle_Fixed\");\r\n\r\nif($prop(\"ATSR_Hub.Telemetry_Redline_RPM\") != 0) {\r\n\tif($prop(\"Rpms\") > $prop(\"ATSR_Hub.Telemetry_Redline_RPM\")) {\r\n\t\tif(blink == 1)\r\n\t\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Redline_output\")[10 + i] == 1) ?\r\n\t\t\t\t\tleds.fill(color1, encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\t\telse\r\n\t\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Redline_output\")[10 + i] == 1) ?\r\n\t\t\t\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC) : null\r\n\t\t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let leds = new Array(60);\r\n"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Redline Flash"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Redline Flash"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableTCLeds\")"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_TC\");\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_TC_output\");\r\n\r\nleds.fill(null);\r\n\r\nif($prop(\"TCActive\") == true && ($prop(\"DataCorePlugin.CurrentGame\") != 'F12023' || $prop(\"DataCorePlugin.CurrentGame\") != 'F12024')) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\tif(data[10 + i] == 1)\r\n\t\t\t\tleds.fill(color, encIndex[i], encIndex[i] + ledCount_ENC);\t\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\tif(data[10 + i] == 1)\r\n\t\t\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC);\t\r\n\t}\r\n}\r\nreturn leds;",
                                                "PreExpression": "let leds = new Array(60);\r\n"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "TC Active"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "TC Active - Warning"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableABSLeds\") "
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "var color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_ABS\");\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_ABS_output\");\r\noutput.fill(null);\r\n\r\nif($prop(\"ABSActive\") == true) {\r\n\tif(blink == 1) {\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\tif(data[10 + i] == 1)\r\n\t\t\t\toutput.fill(color, encIndex[i], encIndex[i] + ledCount_ENC);\t\r\n\t}\r\n\telse {\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\tif(data[10 + i] == 1)\r\n\t\t\t\toutput.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC);\t\r\n\t}\r\n}\r\nreturn output;",
                                                "PreExpression": "let output = new Array(60);\r\n"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "ABS Active"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "ABS Active - Warning"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableSpotterLeds\")"
                                          },
                                          "LedContainers": [
                                            {
                                              "ContentFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "leds.fill(null);\r\nvar color1 = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Spotter\");\r\nvar blink = Math.floor((Date.now() / 250) % 2);\r\n\r\nif($prop(\"SpotterCarLeft\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterL_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(color1, encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterL_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC) : null\r\n}\r\nif($prop('SpotterCarRight') == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterR_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(color1, encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_SpotterR_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(\"#000000\", encIndex[i], encIndex[i] + ledCount_ENC) : null\r\n}\r\nreturn leds;",
                                                "PreExpression": "let leds = new Array(60);\r\n"
                                              },
                                              "LedCount": 60,
                                              "ContainerType": "ScriptedContent",
                                              "Description": "Car Left or Car Right"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Spotter LEDs"
                                        },
                                        {
                                          "TriggerFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "return $prop(\"ATSR_Hub.\" + deviceID + \"_enableFlagWarnings\") "
                                          },
                                          "LedContainers": [
                                            {
                                              "LedContainers": [
                                                {
                                                  "TriggerFormula": {
                                                    "Expression": "changed([ATSR_Hub.Func_WhiteFlagDuration], [Flag_White])"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[3];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\nleds.fill(null);\r\n\r\nif($prop(\"Flag_White\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(color, encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(\"#00000000\", encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n}\r\nreturn leds;",
                                                        "PreExpression": "let leds = new Array(60);\r\nvar color = \"#FFFFFFFF\";"
                                                      },
                                                      "LedCount": 60,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "White Flag"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "White Flag - On for 5s"
                                                }
                                              ],
                                              "ContainerType": "Base.Group",
                                              "Description": "White Flag"
                                            },
                                            {
                                              "LedContainers": [
                                                {
                                                  "TriggerFormula": {
                                                    "Expression": "[Flag_Blue]"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[2];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2)\r\nleds.fill(null);\r\n\r\nif($prop(\"Flag_Blue\") == 1) {\r\n\tif(blink == 1)\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(color, encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n\telse\r\n\t\tfor(var i = 0; i < 3; i++)\r\n\t\t\t($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.fill(\"#00000000\", encIndex[i], encIndex[i] + ledCount_ENC) : null;\r\n}\r\nreturn leds;",
                                                        "PreExpression": "let leds = new Array(60);\r\nvar color = \"#FF0000FF\";"
                                                      },
                                                      "LedCount": 60,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Blue Flag"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup"
                                                }
                                              ],
                                              "ContainerType": "Base.Group",
                                              "Description": "Blue Flag"
                                            },
                                            {
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[0];\r\nlet leds = new Array();\r\n\r\nif($prop('Flag_Yellow') == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\tleds = leds.concat(new Array(24).fill(null));\r\n\t\r\n\tif(blink == 1)\r\n\t\tfor(let i = 0; i < 3; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.concat(pattern1) : leds.concat(patternOFF);\r\n\telse if(blink == 0)\r\n\t\tfor(let i = 0; i < 3; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.concat(pattern2) : leds.concat(patternOFF);\r\n}\r\nreturn leds;",
                                                    "PreExpression": "let colorON = '#FFFFFF00'\t//YELLOW\r\nlet colorOFF = '#000000'\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF, colorON, colorOFF,\r\n\tcolorON, colorOFF, colorON, colorOFF, colorON, colorOFF];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON, colorOFF, colorON,\r\n\tcolorOFF, colorON, colorOFF, colorON, colorOFF, colorON];\r\nlet patternOFF = new Array(12).fill(null);"
                                                  },
                                                  "LedCount": 60,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "Yellow Flag"
                                                }
                                              ],
                                              "ContainerType": "Base.Group",
                                              "Description": "Yellow Flag"
                                            },
                                            {
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 4,
                                                    "Interpreter": 1,
                                                    "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[1];\r\nlet leds = new Array();\r\n\r\nif($prop('Flag_Green') == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\tleds = leds.concat(new Array(24).fill(null));\r\n\t\r\n\tif(blink == 1)\r\n\t\tfor(let i = 0; i < 3; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.concat(pattern1) : leds.concat(patternOFF);\r\n\telse if(blink == 0)\r\n\t\tfor(let i = 0; i < 3; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.concat(pattern2) : leds.concat(patternOFF);\r\n}\r\nreturn leds;",
                                                    "PreExpression": "let colorON = '#FF00FF00'\t//GREEN\r\nlet colorOFF = '#000000'\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF, colorON, colorOFF,\r\n\tcolorON, colorOFF, colorON, colorOFF, colorON, colorOFF];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON, colorOFF, colorON,\r\n\tcolorOFF, colorON, colorOFF, colorON, colorOFF, colorON];\r\nlet patternOFF = new Array(12).fill(null);"
                                                  },
                                                  "LedCount": 60,
                                                  "ContainerType": "ScriptedContent",
                                                  "Description": "Green Flag"
                                                }
                                              ],
                                              "ContainerType": "Base.Group",
                                              "Description": "Green Flag"
                                            },
                                            {
                                              "LedContainers": [
                                                {
                                                  "TriggerFormula": {
                                                    "Expression": "changed([ATSR_Hub.Func_CheckeredFlagDuration], [Flag_Checkered])"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "var blinkInterval = $prop(\"ATSR_Hub.Func_FlagBlinkIntervals\").split(',')[4];\r\nlet leds = new Array();\r\n\r\nif($prop('Flag_Checkered') == 1) {\r\n\tvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\tleds = leds.concat(new Array(24).fill(null));\r\n\t\r\n\tif(blink == 1)\r\n\t\tfor(let i = 0; i < 3; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.concat(pattern1) : leds.concat(patternOFF);\r\n\telse if(blink == 0)\r\n\t\tfor(let i = 0; i < 3; i++)\r\n\t\t\tleds = ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_Flag_output\")[i + 10] == 1) ?\r\n\t\t\t\tleds.concat(pattern2) : leds.concat(patternOFF);\r\n}\r\nreturn leds;",
                                                        "PreExpression": "let colorON = '#FFFFFFFF'\t//WHITE\r\nlet colorOFF = '#000000'\t//BLACK\r\nlet pattern1 = [colorON, colorOFF, colorON, colorOFF, colorON, colorOFF,\r\n\tcolorON, colorOFF, colorON, colorOFF, colorON, colorOFF];\r\nlet pattern2 = [colorOFF, colorON, colorOFF, colorON, colorOFF, colorON,\r\n\tcolorOFF, colorON, colorOFF, colorON, colorOFF, colorON];\r\nlet patternOFF = new Array(12).fill(null);"
                                                      },
                                                      "LedCount": 60,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Checkered Flag"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Checkered Flag - On for 5s"
                                                }
                                              ],
                                              "ContainerType": "Base.Group",
                                              "Description": "Checkered Flag"
                                            }
                                          ],
                                          "ContainerType": "Groups.CustomConditionalGroup",
                                          "Description": "Flag Warnings"
                                        }
                                      ],
                                      "ContainerType": "Base.Group",
                                      "Description": "Display Mode Independant Effects"
                                    }
                                  ],
                                  "ContainerType": "Base.Group",
                                  "Description": "Encoders"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "When Game Running and not Paused"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Effects - When Pit-Limiter is OFF"
                        },
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "if($prop(\"ATSR_Hub.enableMenuLighting\")) {\r\n\tif($prop(\"DataCorePlugin.CurrentGame\") == 'IRacing') {\r\n\t\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t\t&& (!$prop(\"GameRawData.Telemetry.IsOnTrack\")))\r\n\t\t\treturn true;\r\n\t\t}\r\n\tif($prop(\"DataCorePlugin.CurrentGame\") == \"AssettoCorsaCompetizione\") {\r\n\t\t\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t\t&& ($prop(\"OrientationPitch\") == 0 || $prop(\"DataCorePlugin.GamePaused\")))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn true;\r\n}\r\nelse if($prop('DataCorePlugin.GameRunning') == 1 && $prop('Rpms') != 0)\r\n\treturn true;\r\nelse\r\n\treturn false;"
                          },
                          "LedContainers": [
                            {
                              "LedContainers": [
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return true"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "output.fill(null);\r\ndataIndex.fill(false);\r\nif(($prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") && !$prop(\"PitLimiterOn\")) || !$prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") || $prop(\"Rpms\") == 0) {\r\n\tlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\n\tlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\t\r\n\tfor(var i = 0; i < 10; i++)\r\n\t\tif(data[i] == func) dataIndex[i] = true;\r\n\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\tif(getcontrollerbuttonstate('0x0483,0xA44C', buttonIDs[i]) && dataIndex[i])\r\n\t\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n}\r\nreturn output;",
                                        "PreExpression": "let output = new Array(10);\r\nlet dataIndex = new Array(10).fill(false);\r\nvar func = 'Press';"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Press"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Press"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return true"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "let color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\ndataIndex.fill(false);\r\n\r\nvar blinkDuration = Number($prop(\"ATSR_Hub.Func_ButtonBlinkDuration\"));\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[0];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(data[i] == func) \r\n\t\tdataIndex[i] = true;\r\n\telse\r\n\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(getcontrollerbuttonstate('0x0483,0xA44C', buttonIDs[i]) && !flag[i] && dataIndex[i]) {\r\n    \tflag[i] = true;\r\n    \tcurrentTime[i] = Date.now();\r\n\t}\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(flag[i]) {\r\n\t\tif(blink == 1)\r\n\t\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t\telse \r\n\t\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n\telse\r\n\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(flag[i] && Date.now() >= currentTime[i] + blinkDuration) {\r\n\t\tflag[i] = false; \r\n\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(getcontrollerbuttonstate('0x0483,0xA44C', buttonIDs[i]) && dataIndex[i]) {\r\n\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n}\r\n\r\nif(($prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") && !$prop(\"PitLimiterOn\")) || !$prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") || $prop(\"Rpms\") == 0)\r\n\treturn output;\r\nelse\r\n\treturn defaultOutput;",
                                        "PreExpression": "let output = new Array(10);\r\nlet defaultOutput = new Array(10).fill(null);\r\nlet currentTime = new Array(10);\r\nlet flag = new Array(10).fill(false);\r\nlet dataIndex = new Array(10).fill(false);\r\nvar func = 'Blink';\r\nvar debounce_ms = 20;"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Blink"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Blink"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return true"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "let color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nvar blinkDuration = Number($prop(\"ATSR_Hub.Func_ButtonPulseDuration\"));\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[8];\r\nvar speedFactor = (2 * blinkInterval) / 510;\r\n\r\ndataIndex.fill(false);\r\n\r\nvar time = Math.floor((Date.now() / (speedFactor)) % 510);\t//time-var for both btn-rows\r\nif(time <= 255)\r\n\ttransparencyHex = (Math.floor(time % 255)).toString(16);\r\nelse if(time >= 255)\r\n\ttransparencyHex = (Math.floor(255 - time % 255)).toString(16);\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(data[i] == func) \r\n\t\tdataIndex[i] = true;\r\n\telse \r\n\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(getcontrollerbuttonstate('0x0483,0xA44C', buttonIDs[i]) && !flag[i] && dataIndex[i]) {\r\n    \tflag[i] = true;\r\n    \tcurrentTime[i] = Date.now();\r\n\t}\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(flag[i]) {\r\n\t\tvar colorTemp;\r\n\t\r\n\t\tif(transparencyHex.length == 1)\r\n\t    \tcolorTemp = '#0' + transparencyHex + \r\n\t        color[i].substring(color[i].length - 6, color[i].length);\r\n\t\telse\r\n\t\t    colorTemp = '#' + transparencyHex + \r\n\t\t        color[i].substring(color[i].length - 6, color[i].length);\r\n\t\r\n\t\toutput.fill(colorTemp, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n\telse\r\n\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(flag[i] && Date.now() >= currentTime[i] + blinkDuration) {\r\n\t\tflag[i] = false; \r\n\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n}\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(getcontrollerbuttonstate('0x0483,0xA44C', buttonIDs[i]) && dataIndex[i])\r\n\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n}\r\n\r\nif(($prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") && !$prop(\"PitLimiterOn\")) || !$prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") || $prop(\"Rpms\") == 0)\r\n\treturn output;\r\nelse\r\n\treturn defaultOutput;",
                                        "PreExpression": "let output = new Array(10);\r\nlet defaultOutput = new Array(10).fill(null);\r\nlet currentTime = new Array(10);\r\nlet flag = new Array(10).fill(false);\r\nlet dataIndex = new Array(10).fill(false);\r\nvar func = 'Pulse';\r\nvar debounce_ms = 20;"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Pulse"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Pulse"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "return true"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "let color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\ndataIndex.fill(false);\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(data[i] == func) \r\n\t\tdataIndex[i] = true;\r\n\telse {\r\n\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t} \r\n}\r\nfor(var i = 0; i < 10; i++) {\r\n\tif(getcontrollerbuttonstate('0x0483,0xA44C', buttonIDs[i]) && !flag[i] && dataIndex[i]) {\r\n\t\t(output[btnIndex[i]] == color[i]) ?\r\n\t\t\toutput.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN) : \r\n\t\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n    \tflag[i] = true;\r\n    \tcurrentTime[i] = Date.now();\r\n\t}\r\n}\r\nfor(var i = 0; i < 10; i++) {\r\n\tif((Date.now() >= currentTime[i] + debounce_ms)  \r\n\t    && !getcontrollerbuttonstate('0x0483,0xA44C', buttonIDs[i]))\r\n\t  \t\tflag[i] = false;\r\n}\r\n\r\nif(($prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") && !$prop(\"PitLimiterOn\")) || !$prop(\"ATSR_Hub.\" + deviceID + \"_enablePitLimiterAnimation\") || $prop(\"Rpms\") == 0)\r\n\treturn output;\r\nelse\r\n\treturn defaultOutput;",
                                        "PreExpression": "let output = new Array(10);\r\nlet defaultOutput = new Array(10).fill(null);\r\nlet currentTime = new Array(10);\r\nlet flag = new Array(10).fill(false);\r\nlet dataIndex = new Array(10).fill(false);\r\nvar func = 'Toggle';\r\nvar debounce_ms = 20;"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Toggle"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Toggle"
                                }
                              ],
                              "ContainerType": "Base.Group",
                              "Description": "Button Press Effects"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "Button Press Effects"
                        }
                      ],
                      "ContainerType": "Base.Group",
                      "Description": "Effects"
                    },
                    {
                      "LedContainers": [
                        {
                          "TriggerFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "if($prop(\"DataCorePlugin.CurrentGame\") == \"IRacing\") {\r\n\tif($prop('DataCorePlugin.GameRunning') == 1 && $prop('Rpms') != 0 &&\r\n\t\t$prop(\"GameRawData.Telemetry.IsOnTrack\"))\r\n\t\treturn true;\r\n\treturn false;\r\n}\r\nelse {\r\n\tif($prop('DataCorePlugin.GameRunning') == 1 && $prop('Rpms') != 0)\r\n\t\treturn true;\r\n\treturn false;\r\n}"
                          },
                          "LedContainers": [
                            {
                              "TriggerFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "return true;"
                              },
                              "LedContainers": [
                                {
                                  "TriggerFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "return $prop('ATSR_Hub.' + deviceID + '_Data_rpmLEDs') == 'Shift Lights' ? true : false"
                                  },
                                  "LedContainers": [
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 0,
                                        "Interpreter": 1,
                                        "Expression": "if($prop('IsInPitLane') == false || $prop('PitLimiterOn') == false)\r\n\treturn true;\r\nreturn false;"
                                      },
                                      "LedContainers": [
                                        {
                                          "LedContainers": [
                                            {
                                              "TriggerFormula": {
                                                "JSExt": 0,
                                                "Interpreter": 1,
                                                "Expression": "if($prop(\"ATSR_Hub.var_profileModeID\") != 15 && !$prop(\"ATSR_Hub.DDU1_enableRPMOverride\"))\r\n\treturn true\r\nreturn false"
                                              },
                                              "LedContainers": [
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 1)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "var color1 = \"#FF8A8CE2\";\r\nvar color2 = \"#FFB52BE2\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 1 - ATSR Theme"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 1 - ATSR Theme"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 2)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "var color1 = \"#FF02ED90\";\r\nvar color2 = \"#FF262576\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 2 - Aurora Theme"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 2 - Aurora Theme"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 3)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "var color1 = \"#FF63EDFF\";\r\nvar color2 = \"#FFFF91E2\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 3 - Cotton Candy"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 3 - Cotton Candy"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 4)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "var color1 = \"#FFFF0090\";\r\nvar color2 = \"#FFFFA500\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 4 - Magenta Dawn"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 4 - Magenta Dawn"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 5)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let output = new Array(ledCount_RPM);\r\n\r\nvar leftCount = 0;\r\nvar sideCount = 3;\r\nvar midCount = ledCount_RPM - 2 * sideCount\r\n \r\noutput.fill(\"#FFFF0000\", leftCount, leftCount + sideCount);\r\noutput.fill(\"#FFFFFFFF\", leftCount + sideCount, leftCount + sideCount + midCount);\r\noutput.fill(\"#FFFF0000\", leftCount + sideCount + midCount, leftCount + 2 * sideCount + \tmidCount);\r\n\r\nreturn output;"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 5 - Red White Theme"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 5 - Red White Theme"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 6)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let output = new Array(ledCount_RPM);\r\n\r\nvar leftCount = 0;\r\nvar sideCount = Math.round(ledCount_RPM/3);\r\nvar midCount = ledCount_RPM - 2 * sideCount\r\n\r\noutput.fill(\"#FF00FF00\", leftCount, leftCount + sideCount);\r\noutput.fill(\"#FFFFFFFF\", leftCount + sideCount, leftCount + sideCount + midCount);\r\noutput.fill(\"#FFFF0000\", leftCount + sideCount + midCount, leftCount + 2 * sideCount + \tmidCount);\r\n\r\nreturn output;"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 6 - Tricolore Theme"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 6 - Tricolore Theme"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 7)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "var color1 = \"#FFFFFFFF\";\r\nvar color2 = \"#FF16588E\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 7 - BMU M Theme"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 7 - BMU M Theme"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 8)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "var color1 = \"#FFFFDC00\";\r\nvar color2 = \"#FF0094D8\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 8 - Bilstein Theme"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 8 - Bilstein Theme"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 9)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;\r\n",
                                                        "PreExpression": "let output = new Array(32);\r\nvar color1 = \"#FF008000\";\r\nvar color2 = \"#FFFFFF00\";\r\n"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 9 - Manthey Racing"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 9 - Manthey Racing"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 10)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "let output = new Array(32);\r\nvar color1 = \"#FFFFEB00\";\r\nvar color2 = \"#FFA6051A\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 10 - Scuderia"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 10 - Scuderia"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 11)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "let output = new Array(32);\r\nvar color1 = \"#FFFF004A\";\r\nvar color2 = \"#FFFFC906\";\r\nvar staticColor1 = \"#FF121F9E\";\r\nvar staticColor2 = \"#FF223971\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 11 - Red B Racing"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 11 - Red B Racing"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 12)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "let output = new Array(32);\r\nvar color1 = \"#FF00A19C\";\r\nvar color2 = \"#FFC6C6C6\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 12 - Merc Petronas"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 12 - Merc Petronas"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 13)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "let output = new Array(32);\r\nvar color1 = \"#FF47C7FC\";\r\nvar color2 = \"#FFFF6600\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 13 - MCL Racing"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 13 - MCL Racing"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 14)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let rpmLEDs = new Array(ledCount_RPM).fill(null);\r\n\r\nif(ledCount_RPM != 0)\r\n\trpmLEDs = calculateGradient(color2, color1, Math.ceil(ledCount_RPM / 2)).concat\t\r\n\t\t(calculateGradient(color1, color2, Math.ceil(ledCount_RPM / 2)));\r\nif(ledCount_RPM % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(ledCount_RPM/2), 1);\r\n\r\nreturn rpmLEDs;",
                                                        "PreExpression": "let output = new Array(32);\r\nvar color1 = \"#FFCEDC00\";\r\nvar color2 = \"#FF006416\";"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 14 - AMR Racing"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 14 - AMR Racing"
                                                },
                                                {
                                                  "TriggerFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 16)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                                  },
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let output = new Array(ledCount_RPM);\r\n\r\nvar leftCount = 0;\r\nvar sideCount = Math.round(ledCount_RPM/3);\r\nvar midCount = ledCount_RPM - 2 * sideCount\r\n\r\noutput.fill(\"#FF0DC5FF\", leftCount, leftCount + sideCount);\r\noutput.fill(\"#FFFF0000\", leftCount + sideCount, leftCount + sideCount + midCount);\r\noutput.fill(\"#FFFFD700\", leftCount + sideCount + midCount, leftCount + 2 * sideCount + \tmidCount);\r\n\r\nreturn output;"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent",
                                                      "Description": "Light Mode 16 - Lovely Dashboard"
                                                    }
                                                  ],
                                                  "ContainerType": "Groups.CustomConditionalGroup",
                                                  "Description": "Light Mode 16 - Lovely Dashboard"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup",
                                              "Description": "Lighting Modes 1 - 14"
                                            },
                                            {
                                              "TriggerFormula": {
                                                "JSExt": 4,
                                                "Interpreter": 1,
                                                "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 15 || $prop('ATSR_Hub.' + deviceID + '_enableRPMOverride'))\r\n\treturn true;\r\nelse \r\n\treturn false;"
                                              },
                                              "LedContainers": [
                                                {
                                                  "LedContainers": [
                                                    {
                                                      "ContentFormula": {
                                                        "JSExt": 4,
                                                        "Interpreter": 1,
                                                        "Expression": "let output = new Array(10);\r\nfor(var i = 0; i < 10; i++)\r\n\toutput[i] = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Telemetry\")[i + 4]\r\nreturn output;"
                                                      },
                                                      "LedCount": 10,
                                                      "ContainerType": "ScriptedContent"
                                                    }
                                                  ],
                                                  "ContainerType": "Base.Group",
                                                  "Description": "RPM"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup",
                                              "Description": "Light Mode 15 - Custom Mode"
                                            },
                                            {
                                              "TriggerFormula": {
                                                "JSExt": 0,
                                                "Interpreter": 1,
                                                "Expression": "return ($prop(\"ATSR_Hub.NightMode_IsActive\") && \r\n\t$prop(\"ATSR_Hub.NightMode_SelectedMode\") == \"Plus\")"
                                              },
                                              "LedContainers": [
                                                {
                                                  "ContentFormula": {
                                                    "JSExt": 0,
                                                    "Interpreter": 1,
                                                    "Expression": "let rpmLEDs = new Array(10).fill($prop(\"ATSR_Hub.NightMode_SelectedEffectColor\"));\r\n\r\nreturn rpmLEDs;"
                                                  },
                                                  "LedCount": 10,
                                                  "ContainerType": "ScriptedContent"
                                                }
                                              ],
                                              "ContainerType": "Groups.CustomConditionalGroup",
                                              "Description": "Night Mode"
                                            }
                                          ],
                                          "ContainerType": "Base.Group",
                                          "Description": "RPM - Background"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "RPM - Background"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 0,
                                        "Interpreter": 1,
                                        "Expression": "return ($prop('IsInPitLane') == false || $prop('PitLimiterOn') == false)"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "let rpmData = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_RPMColors\");\r\n\r\nlet output = (rpmData[0] != \"NULL\") ? new Array(rpmData) :\r\n\tnew Array(10);\r\n\r\nreturn output;"
                                          },
                                          "LedCount": 10,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Generator_EVO - Readout"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Generator EVO -  Readout"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Shift Lights"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_rpmLEDs\") == 'SoC/Battery' && $prop('PitLimiterOn') == false) ? true : false"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "let color1 = \"#FFFF0000\";\r\nlet color2 = \"#FFFFFF00\";\r\nlet color3 = \"#FF00FF00\";\r\n\r\nif($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")==\"Plus\") { \r\n\tcolor1 = $prop(\"ATSR_Hub.NightMode_SelectedColor\");\r\n\tcolor2 = $prop(\"ATSR_Hub.NightMode_SelectedColor\");\r\n\tcolor3 = $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\");\r\n}\r\n\r\nreturn calculateDoubleGradient(color1, color2, color3, rpmCount);\r\n"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "SoC / Battery - Background"
                                    },
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "var ledCount = rpmCount;\r\n\r\nlet leds = new Array(ledCount);\r\n\r\nvar ersPercent = $prop(\"ATSR_Hub.Telemetry_StateOfCharge\") * ledCount / 10;\r\nvar blink = Math.floor((Date.now() / 500) % 2);\r\n\r\nleds.fill('#000000')\r\nleds.fill(color, 0, Math.floor(ersPercent/10));\r\n\r\nvar indexTransparent = Math.floor(ersPercent/10)\r\nvar transparencyHex = 255 - Math.floor((ersPercent - indexTransparent * 10) * 25.5);\r\n\r\nif(ersPercent > 0) {\r\n\tleds[indexTransparent] = '#' + intToHex(transparencyHex) + '000000';\r\n\tif(ersPercent <= 10 && blink) //Low ERS Warning - at 10% SoC\r\n\t\tleds.fill(null);\r\n}\r\nreturn leds;",
                                        "PreExpression": "let color = '#00000000';"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "SoC/Battery"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "SoC/Battery"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_rpmLEDs\") == 'Fuel Remaining' && $prop('PitLimiterOn') == false) ? true : false"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "let color1 = \"#FFFF0000\";\r\nlet color2 = \"#FFFFFF00\";\r\nlet color3 = \"#FF00FF00\";\r\n\r\nif($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")==\"Plus\") { \r\n\tcolor1 = $prop(\"ATSR_Hub.NightMode_SelectedColor\");\r\n\tcolor2 = $prop(\"ATSR_Hub.NightMode_SelectedColor\");\r\n\tcolor3 = $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\");\r\n}\r\n\r\nreturn calculateDoubleGradient(color1, color2, color3, rpmCount);\r\n"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Fuel Remaining - Background"
                                    },
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "var ledCount = rpmCount;\r\n\r\nlet leds = new Array(ledCount);\r\n\r\nvar fuelPercent = $prop('FuelPercent') * ledCount / 10;\r\nvar blink = Math.floor((Date.now() / 500) % 2);\r\n\r\nleds.fill('#000000');\r\nleds.fill(color, 0, Math.floor(fuelPercent/10));\r\n\r\nvar indexTransparent = Math.floor(fuelPercent/10)\r\nvar transparencyHex = (255 - Math.floor((fuelPercent - indexTransparent * 10) * 25.5)).toString(16);\r\n\r\nif(fuelPercent > 0) {\r\n\tleds[indexTransparent] = '#' + intToHex(transparencyHex) + '000000';\r\n\r\n\tif($prop('SessionTypeName') != \"HOTLAP\" && $prop('SessionTypeName') != \"QUALIFYING\")\r\n\t\tif($prop('FuelPercent') <= 5 && blink) //Low Fuel Warning - at 5% fuel level\r\n\t\t\tleds.fill(null);\r\n}\r\nreturn leds;",
                                        "PreExpression": "let color = \"#00000000\";"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Fuel Remaining"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Fuel Remaining"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_rpmLEDs\") == 'Throttle/Brake' && $prop('PitLimiterOn') == false) ? true : false"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "var ledCount = rpmCount;\r\n\r\nvar color = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop\r\n(\"ATSR_Hub.NightMode_SelectedColor\") : \"#999999\";\r\n\r\nvar color2 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#00FF00\";\r\n\r\nvar color3 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#FF0000\";\r\n\r\nlet leds = new Array(ledCount);\r\n\r\nleds.fill('#000000');\r\n\r\nvar throttleLive = $prop('Throttle');\r\nif(throttleLive >= 100)\r\n\tthrottleLive = 100;\r\nif(throttleLive < 0)\r\n\tthrottleLive = 0;\r\n\r\nvar brakeLive = $prop(\"Brake\");\r\nif(brakeLive >= 100)\r\n\tbrakeLive = 100;\r\nif(brakeLive < 0.1)\r\n\tbrakeLive = 0.1;\r\n\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nif($prop(\"TCActive\") == 1 && !$prop(\"DataCorePlugin.CurrentGame\").startsWith(\"F120\") \r\n\t&& blink == 1 && $prop(\"ATSR_Hub.Func_ThrottleAlert\")) \r\n\tthrottleLive = 0;\r\n\t\r\nif($prop(\"ABSActive\") == 1 && blink == 1 && $prop(\"ATSR_Hub.Func_BrakeAlert\"))\r\n\tbrakeLive = 0;\r\nelse if($prop(\"ATSR_Hub.Func_BrakeBlink\") && brakeLive > $prop\t(\"ATSR_Hub.Func_BrakeBlink_Threshold\") && blink == 1 && $prop(\"SpeedKmh\") >= 25)\r\n\tbrakeLive = 0;\r\n\r\nvar throttle = throttleLive * 0.0999 * Math.floor(ledCount/2);\r\nvar brake = brakeLive * 0.0999 * Math.floor(ledCount/2);\r\n\r\nvar transparencyIndexT = Math.floor((Math.ceil(ledCount/2)) + throttle / 10);\r\nvar transparencyIndexB = Math.ceil((Math.floor(ledCount/2) - 1) - brake / 10);\r\n\r\nif(ledCount % 2 == 0 && ledCount <= 10) {\r\n\tthrottle = throttleLive * 0.0999 * (Math.floor(ledCount/2));\r\n\tbrake = brakeLive * 0.0999 * (Math.floor(ledCount/2));\r\n\t\r\n\ttransparencyIndexT = Math.floor((Math.ceil(ledCount/2)) + throttle / 10);\r\n\ttransparencyIndexB = Math.ceil((Math.floor(ledCount/2) - 1) - brake / 10);\r\n}\r\nelse if(ledCount % 2 == 0) {\r\n\tthrottle = throttleLive * 0.0999 * (Math.floor(ledCount/2) - 1);\r\n\ttransparencyIndexT = Math.floor((Math.ceil(ledCount/2)) + throttle / 10);\r\n\t\r\n\tbrake = brakeLive * 0.0999 * (Math.floor(ledCount/2) - 1);\r\n\ttransparencyIndexB = Math.floor((Math.floor(ledCount/2) - 1) - brake / 10);\r\n}\r\n\r\n\r\nvar transparencyHexT = (Math.floor(25.5 * (throttle - Math.floor(throttle / 10) * 10))).toString(16);\r\nvar transparencyHexB = (Math.floor(25.5 * (brake - Math.floor(brake / 10) * 10))).toString(16);\r\n\r\nif(ledCount % 2 == 1)\r\n\tleds[Math.floor(ledCount/2)] = color;\r\nelse if(ledCount > 10) {\r\n\tleds[Math.floor(ledCount/2) ] = color;\r\n\tleds[Math.floor(ledCount/2) - 1] = color;\r\n}\r\n// Throttle\r\nif(ledCount % 2 == 0 && ledCount <= 10) {\r\n\tleds.fill(color2, (Math.floor(ledCount/2)), transparencyIndexT);\r\n\tif(transparencyHexT.length == 1)\r\n    \tleds[transparencyIndexT] = '#0' + transparencyHexT + \r\n    \t    color2.substring(color2.length - 6, color2.length);\r\n\telse\r\n    \tleds[transparencyIndexT] = '#' + transparencyHexT + \r\n    \t    color2.substring(color2.length - 6, color2.length);\r\n}\r\nelse if(ledCount % 2 == 0) {\r\n\tleds.fill(color2, (Math.floor(ledCount/2) + 1), transparencyIndexT + 1);\r\n\tif(transparencyHexT.length == 1)\r\n    \tleds[transparencyIndexT + 1] = '#0' + transparencyHexT + \r\n    \t    color2.substring(color2.length - 6, color2.length);\r\n\telse\r\n    \tleds[transparencyIndexT + 1] = '#' + transparencyHexT + \r\n    \t    color2.substring(color2.length - 6, color2.length);\r\n}\t\r\nelse {\r\n\tleds.fill(color2, (Math.floor(ledCount/2) + 1), transparencyIndexT);\r\n\tif(transparencyHexT.length == 1)\r\n    \tleds[transparencyIndexT] = '#0' + transparencyHexT + \r\n    \t    color2.substring(color2.length - 6, color2.length);\r\n\telse\r\n    \tleds[transparencyIndexT] = '#' + transparencyHexT + \r\n    \t    color2.substring(color2.length - 6, color2.length);\r\n}\r\n\r\n// Brake\r\nif(ledCount % 2 == 0 && ledCount <= 10) {\r\n\tleds.fill(color3, transparencyIndexB, (Math.ceil(ledCount/2) - 0));\r\n\tif(transparencyHexB.length == 1)\r\n    leds[transparencyIndexB] = '#0' + transparencyHexB + \r\n        color3.substring(color3.length - 6, color3.length);\r\nelse\r\n    leds[transparencyIndexB] = '#' + transparencyHexB + \r\n        color3.substring(color3.length - 6, color3.length);\r\n}\r\nelse if(ledCount % 2 == 0) {\r\n\tleds.fill(color3, transparencyIndexB, (Math.ceil(ledCount/2) - 1));\r\n\tif(transparencyHexB.length == 1)\r\n    \tleds[transparencyIndexB] = '#0' + transparencyHexB + \r\n    \t    color3.substring(color3.length - 6, color3.length);\r\n\telse\r\n    \tleds[transparencyIndexB] = '#' + transparencyHexB + \r\n    \t    color3.substring(color3.length - 6, color3.length);\r\n}\r\nelse {\r\n\tleds.fill(color3, transparencyIndexB, (Math.ceil(ledCount/2) - 1));\r\n\tif(transparencyHexB.length == 1)\r\n    \tleds[transparencyIndexB] = '#0' + transparencyHexB + \r\n    \t    color3.substring(color3.length - 6, color3.length);\r\n\telse\r\n    \tleds[transparencyIndexB] = '#' + transparencyHexB + \r\n    \t    color3.substring(color3.length - 6, color3.length);\r\n}\r\noutput = leds;\r\nreturn output;",
                                        "PreExpression": "let output = new Array(rpmCount);"
                                      },
                                      "LedCount": 10,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Throttle/Brake"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Throttle/Brake"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "return ($prop(\"ATSR_Hub.\" + deviceID + \"_Data_rpmLEDs\") == 'Time Delta' && $prop('PitLimiterOn') == false) ? true : false"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "var ledCount = rpmCount;\r\n\r\nvar color = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop\r\n(\"ATSR_Hub.NightMode_SelectedColor\") : \"#999999\";\r\n\r\nvar color2 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#00FF00\";\r\n\r\nvar color3 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#FF0000\";\r\n\r\nvar deltaLive = Number($prop('DeltaToSessionBest'));\r\nif($prop(\"DataCorePlugin.CurrentGame\") == 'LMU')\r\n\tdeltaLive = $prop('DataCorePlugin.GameRawData.CurrentPlayerTelemetry.mDeltaBest')\r\nvar deltaLimit = 1.0;\r\nvar deltaPositive = 0;\r\nvar deltaNegative = 0;\r\n\r\nlet leds = new Array(ledCount);\r\n\r\nleds.fill('#000000');\r\n\r\nif(deltaLive >= 0 && Math.abs(deltaLive) < 1.0)\r\n\tdeltaPositive = Math.abs(deltaLive);\r\nelse if(deltaLive >= 1.0)\r\n\tdeltaPositive = 0.99;\r\nelse\r\n\tdeltaPositive = 0;\r\n\t\r\nif(deltaLive <= 0 && deltaLive > -1.0)\r\n\tdeltaNegative = Math.abs(deltaLive);\r\nelse if(deltaLive <= -1.0)\r\n\tdeltaNegative = 0.99;\r\nelse \r\n\tdeltaNegative = 0;\r\n\r\nvar ledSpan = Math.floor(ledCount / 2);\r\n\r\nif(ledCount % 2 == 0 && ledCount <= 10)\r\n\tledSpan = Math.floor(ledCount / 2);\r\nelse if(ledCount % 2 == 0)\r\n\tledSpan = Math.floor(ledCount / 2) - 1;\r\n\t\r\nvar stepSize = deltaLimit / ledSpan;\r\n\t\r\nvar transparencyIndexP = Math.floor(deltaPositive / stepSize);\r\nvar transparencyIndexN = Math.floor(deltaNegative / stepSize);\r\n\r\nvar transparencyP = Math.floor((deltaPositive - transparencyIndexP * stepSize) * (255 / \tstepSize));\r\nvar transparencyHexP = intToHex(Math.abs(transparencyP));\r\n\r\nvar transparencyN = Math.floor((deltaNegative - transparencyIndexN * stepSize) * (255 / \tstepSize));\r\nvar transparencyHexN = intToHex(Math.abs(transparencyN));\r\n\r\n\r\nif(ledCount % 2 == 1)\r\n\tleds[Math.floor(ledCount/2)] = color;\r\nelse if(ledCount > 10) {\r\n\tleds[Math.floor(ledCount/2) ] = color;\r\n\tleds[Math.floor(ledCount/2) - 1] = color;\r\n}\r\n// Negative\r\nif(ledCount % 2 == 0 && ledCount <= 10) {\r\n\tleds.fill(color2, (Math.floor(ledCount/2)), (Math.floor(ledCount/2)) + transparencyIndexN);\r\n    leds[(Math.floor(ledCount/2)) + transparencyIndexN] = '#' + transparencyHexN + \r\n    \tcolor2.substring(color2.length - 6, color2.length);\r\n}\r\nelse {\r\n\tleds.fill(color2, (Math.floor(ledCount/2) + 1), (Math.floor(ledCount/2) + 1) + transparencyIndexN);\r\n    leds[(Math.floor(ledCount/2) + 1) + transparencyIndexN] = '#' + transparencyHexN + \r\n    \tcolor2.substring(color2.length - 6, color2.length);\r\n}\r\n\r\n// Positive\r\n\r\nif(ledCount % 2 == 0 && ledCount <= 10) {\r\n\tleds.fill(color3, ledSpan - transparencyIndexP, ledSpan);\r\n    leds[ledSpan - 1 - transparencyIndexP] = '#' + transparencyHexP + \r\n        color3.substring(color3.length - 6, color3.length);\r\n}\r\nelse {\r\n\tleds.fill(color3, ledSpan - 1 - transparencyIndexP, ledSpan);\r\n    leds[ledSpan - 1 - transparencyIndexP] = '#' + transparencyHexP + \r\n    \tcolor3.substring(color3.length - 6, color3.length);\r\n}\r\n\r\noutput = leds;\r\nreturn output;\r\n\r\nfunction intToHex (input) {\r\n\tif(input >= 255)\r\n\t\tinput = 255;\r\n\telse if (input <= 0)\r\n\t\tinput = 0;\r\n\tvar hex = input.toString(16)\r\n\treturn (hex.length == 1) ? \"0\" + hex : hex;\r\n}",
                                        "PreExpression": "let output = new Array(rpmCount);"
                                      },
                                      "LedCount": 9,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Time Delta"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Time Delta"
                                },
                                {
                                  "LedContainers": [
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "outputBool = false;\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_enableClutchOverrideRPM\")) {\r\n\tif($prop(\"Clutch\") > 1)\r\n\t\tstartTime = Date.now();\r\n\t\t\r\n\toutputBool = (Date.now() >= startTime + 100) ? false : true;\r\n}\r\nreturn outputBool;",
                                        "PreExpression": "let outputBool = false;\r\nlet startTime = Date.now() - 100;"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "return output;",
                                            "PreExpression": "let output = new Array(rpmCount).fill(\"#000000\");"
                                          },
                                          "LedCount": 9,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Clutch Input - Background"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "var ledCount = rpmCount;\r\n\r\nvar color3 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#00A0FF\";\r\n\r\noutput.fill('#000000');\r\n\r\nvar inputLive = $prop(\"Clutch\");\r\nif(inputLive >= 100)\r\n\tinputLive = 100;\r\nif(inputLive < 0)\r\n\tinputLive = 0;\r\n\r\nvar input = inputLive * 0.0999 * ledCount;\r\nvar transparencyIndexT = Math.floor(input / 10);\r\nvar transparencyDecT = (Math.floor(25.5 * (input - Math.floor(input / 10) * 10)));\r\n\r\n// Output\r\noutput.fill(color3, 0, transparencyIndexT);\r\noutput[transparencyIndexT] = '#' + intToHex(transparencyDecT) + color3.slice(-6);\r\n\r\nreturn output;",
                                            "PreExpression": "let output = new Array(rpmCount);"
                                          },
                                          "LedCount": 9,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Clutch Input"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Clutch Override"
                                    },
                                    {
                                      "TriggerFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "outputBool = false;\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_enableBrakeOverrideRPM\") && $prop(\"SpeedKmh\") > 25) {\r\n\tif($prop(\"Brake\") > 1)\r\n\t\tstartTime = Date.now();\r\n\t\t\r\n\toutputBool = (Date.now() >= startTime + 100) ? false : true;\r\n}\r\nreturn outputBool;",
                                        "PreExpression": "let outputBool = false;\r\nlet startTime = Date.now() - 100;"
                                      },
                                      "LedContainers": [
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "return output;",
                                            "PreExpression": "let output = new Array(rpmCount).fill(\"#000000\");"
                                          },
                                          "LedCount": 9,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Brake Input - Background"
                                        },
                                        {
                                          "ContentFormula": {
                                            "JSExt": 4,
                                            "Interpreter": 1,
                                            "Expression": "var ledCount = rpmCount;\r\n\r\nvar color3 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#FF0000\";\r\n\r\noutput.fill('#000000');\r\n\r\nvar inputLive = $prop(\"Brake\");\r\nif(inputLive >= 100)\r\n\tinputLive = 100;\r\nif(inputLive < 0)\r\n\tinputLive = 0;\r\n\r\nvar blink = Math.floor((Date.now() / 100) % 2);\r\n\r\nif($prop(\"ABSActive\") == 1 && blink == 1 && $prop(\"ATSR_Hub.Func_BrakeAlert\"))\r\n\tinputLive = 0;\r\nelse if($prop(\"ATSR_Hub.Func_BrakeBlink\") && inputLive > $prop\t(\"ATSR_Hub.Func_BrakeBlink_Threshold\") && blink == 1 && $prop(\"SpeedKmh\") >= 25)\r\n\tinputLive = 0;\r\n\r\nvar input = inputLive * 0.0999 * ledCount;\r\nvar transparencyIndexT = Math.floor(input / 10);\r\nvar transparencyDecT = (Math.floor(25.5 * (input - Math.floor(input / 10) * 10)));\r\n\r\n// Output\r\noutput.fill(color3, 0, transparencyIndexT);\r\noutput[transparencyIndexT] = '#' + intToHex(transparencyDecT) + color3.slice(-6);\r\n\r\nreturn output;",
                                            "PreExpression": "let output = new Array(rpmCount);"
                                          },
                                          "LedCount": 9,
                                          "ContainerType": "ScriptedContent",
                                          "Description": "Brake Input"
                                        }
                                      ],
                                      "ContainerType": "Groups.CustomConditionalGroup",
                                      "Description": "Brake Override"
                                    }
                                  ],
                                  "ContainerType": "Base.Group",
                                  "Description": "Override Functions ( - Fuel)"
                                },
                                {
                                  "TriggerFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "if($prop(\"ATSR_Hub.\" + deviceID + \"_enableBiasRPM\")) {\r\n\tvar liveBias = $prop(\"BrakeBias\");\r\n\t\r\n\tif(liveBias != biasReference) {\r\n\t\tbiasReference = liveBias;\r\n\t\tflag = true;\r\n\t\tstartTime = Date.now();\t\t\r\n\t}\r\n\t\r\n\tif(flag && Date.now() > startTime + 3000)\r\n\t\tflag = false;\r\n}\r\nlet outputBool = false;\r\n\r\nif(($prop(\"ATSR_Hub.\" + deviceID + \"_Data_rpmLEDs\") == 'Brake Bias' && $prop('PitLimiterOn') == false) || flag)\r\n\toutputBool = true;\r\n\r\nreturn outputBool;",
                                    "PreExpression": "let flag;\r\nlet startTime;\r\nlet biasReference = $prop(\"BrakeBias\");"
                                  },
                                  "LedContainers": [
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "return output;",
                                        "PreExpression": "let output = new Array(rpmCount).fill(\"#000000\");"
                                      },
                                      "LedCount": 9,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Brake Bias - Background"
                                    },
                                    {
                                      "ContentFormula": {
                                        "JSExt": 4,
                                        "Interpreter": 1,
                                        "Expression": "var ledCount = rpmCount;\r\nlet leds = new Array(ledCount);\r\n\r\nleds.fill(null);\r\nvar biasOffset = 0;\r\nvar perLEDoffset = 0.75; \r\nvar liveBias = $prop(\"BrakeBias\");\r\nvar indexTransparent;\r\nvar transparencyHex;\r\n\r\nvar color = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#FF0000\";\r\n\r\nvar color2 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedColor\") : \"#0080FF\";\r\n\r\nif($prop(\"ATSR_Hub.resetBiasReference\") == true)\r\n\tbiasReference = liveBias;\r\n\r\nif($prop(\"DataCorePlugin.GameRunning\") == 1) {\r\n\tif($prop(\"EngineStarted\") == 1 && flag == false) {\r\n\t\tbiasReference = liveBias;\r\n\t\tflag = true;\r\n\t}\r\n\tif($prop(\"EngineIgnitionOn\") == 1 && $prop(\"Rpms\") >= 500 && flag == false) {\r\n\t\tflag = true;\r\n\t\tbiasReference = liveBias;\r\n\t}\r\n\tif($prop('DataCorePlugin.GameRunning') == 1 && $prop('EngineIgnitionOn') == 1) {\r\n\t\tif($prop(\"EngineIgnitionOn\") == 1 && flag == true) {\r\n\t\t\tif(ledCount % 2 == 1)\r\n\t\t\t\tleds[Math.floor(ledCount/2)] = color;\r\n\t\t\telse {\r\n\t\t\t\tleds[Math.floor(ledCount/2) ] = color;\r\n\t\t\t\tleds[Math.floor(ledCount/2) - 1] = color;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(liveBias >= biasReference) {\r\n\t\t\t\tif(liveBias - biasReference < (Math.ceil(ledCount/2) - 1) * perLEDoffset) {\r\n\t\t\t\t\tbiasOffset = liveBias - biasReference;\r\n\t\t\t\t\tindexTransparent = Math.floor(biasOffset/perLEDoffset);\r\n\t\t\t\t\ttransparencyDec = Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset));\r\n\t\t\t\t\t\r\n\t\t\t\t\tleds.fill(color2, (Math.floor(ledCount/2) + 1), \r\n\t\t\t\t\t\t(Math.floor(ledCount/2) + 1) + indexTransparent);\r\n\r\n\t\t\t\t\tleds[(Math.floor(ledCount/2) + 1) + indexTransparent] = \r\n\t\t\t\t\t\t'#' + intToHex(transparencyDec) + color2.slice(-6);\r\n\t\t\t\t}\r\n\t\t\t\telse if(liveBias - biasReference >= (Math.ceil(ledCount/2) - 1) * perLEDoffset)\r\n\t\t\t\t\tleds.fill(color2, (Math.floor(ledCount/2) + 1), 15);\r\n\t\t\t}\r\n\t\t\tif(liveBias < biasReference) {\r\n\t\t\t\tif(biasReference - liveBias < (Math.ceil(ledCount/2) - 1) * perLEDoffset) {\r\n\t\t\t\t\tbiasOffset = biasReference - liveBias;\r\n\t\t\t\t\tindexTransparent = Math.floor(biasOffset/perLEDoffset);\r\n\t\t\t\t\ttransparencyDec = Math.floor((biasOffset - indexTransparent * perLEDoffset) * (255 / perLEDoffset));\r\n\t\t\t\t\tif(ledCount % 2 == 1) {\r\n\t\t\t\t\t\tleds.fill(color2, (Math.ceil(ledCount/2) - 1) - indexTransparent, \t(Math.ceil(ledCount/2) - 1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tleds[(Math.floor(ledCount/2) - 1) - indexTransparent] = \r\n\t\t\t\t\t\t\t'#' + intToHex(transparencyDec) + color2.slice(-6);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(ledCount % 2 == 0) {\r\n\t\t\t\t\t\tleds.fill(color2, (Math.ceil(ledCount/2) - 2) - indexTransparent, \t(Math.ceil(ledCount/2) - 1));\r\n\r\n\t\t\t\t\t\tleds[(Math.floor(ledCount/2) - 2) - indexTransparent] = \r\n\t\t\t\t\t\t\t'#' + intToHex(transparencyDec) + color2.slice(-6);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(biasReference - liveBias >= (Math.ceil(ledCount/2) - 1) * perLEDoffset)\r\n\t\t\t\t\tleds.fill(color2, 0, (Math.ceil(ledCount/2) - 1));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\noutput = leds;\r\nreturn output;",
                                        "PreExpression": "let output = new Array(rpmCount);\r\nvar biasReference;\r\nvar flag = false;"
                                      },
                                      "LedCount": 9,
                                      "ContainerType": "ScriptedContent",
                                      "Description": "Brake Bias"
                                    }
                                  ],
                                  "ContainerType": "Groups.CustomConditionalGroup",
                                  "Description": "Brake Bias & BB Override"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "RPM Shift Lights"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 4,
                                "Interpreter": 1,
                                "Expression": "if(($prop('IsInPitLane') == true || $prop('PitLimiterOn') == true)\r\n\t&& $prop(\"ATSR_Hub.\" + deviceID + \"_enablePitspeedControl\") == true && $prop('SpeedKmh') >= 25)\r\n\treturn true;\r\nreturn false;"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "var ledCount = 10;\r\n\r\nvar color1 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#FF0000\";\r\n\r\nvar color2 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedColor\") : \"#FFFFFF\";\r\n\r\nvar midBorder = Math.floor(ledCount / 2);\r\nlet leds = new Array(ledCount);\r\n\r\nvar pitLimit = $prop(\"ATSR_Hub.Telemetry_PitspeedLimit\")\r\n\t\t\r\nvar currentSpeed = $prop('SpeedKmh');\r\nvar speedDelta = currentSpeed - pitLimit;\r\n\r\nif(currentSpeed > pitLimit) {\r\n\tif($prop('IsInPitLane') == 1) {\r\n\t\tif(ledCount % 2 == 1) {\r\n\t\t\tfor(var i = 0; i <= midBorder; i++) {\r\n\t\t\t\tif(currentSpeed > pitLimit + kmhSpacing1[i]) {\r\n\t\t\t\t\tleds[midBorder + i] = color1;\r\n\t\t\t\t\tleds[midBorder - i] = color1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tleds[midBorder + i] = color2;\r\n\t\t\t\t\tleds[midBorder - i] = color2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(ledCount % 2 == 0) {\r\n\t\t\tfor(var i = 0; i < midBorder; i++) {\r\n\t\t\t\tif(currentSpeed > pitLimit + kmhSpacing1[i]) {\r\n\t\t\t\t\tleds[midBorder + i] = color1;\r\n\t\t\t\t\tleds[midBorder - i - 1] = color1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tleds[midBorder + i] = color2;\r\n\t\t\t\t\tleds[midBorder - i - 1] = color2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\tif(ledCount % 2 == 1) {\r\n\t\t\tfor(var i = 0; i <= midBorder; i++) {\r\n\t\t\t\tif(currentSpeed > pitLimit + kmhSpacing2[i]) {\r\n\t\t\t\t\tleds[midBorder + i] = color1;\r\n\t\t\t\t\tleds[midBorder - i] = color1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tleds[midBorder + i] = color2;\r\n\t\t\t\t\tleds[midBorder - i] = color2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(ledCount % 2 == 0) {\r\n\t\t\tfor(var i = 0; i < midBorder; i++) {\r\n\t\t\t\tif(currentSpeed > pitLimit + kmhSpacing2[i]) {\r\n\t\t\t\t\tleds[midBorder + i] = color1;\r\n\t\t\t\t\tleds[midBorder - i - 1] = color1;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tleds[midBorder + i] = color2;\r\n\t\t\t\t\tleds[midBorder - i - 1] = color2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\nelse if(currentSpeed < pitLimit) {\r\n\tif($prop('IsInPitLane') == 1) {\r\n\t\tif(ledCount % 2 == 1) {\r\n\t\t\tfor(var i = 0; i <= midBorder; i++) {\r\n\t\t\t\tif(currentSpeed < pitLimit - kmhSpacing1[i] * 2) {\r\n\t\t\t\t\tleds[midBorder + i] = '#000000';\r\n\t\t\t\t\tleds[midBorder - i] = '#000000';\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tleds[midBorder + i] = color2;\r\n\t\t\t\t\tleds[midBorder - i] = color2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(ledCount % 2 == 0) {\r\n\t\t\tfor(var i = 0; i < midBorder; i++) {\r\n\t\t\t\tif(currentSpeed < pitLimit - kmhSpacing1[i] * 2) {\r\n\t\t\t\t\tleds[midBorder + i] = '#000000';\r\n\t\t\t\t\tleds[midBorder - i - 1] = '#000000';\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tleds[midBorder + i] = color2;\r\n\t\t\t\t\tleds[midBorder - i - 1] = color2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\nelse\r\n\tleds.fill(null);\r\n\r\noutput = leds;\r\nreturn output;\r\n\t",
                                    "PreExpression": "let output = new Array(10);\r\nlet kmhSpacing1 = [0.5, 1, 1.5, 2, 3, 5, 7, 10];\r\nlet kmhSpacing2 = [3, 6, 10, 15, 20, 26, 33, 40];"
                                  },
                                  "LedCount": 10,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Pitspeed-Control"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Pitspeed - Control"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 4,
                                "Interpreter": 1,
                                "Expression": "if($prop(\"ATSR_Hub.\" + deviceID + \"_enableLaunchControl\") == true && $prop('SpeedKmh') < 25 && $prop('PitLimiterOn') == false && $prop('Gear') == 1)\r\n\treturn true;\r\nreturn false;"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "var ledCount = 9;\r\nvar rpmWidth = 5;\r\n\r\nvar color1 = ($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")  == \"Plus\") ? $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\") : \"#FF0000\";\r\n\r\nlet leds = new Array(ledCount);\r\n\r\nif(ledCount % 2 == 1) \r\n\trpmWidth = 5;\r\nelse {\r\n\tif(ledCount >= 12)\r\n\t\trpmWidth = 6;\r\n\telse\r\n\t\trpmWidth = 4;\r\n}\r\n\r\nlet rpmDatasets = new Array(15 + Math.floor(rpmWidth/2));\r\n\r\nvar currentRPM = $prop('Rpms');\r\nvar targetRPM = $prop('ATSR_Hub.var_targetRPM');\r\nif($prop('SpeedKmh') <= 25)\r\n\tleds.fill('#000000');\r\nelse\r\n\tleds.fill(null);\r\n\r\nfor(var i = 0; i < ledCount + 2 * Math.floor(rpmWidth/2); i++) \r\n\trpmDatasets[i] = targetRPM + (-Math.floor(ledCount/2) + (i-1)) * rpmSpacing;\r\n\r\nfor(var i = 0; i < ledCount + 2 * Math.floor(rpmWidth/2); i++) {\t\r\n\tvar ug = i-Math.floor(rpmWidth/2);\r\n\tvar og = i-2+Math.ceil(rpmWidth/2);\r\n\t\r\n\tif(i < Math.floor(rpmWidth/2))\r\n\t\tug = 0;\r\n\tif(i > ledCount - Math.floor(rpmWidth/2))\r\n\t\tog = ledCount;\r\n\t\t\r\n\tif(currentRPM >= rpmDatasets[i] - rpmSpacing/2 \r\n\t\t&& currentRPM < rpmDatasets[i] + rpmSpacing/2)\r\n\t\tleds.fill(color1, ug, og);\r\n}\r\n\r\noutput = leds;\r\nreturn output;\r\n\t",
                                    "PreExpression": "let output = new Array(10);\r\nvar rpmSpacing = 100;"
                                  },
                                  "LedCount": 10,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Launch-Control"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Launch - Control"
                            },
                            {
                              "TriggerFormula": {
                                "JSExt": 4,
                                "Interpreter": 1,
                                "Expression": "outputBool = false;\r\nif($prop(\"ATSR_Hub.\" + deviceID + \"_enableFuelOverrideRPM\")) {\r\n\tif($prop(\"FuelPercent\") > fuelStateOld) {\r\n\t\tstartTime = Date.now();\r\n\t}\r\n\t\t\r\n\toutputBool = (Date.now() >= startTime + 1000) ? false : true;\r\n}\r\nfuelStateOld = $prop(\"FuelPercent\");\r\nreturn outputBool;",
                                "PreExpression": "let outputBool = false;\r\nlet startTime = Date.now() - 1000;\r\nlet fuelStateOld = $prop(\"FuelPercent\");"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "let color1 = \"#FFFF0000\";\r\nlet color2 = \"#FFFFFF00\";\r\nlet color3 = \"#FF00FF00\";\r\n\r\nif($prop(\"ATSR_Hub.NightMode_IsActive\") && $prop(\"ATSR_Hub.NightMode_SelectedMode\")==\"Plus\") { \r\n\tcolor1 = $prop(\"ATSR_Hub.NightMode_SelectedColor\");\r\n\tcolor2 = $prop(\"ATSR_Hub.NightMode_SelectedColor\");\r\n\tcolor3 = $prop(\"ATSR_Hub.NightMode_SelectedEffectColor\");\r\n}\r\n\r\nreturn calculateDoubleGradient(color1, color2, color3, rpmCount);\r\n"
                                  },
                                  "LedCount": 10,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Fuel Remaining - Background"
                                },
                                {
                                  "ContentFormula": {
                                    "JSExt": 4,
                                    "Interpreter": 1,
                                    "Expression": "var ledCount = rpmCount;\r\n\r\noutput.fill(\"#000000\");\r\n\r\nvar inputLive = $prop(\"FuelPercent\");\r\nif(inputLive >= 100)\r\n\tinputLive = 100;\r\nif(inputLive < 0)\r\n\tinputLive = 0;\r\n\r\nvar input = inputLive * 0.0999 * ledCount;\r\nvar transparencyIndexT = Math.floor(input / 10);\r\nvar transparencyDecT = (255 - Math.floor(25.5 * (input - Math.floor(input / 10) * 10)));\r\n\r\n// Output\r\noutput.fill(color, 0, transparencyIndexT);\r\noutput[transparencyIndexT] = '#' + intToHex(transparencyDecT) + color.slice(-6);\r\n\r\nreturn output;",
                                    "PreExpression": "let output = new Array(rpmCount);\r\nlet color = '#00000000';"
                                  },
                                  "LedCount": 10,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Fuel Override "
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Fuel Override"
                            },
                            {
                              "TriggerFormula": {
                                "Expression": "changed(3000, [ATSR_Hub.var_profileModeID])"
                              },
                              "LedContainers": [
                                {
                                  "ContentFormula": {
                                    "JSExt": 0,
                                    "Interpreter": 1,
                                    "Expression": "var rpmCount = 10;\r\n\r\nlet rpmLEDs = new Array(rpmCount).fill(null);\r\n\r\nvar profileMode = $prop(\"ATSR_Hub.var_profileModeID\");\r\n\r\nrpmLEDs.fill('#000000');\r\n\r\nif(rpmCount >= 15) {\r\n\trpmLEDs.fill(color1, Math.floor((rpmCount - 13) / 2), \r\n\t\tMath.floor((rpmCount - 13) / 2) + 13);\r\n\trpmLEDs[profileMode] = color2;\r\n}\r\nelse {\r\n\tif(profileMode <= 8) {\r\n\t\trpmLEDs.fill(color1, Math.floor((rpmCount - 7) / 2),\r\n\t\t\tMath.floor((rpmCount - 7) / 2) + 8);\r\n\t\trpmLEDs[profileMode + Math.floor((rpmCount - 7) / 2) - 1] = color2;\r\n\t}\r\n\telse {\r\n\t\trpmLEDs.fill(color1, Math.floor((rpmCount - 7) / 2) ,\r\n\t\t\tMath.floor((rpmCount - 7) / 2) + 8);\r\n\t\trpmLEDs[(profileMode - 8) + Math.floor((rpmCount - 7) / 2) - 1] = color3;\r\n\t}\r\n}\r\noutput = rpmLEDs;\r\nreturn output;\r\n",
                                    "PreExpression": "let output = new Array(10);\r\nvar color1 = '#FF00FF00';\r\nvar color2 = '#FF0000';\r\nvar color3 = '#FF0000FF';"
                                  },
                                  "LedCount": 10,
                                  "ContainerType": "ScriptedContent",
                                  "Description": "Profile Mode changed"
                                }
                              ],
                              "ContainerType": "Groups.CustomConditionalGroup",
                              "Description": "Profile Mode changed"
                            }
                          ],
                          "ContainerType": "Groups.CustomConditionalGroup",
                          "Description": "When Game Running and not Paused"
                        }
                      ],
                      "StartPosition": 11,
                      "ContainerType": "Base.Group",
                      "Description": "RPM - Leds"
                    }
                  ],
                  "ContainerType": "Base.Group",
                  "Description": "Displayed Data"
                },
                {
                  "TriggerFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "return $prop('ATSR_Hub.enableStartupSequence');"
                  },
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return ($prop(\"ATSR_Hub.Func_StartAnimation_style\") == \"Running Lights\") ?\r\n\ttrue : false;"
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "var rpmCount = 10;\r\n\r\nlet rpmLEDs = new Array(rpmCount).fill(null);\r\n\r\nvar color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 6;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\nvar sumCycles = 0;\r\n\r\nfor(var i = 1; i <= ledCount; i++)\r\n\tsumCycles += i;\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 1) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + 5000) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif($prop(\"EngineIgnitionOn\") == 0) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n\r\nrpmLEDs = calcAnimation(Math.ceil(rpmCount / 2)).concat(calcAnimation(Math.ceil(rpmCount / 2)).reverse());\r\nif(rpmCount % 2 == 1)\r\n\trpmLEDs.splice(Math.floor(rpmCount / 2), 1);\r\n\r\noutput = rpmLEDs;\r\nreturn output;\r\n\r\n\r\nfunction calcAnimation (ledCount) {\r\n\tlet leds = new Array(ledCount).fill('#00000000');\r\n\t\r\n\tvar sumCycles = 0;\r\n\tfor(var i = 1; i <= ledCount; i++)\r\n\t\tsumCycles += i;\r\n\t\t\r\n\tvar stepTime = Math.floor(2000 / sumCycles);\r\n\tvar stepCountPause = Math.floor(500 / stepTime);\r\n\tleds.fill(null);\r\n\t\r\n\r\n\tif(run == true) {\r\n\t\tvar staticIndex = Math.floor((Date.now() - timeCompare) / stepTime);\r\n\t\tif(staticIndex - 1 >= (ledCount - cycle) + helper) {\r\n\t\t\tcycle++;\r\n\t\t\thelper = staticIndex;\r\n\t\t}\r\n\t\tif(cycle <= ledCount) {\r\n\t\t\tleds.fill('#000000');\r\n\t\t\tleds[(staticIndex - helper)] = color;\r\n\t\t\tleds.fill(color, (ledCount - 1) - (cycle - 2), ledCount);\r\n\t\t}\r\n\t\telse if(cycle > ledCount && staticIndex <= sumCycles + stepCountPause)\r\n\t\t\tleds.fill(color, 0, ledCount);\r\n\t\telse if(staticIndex > sumCycles + stepCountPause && staticIndex <= sumCycles + \tstepCountPause + ledCount){\r\n\t\t\tleds.fill(color, 0, ledCount);\r\n\t\t\tleds.fill(\"#00000000\", ledCount - (staticIndex - sumCycles - stepCountPause), ledCount);\r\n\t\t}\r\n\t\telse if(staticIndex > sumCycles + stepCountPause + ledCount) {\r\n\t\t\trun = false;\r\n\t\t\tcycle = 1;\r\n\t\t\thelper = 0;\r\n\t\t}\r\n\t}\r\n\tif(run == false) {\r\n\t\tleds.fill(null);\r\n\t}\r\n\t\r\n\treturn leds;\r\n}",
                            "PreExpression": "let output = new Array(10);\r\nvar startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                          },
                          "LedCount": 10,
                          "StartPosition": 11,
                          "ContainerType": "ScriptedContent",
                          "Description": "Startup Sequence - RPM-Bar"
                        },
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 2;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\nlet output = new Array(4);\r\nvar sumCycles = 0;\r\n\r\nfor(var i = 1; i <= ledCount; i++)\r\n\tsumCycles += i;\r\n\t\r\nvar stepTime = Math.floor(2000 / sumCycles);\r\nvar stepCountPause = Math.floor(500 / stepTime);\r\nleds.fill(null);\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 1) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + 5000) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif($prop(\"EngineIgnitionOn\") == 0) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tvar staticIndex = Math.floor((Date.now() - timeCompare) / stepTime);\r\n\tif(staticIndex - 1 >= (ledCount - cycle) + helper) {\r\n\t\tcycle++;\r\n\t\thelper = staticIndex;\r\n\t}\r\n\tif(cycle <= ledCount) {\r\n\t\tleds.fill('#000000');\r\n\t\tleds[(ledCount - 1) - staticIndex + helper] = color;\r\n\t\tleds.fill(color, 0, cycle - 1);\r\n\t}\r\n\telse if(cycle > ledCount && staticIndex <= sumCycles + stepCountPause)\r\n\t\tleds.fill(color, 0, ledCount);\r\n\telse if(staticIndex > sumCycles + stepCountPause && staticIndex <= sumCycles +\tstepCountPause + ledCount){\r\n\t\tleds.fill(color, 0, ledCount);\r\n\t\tleds.fill(\"#00000000\", 0, (staticIndex - sumCycles - stepCountPause));\r\n\t}\r\n\telse if(staticIndex > sumCycles + stepCountPause + ledCount) {\r\n\t\trun = false;\r\n\t\tcycle = 1;\r\n\t\thelper = 0;\r\n\t}\r\n}\r\nif(run == false)\r\n\tleds.fill(null);\r\n\r\nfor(var i = 0; i < 2; i++) {\r\n\toutput.fill(leds[i], btnIndex[1 - i], btnIndex[1 - i] + ledCount_BTN);\r\n\toutput.fill(leds[i], btnIndex[3 - i], btnIndex[3 - i] + ledCount_BTN);\r\n}\r\nreturn output;",
                            "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                          },
                          "LedCount": 4,
                          "StartPosition": 21,
                          "ContainerType": "ScriptedContent",
                          "Description": "Startup Sequence - Side LEDs"
                        },
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 5;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\nlet output = new Array(10);\r\nvar sumCycles = 0;\r\n\r\nfor(var i = 1; i <= ledCount; i++)\r\n\tsumCycles += i;\r\n\t\r\nvar stepTime = Math.floor(2000 / sumCycles);\r\nvar stepCountPause = Math.floor(500 / stepTime);\r\nleds.fill(null);\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 1) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + 5000) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif($prop(\"EngineIgnitionOn\") == 0) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tvar staticIndex = Math.floor((Date.now() - timeCompare) / stepTime);\r\n\tif(staticIndex - 1 >= (ledCount - cycle) + helper) {\r\n\t\tcycle++;\r\n\t\thelper = staticIndex;\r\n\t}\r\n\tif(cycle <= ledCount) {\r\n\t\tleds.fill('#000000');\r\n\t\tleds[(ledCount - 1) - staticIndex + helper] = color;\r\n\t\tleds.fill(color, 0, cycle - 1);\r\n\t}\r\n\telse if(cycle > ledCount && staticIndex <= sumCycles + stepCountPause)\r\n\t\tleds.fill(color, 0, ledCount);\r\n\telse if(staticIndex > sumCycles + stepCountPause && staticIndex <= sumCycles +\tstepCountPause + ledCount){\r\n\t\tleds.fill(color, 0, ledCount);\r\n\t\tleds.fill(\"#00000000\", 0, (staticIndex - sumCycles - stepCountPause));\r\n\t}\r\n\telse if(staticIndex > sumCycles + stepCountPause + ledCount) {\r\n\t\trun = false;\r\n\t\tcycle = 1;\r\n\t\thelper = 0;\r\n\t}\r\n}\r\nif(run == false)\r\n\tleds.fill(null);\r\n\r\nfor(var i = 0; i < 5; i++) {\r\n\toutput.fill(leds[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\toutput.fill(leds[i], btnIndex[5 + i], btnIndex[5 + i] + ledCount_BTN);\r\n}\r\nreturn output;",
                            "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                          },
                          "LedCount": 10,
                          "ContainerType": "ScriptedContent",
                          "Description": "Startup Sequence - Buttons"
                        },
                        {
                          "Repetitions": 3,
                          "LedContainers": [
                            {
                              "ContentFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 7;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\nvar sumCycles = 0;\r\n\r\nfor(var i = 1; i <= ledCount; i++)\r\n\tsumCycles += i;\r\n\t\r\nvar stepTime = Math.floor(2000 / sumCycles);\r\nvar stepCountPause = Math.floor(500 / stepTime);\r\nleds.fill(null);\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 1) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + 5000) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif($prop(\"EngineIgnitionOn\") == 0) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tvar staticIndex = Math.floor((Date.now() - timeCompare) / stepTime);\r\n\tif(staticIndex - 1 >= (ledCount - cycle) + helper) {\r\n\t\tcycle++;\r\n\t\thelper = staticIndex;\r\n\t}\r\n\tif(cycle <= ledCount) {\r\n\t\tleds.fill('#000000');\r\n\t\tleds[(ledCount - 1) - staticIndex + helper] = color;\r\n\t\tleds.fill(color, 0, cycle - 1);\r\n\t}\r\n\telse if(cycle > ledCount && staticIndex <= sumCycles + stepCountPause)\r\n\t\tleds.fill(color, 0, ledCount);\r\n\telse if(staticIndex > sumCycles + stepCountPause && staticIndex <= sumCycles +\tstepCountPause + ledCount){\r\n\t\tleds.fill(color, 0, ledCount);\r\n\t\tleds.fill(\"#00000000\", 0, (staticIndex - sumCycles - stepCountPause));\r\n\t}\r\n\telse if(staticIndex > sumCycles + stepCountPause + ledCount) {\r\n\t\trun = false;\r\n\t\tcycle = 1;\r\n\t\thelper = 0;\r\n\t}\r\n}\r\nif(run == false)\r\n\tleds.fill(null);\r\n\r\nreturn leds;",
                                "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                              },
                              "LedCount": 6,
                              "ContainerType": "ScriptedContent",
                              "Description": "Startup Sequence - Encoder Right"
                            },
                            {
                              "ContentFormula": {
                                "JSExt": 0,
                                "Interpreter": 1,
                                "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 7;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\nvar sumCycles = 0;\r\n\r\nfor(var i = 1; i <= ledCount; i++)\r\n\tsumCycles += i;\r\n\t\r\nvar stepTime = Math.floor(2000 / sumCycles);\r\nvar stepCountPause = Math.floor(500 / stepTime);\r\nleds.fill(null);\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 1) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + 5000) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif($prop(\"EngineIgnitionOn\") == 0) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tvar staticIndex = Math.floor((Date.now() - timeCompare) / stepTime);\r\n\tif(staticIndex - 1 >= (ledCount - cycle) + helper) {\r\n\t\tcycle++;\r\n\t\thelper = staticIndex;\r\n\t}\r\n\tif(cycle <= ledCount) {\r\n\t\tleds.fill('#000000');\r\n\t\tleds[(staticIndex - helper)] = color;\r\n\t\tleds.fill(color, (ledCount - 1) - (cycle - 2), ledCount);\r\n\t}\r\n\telse if(cycle > ledCount && staticIndex <= sumCycles + stepCountPause)\r\n\t\tleds.fill(color, 0, ledCount);\r\n\telse if(staticIndex > sumCycles + stepCountPause && staticIndex <= sumCycles + \tstepCountPause + ledCount){\r\n\t\tleds.fill(color, 0, ledCount);\r\n\t\tleds.fill(\"#00000000\", ledCount - (staticIndex - sumCycles - stepCountPause), ledCount);\r\n\t}\r\n\telse if(staticIndex > sumCycles + stepCountPause + ledCount) {\r\n\t\trun = false;\r\n\t\tcycle = 1;\r\n\t\thelper = 0;\r\n\t}\r\n}\r\nif(run == false) {\r\n\tleds.fill(null);\r\n}\r\n\r\nreturn leds;",
                                "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                              },
                              "LedCount": 6,
                              "StartPosition": 7,
                              "ContainerType": "ScriptedContent",
                              "Description": "Startup Sequence - Encoder Left"
                            }
                          ],
                          "StartPosition": 25,
                          "ContainerType": "Groups.RepeatGroup",
                          "Description": "Startup Sequence - Encoders"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Startup Sequence - Running Lights"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return ($prop(\"ATSR_Hub.Func_StartAnimation_style\") == \"Loading Lights\") ?\r\n\ttrue : false;"
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 60;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\n\t\r\nvar stepTime = 5;\r\n\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 1) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + 5000) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif($prop(\"EngineIgnitionOn\") == 0) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tcycle = Math.floor((Date.now() - timeCompare) / stepTime);\r\n\r\n\tif(cycle <= 127) {\r\n\t\tleds.fill(\"#000000\");\r\n    }\r\n\telse if(cycle > 127 && cycle < 255) {\r\n\t\tleds.fill(null);\r\n\t}\r\n\telse if(cycle >= 255) {\r\n\t\trun = false;\r\n\t\tcycle = 1;\r\n\t\thelper = 0;\r\n\t}\r\n}\r\nif(run == false)\r\n\tleds.fill(null);\r\n\r\nreturn leds;",
                            "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                          },
                          "LedCount": 60,
                          "ContainerType": "ScriptedContent",
                          "Description": "Startup Sequence - Loading Lights Background"
                        },
                        {
                          "ContentFormula": {
                            "JSExt": 0,
                            "Interpreter": 1,
                            "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 41;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\n\t\r\nvar stepTime = 5;\r\n\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 1) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + 5000) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif($prop(\"EngineIgnitionOn\") == 0) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tcycle = Math.floor((Date.now() - timeCompare) / stepTime);\r\n\r\n\tif(cycle <= 127) {\r\n\t\tvar transparencyHex = Math.floor(2 * cycle).toString(16);\r\n\t\tif(transparencyHex.length == 1)\r\n\t        leds.fill('#0' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, ledCount);\r\n\t    else\r\n\t        leds.fill('#' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, ledCount);\r\n    }\r\n\telse if(cycle > 127 && cycle < 255) {\r\n\t\tvar transparencyHex = Math.floor(510 - 2 * cycle).toString(16);\r\n\t\tif(transparencyHex.length == 1)\r\n\t        leds.fill('#0' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, ledCount);\r\n\t    else\r\n\t        leds.fill('#' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, ledCount);\r\n\t}\r\n\telse if(cycle >= 255) {\r\n\t\trun = false;\r\n\t\tcycle = 1;\r\n\t\thelper = 0;\r\n\t}\r\n}\r\nif(run == false)\r\n\tleds.fill(null);\r\n\r\nreturn leds;",
                            "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                          },
                          "LedCount": 41,
                          "ContainerType": "ScriptedContent",
                          "Description": "Startup Sequence - Loading Lights"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Startup Sequence - Loading Lights"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup",
                  "Description": "Startup Sequence"
                }
              ],
              "ContainerType": "Base.Group",
              "Description": "Ignition ON & Engine ON"
            },
            {
              "LedContainers": [
                {
                  "TriggerFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "if($prop(\"DataCorePlugin.CurrentGame\") == 'IRacing') {\r\n\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& (!$prop(\"GameRawData.Telemetry.IsOnTrack\")))\r\n\t\treturn false;\r\n\t}\r\nif($prop(\"DataCorePlugin.CurrentGame\") == \"AssettoCorsaCompetizione\") {\r\n\t\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& ($prop(\"OrientationPitch\") == 0 || $prop(\"DataCorePlugin.GamePaused\")))\r\n\t\treturn false;\r\n}\r\nif($prop(\"DataCorePlugin.CurrentGame\") == \"LMU\") {\r\n\t\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& ($prop(\"DataCorePlugin.GamePaused\")))\r\n\t\treturn false;\r\n}\r\nif($prop('EngineIgnitionOn') == 1 && $prop('EngineStarted') == 0)\r\n\treturn true;\r\nelse \r\n\treturn false;",
                    "PreExpression": "var flag = 0;\r\nvar currentTime = 0"
                  },
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return $prop(\"ATSR_Hub.enablePLBumpStart\");"
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "output.fill(null);\r\n\r\nif($prop('IsInPitLane') == 1 && $prop('PitLimiterOn') == 0)\r\n\tstate = 1;\r\nelse if($prop(\"PitLimiterOn\") == 1)\r\n\tstate = 2;\r\nelse\r\n\tstate = 0;\r\n\r\nvar blinkInterval = $prop(\"ATSR_Hub.Func_ButtonBlinkIntervals\").split(',')[1];\r\nvar blink = Math.floor((Date.now() / blinkInterval) % 2);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nif(state == 1) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\t(data[i] == func) ? \r\n\t\t\t((blink == 1) ? \r\n\t\t\t\toutput.fill(\"#000000\", btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t\t\t: output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN)) \r\n\t\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\t\t\r\n}\r\nelse if (state == 2) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\t(data[i] == func) ? output.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN)\r\n\t\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\t\r\n}\r\n\r\nreturn output;",
                            "PreExpression": "let output = new Array(10);\r\nvar state;\r\nvar func = 'Pit Limiter';"
                          },
                          "LedCount": 10,
                          "ContainerType": "ScriptedContent",
                          "Description": "Pit Limiter"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Pit Limiter"
                    },
                    {
                      "ContentFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "output.fill(null);\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\t(data[i] == func) ? \r\n\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\t\r\n}\r\nreturn output;",
                        "PreExpression": "let output = new Array(10);\r\nvar func = 'Ignition';"
                      },
                      "LedCount": 10,
                      "ContainerType": "ScriptedContent",
                      "Description": "Ignition"
                    },
                    {
                      "ContentFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "output.fill(null);\r\n\r\nvar blink = Math.floor((Date.now() / 500) % 2)\r\n\r\nlet color = $prop(\"ATSR_Hub.\" + deviceID + \"_Color_Buttons\");\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\t(func.includes(data[i])) ? \r\n\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\t\r\n}\r\n\r\nif(blink == 1)\r\n\treturn output\r\nreturn output.fill(null)",
                        "PreExpression": "let output = new Array(10);\r\nlet func = ['Starter', 'Ignition/Starter'];"
                      },
                      "LedCount": 10,
                      "ContainerType": "ScriptedContent",
                      "Description": "Starter"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup"
                }
              ],
              "ContainerType": "Base.Group",
              "Description": "Ignition ON & Engine OFF"
            },
            {
              "LedContainers": [
                {
                  "TriggerFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "if($prop(\"DataCorePlugin.CurrentGame\") == 'IRacing') {\r\n\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& (!$prop(\"GameRawData.Telemetry.IsOnTrack\")))\r\n\t\treturn false;\r\n\t}\r\nif($prop(\"DataCorePlugin.CurrentGame\") == \"AssettoCorsaCompetizione\") {\r\n\t\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& ($prop(\"OrientationPitch\") == 0 || $prop(\"DataCorePlugin.GamePaused\")))\r\n\t\treturn false;\r\n}\r\nif($prop(\"DataCorePlugin.CurrentGame\") == \"LMU\") {\r\n\t\tif($prop(\"ATSR_Hub.enableMenuLighting\")\r\n\t\t&& ($prop(\"DataCorePlugin.GamePaused\")))\r\n\t\treturn false;\r\n}\r\nreturn !$prop('EngineIgnitionOn')"
                  },
                  "LedContainers": [
                    {
                      "ContentFormula": {
                        "JSExt": 4,
                        "Interpreter": 1,
                        "Expression": "output.fill(null);\r\n\r\nlet data = $prop(\"ATSR_Hub.\" + deviceID + \"_Data_Buttons\");\r\n\r\nfor(var i = 0; i < 10; i++) {\r\n\t(func.includes(data[i])) ? \r\n\t\toutput.fill(color, btnIndex[i], btnIndex[i] + ledCount_BTN) \r\n\t\t: output.fill(null, btnIndex[i], btnIndex[i] + ledCount_BTN);\t\r\n}\r\nreturn output;",
                        "PreExpression": "let output = new Array(10);\r\nlet func = ['Ignition', 'Ignition/Starter'];\r\nvar color = '#FFFF0000';"
                      },
                      "LedCount": 10,
                      "ContainerType": "ScriptedContent",
                      "Description": "Ignition OFF"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup"
                },
                {
                  "TriggerFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "return $prop(\"ATSR_Hub.enableShutdownSequence\");"
                  },
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return true"
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 5;\r\nlet leds = new Array(ledCount).fill('#00000000');\r\nlet output = new Array(10);\r\n\t\r\nvar stepTime = Math.floor(shutdownTime / ledCount);\r\nleds.fill(null);\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 0) {\r\n\trun = true;\r\n\tcycle = 1;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + shutdownTime) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif(engineState == 1) {\r\n\trun = false;\r\n\tcycle = 1;\r\n\thelper = 0;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tvar staticIndex = Math.ceil((Date.now() - timeCompare) / stepTime);\r\n\tleds.fill(\"#000000\", 0, staticIndex);\r\n}\r\nif(run == false)\r\n\tleds.fill(null);\r\n\r\nfor(var i = 0; i < 5; i++) {\r\n\toutput.fill(leds[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\toutput.fill(leds[i], btnIndex[9 - i], btnIndex[9 - i] + ledCount_BTN);\r\n}\r\n\r\nreturn output;",
                            "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                          },
                          "LedCount": 10,
                          "ContainerType": "ScriptedContent",
                          "Description": "Shutdown Sequence"
                        },
                        {
                          "Repetitions": 3,
                          "LedContainers": [
                            {
                              "ContentFormula": {
                                "JSExt": 4,
                                "Interpreter": 1,
                                "Expression": "var color = $prop(\"ATSR_Hub.Func_StartAnimation_color\");\r\nvar engineState = $prop(\"EngineStarted\");\r\nvar ledCount = 7;\r\nlet start = new Array(1).fill(null);\r\nlet end = new Array(1).fill(null);\r\nlet push = new Array(ledCount - 2).fill('#00000000');\r\n\r\nvar stepTime = Math.floor(shutdownTime / ledCount);\r\npush.fill(null);\r\n\r\n// Check when Engine is started\r\nif(engineState != engineCompare && engineState == 0) {\r\n\trun = true;\r\n\tengineCompare = engineState;\r\n\ttimeCompare = Date.now();\r\n}\r\nif(Date.now() >= timeCompare + shutdownTime) {\r\n\trun = false;\r\n}\r\nengineCompare = engineState;\r\n\r\nif(engineState == 1) {\r\n\trun = false;\r\n}\r\n// Animation\r\nif(run == true) {\r\n\tvar staticIndex = Math.ceil((Date.now() - timeCompare) / stepTime);\r\n\tif(staticIndex == 0)\r\n\t\tstart[0] = \"#000000\";\r\n\telse if(staticIndex > 0 && staticIndex < 6) {\r\n\t\tstart[0] = \"#000000\";\r\n\t\tpush.fill(\"#000000\", 0, staticIndex);\r\n\t}\r\n\telse {\r\n\t\tstart[0] = \"#000000\";\r\n\t\tpush.fill(\"#000000\", 0, 5)\r\n\t\tend[0] = \"#000000\";\r\n\t}\r\n}\r\nif(run == false) {\r\n\tstart[0] = null;\r\n\tpush.fill(null);\r\n\tend[0] = null;\r\n}\r\n\r\nreturn start.concat(push).concat(end).concat(push.slice().reverse());",
                                "PreExpression": "var startTime = Date.now(),\r\n\tcycle = 0,\r\n\thelper = 0,\r\n\tengineCompare = 0,\r\n\ttimeCompare = 0,\r\n\trun = false;\r\n"
                              },
                              "LedCount": 12,
                              "ContainerType": "ScriptedContent",
                              "Description": "Shutdown Sequence"
                            }
                          ],
                          "StartPosition": 25,
                          "ContainerType": "Groups.RepeatGroup"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Shutdown Sequence"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup",
                  "Description": "Shutdown Sequence"
                }
              ],
              "ContainerType": "Base.Group",
              "Description": "Ignition OFF"
            }
          ],
          "ContainerType": "Groups.CustomConditionalGroup",
          "Description": "Data - When game is Running"
        },
        {
          "TriggerFormula": {
            "JSExt": 4,
            "Interpreter": 1,
            "Expression": "if(!$prop('DataCorePlugin.GameRunning') == true && \r\n$prop(\"ATSR_Hub.deviceactive_\" + deviceID) == true)\r\n\treturn true\r\nreturn false"
          },
          "LedContainers": [
            {
              "TriggerFormula": {
                "Expression": "changed(3000, [ATSR_Hub.var_profileModeID])"
              },
              "LedContainers": [
                {
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 1)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#8A2BE2;0,1,#964BDB;0,2,#9277F1;0,3,#9D94F2;0,4,#ADAEF0;0,5,#8A2BE2;0,6,#964BDB;0,7,#9277F1;0,24,#8A2BE2;0,25,#8A2BE2;0,26,#964BDB;0,27,#9277F1;0,28,#9D94F2;0,29,#ADAEF0;0,30,#ADAEF0;0,31,#ADAEF0;0,32,#9D94F2;0,33,#9277F1;0,34,#964BDB;0,35,#8A2BE2;0,36,#8A2BE2;0,37,#8A2BE2;0,38,#964BDB;0,39,#9277F1;0,40,#9D94F2;0,8,#9D94F2;0,9,#ADAEF0;0,41,#ADAEF0;0,42,#ADAEF0;0,43,#ADAEF0;0,44,#9D94F2;0,45,#9277F1;0,46,#964BDB;0,47,#8A2BE2;0,48,#ADAEF0;0,49,#ADAEF0;0,50,#ADAEF0;0,51,#ADAEF0;0,52,#ADAEF0;0,53,#ADAEF0;0,54,#ADAEF0;0,55,#ADAEF0;0,56,#ADAEF0;0,57,#ADAEF0;0,58,#ADAEF0;0,59,#ADAEF0",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "150, 75, 219"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 1 - ATSR Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 2)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#3C2576;0,1,#37389F;0,2,#008BAC;0,3,#00BAB3;0,4,#02ED8F;0,5,#3C2576;0,6,#37389F;0,7,#008BAC;0,24,#37389F;0,25,#37389F;0,26,#37389F;0,27,#008BAC;0,28,#00BAB3;0,29,#02ED8F;0,30,#02ED8F;0,31,#02ED8F;0,32,#00BAB3;0,33,#008BAC;0,34,#37389F;0,35,#37389F;0,36,#37389F;0,37,#37389F;0,38,#37389F;0,39,#008BAC;0,40,#00BAB3;0,8,#00BAB3;0,9,#02ED8F;0,41,#02ED8F;0,42,#02ED8F;0,43,#02ED8F;0,44,#00BAB3;0,45,#008BAC;0,46,#37389F;0,47,#37389F;0,48,#02ED8F;0,49,#02ED8F;0,50,#02ED8F;0,51,#02ED8F;0,52,#02ED8F;0,53,#02ED8F;0,54,#02ED8F;0,55,#02ED8F;0,56,#02ED8F;0,57,#02ED8F;0,58,#02ED8F;0,59,#02ED8F",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "55, 56, 159"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 2 - Aurora Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 3)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFFFFF;0,1,#FFFFFF;0,2,#FF71B6;0,3,#FF71B6;0,4,#63EDFF;0,5,#FFFFFF;0,6,#FFFFFF;0,7,#FF71B6;0,24,#FF71B6;0,25,#FF71B6;0,26,#DF95F8;0,27,#A8BCFF;0,28,#7ED7FF;0,29,#63EDFF;0,30,#63EDFF;0,31,#63EDFF;0,32,#7ED7FF;0,33,#A8BCFF;0,34,#DF95F8;0,35,#FF71B6;0,36,#FF71B6;0,37,#FF71B6;0,38,#DF95F8;0,39,#A8BCFF;0,40,#7ED7FF;0,8,#FF71B6;0,9,#63EDFF;0,41,#63EDFF;0,42,#63EDFF;0,43,#63EDFF;0,44,#7ED7FF;0,45,#A8BCFF;0,46,#DF95F8;0,47,#FF71B6;0,48,#63EDFF;0,49,#63EDFF;0,50,#63EDFF;0,51,#63EDFF;0,52,#63EDFF;0,53,#63EDFF;0,54,#63EDFF;0,55,#63EDFF;0,56,#63EDFF;0,57,#63EDFF;0,58,#63EDFF;0,59,#63EDFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "223, 149, 248"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 3 - Cotton Candy"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 4)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFA500;0,1,#FF873D;0,2,#FF6B5D;0,3,#FF4373;0,4,#FF0090;0,5,#FFA500;0,6,#FF873D;0,7,#FF6B5D;0,24,#FFA500;0,25,#FFA500;0,26,#FF873D;0,27,#FF6B5D;0,28,#FF4373;0,29,#FF0090;0,30,#FF0090;0,31,#FF0090;0,32,#FF4373;0,33,#FF6B5D;0,34,#FF873D;0,35,#FFA500;0,36,#FFA500;0,37,#FFA500;0,38,#FF873D;0,39,#FF6B5D;0,40,#FF4373;0,8,#FF4373;0,9,#FF0090;0,41,#FF0090;0,42,#FF0090;0,43,#FF0090;0,44,#FF4373;0,45,#FF6B5D;0,46,#FF873D;0,47,#FFA500;0,48,#FF0090;0,49,#FF0090;0,50,#FF0090;0,51,#FF0090;0,52,#FF0090;0,53,#FF0090;0,54,#FF0090;0,55,#FF0090;0,56,#FF0090;0,57,#FF0090;0,58,#FF0090;0,59,#FF0090",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "255, 135, 61"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 4 - Magenta Dawn"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 5)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FF0000;0,1,Red;0,2,White;0,3,White;0,4,#FF0000;0,5,Red;0,6,Red;0,7,White;0,24,White;0,25,White;0,26,White;0,27,#FF0000;0,28,#FF0000;0,29,#FF0000;0,30,#FF0000;0,31,#FF0000;0,32,#FF0000;0,33,#FF0000;0,34,White;0,35,White;0,36,White;0,37,White;0,38,White;0,39,#FF0000;0,40,#FF0000;0,8,White;0,9,Red;0,41,#FF0000;0,42,#FF0000;0,43,#FF0000;0,44,#FF0000;0,45,#FF0000;0,46,White;0,47,White;0,48,#FF0000;0,49,#FF0000;0,50,#FF0000;0,51,#FF0000;0,52,#FF0000;0,53,#FF0000;0,54,#FF0000;0,55,#FF0000;0,56,#FF0000;0,57,#FF0000;0,58,#FF0000;0,59,#FF0000",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 5 - Red White Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 6)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#00FF00;0,1,#00FF00;0,2,#00FF00;0,3,#00FF00;0,4,Lime;0,5,Red;0,6,Red;0,7,Red;0,24,#FFFFFF;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#FFFFFF;0,28,#FFFFFF;0,29,#FFFFFF;0,30,#FFFFFF;0,31,#00FF00;0,32,#00FF00;0,33,#00FF00;0,34,#00FF00;0,35,#00FF00;0,36,#FFFFFF;0,37,Red;0,38,Red;0,39,Red;0,40,Red;0,8,Red;0,9,Red;0,41,Red;0,42,Red;0,43,#FFFFFF;0,44,#FFFFFF;0,45,#FFFFFF;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#FFFFFF;0,51,#FFFFFF;0,52,#FFFFFF;0,53,#FFFFFF;0,54,#FFFFFF;0,55,#FFFFFF;0,56,#FFFFFF;0,57,#FFFFFF;0,58,#FFFFFF;0,59,#FFFFFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 6 - Tricolore Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 7)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFFFFF;0,1,#FFFFFF;0,2,#16588E;0,3,#16588E;0,4,#FF0027;0,5,#FFFFFF;0,6,#FFFFFF;0,7,#16588E;0,24,#FFFFFF;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#16588E;0,28,#16588E;0,29,#FF0027;0,30,#FF0027;0,31,#FF0027;0,32,#FF0027;0,33,#FF0027;0,34,#16588E;0,35,#16588E;0,36,#FFFFFF;0,37,#16588E;0,38,#16588E;0,39,#FF0027;0,40,#FF0027;0,8,#16588E;0,9,#FF0027;0,41,#FF0027;0,42,#FF0027;0,43,#FF0027;0,44,#16588E;0,45,#16588E;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#FFFFFF;0,51,#FF0027;0,52,#FF0027;0,53,#FF0027;0,54,#FF0027;0,55,#FF0027;0,56,#FF0027;0,57,#FF0027;0,58,#FFFFFF;0,59,#FFFFFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 7 - BMW M"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 8)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#0094D8;0,1,#0094D8;0,2,#FFDC00;0,3,#0094D8;0,4,#FFDC00;0,5,#0094D8;0,6,#0094D8;0,7,#FFDC00;0,24,#0094D8;0,25,#0094D8;0,26,#FFDC00;0,27,#FFDC00;0,28,#FFDC00;0,29,#0094D8;0,30,#0094D8;0,31,#0094D8;0,32,#FFDC00;0,33,#FFDC00;0,34,#FFDC00;0,35,#0094D8;0,36,#0094D8;0,37,#0094D8;0,38,#FFDC00;0,39,#FFDC00;0,40,#FFDC00;0,8,#0094D8;0,9,#FFDC00;0,41,#0094D8;0,42,#0094D8;0,43,#0094D8;0,44,#FFDC00;0,45,#FFDC00;0,46,#FFDC00;0,47,#0094D8;0,48,#0094D8;0,49,#0094D8;0,50,#FFDC00;0,51,#FFDC00;0,52,#FFDC00;0,53,#0094D8;0,54,#0094D8;0,55,#0094D8;0,56,#FFDC00;0,57,#FFDC00;0,58,#FFDC00;0,59,#0094D8",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "0, 148, 216"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 8 - Bilstein Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 9)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFFF00;0,1,#C0E100;0,2,#86C100;0,3,#4EA100;0,4,#008000;0,5,#FFFF00;0,6,#C0E100;0,7,#86C100;0,24,#FFFF00;0,25,#FFFF00;0,26,#C0E100;0,27,#86C100;0,28,#4EA100;0,29,#008000;0,30,#008000;0,31,#008000;0,32,#4EA100;0,33,#86C100;0,34,#C0E100;0,35,#FFFF00;0,36,#FFFF00;0,37,#FFFF00;0,38,#C0E100;0,39,#86C100;0,40,#4EA100;0,8,#4EA100;0,9,#008000;0,41,#008000;0,42,#008000;0,43,#008000;0,44,#4EA100;0,45,#86C100;0,46,#C0E100;0,47,#FFFF00;0,48,#4EA100;0,49,#4EA100;0,50,#008000;0,51,#008000;0,52,#008000;0,53,#008000;0,54,#008000;0,55,#008000;0,56,#008000;0,57,#008000;0,58,#008000;0,59,#4EA100",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "78, 161, 0"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 9 - Manthey Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 10)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#A6051A;0,1,#A6051A;0,2,#FFEB00;0,3,#FFEB00;0,4,#A6051A;0,5,#A6051A;0,6,#A6051A;0,7,#FFEB00;0,24,#A6051A;0,25,#A6051A;0,26,#FFEB00;0,27,#FFFFFF;0,28,#FFEB00;0,29,#A6051A;0,30,#A6051A;0,31,#A6051A;0,32,#FFEB00;0,33,#FFFFFF;0,34,#FFEB00;0,35,#A6051A;0,36,#A6051A;0,37,#A6051A;0,38,#FFEB00;0,39,#FFFFFF;0,40,#FFEB00;0,8,#FFEB00;0,9,#A6051A;0,41,#A6051A;0,42,#A6051A;0,43,#A6051A;0,44,#FFEB00;0,45,#FFFFFF;0,46,#FFEB00;0,47,#A6051A;0,48,#A6051A;0,49,#A6051A;0,50,#FFEB00;0,51,#FFFFFF;0,52,#FFEB00;0,53,#A6051A;0,54,#A6051A;0,55,#A6051A;0,56,#FFEB00;0,57,#FFFFFF;0,58,#FFEB00;0,59,#A6051A",
                                "FrameDuration": 100
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 10 - Scuderia"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 11)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#121F9E;0,1,#223971;0,2,#445291;0,3,#FFC906;0,4,#FF004A;0,5,#121F9E;0,6,#223971;0,7,#445291;0,24,#FFC906;0,25,#FFC906;0,26,#FF990E;0,27,#FF622F;0,28,#FF004A;0,29,#FF004A;0,30,#FF004A;0,31,#FF004A;0,32,#FF004A;0,33,#FF622F;0,34,#FF990E;0,35,#FFC906;0,36,#FFC906;0,37,#FFC906;0,38,#FF990E;0,39,#FF622F;0,40,#FF004A;0,8,#FFC906;0,9,#FF004A;0,41,#FF004A;0,42,#FF004A;0,43,#FF004A;0,44,#FF004A;0,45,#FF622F;0,46,#FF990E;0,47,#FFC906;0,48,#FF004A;0,49,#FF004A;0,50,#FF004A;0,51,#FF004A;0,52,#FF004A;0,53,#FF004A;0,54,#FF004A;0,55,#FF004A;0,56,#FF004A;0,57,#FF004A;0,58,#FF004A;0,59,#FF004A",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "255, 153, 14"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 11 - Red B Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 12)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#C6C6C6;0,1,#85BBB9;0,2,#42AFAC;0,3,#00A39E;0,4,#80142B;0,5,#C6C6C6;0,6,#85BBB9;0,7,#42AFAC;0,24,#00A39E;0,25,#00A39E;0,26,#2B7378;0,27,#554451;0,28,#80142B;0,29,#80142B;0,30,#80142B;0,31,#80142B;0,32,#80142B;0,33,#554451;0,34,#2B7378;0,35,#00A39E;0,36,#00A39E;0,37,#00A39E;0,38,#2B7378;0,39,#554451;0,40,#80142B;0,8,#00A39E;0,9,#80142B;0,41,#80142B;0,42,#80142B;0,43,#80142B;0,44,#80142B;0,45,#554451;0,46,#2B7378;0,47,#00A39E;0,48,#80142B;0,49,#80142B;0,50,#80142B;0,51,#80142B;0,52,#80142B;0,53,#80142B;0,54,#80142B;0,55,#80142B;0,56,#80142B;0,57,#80142B;0,58,#80142B;0,59,#80142B",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "43, 115, 120"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 12 - Merc Petronas"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 13)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FF6600;0,1,#FF6600;0,2,#47C7FC;0,3,#47C7FC;0,4,#FF6600;0,5,#FF6600;0,6,#FF6600;0,7,#47C7FC;0,24,#47C7FC;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#FFFFFF;0,28,#47C7FC;0,29,#47C7FC;0,30,#FF6600;0,31,#FF6600;0,32,#FF6600;0,33,#FF6600;0,34,#FF6600;0,35,#47C7FC;0,36,#47C7FC;0,37,#47C7FC;0,38,#FF6600;0,39,#FF6600;0,40,#FF6600;0,8,#47C7FC;0,9,#FF6600;0,41,#FF6600;0,42,#FF6600;0,43,#47C7FC;0,44,#47C7FC;0,45,#FFFFFF;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#47C7FC;0,51,#47C7FC;0,52,#FF6600;0,53,#FF6600;0,54,#FF6600;0,55,#FF6600;0,56,#FF6600;0,57,#47C7FC;0,58,#47C7FC;0,59,#FFFFFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 13 - MCL Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 14)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#00642D;0,1,#CEDC00;0,2,#00642D;0,3,#00642D;0,4,#CEDC00;0,5,#00642D;0,6,#CEDC00;0,7,#00642D;0,24,#00642D;0,25,#00642D;0,26,#338323;0,27,#67A117;0,28,#9ABE0C;0,29,#CEDC00;0,30,#CEDC00;0,31,#CEDC00;0,32,#9ABE0C;0,33,#67A117;0,34,#338323;0,35,#00642D;0,36,#00642D;0,37,#00642D;0,38,#338323;0,39,#67A117;0,40,#9ABE0C;0,8,#00642D;0,9,#CEDC00;0,41,#CEDC00;0,42,#CEDC00;0,43,#CEDC00;0,44,#9ABE0C;0,45,#67A117;0,46,#338323;0,47,#00642D;0,48,#CEDC00;0,49,#CEDC00;0,50,#9ABE0C;0,51,#67A117;0,52,#338323;0,53,#00642D;0,54,#00642D;0,55,#00642D;0,56,#338323;0,57,#67A117;0,58,#9ABE0C;0,59,#CEDC00",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "154, 190, 12"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 14 - AMR Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 15)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "let color = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Inputs\");\r\nlet color_Telemetry = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Telemetry\");\r\n\r\nif(counter === 0) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\toutput.fill(color_Telemetry[4 + i], 10 + i, 10 + i + 1);\r\n\t}\r\n\tfor(var i = 0; i < 4; i++) {\r\n\t\toutput.fill(color_Telemetry[i], 20 + i, 20 + i + 1);\r\n\t}\r\n}\r\ncounter = (counter == 10) ? 0 : counter++;\r\nreturn output;",
                            "PreExpression": "let output = new Array(41);\r\nlet counter = 0;"
                          },
                          "LedCount": 60,
                          "ContainerType": "ScriptedContent",
                          "Description": "Light Mode 15 - Custom Mode"
                        },
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "let color1 = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Inputs\")\r\n\r\nlet output = new Array();\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tswitch($prop('ATSR_Hub.' + deviceID + '_CustomTheme_ENCPattern')[i]) {\r\n\t\tcase 1: {\r\n\t\t\tleds.fill(color1[10 + i]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 2: {\r\n\t\t\tfor(var j = 0; j < 6; j++) {\r\n\t\t\t\tleds[2 * j] = color1[10 + i];\r\n\t\t\t\tleds[2 * j + 1] = color1[13 + i];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 3: {\r\n\t\t\tleds = gradient(color1[10 + i], color1[13 + i]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\toutput = output.concat(leds);\r\n}\r\nreturn output;\r\n\r\nfunction gradient(startColor, endColor) {\r\n\tlet pattern = new Array(12);\r\n\t\r\n\tvar Red1 = 0;\r\n\tvar Green1 = 0;\r\n\tvar Blue1 = 0;\r\n\t\r\n\tvar Red2 = 0;\r\n\tvar Green2 = 0;\r\n\tvar Blue2 = 0\r\n\t\r\n\t// RGB-Conversion - startColor\r\n\tif(startColor.length == 7) {\r\n\t\tRed1 = parseInt(startColor.substring(1, 3), 16);\r\n\t\tGreen1 = parseInt(startColor.substring(3, 5), 16);\r\n\t\tBlue1 = parseInt(startColor.substring(5, 7), 16);\r\n\t}\r\n\telse if(startColor.length == 9) {\r\n\t\tRed1 = parseInt(startColor.substring(3, 5), 16);\r\n\t\tGreen1 = parseInt(startColor.substring(5, 7), 16);\r\n\t\tBlue1 = parseInt(startColor.substring(7, 9), 16);\r\n\t}\r\n\t// RGB-Conversion - endColor\r\n\tif(endColor.length == 7) {\r\n\t\tRed2 = parseInt(endColor.substring(1, 3), 16);\r\n\t\tGreen2 = parseInt(endColor.substring(3, 5), 16);\r\n\t\tBlue2 = parseInt(endColor.substring(5, 7), 16);\r\n\t}\r\n\telse if(endColor.length == 9) {\r\n\t\tRed2 = parseInt(endColor.substring(3, 5), 16);\r\n\t\tGreen2 = parseInt(endColor.substring(5, 7), 16);\r\n\t\tBlue2 = parseInt(endColor.substring(7, 9), 16);\r\n\t}\r\n\tvar RedDelta = Red2 - Red1;\r\n\tvar GreenDelta = Green2 - Green1;\r\n\tvar BlueDelta = Blue2 - Blue1;\r\n\t\r\n\tfor(var i = 0; i < 7; i++) {\r\n\t\tvar RedOutput = Math.floor(Math.abs(Red1 + (i * RedDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(RedOutput.length == 1) ? RedOutput = '0' + RedOutput : RedOutput = RedOutput;\r\n\t\tvar GreenOutput = Math.floor(Math.abs(Green1 + (i * GreenDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(GreenOutput.length == 1) ? GreenOutput = '0' + GreenOutput : GreenOutput = GreenOutput;\r\n\t\tvar BlueOutput = Math.floor(Math.abs(Blue1 + (i * BlueDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(BlueOutput.length == 1) ? BlueOutput = '0' + BlueOutput : BlueOutput = BlueOutput;\r\n\t\t\r\n\t\tpattern[i] = '#' + RedOutput + GreenOutput + BlueOutput;\r\n\t\tif(i != 0)\r\n\t\t\tpattern[12 - i] = '#' + RedOutput + GreenOutput + BlueOutput;\r\n\t}\r\n\treturn pattern;\r\n}",
                            "PreExpression": "let leds = new Array(12);"
                          },
                          "LedCount": 36,
                          "StartPosition": 25,
                          "ContainerType": "ScriptedContent",
                          "Description": "Light Mode 15 - Encoders"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 15 - Custom Mode"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 16)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#00FF00;0,1,#FFFF00;0,2,#00BFFF;0,3,#FF0000;0,4,#FFFF00;0,5,#00BFFF;0,6,#FF0000;0,7,#00FF00;0,24,#00BFFF;0,25,#00BFFF;0,26,#00BFFF;0,27,#00BFFF;0,28,#00BFFF;0,29,#00BFFF;0,30,#00BFFF;0,31,#00BFFF;0,32,#00BFFF;0,33,#00BFFF;0,34,#00BFFF;0,35,#00BFFF;0,36,#00FF00;0,37,#00FF00;0,38,#00FF00;0,39,#00FF00;0,40,#00FF00;0,8,#FFFF00;0,9,#FF0000;0,41,#00FF00;0,42,#00FF00;0,43,#00FF00;0,44,#00FF00;0,45,#00FF00;0,46,#00FF00;0,47,#00FF00;0,48,#FF0000;0,49,#FF0000;0,50,#FF0000;0,51,#FF0000;0,52,#FF0000;0,53,#FF0000;0,54,#FF0000;0,55,#FF0000;0,56,#FF0000;0,57,#FF0000;0,58,#FF0000;0,59,#FF0000",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "Yellow"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 16 - Lovely Dashboard"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return ($prop(\"ATSR_Hub.NightMode_IsActive\") \r\n\t&& $prop(\"ATSR_Hub.NightMode_SelectedMode\") != \"Dim\") "
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "output.fill($prop(\"ATSR_Hub.NightMode_SelectedColor\"), 0, 10);\r\noutput.fill($prop(\"ATSR_Hub.NightMode_SelectedColor\"), 24, 60);\r\n\r\nreturn output;",
                            "PreExpression": "let output = new Array(60);"
                          },
                          "LedCount": 60,
                          "ContainerType": "ScriptedContent",
                          "Description": "Night Mode"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Night Mode"
                    }
                  ],
                  "ContainerType": "Base.Group",
                  "Description": "Background"
                },
                {
                  "TriggerFormula": {
                    "Expression": "changed(3000, [ATSR_Hub.var_profileModeID])"
                  },
                  "LedContainers": [
                    {
                      "ContentFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "var rpmCount = 10;\r\n\r\nlet rpmLEDs = new Array(rpmCount).fill(null);\r\n\r\nvar profileMode = $prop(\"ATSR_Hub.var_profileModeID\");\r\n\r\nrpmLEDs.fill('#000000');\r\n\r\nif(rpmCount >= 15) {\r\n\trpmLEDs.fill(color1, Math.floor((rpmCount - 13) / 2), \r\n\t\tMath.floor((rpmCount - 13) / 2) + 13);\r\n\trpmLEDs[profileMode] = color2;\r\n}\r\nelse {\r\n\tif(profileMode <= 8) {\r\n\t\trpmLEDs.fill(color1, Math.floor((rpmCount - 7) / 2),\r\n\t\t\tMath.floor((rpmCount - 7) / 2) + 8);\r\n\t\trpmLEDs[profileMode + Math.floor((rpmCount - 7) / 2) - 1] = color2;\r\n\t}\r\n\telse {\r\n\t\trpmLEDs.fill(color1, Math.floor((rpmCount - 7) / 2) ,\r\n\t\t\tMath.floor((rpmCount - 7) / 2) + 8);\r\n\t\trpmLEDs[(profileMode - 8) + Math.floor((rpmCount - 7) / 2) - 1] = color3;\r\n\t}\r\n}\r\noutput = rpmLEDs;\r\nreturn output;\r\n",
                        "PreExpression": "let output = new Array(10);\r\nvar color1 = '#FF00FF00';\r\nvar color2 = '#FF0000';\r\nvar color3 = '#FF0000FF';"
                      },
                      "LedCount": 10,
                      "StartPosition": 11,
                      "ContainerType": "ScriptedContent",
                      "Description": "Profile Mode changed"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup",
                  "Description": "Profile Mode changed"
                }
              ],
              "ContainerType": "Groups.CustomConditionalGroup",
              "Description": "Active for 3 Seconds"
            }
          ],
          "ContainerType": "Groups.CustomConditionalGroup",
          "Description": "When game is not Running & Profile Mode changed"
        },
        {
          "TriggerFormula": {
            "JSExt": 4,
            "Interpreter": 1,
            "Expression": "if($prop('DataCorePlugin.GameRunning') == false && \r\n$prop('ATSR_Hub.enableIdleAnimation') == true && \r\n$prop(\"ATSR_Hub.deviceactive_\" + deviceID) == true)\r\n\treturn true\r\nreturn false"
          },
          "LedContainers": [
            {
              "TriggerFormula": {
                "Expression": "!changed(3000, [ATSR_Hub.var_profileModeID])"
              },
              "LedContainers": [
                {
                  "LedContainers": [
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 1)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#8A2BE2;0,1,#964BDB;0,2,#9277F1;0,3,#9D94F2;0,4,#ADAEF0;0,5,#8A2BE2;0,6,#964BDB;0,7,#9277F1;0,24,#8A2BE2;0,25,#8A2BE2;0,26,#964BDB;0,27,#9277F1;0,28,#9D94F2;0,29,#ADAEF0;0,30,#ADAEF0;0,31,#ADAEF0;0,32,#9D94F2;0,33,#9277F1;0,34,#964BDB;0,35,#8A2BE2;0,36,#8A2BE2;0,37,#8A2BE2;0,38,#964BDB;0,39,#9277F1;0,40,#9D94F2;0,8,#9D94F2;0,9,#ADAEF0;0,41,#ADAEF0;0,42,#ADAEF0;0,43,#ADAEF0;0,44,#9D94F2;0,45,#9277F1;0,46,#964BDB;0,47,#8A2BE2;0,48,#ADAEF0;0,49,#ADAEF0;0,50,#ADAEF0;0,51,#ADAEF0;0,52,#ADAEF0;0,53,#ADAEF0;0,54,#ADAEF0;0,55,#ADAEF0;0,56,#ADAEF0;0,57,#ADAEF0;0,58,#ADAEF0;0,59,#ADAEF0",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "150, 75, 219"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 1 - ATSR Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 2)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#3C2576;0,1,#37389F;0,2,#008BAC;0,3,#00BAB3;0,4,#02ED8F;0,5,#3C2576;0,6,#37389F;0,7,#008BAC;0,24,#37389F;0,25,#37389F;0,26,#37389F;0,27,#008BAC;0,28,#00BAB3;0,29,#02ED8F;0,30,#02ED8F;0,31,#02ED8F;0,32,#00BAB3;0,33,#008BAC;0,34,#37389F;0,35,#37389F;0,36,#37389F;0,37,#37389F;0,38,#37389F;0,39,#008BAC;0,40,#00BAB3;0,8,#00BAB3;0,9,#02ED8F;0,41,#02ED8F;0,42,#02ED8F;0,43,#02ED8F;0,44,#00BAB3;0,45,#008BAC;0,46,#37389F;0,47,#37389F;0,48,#02ED8F;0,49,#02ED8F;0,50,#02ED8F;0,51,#02ED8F;0,52,#02ED8F;0,53,#02ED8F;0,54,#02ED8F;0,55,#02ED8F;0,56,#02ED8F;0,57,#02ED8F;0,58,#02ED8F;0,59,#02ED8F",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "55, 56, 159"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 2 - Aurora Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 3)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFFFFF;0,1,#FFFFFF;0,2,#FF71B6;0,3,#FF71B6;0,4,#63EDFF;0,5,#FFFFFF;0,6,#FFFFFF;0,7,#FF71B6;0,24,#FF71B6;0,25,#FF71B6;0,26,#DF95F8;0,27,#A8BCFF;0,28,#7ED7FF;0,29,#63EDFF;0,30,#63EDFF;0,31,#63EDFF;0,32,#7ED7FF;0,33,#A8BCFF;0,34,#DF95F8;0,35,#FF71B6;0,36,#FF71B6;0,37,#FF71B6;0,38,#DF95F8;0,39,#A8BCFF;0,40,#7ED7FF;0,8,#FF71B6;0,9,#63EDFF;0,41,#63EDFF;0,42,#63EDFF;0,43,#63EDFF;0,44,#7ED7FF;0,45,#A8BCFF;0,46,#DF95F8;0,47,#FF71B6;0,48,#63EDFF;0,49,#63EDFF;0,50,#63EDFF;0,51,#63EDFF;0,52,#63EDFF;0,53,#63EDFF;0,54,#63EDFF;0,55,#63EDFF;0,56,#63EDFF;0,57,#63EDFF;0,58,#63EDFF;0,59,#63EDFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "223, 149, 248"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 3 - Cotton Candy"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 4)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFA500;0,1,#FF873D;0,2,#FF6B5D;0,3,#FF4373;0,4,#FF0090;0,5,#FFA500;0,6,#FF873D;0,7,#FF6B5D;0,24,#FFA500;0,25,#FFA500;0,26,#FF873D;0,27,#FF6B5D;0,28,#FF4373;0,29,#FF0090;0,30,#FF0090;0,31,#FF0090;0,32,#FF4373;0,33,#FF6B5D;0,34,#FF873D;0,35,#FFA500;0,36,#FFA500;0,37,#FFA500;0,38,#FF873D;0,39,#FF6B5D;0,40,#FF4373;0,8,#FF4373;0,9,#FF0090;0,41,#FF0090;0,42,#FF0090;0,43,#FF0090;0,44,#FF4373;0,45,#FF6B5D;0,46,#FF873D;0,47,#FFA500;0,48,#FF0090;0,49,#FF0090;0,50,#FF0090;0,51,#FF0090;0,52,#FF0090;0,53,#FF0090;0,54,#FF0090;0,55,#FF0090;0,56,#FF0090;0,57,#FF0090;0,58,#FF0090;0,59,#FF0090",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "255, 135, 61"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 4 - Magenta Dawn"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 5)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FF0000;0,1,Red;0,2,White;0,3,White;0,4,#FF0000;0,5,Red;0,6,Red;0,7,White;0,24,White;0,25,White;0,26,White;0,27,#FF0000;0,28,#FF0000;0,29,#FF0000;0,30,#FF0000;0,31,#FF0000;0,32,#FF0000;0,33,#FF0000;0,34,White;0,35,White;0,36,White;0,37,White;0,38,White;0,39,#FF0000;0,40,#FF0000;0,8,White;0,9,Red;0,41,#FF0000;0,42,#FF0000;0,43,#FF0000;0,44,#FF0000;0,45,#FF0000;0,46,White;0,47,White;0,48,#FF0000;0,49,#FF0000;0,50,#FF0000;0,51,#FF0000;0,52,#FF0000;0,53,#FF0000;0,54,#FF0000;0,55,#FF0000;0,56,#FF0000;0,57,#FF0000;0,58,#FF0000;0,59,#FF0000",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 5 - Red White Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 6)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#00FF00;0,1,#00FF00;0,2,#00FF00;0,3,#00FF00;0,4,Lime;0,5,Red;0,6,Red;0,7,Red;0,24,#FFFFFF;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#FFFFFF;0,28,#FFFFFF;0,29,#FFFFFF;0,30,#FFFFFF;0,31,#00FF00;0,32,#00FF00;0,33,#00FF00;0,34,#00FF00;0,35,#00FF00;0,36,#FFFFFF;0,37,Red;0,38,Red;0,39,Red;0,40,Red;0,8,Red;0,9,Red;0,41,Red;0,42,Red;0,43,#FFFFFF;0,44,#FFFFFF;0,45,#FFFFFF;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#FFFFFF;0,51,#FFFFFF;0,52,#FFFFFF;0,53,#FFFFFF;0,54,#FFFFFF;0,55,#FFFFFF;0,56,#FFFFFF;0,57,#FFFFFF;0,58,#FFFFFF;0,59,#FFFFFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 6 - Tricolore Theme"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 7)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFFFFF;0,1,#FFFFFF;0,2,#16588E;0,3,#16588E;0,4,#FF0027;0,5,#FFFFFF;0,6,#FFFFFF;0,7,#16588E;0,24,#FFFFFF;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#16588E;0,28,#16588E;0,29,#FF0027;0,30,#FF0027;0,31,#FF0027;0,32,#FF0027;0,33,#FF0027;0,34,#16588E;0,35,#16588E;0,36,#FFFFFF;0,37,#16588E;0,38,#16588E;0,39,#FF0027;0,40,#FF0027;0,8,#16588E;0,9,#FF0027;0,41,#FF0027;0,42,#FF0027;0,43,#FF0027;0,44,#16588E;0,45,#16588E;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#FFFFFF;0,51,#FF0027;0,52,#FF0027;0,53,#FF0027;0,54,#FF0027;0,55,#FF0027;0,56,#FF0027;0,57,#FF0027;0,58,#FFFFFF;0,59,#FFFFFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 7 - BMW M"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 8)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#0094D8;0,1,#0094D8;0,2,#FFDC00;0,3,#0094D8;0,4,#FFDC00;0,5,#0094D8;0,6,#0094D8;0,7,#FFDC00;0,24,#0094D8;0,25,#0094D8;0,26,#FFDC00;0,27,#FFDC00;0,28,#FFDC00;0,29,#0094D8;0,30,#0094D8;0,31,#0094D8;0,32,#FFDC00;0,33,#FFDC00;0,34,#FFDC00;0,35,#0094D8;0,36,#0094D8;0,37,#0094D8;0,38,#FFDC00;0,39,#FFDC00;0,40,#FFDC00;0,8,#0094D8;0,9,#FFDC00;0,41,#0094D8;0,42,#0094D8;0,43,#0094D8;0,44,#FFDC00;0,45,#FFDC00;0,46,#FFDC00;0,47,#0094D8;0,48,#0094D8;0,49,#0094D8;0,50,#FFDC00;0,51,#FFDC00;0,52,#FFDC00;0,53,#0094D8;0,54,#0094D8;0,55,#0094D8;0,56,#FFDC00;0,57,#FFDC00;0,58,#FFDC00;0,59,#0094D8",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "0, 148, 216"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 8 - Bilstein Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 9)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FFFF00;0,1,#C0E100;0,2,#86C100;0,3,#4EA100;0,4,#008000;0,5,#FFFF00;0,6,#C0E100;0,7,#86C100;0,24,#FFFF00;0,25,#FFFF00;0,26,#C0E100;0,27,#86C100;0,28,#4EA100;0,29,#008000;0,30,#008000;0,31,#008000;0,32,#4EA100;0,33,#86C100;0,34,#C0E100;0,35,#FFFF00;0,36,#FFFF00;0,37,#FFFF00;0,38,#C0E100;0,39,#86C100;0,40,#4EA100;0,8,#4EA100;0,9,#008000;0,41,#008000;0,42,#008000;0,43,#008000;0,44,#4EA100;0,45,#86C100;0,46,#C0E100;0,47,#FFFF00;0,48,#4EA100;0,49,#4EA100;0,50,#008000;0,51,#008000;0,52,#008000;0,53,#008000;0,54,#008000;0,55,#008000;0,56,#008000;0,57,#008000;0,58,#008000;0,59,#4EA100",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "78, 161, 0"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 9 - Manthey Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 10)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#A6051A;0,1,#A6051A;0,2,#FFEB00;0,3,#FFEB00;0,4,#A6051A;0,5,#A6051A;0,6,#A6051A;0,7,#FFEB00;0,24,#A6051A;0,25,#A6051A;0,26,#FFEB00;0,27,#FFFFFF;0,28,#FFEB00;0,29,#A6051A;0,30,#A6051A;0,31,#A6051A;0,32,#FFEB00;0,33,#FFFFFF;0,34,#FFEB00;0,35,#A6051A;0,36,#A6051A;0,37,#A6051A;0,38,#FFEB00;0,39,#FFFFFF;0,40,#FFEB00;0,8,#FFEB00;0,9,#A6051A;0,41,#A6051A;0,42,#A6051A;0,43,#A6051A;0,44,#FFEB00;0,45,#FFFFFF;0,46,#FFEB00;0,47,#A6051A;0,48,#A6051A;0,49,#A6051A;0,50,#FFEB00;0,51,#FFFFFF;0,52,#FFEB00;0,53,#A6051A;0,54,#A6051A;0,55,#A6051A;0,56,#FFEB00;0,57,#FFFFFF;0,58,#FFEB00;0,59,#A6051A",
                                "FrameDuration": 100
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 10 - Scuderia"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 11)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#121F9E;0,1,#223971;0,2,#445291;0,3,#FFC906;0,4,#FF004A;0,5,#121F9E;0,6,#223971;0,7,#445291;0,24,#FFC906;0,25,#FFC906;0,26,#FF990E;0,27,#FF622F;0,28,#FF004A;0,29,#FF004A;0,30,#FF004A;0,31,#FF004A;0,32,#FF004A;0,33,#FF622F;0,34,#FF990E;0,35,#FFC906;0,36,#FFC906;0,37,#FFC906;0,38,#FF990E;0,39,#FF622F;0,40,#FF004A;0,8,#FFC906;0,9,#FF004A;0,41,#FF004A;0,42,#FF004A;0,43,#FF004A;0,44,#FF004A;0,45,#FF622F;0,46,#FF990E;0,47,#FFC906;0,48,#FF004A;0,49,#FF004A;0,50,#FF004A;0,51,#FF004A;0,52,#FF004A;0,53,#FF004A;0,54,#FF004A;0,55,#FF004A;0,56,#FF004A;0,57,#FF004A;0,58,#FF004A;0,59,#FF004A",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "255, 153, 14"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 11 - Red B Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 12)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#C6C6C6;0,1,#85BBB9;0,2,#42AFAC;0,3,#00A39E;0,4,#80142B;0,5,#C6C6C6;0,6,#85BBB9;0,7,#42AFAC;0,24,#00A39E;0,25,#00A39E;0,26,#2B7378;0,27,#554451;0,28,#80142B;0,29,#80142B;0,30,#80142B;0,31,#80142B;0,32,#80142B;0,33,#554451;0,34,#2B7378;0,35,#00A39E;0,36,#00A39E;0,37,#00A39E;0,38,#2B7378;0,39,#554451;0,40,#80142B;0,8,#00A39E;0,9,#80142B;0,41,#80142B;0,42,#80142B;0,43,#80142B;0,44,#80142B;0,45,#554451;0,46,#2B7378;0,47,#00A39E;0,48,#80142B;0,49,#80142B;0,50,#80142B;0,51,#80142B;0,52,#80142B;0,53,#80142B;0,54,#80142B;0,55,#80142B;0,56,#80142B;0,57,#80142B;0,58,#80142B;0,59,#80142B",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "43, 115, 120"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 12 - Merc Petronas"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 13)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#FF6600;0,1,#FF6600;0,2,#47C7FC;0,3,#47C7FC;0,4,#FF6600;0,5,#FF6600;0,6,#FF6600;0,7,#47C7FC;0,24,#47C7FC;0,25,#FFFFFF;0,26,#FFFFFF;0,27,#FFFFFF;0,28,#47C7FC;0,29,#47C7FC;0,30,#FF6600;0,31,#FF6600;0,32,#FF6600;0,33,#FF6600;0,34,#FF6600;0,35,#47C7FC;0,36,#47C7FC;0,37,#47C7FC;0,38,#FF6600;0,39,#FF6600;0,40,#FF6600;0,8,#47C7FC;0,9,#FF6600;0,41,#FF6600;0,42,#FF6600;0,43,#47C7FC;0,44,#47C7FC;0,45,#FFFFFF;0,46,#FFFFFF;0,47,#FFFFFF;0,48,#FFFFFF;0,49,#FFFFFF;0,50,#47C7FC;0,51,#47C7FC;0,52,#FF6600;0,53,#FF6600;0,54,#FF6600;0,55,#FF6600;0,56,#FF6600;0,57,#47C7FC;0,58,#47C7FC;0,59,#FFFFFF",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "White"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 13 - MCL Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 14)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#00642D;0,1,#CEDC00;0,2,#00642D;0,3,#00642D;0,4,#CEDC00;0,5,#00642D;0,6,#CEDC00;0,7,#00642D;0,24,#00642D;0,25,#00642D;0,26,#338323;0,27,#67A117;0,28,#9ABE0C;0,29,#CEDC00;0,30,#CEDC00;0,31,#CEDC00;0,32,#9ABE0C;0,33,#67A117;0,34,#338323;0,35,#00642D;0,36,#00642D;0,37,#00642D;0,38,#338323;0,39,#67A117;0,40,#9ABE0C;0,8,#00642D;0,9,#CEDC00;0,41,#CEDC00;0,42,#CEDC00;0,43,#CEDC00;0,44,#9ABE0C;0,45,#67A117;0,46,#338323;0,47,#00642D;0,48,#CEDC00;0,49,#CEDC00;0,50,#9ABE0C;0,51,#67A117;0,52,#338323;0,53,#00642D;0,54,#00642D;0,55,#00642D;0,56,#338323;0,57,#67A117;0,58,#9ABE0C;0,59,#CEDC00",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "154, 190, 12"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 14 - AMR Racing"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 15)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "let color = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Inputs\");\r\nlet color_Telemetry = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Telemetry\");\r\n\r\nif(counter === 0) {\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\toutput.fill(color[i], btnIndex[i], btnIndex[i] + ledCount_BTN);\r\n\t}\r\n\tfor(var i = 0; i < 10; i++) {\r\n\t\toutput.fill(color_Telemetry[4 + i], 10 + i, 10 + i + 1);\r\n\t}\r\n\tfor(var i = 0; i < 4; i++) {\r\n\t\toutput.fill(color_Telemetry[i], 20 + i, 20 + i + 1);\r\n\t}\r\n}\r\ncounter = (counter == 10) ? 0 : counter++;\r\nreturn output;",
                            "PreExpression": "let output = new Array(41);\r\nlet counter = 0;"
                          },
                          "LedCount": 60,
                          "ContainerType": "ScriptedContent",
                          "Description": "Light Mode 15 - Custom Mode"
                        },
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "let color1 = $prop(\"ATSR_Hub.\" + deviceID + \"_CustomTheme_Inputs\")\r\n\r\nlet output = new Array();\r\n\r\nfor(var i = 0; i < 3; i++) {\r\n\tswitch($prop('ATSR_Hub.' + deviceID + '_CustomTheme_ENCPattern')[i]) {\r\n\t\tcase 1: {\r\n\t\t\tleds.fill(color1[10 + i]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 2: {\r\n\t\t\tfor(var j = 0; j < 6; j++) {\r\n\t\t\t\tleds[2 * j] = color1[10 + i];\r\n\t\t\t\tleds[2 * j + 1] = color1[13 + i];\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\tcase 3: {\r\n\t\t\tleds = gradient(color1[10 + i], color1[13 + i]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\toutput = output.concat(leds);\r\n}\r\nreturn output;\r\n\r\nfunction gradient(startColor, endColor) {\r\n\tlet pattern = new Array(12);\r\n\t\r\n\tvar Red1 = 0;\r\n\tvar Green1 = 0;\r\n\tvar Blue1 = 0;\r\n\t\r\n\tvar Red2 = 0;\r\n\tvar Green2 = 0;\r\n\tvar Blue2 = 0\r\n\t\r\n\t// RGB-Conversion - startColor\r\n\tif(startColor.length == 7) {\r\n\t\tRed1 = parseInt(startColor.substring(1, 3), 16);\r\n\t\tGreen1 = parseInt(startColor.substring(3, 5), 16);\r\n\t\tBlue1 = parseInt(startColor.substring(5, 7), 16);\r\n\t}\r\n\telse if(startColor.length == 9) {\r\n\t\tRed1 = parseInt(startColor.substring(3, 5), 16);\r\n\t\tGreen1 = parseInt(startColor.substring(5, 7), 16);\r\n\t\tBlue1 = parseInt(startColor.substring(7, 9), 16);\r\n\t}\r\n\t// RGB-Conversion - endColor\r\n\tif(endColor.length == 7) {\r\n\t\tRed2 = parseInt(endColor.substring(1, 3), 16);\r\n\t\tGreen2 = parseInt(endColor.substring(3, 5), 16);\r\n\t\tBlue2 = parseInt(endColor.substring(5, 7), 16);\r\n\t}\r\n\telse if(endColor.length == 9) {\r\n\t\tRed2 = parseInt(endColor.substring(3, 5), 16);\r\n\t\tGreen2 = parseInt(endColor.substring(5, 7), 16);\r\n\t\tBlue2 = parseInt(endColor.substring(7, 9), 16);\r\n\t}\r\n\tvar RedDelta = Red2 - Red1;\r\n\tvar GreenDelta = Green2 - Green1;\r\n\tvar BlueDelta = Blue2 - Blue1;\r\n\t\r\n\tfor(var i = 0; i < 7; i++) {\r\n\t\tvar RedOutput = Math.floor(Math.abs(Red1 + (i * RedDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(RedOutput.length == 1) ? RedOutput = '0' + RedOutput : RedOutput = RedOutput;\r\n\t\tvar GreenOutput = Math.floor(Math.abs(Green1 + (i * GreenDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(GreenOutput.length == 1) ? GreenOutput = '0' + GreenOutput : GreenOutput = GreenOutput;\r\n\t\tvar BlueOutput = Math.floor(Math.abs(Blue1 + (i * BlueDelta / 6))).\r\n\t\t\ttoString(16);\r\n\t\t\t(BlueOutput.length == 1) ? BlueOutput = '0' + BlueOutput : BlueOutput = BlueOutput;\r\n\t\t\r\n\t\tpattern[i] = '#' + RedOutput + GreenOutput + BlueOutput;\r\n\t\tif(i != 0)\r\n\t\t\tpattern[12 - i] = '#' + RedOutput + GreenOutput + BlueOutput;\r\n\t}\r\n\treturn pattern;\r\n}",
                            "PreExpression": "let leds = new Array(12);"
                          },
                          "LedCount": 36,
                          "StartPosition": 25,
                          "ContainerType": "ScriptedContent",
                          "Description": "Light Mode 15 - Encoders"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 15 - Custom Mode"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "if($prop('ATSR_Hub.var_profileModeID') == 16)\r\n\treturn true;\r\nelse \r\n\treturn false;"
                      },
                      "LedContainers": [
                        {
                          "Animation": {
                            "Columns": 60,
                            "Rows": 1,
                            "Frames": [
                              {
                                "Colors": "0,0,#00FF00;0,1,#FFFF00;0,2,#00BFFF;0,3,#FF0000;0,4,#FFFF00;0,5,#00BFFF;0,6,#FF0000;0,7,#00FF00;0,24,#00BFFF;0,25,#00BFFF;0,26,#00BFFF;0,27,#00BFFF;0,28,#00BFFF;0,29,#00BFFF;0,30,#00BFFF;0,31,#00BFFF;0,32,#00BFFF;0,33,#00BFFF;0,34,#00BFFF;0,35,#00BFFF;0,36,#00FF00;0,37,#00FF00;0,38,#00FF00;0,39,#00FF00;0,40,#00FF00;0,8,#FFFF00;0,9,#FF0000;0,41,#00FF00;0,42,#00FF00;0,43,#00FF00;0,44,#00FF00;0,45,#00FF00;0,46,#00FF00;0,47,#00FF00;0,48,#FF0000;0,49,#FF0000;0,50,#FF0000;0,51,#FF0000;0,52,#FF0000;0,53,#FF0000;0,54,#FF0000;0,55,#FF0000;0,56,#FF0000;0,57,#FF0000;0,58,#FF0000;0,59,#FF0000",
                                "FrameDuration": 9999
                              }
                            ],
                            "PenColor": "DeepSkyBlue"
                          },
                          "ContainerType": "Animation"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Light Mode 16 - Lovely Dashboard"
                    },
                    {
                      "TriggerFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "return ($prop(\"ATSR_Hub.NightMode_IsActive\") \r\n\t&& $prop(\"ATSR_Hub.NightMode_SelectedMode\") != \"Dim\") "
                      },
                      "LedContainers": [
                        {
                          "ContentFormula": {
                            "JSExt": 4,
                            "Interpreter": 1,
                            "Expression": "output.fill($prop(\"ATSR_Hub.NightMode_SelectedColor\"), 0, 10);\r\noutput.fill($prop(\"ATSR_Hub.NightMode_SelectedColor\"), 24, 60);\r\n\r\nreturn output;",
                            "PreExpression": "let output = new Array(60);"
                          },
                          "LedCount": 60,
                          "ContainerType": "ScriptedContent",
                          "Description": "Night Mode"
                        }
                      ],
                      "ContainerType": "Groups.CustomConditionalGroup",
                      "Description": "Night Mode"
                    }
                  ],
                  "ContainerType": "Base.Group",
                  "Description": "Background"
                },
                {
                  "TriggerFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "if($prop(\"ATSR_Hub.Func_IdleAnimation_style\") == \"Running Animation\")\r\n\treturn true\r\nreturn false"
                  },
                  "LedContainers": [
                    {
                      "ContentFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "var rpmCount = 10;\r\nlet rpmLEDs = new Array(rpmCount).fill(null);\r\n\r\n\r\n\r\nvar time = Math.floor((Date.now() / 20.0) % 200);\r\n\r\nrpmLEDs.fill('#000000');\r\nrpmLEDs.fill(null, 0, Math.floor(time / (200 / Math.ceil(rpmCount / 2))));\r\nrpmLEDs.fill(null, rpmCount - Math.floor(time / (200 / Math.ceil(rpmCount / 2)), rpmCount));\r\n\r\nvar transpHexM = (Math.floor(255 - ((time % (200 / Math.ceil(rpmCount / 2))) * \tMath.floor(255 / (200 / Math.ceil(rpmCount / 2)))))).toString(16);\r\n\r\nif(transpHexM.length == 1) {\r\n\trpmLEDs[Math.ceil(time / (200 / Math.ceil(rpmCount / 2))) - 1] = \r\n\t\t'#0' + transpHexM + '000000';\r\n\trpmLEDs[rpmCount - Math.ceil(time / (200 / Math.ceil(rpmCount / 2)))] = \r\n\t\t'#0' + transpHexM + '000000';\t\r\n}\r\nelse {\r\n\trpmLEDs[Math.ceil(time / (200 / Math.ceil(rpmCount / 2))) - 1] = \r\n\t\t'#' + transpHexM + '000000';\r\n\trpmLEDs[rpmCount - Math.ceil(time / (200 / Math.ceil(rpmCount / 2)))] = \r\n\t\t'#' + transpHexM + '000000';\t\r\n}\r\n\t\r\n\r\noutput = rpmLEDs;\r\nreturn output;",
                        "PreExpression": "let output = new Array(10);"
                      },
                      "LedCount": 10,
                      "StartPosition": 11,
                      "ContainerType": "ScriptedContent",
                      "Description": "RPM Bar"
                    },
                    {
                      "ContentFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "var time = Math.floor((Date.now() / 20.0) % 200);\r\n\r\nlet transparency = new Array(36);\r\nlet output = new Array(36);\r\n\r\ntransparency.fill('#000000');\r\ntransparency.fill(null, 36 - Math.floor(time / 5.5), 36);\r\n\r\nvar transpHex = Math.floor(255 - ((time % 5.5) * 46.3)).toString(16);\r\n\r\nif(transpHex.length == 1)\r\n\ttransparency[36 - Math.ceil(time / 5.5)] = '#0' + transpHex + '000000';\r\nelse\r\n\ttransparency[36 - Math.ceil(time / 5.5)] = '#' + transpHex + '000000';\r\n\t\r\nfor(var i = 0; i < 36; i++)\r\n\toutput.fill(transparency[i], i, i + 1)\r\nreturn output;"
                      },
                      "LedCount": 36,
                      "StartPosition": 25,
                      "ContainerType": "ScriptedContent",
                      "Description": "Encoders"
                    },
                    {
                      "ContentFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "var time = Math.floor((Date.now() / 20.0) % 200);\r\n\r\nlet transparency = new Array(5);\r\nlet output = new Array(5);\r\n\r\ntransparency.fill('#000000');\r\ntransparency.fill(null, 5 - Math.floor(time / 39.99), 5);\r\n\r\nvar transpHex = Math.floor(255 - ((time % 39.99) * 6.37)).toString(16);\r\n\r\nif(transpHex.length == 1)\r\n\ttransparency[5 - Math.ceil(time / 39.9)] = '#0' + transpHex + '000000';\r\nelse\r\n\ttransparency[5 - Math.ceil(time / 39.9)] = '#' + transpHex + '000000';\r\n\t\r\nfor(var i = 0; i < 5; i++)\r\n\toutput.fill(transparency[i], i, i + 1)\r\nreturn output;"
                      },
                      "LedCount": 5,
                      "ContainerType": "ScriptedContent",
                      "Description": "Left Buttons"
                    },
                    {
                      "ContentFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "var time = Math.floor((Date.now() / 20.0) % 200);\r\n\r\nlet transparency = new Array(5);\r\nlet output = new Array(5);\r\n\r\ntransparency.fill('#000000');\r\ntransparency.fill(null, 5 - Math.floor(time / 39.99), 5);\r\n\r\nvar transpHex = Math.floor(255 - ((time % 39.99) * 6.37)).toString(16);\r\n\r\nif(transpHex.length == 1)\r\n\ttransparency[5 - Math.ceil(time / 39.9)] = '#0' + transpHex + '000000';\r\nelse\r\n\ttransparency[5 - Math.ceil(time / 39.9)] = '#' + transpHex + '000000';\r\n\t\r\nfor(var i = 0; i < 5; i++)\r\n\toutput.fill(transparency[i], i, i + 1)\r\nreturn output;"
                      },
                      "LedCount": 5,
                      "StartPosition": 6,
                      "ContainerType": "ScriptedContent",
                      "Description": "Right Buttons"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup",
                  "Description": "Running Animation"
                },
                {
                  "TriggerFormula": {
                    "JSExt": 0,
                    "Interpreter": 1,
                    "Expression": "if($prop(\"ATSR_Hub.Func_IdleAnimation_style\") == \"Breathing Animation\")\r\n\treturn true\r\nreturn false"
                  },
                  "LedContainers": [
                    {
                      "ContentFormula": {
                        "JSExt": 0,
                        "Interpreter": 1,
                        "Expression": "var color = \"#000000\";\r\nvar animationSpeed = 10;\r\nvar speedFactor = 1 + (100 - animationSpeed) / 100\r\n\r\nif($prop(\"ATSR_Hub.Func_IdleAnimation_style\") == \"Breathing Animation\") {\r\n\tvar time = 1 + Math.floor((Date.now() / (2.5 * speedFactor)) % 510);\t//time-var for both btn-rows\r\n\tif(time < 3 || time > 507)\r\n\t\ttransparencyHex = \"00\";\r\n\telse if(time > 253 && time < 257)\r\n\t\ttransparencyHex = \"FF\";\r\n\telse {\r\n\t\tif(time <= 255)\r\n\t\t\ttransparencyHex = (Math.floor(time % 255)).toString(16);\r\n\t\telse if(time > 255)\r\n\t\t\ttransparencyHex = (Math.floor(255 - time % 255)).toString(16);\r\n\t}\r\n\t\r\n\tif(transparencyHex.length == 1)\r\n        leds.fill('#0' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, 60);\r\n    else\r\n        leds.fill('#' + transparencyHex + \r\n            color.substring(color.length - 6, color.length), 0, 60);\r\n\t\t\r\n\treturn leds;\r\n}\r\nelse\r\n\treturn leds;",
                        "PreExpression": "let leds = new Array(60).fill('#00000000');\r\nvar transparencyHex;\r\n"
                      },
                      "LedCount": 60,
                      "ContainerType": "ScriptedContent",
                      "Description": "Breathing"
                    }
                  ],
                  "ContainerType": "Groups.CustomConditionalGroup",
                  "Description": "Breathing Animation"
                }
              ],
              "ContainerType": "Groups.CustomConditionalGroup"
            }
          ],
          "ContainerType": "Groups.CustomConditionalGroup",
          "Description": "Idle Animation - If Game not Running and Idle Enabled"
        }
      ],
      "ContainerType": "Groups.BrightnessFormulaGroup",
      "Description": "ATSR - R295 Profile"
    }
  ],
  "TestLedsGameData": {
    "CarModel": null,
    "CarId": null,
    "CarChoice": {
      "CarId": null,
      "CarModel": null,
      "GameCode": null,
      "IsSet": false
    },
    "GearEx": 0,
    "FuelMax": 100.0,
    "RPMSMax": 10000.0,
    "TurboMax": 3.5,
    "TurnIndicatorLeftEnabled": false,
    "TurnIndicatorRightEnabled": false,
    "SessionBestDeltaEx": 0.0,
    "AllTimeBestDeltaEx": 0.0,
    "DRSEnabled": false,
    "DRSAvailable": false,
    "MaxRpm": 10000.0,
    "GameRunning": false,
    "Brake": 0.0,
    "GameName": null,
    "Fuel": 0.0,
    "RPMPercent": 0.0,
    "RPMRedlineReached": false,
    "SpeedKmh": 0.0,
    "SpeedMph": 0.0,
    "Turbo": 0.0,
    "TurboPercent": 0.0,
    "Gear": "N",
    "IsInPitLane": false,
    "PitLimiterOn": false,
    "AbsEnabled": false,
    "AbsActive": false,
    "TCEnabled": false,
    "TCActive": false,
    "LowFuelAlert": false,
    "SpotterCarLeft": false,
    "SpotterCarRight": false,
    "BlackFlag": false,
    "YellowFlag": false,
    "WhiteFlag": false,
    "BlueFlag": false,
    "GreenFlag": false,
    "CarStartedTime": "0001-01-01T00:00:00",
    "SessionBestDelta": 0.0,
    "AllTimeBestDelta": 0.0
  },
  "UseProfileBrightness": false,
  "LastLoaded": "0001-01-01T00:00:00",
  "Name": "ATSR : R295 : V1.0.0",
  "ProfileId": "40f9fefe-e09e-4fa1-a498-f2442352d336",
  "GameCode": null,
  "CarChoice": null
}