text: #include "woap_main_view.h"
  #include "woap_audio_core_view.h"
  #include "woap_thrash_button.h"
  #include "woap_settings_view.h"
  #include "woap_audio_core.h"
  #include "woap_button_list.h"
  #include "woap_simple_call_out_box.h"
  #include "woap_icon_button.h"
  #include "woap_main.h"
  #include "woap_loading_spinner.h"
  
  using namespace WOAP;
  using namespace WOAP::GUI;
  
  OPTIONAL_SINGLETON_IMPLEMENTATION(MainView)
  
  MainView::MainView()
  {
  	addTrackButton = new IconButton(FontAwesome_Plus);
  	addTrackButton->addListener(this);
  	addChildComponent(addTrackButton);
  
  	settingsButton = new IconButton(FontAwesome_Gear);
  	settingsButton->addListener(this);
  	addChildComponent(settingsButton);
  
  	mixerButton = new IconButton(FontAwesome_Sliders);
  	mixerButton->addListener(this);
  	addChildComponent(mixerButton);
  
  	thrashButton = new ThrashButton();
  	thrashButton->setEnabled(false);
  	addChildComponent(thrashButton);
  
  	cachedBackgroundLogo = ImageCache::getFromMemory(backgroundLogo, backgroundLogoSize);
  
  	loadingSpinner = new LoadingSpinner();
  	addAndMakeVisible(loadingSpinner);
  }
  
  MainView::~MainView()
  {
  	
  }
  
  void MainView::resized()
  {
  	if (audioCoreView != nullptr)
  		audioCoreView->setBounds(getLocalBounds().withTrimmedBottom(40));
  
  	if (settingsView != nullptr)
  		settingsView->setBounds(getLocalBounds().withTrimmedBottom(40));
  
  	const int buttonXOffset = (getWidth() - 380) / 2;
  	const int buttonYPos = getHeight() - 35;
  
  	addTrackButton->setBounds(0 + buttonXOffset, buttonYPos, 80, 30);
  	mixerButton->setBounds(100 + buttonXOffset, buttonYPos, 80, 30);
  	settingsButton->setBounds(200 + buttonXOffset, buttonYPos, 80, 30);
  	thrashButton->setBounds(300 + buttonXOffset, buttonYPos, 80, 30);
  
  	if (loadingSpinner != nullptr)
  	{
  		loadingSpinner->setSize(60, 60);
  		loadingSpinner->setCentreRelative(0.5f, 0.8f);
  	}
  }
  
  void MainView::paint(Graphics& g)
  {
  	g.fillAll(findColour(ResizableWindow::backgroundColourId));
  	g.drawImage(cachedBackgroundLogo, getLocalBounds().toFloat(), RectanglePlacement::centred | RectanglePlacement::doNotResize);
  
  	if (appLoaded)
  	{
  		g.setColour(Colours::grey);
  		g.fillRect(0, getHeight() - 40, getWidth(), 40);
  		g.drawLine(0, (float)getHeight() - 40, (float)getWidth(), (float)getHeight() - 40, 3.0f);
  	}
  }
  
  void MainView::buttonClicked(Button* button)
  {
  	if (button == mixerButton)
  	{
  		showAudioCore();
  	}
  	else if (button == settingsButton)
  	{
  		showSettings();
  	}
  	else if (button == addTrackButton)
  	{
  		SimpleCallOutBox::open(new ButtonList(40, 200, {
  			{0, "Add audio track"},
  			{1, "Add FX track"},
  			{2, "Add mix bus track"},
  			{3, "Add output bus track"}
  		}, [=](ButtonList* list, int returnValue) {
  			const int trackPosition = getAudioCoreView()->getIndexAfterSelectedTrack();
  			switch (returnValue)
  			{
  			case 0: AudioCore::getInstance()->addAudioTrack(trackPosition); break;
  			case 1: AudioCore::getInstance()->addFxTrack(trackPosition); break;
  			case 2: AudioCore::getInstance()->addMixBusTrack(trackPosition); break;
  			case 3: AudioCore::getInstance()->addOutputBusTrack(trackPosition); break;
  			default: break;
  			}
  			list->getParentComponent()->exitModalState(0);
  		}), addTrackButton->getScreenBounds());
  	}
  }
  
  void MainView::mouseUp(const MouseEvent& ev)
  {
  	if (ev.mods.isLeftButtonDown() && !ev.source.hasMouseMovedSignificantlySincePressed())
  	{
  		if (audioCoreView != nullptr)
  			audioCoreView->setSelectedTrack(nullptr);
  	}
  }
  
  void MainView::showAudioCore()
  {
  	if (audioCoreView == nullptr)
  	{
  		audioCoreView = new AudioCoreView();
  		addAndMakeVisible(audioCoreView);
  	}
  
  	mixerButton->setToggleState(true, NotificationType::dontSendNotification);
  	settingsButton->setToggleState(false, NotificationType::dontSendNotification);
  	addTrackButton->setEnabled(true);
  
  	settingsView = nullptr;
  	resized();
  }
  
  void MainView::showSettings()
  {
  	if (settingsView == nullptr)
  	{
  		settingsView = new SettingsView();
  		addAndMakeVisible(settingsView);
  	}
  
  	mixerButton->setToggleState(false, NotificationType::dontSendNotification);
  	settingsButton->setToggleState(true, NotificationType::dontSendNotification);
  	addTrackButton->setEnabled(false);
  
  	audioCoreView = nullptr;
  	resized();
  }
  
  void MainView::setAppLoaded(bool loaded)
  {
  	if (appLoaded == loaded)
  		return;
  
  	appLoaded = loaded;
  
  	addTrackButton->setVisible(loaded);
  	settingsButton->setVisible(loaded);
  	mixerButton->setVisible(loaded);
  	thrashButton->setVisible(loaded);
  
  	if (loaded)
  	{
  		showAudioCore();
  		loadingSpinner = nullptr;
  	}
  	else
  	{
  		settingsView = nullptr;
  		audioCoreView = nullptr;
  		resized();
  	}
  
  	repaint();
  }
  
  void MainView::dragOperationStarted(const DragAndDropTarget::SourceDetails &)
  {
  	thrashButton->setEnabled(true);
  }
  
  void MainView::dragOperationEnded(const DragAndDropTarget::SourceDetails &)
  {
  	thrashButton->setEnabled(false);
  }
  
  MainWindow::MainWindow(MainView* mainView, const String& name, bool enableKioskModeToggle, bool startInKioskMode) 
  	: DocumentWindow(name, Colours::lightgrey, DocumentWindow::allButtons), kioskModeToggleEnabled(enableKioskModeToggle)
  {
  	const Rectangle<int> monitorArea = getParentMonitorArea();
  	const int windowWidth = jmin(monitorArea.getWidth(), 1200);
  	const int windowHeight = jmin(monitorArea.getHeight() - 70, 860);
  
  	mainView->setBounds(0, 0, windowWidth, windowHeight);
  	setContentOwned(mainView, true);
  	setUsingNativeTitleBar(true);
  
  	setTopLeftPosition(
  		monitorArea.getCentreX() - windowWidth / 2,
  		monitorArea.getCentreY() - windowHeight / 2
  	);
  	
  	if (startInKioskMode)
  	{
  		enterKioskMode();
  	}
  
  	setVisible(true);
  
  	Main::getInstanceCast()->getCommandManager().registerAllCommandsForTarget(this);
  	addKeyListener(Main::getInstanceCast()->getCommandManager().getKeyMappings());
  }
  
  MainWindow::~MainWindow()
  {
  
  }
  
  void MainWindow::closeButtonPressed()
  {
  	JUCEApplication::getInstance()->systemRequestedQuit();
  }
  
  void MainWindow::enterKioskMode()
  {
  	if (isInKioskMode)
  		return;
  
  	isInKioskMode = true;
  	Desktop::getInstance().setKioskModeComponent(this, false);
  	Desktop::getInstance().setScreenSaverEnabled(false);
  }
  
  void MainWindow::exitKioskMode()
  {
  	if (!isInKioskMode)
  		return;
  
  	isInKioskMode = false;
  	Desktop::getInstance().setKioskModeComponent(nullptr, false);
  	Desktop::getInstance().setScreenSaverEnabled(true);
  }
  
  void MainWindow::getCommandInfo(CommandID id, ApplicationCommandInfo& result)
  {
  	if (id == toggleKioskModeCommandId)
  	{
  		result.setInfo(TRANS("Toggle fullscreen"),
  			TRANS("Toggles fullscreen"),
  			"Application", 0);
  
  		result.defaultKeypresses.add(KeyPress('l', ModifierKeys::ctrlModifier, 0));
  	}
  }
  
  void MainWindow::getAllCommands(Array<CommandID>& commands)
  {
  	commands.add(toggleKioskModeCommandId);
  }
  
  bool MainWindow::perform(const InvocationInfo& info)
  {
  	if (info.commandID == toggleKioskModeCommandId)
  	{
  		if (!kioskModeToggleEnabled)
  			return true;
  
  		if (isInKioskMode)
  			exitKioskMode();
  		else
  			enterKioskMode();
  
  		return true;
  	}
  
  	return false;
  }
  
  
  
  
  
  
  
  
  
  static const unsigned char backgroundLogoData[] = { 137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,1,244,0,0,0,113,8,6,0,0,0,35,220,81,85,0,0,0,9,112,72,89,115,0,0,46,35,0,0,46,35,1,
  120,165,63,118,0,0,0,32,99,72,82,77,0,0,122,37,0,0,128,131,0,0,249,255,0,0,128,233,0,0,117,48,0,0,234,96,0,0,58,152,0,0,23,111,146,95,197,70,0,0,28,58,73,68,65,84,120,218,236,157,121,148,85,197,181,135,
  191,110,64,70,21,140,83,84,80,35,36,14,237,64,212,160,209,56,128,209,168,209,36,154,196,49,106,52,138,26,136,204,34,40,40,32,160,162,162,16,167,60,135,39,74,48,198,49,78,121,10,198,24,137,49,207,49,24,
  81,81,4,84,80,1,25,148,81,186,223,31,187,250,165,109,239,237,190,247,212,174,51,221,253,173,213,139,197,234,62,117,234,212,169,83,187,106,215,174,223,174,170,171,171,195,48,12,195,48,140,108,83,109,77,
  96,24,134,97,24,102,208,13,195,48,12,195,48,131,110,24,134,97,24,134,25,116,195,48,12,195,48,204,160,27,134,97,24,134,25,116,195,48,12,195,48,204,160,27,134,97,24,134,97,6,221,48,12,195,48,12,51,232,134,
  97,24,134,97,6,221,48,12,195,48,12,51,232,134,97,24,134,97,152,65,55,12,195,48,12,195,12,186,97,24,134,97,228,145,150,190,5,212,212,212,156,13,220,162,84,159,87,129,111,3,181,129,158,247,110,224,100,165,
  178,38,1,191,177,46,68,7,224,109,96,107,165,242,14,7,158,76,224,25,246,4,118,5,190,9,116,1,58,3,91,2,109,220,239,219,1,173,98,170,207,90,96,13,176,194,253,187,8,248,16,120,7,152,3,252,27,120,13,88,109,
  221,207,139,253,129,211,129,35,128,237,128,13,192,60,224,9,55,86,188,80,33,237,112,41,48,178,66,251,64,253,183,182,28,120,31,88,0,204,119,223,215,203,192,108,215,47,130,48,107,214,44,213,242,170,124,211,
  167,214,212,212,180,4,94,1,118,83,170,211,105,192,148,64,237,183,131,123,65,173,21,202,90,15,236,226,6,217,74,102,4,112,153,82,89,143,0,199,196,80,231,78,192,247,129,158,192,247,220,123,172,202,88,187,
  215,2,179,128,103,129,167,221,36,104,133,217,232,146,216,21,184,198,25,242,166,120,220,77,218,231,152,65,175,88,86,1,127,117,125,225,17,224,221,52,27,116,13,151,251,23,192,80,197,58,141,86,50,184,133,
  120,15,152,172,84,86,43,96,76,133,119,246,173,129,33,74,101,125,1,12,10,88,215,205,129,115,157,241,91,12,220,3,244,118,131,123,85,6,219,190,26,216,3,248,53,240,71,96,9,48,29,56,11,232,104,227,112,225,
  5,12,48,16,120,169,4,99,14,112,164,91,172,156,109,77,87,177,180,3,126,0,92,231,22,111,255,4,206,1,54,73,235,160,160,181,178,154,161,84,214,246,110,144,10,197,24,96,169,82,89,39,2,123,87,112,103,31,9,180,
  87,42,235,6,224,205,0,117,252,46,48,21,248,0,184,17,56,132,124,198,142,180,116,30,135,255,66,220,243,83,128,125,109,60,254,127,218,0,191,7,38,148,185,96,104,143,108,41,94,15,180,176,102,172,120,246,1,
  110,6,22,2,227,221,66,33,119,6,29,183,82,171,83,42,107,120,192,85,198,50,229,149,245,149,21,218,177,119,86,92,185,124,138,158,219,190,158,31,0,207,185,159,147,128,141,42,232,221,180,5,78,69,246,128,255,
  226,38,49,149,190,202,122,12,56,193,163,140,190,110,178,84,133,97,72,159,186,16,241,250,142,85,92,216,164,198,160,191,136,4,146,104,176,153,107,172,80,252,22,189,189,144,158,148,230,190,203,27,227,21,
  87,44,163,208,243,154,116,119,70,236,113,183,58,175,116,14,70,182,25,158,2,106,42,240,249,91,0,15,2,135,42,148,117,70,5,79,224,141,194,180,7,46,66,2,85,143,202,147,65,7,184,24,137,24,212,160,31,176,109,
  160,231,94,231,94,130,22,87,80,89,71,0,15,4,126,164,84,214,91,110,130,229,203,38,136,75,253,69,103,196,140,47,211,11,217,15,190,214,173,46,42,133,9,72,0,164,22,131,128,159,91,119,50,26,209,5,120,20,184,
  21,241,144,229,194,160,207,67,246,154,52,104,227,86,110,161,184,23,248,135,82,89,123,2,167,84,72,199,173,114,131,164,22,131,145,19,3,62,244,68,34,190,207,197,92,162,205,173,86,251,185,182,58,176,2,158,
  247,112,247,188,218,220,132,222,49,77,35,95,156,9,252,29,216,41,15,6,29,96,28,18,113,171,193,233,232,29,135,107,76,29,186,81,213,33,163,243,211,196,241,64,15,165,178,166,3,15,123,26,168,49,136,59,185,
  179,141,37,37,179,35,178,45,49,60,199,19,160,118,232,233,99,52,166,19,18,245,108,24,197,22,120,255,75,2,158,194,16,6,125,153,226,202,186,133,155,32,132,226,111,192,3,74,101,133,142,206,79,3,27,33,123,
  231,26,212,2,3,60,174,239,136,184,184,242,108,148,66,175,214,199,0,247,33,194,57,121,99,184,251,38,67,241,115,44,216,208,104,122,124,122,18,56,54,235,6,29,196,37,165,37,198,112,12,34,254,17,138,161,200,
  25,104,173,65,164,99,142,59,105,111,244,92,73,183,33,106,76,81,216,14,152,73,101,6,35,106,243,19,224,25,68,21,47,47,124,139,176,154,6,245,76,70,65,109,211,200,45,173,16,141,136,31,197,117,195,80,6,61,
  68,208,89,168,85,216,91,110,2,162,65,232,232,252,36,217,20,81,133,211,96,37,18,64,25,133,174,192,243,136,186,155,161,195,183,221,4,105,187,156,60,207,100,226,57,166,184,27,112,190,117,31,163,25,163,126,
  79,224,69,105,112,131,14,226,202,155,169,84,214,254,110,37,17,138,81,232,201,102,246,35,92,116,126,146,12,65,79,68,97,28,240,81,68,99,254,151,156,182,111,210,236,228,218,54,235,70,253,231,192,97,49,222,
  239,50,242,229,221,48,244,105,237,236,97,151,44,27,244,58,244,100,65,235,141,64,40,247,214,39,232,237,13,135,142,206,79,130,237,240,219,239,110,200,123,200,209,169,40,117,152,97,198,60,184,81,127,18,248,
  90,70,235,191,113,196,190,229,67,71,68,88,196,48,154,98,11,96,26,129,183,104,66,159,157,126,206,205,76,52,248,38,240,171,128,117,157,136,100,219,209,224,12,194,69,231,39,193,40,55,81,209,96,40,229,107,
  21,116,64,2,224,44,146,61,60,59,35,39,15,178,168,172,55,2,216,38,129,251,158,9,124,199,186,142,209,12,251,19,56,182,67,35,219,90,115,127,210,13,120,29,157,212,147,139,92,121,159,5,106,143,211,128,255,
  86,42,43,174,204,97,161,217,29,73,107,171,17,195,48,19,57,255,92,78,167,171,2,238,7,126,28,211,243,46,68,78,63,188,10,204,117,63,11,221,36,100,77,76,117,104,231,38,80,219,32,25,2,119,68,114,6,244,32,190,
  243,207,191,67,146,80,100,133,26,68,56,39,41,189,245,23,128,253,208,147,191,142,147,75,137,158,109,109,24,34,232,148,117,90,32,91,39,59,184,190,180,63,178,117,179,177,242,125,214,32,241,63,239,129,126,
  182,181,56,34,52,223,70,130,206,250,42,148,181,53,208,31,57,243,29,130,187,92,249,123,41,148,245,67,36,16,226,217,140,119,244,43,209,11,72,236,31,97,192,27,24,216,152,215,185,137,198,3,110,226,48,55,5,
  109,190,204,253,251,174,155,92,52,164,43,18,53,251,51,244,244,0,10,113,182,235,187,83,50,208,71,171,16,181,193,36,147,167,124,7,248,37,114,122,163,146,88,221,160,191,102,157,37,192,27,136,108,52,110,17,
  122,20,18,248,120,184,210,61,218,32,91,52,39,135,120,128,184,228,74,71,33,9,228,53,24,130,236,71,132,160,22,81,46,75,163,49,76,130,94,72,146,19,13,238,118,171,152,114,232,78,184,253,201,213,110,101,177,
  179,243,26,92,157,18,99,222,28,115,92,93,247,115,51,253,91,2,122,14,110,112,222,129,180,243,11,224,160,20,212,99,28,114,26,196,200,7,235,129,135,144,227,177,251,35,167,107,52,56,17,73,219,156,89,131,190,
  24,61,129,152,14,232,29,159,42,196,83,13,102,104,190,236,7,28,151,209,206,92,13,92,165,104,60,135,150,121,77,75,183,218,105,165,252,92,181,206,8,110,239,102,222,111,101,120,192,153,141,104,3,236,128,100,
  2,211,118,247,118,112,109,149,230,73,233,166,138,253,212,151,45,17,247,181,145,63,158,7,14,112,11,62,95,221,146,42,194,72,18,199,154,80,228,122,96,190,82,89,154,2,39,133,184,208,13,252,26,140,37,155,226,
  19,39,187,21,178,6,19,40,63,224,240,2,116,182,62,26,242,10,114,230,186,55,114,178,33,47,124,132,184,200,191,141,236,253,107,114,24,146,126,54,173,140,37,93,199,198,250,146,175,128,88,227,203,139,129,9,
  238,155,240,61,230,124,10,1,20,26,227,52,232,171,137,46,38,210,152,86,192,229,1,235,250,47,224,118,165,178,66,71,231,135,160,13,122,57,227,23,34,194,64,229,176,5,112,137,242,51,77,68,60,38,175,146,95,
  94,65,246,213,181,117,198,199,147,96,6,169,38,232,142,36,228,73,19,45,128,73,102,251,114,205,51,72,6,191,85,30,101,180,35,128,182,74,220,41,63,239,6,94,82,42,235,4,96,159,128,117,189,196,243,133,53,100,
  36,217,210,203,238,131,158,14,246,48,224,243,50,175,25,142,222,94,228,122,55,27,238,15,172,173,128,193,102,45,226,206,59,5,255,44,118,245,116,38,125,121,10,170,145,24,8,173,49,108,137,98,221,14,69,130,
  22,141,252,242,2,112,170,103,25,71,102,221,160,215,162,43,54,115,69,192,186,46,68,47,77,104,125,116,126,22,216,204,25,84,13,94,2,238,140,208,86,189,149,238,191,194,125,52,83,43,112,192,153,234,158,93,
  75,1,113,96,202,86,233,103,161,23,229,255,9,18,165,174,185,13,51,129,202,202,59,95,137,60,128,223,41,144,158,53,53,53,170,241,41,213,9,52,194,116,68,36,68,131,158,232,69,97,23,226,42,162,73,148,22,34,
  100,116,190,38,154,9,102,250,83,126,44,194,121,232,136,216,172,70,162,83,167,87,240,128,51,221,125,31,171,149,38,165,191,72,201,115,109,142,110,22,198,33,200,17,65,205,19,46,93,208,205,103,97,164,147,
  40,66,89,245,108,133,114,188,69,117,130,141,176,65,113,149,30,234,57,62,67,47,162,62,116,116,190,6,59,32,238,118,13,238,7,254,90,230,53,173,157,65,247,165,22,113,121,62,143,241,119,215,22,26,65,158,125,
  82,242,76,227,208,147,167,125,142,255,136,73,221,201,87,207,253,251,48,24,248,134,117,193,92,243,33,240,123,143,235,187,107,86,38,41,131,62,11,189,160,179,61,144,253,194,80,220,134,136,13,104,16,58,58,
  223,151,203,209,145,252,92,31,113,181,115,180,146,23,99,36,122,94,160,60,240,40,209,149,192,26,178,59,201,75,156,246,64,220,237,26,108,112,19,200,250,227,126,117,238,255,90,139,141,214,196,175,45,111,
  196,143,143,219,189,107,30,12,58,110,181,250,185,82,89,99,220,199,19,130,47,208,219,247,15,29,157,239,195,222,232,169,23,93,135,184,48,203,69,195,165,251,36,150,44,163,16,99,93,219,248,114,106,130,207,
  208,2,81,157,212,218,119,188,30,57,209,210,120,177,161,105,132,143,37,236,182,160,145,60,207,17,125,91,235,91,121,49,232,154,65,103,93,8,235,14,124,4,73,45,169,65,232,232,252,168,104,137,115,44,38,218,
  145,183,246,10,3,223,42,183,122,171,197,104,76,173,107,27,223,147,27,199,145,156,208,204,185,232,105,19,124,216,132,215,98,20,122,137,154,234,39,184,27,89,23,204,45,235,128,215,34,94,171,154,76,168,58,
  225,134,152,128,36,92,209,64,51,152,171,16,154,89,114,174,76,89,135,60,26,57,106,163,193,8,162,201,252,30,142,127,48,220,24,96,129,141,47,69,89,128,191,135,104,91,148,247,253,74,100,43,116,61,47,3,128,
  149,69,126,183,18,189,116,193,32,90,20,253,172,251,229,154,119,35,94,183,73,158,12,186,102,208,89,39,194,70,149,190,136,156,163,215,224,80,2,156,65,140,72,11,244,114,193,191,142,100,233,138,66,47,207,
  123,191,15,92,99,227,74,179,92,173,176,250,236,149,64,189,175,82,28,252,158,2,238,105,230,111,238,5,254,172,88,255,75,72,38,181,171,17,15,31,71,188,78,53,155,91,117,10,26,226,118,103,8,52,248,13,176,93,
  192,186,14,71,47,17,198,248,148,180,255,25,72,186,64,13,6,18,93,231,248,16,207,123,95,71,101,8,199,248,178,22,127,37,185,158,49,215,249,96,244,142,204,173,163,244,237,185,62,138,125,170,3,233,209,156,
  55,210,131,106,174,138,52,24,148,47,40,63,113,71,49,218,32,251,95,161,152,135,158,172,227,30,36,27,96,4,34,124,161,213,94,79,120,172,104,54,198,47,251,208,74,224,102,27,27,74,230,102,138,187,155,75,33,
  206,24,144,150,72,106,84,45,38,0,111,150,248,183,115,208,21,175,58,25,201,236,103,228,143,168,249,58,54,104,86,162,58,37,141,241,8,48,67,169,172,211,21,87,156,133,24,139,158,76,228,104,116,68,84,162,50,
  0,29,55,224,6,252,246,28,187,227,23,104,245,144,167,129,170,52,86,186,54,139,202,230,232,73,3,55,71,63,244,196,55,230,81,126,12,193,56,162,239,143,22,98,18,201,230,109,55,194,240,245,136,215,45,215,172,
  68,117,138,26,100,8,58,233,31,171,209,85,145,106,204,50,103,136,53,232,66,114,26,217,91,160,119,28,239,102,252,206,234,251,14,216,119,99,148,139,175,28,110,28,25,197,182,69,231,252,124,61,191,161,252,
  40,255,53,232,158,160,217,11,56,199,186,95,238,232,22,241,186,207,242,106,208,53,131,206,126,8,28,20,176,174,55,2,239,40,149,21,58,58,191,24,35,209,9,200,88,142,127,96,163,207,89,204,85,84,182,188,107,
  84,158,194,239,8,219,183,98,168,227,181,232,37,53,122,4,120,56,226,181,143,35,202,135,90,92,142,158,210,157,145,60,155,122,76,112,63,210,172,72,117,202,26,230,98,244,130,206,174,36,220,121,217,117,232,
  237,251,135,142,206,47,54,155,212,74,128,50,10,255,45,8,31,247,237,11,232,101,21,171,36,214,187,182,139,74,151,192,245,251,62,122,25,203,214,184,213,185,15,253,208,203,190,216,137,244,10,76,25,229,115,
  184,135,45,157,157,103,131,62,15,81,111,210,160,7,34,130,17,138,251,16,157,108,13,66,71,231,55,102,60,209,131,56,26,242,14,48,89,161,28,159,125,252,153,54,158,36,210,118,219,6,172,87,107,116,115,138,143,
  1,230,122,150,177,0,184,84,177,78,103,147,204,121,126,67,159,211,60,174,125,43,207,6,29,100,255,123,137,98,89,45,3,213,179,14,189,236,76,161,163,243,27,242,93,197,137,206,32,231,173,240,101,43,143,107,
  95,181,241,36,145,182,219,50,96,189,6,161,231,210,127,27,61,69,202,137,192,191,21,199,222,201,36,167,186,103,232,208,29,217,226,77,197,248,149,70,131,190,76,209,184,117,115,51,225,80,60,135,222,222,90,
  232,232,252,122,180,84,234,158,1,30,84,42,171,163,199,181,115,49,146,104,187,142,129,234,180,61,18,87,162,197,175,209,59,75,190,30,56,95,121,114,125,138,117,195,204,82,133,159,152,213,82,162,75,198,102,
  198,160,131,36,96,152,163,84,214,8,244,2,107,10,49,69,241,93,140,11,220,174,199,1,7,40,121,39,250,41,214,107,83,51,232,102,208,29,147,128,182,74,101,221,139,78,66,154,198,19,217,41,138,229,93,133,178,
  90,152,17,27,3,241,19,196,122,122,214,172,89,170,121,39,210,106,208,53,131,206,182,70,87,151,185,49,154,26,239,33,163,243,91,42,78,24,238,0,94,73,73,95,89,108,227,74,110,218,238,104,224,24,165,178,62,
  3,250,7,170,231,96,196,147,168,53,62,141,176,174,152,57,126,140,191,232,208,99,218,149,170,78,113,131,221,143,94,192,211,96,194,236,249,29,171,180,226,109,72,168,232,252,222,72,146,8,95,62,71,215,37,234,
  195,42,140,164,218,80,123,236,104,139,78,128,101,61,151,1,31,4,106,179,143,144,19,57,90,92,0,236,108,93,49,51,252,2,248,131,231,55,176,22,9,172,174,24,131,174,25,116,214,33,192,44,88,115,197,219,144,30,
  192,241,202,101,106,62,255,56,36,245,109,26,176,227,106,201,181,161,118,138,218,139,128,29,148,202,122,29,9,96,11,201,141,136,118,134,6,173,98,168,175,225,79,107,100,207,252,78,252,53,216,239,65,89,37,
  46,237,6,29,183,66,215,154,197,156,3,116,85,172,219,233,248,233,143,55,197,88,116,163,243,47,84,242,80,44,192,50,154,25,250,116,67,79,181,16,224,60,162,39,9,42,103,66,115,30,58,234,150,0,71,32,110,92,
  35,157,28,129,108,51,106,109,227,92,27,162,146,213,25,104,200,161,74,43,177,86,232,229,83,110,139,184,244,66,14,112,90,242,144,95,71,47,134,224,66,96,117,128,231,141,170,195,222,1,195,151,14,49,191,179,
  66,76,114,171,31,13,166,0,207,198,212,118,255,68,55,41,208,181,232,5,4,26,254,180,65,18,234,60,139,36,159,210,218,22,121,144,64,49,72,89,48,232,115,16,247,150,6,63,3,246,85,40,231,2,194,10,107,128,94,
  116,254,104,36,171,154,47,255,0,166,5,122,214,101,17,175,107,65,56,157,129,74,160,37,209,19,133,44,83,170,195,79,221,234,71,171,31,13,138,185,13,135,1,159,40,149,181,3,122,219,140,70,233,108,130,72,241,
  238,6,28,229,22,145,15,35,122,40,119,163,155,33,79,51,187,104,38,13,122,189,81,210,218,111,240,141,76,252,90,200,23,210,128,173,20,86,214,187,33,249,206,53,232,143,158,123,177,49,62,209,214,157,109,60,
  138,76,151,132,222,89,61,237,209,117,61,94,12,124,92,228,119,191,115,253,87,251,103,41,146,232,72,139,161,196,151,201,46,46,222,11,212,246,90,63,203,93,127,158,5,60,138,196,9,29,163,180,16,42,100,127,
  222,12,213,208,89,49,232,139,209,115,151,31,234,102,97,62,51,242,77,99,122,238,33,248,237,125,143,71,39,85,227,52,244,100,110,11,241,161,199,181,223,48,187,28,153,29,19,122,103,245,140,64,79,242,248,69,
  138,123,242,122,0,103,101,228,157,180,5,174,182,174,153,75,94,67,47,83,103,166,13,58,200,62,219,124,165,178,198,71,124,246,237,137,55,221,105,123,162,71,167,31,130,159,36,97,61,107,98,240,72,248,188,215,
  110,54,78,36,210,118,243,60,239,189,43,122,177,29,117,136,130,91,109,145,49,238,183,100,75,98,245,120,160,151,117,207,92,177,18,56,1,61,213,194,204,27,244,213,232,157,127,222,29,56,53,194,117,163,209,
  11,222,41,149,40,209,249,85,136,2,149,6,215,40,12,222,205,225,147,160,160,135,141,21,137,180,157,207,59,171,66,206,156,107,197,63,220,66,241,204,113,231,0,123,103,240,221,76,194,226,67,242,66,45,18,92,
  55,59,244,141,170,51,214,48,83,129,151,148,202,26,131,68,49,150,202,158,17,39,1,190,68,137,206,63,17,216,71,225,222,31,17,94,142,22,224,13,143,107,15,176,241,34,145,182,243,217,7,60,25,217,250,210,96,
  49,178,13,86,136,205,209,219,170,139,155,93,240,79,249,106,164,131,115,128,71,226,184,81,214,12,122,45,122,81,160,157,129,62,101,252,253,56,146,115,219,149,19,157,191,17,122,185,150,135,35,18,154,161,
  241,153,164,117,35,124,110,238,60,210,133,232,46,247,85,30,43,244,77,208,203,126,6,114,148,114,105,19,223,108,167,12,191,163,145,248,101,34,52,146,231,124,224,214,184,110,86,157,193,6,154,129,68,34,106,
  48,140,210,146,76,244,4,142,76,248,185,75,141,206,255,53,126,193,78,245,188,10,220,30,211,179,125,130,223,62,250,73,54,110,196,218,102,175,0,27,34,94,59,6,209,47,215,96,102,19,125,52,75,129,112,77,77,
  126,198,91,87,205,36,235,16,79,233,141,113,222,180,58,163,141,117,161,199,128,210,144,78,20,119,215,213,83,133,255,81,55,13,74,137,206,239,136,158,198,116,127,244,229,61,155,194,71,12,228,4,27,63,98,109,
  179,191,68,188,110,79,244,210,143,110,112,101,213,21,25,215,178,22,8,87,140,51,128,253,172,187,102,138,5,192,193,136,188,107,172,100,213,160,191,14,220,166,84,86,95,154,62,203,252,83,116,246,163,53,104,
  46,58,127,24,176,153,194,125,30,2,158,142,249,217,124,238,215,29,248,158,141,35,37,115,144,107,179,56,223,85,149,91,173,180,80,122,134,73,136,23,169,16,89,13,132,43,198,228,12,143,213,149,198,19,238,219,
  122,62,137,155,103,185,147,140,68,50,127,249,210,6,24,85,228,119,173,136,39,40,172,84,118,71,50,253,20,162,139,155,156,248,178,158,100,212,170,30,247,188,254,34,27,75,74,198,231,24,226,231,68,243,166,
  252,18,216,95,169,254,139,220,247,95,136,44,7,194,21,99,111,178,191,125,144,119,150,0,103,34,94,212,37,73,85,34,203,6,125,33,122,71,179,78,119,198,178,49,189,129,157,20,202,255,187,226,140,109,52,133,
  245,158,203,141,218,111,106,53,240,118,2,239,243,67,224,127,61,174,63,18,93,137,198,188,114,32,126,241,32,127,166,252,179,180,155,161,187,109,213,31,88,81,228,119,89,15,132,43,198,229,57,125,174,172,179,
  30,184,9,209,121,191,157,112,106,154,185,55,232,32,138,74,139,20,202,169,42,176,18,239,0,92,162,56,0,105,105,76,119,230,171,226,54,123,161,115,164,110,41,129,149,140,154,97,170,231,245,55,96,103,119,155,
  162,165,107,35,31,162,236,11,142,117,43,103,13,102,80,60,167,64,30,2,225,138,177,5,197,61,137,70,50,134,252,102,68,35,228,60,116,164,144,43,222,160,127,166,104,116,143,70,2,25,234,25,132,78,202,209,169,
  72,98,147,231,128,251,149,234,58,156,47,71,231,95,133,78,0,208,72,224,211,4,223,231,52,252,130,29,119,71,55,13,103,222,24,66,97,79,84,169,172,64,146,86,148,195,190,232,101,14,92,79,113,165,198,60,5,194,
  21,227,60,207,247,103,248,243,58,48,16,73,206,117,46,122,234,165,102,208,29,119,184,70,214,160,222,48,110,165,180,162,94,195,151,247,118,181,82,193,118,228,63,170,121,71,0,135,41,148,57,27,113,29,37,201,
  194,8,6,163,49,163,17,217,91,227,203,28,130,191,247,229,14,215,167,203,25,95,110,84,52,178,87,83,92,109,43,111,129,112,133,104,129,108,137,25,241,177,6,241,10,13,118,147,169,26,68,61,243,147,52,86,54,
  15,238,201,47,144,99,108,26,74,60,251,34,58,202,135,32,58,234,26,3,80,195,25,220,219,110,128,211,80,128,234,227,62,238,43,149,218,113,160,107,203,164,153,4,252,196,115,146,58,205,189,203,5,54,30,1,178,
  77,51,205,115,2,95,71,249,238,250,222,138,70,118,126,19,19,146,175,145,191,64,184,98,28,132,156,111,158,102,221,90,133,117,136,172,248,74,224,125,215,207,222,71,18,169,188,12,252,59,37,227,98,197,24,116,
  16,161,153,25,136,0,140,47,215,162,35,124,177,136,194,162,16,163,145,32,60,223,140,109,109,220,51,107,100,27,251,31,224,177,148,188,203,167,145,45,10,31,157,241,173,144,224,173,131,211,58,147,142,145,
  45,92,91,248,42,142,61,68,121,114,175,91,42,27,217,11,16,133,186,66,172,32,253,89,247,6,160,183,61,56,1,248,19,58,167,124,226,96,15,210,231,13,222,224,140,120,174,200,83,0,209,96,36,74,218,215,189,167,
  149,206,241,98,10,203,166,214,167,130,213,136,250,253,134,82,199,30,148,178,119,57,10,127,53,192,93,220,132,231,168,10,94,169,119,118,19,181,93,148,222,73,57,92,65,105,42,140,165,240,24,240,96,19,191,
  95,15,44,75,249,187,24,11,156,162,244,205,110,139,108,185,13,203,72,63,92,97,142,128,120,200,147,88,193,75,192,221,41,169,75,115,178,169,215,19,62,131,89,169,252,14,248,87,202,222,229,99,192,95,21,202,
  169,65,142,11,118,175,192,111,187,94,220,162,70,161,172,123,16,247,99,169,28,136,40,156,105,176,6,29,125,133,164,89,131,110,178,149,129,148,159,133,209,48,131,158,41,134,83,94,208,78,40,6,208,180,108,
  234,26,244,82,193,250,206,156,71,166,244,93,54,215,134,165,178,13,34,132,242,203,10,250,174,207,116,207,188,141,146,33,42,103,37,216,18,137,54,215,98,28,240,110,78,222,203,163,136,171,92,131,141,128,235,
  204,132,25,121,54,232,243,83,208,201,31,70,92,189,205,49,21,120,49,225,186,142,1,62,78,233,187,124,17,189,196,6,237,17,169,224,251,200,119,246,170,173,145,163,145,183,162,19,212,9,34,104,82,142,65,237,
  139,236,153,106,48,135,116,228,81,208,228,2,197,69,199,81,200,113,91,195,200,165,65,7,9,68,75,74,122,175,28,217,212,58,196,109,150,20,115,17,215,127,154,25,134,238,214,196,113,206,72,12,163,176,218,94,
  86,105,139,4,92,205,193,239,132,64,99,94,163,60,53,198,175,3,151,41,222,191,15,229,171,210,165,157,185,232,202,73,79,4,90,155,41,51,242,106,208,151,41,15,42,229,112,3,229,229,137,126,6,61,23,92,185,12,
  201,192,96,185,2,57,17,160,153,245,173,131,91,117,190,7,92,154,241,21,251,182,200,169,137,121,72,208,90,123,197,178,215,33,121,3,202,233,35,215,0,27,43,221,255,143,72,116,126,30,185,194,77,190,52,232,
  138,108,79,25,70,110,51,248,220,172,248,193,148,202,167,17,39,18,67,208,73,5,91,14,207,186,1,51,11,60,67,24,201,203,45,145,248,129,5,72,16,222,175,208,203,211,29,146,109,16,133,170,39,220,164,228,98,228,
  104,154,54,253,221,10,189,84,122,34,231,163,53,248,60,231,70,106,45,186,129,126,23,187,201,157,81,225,228,85,247,122,29,162,202,22,167,209,186,140,104,178,169,179,129,91,16,89,199,56,168,203,224,96,57,
  26,248,14,205,231,131,143,66,43,36,89,73,125,194,146,119,128,23,144,147,10,115,145,184,140,69,136,248,196,90,96,57,225,18,48,84,3,155,32,46,244,54,136,11,123,123,96,71,36,151,120,15,247,255,208,220,69,
  121,34,50,27,161,171,96,118,25,249,63,106,248,4,240,0,58,91,36,237,16,17,171,19,49,204,160,231,148,251,129,153,192,119,99,184,215,91,248,37,189,184,20,113,111,118,136,161,174,119,226,151,213,44,9,106,
  129,147,128,191,17,94,203,122,39,247,115,82,133,142,9,51,157,183,162,28,6,160,115,214,29,68,153,107,98,133,180,117,127,224,7,232,196,115,156,128,4,145,62,99,102,173,114,169,206,241,179,213,17,95,94,239,
  193,248,105,180,127,76,60,209,188,171,72,199,113,185,40,172,112,43,244,121,246,217,6,227,13,224,199,148,183,111,222,5,61,5,52,128,243,209,201,119,144,5,230,33,241,28,90,76,194,178,13,154,65,207,249,106,
  227,190,192,247,152,129,127,66,17,16,151,217,7,129,235,122,101,12,247,8,201,251,72,34,154,15,236,211,85,231,29,224,112,202,151,202,157,136,184,124,53,184,171,2,87,152,19,208,139,247,217,29,137,175,48,
  204,160,231,22,173,12,103,197,188,0,253,149,202,90,29,120,245,252,1,229,29,65,74,43,115,144,228,57,102,212,117,141,249,33,110,194,84,14,71,162,119,76,110,5,233,147,32,142,131,181,136,87,66,139,209,132,
  9,146,52,204,160,167,198,0,220,24,168,236,91,41,47,18,184,57,166,40,151,215,144,139,40,158,220,34,139,239,244,0,196,69,108,248,241,50,240,189,8,198,188,13,186,129,112,195,128,143,42,244,29,60,137,94,0,
  111,71,42,39,243,156,81,129,6,189,126,214,186,92,185,204,207,208,221,59,4,9,254,10,33,54,243,79,196,157,153,39,230,33,1,143,51,236,51,142,204,163,72,58,206,133,17,174,29,130,94,134,179,151,129,155,42,
  252,93,12,80,156,112,159,5,236,99,221,219,12,122,94,89,28,96,214,58,30,57,206,164,205,83,192,227,1,6,139,186,28,190,215,101,200,190,239,213,246,41,151,69,29,114,182,255,88,10,103,4,108,142,157,208,203,
  244,85,135,28,217,220,80,225,239,100,1,197,243,189,151,75,21,18,32,87,101,93,221,12,122,94,153,132,94,132,244,60,68,21,43,20,23,42,14,112,127,64,142,123,229,149,250,244,175,71,147,94,93,250,52,241,33,
  240,125,68,84,39,170,2,223,245,232,201,141,222,10,252,195,94,11,184,49,229,77,165,178,246,67,84,22,13,51,232,185,100,53,122,65,55,131,92,121,161,248,23,58,46,200,213,196,119,116,47,105,30,67,82,133,222,
  101,159,117,81,110,115,109,52,221,163,140,159,160,39,240,179,196,77,94,13,97,29,186,10,114,87,32,66,69,134,25,244,92,242,71,196,165,237,195,83,196,163,64,119,9,229,31,33,106,204,229,136,210,89,165,240,
  9,34,208,115,24,233,203,241,158,36,47,34,123,229,103,17,77,205,176,158,118,232,138,190,12,5,150,218,235,249,18,79,34,249,231,53,216,18,17,173,50,204,160,231,150,179,128,149,17,175,93,233,174,143,131,79,
  129,115,60,7,241,43,42,180,95,79,7,246,66,114,160,191,83,193,223,247,27,136,226,221,190,136,126,191,47,23,35,66,50,26,60,143,184,219,141,175,50,144,104,177,13,133,232,11,236,106,77,106,6,61,175,204,7,
  122,71,188,182,119,204,43,222,7,17,157,247,40,19,143,83,128,47,42,184,111,215,2,119,0,59,3,63,85,50,104,89,97,6,162,248,86,3,76,67,39,32,114,103,244,182,172,54,32,129,112,117,24,133,248,0,189,132,68,45,
  73,127,154,100,195,12,186,23,191,71,20,154,202,97,130,187,46,110,250,34,138,119,229,24,178,83,209,11,174,201,58,95,32,106,129,7,33,122,227,227,114,186,106,127,19,137,146,238,6,244,2,30,66,55,237,236,100,
  36,145,141,6,55,0,175,88,215,108,146,137,232,233,44,244,2,142,183,38,53,131,158,103,134,80,122,224,217,77,238,239,147,96,29,18,132,244,66,137,198,252,52,116,164,104,243,200,108,228,184,85,87,68,38,115,
  48,114,68,112,69,6,159,229,83,224,79,136,82,225,46,110,5,61,130,48,105,131,79,116,70,65,131,69,136,235,222,104,154,245,64,31,197,242,174,65,39,9,140,145,98,42,89,200,191,14,145,92,156,239,86,54,45,10,
  252,205,6,36,56,109,60,201,186,7,151,187,1,245,54,224,103,69,254,102,169,91,153,63,110,221,186,36,102,185,159,9,200,121,221,174,72,138,210,93,145,115,214,219,33,57,166,59,33,234,91,27,197,92,191,53,200,
  57,251,101,200,25,229,15,128,183,221,170,237,85,224,221,152,234,209,214,125,3,203,75,248,187,82,218,104,80,70,39,80,73,48,3,81,143,60,182,132,191,221,184,153,5,90,23,68,45,114,132,53,107,126,169,170,171,
  243,179,83,53,53,53,121,104,135,93,92,103,63,2,137,12,253,24,248,51,226,158,77,155,188,232,145,192,5,136,244,105,59,224,61,224,94,36,241,138,69,12,27,134,97,100,101,85,49,107,86,186,12,186,97,24,134,97,
  24,201,83,109,77,96,24,134,97,24,102,208,13,195,48,12,195,48,131,110,24,134,97,24,134,25,116,195,48,12,195,48,204,160,27,134,97,24,134,25,116,195,48,12,195,48,204,160,27,134,97,24,134,97,6,221,48,12,195,
  48,12,51,232,134,97,24,134,97,6,221,48,12,195,48,12,51,232,134,97,24,134,97,152,65,55,12,195,48,12,227,43,252,223,0,159,232,135,28,80,120,178,199,0,0,0,0,73,69,78,68,174,66,96,130,0,0 };
  
  
  const char* MainView::backgroundLogo = (const char*)backgroundLogoData;
  const int MainView::backgroundLogoSize = 7348;