| 
						
						
						
					 | 
					@ -1,71 +1,67 @@ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					// jQuery & jQuery UI
 | 
					 | 
					 | 
					/** | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					import $ from 'jquery'; | 
					 | 
					 | 
					 * First we will load all of this project's JavaScript dependencies which | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					window.$ = window.jQuery = $; | 
					 | 
					 | 
					 * includes Vue and other libraries. It is a great starting point when | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					import 'jquery-ui/ui/widgets/autocomplete.js'; | 
					 | 
					 | 
					 * building robust, powerful web applications using Vue and Laravel. | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					import 'jquery-ui/ui/widgets/sortable.js'; | 
					 | 
					 | 
					 */ | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					import 'select2/dist/js/select2.js'; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					// Huebee
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import Huebee from 'huebee'; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					window.Huebee = Huebee; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					require('./bootstrap') | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					// jQuery & jQuery UI
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import 'jquery-ui/ui/widgets/autocomplete.js' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import 'jquery-ui/ui/widgets/sortable.js' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import 'select2/dist/js/select2.js' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					$.when($.ready).then(function () { | 
					 | 
					 | 
					$.when($.ready).then(function () { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  if ($('.message-container').length) { | 
					 | 
					 | 
					  if ($('.message-container').length) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    setTimeout( | 
					 | 
					 | 
					    setTimeout( | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            function() | 
					 | 
					 | 
					      function () { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            { | 
					 | 
					 | 
					        $('.message-container').fadeOut() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                $('.message-container').fadeOut(); | 
					 | 
					 | 
					      }, 3500) | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					            }, 3500); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  if ($('.livestats-container').length) { | 
					 | 
					 | 
					  if ($('.livestats-container').length) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    $('.livestats-container').each(function (index) { | 
					 | 
					 | 
					    $('.livestats-container').each(function (index) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var id = $(this).data('id'); | 
					 | 
					 | 
					      var id = $(this).data('id') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var dataonly = $(this).data('dataonly'); | 
					 | 
					 | 
					      var dataonly = $(this).data('dataonly') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var increaseby = (dataonly == 1) ? 20000 : 1000; | 
					 | 
					 | 
					      var increaseby = (dataonly === 1) ? 20000 : 1000 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var container = $(this); | 
					 | 
					 | 
					      var container = $(this) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var max_timer = 30000; | 
					 | 
					 | 
					      var maxTimer = 30000 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					      var timer = 5000; | 
					 | 
					 | 
					      var timer = 5000; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      (function worker () { | 
					 | 
					 | 
					      (function worker () { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $.ajax({ | 
					 | 
					 | 
					        $.ajax({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          url: '/get_stats/' + id, | 
					 | 
					 | 
					          url: '/get_stats/' + id, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          dataType: 'json', | 
					 | 
					 | 
					          dataType: 'json', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          success: function (data) { | 
					 | 
					 | 
					          success: function (data) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        container.html(data.html); | 
					 | 
					 | 
					            container.html(data.html) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        if(data.status == 'active') timer = increaseby; | 
					 | 
					 | 
					            if (data.status === 'active') timer = increaseby | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            else { | 
					 | 
					 | 
					            else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                            if(timer < max_timer) timer += 2000; | 
					 | 
					 | 
					              if (timer < maxTimer) timer += 2000 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          }, | 
					 | 
					 | 
					          }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          complete: function () { | 
					 | 
					 | 
					          complete: function () { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					          // Schedule the next request when the current one's complete
 | 
					 | 
					 | 
					          // Schedule the next request when the current one's complete
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                        setTimeout(worker, timer); | 
					 | 
					 | 
					            setTimeout(worker, timer) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					          } | 
					 | 
					 | 
					          } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                }); | 
					 | 
					 | 
					        }) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            })(); | 
					 | 
					 | 
					      })() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }); | 
					 | 
					 | 
					    }) | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  function readURL (input) { | 
					 | 
					 | 
					  function readURL (input) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    if (input.files && input.files[0]) { | 
					 | 
					 | 
					    if (input.files && input.files[0]) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var reader = new FileReader(); | 
					 | 
					 | 
					      var reader = new FileReader() | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      reader.onload = function (e) { | 
					 | 
					 | 
					      reader.onload = function (e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                $('#appimage img').attr('src', e.target.result); | 
					 | 
					 | 
					        $('#appimage img').attr('src', e.target.result) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }; | 
					 | 
					 | 
					      } | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            reader.readAsDataURL(input.files[0]); | 
					 | 
					 | 
					      reader.readAsDataURL(input.files[0]) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  $('#upload').change(function () { | 
					 | 
					 | 
					  $('#upload').change(function () { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        readURL(this); | 
					 | 
					 | 
					    readURL(this) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					    }); | 
					 | 
					 | 
					  }) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  /* $(".droppable").droppable({ | 
					 | 
					 | 
					  /* $(".droppable").droppable({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        tolerance: "intersect", | 
					 | 
					 | 
					        tolerance: "intersect", | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        drop: function( event, ui ) { | 
					 | 
					 | 
					        drop: function( event, ui ) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -87,76 +83,97 @@ $.when( $.ready ).then(function() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    stop: function (event, ui) { | 
					 | 
					 | 
					    stop: function (event, ui) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      var idsInOrder = $('#sortable').sortable('toArray', { | 
					 | 
					 | 
					      var idsInOrder = $('#sortable').sortable('toArray', { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        attribute: 'data-id' | 
					 | 
					 | 
					        attribute: 'data-id' | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }); | 
					 | 
					 | 
					      }) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					      $.post( | 
					 | 
					 | 
					      $.post( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        '/order', | 
					 | 
					 | 
					        '/order', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        { order: idsInOrder } | 
					 | 
					 | 
					        { order: idsInOrder } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            ); | 
					 | 
					 | 
					      ) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    }); | 
					 | 
					 | 
					  }) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					    $('#sortable').sortable('disable'); | 
					 | 
					 | 
					  $('#sortable').sortable('disable') | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  $('#app').on('click', '#config-button', function (e) { | 
					 | 
					 | 
					  $('#app').on('click', '#config-button', function (e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        e.preventDefault(); | 
					 | 
					 | 
					    e.preventDefault() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var app = $('#app'); | 
					 | 
					 | 
					    var app = $('#app') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var active = (app.hasClass('header')); | 
					 | 
					 | 
					    var active = (app.hasClass('header')) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        app.toggleClass('header'); | 
					 | 
					 | 
					    app.toggleClass('header') | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    if (active) { | 
					 | 
					 | 
					    if (active) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $('.add-item').hide(); | 
					 | 
					 | 
					      $('.add-item').hide() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $('.item-edit').hide(); | 
					 | 
					 | 
					      $('.item-edit').hide() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $('#app').removeClass('sidebar'); | 
					 | 
					 | 
					      $('#app').removeClass('sidebar') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $('#sortable').sortable('disable'); | 
					 | 
					 | 
					      $('#sortable').sortable('disable') | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } else { | 
					 | 
					 | 
					    } else { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $('#sortable').sortable('enable'); | 
					 | 
					 | 
					      $('#sortable').sortable('enable') | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					      setTimeout(function () { | 
					 | 
					 | 
					      setTimeout(function () { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                $('.add-item').fadeIn(); | 
					 | 
					 | 
					        $('.add-item').fadeIn() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                $('.item-edit').fadeIn(); | 
					 | 
					 | 
					        $('.item-edit').fadeIn() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            }, 350); | 
					 | 
					 | 
					      }, 350) | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  }).on('click', '#add-item, #pin-item', function (e) { | 
					 | 
					 | 
					  }).on('click', '#add-item, #pin-item', function (e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        e.preventDefault(); | 
					 | 
					 | 
					    e.preventDefault() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var app = $('#app'); | 
					 | 
					 | 
					    var app = $('#app') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var active = (app.hasClass('sidebar')); | 
					 | 
					 | 
					    var active = (app.hasClass('sidebar')) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        app.toggleClass('sidebar'); | 
					 | 
					 | 
					    app.toggleClass('sidebar') | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  }).on('click', '.close-sidenav', function (e) { | 
					 | 
					 | 
					  }).on('click', '.close-sidenav', function (e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        e.preventDefault(); | 
					 | 
					 | 
					    e.preventDefault() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var app = $('#app'); | 
					 | 
					 | 
					    var app = $('#app') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        app.removeClass('sidebar'); | 
					 | 
					 | 
					    app.removeClass('sidebar') | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  }).on('click', '#test_config', function (e) { | 
					 | 
					 | 
					  }).on('click', '#test_config', function (e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        e.preventDefault(); | 
					 | 
					 | 
					    e.preventDefault() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var apiurl = $('#create input[name=url]').val(); | 
					 | 
					 | 
					    var apiUrl = $('#create input[name=url]').val() | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var override_url = $('#create input[name="config[override_url]"]').val(); | 
					 | 
					 | 
					    var overrideUrl = $('#create input[name="config[override_url]"').val() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(override_url.length && override_url != '') { | 
					 | 
					 | 
					    if (overrideUrl.length && overrideUrl !== '') { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            apiurl = override_url; | 
					 | 
					 | 
					      apiUrl = overrideUrl | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var data = {}; | 
					 | 
					 | 
					    var data = {} | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        data['url'] = apiurl; | 
					 | 
					 | 
					    data['url'] = apiUrl | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    $('input.config-item').each(function (index) { | 
					 | 
					 | 
					    $('input.config-item').each(function (index) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var config = $(this).data('config'); | 
					 | 
					 | 
					      var config = $(this).data('config') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            data[config] = $(this).val(); | 
					 | 
					 | 
					      data[config] = $(this).val() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }); | 
					 | 
					 | 
					    }) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    $.post('/test_config', { data: data }, function (data) { | 
					 | 
					 | 
					    $.post('/test_config', { data: data }, function (data) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            alert(data); | 
					 | 
					 | 
					      alert(data) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }); | 
					 | 
					 | 
					    }) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					  }) | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					    }); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					  $('#pinlist').on('click', 'a', function (e) { | 
					 | 
					 | 
					  $('#pinlist').on('click', 'a', function (e) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        e.preventDefault(); | 
					 | 
					 | 
					    e.preventDefault() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var current = $(this); | 
					 | 
					 | 
					    var current = $(this) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        var id = current.data('id'); | 
					 | 
					 | 
					    var id = current.data('id') | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    $.get('items/pintoggle/' + id + '/true', function (data) { | 
					 | 
					 | 
					    $.get('items/pintoggle/' + id + '/true', function (data) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            var inner = $(data).filter('#sortable').html(); | 
					 | 
					 | 
					      var inner = $(data).filter('#sortable').html() | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $('#sortable').html(inner); | 
					 | 
					 | 
					      $('#sortable').html(inner) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            current.toggleClass('active'); | 
					 | 
					 | 
					      current.toggleClass('active') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        }); | 
					 | 
					 | 
					    }) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					    }); | 
					 | 
					 | 
					  }) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  var elem = $('.color-picker')[0] | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  var hueb = new Huebee(elem, { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  // options
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  }) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  $('#appname').autocomplete({ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    source: availableApps, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    select: function (event, ui) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      $.post('/appload', { app: ui.item.value }, function (data) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $('#appimage').html("<img src='/storage/" + data.icon + "' /><input type='hidden' name='icon' value='" + data.icon + "' />") | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $('input[name=colour]').val(data.colour) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        hueb.setColor(data.colour) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        $('input[name=pinned]').prop('checked', true) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (data.config !== null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          $.get('/view/' + data.config, function (getdata) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            $('#sapconfig').html(getdata).show() | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          }) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      }, 'json') | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  }) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					}); | 
					 | 
					 | 
					  $('.tags').select2() | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  // $('.tags').select2({
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  //   theme: 'bootstrap'
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					  // })
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					}) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |