Decompiled source of BaboonAPI v2.10.1

BepInEx/plugins/BaboonAPI.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
using <StartupCode$BaboonAPI>;
using <StartupCode$BaboonAPI>.$BaboonAPI.Internal;
using <StartupCode$BaboonAPI>.$BaboonAPI.Utility;
using BaboonAPI;
using BaboonAPI.Event;
using BaboonAPI.Hooks.Entrypoints;
using BaboonAPI.Hooks.Initializer;
using BaboonAPI.Hooks.Saves;
using BaboonAPI.Hooks.Tracks;
using BaboonAPI.Hooks.Tracks.Collections;
using BaboonAPI.Internal;
using BaboonAPI.Internal.BaseGame;
using BaboonAPI.Internal.Customs;
using BaboonAPI.Internal.Tootmaker;
using BaboonAPI.Internal.Workshop;
using BaboonAPI.Patch;
using BaboonAPI.Utility;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.FSharp.Collections;
using Microsoft.FSharp.Control;
using Microsoft.FSharp.Core;
using Microsoft.FSharp.Core.CompilerServices;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Steamworks;
using UnityEngine;
using UnityEngine.Localization;
using UnityEngine.Localization.Settings;
using UnityEngine.Networking;
using UnityEngine.UI;

[assembly: FSharpInterfaceDataVersion(2, 0, 0)]
[assembly: AssemblyCompany("TromboneChamps")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Trombone Champ modding API")]
[assembly: AssemblyFileVersion("2.10.1.0")]
[assembly: AssemblyInformationalVersion("2.10.1+1b5823b7bc672fc6af0b9485bc6fa52ce235fb19")]
[assembly: AssemblyProduct("BaboonAPI")]
[assembly: AssemblyTitle("BaboonAPI")]
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/tc-mods/BaboonAPI/")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("2.10.1.0")]
namespace BaboonAPI.Event
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface Event<T>
	{
		T invoker { get; }

		virtual void Register(T P_0);

		virtual void Unregister(T P_0);
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class EventFactory<T> : Event<T>
	{
		internal FSharpFunc<FSharpList<T>, T> reducer;

		internal FSharpList<T> handlers;

		public EventFactory(FSharpFunc<FSharpList<T>, T> reducer)
		{
			this.reducer = reducer;
			handlers = FSharpList<T>.Empty;
		}

		public static Event<T> create(FSharpFunc<FSharpList<T>, T> reducer)
		{
			return new EventFactory<T>(reducer);
		}

		[SpecialName]
		virtual T Event<T>.get_invoker()
		{
			return ((FSharpFunc<FSharpList<FSharpList<T>>, FSharpList<T>>)(object)reducer).Invoke((FSharpList<FSharpList<T>>)(object)handlers);
		}

		virtual void Event<T>.Register(T handler)
		{
			handlers = FSharpList<T>.Cons(handler, handlers);
		}

		virtual void Event<T>.Unregister(T handler)
		{
			handlers = ListModule.Filter<T>((FSharpFunc<T, bool>)new $EventBus.BaboonAPI-Event-Event<'T>-Unregister@18<T>(handler), handlers);
		}
	}
}
namespace BaboonAPI.Hooks.Tracks
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public sealed class TrackAudio : IEquatable<TrackAudio>, IStructuralEquatable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal AudioClip Clip@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal float Volume@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public AudioClip Clip
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Clip@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public float Volume
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Volume@;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(TrackAudio))]
		public TrackAudio(AudioClip clip, float volume)
		{
			Clip@ = clip;
			Volume@ = volume;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<TrackAudio, string>>((PrintfFormat<FSharpFunc<TrackAudio, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<TrackAudio, string>, Unit, string, string, TrackAudio>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				num = -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<float>(comp, Volume@) + ((num << 6) + (num >> 2)));
				return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<AudioClip>(comp, Clip@) + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(TrackAudio obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityWithComparerIntrinsic<AudioClip>(comp, Clip@, obj.Clip@))
					{
						return Volume@ == obj.Volume@;
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is TrackAudio obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(TrackAudio obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityERIntrinsic<AudioClip>(Clip@, obj.Clip@))
					{
						float volume@ = Volume@;
						float volume@2 = obj.Volume@;
						if (volume@ == volume@2)
						{
							return true;
						}
						if (volume@ != volume@)
						{
							return volume@2 != volume@2;
						}
						return false;
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is TrackAudio obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class BackgroundContext
	{
		internal GameController controller@23;

		public GameController controller => controller@23;

		public BackgroundContext(GameController controller)
		{
			controller@23 = controller;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface LoadedTromboneTrack : IDisposable
	{
		string trackref { get; }

		virtual TrackAudio LoadAudio();

		virtual GameObject LoadBackground(BackgroundContext ctx);

		[CompilationArgumentCounts(new int[] { 1, 1 })]
		virtual void SetUpBackgroundDelayed(BGController controller, GameObject bg);
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface TromboneTrack
	{
		string trackref { get; }

		string trackname_long { get; }

		string trackname_short { get; }

		string year { get; }

		string artist { get; }

		string desc { get; }

		string genre { get; }

		int difficulty { get; }

		int tempo { get; }

		int length { get; }

		virtual SavedLevel LoadChart();

		virtual LoadedTromboneTrack LoadTrack();

		virtual bool IsVisible();
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class PauseContext
	{
		internal PauseCanvasController controller;

		public GameController gameController => controller.gc;

		public BGController backgroundController => controller.gc.bgcontroller;

		public GameObject backgroundObj => controller.gc.bgcontroller.fullbgobject;

		public PauseContext(PauseCanvasController controller)
		{
			this.controller = controller;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface PauseAware
	{
		bool CanResume { get; }

		virtual void OnPause(PauseContext P_0);

		virtual void OnResume(PauseContext P_0);
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface AsyncAudioAware
	{
		virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> LoadAudio();
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface Previewable
	{
		virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> LoadClip();
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface Sortable
	{
		int sortOrder { get; }
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface FilesystemTrack
	{
		string folderPath { get; }
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public sealed class SongGraph : IEquatable<SongGraph>, IStructuralEquatable, IComparable<SongGraph>, IComparable, IStructuralComparable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int fury@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int tears@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int spunk@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int doots@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int slides@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int fury
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return fury@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int tears
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return tears@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int spunk
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return spunk@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int doots
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return doots@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int slides
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return slides@;
			}
		}

		public int[] asArray => new int[5] { fury@, tears@, spunk@, doots@, slides@ };

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(SongGraph))]
		public SongGraph(int fury, int tears, int spunk, int doots, int slides)
		{
			fury@ = fury;
			tears@ = tears;
			spunk@ = spunk;
			doots@ = doots;
			slides@ = slides;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<SongGraph, string>>((PrintfFormat<FSharpFunc<SongGraph, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<SongGraph, string>, Unit, string, string, SongGraph>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int CompareTo(SongGraph obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					IComparer genericComparer = LanguagePrimitives.GenericComparer;
					int num = fury@;
					int num2 = obj.fury@;
					int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
					if (num3 < 0)
					{
						return num3;
					}
					if (num3 > 0)
					{
						return num3;
					}
					return $TrackRegistry.CompareTo$cont@117(this, obj, null);
				}
				return 1;
			}
			if (obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj)
		{
			return CompareTo((SongGraph)obj);
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj, IComparer comp)
		{
			SongGraph songGraph = (SongGraph)obj;
			if (this != null)
			{
				if ((SongGraph)obj != null)
				{
					int num = fury@;
					int num2 = songGraph.fury@;
					int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
					if (num3 < 0)
					{
						return num3;
					}
					if (num3 > 0)
					{
						return num3;
					}
					return $TrackRegistry.CompareTo$cont@117-1(this, songGraph, null);
				}
				return 1;
			}
			if ((SongGraph)obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				num = -1640531527 + (slides@ + ((num << 6) + (num >> 2)));
				num = -1640531527 + (doots@ + ((num << 6) + (num >> 2)));
				num = -1640531527 + (spunk@ + ((num << 6) + (num >> 2)));
				num = -1640531527 + (tears@ + ((num << 6) + (num >> 2)));
				return -1640531527 + (fury@ + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(SongGraph obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (fury@ == obj.fury@)
					{
						if (tears@ == obj.tears@)
						{
							if (spunk@ == obj.spunk@)
							{
								if (doots@ == obj.doots@)
								{
									return slides@ == obj.slides@;
								}
								return false;
							}
							return false;
						}
						return false;
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is SongGraph obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		public static SongGraph all(int value)
		{
			return new SongGraph(value, value, value, value, value);
		}

		[CompilerGenerated]
		public sealed bool Equals(SongGraph obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (fury@ == obj.fury@)
					{
						if (tears@ == obj.tears@)
						{
							if (spunk@ == obj.spunk@)
							{
								if (doots@ == obj.doots@)
								{
									return slides@ == obj.slides@;
								}
								return false;
							}
							return false;
						}
						return false;
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is SongGraph obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface Graphable
	{
		virtual FSharpOption<SongGraph> CreateGraph();
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface TromboneCollection
	{
		IEnumerable<TromboneTrack> tracks { get; }

		string unique_id { get; }

		string name { get; }

		string description { get; }

		virtual BaboonAPI.Utility.Coroutines.YieldTask<TrackCollection> Resolve(int index);
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public sealed class ProgressUpdate : IEquatable<ProgressUpdate>, IStructuralEquatable, IComparable<ProgressUpdate>, IComparable, IStructuralComparable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int loaded@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int loaded
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return loaded@;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(ProgressUpdate))]
		public ProgressUpdate(int loaded)
		{
			loaded@ = loaded;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<ProgressUpdate, string>>((PrintfFormat<FSharpFunc<ProgressUpdate, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<ProgressUpdate, string>, Unit, string, string, ProgressUpdate>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int CompareTo(ProgressUpdate obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					IComparer genericComparer = LanguagePrimitives.GenericComparer;
					int num = loaded@;
					int num2 = obj.loaded@;
					return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
				}
				return 1;
			}
			if (obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj)
		{
			return CompareTo((ProgressUpdate)obj);
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj, IComparer comp)
		{
			ProgressUpdate progressUpdate = (ProgressUpdate)obj;
			if (this != null)
			{
				if ((ProgressUpdate)obj != null)
				{
					int num = loaded@;
					int num2 = progressUpdate.loaded@;
					return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
				}
				return 1;
			}
			if ((ProgressUpdate)obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				return -1640531527 + (loaded@ + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(ProgressUpdate obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					return loaded@ == obj.loaded@;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is ProgressUpdate obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(ProgressUpdate obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					return loaded@ == obj.loaded@;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is ProgressUpdate obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public sealed class TracksLoadedInfo : IEquatable<TracksLoadedInfo>, IStructuralEquatable, IComparable<TracksLoadedInfo>, IComparable, IStructuralComparable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int totalTracks@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal int totalCollections@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int totalTracks
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return totalTracks@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public int totalCollections
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return totalCollections@;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(TracksLoadedInfo))]
		public TracksLoadedInfo(int totalTracks, int totalCollections)
		{
			totalTracks@ = totalTracks;
			totalCollections@ = totalCollections;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<TracksLoadedInfo, string>>((PrintfFormat<FSharpFunc<TracksLoadedInfo, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<TracksLoadedInfo, string>, Unit, string, string, TracksLoadedInfo>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int CompareTo(TracksLoadedInfo obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					IComparer genericComparer = LanguagePrimitives.GenericComparer;
					int num = totalTracks@;
					int num2 = obj.totalTracks@;
					int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
					if (num3 < 0)
					{
						return num3;
					}
					if (num3 > 0)
					{
						return num3;
					}
					genericComparer = LanguagePrimitives.GenericComparer;
					num = totalCollections@;
					num2 = obj.totalCollections@;
					return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
				}
				return 1;
			}
			if (obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj)
		{
			return CompareTo((TracksLoadedInfo)obj);
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj, IComparer comp)
		{
			TracksLoadedInfo tracksLoadedInfo = (TracksLoadedInfo)obj;
			if (this != null)
			{
				if ((TracksLoadedInfo)obj != null)
				{
					int num = totalTracks@;
					int num2 = tracksLoadedInfo.totalTracks@;
					int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
					if (num3 < 0)
					{
						return num3;
					}
					if (num3 > 0)
					{
						return num3;
					}
					num = totalCollections@;
					num2 = tracksLoadedInfo.totalCollections@;
					return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0);
				}
				return 1;
			}
			if ((TracksLoadedInfo)obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				num = -1640531527 + (totalCollections@ + ((num << 6) + (num >> 2)));
				return -1640531527 + (totalTracks@ + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(TracksLoadedInfo obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (totalTracks@ == obj.totalTracks@)
					{
						return totalCollections@ == obj.totalCollections@;
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is TracksLoadedInfo obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(TracksLoadedInfo obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (totalTracks@ == obj.totalTracks@)
					{
						return totalCollections@ == obj.totalCollections@;
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is TracksLoadedInfo obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
	[Serializable]
	[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
	[DebuggerDisplay("{__DebugDisplay(),nq}")]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public abstract class Progress : IEquatable<Progress>, IStructuralEquatable, IComparable<Progress>, IComparable, IStructuralComparable
	{
		public static class Tags
		{
			public const int LoadingTracks = 0;

			public const int LoadingCollections = 1;

			public const int FirstStageDone = 2;

			public const int ResolvingCollections = 3;

			public const int SecondStageDone = 4;
		}

		[Serializable]
		[SpecialName]
		[DebuggerTypeProxy(typeof(LoadingTracks@DebugTypeProxy))]
		[DebuggerDisplay("{__DebugDisplay(),nq}")]
		public class LoadingTracks : Progress
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal readonly ProgressUpdate item;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal LoadingTracks(ProgressUpdate item)
				: base(0)
			{
				this.item = item;
			}
		}

		[Serializable]
		[SpecialName]
		[DebuggerTypeProxy(typeof(LoadingCollections@DebugTypeProxy))]
		[DebuggerDisplay("{__DebugDisplay(),nq}")]
		public class LoadingCollections : Progress
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal readonly ProgressUpdate item;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal LoadingCollections(ProgressUpdate item)
				: base(1)
			{
				this.item = item;
			}
		}

		[Serializable]
		[SpecialName]
		[DebuggerTypeProxy(typeof(FirstStageDone@DebugTypeProxy))]
		[DebuggerDisplay("{__DebugDisplay(),nq}")]
		public class FirstStageDone : Progress
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal readonly TracksLoadedInfo item;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public TracksLoadedInfo Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal FirstStageDone(TracksLoadedInfo item)
				: base(2)
			{
				this.item = item;
			}
		}

		[Serializable]
		[SpecialName]
		[DebuggerTypeProxy(typeof(ResolvingCollections@DebugTypeProxy))]
		[DebuggerDisplay("{__DebugDisplay(),nq}")]
		public class ResolvingCollections : Progress
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal readonly ProgressUpdate item;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal ResolvingCollections(ProgressUpdate item)
				: base(3)
			{
				this.item = item;
			}
		}

		[Serializable]
		[SpecialName]
		[DebuggerTypeProxy(typeof(SecondStageDone@DebugTypeProxy))]
		[DebuggerDisplay("{__DebugDisplay(),nq}")]
		public class SecondStageDone : Progress
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal readonly ProgressUpdate item;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal SecondStageDone(ProgressUpdate item)
				: base(4)
			{
				this.item = item;
			}
		}

		[SpecialName]
		internal class LoadingTracks@DebugTypeProxy
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal LoadingTracks _obj;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return _obj.item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public LoadingTracks@DebugTypeProxy(LoadingTracks obj)
			{
				_obj = obj;
			}
		}

		[SpecialName]
		internal class LoadingCollections@DebugTypeProxy
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal LoadingCollections _obj;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return _obj.item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public LoadingCollections@DebugTypeProxy(LoadingCollections obj)
			{
				_obj = obj;
			}
		}

		[SpecialName]
		internal class FirstStageDone@DebugTypeProxy
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal FirstStageDone _obj;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public TracksLoadedInfo Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return _obj.item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public FirstStageDone@DebugTypeProxy(FirstStageDone obj)
			{
				_obj = obj;
			}
		}

		[SpecialName]
		internal class ResolvingCollections@DebugTypeProxy
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal ResolvingCollections _obj;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return _obj.item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ResolvingCollections@DebugTypeProxy(ResolvingCollections obj)
			{
				_obj = obj;
			}
		}

		[SpecialName]
		internal class SecondStageDone@DebugTypeProxy
		{
			[DebuggerBrowsable(DebuggerBrowsableState.Never)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			internal SecondStageDone _obj;

			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public ProgressUpdate Item
			{
				[CompilerGenerated]
				[DebuggerNonUserCode]
				get
				{
					return _obj.item;
				}
			}

			[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
			[CompilerGenerated]
			[DebuggerNonUserCode]
			public SecondStageDone@DebugTypeProxy(SecondStageDone obj)
			{
				_obj = obj;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		[field: DebuggerNonUserCode]
		public int Tag
		{
			[DebuggerNonUserCode]
			get;
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public bool IsLoadingTracks
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Tag == 0;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public bool IsLoadingCollections
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Tag == 1;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public bool IsFirstStageDone
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Tag == 2;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public bool IsResolvingCollections
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Tag == 3;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public bool IsSecondStageDone
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Tag == 4;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicNestedTypes | DynamicallyAccessedMemberTypes.NonPublicNestedTypes | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal Progress(int _tag)
		{
			this._tag = _tag;
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public static Progress NewLoadingTracks(ProgressUpdate item)
		{
			return new LoadingTracks(item);
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public static Progress NewLoadingCollections(ProgressUpdate item)
		{
			return new LoadingCollections(item);
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public static Progress NewFirstStageDone(TracksLoadedInfo item)
		{
			return new FirstStageDone(item);
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public static Progress NewResolvingCollections(ProgressUpdate item)
		{
			return new ResolvingCollections(item);
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public static Progress NewSecondStageDone(ProgressUpdate item)
		{
			return new SecondStageDone(item);
		}

		[SpecialName]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal object __DebugDisplay()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<Progress, string>>((PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string, string>("%+0.8A")).Invoke(this);
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<Progress, string>>((PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string, Progress>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public virtual sealed int CompareTo(Progress obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					int tag = _tag;
					int tag2 = obj._tag;
					if (tag == tag2)
					{
						switch (Tag)
						{
						default:
						{
							LoadingTracks loadingTracks = (LoadingTracks)this;
							LoadingTracks loadingTracks2 = (LoadingTracks)obj;
							IComparer genericComparer = LanguagePrimitives.GenericComparer;
							ProgressUpdate item = loadingTracks.item;
							ProgressUpdate item2 = loadingTracks2.item;
							return item.CompareTo(item2, genericComparer);
						}
						case 1:
						{
							LoadingCollections loadingCollections = (LoadingCollections)this;
							LoadingCollections loadingCollections2 = (LoadingCollections)obj;
							IComparer genericComparer = LanguagePrimitives.GenericComparer;
							ProgressUpdate item = loadingCollections.item;
							ProgressUpdate item2 = loadingCollections2.item;
							return item.CompareTo(item2, genericComparer);
						}
						case 2:
						{
							FirstStageDone firstStageDone = (FirstStageDone)this;
							FirstStageDone firstStageDone2 = (FirstStageDone)obj;
							IComparer genericComparer = LanguagePrimitives.GenericComparer;
							TracksLoadedInfo item3 = firstStageDone.item;
							TracksLoadedInfo item4 = firstStageDone2.item;
							return item3.CompareTo(item4, genericComparer);
						}
						case 3:
						{
							ResolvingCollections resolvingCollections = (ResolvingCollections)this;
							ResolvingCollections resolvingCollections2 = (ResolvingCollections)obj;
							IComparer genericComparer = LanguagePrimitives.GenericComparer;
							ProgressUpdate item = resolvingCollections.item;
							ProgressUpdate item2 = resolvingCollections2.item;
							return item.CompareTo(item2, genericComparer);
						}
						case 4:
						{
							SecondStageDone secondStageDone = (SecondStageDone)this;
							SecondStageDone secondStageDone2 = (SecondStageDone)obj;
							IComparer genericComparer = LanguagePrimitives.GenericComparer;
							ProgressUpdate item = secondStageDone.item;
							ProgressUpdate item2 = secondStageDone2.item;
							return item.CompareTo(item2, genericComparer);
						}
						}
					}
					return tag - tag2;
				}
				return 1;
			}
			if (obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public virtual sealed int CompareTo(object obj)
		{
			return CompareTo((Progress)obj);
		}

		[CompilerGenerated]
		public virtual sealed int CompareTo(object obj, IComparer comp)
		{
			Progress progress = (Progress)obj;
			if (this != null)
			{
				if ((Progress)obj != null)
				{
					int tag = _tag;
					int tag2 = progress._tag;
					if (tag == tag2)
					{
						switch (Tag)
						{
						default:
						{
							LoadingTracks loadingTracks = (LoadingTracks)this;
							LoadingTracks loadingTracks2 = (LoadingTracks)progress;
							ProgressUpdate item = loadingTracks.item;
							ProgressUpdate item2 = loadingTracks2.item;
							return item.CompareTo(item2, comp);
						}
						case 1:
						{
							LoadingCollections loadingCollections = (LoadingCollections)this;
							LoadingCollections loadingCollections2 = (LoadingCollections)progress;
							ProgressUpdate item = loadingCollections.item;
							ProgressUpdate item2 = loadingCollections2.item;
							return item.CompareTo(item2, comp);
						}
						case 2:
						{
							FirstStageDone firstStageDone = (FirstStageDone)this;
							FirstStageDone firstStageDone2 = (FirstStageDone)progress;
							TracksLoadedInfo item3 = firstStageDone.item;
							TracksLoadedInfo item4 = firstStageDone2.item;
							return item3.CompareTo(item4, comp);
						}
						case 3:
						{
							ResolvingCollections resolvingCollections = (ResolvingCollections)this;
							ResolvingCollections resolvingCollections2 = (ResolvingCollections)progress;
							ProgressUpdate item = resolvingCollections.item;
							ProgressUpdate item2 = resolvingCollections2.item;
							return item.CompareTo(item2, comp);
						}
						case 4:
						{
							SecondStageDone secondStageDone = (SecondStageDone)this;
							SecondStageDone secondStageDone2 = (SecondStageDone)progress;
							ProgressUpdate item = secondStageDone.item;
							ProgressUpdate item2 = secondStageDone2.item;
							return item.CompareTo(item2, comp);
						}
						}
					}
					return tag - tag2;
				}
				return 1;
			}
			if ((Progress)obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public virtual sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				switch (Tag)
				{
				default:
				{
					LoadingTracks loadingTracks = (LoadingTracks)this;
					num = 0;
					return -1640531527 + (loadingTracks.item.GetHashCode(comp) + ((num << 6) + (num >> 2)));
				}
				case 1:
				{
					LoadingCollections loadingCollections = (LoadingCollections)this;
					num = 1;
					return -1640531527 + (loadingCollections.item.GetHashCode(comp) + ((num << 6) + (num >> 2)));
				}
				case 2:
				{
					FirstStageDone firstStageDone = (FirstStageDone)this;
					num = 2;
					return -1640531527 + (firstStageDone.item.GetHashCode(comp) + ((num << 6) + (num >> 2)));
				}
				case 3:
				{
					ResolvingCollections resolvingCollections = (ResolvingCollections)this;
					num = 3;
					return -1640531527 + (resolvingCollections.item.GetHashCode(comp) + ((num << 6) + (num >> 2)));
				}
				case 4:
				{
					SecondStageDone secondStageDone = (SecondStageDone)this;
					num = 4;
					return -1640531527 + (secondStageDone.item.GetHashCode(comp) + ((num << 6) + (num >> 2)));
				}
				}
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(Progress obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					int tag = _tag;
					int tag2 = obj._tag;
					if (tag == tag2)
					{
						switch (Tag)
						{
						default:
						{
							LoadingTracks loadingTracks = (LoadingTracks)this;
							LoadingTracks loadingTracks2 = (LoadingTracks)obj;
							ProgressUpdate item = loadingTracks.item;
							ProgressUpdate item2 = loadingTracks2.item;
							return item.Equals(item2, comp);
						}
						case 1:
						{
							LoadingCollections loadingCollections = (LoadingCollections)this;
							LoadingCollections loadingCollections2 = (LoadingCollections)obj;
							ProgressUpdate item = loadingCollections.item;
							ProgressUpdate item2 = loadingCollections2.item;
							return item.Equals(item2, comp);
						}
						case 2:
						{
							FirstStageDone firstStageDone = (FirstStageDone)this;
							FirstStageDone firstStageDone2 = (FirstStageDone)obj;
							TracksLoadedInfo item3 = firstStageDone.item;
							TracksLoadedInfo item4 = firstStageDone2.item;
							return item3.Equals(item4, comp);
						}
						case 3:
						{
							ResolvingCollections resolvingCollections = (ResolvingCollections)this;
							ResolvingCollections resolvingCollections2 = (ResolvingCollections)obj;
							ProgressUpdate item = resolvingCollections.item;
							ProgressUpdate item2 = resolvingCollections2.item;
							return item.Equals(item2, comp);
						}
						case 4:
						{
							SecondStageDone secondStageDone = (SecondStageDone)this;
							SecondStageDone secondStageDone2 = (SecondStageDone)obj;
							ProgressUpdate item = secondStageDone.item;
							ProgressUpdate item2 = secondStageDone2.item;
							return item.Equals(item2, comp);
						}
						}
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public virtual sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is Progress obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public virtual sealed bool Equals(Progress obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					int tag = _tag;
					int tag2 = obj._tag;
					if (tag == tag2)
					{
						switch (Tag)
						{
						default:
						{
							LoadingTracks loadingTracks = (LoadingTracks)this;
							LoadingTracks loadingTracks2 = (LoadingTracks)obj;
							return loadingTracks.item.Equals(loadingTracks2.item);
						}
						case 1:
						{
							LoadingCollections loadingCollections = (LoadingCollections)this;
							LoadingCollections loadingCollections2 = (LoadingCollections)obj;
							return loadingCollections.item.Equals(loadingCollections2.item);
						}
						case 2:
						{
							FirstStageDone firstStageDone = (FirstStageDone)this;
							FirstStageDone firstStageDone2 = (FirstStageDone)obj;
							return firstStageDone.item.Equals(firstStageDone2.item);
						}
						case 3:
						{
							ResolvingCollections resolvingCollections = (ResolvingCollections)this;
							ResolvingCollections resolvingCollections2 = (ResolvingCollections)obj;
							return resolvingCollections.item.Equals(resolvingCollections2.item);
						}
						case 4:
						{
							SecondStageDone secondStageDone = (SecondStageDone)this;
							SecondStageDone secondStageDone2 = (SecondStageDone)obj;
							return secondStageDone.item.Equals(secondStageDone2.item);
						}
						}
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is Progress obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public enum LoadingPriority
	{
		Vanilla,
		Modded
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface CustomTrackLoader
	{
		LoadingPriority Priority { get; }

		virtual FSharpOption<TromboneTrack> LoadTrack(string folderPath);
	}
}
namespace BaboonAPI.Hooks.Saves
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface ICustomSaveData<a>
	{
		virtual a Save();

		virtual void Load(a data);

		virtual a Convert(JObject o);
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public interface SaverCapability
	{
		[CompilationArgumentCounts(new int[] { 1, 1 })]
		virtual void Attach<a>(string name, ICustomSaveData<a> target);
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class PluginSaverLoader
	{
		internal string pluginGuid;

		internal FSharpFunc<SaverCapability, Unit> attacher;

		public PluginSaverLoader(string pluginGuid, FSharpFunc<SaverCapability, Unit> attacher)
		{
			this.pluginGuid = pluginGuid;
			this.attacher = attacher;
		}

		internal FSharpMap<string, object> Save(FSharpMap<string, object> pluginData)
		{
			FSharpRef<FSharpMap<string, object>> val = new FSharpRef<FSharpMap<string, object>>(pluginData);
			attacher.Invoke((SaverCapability)new $CustomSaveData.Save@49(this, val));
			return val.contents;
		}

		internal void Load(FSharpMap<string, JObject> pluginData)
		{
			attacher.Invoke((SaverCapability)new $CustomSaveData.Load@56(this, pluginData));
		}
	}
}
namespace BaboonAPI.Hooks.Initializer
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public sealed class LoadError : IEquatable<LoadError>, IStructuralEquatable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal PluginInfo PluginInfo@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal string Message@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public PluginInfo PluginInfo
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return PluginInfo@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public string Message
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Message@;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(LoadError))]
		public LoadError(PluginInfo pluginInfo, string message)
		{
			PluginInfo@ = pluginInfo;
			Message@ = message;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<LoadError, string>>((PrintfFormat<FSharpFunc<LoadError, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<LoadError, string>, Unit, string, string, LoadError>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				num = -1640531527 + ((Message@?.GetHashCode() ?? 0) + ((num << 6) + (num >> 2)));
				return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<PluginInfo>(comp, PluginInfo@) + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(LoadError obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityWithComparerIntrinsic<PluginInfo>(comp, PluginInfo@, obj.PluginInfo@))
					{
						return string.Equals(Message@, obj.Message@);
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is LoadError obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(LoadError obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityERIntrinsic<PluginInfo>(PluginInfo@, obj.PluginInfo@))
					{
						return string.Equals(Message@, obj.Message@);
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is LoadError obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
}
namespace BaboonAPI.Hooks.Entrypoints
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class BaboonEntryPointAttribute : Attribute
	{
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public sealed class EntryPointContainer<t> : IEquatable<EntryPointContainer<t>>, IStructuralEquatable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal PluginInfo Source@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal t Instance@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public PluginInfo Source
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Source@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		public t Instance
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Instance@;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(EntryPointContainer<>))]
		public EntryPointContainer(PluginInfo source, t instance)
		{
			Source@ = source;
			Instance@ = instance;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ((FSharpFunc<EntryPointContainer<EntryPointContainer<t>>, string>)(object)ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<EntryPointContainer<t>, string>>((PrintfFormat<FSharpFunc<EntryPointContainer<t>, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<EntryPointContainer<FSharpFunc<EntryPointContainer<t>, string>>, string>, Unit, string, string, EntryPointContainer<FSharpFunc<EntryPointContainer<t>, string>>>("%+A"))).Invoke((EntryPointContainer<EntryPointContainer<t>>)(object)this);
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				t instance@ = Instance@;
				num = -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<t>(comp, instance@) + ((num << 6) + (num >> 2)));
				return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<PluginInfo>(comp, Source@) + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(EntryPointContainer<t> obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityWithComparerIntrinsic<PluginInfo>(comp, Source@, obj.Source@))
					{
						t instance@ = Instance@;
						t instance@2 = obj.Instance@;
						return HashCompare.GenericEqualityWithComparerIntrinsic<t>(comp, instance@, instance@2);
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is EntryPointContainer<t> obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(EntryPointContainer<t> obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityERIntrinsic<PluginInfo>(Source@, obj.Source@))
					{
						t instance@ = Instance@;
						t instance@2 = obj.Instance@;
						return HashCompare.GenericEqualityERIntrinsic<t>(instance@, instance@2);
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is EntryPointContainer<t> obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
}
namespace BaboonAPI.Hooks.Tracks.Collections
{
	[Serializable]
	[AbstractClass]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public abstract class BaseTromboneCollection : TromboneCollection
	{
		internal string name@11;

		internal string id;

		internal string description@11;

		internal static ManualLogSource logger;

		internal static int init@11;

		public override string folder => "";

		public abstract virtual IEnumerable<TromboneTrack> BuildTrackList();

		public abstract virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite();

		public BaseTromboneCollection(string id, string name, string description)
		{
			this.id = id;
			name@11 = name;
			description@11 = description;
		}

		[SpecialName]
		virtual string TromboneCollection.get_unique_id()
		{
			return id;
		}

		[SpecialName]
		virtual string TromboneCollection.get_name()
		{
			return name@11;
		}

		[SpecialName]
		virtual string TromboneCollection.get_description()
		{
			return description@11;
		}

		[SpecialName]
		virtual IEnumerable<TromboneTrack> TromboneCollection.get_tracks()
		{
			return BuildTrackList();
		}

		virtual BaboonAPI.Utility.Coroutines.YieldTask<TrackCollection> TromboneCollection.Resolve(int index)
		{
			return BaboonAPI.Utility.Coroutines.map(new $TrackCollections.BaboonAPI-Hooks-Tracks-TromboneCollection-Resolve@31(this, index), LoadSprite());
		}

		static BaseTromboneCollection()
		{
			$TrackCollections.init@ = 0;
			_ = $TrackCollections.init@;
		}
	}
}
namespace BaboonAPI.Internal.BaseGame
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class BaseGameLoadedTrack : PauseAware, LoadedTromboneTrack
	{
		internal string trackref@14;

		internal AssetBundle bundle;

		internal BaseGameLoadedTrack(string trackref, AssetBundle bundle)
		{
			trackref@14 = trackref;
			this.bundle = bundle;
		}

		virtual TrackAudio LoadedTromboneTrack.LoadAudio()
		{
			GameObject val = bundle.LoadAsset<GameObject>(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("music_%P()", new object[1] { trackref@14 }, (Type[])null)));
			AudioSource component = val.GetComponent<AudioSource>();
			return new TrackAudio(component.clip, component.volume);
		}

		virtual GameObject LoadedTromboneTrack.LoadBackground(BackgroundContext _ctx)
		{
			return bundle.LoadAsset<GameObject>(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("BGCam_%P()", new object[1] { trackref@14 }, (Type[])null)));
		}

		virtual void IDisposable.Dispose()
		{
			bundle.Unload(true);
		}

		[CompilationArgumentCounts(new int[] { 1, 1 })]
		virtual void LoadedTromboneTrack.SetUpBackgroundDelayed(BGController _arg2, GameObject _arg1)
		{
		}

		[SpecialName]
		virtual string LoadedTromboneTrack.get_trackref()
		{
			return trackref@14;
		}

		[SpecialName]
		virtual bool PauseAware.get_CanResume()
		{
			return true;
		}

		virtual void PauseAware.OnPause(PauseContext _arg3)
		{
		}

		virtual void PauseAware.OnResume(PauseContext _arg4)
		{
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class BaseGameTrack : FilesystemTrack, Graphable, Previewable, Sortable, TromboneTrack
	{
		internal string trackref@40;

		internal SavedLevelMetadata data;

		internal string trackPath;

		internal BaseGameTrack(SavedLevelMetadata data, string trackref)
		{
			this.data = data;
			trackref@40 = trackref;
			trackPath = PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Tuple<string, string>>("%P()/trackassets/%P()", new object[2]
			{
				Application.streamingAssetsPath,
				trackref@40
			}, (Type[])null));
		}

		[SpecialName]
		virtual string TromboneTrack.get_trackname_long()
		{
			return data.trackname_long;
		}

		[SpecialName]
		virtual string TromboneTrack.get_trackname_short()
		{
			return data.trackname_short;
		}

		[SpecialName]
		virtual string TromboneTrack.get_trackref()
		{
			return trackref@40;
		}

		[SpecialName]
		virtual string TromboneTrack.get_year()
		{
			return data.year;
		}

		[SpecialName]
		virtual string TromboneTrack.get_artist()
		{
			return data.artist;
		}

		[SpecialName]
		virtual string TromboneTrack.get_genre()
		{
			return data.genre;
		}

		[SpecialName]
		virtual string TromboneTrack.get_desc()
		{
			return data.description;
		}

		[SpecialName]
		virtual int TromboneTrack.get_difficulty()
		{
			return data.difficulty;
		}

		[SpecialName]
		virtual int TromboneTrack.get_length()
		{
			return data.length;
		}

		[SpecialName]
		virtual int TromboneTrack.get_tempo()
		{
			return data.tempo;
		}

		virtual LoadedTromboneTrack TromboneTrack.LoadTrack()
		{
			AssetBundle bundle = AssetBundle.LoadFromFile(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/contentbundle", new object[1] { trackPath }, (Type[])null)));
			return new BaseGameLoadedTrack(trackref@40, bundle);
		}

		virtual bool TromboneTrack.IsVisible()
		{
			string a = trackref@40;
			if (string.Equals(a, "einefinal") || string.Equals(a, "tchampmedley"))
			{
				return GlobalVariables.localsave.progression_trombone_champ;
			}
			return true;
		}

		virtual SavedLevel TromboneTrack.LoadChart()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Expected O, but got Unknown
			string path = PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/trackdata.tmb", new object[1] { trackPath }, (Type[])null));
			using FileStream serializationStream = File.Open(path, FileMode.Open);
			return (SavedLevel)new BinaryFormatter().Deserialize(serializationStream);
		}

		[SpecialName]
		virtual int Sortable.get_sortOrder()
		{
			return data.sort_order;
		}

		virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> Previewable.LoadClip()
		{
			string path = PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/sample.ogg", new object[1] { trackPath }, (Type[])null));
			BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<AudioClip, string>> task = BaboonAPI.Utility.Unity.loadAudioClip(path, (AudioType)14);
			FSharpFunc<AudioClip, TrackAudio> @_instance;
			@_instance = $BaseGame.BaboonAPI-Hooks-Tracks-Previewable-LoadClip@77-1.@_instance;
			return BaboonAPI.Utility.Coroutines.map<FSharpResult<AudioClip, string>, FSharpResult<TrackAudio, string>>($BaseGame.func1@1(@_instance), task);
		}

		virtual FSharpOption<SongGraph> Graphable.CreateGraph()
		{
			string a = trackref@40;
			if (!string.Equals(a, "warmup"))
			{
				if (string.Equals(a, "einefinal"))
				{
					return FSharpOption<SongGraph>.Some(new SongGraph(104, 104, 104, 104, 104));
				}
				return null;
			}
			return FSharpOption<SongGraph>.Some(new SongGraph(10, 10, 10, 10, 10));
		}

		[SpecialName]
		virtual string FilesystemTrack.get_folderPath()
		{
			return trackPath;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class BaseGameCollectionSprites
	{
		internal Sprite[] sprites;

		internal Sprite baseGame => sprites[0];

		internal Sprite tootmaker => sprites[1];

		internal Sprite custom => sprites[2];

		internal Sprite favorites => sprites[3];

		internal Sprite allTracks => sprites[4];

		internal Sprite workshop => sprites[5];

		public BaseGameCollectionSprites(Sprite[] sprites)
		{
			this.sprites = sprites;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal sealed class CollectionStrings : IEquatable<CollectionStrings>, IStructuralEquatable, IComparable<CollectionStrings>, IComparable, IStructuralComparable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal string name@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal string description@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal string name
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return name@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal string description
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return description@;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(CollectionStrings))]
		internal CollectionStrings(string name, string description)
		{
			name@ = name;
			description@ = description;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<CollectionStrings, string>>((PrintfFormat<FSharpFunc<CollectionStrings, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<CollectionStrings, string>, Unit, string, string, CollectionStrings>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int CompareTo(CollectionStrings obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					IComparer genericComparer = LanguagePrimitives.GenericComparer;
					int num = string.CompareOrdinal(name@, obj.name@);
					if (num < 0)
					{
						return num;
					}
					if (num > 0)
					{
						return num;
					}
					genericComparer = LanguagePrimitives.GenericComparer;
					return string.CompareOrdinal(description@, obj.description@);
				}
				return 1;
			}
			if (obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj)
		{
			return CompareTo((CollectionStrings)obj);
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj, IComparer comp)
		{
			CollectionStrings collectionStrings = (CollectionStrings)obj;
			if (this != null)
			{
				if ((CollectionStrings)obj != null)
				{
					int num = string.CompareOrdinal(name@, collectionStrings.name@);
					if (num < 0)
					{
						return num;
					}
					if (num > 0)
					{
						return num;
					}
					return string.CompareOrdinal(description@, collectionStrings.description@);
				}
				return 1;
			}
			if ((CollectionStrings)obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				num = -1640531527 + ((description@?.GetHashCode() ?? 0) + ((num << 6) + (num >> 2)));
				return -1640531527 + ((name@?.GetHashCode() ?? 0) + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		internal bool Equals(CollectionStrings obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (string.Equals(name@, obj.name@))
					{
						return string.Equals(description@, obj.description@);
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is CollectionStrings obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(CollectionStrings obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (string.Equals(name@, obj.name@))
					{
						return string.Equals(description@, obj.description@);
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is CollectionStrings obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class BaseGameTrackCollection : BaseTromboneCollection
	{
		internal BaseGameCollectionSprites sprites;

		public BaseGameTrackCollection(CollectionStrings meta, BaseGameCollectionSprites sprites)
			: base("default", meta.name@, meta.description@)
		{
			this.sprites = sprites;
		}

		public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite()
		{
			FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $BaseGame.LoadSprite@107(this);
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier);
		}

		public override IEnumerable<TromboneTrack> BuildTrackList()
		{
			return SeqModule.Filter<TromboneTrack>((FSharpFunc<TromboneTrack, bool>)$BaseGame.BuildTrackList@112.@_instance, SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$BaseGame.BuildTrackList@111-1.@_instance, TrackAccessor.allTracks()));
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class AllTracksCollection : BaseTromboneCollection
	{
		internal BaseGameCollectionSprites sprites;

		public AllTracksCollection(CollectionStrings meta, BaseGameCollectionSprites sprites)
			: base("all", meta.name@, meta.description@)
		{
			this.sprites = sprites;
		}

		public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite()
		{
			FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $BaseGame.LoadSprite@118-1(this);
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier);
		}

		public override IEnumerable<TromboneTrack> BuildTrackList()
		{
			return SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$BaseGame.BuildTrackList@122-2.@_instance, TrackAccessor.allTracks());
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class FavoriteTracksCollection : BaseTromboneCollection
	{
		internal BaseGameCollectionSprites sprites;

		public FavoriteTracksCollection(CollectionStrings meta, BaseGameCollectionSprites sprites)
			: base("favorites", meta.name@, meta.description@)
		{
			this.sprites = sprites;
		}

		public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite()
		{
			FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $BaseGame.LoadSprite@128-2(this);
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier);
		}

		public override IEnumerable<TromboneTrack> BuildTrackList()
		{
			return SeqModule.Filter<TromboneTrack>((FSharpFunc<TromboneTrack, bool>)$BaseGame.BuildTrackList@133-3.@_instance, SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$BaseGame.BuildTrackList@132-4.@_instance, TrackAccessor.allTracks()));
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class BaseGameTrackRegistry : TrackCollectionRegistrationEvent.Listener, TrackRegistrationEvent.Listener
	{
		internal BaseGameCollectionSprites sprites;

		internal string path;

		internal CollectionStrings defaultMeta;

		internal CollectionStrings allMeta;

		internal CollectionStrings favoriteMeta;

		public BaseGameTrackRegistry(string path, StringLocalizer localizer, BaseGameCollectionSprites sprites)
		{
			this.path = path;
			this.sprites = sprites;
			defaultMeta = new CollectionStrings(localizer.getLocalizedText("collections_name_default"), localizer.getLocalizedText("collections_desc_default"));
			allMeta = new CollectionStrings(localizer.getLocalizedText("collections_name_all"), localizer.getLocalizedText("collections_desc_all"));
			favoriteMeta = new CollectionStrings(localizer.getLocalizedText("collections_name_favorites"), localizer.getLocalizedText("collections_desc_favorites"));
		}

		virtual IEnumerable<TromboneTrack> TrackRegistrationEvent.Listener.OnRegisterTracks()
		{
			return (IEnumerable<TromboneTrack>)(object)new $BaseGame.BaboonAPI-Hooks-Tracks-TrackRegistrationEvent-Listener-OnRegisterTracks@145(this, null, null, null, null, 0, null);
		}

		virtual IEnumerable<TromboneCollection> TrackCollectionRegistrationEvent.Listener.OnRegisterCollections()
		{
			return (IEnumerable<TromboneCollection>)(object)new $BaseGame.BaboonAPI-Hooks-Tracks-TrackCollectionRegistrationEvent-Listener-OnRegisterCollections@168(this, 0, null);
		}
	}
}
namespace BaboonAPI.Internal.Tootmaker
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class LoadedTootmakerTrack : PauseAware, AsyncAudioAware, LoadedTromboneTrack
	{
		internal string trackref@17;

		internal string folderPath;

		internal static MethodInfo load_bg_m;

		internal static int init@17;

		internal LoadedTootmakerTrack(string trackref, string folderPath)
		{
			trackref@17 = trackref;
			this.folderPath = folderPath;
		}

		[SpecialName]
		virtual string LoadedTromboneTrack.get_trackref()
		{
			return trackref@17;
		}

		virtual GameObject LoadedTromboneTrack.LoadBackground(BackgroundContext ctx)
		{
			return ctx.controller@23.custombg_prefab;
		}

		virtual TrackAudio LoadedTromboneTrack.LoadAudio()
		{
			throw new Exception("crimes have occurred");
		}

		[CompilationArgumentCounts(new int[] { 1, 1 })]
		virtual void LoadedTromboneTrack.SetUpBackgroundDelayed(BGController controller, GameObject bg)
		{
			if (init@17 < 2)
			{
				IntrinsicFunctions.FailStaticInit();
			}
			Coroutine val = ((MonoBehaviour)controller).StartCoroutine((IEnumerator)load_bg_m.Invoke(controller.gamecontroller, new object[1] { null }));
		}

		virtual void IDisposable.Dispose()
		{
		}

		virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> AsyncAudioAware.LoadAudio()
		{
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			FSharpList<Tuple<string, AudioType>> val = FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("ogg", (AudioType)14), FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("mp3", (AudioType)13), FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("wav", (AudioType)20), FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("aiff", (AudioType)2), FSharpList<Tuple<string, AudioType>>.Empty))));
			FSharpOption<Tuple<string, AudioType>> val2 = ListModule.TryFind<Tuple<string, AudioType>>((FSharpFunc<Tuple<string, AudioType>, bool>)$Tootmaker.path@45.@_instance, ListModule.Map<Tuple<string, AudioType>, Tuple<string, AudioType>>((FSharpFunc<Tuple<string, AudioType>, Tuple<string, AudioType>>)new $Tootmaker.path@44-1(this), val));
			if (val2 != null)
			{
				FSharpOption<Tuple<string, AudioType>> val3 = val2;
				AudioType item = val3.Value.Item2;
				string item2 = val3.Value.Item1;
				BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<AudioClip, string>> task = BaboonAPI.Utility.Unity.loadAudioClip(item2, item);
				FSharpFunc<AudioClip, TrackAudio> @_instance;
				@_instance = $Tootmaker.BaboonAPI-Hooks-Tracks-AsyncAudioAware-LoadAudio@50-1.@_instance;
				return BaboonAPI.Utility.Coroutines.map<FSharpResult<AudioClip, string>, FSharpResult<TrackAudio, string>>($Tootmaker.func1@1-1(@_instance), task);
			}
			FSharpFunc<Unit, FSharpResult<TrackAudio, string>> @_instance2;
			@_instance2 = $Tootmaker.BaboonAPI-Hooks-Tracks-AsyncAudioAware-LoadAudio@52-2.@_instance;
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>>(SeqModule.Empty<YieldInstruction>(), @_instance2);
		}

		[SpecialName]
		virtual bool PauseAware.get_CanResume()
		{
			return true;
		}

		virtual void PauseAware.OnPause(PauseContext ctx)
		{
		}

		virtual void PauseAware.OnResume(PauseContext ctx)
		{
		}

		static LoadedTootmakerTrack()
		{
			$Tootmaker.init@ = 0;
			_ = $Tootmaker.init@;
		}
	}
	[Serializable]
	[StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)]
	[DebuggerDisplay("{__DebugDisplay(),nq}")]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public sealed class TootmakerTrackSource : IEquatable<TootmakerTrackSource>, IStructuralEquatable, IComparable<TootmakerTrackSource>, IComparable, IStructuralComparable
	{
		public static class Tags
		{
			public const int Tootmaker = 0;

			public const int Custom = 1;
		}

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal static readonly TootmakerTrackSource _unique_Tootmaker = new TootmakerTrackSource(0);

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal static readonly TootmakerTrackSource _unique_Custom = new TootmakerTrackSource(1);

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		[field: DebuggerNonUserCode]
		public int Tag
		{
			[DebuggerNonUserCode]
			get;
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public static TootmakerTrackSource Tootmaker
		{
			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			get
			{
				return _unique_Tootmaker;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public bool IsTootmaker
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Tag == 0;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public static TootmakerTrackSource Custom
		{
			[CompilationMapping(/*Could not decode attribute arguments.*/)]
			get
			{
				return _unique_Custom;
			}
		}

		[CompilerGenerated]
		[DebuggerNonUserCode]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		public bool IsCustom
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return Tag == 1;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicNestedTypes | DynamicallyAccessedMemberTypes.NonPublicNestedTypes | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(TootmakerTrackSource))]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal TootmakerTrackSource(int _tag)
		{
			this._tag = _tag;
		}

		[SpecialName]
		[CompilerGenerated]
		[DebuggerNonUserCode]
		internal object __DebugDisplay()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<TootmakerTrackSource, string>>((PrintfFormat<FSharpFunc<TootmakerTrackSource, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<TootmakerTrackSource, string>, Unit, string, string, string>("%+0.8A")).Invoke(this);
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<TootmakerTrackSource, string>>((PrintfFormat<FSharpFunc<TootmakerTrackSource, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<TootmakerTrackSource, string>, Unit, string, string, TootmakerTrackSource>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int CompareTo(TootmakerTrackSource obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					int tag = _tag;
					int tag2 = obj._tag;
					if (tag == tag2)
					{
						return 0;
					}
					return tag - tag2;
				}
				return 1;
			}
			if (obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj)
		{
			return CompareTo((TootmakerTrackSource)obj);
		}

		[CompilerGenerated]
		public sealed int CompareTo(object obj, IComparer comp)
		{
			TootmakerTrackSource tootmakerTrackSource = (TootmakerTrackSource)obj;
			if (this != null)
			{
				if ((TootmakerTrackSource)obj != null)
				{
					int tag = _tag;
					int tag2 = tootmakerTrackSource._tag;
					if (tag == tag2)
					{
						return 0;
					}
					return tag - tag2;
				}
				return 1;
			}
			if ((TootmakerTrackSource)obj != null)
			{
				return -1;
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			return this?._tag ?? 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		public bool Equals(TootmakerTrackSource obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					int tag = _tag;
					int tag2 = obj._tag;
					return tag == tag2;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is TootmakerTrackSource obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(TootmakerTrackSource obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					int tag = _tag;
					int tag2 = obj._tag;
					return tag == tag2;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed override bool Equals(object obj)
		{
			if (obj is TootmakerTrackSource obj2)
			{
				return Equals(obj2);
			}
			return false;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	public class TootmakerTrack : FilesystemTrack, Previewable, TromboneTrack
	{
		internal TootmakerTrackSource source@65;

		internal string folderPath@65;

		internal SongDataCustom data;

		public TootmakerTrackSource source => source@65;

		public bool isTootmaker
		{
			get
			{
				if (source@65.Tag != 1)
				{
					return true;
				}
				return false;
			}
		}

		internal TootmakerTrack(SongDataCustom data, string folderPath, TootmakerTrackSource source)
		{
			this.data = data;
			folderPath@65 = folderPath;
			source@65 = source;
		}

		[SpecialName]
		virtual string TromboneTrack.get_trackname_short()
		{
			return data.shortName;
		}

		[SpecialName]
		virtual string TromboneTrack.get_trackname_long()
		{
			return data.name;
		}

		[SpecialName]
		virtual string TromboneTrack.get_trackref()
		{
			return data.trackRef;
		}

		[SpecialName]
		virtual string TromboneTrack.get_year()
		{
			return data.year;
		}

		[SpecialName]
		virtual string TromboneTrack.get_artist()
		{
			return data.author;
		}

		[SpecialName]
		virtual string TromboneTrack.get_genre()
		{
			return data.genre;
		}

		[SpecialName]
		virtual string TromboneTrack.get_desc()
		{
			return data.description;
		}

		[SpecialName]
		virtual int TromboneTrack.get_difficulty()
		{
			return data.difficulty;
		}

		[SpecialName]
		virtual int TromboneTrack.get_length()
		{
			return Mathf.FloorToInt(data.endpoint / (data.tempo / 60f));
		}

		[SpecialName]
		virtual int TromboneTrack.get_tempo()
		{
			return (int)data.tempo;
		}

		virtual bool TromboneTrack.IsVisible()
		{
			return true;
		}

		virtual SavedLevel TromboneTrack.LoadChart()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			SavedLevel val = new SavedLevel();
			val.savedleveldata = new List<float[]>(data.notes);
			val.bgdata = new List<float[]>(data.bgdata);
			val.improv_zones = new List<float[]>(data.improv_zones);
			val.endpoint = data.endpoint;
			LESaveableLyric[] lyrics = data.lyrics;
			val.lyricspos = new List<float[]>(SeqModule.Map<LESaveableLyric, float[]>((FSharpFunc<LESaveableLyric, float[]>)$Tootmaker.BaboonAPI-Hooks-Tracks-TromboneTrack-LoadChart@91.@_instance, (IEnumerable<LESaveableLyric>)lyrics));
			lyrics = data.lyrics;
			val.lyricstxt = new List<string>(SeqModule.Map<LESaveableLyric, string>((FSharpFunc<LESaveableLyric, string>)$Tootmaker.BaboonAPI-Hooks-Tracks-TromboneTrack-LoadChart@92-1.@_instance, (IEnumerable<LESaveableLyric>)lyrics));
			val.note_color_start = data.note_color_start;
			val.note_color_end = data.note_color_end;
			val.savednotespacing = data.savednotespacing;
			val.tempo = data.tempo;
			val.timesig = data.timesig;
			return val;
		}

		virtual LoadedTromboneTrack TromboneTrack.LoadTrack()
		{
			return new LoadedTootmakerTrack(data.trackRef, folderPath@65);
		}

		virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> Previewable.LoadClip()
		{
			string path = Path.Combine(folderPath@65, "preview.ogg");
			if (File.Exists(path))
			{
				BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<AudioClip, string>> task = BaboonAPI.Utility.Unity.loadAudioClip(path, (AudioType)14);
				FSharpFunc<AudioClip, TrackAudio> @_instance;
				@_instance = $Tootmaker.BaboonAPI-Hooks-Tracks-Previewable-LoadClip@107-3.@_instance;
				return BaboonAPI.Utility.Coroutines.map<FSharpResult<AudioClip, string>, FSharpResult<TrackAudio, string>>($Tootmaker.func1@1-2(@_instance), task);
			}
			FSharpFunc<Unit, FSharpResult<TrackAudio, string>> @_instance2;
			@_instance2 = $Tootmaker.BaboonAPI-Hooks-Tracks-Previewable-LoadClip@109-4.@_instance;
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>>(SeqModule.Empty<YieldInstruction>(), @_instance2);
		}

		[SpecialName]
		virtual string FilesystemTrack.get_folderPath()
		{
			return folderPath@65;
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class TootmakerCollection : BaseTromboneCollection
	{
		internal BaseGameCollectionSprites sprites;

		internal string folderPath;

		public override string folder => Path.GetFileName(folderPath.TrimEnd('/', '\\'));

		public TootmakerCollection(string folderPath, CollectionStrings meta, BaseGameCollectionSprites sprites)
			: base("tootmaker", meta.name@, meta.description@)
		{
			this.folderPath = folderPath;
			this.sprites = sprites;
		}

		public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite()
		{
			FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $Tootmaker.LoadSprite@118-3(this);
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier);
		}

		public override IEnumerable<TromboneTrack> BuildTrackList()
		{
			return SeqModule.Filter<TromboneTrack>((FSharpFunc<TromboneTrack, bool>)$Tootmaker.BuildTrackList@122-5.@_instance, SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$Tootmaker.BuildTrackList@121-6.@_instance, TrackAccessor.allTracks()));
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class TootmakerTrackRegistry : CustomTrackLoader, TrackCollectionRegistrationEvent.Listener, TrackRegistrationEvent.Listener
	{
		internal BaseGameCollectionSprites sprites;

		internal string path;

		internal static ManualLogSource logger;

		internal JsonSerializer serializer;

		internal CollectionStrings meta;

		internal static int init@126-1;

		public TootmakerTrackRegistry(string path, StringLocalizer localizer, BaseGameCollectionSprites sprites)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			this.path = path;
			this.sprites = sprites;
			serializer = new JsonSerializer();
			meta = new CollectionStrings(localizer.getLocalizedText("collections_name_tootmaker"), localizer.getLocalizedText("collections_desc_tootmaker"));
		}

		virtual IEnumerable<TromboneTrack> TrackRegistrationEvent.Listener.OnRegisterTracks()
		{
			return (IEnumerable<TromboneTrack>)(object)new $Tootmaker.BaboonAPI-Hooks-Tracks-TrackRegistrationEvent-Listener-OnRegisterTracks@135-1(this, null, null, null, 0, null);
		}

		virtual IEnumerable<TromboneCollection> TrackCollectionRegistrationEvent.Listener.OnRegisterCollections()
		{
			if (Directory.Exists(path))
			{
				return SeqModule.Singleton<TromboneCollection>((TromboneCollection)new TootmakerCollection(path, meta, sprites));
			}
			return SeqModule.Empty<TromboneCollection>();
		}

		[SpecialName]
		virtual LoadingPriority CustomTrackLoader.get_Priority()
		{
			return LoadingPriority.Vanilla;
		}

		virtual FSharpOption<TromboneTrack> CustomTrackLoader.LoadTrack(string folderPath)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			string text = Path.Combine(folderPath, "song.tmb");
			try
			{
				FSharpOption<TromboneTrack> result;
				using (StreamReader streamReader = File.OpenText(text))
				{
					JsonTextReader val = new JsonTextReader((TextReader)streamReader);
					FSharpOption<TromboneTrack> val2;
					try
					{
						SongDataCustom data = serializer.Deserialize<SongDataCustom>((JsonReader)(object)val);
						val2 = FSharpOption<TromboneTrack>.Some((TromboneTrack)new TootmakerTrack(data, folderPath, TootmakerTrackSource.Custom));
					}
					finally
					{
						if (val is IDisposable disposable)
						{
							disposable.Dispose();
						}
					}
					result = val2;
				}
				return result;
			}
			catch (object obj)
			{
				Exception ex = (Exception)obj;
				if (init@126-1 < 3)
				{
					IntrinsicFunctions.FailStaticInit();
				}
				logger.LogWarning((object)PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("Failed to load custom track in '%P()'", new object[1] { folderPath }, (Type[])null)));
				if (init@126-1 < 3)
				{
					IntrinsicFunctions.FailStaticInit();
				}
				logger.LogWarning((object)ex);
				return null;
			}
		}

		static TootmakerTrackRegistry()
		{
			$Tootmaker.init@ = 0;
			_ = $Tootmaker.init@;
		}
	}
}
namespace BaboonAPI.Internal.Customs
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class CustomCollection : BaseTromboneCollection
	{
		internal IEnumerable<string> trackRefs;

		internal BaseGameCollectionSprites sprites;

		internal string folderPath;

		public override string folder => Path.GetFileName(folderPath.TrimEnd('/', '\\'));

		public CustomCollection(string folderPath, IEnumerable<string> trackRefs, ExternalCollectionMetadata meta, BaseGameCollectionSprites sprites)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			Hash128 val = Hash128.Compute(folderPath);
			base..ctor(((object)(Hash128)(ref val)).ToString(), meta.name, meta.description);
			this.folderPath = folderPath;
			this.trackRefs = trackRefs;
			this.sprites = sprites;
		}

		public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite()
		{
			FSharpOption<string> val = ListModule.TryFind<string>((FSharpFunc<string, bool>)$Customs.path@21-2.@_instance, ListModule.Map<string, string>((FSharpFunc<string, string>)new $Customs.path@20-3(this), FSharpList<string>.Cons("cover.png", FSharpList<string>.Cons("cover.jpg", FSharpList<string>.Empty))));
			if (val != null)
			{
				FSharpOption<string> val2 = val;
				string value = val2.Value;
				BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Texture2D, string>> task = BaboonAPI.Utility.Unity.loadTexture(value);
				FSharpFunc<Texture2D, Sprite> @_instance;
				@_instance = $Customs.LoadSprite@26-5.@_instance;
				return BaboonAPI.Utility.Coroutines.map<FSharpResult<Texture2D, string>, FSharpResult<Sprite, string>>($Customs.func1@1-3(@_instance), task);
			}
			FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $Customs.LoadSprite@28-6(this);
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier);
		}

		public override IEnumerable<TromboneTrack> BuildTrackList()
		{
			return SeqModule.Map<string, TromboneTrack>((FSharpFunc<string, TromboneTrack>)$Customs.BuildTrackList@31-7.@_instance, trackRefs);
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class CustomCollectionsRegistry : TrackCollectionRegistrationEvent.Listener, TrackRegistrationEvent.Listener
	{
		internal BaseGameCollectionSprites sprites;

		internal string basePath;

		internal JsonSerializer serializer;

		internal ExternalCollectionMetadata defaultMeta;

		internal FSharpMap<string, FSharpList<string>> loadedTrackRefs;

		public CustomCollectionsRegistry(string basePath, StringLocalizer localizer, BaseGameCollectionSprites sprites)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			this.basePath = basePath;
			this.sprites = sprites;
			serializer = new JsonSerializer();
			defaultMeta = new ExternalCollectionMetadata
			{
				name = localizer.getLocalizedText("collections_name_custom"),
				description = ""
			};
			loadedTrackRefs = MapModule.Empty<string, FSharpList<string>>();
		}

		virtual IEnumerable<TromboneTrack> TrackRegistrationEvent.Listener.OnRegisterTracks()
		{
			loadedTrackRefs = MapModule.Empty<string, FSharpList<string>>();
			CustomTrackLoader invoker = CustomTrackLoaderEvent.EVENT.invoker;
			if (Directory.Exists(basePath))
			{
				return SeqModule.Collect<Tuple<string, IEnumerable<TromboneTrack>>, IEnumerable<TromboneTrack>, TromboneTrack>((FSharpFunc<Tuple<string, IEnumerable<TromboneTrack>>, IEnumerable<TromboneTrack>>)new $Customs.BaboonAPI-Hooks-Tracks-TrackRegistrationEvent-Listener-OnRegisterTracks@74-2(this), SeqModule.Map<string, Tuple<string, IEnumerable<TromboneTrack>>>((FSharpFunc<string, Tuple<string, IEnumerable<TromboneTrack>>>)new $Customs.BaboonAPI-Hooks-Tracks-TrackRegistrationEvent-Listener-OnRegisterTracks@73-3(this, invoker), Directory.EnumerateDirectories(basePath, "*", SearchOption.TopDirectoryOnly)));
			}
			return SeqModule.Empty<TromboneTrack>();
		}

		virtual IEnumerable<TromboneCollection> TrackCollectionRegistrationEvent.Listener.OnRegisterCollections()
		{
			return (IEnumerable<TromboneCollection>)(object)new $Customs.BaboonAPI-Hooks-Tracks-TrackCollectionRegistrationEvent-Listener-OnRegisterCollections@81-1(this, null, 0, null);
		}

		[CompilationArgumentCounts(new int[] { 1, 1 })]
		[CompilerGenerated]
		internal Tuple<string, IEnumerable<TromboneTrack>> loadCollectionTracks(CustomTrackLoader loader, string folderPath)
		{
			return new Tuple<string, IEnumerable<TromboneTrack>>(folderPath, SeqModule.Choose<string, TromboneTrack>((FSharpFunc<string, FSharpOption<TromboneTrack>>)new $Customs.clo@43-10(loader), SeqModule.Map<string, string>((FSharpFunc<string, string>)$Customs.clo@42-11.@_instance, Directory.EnumerateFiles(folderPath, "song.tmb", SearchOption.TopDirectoryOnly))));
		}

		[CompilerGenerated]
		internal FSharpOption<ExternalCollectionMetadata> tryLoadMetadata(string folderPath)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Expected O, but got Unknown
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			string path = Path.Combine(folderPath, "collection_metadata.json");
			if (File.Exists(path))
			{
				try
				{
					FSharpOption<ExternalCollectionMetadata> result;
					using (StreamReader streamReader = File.OpenText(path))
					{
						JsonTextReader val = new JsonTextReader((TextReader)streamReader);
						FSharpOption<ExternalCollectionMetadata> val2;
						try
						{
							val2 = FSharpOption<ExternalCollectionMetadata>.Some(serializer.Deserialize<ExternalCollectionMetadata>((JsonReader)(object)val));
						}
						finally
						{
							if (val is IDisposable disposable)
							{
								disposable.Dispose();
							}
						}
						result = val2;
					}
					return result;
				}
				catch (object obj)
				{
					Exception ex = (Exception)obj;
					return null;
				}
			}
			return null;
		}

		[CompilerGenerated]
		internal IEnumerable<TromboneTrack> hookTrackRefs(string folderPath, IEnumerable<TromboneTrack> tracks)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			ListCollector<string> val = default(ListCollector<string>);
			using (IEnumerator<TromboneTrack> enumerator = tracks.GetEnumerator())
			{
				while (enumerator.MoveNext())
				{
					TromboneTrack current = enumerator.Current;
					val.Add(current.trackref);
				}
				IEnumerable<string> enumerable = null;
			}
			FSharpList<string> val2 = val.Close();
			loadedTrackRefs = loadedTrackRefs.Add(folderPath, val2);
			return tracks;
		}
	}
}
namespace BaboonAPI.Internal.Workshop
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class WorkshopCollection : BaseTromboneCollection
	{
		internal IEnumerable<string> trackRefs;

		internal BaseGameCollectionSprites sprites;

		public override string folder => "Steam/steamapps/workshop";

		public WorkshopCollection(CollectionStrings meta, BaseGameCollectionSprites sprites, IEnumerable<string> trackRefs)
			: base("steamworkshop", meta.name@, meta.description@)
		{
			this.sprites = sprites;
			this.trackRefs = trackRefs;
		}

		public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite()
		{
			FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $Workshop.LoadSprite@15-7(this);
			return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier);
		}

		public override IEnumerable<TromboneTrack> BuildTrackList()
		{
			return SeqModule.Map<string, TromboneTrack>((FSharpFunc<string, TromboneTrack>)$Workshop.BuildTrackList@16-8.@_instance, trackRefs);
		}
	}
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal class WorkshopTrackLoader : TrackCollectionRegistrationEvent.Listener, TrackRegistrationEvent.Listener
	{
		internal BaseGameCollectionSprites sprites;

		internal CollectionStrings meta;

		internal static ManualLogSource logger;

		internal List<string> workshopTrackRefs;

		internal static int init@18;

		public WorkshopTrackLoader(CollectionStrings meta, BaseGameCollectionSprites sprites)
		{
			this.meta = meta;
			this.sprites = sprites;
			workshopTrackRefs = new List<string>();
		}

		virtual IEnumerable<TromboneTrack> TrackRegistrationEvent.Listener.OnRegisterTracks()
		{
			return (IEnumerable<TromboneTrack>)(object)new $Workshop.BaboonAPI-Hooks-Tracks-TrackRegistrationEvent-Listener-OnRegisterTracks@34-4(this, null, null, 0, null);
		}

		virtual IEnumerable<TromboneCollection> TrackCollectionRegistrationEvent.Listener.OnRegisterCollections()
		{
			return (IEnumerable<TromboneCollection>)(object)new $Workshop.BaboonAPI-Hooks-Tracks-TrackCollectionRegistrationEvent-Listener-OnRegisterCollections@55-2(this, 0, null);
		}

		[CompilerGenerated]
		internal PublishedFileId_t[] fetchSubscribedItems()
		{
			uint numSubscribedItems = SteamUGC.GetNumSubscribedItems();
			if (numSubscribedItems != 0)
			{
				PublishedFileId_t[] array = ArrayModule.ZeroCreate<PublishedFileId_t>((int)numSubscribedItems);
				uint subscribedItems = SteamUGC.GetSubscribedItems(array, numSubscribedItems);
				return ArrayModule.Truncate<PublishedFileId_t>((int)subscribedItems, array);
			}
			return Array.Empty<PublishedFileId_t>();
		}

		static WorkshopTrackLoader()
		{
			$Workshop.init@ = 0;
			_ = $Workshop.init@;
		}
	}
}
namespace BaboonAPI.Patch
{
	[Serializable]
	[CompilationMapping(/*Could not decode attribute arguments.*/)]
	internal sealed class LevelSelectContext : IEquatable<LevelSelectContext>, IStructuralEquatable
	{
		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal LevelSelectController controller@;

		[CompilerGenerated]
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		internal List<SingleTrackData> allTracksList@;

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal LevelSelectController controller
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return controller@;
			}
		}

		[CompilationMapping(/*Could not decode attribute arguments.*/)]
		internal List<SingleTrackData> allTracksList
		{
			[CompilerGenerated]
			[DebuggerNonUserCode]
			get
			{
				return allTracksList@;
			}
		}

		[DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(LevelSelectContext))]
		internal LevelSelectContext(LevelSelectController controller, List<SingleTrackData> allTracksList)
		{
			controller@ = controller;
			allTracksList@ = allTracksList;
		}

		[CompilerGenerated]
		public override string ToString()
		{
			return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<LevelSelectContext, string>>((PrintfFormat<FSharpFunc<LevelSelectContext, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<LevelSelectContext, string>, Unit, string, string, LevelSelectContext>("%+A")).Invoke(this);
		}

		[CompilerGenerated]
		public sealed int GetHashCode(IEqualityComparer comp)
		{
			if (this != null)
			{
				int num = 0;
				num = -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<List<SingleTrackData>>(comp, allTracksList@) + ((num << 6) + (num >> 2)));
				return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<LevelSelectController>(comp, controller@) + ((num << 6) + (num >> 2)));
			}
			return 0;
		}

		[CompilerGenerated]
		public sealed override int GetHashCode()
		{
			return GetHashCode(LanguagePrimitives.GenericEqualityComparer);
		}

		[CompilerGenerated]
		internal bool Equals(LevelSelectContext obj, IEqualityComparer comp)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityWithComparerIntrinsic<LevelSelectController>(comp, controller@, obj.controller@))
					{
						return HashCompare.GenericEqualityWithComparerIntrinsic<List<SingleTrackData>>(comp, allTracksList@, obj.allTracksList@);
					}
					return false;
				}
				return false;
			}
			return obj == null;
		}

		[CompilerGenerated]
		public sealed bool Equals(object obj, IEqualityComparer comp)
		{
			if (obj is LevelSelectContext obj2)
			{
				return Equals(obj2, comp);
			}
			return false;
		}

		[CompilerGenerated]
		public sealed bool Equals(LevelSelectContext obj)
		{
			if (this != null)
			{
				if (obj != null)
				{
					if (HashCompare.GenericEqualityERIntrinsic<LevelSelectController>(controller@, obj.controller@))
					{
						return HashCompare.GenericEqualityERIntrinsic<List<SingleTrackData>>(allTracksList@, obj.allTracksList@);