Decompiled source of otAPI v1.0.2

BepInEx/plugins/otAPI/otAPI.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using BepInEx;
using BepInEx.Configuration;
using DG.Tweening;
using DG.Tweening.Core;
using DG.Tweening.Plugins.Options;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using PurrNet;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.Localization.Components;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("otAPI")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("otAPI")]
[assembly: AssemblyTitle("otAPI")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace _otAPI
{
	public class Alias
	{
		public string name;

		public string description;

		public Depot depot;

		public CfgLink cfgLink = null;

		public Action<CfgLink, string, Action<string[]>, bool, string[]> cfgAction = otAPI.CfgAlias;

		public Action<string[]> action;

		public AuxTiming auxTiming = AuxTiming.Before;

		public bool frontEnd;

		public bool passThrough;

		public Arg[] args;

		public Alias(string _name, Depot _depot, string _desc, Action<string[]> _action, bool _frontEnd, bool _passThrough, Arg[] _args)
		{
			name = _name;
			description = _desc;
			depot = _depot;
			action = _action;
			frontEnd = _frontEnd;
			passThrough = _passThrough;
			args = ((_args != null) ? _args : Array.Empty<Arg>());
			if (!_passThrough)
			{
				return;
			}
			bool flag = false;
			if (otAPI.passthroughs.Count > 0)
			{
				foreach (string passthrough in otAPI.passthroughs)
				{
					if (passthrough == "_name")
					{
						flag = true;
					}
				}
			}
			if (!flag)
			{
				otAPI.passthroughs.Add("_name");
			}
		}

		public Alias(string _name, Depot _depot, string _desc, Arg[] _args, CfgLink _cfgLink)
		{
			name = _name;
			description = _desc;
			depot = _depot;
			action = null;
			frontEnd = true;
			passThrough = false;
			args = ((_args != null) ? _args : Array.Empty<Arg>());
			cfgLink = _cfgLink;
		}

		public Alias(string _name, Depot _depot, string _desc, Arg[] _args, CfgLink _cfgLink, Action<string[]> _action = null, AuxTiming _auxTiming = AuxTiming.Before)
		{
			name = _name;
			description = _desc;
			depot = _depot;
			action = _action;
			cfgLink = _cfgLink;
			auxTiming = _auxTiming;
			frontEnd = false;
			passThrough = false;
			args = ((_args != null) ? _args : Array.Empty<Arg>());
		}

		public bool Verify(string[] _args, out Dictionary<int, VerificationError> err, out string clarifier)
		{
			clarifier = "";
			err = new Dictionary<int, VerificationError>();
			if (_args.Length == 0)
			{
				return true;
			}
			if (args.Length != 0)
			{
				for (int i = 0; i < args.Length; i++)
				{
					if (!args[i].optional && _args.Length < i)
					{
						err[i] = VerificationError.NonOptionalOmitted;
						string text = "";
						switch (args[i].type)
						{
						case ArgType.Bool:
							text = "bool ( true or false).";
							break;
						case ArgType.Int:
							text = "int (examples: 1, 5, 67).";
							break;
						case ArgType.Float:
							text = "float (examples: 0.5, 1, 2.73).";
							break;
						case ArgType.String:
							text = "string (examples: bwa, guh).";
							break;
						case ArgType.HexColor:
							text = "hex color (examples: FFCA36, bc1120).";
							break;
						}
						clarifier = "Must include a " + text;
						return false;
					}
					string text2 = "";
					try
					{
						text2 = _args[i];
					}
					catch (Exception)
					{
						text2 = "";
					}
					if (args[i].optional && text2 == "")
					{
						continue;
					}
					bool flag = !args[i].optional | (args[i].optional && text2.Length != 0);
					switch (args[i].type)
					{
					case ArgType.HexColor:
						if (text2 != "" && text2[0] == '#')
						{
							text2 = text2.Substring(1);
						}
						if ((!otAPI.ValidateHex(text2) | (text2.Length != 6)) && flag)
						{
							err[i] = VerificationError.BadHexColor;
							clarifier = "Valid examples: FFCA36, bc1120.";
							return false;
						}
						break;
					case ArgType.String:
						if (args[i].minIn != null && args[i].maxIn != null && flag)
						{
							if (text2.Length != (int)args[i].minIn && args[i].minIn == args[i].maxIn)
							{
								err[i] = VerificationError.BadStringSize;
								clarifier = $"Must be exactly {args[i].minIn} characters.";
								return false;
							}
							if ((text2.Length < (int)args[i].minIn) | (text2.Length > (int)args[i].maxIn))
							{
								err[i] = VerificationError.BadStringSize;
								clarifier = $"Must be between {args[i].minIn} and {args[i].maxIn} characters.";
								return false;
							}
						}
						break;
					case ArgType.Int:
					{
						if (int.TryParse(text2, out var result2) && flag)
						{
							if (args[i].minIn == null || args[i].maxIn == null)
							{
								break;
							}
							try
							{
								if (result2 < (int)args[i].minIn)
								{
									err[i] = VerificationError.OutsideRange;
									clarifier = $"Must be between {args[i].minIn} and {args[i].maxIn}.";
									return false;
								}
							}
							catch (Exception)
							{
								err[i] = VerificationError.BadTypeComparison;
								return false;
							}
							try
							{
								if (result2 > (int)args[i].maxIn)
								{
									err[i] = VerificationError.OutsideRange;
									clarifier = $"Must be between {args[i].minIn} and {args[i].maxIn}.";
									return false;
								}
							}
							catch (Exception)
							{
								err[i] = VerificationError.BadTypeComparison;
								return false;
							}
							break;
						}
						err[i] = VerificationError.IntExpected;
						return false;
					}
					case ArgType.Float:
					{
						if (float.TryParse(text2, out var result) && flag)
						{
							if (args[i].minIn == null || args[i].maxIn == null)
							{
								break;
							}
							try
							{
								if (result < (float)args[i].minIn)
								{
									err[i] = VerificationError.OutsideRange;
									clarifier = $"Must be between {args[i].minIn} and {args[i].maxIn}.";
									return false;
								}
							}
							catch (Exception)
							{
								err[i] = VerificationError.BadTypeComparison;
								return false;
							}
							try
							{
								if (result > (float)args[i].maxIn)
								{
									err[i] = VerificationError.OutsideRange;
									clarifier = $"Must be between {args[i].minIn} and {args[i].maxIn}.";
									return false;
								}
							}
							catch (Exception)
							{
								err[i] = VerificationError.BadTypeComparison;
								return false;
							}
							break;
						}
						err[i] = VerificationError.FloatExpected;
						return false;
					}
					case ArgType.Bool:
						if (((text2 != "true") | (text2 != "false")) && flag)
						{
							err[i] = VerificationError.BoolExpected;
							return false;
						}
						break;
					}
				}
			}
			return true;
		}
	}
	public class Arg
	{
		public ArgType type { get; private set; }

		public bool optional { get; private set; } = false;


		public object minIn { get; private set; } = null;


		public object maxIn { get; private set; } = null;


		public Arg(ArgType _type, bool _optional = false, object _minIn = null, object _maxIn = null)
		{
			type = _type;
			optional = _optional;
			if (_minIn != null)
			{
				minIn = _minIn;
			}
			if (_maxIn != null)
			{
				maxIn = _maxIn;
			}
		}
	}
	public class CfgLink
	{
		public ArgType valueType { get; private set; } = ArgType.Null;


		public string changeString { get; private set; } = "was changed to";


		public string currentString { get; private set; } = "is currently set to";


		public bool skipNoti { get; private set; } = false;


		public ConfigEntry<bool> boolLink { get; private set; } = null;


		public ConfigEntry<int> intLink { get; private set; } = null;


		public ConfigEntry<float> floatLink { get; private set; } = null;


		public ConfigEntry<string> stringLink { get; private set; } = null;


		public CfgLink(ArgType type, ConfigEntry<bool> inBool, string _changedString = "was changed to", string _currentString = "is currently set to", bool _skipNoti = false)
		{
			CommonInit(type, _changedString, _currentString, _skipNoti);
			boolLink = inBool;
		}

		public CfgLink(ArgType type, ConfigEntry<int> inInt, string _changedString = "was changed to", string _currentString = "is currently set to", bool _skipNoti = false)
		{
			CommonInit(type, _changedString, _currentString, _skipNoti);
			intLink = inInt;
		}

		public CfgLink(ArgType type, ConfigEntry<float> inFloat, string _changedString = "was changed to", string _currentString = "is currently set to", bool _skipNoti = false)
		{
			CommonInit(type, _changedString, _currentString, _skipNoti);
			floatLink = inFloat;
		}

		public CfgLink(ArgType type, ConfigEntry<string> inString, string _changedString = "was changed to", string _currentString = "is currently set to", bool _skipNoti = false)
		{
			CommonInit(type, _changedString, _currentString, _skipNoti);
			stringLink = inString;
		}

		private void CommonInit(ArgType type, string _changedString, string _currentString, bool _skipNoti)
		{
			valueType = type;
			changeString = _changedString;
			currentString = _currentString;
			skipNoti = _skipNoti;
		}
	}
	public class Depot
	{
		internal UIPackage? app;

		internal bool UsesApp = false;

		internal UIPackage? icon;

		internal bool UsesIcon = false;

		internal string name { get; private set; }

		internal string shortName { get; private set; }

		internal string author { get; private set; }

		internal string description { get; private set; }

		internal List<UITheme> themelist { get; private set; } = new List<UITheme>();


		internal string prefix { get; private set; }

		internal Dictionary<string, Alias> aliases { get; private set; } = new Dictionary<string, Alias>();


		public Depot(string Name, string ShortName, string Author, string Description, string Prefix)
		{
			name = Name;
			shortName = ShortName;
			author = Author;
			description = Description;
			prefix = Prefix;
		}

		public Depot(string Name, string ShortName, string Author, string Description, string Prefix, UIPackage App, UIPackage Icon, List<UITheme> ThemeList = null)
		{
			name = Name;
			shortName = ShortName;
			author = Author;
			description = Description;
			prefix = Prefix;
			app = App;
			icon = Icon;
			if (ThemeList != null)
			{
				themelist = ThemeList;
			}
			UsesApp = true;
			UsesIcon = true;
		}

		public bool GetAlias(string name, out Alias alias)
		{
			alias = null;
			if (aliases.ContainsKey(name))
			{
				alias = aliases[name];
				return true;
			}
			return false;
		}
	}
	[BepInPlugin("ob.otAPI", "otAPI", "1.0.2.0")]
	public class otAPI : BaseUnityPlugin
	{
		private static Dictionary<string, Color> washingMachine = new Dictionary<string, Color>
		{
			{
				"border",
				new Color(0.4235f, 0.4392f, 0.7686f)
			},
			{
				"body",
				new Color(0.0706f, 0.1216f, 0.2157f)
			},
			{
				"header",
				new Color(0.4157f, 0.302f, 0.3255f)
			},
			{
				"text",
				new Color(0.945f, 0.965f, 0.941f)
			},
			{
				"button",
				new Color(0.5529f, 0.5569f, 0.6314f)
			},
			{
				"hover",
				new Color(0.3647f, 0.3843f, 0.7137f)
			},
			{
				"system",
				new Color(0.3647f, 0.6902f, 0.6706f)
			},
			{
				"systemhover",
				new Color(0.4157f, 0.6118f, 0.7059f)
			}
		};

		internal static List<UITheme> default_themes = new List<UITheme>
		{
			new UITheme("meteorite", "ob", "#0f241d", "#323240", "#443e4f", "#b0a9a0", "#3e465c", "#404e6b", "#B1555B", "#C36A6D"),
			new UITheme("chocolate", "ob", "#5f3131", "#4f281c", "#5c372d", "#d3e6dd", "#693a26", "#7f462e", "#ce9278", "#d3a28d"),
			new UITheme("materwelon", "ob", "#3a5e32", "#ff577e", "#f78fb6", "#343842", "#2e8e66", "#4aa562", "#d9215b", "#e63970"),
			new UITheme("...and dragons", "ob", "#aa6950", "#c3876f", "#4f827d", "#f5e1a8", "#84ac7b", "#7dbd82", "#84333b", "#91343d"),
			new UITheme("banana andy", "ob", "#ffd45d", "#fbdc98", "#9e7f67", "#f4f7d9", "#e8c963", "#ebd27f", "#d4b042", "#dcbe65"),
			new UITheme("orange creamsicle", "ob", "#e97d45", "#d5d6db", "#d75e40", "#f1ac7b", "#ed682b", "#fe8a24", "#EA6D29", "#FF6029"),
			new UITheme("knockout", "ob", "#8b232c", "#631831", "#b12c3a", "#f2c9cd", "#9a1d2e", "#b83336", "#9B1342", "#E5135B"),
			new UITheme("2am", "ob", "#1e4771", "#4b54aa", "#383A69", "#ceb79f", "#4e2cab", "#4c3bad", "#403458", "#504566"),
			new UITheme("ghost house", "ob", "#f5ede1", "#6a4d52", "#633E6C", "#dac6c3", "#766b8c", "#877aa1", "#D09C83", "#E2AA83"),
			new UITheme("washing machine", "ob", washingMachine["border"], washingMachine["body"], washingMachine["header"], washingMachine["text"], washingMachine["button"], washingMachine["hover"], washingMachine["system"], washingMachine["systemhover"]),
			new UITheme("headline (light)", "ob", "#2f383c", "#e2e6e1", "#4390d9", "#e2e6e1", "#5aafd3", "#75c7db", "#34a853", "#49bc67"),
			new UITheme("headline (dark)", "ob", "#2f383c", "#262226", "#4390d9", "#e2e6e1", "#5aafd3", "#75c7db", "#34a853", "#49bc67")
		};

		private const string appID = "modPhone";

		private const string contents = "Scrollspace";

		private const string homePage = "Home Page";

		internal static UIPackage modPhoneIconPackage = new UIPackage
		{
			ObjectName = "modPhone",
			DepotFolder = "modPhone",
			Type = UIType.Image,
			Path = "otAPI/images/icons/phone.png",
			ImgSize = new Vector2Int(270, 270)
		};

		internal static UIPackage modPhone = new UIPackage
		{
			DepotFolder = "modPhone",
			ObjectName = "modPhone",
			PersistentUpdates = new List<string>(1) { "TimeText Update" },
			PersistentUI = new List<string>(11)
			{
				"modPhone", "Scrollspace", "Home Page", "Depot List", "Theme List", "Phone Settings", "Depot App", "Retheme App", "TimeText", "Back Button",
				"Phone Settings App"
			},
			Bools = new Dictionary<string, bool> { { "submenu_resize", false } },
			Ints = new Dictionary<string, int> { { "setting_setup", 0 } },
			Strings = new Dictionary<string, string>
			{
				{ "backbutton_target", "none" },
				{ "lastapp", "none" }
			},
			Vectors = new Dictionary<string, Vector2>
			{
				{
					"viewport_size",
					Vector2.one
				},
				{
					"viewport_pos",
					Vector2.one
				}
			},
			Mark = true,
			Size = new Vector2(0.2f, 0.63f),
			Position = new Vector2(0.5f, 0.2f),
			Channel1 = ThemeChannel.Border,
			Radius = 0.4f,
			BuildOffscreen = true,
			Aspect = new AspectGroup
			{
				Mode = AspectGroup.Modes.HeightControlsWidth,
				Ratio = 0.57f
			},
			PostBuild = async delegate(TaskCompletionSource<bool> locker)
			{
				await AppList["modPhone"].Tasks["check construction"].Run();
				UIPackage uIPackage6 = AppList["modPhone"].Prefabs["Home Page"];
				uIPackage6.Parent = AppList["modPhone"].UI["Scrollspace"];
				uIPackage6.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
				UIPackage HP = uIPackage6;
				AppList["modPhone"].Prefabs["Home Page"] = HP;
				uIPackage6 = AppList["modPhone"].Prefabs["Phone Settings"];
				uIPackage6.Parent = AppList["modPhone"].UI["Scrollspace"];
				uIPackage6.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
				UIPackage PS = uIPackage6;
				AppList["modPhone"].Prefabs["Phone Settings"] = PS;
				uIPackage6 = AppList["modPhone"].Prefabs["Depot Page"];
				uIPackage6.Parent = AppList["modPhone"].UI["Scrollspace"];
				uIPackage6.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
				UIPackage DP = uIPackage6;
				AppList["modPhone"].Prefabs["Depot Page"] = DP;
				uIPackage6 = AppList["modPhone"].Prefabs["Depot List"];
				uIPackage6.Parent = AppList["modPhone"].UI["Scrollspace"];
				uIPackage6.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
				UIPackage DL2 = uIPackage6;
				AppList["modPhone"].Prefabs["Depot List"] = DL2;
				uIPackage6 = AppList["modPhone"].Prefabs["Theme List"];
				uIPackage6.Parent = AppList["modPhone"].UI["Scrollspace"];
				uIPackage6.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
				UIPackage TL = uIPackage6;
				AppList["modPhone"].Prefabs["Theme List"] = TL;
				AppList["modPhone"].UI["modPhone"].transform.localScale = Vec2to3(Vec2(phone_Scale.Value));
				MakeGrabber(AppList["modPhone"].UI["modPhone"], AppList["modPhone"].UI["modPhone"], LimitRangeByHandle: false, delegate
				{
					//IL_0029: Unknown result type (might be due to invalid IL or missing references)
					//IL_002e: Unknown result type (might be due to invalid IL or missing references)
					phone_lastPosition.Value = Vector2.op_Implicit(AppList["modPhone"].UI["modPhone"].transform.localPosition);
				});
				((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(false);
				appIcons.Add(modPhoneIconPackage);
				locker.SetResult(result: true);
			},
			Children = new List<UIPackage>
			{
				new UIPackage
				{
					AnchorType = AnchorType.Right,
					Unclamped = true,
					Size = new Vector2(0.03f, 0.1f),
					Position = new Vector2(0.06f, 0.4f),
					Radius = 1f,
					Channel1 = ThemeChannel.Border,
					Channel2 = ThemeChannel.Hover,
					Type = UIType.Button,
					Action = async delegate
					{
						await AppList["modPhone"].Tasks["check tasks"].Run();
						await AppList["modPhone"].Tasks["home menu"].Run();
					}
				},
				new UIPackage
				{
					ObjectName = "Panel Insert",
					Size = new Vector2(0.92f, 0.94f),
					Children = new List<UIPackage>
					{
						new UIPackage
						{
							ObjectName = "Back Button",
							Mark = true,
							Type = UIType.Button,
							Size = new Vector2(0.975f, 0.25f),
							Radius = 0.75f,
							Position = new Vector2(0f, 0.735f),
							Channel1 = ThemeChannel.System,
							Channel2 = ThemeChannel.SystemHover,
							Children = new List<UIPackage>
							{
								new UIPackage
								{
									Type = UIType.Text,
									String = "<align=center>Loading...",
									TextSize = 52,
									Size = new Vector2(1f, 0.25f),
									Position = new Vector2(0f, 0.55f)
								}
							},
							Action = async delegate
							{
								await AppList["modPhone"].Tasks["check tasks"].Run();
								switch (AppList["modPhone"].Strings["backbutton_target"])
								{
								case "home":
									await AppList["modPhone"].Tasks["home menu"].Run();
									break;
								case "depotlist":
									AppList["modPhone"].Strings["backbutton_target"] = "home";
									await AppList["modPhone"].Tasks["depot menu"].Run();
									break;
								}
							}
						},
						new UIPackage
						{
							ObjectName = "Scrollspace",
							Size = new Vector2(1f, 1f),
							Shrink = 0.99f,
							Position = Vector2.zero,
							Channel1 = ThemeChannel.Border,
							Channel2 = ThemeChannel.Body,
							Type = UIType.Scrollable,
							Mark = true
						}
					}
				}
			},
			Tasks = new Dictionary<string, AsyncAction>
			{
				{
					"settings menu",
					new AsyncAction
					{
						Action = async delegate
						{
							await AppList["modPhone"].Tasks["shrink menu"].Run();
							GameObject psApp = AppList["modPhone"].UI["Phone Settings App"];
							if (!((Object)(object)psApp == (Object)null))
							{
								UIImage psImg = psApp.GetComponent<UIImage>();
								if (!((Object)(object)psImg == (Object)null))
								{
									RectTransform psRect = psApp.GetComponent<RectTransform>();
									if (!((Object)(object)psRect == (Object)null))
									{
										AppList["modPhone"].UI["Home Page"].SetActive(false);
										psRect.sizeDelta = psImg.storedSize;
										RunCoroutine(ClearChildren(AppList["modPhone"].UI["Scrollspace"], "modPhone", AppList["modPhone"].PersistentUI, AppList["modPhone"].PersistentUpdates, async delegate
										{
											if (!AppList["modPhone"].UI.ContainsKey("Phone Settings"))
											{
												RunCoroutine(QueueJob(KeyValuePair.Create("modPhone", AppList["modPhone"].Prefabs["Phone Settings"])));
											}
											else
											{
												AppList["modPhone"].UI["Phone Settings"].SetActive(true);
												await Task.Delay(3);
												ScrollRect SR6 = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
												DOTween.To((DOGetter<float>)(() => SR6.verticalNormalizedPosition), (DOSetter<float>)delegate(float change)
												{
													SR6.verticalNormalizedPosition = change;
												}, 1f, 0.1f);
											}
											((Behaviour)AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect).enabled = true;
										}), "modPhone");
									}
								}
							}
						}
					}
				},
				{
					"retheme menu",
					new AsyncAction
					{
						Action = async delegate
						{
							await AppList["modPhone"].Tasks["shrink menu"].Run();
							GameObject recolorApp = AppList["modPhone"].UI["Retheme App"];
							if (!((Object)(object)recolorApp == (Object)null))
							{
								UIImage recolorImg = recolorApp.GetComponent<UIImage>();
								if (!((Object)(object)recolorImg == (Object)null))
								{
									RectTransform recolorRect = recolorApp.GetComponent<RectTransform>();
									if (!((Object)(object)recolorRect == (Object)null))
									{
										AppList["modPhone"].UI["Home Page"].SetActive(false);
										recolorRect.sizeDelta = recolorImg.storedSize;
										RunCoroutine(ClearChildren(AppList["modPhone"].UI["Scrollspace"], "modPhone", AppList["modPhone"].PersistentUI, AppList["modPhone"].PersistentUpdates, async delegate
										{
											if (!AppList["modPhone"].UI.ContainsKey("Theme List"))
											{
												RunCoroutine(QueueJob(KeyValuePair.Create("modPhone", AppList["modPhone"].Prefabs["Theme List"])));
											}
											else
											{
												AppList["modPhone"].UI["Theme List"].SetActive(true);
												await Task.Delay(3);
												ScrollRect SR5 = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
												DOTween.To((DOGetter<float>)(() => SR5.verticalNormalizedPosition), (DOSetter<float>)delegate(float change)
												{
													SR5.verticalNormalizedPosition = change;
												}, 1f, 0.1f);
											}
											((Behaviour)AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect).enabled = true;
										}), "modPhone");
									}
								}
							}
						}
					}
				},
				{
					"depot menu",
					new AsyncAction
					{
						Action = async delegate
						{
							((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(false);
							ScrollRect SR4 = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
							DOTween.To((DOGetter<float>)(() => SR4.verticalNormalizedPosition), (DOSetter<float>)delegate(float change)
							{
								SR4.verticalNormalizedPosition = change;
							}, 1f, 0.1f);
							if (AppList["modPhone"].Strings["lastapp"] != "none")
							{
								string toShut2 = AppList["modPhone"].Strings["lastapp"];
								if (AppList["modPhone"].UI.ContainsKey(toShut2))
								{
									GameObject obj6 = AppList["modPhone"].UI[toShut2];
									if (!((Object)(object)obj6 == (Object)null) && AppList["modPhone"].Bools.ContainsKey(toShut2 + "_setup"))
									{
										if (AppList["modPhone"].Bools[toShut2 + "_setup"])
										{
											obj6.SetActive(false);
										}
										else
										{
											RunCoroutine(SafishDeleter(obj6), "modPhone");
											if (AppList["modPhone"].UI.ContainsKey(toShut2))
											{
												AppList["modPhone"].UI.Remove(toShut2);
											}
											if (AppList["modPhone"].PersistentUI.Contains(toShut2))
											{
												AppList["modPhone"].PersistentUI.Remove(toShut2);
											}
										}
									}
								}
								AppList["modPhone"].Strings["lastapp"] = "none";
							}
							await AppList["modPhone"].Tasks["shrink menu"].Run();
							GameObject depotApp = AppList["modPhone"].UI["Depot App"];
							if (!((Object)(object)depotApp == (Object)null))
							{
								UIImage depotImg = depotApp.GetComponent<UIImage>();
								if (!((Object)(object)depotImg == (Object)null))
								{
									RectTransform depotRect = depotApp.GetComponent<RectTransform>();
									if (!((Object)(object)depotRect == (Object)null))
									{
										AppList["modPhone"].UI["Home Page"].SetActive(false);
										depotRect.sizeDelta = depotImg.storedSize;
										RunCoroutine(ClearChildren(AppList["modPhone"].UI["Scrollspace"], "modPhone", AppList["modPhone"].PersistentUI, AppList["modPhone"].PersistentUpdates, delegate
										{
											if (!AppList["modPhone"].UI.ContainsKey("Depot List"))
											{
												((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(true);
												RunCoroutine(QueueJob(KeyValuePair.Create("modPhone", AppList["modPhone"].Prefabs["Depot List"]), delegate(TaskCompletionSource<bool> _locker)
												{
													((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(false);
													_locker.SetResult(result: true);
												}));
											}
											else
											{
												AppList["modPhone"].UI["Depot List"].SetActive(true);
											}
											((Behaviour)SR4).enabled = true;
										}), "modPhone");
									}
								}
							}
						}
					}
				},
				{
					"home menu",
					new AsyncAction
					{
						Action = async delegate
						{
							((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(false);
							ScrollRect SR3 = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
							DOTween.To((DOGetter<float>)(() => SR3.verticalNormalizedPosition), (DOSetter<float>)delegate(float change)
							{
								SR3.verticalNormalizedPosition = change;
							}, 1f, 0.1f);
							if (AppList["modPhone"].Bools.ContainsKey("themelist_setup") && !AppList["modPhone"].Bools["themelist_setup"])
							{
								Transform TLT = AppList["modPhone"].UI["Scrollspace"].transform.Find("Theme List");
								if (!((Object)(object)TLT == (Object)null))
								{
									GameObject TLTO = ((Component)TLT).gameObject;
									if (!((Object)(object)TLTO == (Object)null))
									{
										RunCoroutine(SafishDeleter(TLTO), "modPhone");
										if (AppList["modPhone"].UI.ContainsKey("Theme List"))
										{
											AppList["modPhone"].UI.Remove("Theme List");
										}
									}
								}
							}
							if (AppList["modPhone"].Bools.ContainsKey("settings_setup") && !AppList["modPhone"].Bools["settings_setup"])
							{
								Transform DLT2 = AppList["modPhone"].UI["Scrollspace"].transform.Find("Phone Settings");
								if (!((Object)(object)DLT2 == (Object)null))
								{
									GameObject DLTO2 = ((Component)DLT2).gameObject;
									if (!((Object)(object)DLTO2 == (Object)null))
									{
										RunCoroutine(SafishDeleter(DLTO2), "modPhone");
										if (AppList["modPhone"].UI.ContainsKey("Phone Settings"))
										{
											AppList["modPhone"].UI.Remove("Depot List");
										}
									}
								}
							}
							if (AppList["modPhone"].Bools.ContainsKey("depotlist_setup") && !AppList["modPhone"].Bools["depotlist_setup"])
							{
								Transform DLT = AppList["modPhone"].UI["Scrollspace"].transform.Find("Depot List");
								if (!((Object)(object)DLT == (Object)null))
								{
									GameObject DLTO = ((Component)DLT).gameObject;
									if (!((Object)(object)DLTO == (Object)null))
									{
										RunCoroutine(SafishDeleter(DLTO), "modPhone");
										if (AppList["modPhone"].UI.ContainsKey("Depot List"))
										{
											AppList["modPhone"].UI.Remove("Depot List");
										}
									}
								}
							}
							if (AppList["modPhone"].UI.ContainsKey("Phone Settings"))
							{
								AppList["modPhone"].UI["Phone Settings"].SetActive(false);
							}
							if (AppList["modPhone"].UI.ContainsKey("Depot List"))
							{
								AppList["modPhone"].UI["Depot List"].SetActive(false);
							}
							if (AppList["modPhone"].UI.ContainsKey("Theme List"))
							{
								AppList["modPhone"].UI["Theme List"].SetActive(false);
							}
							if (AppList["modPhone"].Strings["lastapp"] != "none")
							{
								string toShut = AppList["modPhone"].Strings["lastapp"];
								if (AppList["modPhone"].UI.ContainsKey(toShut))
								{
									GameObject obj5 = AppList["modPhone"].UI[toShut];
									if ((Object)(object)obj5 == (Object)null)
									{
										return;
									}
									obj5.SetActive(false);
								}
								AppList["modPhone"].Strings["lastapp"] = "none";
							}
							AppList["modPhone"].Strings["backbutton_target"] = "none";
							UIPackage HomePage = AppList["modPhone"].Prefabs["Home Page"];
							RunCoroutine(ClearChildren(AppList["modPhone"].UI["Scrollspace"], "modPhone", AppList["modPhone"].PersistentUI, AppList["modPhone"].PersistentUpdates, delegate
							{
								//IL_014f: Unknown result type (might be due to invalid IL or missing references)
								//IL_0196: Unknown result type (might be due to invalid IL or missing references)
								//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
								if (!AppList["modPhone"].UI.ContainsKey("Home Page"))
								{
									RunCoroutine(QueueJob(KeyValuePair.Create("modPhone", HomePage)));
								}
								else
								{
									AppList["modPhone"].UI["Home Page"].SetActive(true);
								}
								((Behaviour)SR3).enabled = false;
								if (AppList["modPhone"].Bools["submenu_resize"])
								{
									AppList["modPhone"].Bools["submenu_resize"] = false;
									RectTransform viewportRect2 = ((Component)AppList["modPhone"].UI["Scrollspace"].transform.parent).GetComponent<RectTransform>();
									RectTransform containerRect2 = ((Component)AppList["modPhone"].UI["Scrollspace"].transform.parent.parent).GetComponent<RectTransform>();
									ShortcutExtensions.DOLocalMoveY((Transform)(object)containerRect2, AppList["modPhone"].Vectors["viewport_pos"].y, 0.1f, false);
									DOTween.To((DOGetter<Vector2>)(() => viewportRect2.sizeDelta), (DOSetter<Vector2>)delegate(Vector2 change)
									{
										//IL_0006: Unknown result type (might be due to invalid IL or missing references)
										viewportRect2.sizeDelta = change;
									}, AppList["modPhone"].Vectors["viewport_size"], 0.1f);
									DOTween.To((DOGetter<Vector2>)(() => containerRect2.sizeDelta), (DOSetter<Vector2>)delegate(Vector2 change)
									{
										//IL_0006: Unknown result type (might be due to invalid IL or missing references)
										containerRect2.sizeDelta = change;
									}, AppList["modPhone"].Vectors["viewport_size"], 0.1f);
								}
							}));
						}
					}
				},
				{
					"setup_boolsetting",
					new AsyncAction
					{
						Action = async delegate
						{
							await AppList["modPhone"].Tasks["check construction"].Run();
							GameObject _this5 = AppList["modPhone"].Buffer.Get;
							if (!((Object)(object)_this5 == (Object)null))
							{
								UIPanel This9 = _this5.GetComponent<UIPanel>();
								if (!((Object)(object)This9 == (Object)null))
								{
									if (((Component)This9).transform.childCount < 4)
									{
										Debug.Log((object)"otAPI: menu interrputed!");
									}
									else
									{
										UIPanel Toggle = ((Component)((Component)This9).transform.GetChild(0)).GetComponent<UIPanel>();
										UIText Current = ((Component)((Component)This9).transform.GetChild(1)).GetComponent<UIText>();
										UIText Name5 = ((Component)((Component)This9).transform.GetChild(2)).GetComponent<UIText>();
										UIText Info5 = ((Component)((Component)This9).transform.GetChild(3)).GetComponent<UIText>();
										if (!((Object)(object)Toggle == (Object)null) && !((Object)(object)Current == (Object)null) && !((Object)(object)Name5 == (Object)null) && !((Object)(object)Info5 == (Object)null))
										{
											UIPackage UIP6 = This9.UIP;
											int Index5 = -1;
											if (UIP6.Ints != null)
											{
												if (UIP6.Ints.ContainsKey("depot_index"))
												{
													Index5 = UIP6.Ints["depot_index"];
												}
												if (Index5 != -1)
												{
													string Target5 = ((Object)_this5).name ?? "";
													if (!(Target5 == ""))
													{
														Depot depot7 = depots[Index5];
														if (depot7 != null)
														{
															string name7 = "";
															Alias alias5 = null;
															CfgLink link5 = null;
															if (depot7.aliases.ContainsKey(Target5))
															{
																name7 = depot7.aliases[Target5].name ?? "";
																string info5 = depot7.aliases[Target5].description ?? "";
																alias5 = depot7.aliases[Target5];
																link5 = depot7.aliases[Target5].cfgLink;
																if (alias5 != null)
																{
																	Name5.Text.overflowMode = (TextOverflowModes)1;
																	Name5.SetString(name7);
																	Info5.Text.overflowMode = (TextOverflowModes)2;
																	Info5.Text.textWrappingMode = (TextWrappingModes)1;
																	Info5.SetString(info5);
																	Current.SetString(link5.boolLink.Value ? "<align=center>on" : "<align=center>off");
																	Toggle.CreateHoverBehavior(UIP6.Theme, Toggle.mainChannel, Toggle.hoverChannel);
																	GameObject ToGo = ((Component)Toggle).gameObject;
																	if (!((Object)(object)ToGo == (Object)null))
																	{
																		AddClickAction(((Component)Toggle).gameObject, delegate
																		{
																			if (!((Object)(object)ToGo == (Object)null))
																			{
																				link5.boolLink.Value = !link5.boolLink.Value;
																				string text4 = (link5.boolLink.Value ? "true." : "false.");
																				if ((Object)(object)Current != (Object)null)
																				{
																					Current.SetString(link5.boolLink.Value ? "<align=center>on" : "<align=center>off");
																				}
																				string[] obj4 = Array.Empty<string>();
																				if (alias5.action != null)
																				{
																					alias5.action(obj4);
																				}
																				Notify(name7 + " " + link5.changeString + " " + text4);
																			}
																		});
																		_this5.SetActive(true);
																		This9.UIP = default(UIPackage);
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				},
				{
					"setup_floatsetting",
					new AsyncAction
					{
						Action = async delegate
						{
							await AppList["modPhone"].Tasks["check construction"].Run();
							GameObject _this4 = AppList["modPhone"].Buffer.Get;
							if (!((Object)(object)_this4 == (Object)null))
							{
								UIPanel This8 = _this4.GetComponent<UIPanel>();
								if (!((Object)(object)This8 == (Object)null))
								{
									if (((Component)This8).transform.childCount < 6)
									{
										Debug.Log((object)"otAPI: menu interrputed!");
									}
									else
									{
										UISlider Slider3 = ((Component)((Component)This8).transform.GetChild(0)).GetComponent<UISlider>();
										UIInput Input4 = ((Component)((Component)This8).transform.GetChild(1)).GetComponent<UIInput>();
										UIPanel Cancel4 = ((Component)((Component)This8).transform.GetChild(2)).GetComponent<UIPanel>();
										UIPanel Apply4 = ((Component)((Component)This8).transform.GetChild(3)).GetComponent<UIPanel>();
										UIText Name4 = ((Component)((Component)This8).transform.GetChild(4)).GetComponent<UIText>();
										UIText Info4 = ((Component)((Component)This8).transform.GetChild(5)).GetComponent<UIText>();
										if (!((Object)(object)Slider3 == (Object)null) && !((Object)(object)Input4 == (Object)null) && !((Object)(object)Cancel4 == (Object)null) && !((Object)(object)Apply4 == (Object)null) && !((Object)(object)Name4 == (Object)null) && !((Object)(object)Info4 == (Object)null))
										{
											UIPackage UIP5 = This8.UIP;
											int Index4 = -1;
											if (UIP5.Ints != null)
											{
												if (UIP5.Ints.ContainsKey("depot_index"))
												{
													Index4 = UIP5.Ints["depot_index"];
												}
												if (Index4 != -1)
												{
													string Target4 = ((Object)_this4).name ?? "";
													if (!(Target4 == ""))
													{
														Depot depot6 = depots[Index4];
														Alias alias4 = null;
														if (depot6 != null)
														{
															string name6 = "";
															CfgLink link4 = null;
															if (depot6.aliases.ContainsKey(Target4))
															{
																name6 = depot6.aliases[Target4].name ?? "";
																string info4 = depot6.aliases[Target4].description ?? "";
																link4 = depot6.aliases[Target4].cfgLink;
																alias4 = depot6.aliases[Target4];
																if (alias4 != null && !((Object)(object)Name4.Text == (Object)null))
																{
																	Name4.Text.overflowMode = (TextOverflowModes)1;
																	Name4.SetString(name6);
																	if (!((Object)(object)Info4.Text == (Object)null))
																	{
																		Info4.Text.overflowMode = (TextOverflowModes)2;
																		Info4.Text.textWrappingMode = (TextWrappingModes)1;
																		Info4.SetString(info4);
																		Slider slider2 = Slider3.slider;
																		if (!((Object)(object)slider2 == (Object)null))
																		{
																			if (alias4.args.Length != 0 && alias4.args[0].maxIn != null && alias4.args[0].minIn != null)
																			{
																				slider2.minValue = (float)alias4.args[0].minIn;
																				slider2.maxValue = (float)alias4.args[0].maxIn;
																			}
																			((UnityEvent<float>)(object)slider2.onValueChanged).AddListener((UnityAction<float>)delegate(float value)
																			{
																				if (!((Object)(object)Input4 == (Object)null))
																				{
																					Input4.input.text = value.ToString("F2");
																				}
																			});
																			if (!((Object)(object)Input4.input == (Object)null))
																			{
																				Input4.input.characterLimit = 7;
																				Input4.input.characterValidation = (CharacterValidation)3;
																				((UnityEvent<string>)(object)Input4.input.onSubmit).AddListener((UnityAction<string>)delegate(string value)
																				{
																					if (!((Object)(object)slider2 == (Object)null) && !((Object)(object)Input4 == (Object)null) && !((Object)(object)Input4.input == (Object)null))
																					{
																						float.TryParse(value, out var result6);
																						slider2.value = result6;
																					}
																				});
																				if (!((Object)(object)Cancel4 == (Object)null))
																				{
																					Cancel4.CreateHoverBehavior(UIP5.Theme, Cancel4.mainChannel, Cancel4.hoverChannel);
																					GameObject CaGo3 = ((Component)Cancel4).gameObject;
																					if (!((Object)(object)CaGo3 == (Object)null))
																					{
																						AddClickAction(CaGo3, delegate
																						{
																							if (!((Object)(object)slider2 == (Object)null))
																							{
																								slider2.value = link4.floatLink.Value;
																							}
																						});
																						if (!((Object)(object)Apply4 == (Object)null))
																						{
																							Apply4.CreateHoverBehavior(UIP5.Theme, Apply4.mainChannel, Apply4.hoverChannel);
																							GameObject ApOj3 = ((Component)Apply4).gameObject;
																							if (!((Object)(object)ApOj3 == (Object)null))
																							{
																								AddClickAction(ApOj3, delegate
																								{
																									if (!((Object)(object)slider2 == (Object)null))
																									{
																										link4.floatLink.Value = slider2.value;
																										string[] obj3 = new string[1] { slider2.value.ToString() };
																										if (alias4.action != null)
																										{
																											alias4.action(obj3);
																										}
																										Notify($"{name6} {link4.changeString} {link4.floatLink.Value}.");
																									}
																								});
																								if (!((Object)(object)slider2 == (Object)null))
																								{
																									slider2.value = link4.floatLink.Value;
																									_this4.SetActive(true);
																									This8.UIP = default(UIPackage);
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				},
				{
					"setup_hexsetting",
					new AsyncAction
					{
						Action = async delegate
						{
							await AppList["modPhone"].Tasks["check construction"].Run();
							GameObject _this3 = AppList["modPhone"].Buffer.Get;
							if (!((Object)(object)_this3 == (Object)null))
							{
								UIPanel This7 = _this3.GetComponent<UIPanel>();
								if (!((Object)(object)This7 == (Object)null))
								{
									if (((Component)This7).transform.childCount < 12)
									{
										Debug.Log((object)"otAPI: menu interrputed!");
									}
									else
									{
										UISlider R_slide = ((Component)((Component)This7).transform.GetChild(0)).GetComponent<UISlider>();
										if (!((Object)(object)R_slide == (Object)null))
										{
											Slider _RS = R_slide.slider;
											UISlider G_slide = ((Component)((Component)This7).transform.GetChild(1)).GetComponent<UISlider>();
											if (!((Object)(object)G_slide == (Object)null))
											{
												Slider _GS = G_slide.slider;
												UISlider B_slide = ((Component)((Component)This7).transform.GetChild(2)).GetComponent<UISlider>();
												if (!((Object)(object)B_slide == (Object)null))
												{
													Slider _BS = B_slide.slider;
													GameObject R_InpObj = ((Component)((Component)This7).transform.GetChild(3)).gameObject;
													if (!((Object)(object)R_InpObj == (Object)null))
													{
														GameObject G_InpObj = ((Component)((Component)This7).transform.GetChild(4)).gameObject;
														if (!((Object)(object)G_InpObj == (Object)null))
														{
															GameObject B_InpObj = ((Component)((Component)This7).transform.GetChild(5)).gameObject;
															if (!((Object)(object)B_InpObj == (Object)null))
															{
																GameObject hexObj = ((Component)((Component)This7).transform.GetChild(6)).gameObject;
																if (!((Object)(object)hexObj == (Object)null))
																{
																	UIInput HexInpt = hexObj.GetComponent<UIInput>();
																	if (!((Object)(object)HexInpt == (Object)null))
																	{
																		UIPanel FutureColor = ((Component)((Component)This7).transform.GetChild(7)).GetComponent<UIPanel>();
																		if (!((Object)(object)FutureColor == (Object)null))
																		{
																			UIPanel CurrentColor = ((Component)((Component)This7).transform.GetChild(8)).GetComponent<UIPanel>();
																			if (!((Object)(object)CurrentColor == (Object)null))
																			{
																				GameObject CancelButton = ((Component)((Component)This7).transform.GetChild(9)).gameObject;
																				if (!((Object)(object)CancelButton == (Object)null))
																				{
																					GameObject ApplyButton = ((Component)((Component)This7).transform.GetChild(10)).gameObject;
																					if (!((Object)(object)ApplyButton == (Object)null))
																					{
																						GameObject nameText = ((Component)((Component)This7).transform.GetChild(11)).gameObject;
																						if (!((Object)(object)nameText == (Object)null))
																						{
																							GameObject infoText = ((Component)((Component)This7).transform.GetChild(12)).gameObject;
																							if (!((Object)(object)infoText == (Object)null))
																							{
																								UIPackage UIP4 = This7.UIP;
																								int Index3 = -1;
																								if (UIP4.Ints != null)
																								{
																									if (UIP4.Ints.ContainsKey("depot_index"))
																									{
																										Index3 = UIP4.Ints["depot_index"];
																									}
																									if (Index3 != -1)
																									{
																										string Target3 = ((Object)_this3).name ?? "";
																										if (!(Target3 == ""))
																										{
																											Depot depot5 = depots[Index3];
																											if (depot5 != null)
																											{
																												string name5 = "";
																												CfgLink link3 = null;
																												Alias alias3 = null;
																												if (depot5.aliases.ContainsKey(Target3))
																												{
																													name5 = depot5.aliases[Target3].name ?? "";
																													string info3 = depot5.aliases[Target3].description ?? "";
																													link3 = depot5.aliases[Target3].cfgLink;
																													alias3 = depot5.aliases[Target3];
																													if (alias3 != null)
																													{
																														UIText NameText = nameText.GetComponent<UIText>();
																														if (!((Object)(object)NameText == (Object)null) && !((Object)(object)NameText.Text == (Object)null))
																														{
																															NameText.Text.overflowMode = (TextOverflowModes)1;
																															NameText.SetString(name5);
																															UIInput R_Inp = R_InpObj.GetComponent<UIInput>();
																															if (!((Object)(object)R_Inp == (Object)null))
																															{
																																UIInput G_Inp = G_InpObj.GetComponent<UIInput>();
																																if (!((Object)(object)G_Inp == (Object)null))
																																{
																																	UIInput B_Inp = B_InpObj.GetComponent<UIInput>();
																																	if (!((Object)(object)B_Inp == (Object)null))
																																	{
																																		UIText InfoText = infoText.GetComponent<UIText>();
																																		if (!((Object)(object)InfoText == (Object)null) && !((Object)(object)InfoText.Text == (Object)null))
																																		{
																																			InfoText.Text.overflowMode = (TextOverflowModes)2;
																																			InfoText.Text.textWrappingMode = (TextWrappingModes)1;
																																			InfoText.SetString(info3);
																																			if (!((Object)(object)_RS == (Object)null) && !((Object)(object)_GS == (Object)null) && !((Object)(object)_BS == (Object)null))
																																			{
																																				((UnityEvent<float>)(object)_RS.onValueChanged).AddListener((UnityAction<float>)delegate(float value)
																																				{
																																					//IL_0125: Unknown result type (might be due to invalid IL or missing references)
																																					if (!((Object)(object)_RS == (Object)null) && !((Object)(object)_GS == (Object)null) && !((Object)(object)_BS == (Object)null))
																																					{
																																						int num4 = (int)(value * 255f);
																																						float value8 = _GS.value;
																																						float value9 = _BS.value;
																																						if (!((Object)(object)R_Inp == (Object)null) && !((Object)(object)R_Inp.input == (Object)null))
																																						{
																																							string text3 = num4.ToString();
																																							R_Inp.input.text = ((text3 != "0") ? text3 : "");
																																							ColorMix(value, value8, value9, out var color6, out var hexed5);
																																							if (!((Object)(object)HexInpt == (Object)null) && !((Object)(object)HexInpt.input == (Object)null))
																																							{
																																								HexInpt.input.text = hexed5;
																																								if (!((Object)(object)FutureColor == (Object)null))
																																								{
																																									FutureColor.Recolor(color6);
																																								}
																																							}
																																						}
																																					}
																																					static void ColorMix(float r, float g, float b, out Color color, out string hexed)
																																					{
																																						//IL_0005: Unknown result type (might be due to invalid IL or missing references)
																																						//IL_000a: Unknown result type (might be due to invalid IL or missing references)
																																						color = new Color(r, g, b);
																																						hexed = ((byte)Math.Clamp(r * 255f, 0f, 255f)).ToString("X2") ?? "";
																																						hexed += ((byte)Math.Clamp(g * 255f, 0f, 255f)).ToString("X2");
																																						hexed += ((byte)Math.Clamp(b * 255f, 0f, 255f)).ToString("X2");
																																					}
																																				});
																																				((UnityEvent<float>)(object)_GS.onValueChanged).AddListener((UnityAction<float>)delegate(float value)
																																				{
																																					//IL_0125: Unknown result type (might be due to invalid IL or missing references)
																																					if (!((Object)(object)_RS == (Object)null) && !((Object)(object)_GS == (Object)null) && !((Object)(object)_BS == (Object)null))
																																					{
																																						float value6 = _RS.value;
																																						int num3 = (int)(value * 255f);
																																						float value7 = _BS.value;
																																						if (!((Object)(object)G_Inp == (Object)null) && !((Object)(object)G_Inp.input == (Object)null))
																																						{
																																							string text2 = num3.ToString();
																																							G_Inp.input.text = ((text2 != "0") ? text2 : "");
																																							otAPI.<.cctor>g__ColorMix|157_33(value6, value, value7, out Color color5, out string hexed4);
																																							if (!((Object)(object)HexInpt == (Object)null) && !((Object)(object)HexInpt.input == (Object)null))
																																							{
																																								HexInpt.input.text = hexed4;
																																								if (!((Object)(object)FutureColor == (Object)null))
																																								{
																																									FutureColor.Recolor(color5);
																																								}
																																							}
																																						}
																																					}
																																				});
																																				((UnityEvent<float>)(object)_BS.onValueChanged).AddListener((UnityAction<float>)delegate(float value)
																																				{
																																					//IL_0125: Unknown result type (might be due to invalid IL or missing references)
																																					if (!((Object)(object)_RS == (Object)null) && !((Object)(object)_GS == (Object)null) && !((Object)(object)_BS == (Object)null))
																																					{
																																						float value4 = _RS.value;
																																						float value5 = _GS.value;
																																						int num2 = (int)(value * 255f);
																																						if (!((Object)(object)B_Inp == (Object)null) && !((Object)(object)B_Inp.input == (Object)null))
																																						{
																																							string text = num2.ToString();
																																							B_Inp.input.text = ((text != "0") ? text : "");
																																							otAPI.<.cctor>g__ColorMix|157_33(value4, value5, value, out Color color4, out string hexed3);
																																							if (!((Object)(object)HexInpt == (Object)null) && !((Object)(object)HexInpt.input == (Object)null))
																																							{
																																								HexInpt.input.text = hexed3;
																																								if (!((Object)(object)FutureColor == (Object)null))
																																								{
																																									FutureColor.Recolor(color4);
																																								}
																																							}
																																						}
																																					}
																																				});
																																				if (!((Object)(object)R_Inp.input == (Object)null))
																																				{
																																					R_Inp.input.characterValidation = (CharacterValidation)1;
																																					R_Inp.input.characterLimit = 3;
																																					((UnityEvent<string>)(object)R_Inp.input.onValueChanged).AddListener((UnityAction<string>)delegate(string _value)
																																					{
																																						if (!((Object)(object)R_slide == (Object)null))
																																						{
																																							int.TryParse(_value, out var result5);
																																							if (_value == "")
																																							{
																																								result5 = 0;
																																							}
																																							if (result5 > 255)
																																							{
																																								result5 = 255;
																																								R_Inp.input.text = result5.ToString();
																																							}
																																							_RS.value = (float)result5 / 255f;
																																						}
																																					});
																																					if (!((Object)(object)G_Inp.input == (Object)null))
																																					{
																																						G_Inp.input.characterValidation = (CharacterValidation)1;
																																						G_Inp.input.characterLimit = 3;
																																						((UnityEvent<string>)(object)G_Inp.input.onValueChanged).AddListener((UnityAction<string>)delegate(string _value)
																																						{
																																							if (!((Object)(object)G_slide == (Object)null))
																																							{
																																								int.TryParse(_value, out var result4);
																																								if (_value == "")
																																								{
																																									result4 = 0;
																																								}
																																								if (result4 > 255)
																																								{
																																									result4 = 255;
																																									G_Inp.input.text = result4.ToString();
																																								}
																																								_GS.value = (float)result4 / 255f;
																																							}
																																						});
																																						if (!((Object)(object)B_Inp.input == (Object)null))
																																						{
																																							B_Inp.input.characterValidation = (CharacterValidation)1;
																																							B_Inp.input.characterLimit = 3;
																																							((UnityEvent<string>)(object)B_Inp.input.onValueChanged).AddListener((UnityAction<string>)delegate(string _value)
																																							{
																																								if (!((Object)(object)B_slide == (Object)null))
																																								{
																																									int.TryParse(_value, out var result3);
																																									if (_value == "")
																																									{
																																										result3 = 0;
																																									}
																																									if (result3 > 255)
																																									{
																																										result3 = 255;
																																										B_Inp.input.text = result3.ToString();
																																									}
																																									_BS.value = (float)result3 / 255f;
																																								}
																																							});
																																							if (!((Object)(object)HexInpt.input == (Object)null))
																																							{
																																								HexInpt.input.characterValidation = (CharacterValidation)6;
																																								HexInpt.input.characterLimit = 6;
																																								Edit<TMP_InputField, string>(HexInpt.input, "m_RegexValue", "^[0-9a-fA-F]+$");
																																								((UnityEvent<string>)(object)HexInpt.input.onSubmit).AddListener((UnityAction<string>)delegate(string _value)
																																								{
																																									//IL_004c: Unknown result type (might be due to invalid IL or missing references)
																																									//IL_005e: Unknown result type (might be due to invalid IL or missing references)
																																									//IL_0070: Unknown result type (might be due to invalid IL or missing references)
																																									Color val11 = default(Color);
																																									ColorUtility.TryParseHtmlString("#" + _value, ref val11);
																																									if (!((Object)(object)_RS == (Object)null) && !((Object)(object)_GS == (Object)null) && !((Object)(object)_BS == (Object)null))
																																									{
																																										_RS.value = val11.r;
																																										_GS.value = val11.g;
																																										_BS.value = val11.b;
																																									}
																																								});
																																								string cur = link3.stringLink.Value;
																																								HexInpt.input.text = cur;
																																								Color color2 = default(Color);
																																								ColorUtility.TryParseHtmlString("#" + cur, ref color2);
																																								if (!((Object)(object)CurrentColor == (Object)null))
																																								{
																																									CurrentColor.Recolor(color2);
																																									Call<TMP_InputField>(HexInpt.input, "SendOnSubmit");
																																									if (!((Object)(object)ApplyButton == (Object)null))
																																									{
																																										UIPanel ApPa = ApplyButton.GetComponent<UIPanel>();
																																										if (!((Object)(object)ApPa == (Object)null))
																																										{
																																											ApPa.CreateHoverBehavior(UIP4.Theme, ApPa.mainChannel, ApPa.hoverChannel);
																																											AddClickAction(ApplyButton, delegate
																																											{
																																												//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
																																												if (!((Object)(object)HexInpt == (Object)null) && !((Object)(object)ApplyButton == (Object)null) && !((Object)(object)HexInpt.input == (Object)null) && !(HexInpt.input.text == "") && !((Object)(object)_RS == (Object)null) && !((Object)(object)_GS == (Object)null) && !((Object)(object)_BS == (Object)null))
																																												{
																																													otAPI.<.cctor>g__ColorMix|157_33(_RS.value, _GS.value, _BS.value, out Color color3, out string hexed2);
																																													link3.stringLink.Value = hexed2;
																																													if (!((Object)(object)CurrentColor == (Object)null))
																																													{
																																														CurrentColor.Recolor(color3);
																																														string[] obj2 = new string[1] { hexed2 };
																																														if (alias3.action != null)
																																														{
																																															alias3.action(obj2);
																																														}
																																														Notify(name5 + " " + link3.changeString + " \"" + link3.stringLink.Value + "\".");
																																													}
																																												}
																																											});
																																											if (!((Object)(object)CancelButton == (Object)null))
																																											{
																																												UIPanel CaPa = CancelButton.GetComponent<UIPanel>();
																																												if (!((Object)(object)CaPa == (Object)null))
																																												{
																																													CaPa.CreateHoverBehavior(UIP4.Theme, CaPa.mainChannel, CaPa.hoverChannel);
																																													AddClickAction(CancelButton, delegate
																																													{
																																														if (!((Object)(object)HexInpt == (Object)null) && !((Object)(object)CancelButton == (Object)null) && !((Object)(object)HexInpt.input == (Object)null))
																																														{
																																															string value3 = depot5.aliases[Target3].cfgLink.stringLink.Value;
																																															HexInpt.input.text = value3;
																																															Color val10 = default(Color);
																																															ColorUtility.TryParseHtmlString("#" + value3, ref val10);
																																															Call<TMP_InputField>(HexInpt.input, "SendOnSubmit");
																																														}
																																													});
																																													_this3.SetActive(true);
																																													This7.UIP = default(UIPackage);
																																												}
																																											}
																																										}
																																									}
																																								}
																																							}
																																						}
																																					}
																																				}
																																			}
																																		}
																																	}
																																}
																															}
																														}
																													}
																												}
																											}
																										}
																									}
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				},
				{
					"setup_intsetting",
					new AsyncAction
					{
						Action = async delegate
						{
							await AppList["modPhone"].Tasks["check construction"].Run();
							GameObject _this2 = AppList["modPhone"].Buffer.Get;
							if (!((Object)(object)_this2 == (Object)null))
							{
								UIPanel This6 = _this2.GetComponent<UIPanel>();
								if (!((Object)(object)This6 == (Object)null))
								{
									if (((Component)This6).transform.childCount < 6)
									{
										Debug.Log((object)"otAPI: menu interrputed!");
									}
									else
									{
										UISlider Slider2 = ((Component)((Component)This6).transform.GetChild(0)).GetComponent<UISlider>();
										UIInput Input3 = ((Component)((Component)This6).transform.GetChild(1)).GetComponent<UIInput>();
										UIPanel Cancel3 = ((Component)((Component)This6).transform.GetChild(2)).GetComponent<UIPanel>();
										UIPanel Apply3 = ((Component)((Component)This6).transform.GetChild(3)).GetComponent<UIPanel>();
										UIText Name3 = ((Component)((Component)This6).transform.GetChild(4)).GetComponent<UIText>();
										UIText Info3 = ((Component)((Component)This6).transform.GetChild(5)).GetComponent<UIText>();
										if (!((Object)(object)Slider2 == (Object)null) && !((Object)(object)Input3 == (Object)null) && !((Object)(object)Cancel3 == (Object)null) && !((Object)(object)Apply3 == (Object)null) && !((Object)(object)Name3 == (Object)null) && !((Object)(object)Info3 == (Object)null))
										{
											UIPackage UIP3 = This6.UIP;
											int Index2 = -1;
											if (UIP3.Ints != null)
											{
												if (UIP3.Ints.ContainsKey("depot_index"))
												{
													Index2 = UIP3.Ints["depot_index"];
												}
												if (Index2 != -1)
												{
													string Target2 = ((Object)_this2).name ?? "";
													if (!(Target2 == ""))
													{
														Depot depot4 = depots[Index2];
														Alias alias2 = null;
														if (depot4 != null)
														{
															string name4 = "";
															CfgLink link2 = null;
															if (depot4.aliases.ContainsKey(Target2))
															{
																name4 = depot4.aliases[Target2].name ?? "";
																string info2 = depot4.aliases[Target2].description ?? "";
																link2 = depot4.aliases[Target2].cfgLink;
																alias2 = depot4.aliases[Target2];
																if (alias2 != null && !((Object)(object)Name3.Text == (Object)null))
																{
																	Name3.Text.overflowMode = (TextOverflowModes)1;
																	Name3.SetString(name4);
																	if (!((Object)(object)Info3.Text == (Object)null))
																	{
																		Info3.Text.overflowMode = (TextOverflowModes)2;
																		Info3.Text.textWrappingMode = (TextWrappingModes)1;
																		Info3.SetString(info2);
																		Slider slider = Slider2.slider;
																		if (!((Object)(object)slider == (Object)null))
																		{
																			if (alias2.args.Length != 0 && alias2.args[0].maxIn != null && alias2.args[0].minIn != null)
																			{
																				slider.wholeNumbers = true;
																				slider.minValue = (int)alias2.args[0].minIn;
																				slider.maxValue = (int)alias2.args[0].maxIn;
																			}
																			((UnityEvent<float>)(object)slider.onValueChanged).AddListener((UnityAction<float>)delegate(float value)
																			{
																				value = (int)value;
																				if (!((Object)(object)Input3 == (Object)null))
																				{
																					Input3.input.text = value.ToString();
																				}
																			});
																			if (!((Object)(object)Input3.input == (Object)null))
																			{
																				Input3.input.characterLimit = 7;
																				Input3.input.characterValidation = (CharacterValidation)2;
																				((UnityEvent<string>)(object)Input3.input.onSubmit).AddListener((UnityAction<string>)delegate(string value)
																				{
																					if (!((Object)(object)slider == (Object)null) && !((Object)(object)Input3 == (Object)null) && !((Object)(object)Input3.input == (Object)null))
																					{
																						float.TryParse(value, out var result2);
																						slider.value = result2;
																					}
																				});
																				if (!((Object)(object)Cancel3 == (Object)null))
																				{
																					Cancel3.CreateHoverBehavior(UIP3.Theme, Cancel3.mainChannel, Cancel3.hoverChannel);
																					GameObject CaGo2 = ((Component)Cancel3).gameObject;
																					if (!((Object)(object)CaGo2 == (Object)null))
																					{
																						AddClickAction(CaGo2, delegate
																						{
																							if (!((Object)(object)slider == (Object)null))
																							{
																								slider.value = link2.intLink.Value;
																							}
																						});
																						if (!((Object)(object)Apply3 == (Object)null))
																						{
																							Apply3.CreateHoverBehavior(UIP3.Theme, Apply3.mainChannel, Apply3.hoverChannel);
																							GameObject ApOj2 = ((Component)Apply3).gameObject;
																							if (!((Object)(object)ApOj2 == (Object)null))
																							{
																								AddClickAction(ApOj2, delegate
																								{
																									if (!((Object)(object)slider == (Object)null))
																									{
																										link2.intLink.Value = (int)slider.value;
																										string[] obj = new string[1] { slider.value.ToString() };
																										if (alias2.action != null)
																										{
																											alias2.action(obj);
																										}
																										Notify($"{name4} {link2.changeString} {link2.intLink.Value}.");
																									}
																								});
																								if (!((Object)(object)slider == (Object)null))
																								{
																									slider.value = link2.intLink.Value;
																									_this2.SetActive(true);
																									This6.UIP = default(UIPackage);
																								}
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				},
				{
					"setup_stringsetting",
					new AsyncAction
					{
						Action = async delegate
						{
							await AppList["modPhone"].Tasks["check construction"].Run();
							GameObject _this = AppList["modPhone"].Buffer.Get;
							if (!((Object)(object)_this == (Object)null))
							{
								UIPanel This5 = _this.GetComponent<UIPanel>();
								if (!((Object)(object)This5 == (Object)null))
								{
									if (((Component)This5).transform.childCount < 5)
									{
										Debug.Log((object)"otAPI: menu interrputed!");
									}
									else
									{
										UIInput Input2 = ((Component)((Component)This5).transform.GetChild(0)).GetComponent<UIInput>();
										UIPanel Cancel2 = ((Component)((Component)This5).transform.GetChild(1)).GetComponent<UIPanel>();
										UIPanel Apply2 = ((Component)((Component)This5).transform.GetChild(2)).GetComponent<UIPanel>();
										UIText Name2 = ((Component)((Component)This5).transform.GetChild(3)).GetComponent<UIText>();
										UIText Info2 = ((Component)((Component)This5).transform.GetChild(4)).GetComponent<UIText>();
										if (!((Object)(object)Input2 == (Object)null) && !((Object)(object)Cancel2 == (Object)null) && !((Object)(object)Apply2 == (Object)null) && !((Object)(object)Name2 == (Object)null) && !((Object)(object)Info2 == (Object)null))
										{
											UIPackage UIP2 = This5.UIP;
											int Index = -1;
											if (UIP2.Ints != null)
											{
												if (UIP2.Ints.ContainsKey("depot_index"))
												{
													Index = UIP2.Ints["depot_index"];
												}
												if (Index != -1)
												{
													string Target = ((Object)_this).name ?? "";
													if (!(Target == ""))
													{
														Depot depot3 = depots[Index];
														if (depot3 != null)
														{
															string name3 = "";
															CfgLink link = null;
															if (depot3.aliases.ContainsKey(Target))
															{
																name3 = depot3.aliases[Target].name ?? "";
																string info = depot3.aliases[Target].description ?? "";
																link = depot3.aliases[Target].cfgLink;
																Alias alias = depot3.aliases[Target];
																if (alias != null && !((Object)(object)Name2.Text == (Object)null))
																{
																	Name2.Text.overflowMode = (TextOverflowModes)1;
																	Name2.SetString(name3);
																	if (!((Object)(object)Info2.Text == (Object)null))
																	{
																		Info2.Text.overflowMode = (TextOverflowModes)2;
																		Info2.Text.textWrappingMode = (TextWrappingModes)1;
																		Info2.SetString(info);
																		if (!((Object)(object)Input2.input == (Object)null))
																		{
																			Input2.input.characterLimit = UIP2.CharacterLimit;
																			((TMP_Text)Input2.placeholder).text = link.stringLink.Value;
																			if (!((Object)(object)Cancel2 == (Object)null))
																			{
																				Cancel2.CreateHoverBehavior(UIP2.Theme, Cancel2.mainChannel, Cancel2.hoverChannel);
																				GameObject CaGo = ((Component)Cancel2).gameObject;
																				if (!((Object)(object)CaGo == (Object)null))
																				{
																					AddClickAction(CaGo, delegate
																					{
																						if (!((Object)(object)Input2 == (Object)null) && !((Object)(object)Input2.input == (Object)null))
																						{
																							Input2.input.text = link.stringLink.Value;
																						}
																					});
																					if (!((Object)(object)Apply2 == (Object)null))
																					{
																						Apply2.CreateHoverBehavior(UIP2.Theme, Apply2.mainChannel, Apply2.hoverChannel);
																						GameObject ApOj = ((Component)Apply2).gameObject;
																						if (!((Object)(object)ApOj == (Object)null))
																						{
																							AddClickAction(ApOj, delegate
																							{
																								if (!((Object)(object)Input2 == (Object)null))
																								{
																									link.stringLink.Value = Input2.input.text;
																									Notify(name3 + " " + link.changeString + " " + link.stringLink.Value + ".");
																									((TMP_Text)Input2.placeholder).text = link.stringLink.Value;
																								}
																							});
																							if (!((Object)(object)Input2 == (Object)null) && !((Object)(object)Input2.input == (Object)null))
																							{
																								Input2.input.text = link.stringLink.Value;
																								_this.SetActive(true);
																								This5.UIP = default(UIPackage);
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
				},
				{
					"shrink menu",
					new AsyncAction
					{
						Action = async delegate
						{
							if (!AppList["modPhone"].Bools["submenu_resize"])
							{
								AppList["modPhone"].Bools["submenu_resize"] = true;
								RectTransform viewportRect = ((Component)AppList["modPhone"].UI["Scrollspace"].transform.parent).GetComponent<RectTransform>();
								RectTransform containerRect = ((Component)AppList["modPhone"].UI["Scrollspace"].transform.parent.parent).GetComponent<RectTransform>();
								Vector2 baseSize = viewportRect.sizeDelta;
								Vector2 basePos = Vector2.op_Implicit(((Transform)containerRect).localPosition);
								AppList["modPhone"].Vectors["viewport_size"] = baseSize;
								AppList["modPhone"].Vectors["viewport_pos"] = basePos;
								Vector2 futureSize = new Vector2(baseSize.x, baseSize.y * 0.9f);
								ShortcutExtensions.DOLocalMoveY((Transform)(object)containerRect, basePos.y - (baseSize.y - futureSize.y) / 2f, 0.1f, false);
								DOTween.To((DOGetter<Vector2>)(() => viewportRect.sizeDelta), (DOSetter<Vector2>)delegate(Vector2 change)
								{
									//IL_0006: Unknown result type (might be due to invalid IL or missing references)
									viewportRect.sizeDelta = change;
								}, futureSize, 0.1f);
								DOTween.To((DOGetter<Vector2>)(() => containerRect.sizeDelta), (DOSetter<Vector2>)delegate(Vector2 change)
								{
									//IL_0006: Unknown result type (might be due to invalid IL or missing references)
									containerRect.sizeDelta = change;
								}, futureSize, 0.1f);
							}
						}
					}
				},
				{
					"check tasks",
					new AsyncAction
					{
						Action = async delegate
						{
							if (AppList["modPhone"].runners.Count > 0)
							{
								AppList["modPhone"].runners.RemoveAll((TaskCompletionSource<bool> r) => r.Task.IsCompleted);
								foreach (TaskCompletionSource<bool> runner in AppList["modPhone"].runners)
								{
									await runner.Task;
								}
							}
						}
					}
				},
				{
					"check construction",
					new AsyncAction
					{
						Action = async delegate
						{
							while (!ConstructionFree)
							{
								await Task.Delay(10);
							}
						}
					}
				}
			},
			Prefabs = new Dictionary<string, UIPackage>
			{
				{
					"Home Page",
					new UIPackage
					{
						ObjectName = "Home Page",
						Mark = true,
						Size = Vector2.one,
						Channel1 = ThemeChannel.Clear,
						Children = new List<UIPackage>
						{
							new UIPackage
							{
								ObjectName = "TimeText",
								Radius = 0.77f,
								Size = new Vector2(0.99f, 0.16f),
								Position = new Vector2(0f, 0.7f),
								Channel1 = ThemeChannel.Header,
								Children = new List<UIPackage>
								{
									new UIPackage
									{
										ObjectName = "TimeText",
										Type = UIType.Text,
										Mark = true,
										String = "<align=center><size=50>"
									}
								}
							},
							new UIPackage
							{
								ObjectName = "Depot App",
								Mark = true,
								Type = UIType.Image,
								Path = "otAPI/images/icons/depot_App.png",
								ImgSize = new Vector2Int(288, 256),
								Position = new Vector2(0f, 0.2f),
								ImgScale = 96f
							},
							new UIPackage
							{
								ObjectName = "Retheme App",
								Mark = true,
								Type = UIType.Image,
								Path = "otAPI/images/icons/recolor_App.png",
								ImgSize = new Vector2Int(256, 256),
								Position = new Vector2(-0.5f, -0.4f),
								ImgScale = 96f
							},
							new UIPackage
							{
								ObjectName = "Phone Settings App",
								Mark = true,
								Type = UIType.Image,
								Path = "otAPI/images/icons/settings_App.png",
								ImgSize = new Vector2Int(256, 256),
								Position = new Vector2(0.5f, -0.4f),
								ImgScale = 96f
							}
						},
						PostBuild = delegate(TaskCompletionSource<bool> locker)
						{
							GameObject val7 = AppList["modPhone"].UI["Depot App"];
							GameObject val8 = AppList["modPhone"].UI["Retheme App"];
							GameObject val9 = AppList["modPhone"].UI["Phone Settings App"];
							UIImage component2 = val7.GetComponent<UIImage>();
							UIImage component3 = val8.GetComponent<UIImage>();
							UIImage component4 = val9.GetComponent<UIImage>();
							RectTransform component5 = val7.GetComponent<RectTransform>();
							RectTransform component6 = val8.GetComponent<RectTransform>();
							RectTransform component7 = val9.GetComponent<RectTransform>();
							component2.CreateHoverBehavior(1.428f);
							component3.CreateHoverBehavior(1.428f);
							component4.CreateHoverBehavior(1.428f);
							AddClickAction(val7, async delegate
							{
								AppList["modPhone"].Strings["backbutton_target"] = "home";
								await AppList["modPhone"].Tasks["depot menu"].Run();
							});
							AddClickAction(val8, async delegate
							{
								AppList["modPhone"].Strings["backbutton_target"] = "home";
								await AppList["modPhone"].Tasks["retheme menu"].Run();
							});
							AddClickAction(val9, async delegate
							{
								AppList["modPhone"].Strings["backbutton_target"] = "home";
								await AppList["modPhone"].Tasks["settings menu"].Run();
							});
							((Behaviour)AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect).enabled = false;
							AddUpdateCycle("modPhone", "TimeText Update", delegate
							{
								if ((Object)(object)AppList["modPhone"].UI["TimeText"] != (Object)null && Time.frameCount % 6 == 0)
								{
									AppList["modPhone"].UI["TimeText"].GetComponent<UIText>().SetString("<align=center><size=128>" + DateTime.Now.ToString("h:mm tt"));
								}
							});
							locker.SetResult(result: true);
						}
					}
				},
				{
					"Depot List",
					new UIPackage
					{
						ObjectName = "Depot List",
						Mark = true,
						Size = Vector2.one,
						Channel1 = ThemeChannel.Clear,
						PostBuild = async delegate(TaskCompletionSource<bool> locker)
						{
							((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(true);
							TaskCompletionSource<bool> waiter4 = new TaskCompletionSource<bool>();
							if (!AppList["modPhone"].Bools.ContainsKey("depotlist_setup"))
							{
								AppList["modPhone"].Bools.Add("depotlist_setup", value: false);
							}
							GameObject This4 = AppList["modPhone"].Buffer.Get;
							if (!((Object)(object)This4 == (Object)null))
							{
								VerticalLayoutGroup VLG4 = This4.AddComponent<VerticalLayoutGroup>();
								if (!((Object)(object)VLG4 == (Object)null))
								{
									((HorizontalOrVerticalLayoutGroup)VLG4).childForceExpandWidth = false;
									((HorizontalOrVerticalLayoutGroup)VLG4).childForceExpandHeight = false;
									((HorizontalOrVerticalLayoutGroup)VLG4).spacing = 16f;
									((LayoutGroup)VLG4).childAlignment = (TextAnchor)4;
									UIPackage uIPackage4 = AppList["modPhone"].Prefabs["Depot Menu Label"];
									uIPackage4.Parent = AppList["modPhone"].UI["Depot List"];
									uIPackage4.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
									UIPackage DL = uIPackage4;
									AppList["modPhone"].Prefabs["Depot Menu Label"] = DL;
									List<UIPackage> _build2 = new List<UIPackage>();
									for (int index = 0; index < depots.Count; index++)
									{
										int _index = index;
										Depot depot2 = depots[_index];
										string dname = depot2.name;
										UIPackage newie2 = DL;
										_build2.Add(newie2);
										uIPackage4 = _build2[_build2.Count - 1];
										uIPackage4.ObjectName = $"menulabel_{_index}";
										uIPackage4.Mark = true;
										uIPackage4.Action = async delegate
										{
											if (AppList["modPhone"].UI.ContainsKey("Depot List"))
											{
												AppList["modPhone"].UI["Depot List"].SetActive(false);
											}
											AppList["modPhone"].Strings["backbutton_target"] = "depotlist";
											RunCoroutine(ClearChildren(AppList["modPhone"].UI["Scrollspace"], "modPhone", AppList["modPhone"].PersistentUI, AppList["modPhone"].PersistentUpdates, async delegate
											{
												AppList["modPhone"].Strings["lastapp"] = "depotpage_" + dname;
												if (AppList["modPhone"].PersistentUI.Contains("depotpage_" + dname))
												{
													if (AppList["modPhone"].UI.ContainsKey("depotpage_" + dname))
													{
														AppList["modPhone"].UI["depotpage_" + dname].SetActive(true);
														await Task.Delay(3);
														ScrollRect SR2 = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
														DOTween.To((DOGetter<float>)(() => SR2.verticalNormalizedPosition), (DOSetter<float>)delegate(float change)
														{
															SR2.verticalNormalizedPosition = change;
														}, 1f, 0.1f);
													}
												}
												else
												{
													UIPackage uIPackage5 = AppList["modPhone"].Prefabs["Depot Page"];
													uIPackage5.ObjectName = "depotpage_" + dname;
													uIPackage5.String = $"{_index}";
													UIPackage job = uIPackage5;
													RunCoroutine(QueueJob(KeyValuePair.Create("modPhone", job)));
												}
											}));
										};
										UIPackage _DL = uIPackage4;
										_build2[_index] = _DL;
									}
									RunCoroutine(QueueJobs(KeyValuePair.Create("modPhone", _build2), delegate(TaskCompletionSource<bool> _locker)
									{
										Transform transform = AppList["modPhone"].UI["Depot List"].transform;
										if (transform.childCount > 0)
										{
											for (int j = 0; j < transform.childCount; j++)
											{
												int num = j;
												Transform child4 = transform.GetChild(num);
												if (!((Object)(object)child4 == (Object)null) && child4.childCount > 0)
												{
													UIText component = ((Component)child4.GetChild(0)).GetComponent<UIText>();
													if (!((Object)(object)component == (Object)null))
													{
														component.SetString("<align=center>" + depots[num].name);
													}
												}
											}
										}
										waiter4.SetResult(result: true);
										_locker.SetResult(result: true);
									}), "modPhone");
									await waiter4.Task;
									AppList["modPhone"].Bools["depotlist_setup"] = true;
									((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(false);
									await Task.Delay(25);
									locker.SetResult(result: true);
								}
							}
						}
					}
				},
				{
					"Depot Menu Label",
					new UIPackage
					{
						Type = UIType.Button,
						ObjectName = "Depot Menu Label",
						Size = new Vector2(0.9f, 0.1f),
						Radius = 0.85f,
						Channel1 = ThemeChannel.Button,
						Channel2 = ThemeChannel.Hover,
						Children = new List<UIPackage>
						{
							new UIPackage
							{
								Type = UIType.Text,
								TextSize = 60
							}
						}
					}
				},
				{
					"Depot Page",
					new UIPackage
					{
						StorePackage = true,
						Size = Vector2.one,
						Channel1 = ThemeChannel.Clear,
						PostBuild = async delegate(TaskCompletionSource<bool> locker)
						{
							((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(true);
							TaskCompletionSource<bool> waiter3 = new TaskCompletionSource<bool>();
							GameObject DepotInfo = AppList["modPhone"].Buffer.Get;
							if (!((Object)(object)DepotInfo == (Object)null))
							{
								GameObject This3 = ((Component)DepotInfo.transform.parent.parent).gameObject;
								if (!((Object)(object)This3 == (Object)null))
								{
									UIPanel ThisPanel = This3.GetComponent<UIPanel>();
									if (!((Object)(object)ThisPanel == (Object)null))
									{
										UIPackage source = ThisPanel.UIP;
										int.TryParse(source.String, out var value2);
										Depot depot = depots[value2];
										string name2 = depot.name;
										if (!AppList["modPhone"].Bools.ContainsKey("depotpage_" + name2 + "_setup"))
										{
											AppList["modPhone"].Bools.Add("depotpage_" + name2 + "_setup", value: false);
										}
										VerticalLayoutGroup VLG3 = This3.AddComponent<VerticalLayoutGroup>();
										if (!((Object)(object)VLG3 == (Object)null))
										{
											((HorizontalOrVerticalLayoutGroup)VLG3).childForceExpandWidth = false;
											((HorizontalOrVerticalLayoutGroup)VLG3).childForceExpandHeight = false;
											((LayoutGroup)VLG3).childAlignment = (TextAnchor)4;
											((HorizontalOrVerticalLayoutGroup)VLG3).spacing = 16f;
											string author2 = depot.author;
											string desc = depot.description;
											UIText Name = ((Component)This3.transform.GetChild(0).GetChild(0)).GetComponent<UIText>();
											UIText Author = ((Component)This3.transform.GetChild(0).GetChild(1)).GetComponent<UIText>();
											UIText Info = ((Component)This3.transform.GetChild(0).GetChild(2)).GetComponent<UIText>();
											if (!((Object)(object)Name == (Object)null) && !((Object)(object)Author == (Object)null) && !((Object)(object)Info == (Object)null))
											{
												AppList["modPhone"].PersistentUI.Add("depotpage_" + name2);
												AppList["modPhone"].UI.Add("depotpage_" + name2, This3);
												Name.SetString(name2);
												Author.SetString(author2);
												Info.SetString(desc);
												Name.Text.overflowMode = (TextOverflowModes)1;
												Author.Text.overflowMode = (TextOverflowModes)1;
												Info.Text.overflowMode = (TextOverflowModes)2;
												Info.Text.textWrappingMode = (TextWrappingModes)1;
												List<UIPackage> jobs2 = new List<UIPackage>();
												foreach (KeyValuePair<string, Alias> a in depot.aliases)
												{
													KeyValuePair<string, Alias> A = a;
													if (A.Value.cfgLink != null)
													{
														CfgLink Link = A.Value.cfgLink;
														switch (Link.valueType)
														{
														case ArgType.Bool:
														{
															UIPackage uIPackage3 = AppList["modPhone"].Prefabs["Boolean Setting"];
															uIPackage3.Parent = AppList["modPhone"].UI["depotpage_" + name2];
															uIPackage3.ObjectName = A.Key ?? "";
															uIPackage3.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
															uIPackage3.Ints = new Dictionary<string, int> { { "depot_index", value2 } };
															UIPackage BoolPkg = uIPackage3;
															jobs2.Add(BoolPkg);
															break;
														}
														case ArgType.Float:
														{
															UIPackage uIPackage3 = AppList["modPhone"].Prefabs["Float Setting"];
															uIPackage3.Parent = AppList["modPhone"].UI["depotpage_" + name2];
															uIPackage3.ObjectName = A.Key ?? "";
															uIPackage3.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
															uIPackage3.Ints = new Dictionary<string, int> { { "depot_index", value2 } };
															UIPackage FloatPkg = uIPackage3;
															jobs2.Add(FloatPkg);
															break;
														}
														case ArgType.HexColor:
														{
															UIPackage uIPackage3 = AppList["modPhone"].Prefabs["Color Setting"];
															uIPackage3.Parent = AppList["modPhone"].UI["depotpage_" + name2];
															uIPackage3.ObjectName = A.Key ?? "";
															uIPackage3.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
															uIPackage3.Ints = new Dictionary<string, int> { { "depot_index", value2 } };
															UIPackage HexPkg = uIPackage3;
															jobs2.Add(HexPkg);
															break;
														}
														case ArgType.Int:
														{
															UIPackage uIPackage3 = AppList["modPhone"].Prefabs["Int Setting"];
															uIPackage3.Parent = AppList["modPhone"].UI["depotpage_" + name2];
															uIPackage3.ObjectName = A.Key ?? "";
															uIPackage3.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
															uIPackage3.Ints = new Dictionary<string, int> { { "depot_index", value2 } };
															UIPackage IntPkg = uIPackage3;
															jobs2.Add(IntPkg);
															break;
														}
														case ArgType.String:
														{
															UIPackage uIPackage3 = AppList["modPhone"].Prefabs["String Setting"];
															uIPackage3.Parent = AppList["modPhone"].UI["depotpage_" + name2];
															uIPackage3.ObjectName = A.Key ?? "";
															uIPackage3.ScrollRect = AppList["modPhone"].UI["Scrollspace"].GetComponent<ScrollTunnel>().ScrollRect;
															uIPackage3.Ints = new Dictionary<string, int> { { "depot_index", value2 } };
															UIPackage StringPkg = uIPackage3;
															jobs2.Add(StringPkg);
															break;
														}
														}
													}
												}
												RunCoroutine(QueueJobs(KeyValuePair.Create("modPhone", jobs2), async delegate(TaskCompletionSource<bool> _locker)
												{
													for (int d2 = 0; d2 < This3.transform.childCount; d2++)
													{
														int D2 = d2;
														GameObject child3 = ((Component)This3.transform.GetChild(D2)).gameObject;
														if (!((Object)(object)child3 == (Object)null))
														{
															UIPanel panel = child3.GetComponent<UIPanel>();
															if (!((Object)(object)panel == (Object)null) && depot.aliases.ContainsKey(((Object)child3).name))
															{
																AppList["modPhone"].Buffer.Set(child3);
																if (depot.aliases[((Object)child3).name].cfgLink != null)
																{
																	CfgLink Link2 = depot.aliases[((Object)child3).name].cfgLink;
																	switch (Link2.valueType)
																	{
																	case ArgType.Bool:
																		await AppList["modPhone"].Tasks["setup_boolsetting"].Run();
																		break;
																	case ArgType.Float:
																		await AppList["modPhone"].Tasks["setup_floatsetting"].Run();
																		break;
																	case ArgType.HexColor:
																		await AppList["modPhone"].Tasks["setup_hexsetting"].Run();
																		break;
																	case ArgType.Int:
																		await AppList["modPhone"].Tasks["setup_intsetting"].Run();
																		break;
																	case ArgType.String:
																		await AppList["modPhone"].Tasks["setup_stringsetting"].Run();
																		break;
																	}
																}
															}
														}
													}
													if (!((Object)(object)ThisPanel == (Object)null))
													{
														ThisPanel.UIP = default(UIPackage);
														DOTween.To((DOGetter<float>)(() => source.ScrollRect.verticalNormalizedPosition), (DOSetter<float>)delegate(float change)
														{
															source.ScrollRect.verticalNormalizedPosition = change;
														}, 1f, 0.1f);
														waiter3.SetResult(result: true);
														_locker.SetResult(result: true);
													}
												}));
												await waiter3.Task;
												AppList["modPhone"].Bools["depotpage_" + name2 + "_setup"] = true;
												((Component)AppList["modPhone"].UI["Back Button"].transform.GetChild(0)).gameObject.SetActive(false);
												await Task.Delay(25);
												locker.SetResult(result: true);
											}
										}
									}
								}
							}
						},
						Children = new List<UIPackage>
						{
							new UIPackage
							{
								ObjectName = "Depot Label",
								Radius = 0.33f,
								Expands = false,
								Size = new Vector2(0.95f, 0.25f),
								Channel1 = ThemeChannel.Header,
								Children = new List<UIPackage>
								{
									new UIPackage
									{
										Type = UIType.Text,
										ObjectName = "Depot Name",
										TextSize = 66,
										Position = new Vector2(0f, 0.6f),
										Size = new Vector2(0.85f, 0.5f)
									},
									new UIPackage
									{
										Type = UIType.Text,
										ObjectName = "Depot Author",
										TextSize = 36,
										Position = new Vector2(0f, 0.1f),
										Size = new Vector2(0.85f, 0.3f)
									},
									new UIPackage
									{
										Type = UIType.Text,
										ObjectName = "Depot Info",
										TextSize = 42,
										Position = new Vector2(0f, -0.4f),
										Size = new Vector2(0.85f, 0.3f)
									}
								}
							}
						}
					}
				},
				{
					"Boolean Setting",
					new UIPackage
					{
						ObjectName = "Boolean Setting",
						Size = new Vector2(0.85f, 0.166f),
						Radius = 0.36f,
						Expands = false,
						StartInactive = true,
						StorePackage = true,
						Channel1 = ThemeChannel.Header,
						Children = new List<UIPackage>
						{
							new UIPackage
							{
								ObjectName = "Toggle",
								Size = new Vector2(0.2f, 0.27f),
								Position = new Vector2(0.67f, -0.35f),
								Radius = 0.8f,
								Channel1 = ThemeChannel.Button,
								Channel2 = ThemeChannel.Hover,
								Children = new List<UIPackage>
								{
									new UIPackage
									{
										Type = UIType.Text,
										String = "<align=center>Toggle",
										TextSize = 24
									}
								}
							},
							new UIPackage
							{
								ObjectName = "Setting Current",
								TextSize = 32,
								String = "<align=center>Off",
								Type = UIType.Text,
								Size = new Vector2(0.15f, 0.3f),
								Position = new Vector2(0.77f, 0.5f)
							},
							new UIPackage
							{
								ObjectName = "Setting Name",
								Type = UIType.Text,
								String = "Loading...",
								TextSize = 42,
								Size = new Vector2(0.62f, 0.38f),
								Position = new Vector2(-0.75f, 0.7f)
							},
							new UIPackage
							{
								ObjectName = "Setting Description",
								Type = UIType.Text,
								String = "Loading...",
								TextSize = 32,
								Size = new Vector2(0.62f, 0.4f),
								Position = new Vector2(-0.75f, -0.5f)
							}
						}
					}
				},
				{
					"Float Setting",
					new UIPackage
					{
						ObjectName = "Float Setting",
						Size = new Vector2(0.85f, 0.24f),
						Radius = 0.36f,
						Expands = false,
						StartInactive = true,
						StorePackage = true,
						Channel1 = ThemeChannel.Header,
						Children = new List<UIPackage>
						{
							new UIPackage
							{
								ObjectName = "Slider",
								Type = UIType.Slider,
								Width = 0.6f,
								Size = new Vector2(0.2f, 0.2f),
								Channel1 = ThemeChannel.Text,
								Position = new Vector2(-0.35f, -0.7f)
							},
							new UIPackage
							{
								ObjectName = "Input",
								Type = UIType.Input,
								Placeholder = "0",
								Unclamped = true,
								Width = 0.25f,
								Size = new Vector2(0.2f, 0.2f),
								Position = new Vector2(0.6f, -0.7f)
							},
							new UIPackage
							{
								ObjectName = "Cancel",
								Position = new Vector2(0.67f, 0.55f),
								Size = new Vector2(0.2f, 0.18f),
								Radius = 0.8f,
								Channel1 = ThemeChannel.Button,
								Channel2 = ThemeChannel.Hover,
								Children = new List<UIPackage>
								{
									new UIPackage
									{